inspector

package
v0.0.310 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseMsg

type CloseMsg struct{}

CloseMsg signals that the inspector should be closed

type Config added in v0.0.48

type Config struct {
	ProviderName string
	ModelName    string
	ToolSpecs    []llm.ToolSpec

	// Compaction boundary metadata lets the inspector mark where the active
	// compacted context begins while still showing the full preserved scrollback.
	HasCompactionBoundary   bool
	CompactionBoundaryIndex int
	CompactionBoundarySeq   int
	CompactionCount         int

	ReasoningConfig appconfig.ReasoningConfig
}

Config holds optional configuration for the inspector

type ContentItem added in v0.0.46

type ContentItem struct {
	ID          string // e.g., "msg-0", "tool-call_123"
	ItemType    string // e.g., "message", "tool_call", "tool_result", "tool_definition", "compaction"
	StartLine   int    // Start line in rendered content
	EndLine     int    // End line (exclusive)
	IsTruncated bool
	TotalLines  int // Original line count before truncation
}

ContentItem tracks a truncatable content block in the rendered output

type ContentRenderer

type ContentRenderer struct {
	// contains filtered or unexported fields
}

ContentRenderer handles rendering of conversation messages

func NewContentRenderer

func NewContentRenderer(width int, styles *ui.Styles, expandedIDs map[string]bool, store session.Store, providerName, modelName string, toolSpecs []llm.ToolSpec, reasoningCfg appconfig.ReasoningConfig) *ContentRenderer

NewContentRenderer creates a new content renderer

func (*ContentRenderer) RenderMessages

func (r *ContentRenderer) RenderMessages(messages []session.Message) (string, []ContentItem)

RenderMessages renders all messages into a string and returns content items for truncation tracking

func (*ContentRenderer) SetCompactionBoundary added in v0.0.274

func (r *ContentRenderer) SetCompactionBoundary(hasBoundary bool, index, seq, count int)

SetCompactionBoundary configures an optional marker for the latest active context boundary. The renderer also detects every persisted compaction summary message by content so older compactions remain visible in Ctrl+O.

type KeyMap

type KeyMap struct {
	Quit         key.Binding
	ScrollUp     key.Binding
	ScrollDown   key.Binding
	PageUp       key.Binding
	PageDown     key.Binding
	HalfPageUp   key.Binding
	HalfPageDown key.Binding
	GoToTop      key.Binding
	GoToBottom   key.Binding
	ExpandAll    key.Binding
}

KeyMap defines keybindings for the inspector

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybindings for the inspector

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the full help view

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp returns keybindings for the short help view

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the conversation inspector model

func New

func New(messages []session.Message, width, height int, styles *ui.Styles) *Model

New creates a new inspector model

func NewWithConfig added in v0.0.48

func NewWithConfig(messages []session.Message, width, height int, styles *ui.Styles, store session.Store, cfg *Config) *Model

NewWithConfig creates a new inspector model with full configuration

func NewWithStore added in v0.0.46

func NewWithStore(messages []session.Message, width, height int, styles *ui.Styles, store session.Store) *Model

NewWithStore creates a new inspector model with a session store for subagent message fetching

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the model

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)

Update handles messages

func (*Model) View

func (m *Model) View() tea.View

View renders the model

Jump to

Keyboard shortcuts

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