Documentation
¶
Index ¶
- func PrintUnansweredDebug(ctx context.Context, client *api.Client, w io.Writer) error
- func RunChatQuery(ctx context.Context, lc *llm.Client, client *api.Client, people *person.Store, ...) (answer string, trace []string, err error)
- type ConnState
- type Mode
- type Model
- func (m Model) Init() tea.Cmd
- func (m Model) Snapshot() state.Cache
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() tea.View
- func (m Model) WithCache(c state.Cache, path string) Model
- func (m Model) WithLLM(c *llm.Client) Model
- func (m Model) WithMerges(p *identity.MergePolicy) Model
- func (m Model) WithPeople(s *person.Store) Model
- func (m Model) WithVault(v *redact.Vault) Model
- type Tab
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintUnansweredDebug ¶
PrintUnansweredDebug prints one line per active chat with every signal the unanswered filter reads, so filter bugs can be diagnosed from flags alone. IDs are reduced to their shape and no titles, names, or text are printed.
func RunChatQuery ¶
func RunChatQuery(ctx context.Context, lc *llm.Client, client *api.Client, people *person.Store, question string) (answer string, trace []string, err error)
RunChatQuery answers one question through the full tool loop without the TUI. It exists for eval harnesses: the answer and tool trace come back as plain strings for a human to judge.
Types ¶
type ConnState ¶
type ConnState int
ConnState is the live-events connection state shown in the status bar. The zero value connIdle means no WebSocket client is attached and keeps the status bar quiet.
type Mode ¶
type Mode int
Mode is the top-level UI state. INSERT (M2) and overlays (M1.5) slot in later.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds all TUI state. bubbletea passes it by value through Update, so navigation methods use value receivers and return a new Model.
func New ¶
New builds the initial model. The chat fetch happens in Init, not here. events may be nil, which disables live updates.
func (Model) WithCache ¶
WithCache warm-starts the model from a cached snapshot, so the first frame shows chats instead of "Loading…". Init's REST fetch still runs and replaces the snapshot when fresh data lands.
func (Model) WithLLM ¶
WithLLM attaches the local-model client backing the chat tab. A nil client leaves the tab in its setup-help state.
func (Model) WithMerges ¶
func (m Model) WithMerges(p *identity.MergePolicy) Model
WithMerges attaches the cross-network identity merge policy.
func (Model) WithPeople ¶
WithPeople attaches the person-card store used by the chat tools.