Documentation
¶
Index ¶
- Constants
- Variables
- type AgentEntry
- type CheckpointEntry
- type ClientMessage
- type ConversationContent
- type ConversationImage
- type ConversationMessage
- type ConversationReasoning
- type ConversationResult
- type ConversationTool
- type DiffEntry
- type FileContent
- type FileEntry
- type Frame
- type Server
- type ServerOptions
- type SessionEntry
- type SkillEntry
Constants ¶
View Source
const ( MsgSend = "send" MsgCancel = "cancel" MsgPromptResponse = "prompt_response" )
View Source
const ( EvtSessionState = "session_state" EvtTextDelta = "text_delta" EvtReasoningDelta = "reasoning_delta" EvtToolCall = "tool_call" EvtToolResult = "tool_result" EvtPhase = "phase" EvtUsage = "usage" EvtError = "error" EvtPrompt = "prompt" EvtPromptCancel = "prompt_cancel" EvtFilesChanged = "files_changed" EvtDiffsChanged = "diffs_changed" EvtCheckpointsChanged = "checkpoints_changed" EvtSessionsChanged = "sessions_changed" EvtDiagnosticsChanged = "diagnostics_changed" EvtCapabilitiesChanged = "capabilities_changed" EvtAgentChanged = "agent_changed" )
View Source
const ( PromptKindAsk = "ask" PromptKindConfirm = "confirm" )
Variables ¶
View Source
var StaticFS, _ = fs.Sub(staticFiles, "static")
Functions ¶
This section is empty.
Types ¶
type AgentEntry ¶ added in v0.7.0
AgentEntry is the JSON shape returned by /api/agents: one entry per selectable backend (built-in wingman first, then any code.AgentDef loaded from ~/.wingman/agents.json).
type CheckpointEntry ¶
type ClientMessage ¶
type ClientMessage struct {
Type string `json:"type"`
SessionID string `json:"session,omitempty"`
Text string `json:"text,omitempty"`
Files []string `json:"files,omitempty"`
Images []string `json:"images,omitempty"` // base64 data URLs, e.g. "data:image/png;base64,..."
// Prompt-response fields. PromptID identifies the prompt the user is
// answering; Approved is set for confirm prompts, Text reuses the
// field above for ask prompts.
PromptID string `json:"prompt_id,omitempty"`
Approved bool `json:"approved,omitempty"`
}
type ConversationContent ¶
type ConversationContent struct {
Text string `json:"text,omitempty"`
Image *ConversationImage `json:"image,omitempty"`
Reasoning *ConversationReasoning `json:"reasoning,omitempty"`
ToolCall *ConversationTool `json:"tool_call,omitempty"`
ToolResult *ConversationResult `json:"tool_result,omitempty"`
}
type ConversationImage ¶ added in v0.6.9
type ConversationMessage ¶
type ConversationMessage struct {
Role string `json:"role"`
Content []ConversationContent `json:"content"`
}
type ConversationReasoning ¶
type ConversationResult ¶
type ConversationTool ¶
type FileContent ¶
type Frame ¶ added in v0.6.9
type Frame struct {
Type string `json:"type"`
Session string `json:"session,omitempty"`
Text string `json:"text,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Args string `json:"args,omitempty"`
Hint string `json:"hint,omitempty"`
Content string `json:"content,omitempty"`
Phase string `json:"phase,omitempty"`
Message string `json:"message,omitempty"`
// Prompt fields (EvtPrompt / EvtPromptCancel).
PromptID string `json:"prompt_id,omitempty"`
PromptKind string `json:"prompt_kind,omitempty"` // "ask" | "confirm"
InputTokens int64 `json:"input_tokens,omitempty"`
CachedTokens int64 `json:"cached_tokens,omitempty"`
OutputTokens int64 `json:"output_tokens,omitempty"`
Messages []ConversationMessage `json:"messages,omitempty"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Ask ¶ added in v0.7.0
Ask implements code.UI: broadcast a prompt frame addressed to the triggering session and block until the WebUI replies (or the ctx cancels).
type ServerOptions ¶ added in v0.6.9
type SessionEntry ¶
Click to show internal directories.
Click to hide internal directories.