Documentation
¶
Index ¶
- Constants
- type AskEvent
- type CapabilitiesChangedEvent
- type CheckpointEntry
- type CheckpointsChangedEvent
- type ClientMessage
- type ConversationContent
- type ConversationMessage
- type ConversationReasoning
- type ConversationResult
- type ConversationTool
- type DiagnosticsChangedEvent
- type DiffEntry
- type DiffsChangedEvent
- type DoneEvent
- type ErrorEvent
- type FileContent
- type FileEntry
- type FilesChangedEvent
- type MessagesEvent
- type PhaseEvent
- type PromptEvent
- type ReasoningDeltaEvent
- type Server
- type ServerEvent
- type SessionEntry
- type SessionEvent
- type SessionsChangedEvent
- type SkillEntry
- type TextDeltaEvent
- type ToolCallEvent
- type ToolResultEvent
- type UsageEvent
Constants ¶
const ( MsgSend = "send" MsgCancel = "cancel" MsgPromptResponse = "prompt_response" MsgAskResponse = "ask_response" )
Client -> Server message types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilitiesChangedEvent ¶
type CapabilitiesChangedEvent struct{}
type CheckpointEntry ¶
type CheckpointEntry struct {
Hash string `json:"hash"`
Message string `json:"message"`
Time string `json:"time"`
}
CheckpointEntry represents a single rewind checkpoint.
type CheckpointsChangedEvent ¶
type CheckpointsChangedEvent struct{}
type ClientMessage ¶
type ClientMessage struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
Files []string `json:"files,omitempty"`
Approved bool `json:"approved,omitempty"`
Answer string `json:"answer,omitempty"`
}
ClientMessage is the envelope for all client-to-server WebSocket messages. Inbound messages share one struct because the type isn't known until the frame is unmarshaled.
type ConversationContent ¶
type ConversationContent struct {
Text string `json:"text,omitempty"`
Reasoning *ConversationReasoning `json:"reasoning,omitempty"`
ToolCall *ConversationTool `json:"tool_call,omitempty"`
ToolResult *ConversationResult `json:"tool_result,omitempty"`
}
type ConversationMessage ¶
type ConversationMessage struct {
Role string `json:"role"`
Content []ConversationContent `json:"content"`
}
ConversationMessage is a simplified message for the REST /api/messages endpoint and WebSocket messages payload.
type ConversationReasoning ¶
type ConversationResult ¶
type ConversationTool ¶
type DiagnosticsChangedEvent ¶
type DiagnosticsChangedEvent struct{}
type DiffEntry ¶
type DiffEntry struct {
Path string `json:"path"`
Status string `json:"status"` // "added", "modified", "deleted"
Patch string `json:"patch"`
Original string `json:"original,omitempty"`
Modified string `json:"modified,omitempty"`
Language string `json:"language,omitempty"`
}
DiffEntry represents a file diff from baseline.
type DiffsChangedEvent ¶
type DiffsChangedEvent struct{}
type ErrorEvent ¶
type ErrorEvent struct {
Message string `json:"message"`
}
type FileContent ¶
type FileContent struct {
Path string `json:"path"`
Content string `json:"content"`
Language string `json:"language"`
}
FileContent represents the content of a file.
type FileEntry ¶
type FileEntry struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"is_dir"`
Size int64 `json:"size"`
}
FileEntry represents a file or directory in the file browser.
type FilesChangedEvent ¶
type FilesChangedEvent struct{}
type MessagesEvent ¶
type MessagesEvent struct {
Messages []ConversationMessage `json:"messages"`
}
type PhaseEvent ¶
type PromptEvent ¶
type PromptEvent struct {
Question string `json:"question"`
}
type ReasoningDeltaEvent ¶
type ServerEvent ¶
type ServerEvent interface {
// contains filtered or unexported methods
}
ServerEvent is implemented by every outbound WebSocket event. sendMessage emits the wire payload as {"type": <serverEventType>, ...struct fields}.
type SessionEntry ¶
type SessionEntry struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
SessionEntry represents a saved chat session in the sidebar list.
type SessionEvent ¶
type SessionEvent struct {
ID string `json:"id"`
}
type SessionsChangedEvent ¶
type SessionsChangedEvent struct{}
type SkillEntry ¶
type SkillEntry struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
WhenToUse string `json:"when_to_use,omitempty"`
Arguments []string `json:"arguments,omitempty"`
}
SkillEntry is the wire shape for the slash-command picker.
type TextDeltaEvent ¶
type TextDeltaEvent struct {
Text string `json:"text"`
}