Documentation
¶
Index ¶
- type DisplayBlock
- type InputModel
- type LoginWizard
- type Model
- func (m *Model) GetAgent() *agent.Agent
- func (m *Model) GetConfig() *config.Config
- func (m *Model) GetCost() float64
- func (m *Model) GetTokensIn() int
- func (m *Model) GetTokensOut() int
- func (m *Model) Init() tea.Cmd
- func (m *Model) SendPrompt(prompt string)
- func (m *Model) SetModel(model string)
- func (m *Model) SetPermissionMode(mode string)
- func (m *Model) SetProgram(p *tea.Program)
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) View() string
- type ToolState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayBlock ¶
type DisplayBlock struct {
Type string // "user", "assistant", "tool", "system"
Content string
Tools []*ToolState
Thinking string
Timestamp time.Time
}
DisplayBlock represents one visual block in the conversation
type InputModel ¶
type InputModel struct {
// contains filtered or unexported fields
}
InputModel wraps bubbles/textarea for full IME/Chinese support + history
func NewInputModel ¶
func NewInputModel() *InputModel
func (*InputModel) Blur ¶
func (i *InputModel) Blur()
func (*InputModel) Focus ¶
func (i *InputModel) Focus()
func (*InputModel) Reset ¶
func (i *InputModel) Reset()
func (*InputModel) SetWidth ¶
func (i *InputModel) SetWidth(w int)
func (*InputModel) Update ¶
Update processes a key message, returns true if Enter was pressed (submit)
func (*InputModel) Value ¶
func (i *InputModel) Value() string
func (*InputModel) View ¶
func (i *InputModel) View() string
type LoginWizard ¶ added in v0.6.1
type LoginWizard struct {
Step int // 0=provider, 1=apikey, 2=baseurl, 3=model, 4=name
Provider string // "anthropic", "openai", "openrouter", "custom"
ProviderName string // display name (for custom)
APIKey string
BaseURL string
Model string
}
LoginWizard tracks the multi-step login flow
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main Bubble Tea model
func (*Model) GetTokensIn ¶
func (*Model) GetTokensOut ¶
func (*Model) SendPrompt ¶
func (*Model) SetPermissionMode ¶
func (*Model) SetProgram ¶
Click to show internal directories.
Click to hide internal directories.