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
- func (s *Server) Close()
- func (s *Server) Confirm(ctx context.Context, message string) (bool, error)
- func (s *Server) Elicit(ctx context.Context, req tool.ElicitRequest) (tool.ElicitResult, error)
- func (s *Server) Run(ctx context.Context, port int) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type ServerOptions
- type SessionEntry
- type SkillEntry
- type TaskEntry
- type TurnQueueEntry
Constants ¶
View Source
const ( MsgSend = "send" MsgCancel = "cancel" MsgQueueRemove = "queue_remove" MsgQueueUpdate = "queue_update" MsgQueueResume = "queue_resume" MsgQueueClear = "queue_clear" MsgSync = "sync" MsgPromptResponse = "prompt_response" MsgFocus = "focus" )
View Source
const ( EvtSessionState = "session_state" EvtTextDelta = "text_delta" EvtReasoningDelta = "reasoning_delta" EvtToolCall = "tool_call" EvtToolResult = "tool_result" EvtToolProgress = "tool_progress" 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" EvtModelChanged = "model_changed" EvtTurnInput = "turn_input" EvtTurnQueue = "turn_queue" EvtTasksChanged = "tasks_changed" )
View Source
const ( PromptKindAsk = "ask" PromptKindConfirm = "confirm" )
View Source
const DefaultPort = 9000
DefaultPort is the preferred port used when no explicit port is requested.
Variables ¶
View Source
var StaticFS, _ = fs.Sub(staticFiles, "static")
Functions ¶
This section is empty.
Types ¶
type AgentEntry ¶ added in v0.7.0
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"`
ID string `json:"id,omitempty"`
Intent string `json:"intent,omitempty"`
ClearQueue bool `json:"clear_queue,omitempty"`
Sessions []string `json:"sessions,omitempty"`
PromptID string `json:"prompt_id,omitempty"`
Approved bool `json:"approved,omitempty"`
Always bool `json:"always,omitempty"`
Action string `json:"action,omitempty"`
Content map[string]any `json:"content,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"`
State string `json:"state,omitempty"`
Intent string `json:"intent,omitempty"`
Part int `json:"part,omitempty"`
Position int `json:"position,omitempty"`
Paused bool `json:"paused,omitempty"`
CanSteer bool `json:"can_steer,omitempty"`
Queue []TurnQueueEntry `json:"queue,omitempty"`
PromptID string `json:"prompt_id,omitempty"`
PromptKind string `json:"prompt_kind,omitempty"`
PromptFields []tool.ElicitField `json:"prompt_fields,omitempty"`
InputTokens int64 `json:"input_tokens,omitempty"`
CachedTokens int64 `json:"cached_tokens,omitempty"`
OutputTokens int64 `json:"output_tokens,omitempty"`
LastInputTokens int64 `json:"last_input_tokens,omitempty"`
ContextWindow int64 `json:"context_window,omitempty"`
Messages []ConversationMessage `json:"messages,omitempty"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Elicit ¶ added in v0.10.1
func (s *Server) Elicit(ctx context.Context, req tool.ElicitRequest) (tool.ElicitResult, error)
type ServerOptions ¶ added in v0.6.9
type ServerOptions struct {
NoBrowser bool
}
type SessionEntry ¶
type SkillEntry ¶
type TurnQueueEntry ¶ added in v0.10.9
type TurnQueueEntry struct {
ID string `json:"id"`
State string `json:"state"`
Intent string `json:"intent"`
Position int `json:"position,omitempty"`
Text string `json:"text,omitempty"`
Files []string `json:"files,omitempty"`
Images []string `json:"images,omitempty"`
ImageCount int `json:"image_count,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.