Documentation
¶
Index ¶
- func DefaultConfigPath() string
- type Buttons
- type Config
- type Daemon
- type Preset
- type Session
- func (s *Session) CommandLine() string
- func (s *Session) DoAction(action string) error
- func (s *Session) Kill()
- func (s *Session) Resize(cols, rows int) error
- func (s *Session) SetCustom(action, value string) error
- func (s *Session) Size() (cols, rows int)
- func (s *Session) Start() error
- func (s *Session) SubscribeWithScrollback(cw *connWriter) (chan []byte, [][]byte)
- func (s *Session) Unsubscribe(ch chan []byte)
- func (s *Session) WriteInput(b []byte) error
- func (s *Session) WriteText(text string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the canonical config location.
Types ¶
type Buttons ¶
Buttons holds the two user-customizable pad buttons. Each is a single value: a recognized key name / combo ("Ctrl+O", "Shift+Tab") or a literal string sent as-is ("/compact") — see encodeKey. All other intent buttons (accept/reject/up/down/mode_switch/interrupt/rewind) are hardcoded per agent — see keysForCommand — and cannot be overridden from config.
type Config ¶
func LoadConfig ¶
type Session ¶
type Session struct {
ID uint32
Name string
Agent string
Cwd string
Repo string // short display label: git repo name or cwd folder name
Status string
LastActivity int64
// contains filtered or unexported fields
}
func (*Session) CommandLine ¶
CommandLine returns the full launch command as typed ("ollama run glm"), so clients can offer "start another one like this".
func (*Session) DoAction ¶
DoAction maps an action name to the session's configured key sequence and writes it. Keys in a multi-key sequence are written with a short gap so ESC-prefixed sequences register as separate key presses (two ESC bytes in one write would otherwise be swallowed as one escape-sequence prefix).
func (*Session) Resize ¶
Resize updates the PTY window size so the child process reflows its TUI to match the attached client's terminal dimensions. Safe to call before or after Start; a no-op for not-yet-started sessions.
func (*Session) SetCustom ¶
SetCustom rebinds a custom button at runtime (from the TUI). The value is a single key name / combo or a literal string — the same grammar as the config file. Session-scoped: config.toml is untouched.
func (*Session) SubscribeWithScrollback ¶
SubscribeWithScrollback atomically registers a subscription and snapshots the scrollback under the same lock, so a client replaying scrollback then reading the channel sees every byte exactly once, with no gap or duplicate.