sessioncapture

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 8 Imported by: 0

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL