Documentation
¶
Overview ¶
Package sessioncapture provides terminal context capture with delta-based tracking. Inspired by lacy's context.sh — only sends what changed since the last query.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TerminalContext ¶
type TerminalContext struct {
// contains filtered or unexported fields
}
TerminalContext captures and tracks terminal state changes between queries. Only includes what changed since the last query to minimize token usage.
func NewTerminalContext ¶
func NewTerminalContext() *TerminalContext
NewTerminalContext creates a new delta-tracking terminal context.
func (*TerminalContext) BuildContext ¶
func (tc *TerminalContext) BuildContext(query string) string
BuildContext returns a delta-based context string and resets tracking state.
func (*TerminalContext) MarkCommand ¶
func (tc *TerminalContext) MarkCommand(cmd string)
MarkCommand records a shell command that was executed.
func (*TerminalContext) MarkExitCode ¶
func (tc *TerminalContext) MarkExitCode(code int)
MarkExitCode records the exit code of the last command.
func (*TerminalContext) Reset ¶
func (tc *TerminalContext) Reset()
Reset clears all state (e.g., on /new session).
Click to show internal directories.
Click to hide internal directories.