chat

package
v0.502.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const RepoURL = "https://github.com/digiogithub/pando"

RepoURL is the Pando repository URL shown (and clickable) in the chat sidebar header.

Variables

View Source
var DeleteKeyMaps = DeleteAttachmentKeyMaps{
	AttachmentDeleteMode: key.NewBinding(
		key.WithKeys("ctrl+shift+r"),
		key.WithHelp("ctrl+shift+r+{i}", "delete attachment at index i"),
	),
	Escape: key.NewBinding(
		key.WithKeys("esc"),
		key.WithHelp("esc", "cancel delete mode"),
	),
	DeleteAllAttachments: key.NewBinding(
		key.WithKeys("r"),
		key.WithHelp("ctrl+r+r", "delete all attchments"),
	),
}

Functions

func CreateTextArea

func CreateTextArea(existing *textarea.Model) textarea.Model

func NewEditorCmp

func NewEditorCmp(app *app.App) tea.Model

func NewGoalStatusCmp added in v0.324.0

func NewGoalStatusCmp() tea.Model

func NewMessagesCmp

func NewMessagesCmp(app *app.App) tea.Model

func NewSidebarCmp

func NewSidebarCmp(session session.Session, history history.Service) tea.Model

Types

type BlurChatEditorMsg added in v0.3.0

type BlurChatEditorMsg struct{}

BlurChatEditorMsg is sent to the chat editor to relinquish textarea focus.

type ChatInfoSidebar added in v0.501.1

type ChatInfoSidebar interface {
	tea.Model
	SetSize(width, height int) tea.Cmd
	GetSize() (int, int)
	BindingKeys() []key.Binding
	// SetSession switches the sidebar to a different session, reloading its plan
	// and modified-files state.
	SetSession(s session.Session)
}

ChatInfoSidebar is the embeddable session info column rendered to the right of the chat in the Chat workspace tab. It exposes the session title, configured LSPs, the current Plan (TodoWrite entries) and the files modified during the session. It satisfies layout.Container (tea.Model + Sizeable + Bindings) so it can be dropped into a SplitPaneLayout panel.

func NewChatInfoSidebar added in v0.501.1

func NewChatInfoSidebar(s session.Session, history history.Service) ChatInfoSidebar

NewChatInfoSidebar builds the embeddable chat info sidebar bound to the given session and history service.

type ChatSidebarConfigChangedMsg added in v0.501.1

type ChatSidebarConfigChangedMsg struct{}

ChatSidebarConfigChangedMsg is dispatched when the chat info sidebar configuration (enabled mode or minimum width) changes, so the chat page can rebuild its layout to show or hide the sidebar live without a restart.

type CompactSessionMsg added in v0.410.1

type CompactSessionMsg struct{}

CompactSessionMsg requests a manual compaction of the current session.

type DeleteAttachmentKeyMaps

type DeleteAttachmentKeyMaps struct {
	AttachmentDeleteMode key.Binding
	Escape               key.Binding
	DeleteAllAttachments key.Binding
}

type EditorFocusMsg

type EditorFocusMsg bool

type EditorHeightChangedMsg added in v0.416.13

type EditorHeightChangedMsg struct {
	Lines int
}

EditorHeightChangedMsg is emitted by the editor when its line count changes. Lines is clamped to [1, 10].

type EditorKeyMaps

type EditorKeyMaps struct {
	Send        key.Binding
	NewLine     key.Binding
	OpenEditor  key.Binding
	HistoryPrev key.Binding
	HistoryNext key.Binding
}

type FocusChatEditorMsg added in v0.3.0

type FocusChatEditorMsg struct{}

FocusChatEditorMsg is sent to the chat editor to request textarea focus.

type GoalState added in v0.324.0

type GoalState struct {
	Objective      string
	Status         string
	Iteration      int64
	MaxIterations  int64
	StartedAt      int64
	CompletedAt    int64
	HasCompletedAt bool
	Progress       string
	NextStep       string
}

GoalState is the TUI-friendly projection of the current goal/autopilot state.

func (*GoalState) IsRunning added in v0.324.0

func (g *GoalState) IsRunning() bool

func (*GoalState) IsTerminal added in v0.324.0

func (g *GoalState) IsTerminal() bool

type GoalUpdatedMsg added in v0.324.0

type GoalUpdatedMsg struct {
	SessionID string
	Goal      *GoalState
}

GoalUpdatedMsg is dispatched when the current session goal state changes.

type MessageKeys

type MessageKeys struct {
	PageDown     key.Binding
	PageUp       key.Binding
	HalfPageUp   key.Binding
	HalfPageDown key.Binding
}

type SendMsg

type SendMsg struct {
	Text        string
	Attachments []message.Attachment
}

type SessionClearedMsg

type SessionClearedMsg struct{}

type SessionSelectedMsg

type SessionSelectedMsg = session.Session

type ShowSlashCompletionMsg added in v0.410.1

type ShowSlashCompletionMsg struct{}

ShowSlashCompletionMsg is emitted when "/" is typed at the start of an empty editor.

type TodosUpdatedMsg added in v0.257.0

type TodosUpdatedMsg struct {
	SessionID string
	Todos     []tools.TodoItem
}

TodosUpdatedMsg is dispatched when the TodoWrite tool updates the plan.

Jump to

Keyboard shortcuts

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