Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EditorHeightChangedMsg ¶ added in v1.8.2
type EditorHeightChangedMsg struct {
Height int
}
EditorHeightChangedMsg is emitted when the editor height changes (e.g., during resize)
type FocusedPanel ¶
type FocusedPanel string
FocusedPanel represents which panel is currently focused
const ( PanelChat FocusedPanel = "chat" PanelEditor FocusedPanel = "editor" )
type HitTest ¶ added in v1.20.1
type HitTest struct {
// contains filtered or unexported fields
}
HitTest determines what UI element is at the given coordinates. This centralizes all hit-testing logic in one place, making it easier to understand the clickable regions and their priorities.
func NewHitTest ¶ added in v1.20.1
func NewHitTest(page *chatPage) *HitTest
NewHitTest creates a hit tester for the given chat page.
func (*HitTest) At ¶ added in v1.20.1
func (h *HitTest) At(x, y int) MouseTarget
At determines what target is at the given coordinates. It checks regions in priority order (most specific first).
func (*HitTest) IsOnResizeLine ¶ added in v1.20.1
IsOnResizeLine checks if y is on the resize handle line.
type KeyMap ¶
type KeyMap struct {
Tab key.Binding
Cancel key.Binding
ShiftNewline key.Binding
CtrlJ key.Binding
ExternalEditor key.Binding
ToggleSplitDiff key.Binding
ToggleSidebar key.Binding
}
KeyMap defines key bindings for the chat page
type MouseTarget ¶ added in v1.20.1
type MouseTarget int
MouseTarget represents what the mouse is interacting with.
const ( TargetNone MouseTarget = iota TargetEditorResizeHandle TargetSidebarToggle TargetSidebarResizeHandle TargetSidebarStar TargetSidebarTitle TargetSidebarContent TargetMessages TargetEditorBanner TargetEditor )
type Page ¶
type Page interface {
layout.Model
layout.Sizeable
layout.Help
CompactSession(additionalPrompt string) tea.Cmd
Cleanup()
// GetInputHeight returns the current height of the editor/input area (including padding)
GetInputHeight() int
// SetSessionStarred updates the sidebar star indicator
SetSessionStarred(starred bool)
// SetTitleRegenerating sets the title regenerating state on the sidebar
SetTitleRegenerating(regenerating bool) tea.Cmd
// InsertText inserts text at the current cursor position in the editor
InsertText(text string)
// SetRecording sets the recording mode on the editor
SetRecording(recording bool) tea.Cmd
// SendEditorContent sends the current editor content as a message
SendEditorContent() tea.Cmd
}
Page represents the main chat page