Documentation
¶
Index ¶
- func ParseStatsArgs(args []string, defaultVertical bool) (since string, vertical bool)
- type A2AAgentsShortcut
- type A2ATaskManagementShortcut
- func (t *A2ATaskManagementShortcut) CanExecute(args []string) bool
- func (t *A2ATaskManagementShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (t *A2ATaskManagementShortcut) GetDescription() string
- func (t *A2ATaskManagementShortcut) GetName() string
- func (t *A2ATaskManagementShortcut) GetUsage() string
- type AudioRecorder
- type ClearShortcut
- type ClipboardWriter
- type CompactShortcut
- type ContextShortcut
- type ConversationSelectShortcut
- func (c *ConversationSelectShortcut) CanExecute(args []string) bool
- func (c *ConversationSelectShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (c *ConversationSelectShortcut) GetDescription() string
- func (c *ConversationSelectShortcut) GetName() string
- func (c *ConversationSelectShortcut) GetUsage() string
- type CopyShortcut
- type CostShortcut
- type CustomShortcut
- func (c *CustomShortcut) CanExecute(args []string) bool
- func (c *CustomShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (c *CustomShortcut) GenerateSnippet(ctx context.Context, dataMap map[string]string, snippet *SnippetConfig) (string, error)
- func (c *CustomShortcut) GetDescription() string
- func (c *CustomShortcut) GetName() string
- func (c *CustomShortcut) GetSubcommands() []Subcommand
- func (c *CustomShortcut) GetUsage() string
- type CustomShortcutConfig
- type CustomShortcutsConfig
- type DiffShortcut
- type EffortShortcut
- func (c *EffortShortcut) CanExecute(args []string) bool
- func (c *EffortShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (c *EffortShortcut) GetDescription() string
- func (c *EffortShortcut) GetName() string
- func (c *EffortShortcut) GetSubcommands() []Subcommand
- func (c *EffortShortcut) GetUsage() string
- type ExitShortcut
- type ExplorerShortcut
- type HelpShortcut
- type InitShortcut
- type InstallOpentaskShortcut
- func (g *InstallOpentaskShortcut) CanExecute(args []string) bool
- func (g *InstallOpentaskShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (g *InstallOpentaskShortcut) GetDescription() string
- func (g *InstallOpentaskShortcut) GetName() string
- func (g *InstallOpentaskShortcut) GetUsage() string
- type ModelSwitchData
- type NewShortcut
- type PersistentConversationRepository
- type Registry
- func (r *Registry) Execute(ctx context.Context, name string, args []string) (ShortcutResult, error)
- func (r *Registry) Get(name string) (Shortcut, bool)
- func (r *Registry) GetAll() []Shortcut
- func (r *Registry) GetShortcuts() map[string]string
- func (r *Registry) GetShortcutsStartingWith(prefix string) []string
- func (r *Registry) List() []string
- func (r *Registry) LoadCustomShortcuts(baseDir string, client sdk.Client, modelService convdomain.ModelService, ...) error
- func (r *Registry) ParseShortcut(input string) (string, []string, error)
- func (r *Registry) Register(shortcut Shortcut)
- func (r *Registry) Unregister(name string)
- type ReleaseNotesShortcut
- func (r *ReleaseNotesShortcut) CanExecute(args []string) bool
- func (r *ReleaseNotesShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (r *ReleaseNotesShortcut) GetDescription() string
- func (r *ReleaseNotesShortcut) GetName() string
- func (r *ReleaseNotesShortcut) GetUsage() string
- type Shortcut
- type ShortcutResult
- type SideEffectType
- type SnippetConfig
- type StatsShortcut
- func (s *StatsShortcut) CanExecute(args []string) bool
- func (s *StatsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
- func (s *StatsShortcut) GetDescription() string
- func (s *StatsShortcut) GetName() string
- func (s *StatsShortcut) GetUsage() string
- func (s *StatsShortcut) WithConversation(id string) *StatsShortcut
- type Subcommand
- type SubcommandConfig
- type SwitchShortcut
- type ThemeShortcut
- type ToolsShortcut
- type TracesShortcut
- type Transcriber
- type VoiceShortcut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseStatsArgs ¶
ParseStatsArgs splits /stats arguments into the raw since-window token and which view was requested, order-independent and case-insensitive. A "vertical" token forces the list view, "table"/"tables" forces tables, and when neither is present vertical falls back to defaultVertical (tables in the TUI, the phone-friendly list on channels).
Types ¶
type A2AAgentsShortcut ¶
type A2AAgentsShortcut struct{}
A2AAgentsShortcut shows the registered A2A agents and their readiness
func NewA2AAgentsShortcut ¶
func NewA2AAgentsShortcut() *A2AAgentsShortcut
func (*A2AAgentsShortcut) CanExecute ¶
func (c *A2AAgentsShortcut) CanExecute(args []string) bool
func (*A2AAgentsShortcut) Execute ¶
func (c *A2AAgentsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*A2AAgentsShortcut) GetDescription ¶
func (c *A2AAgentsShortcut) GetDescription() string
func (*A2AAgentsShortcut) GetName ¶
func (c *A2AAgentsShortcut) GetName() string
func (*A2AAgentsShortcut) GetUsage ¶
func (c *A2AAgentsShortcut) GetUsage() string
type A2ATaskManagementShortcut ¶
type A2ATaskManagementShortcut struct {
// contains filtered or unexported fields
}
A2ATaskManagementShortcut shows the A2A task management dropdown
func NewA2ATaskManagementShortcut ¶
func NewA2ATaskManagementShortcut(cfg *config.Config) *A2ATaskManagementShortcut
NewA2ATaskManagementShortcut creates a new A2A task management shortcut
func (*A2ATaskManagementShortcut) CanExecute ¶
func (t *A2ATaskManagementShortcut) CanExecute(args []string) bool
func (*A2ATaskManagementShortcut) Execute ¶
func (t *A2ATaskManagementShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*A2ATaskManagementShortcut) GetDescription ¶
func (t *A2ATaskManagementShortcut) GetDescription() string
func (*A2ATaskManagementShortcut) GetName ¶
func (t *A2ATaskManagementShortcut) GetName() string
func (*A2ATaskManagementShortcut) GetUsage ¶
func (t *A2ATaskManagementShortcut) GetUsage() string
type AudioRecorder ¶
type AudioRecorder interface {
// EnsureAvailable returns an actionable error if no capture tool is installed.
EnsureAvailable() error
Record(ctx context.Context, maxSeconds int) (wavPath string, err error)
}
AudioRecorder records microphone audio to a WAV file. It is defined here (not in internal/domain) so the VoiceShortcut can be unit-tested with a hand-written fake, mirroring ClipboardWriter in copy.go.
type ClearShortcut ¶
type ClearShortcut struct {
// contains filtered or unexported fields
}
ClearShortcut clears the conversation history
func NewClearShortcut ¶
func NewClearShortcut(repo convdomain.ConversationRepository, taskTracker scheddomain.A2AClearer) *ClearShortcut
func (*ClearShortcut) CanExecute ¶
func (c *ClearShortcut) CanExecute(args []string) bool
func (*ClearShortcut) Execute ¶
func (c *ClearShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ClearShortcut) GetDescription ¶
func (c *ClearShortcut) GetDescription() string
func (*ClearShortcut) GetName ¶
func (c *ClearShortcut) GetName() string
func (*ClearShortcut) GetUsage ¶
func (c *ClearShortcut) GetUsage() string
type ClipboardWriter ¶
ClipboardWriter copies UTF-8 text to the system clipboard. It is defined here (rather than in internal/domain) so the CopyShortcut can be unit-tested with a hand-written fake without touching the real clipboard or shelling out.
type CompactShortcut ¶
type CompactShortcut struct {
// contains filtered or unexported fields
}
CompactShortcut runs conversation optimization to reduce token usage
func NewCompactShortcut ¶
func NewCompactShortcut(repo convdomain.ConversationRepository) *CompactShortcut
func (*CompactShortcut) CanExecute ¶
func (c *CompactShortcut) CanExecute(args []string) bool
func (*CompactShortcut) Execute ¶
func (c *CompactShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*CompactShortcut) GetDescription ¶
func (c *CompactShortcut) GetDescription() string
func (*CompactShortcut) GetName ¶
func (c *CompactShortcut) GetName() string
func (*CompactShortcut) GetUsage ¶
func (c *CompactShortcut) GetUsage() string
type ContextShortcut ¶
type ContextShortcut struct {
// contains filtered or unexported fields
}
ContextShortcut shows context window usage information
func NewContextShortcut ¶
func NewContextShortcut(repo convdomain.ConversationRepository, modelService convdomain.ModelService, tokenizer convdomain.TokenEstimator) *ContextShortcut
func (*ContextShortcut) CanExecute ¶
func (c *ContextShortcut) CanExecute(args []string) bool
func (*ContextShortcut) Execute ¶
func (c *ContextShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ContextShortcut) GetDescription ¶
func (c *ContextShortcut) GetDescription() string
func (*ContextShortcut) GetName ¶
func (c *ContextShortcut) GetName() string
func (*ContextShortcut) GetUsage ¶
func (c *ContextShortcut) GetUsage() string
type ConversationSelectShortcut ¶
type ConversationSelectShortcut struct {
// contains filtered or unexported fields
}
ConversationSelectShortcut shows the conversation selection dropdown
func NewConversationSelectShortcut ¶
func NewConversationSelectShortcut(repo PersistentConversationRepository) *ConversationSelectShortcut
NewConversationSelectShortcut creates a new conversation select shortcut
func (*ConversationSelectShortcut) CanExecute ¶
func (c *ConversationSelectShortcut) CanExecute(args []string) bool
func (*ConversationSelectShortcut) Execute ¶
func (c *ConversationSelectShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ConversationSelectShortcut) GetDescription ¶
func (c *ConversationSelectShortcut) GetDescription() string
func (*ConversationSelectShortcut) GetName ¶
func (c *ConversationSelectShortcut) GetName() string
func (*ConversationSelectShortcut) GetUsage ¶
func (c *ConversationSelectShortcut) GetUsage() string
type CopyShortcut ¶
type CopyShortcut struct {
// contains filtered or unexported fields
}
CopyShortcut copies the current conversation to the system clipboard.
func NewCopyShortcut ¶
func NewCopyShortcut(repo convdomain.ConversationRepository, clipboard ClipboardWriter) *CopyShortcut
NewCopyShortcut creates a new CopyShortcut.
func (*CopyShortcut) CanExecute ¶
func (c *CopyShortcut) CanExecute(args []string) bool
func (*CopyShortcut) Execute ¶
func (c *CopyShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*CopyShortcut) GetDescription ¶
func (c *CopyShortcut) GetDescription() string
func (*CopyShortcut) GetName ¶
func (c *CopyShortcut) GetName() string
func (*CopyShortcut) GetUsage ¶
func (c *CopyShortcut) GetUsage() string
type CostShortcut ¶
type CostShortcut struct {
// contains filtered or unexported fields
}
CostShortcut displays cost information for the current session
func NewCostShortcut ¶
func NewCostShortcut(repo convdomain.ConversationRepository) *CostShortcut
func (*CostShortcut) CanExecute ¶
func (c *CostShortcut) CanExecute(args []string) bool
func (*CostShortcut) Execute ¶
func (c *CostShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*CostShortcut) GetDescription ¶
func (c *CostShortcut) GetDescription() string
func (*CostShortcut) GetName ¶
func (c *CostShortcut) GetName() string
func (*CostShortcut) GetUsage ¶
func (c *CostShortcut) GetUsage() string
type CustomShortcut ¶
type CustomShortcut struct {
// contains filtered or unexported fields
}
CustomShortcut implements the Shortcut interface for user-defined shortcuts
func NewCustomShortcut ¶
func NewCustomShortcut(config CustomShortcutConfig, client sdk.Client, modelService convdomain.ModelService, imageService agentdomain.ImageService, toolService agentdomain.ToolService) *CustomShortcut
NewCustomShortcut creates a new custom shortcut from configuration
func (*CustomShortcut) CanExecute ¶
func (c *CustomShortcut) CanExecute(args []string) bool
func (*CustomShortcut) Execute ¶
func (c *CustomShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*CustomShortcut) GenerateSnippet ¶
func (c *CustomShortcut) GenerateSnippet(ctx context.Context, dataMap map[string]string, snippet *SnippetConfig) (string, error)
GenerateSnippet generates the final snippet by calling LLM (called async from handler)
func (*CustomShortcut) GetDescription ¶
func (c *CustomShortcut) GetDescription() string
func (*CustomShortcut) GetName ¶
func (c *CustomShortcut) GetName() string
func (*CustomShortcut) GetSubcommands ¶
func (c *CustomShortcut) GetSubcommands() []Subcommand
GetSubcommands returns the list of subcommands for this shortcut
func (*CustomShortcut) GetUsage ¶
func (c *CustomShortcut) GetUsage() string
type CustomShortcutConfig ¶
type CustomShortcutConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Command string `yaml:"command,omitempty"`
Args []string `yaml:"args,omitempty"`
WorkingDir string `yaml:"working_dir,omitempty"`
Tool string `yaml:"tool,omitempty"`
ToolArgs map[string]any `yaml:"tool_args,omitempty"`
Snippet *SnippetConfig `yaml:"snippet,omitempty"`
PassSessionID bool `yaml:"pass_session_id,omitempty"`
Subcommands []SubcommandConfig `yaml:"subcommands,omitempty"`
}
CustomShortcutConfig represents a user-defined shortcut configuration
type CustomShortcutsConfig ¶
type CustomShortcutsConfig struct {
Shortcuts []CustomShortcutConfig `yaml:"shortcuts"`
}
CustomShortcutsConfig represents the structure of a custom shortcuts YAML file
type DiffShortcut ¶
type DiffShortcut struct{}
DiffShortcut opens the changes panel (interactive diff viewer). It is a pure view trigger with no dependencies - the side effect transitions the UI to the diff viewer, which loads working-tree changes itself. The viewer has two tabs (Local working-tree changes and the current branch's PR diff), switched with Tab; the PR tab is read-only.
func NewDiffShortcut ¶
func NewDiffShortcut() *DiffShortcut
NewDiffShortcut creates a new diff shortcut.
func (*DiffShortcut) CanExecute ¶
func (d *DiffShortcut) CanExecute(args []string) bool
func (*DiffShortcut) Execute ¶
func (d *DiffShortcut) Execute(_ context.Context, _ []string) (ShortcutResult, error)
func (*DiffShortcut) GetDescription ¶
func (d *DiffShortcut) GetDescription() string
func (*DiffShortcut) GetName ¶
func (d *DiffShortcut) GetName() string
func (*DiffShortcut) GetUsage ¶
func (d *DiffShortcut) GetUsage() string
type EffortShortcut ¶
type EffortShortcut struct {
// contains filtered or unexported fields
}
EffortShortcut shows or sets the reasoning effort level applied to subsequent requests. Anthropic models only - other providers reject the switch. Runtime-only, like /model - agent.reasoning_effort in config remains the startup seed.
func NewEffortShortcut ¶
func NewEffortShortcut(agent agentdomain.AgentService, models convdomain.ModelService) *EffortShortcut
func (*EffortShortcut) CanExecute ¶
func (c *EffortShortcut) CanExecute(args []string) bool
func (*EffortShortcut) Execute ¶
func (c *EffortShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*EffortShortcut) GetDescription ¶
func (c *EffortShortcut) GetDescription() string
func (*EffortShortcut) GetName ¶
func (c *EffortShortcut) GetName() string
func (*EffortShortcut) GetSubcommands ¶
func (c *EffortShortcut) GetSubcommands() []Subcommand
GetSubcommands feeds the Anthropic effort levels into shortcut autocomplete.
func (*EffortShortcut) GetUsage ¶
func (c *EffortShortcut) GetUsage() string
type ExitShortcut ¶
type ExitShortcut struct{}
ExitShortcut exits the application
func NewExitShortcut ¶
func NewExitShortcut() *ExitShortcut
func (*ExitShortcut) CanExecute ¶
func (c *ExitShortcut) CanExecute(args []string) bool
func (*ExitShortcut) Execute ¶
func (c *ExitShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ExitShortcut) GetDescription ¶
func (c *ExitShortcut) GetDescription() string
func (*ExitShortcut) GetName ¶
func (c *ExitShortcut) GetName() string
func (*ExitShortcut) GetUsage ¶
func (c *ExitShortcut) GetUsage() string
type ExplorerShortcut ¶
type ExplorerShortcut struct{}
ExplorerShortcut opens the file explorer panel (VS Code-style tree + fuzzy finder). It is a pure view trigger with no dependencies - the side effect transitions the UI to the explorer, which walks the working directory itself.
func NewExplorerShortcut ¶
func NewExplorerShortcut() *ExplorerShortcut
NewExplorerShortcut creates a new explorer shortcut.
func (*ExplorerShortcut) CanExecute ¶
func (e *ExplorerShortcut) CanExecute(args []string) bool
func (*ExplorerShortcut) Execute ¶
func (e *ExplorerShortcut) Execute(_ context.Context, _ []string) (ShortcutResult, error)
func (*ExplorerShortcut) GetDescription ¶
func (e *ExplorerShortcut) GetDescription() string
func (*ExplorerShortcut) GetName ¶
func (e *ExplorerShortcut) GetName() string
func (*ExplorerShortcut) GetUsage ¶
func (e *ExplorerShortcut) GetUsage() string
type HelpShortcut ¶
type HelpShortcut struct {
// contains filtered or unexported fields
}
HelpShortcut shows available shortcuts
func NewHelpShortcut ¶
func NewHelpShortcut(registry *Registry) *HelpShortcut
func (*HelpShortcut) CanExecute ¶
func (c *HelpShortcut) CanExecute(args []string) bool
func (*HelpShortcut) Execute ¶
func (c *HelpShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*HelpShortcut) GetDescription ¶
func (c *HelpShortcut) GetDescription() string
func (*HelpShortcut) GetName ¶
func (c *HelpShortcut) GetName() string
func (*HelpShortcut) GetUsage ¶
func (c *HelpShortcut) GetUsage() string
type InitShortcut ¶
type InitShortcut struct {
// contains filtered or unexported fields
}
InitShortcut sets the input field with a configurable prompt for project initialization
func NewInitShortcut ¶
func NewInitShortcut(cfg *config.Config) *InitShortcut
NewInitShortcut creates a new init shortcut
func (*InitShortcut) CanExecute ¶
func (c *InitShortcut) CanExecute(args []string) bool
func (*InitShortcut) Execute ¶
func (c *InitShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*InitShortcut) GetDescription ¶
func (c *InitShortcut) GetDescription() string
func (*InitShortcut) GetName ¶
func (c *InitShortcut) GetName() string
func (*InitShortcut) GetUsage ¶
func (c *InitShortcut) GetUsage() string
type InstallOpentaskShortcut ¶ added in v0.182.0
type InstallOpentaskShortcut struct{}
InstallOpentaskShortcut submits the canonical OpenTask workflow-install task as a regular chat message, so the run streams in the conversation like any other turn. The browser extension's Install tab sends this same shortcut, making the CLI the single source of truth for the install prompt.
func NewInstallOpentaskShortcut ¶ added in v0.182.0
func NewInstallOpentaskShortcut() *InstallOpentaskShortcut
NewInstallOpentaskShortcut creates the /install-opentask shortcut.
func (*InstallOpentaskShortcut) CanExecute ¶ added in v0.182.0
func (g *InstallOpentaskShortcut) CanExecute(args []string) bool
func (*InstallOpentaskShortcut) Execute ¶ added in v0.182.0
func (g *InstallOpentaskShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*InstallOpentaskShortcut) GetDescription ¶ added in v0.182.0
func (g *InstallOpentaskShortcut) GetDescription() string
func (*InstallOpentaskShortcut) GetName ¶ added in v0.182.0
func (g *InstallOpentaskShortcut) GetName() string
func (*InstallOpentaskShortcut) GetUsage ¶ added in v0.182.0
func (g *InstallOpentaskShortcut) GetUsage() string
type ModelSwitchData ¶
ModelSwitchData contains data for temporary model switching
type NewShortcut ¶
type NewShortcut struct {
// contains filtered or unexported fields
}
NewShortcut starts a new conversation
func NewNewShortcut ¶
func NewNewShortcut(repo PersistentConversationRepository, taskTracker scheddomain.A2AClearer) *NewShortcut
func (*NewShortcut) CanExecute ¶
func (c *NewShortcut) CanExecute(args []string) bool
func (*NewShortcut) Execute ¶
func (c *NewShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*NewShortcut) GetDescription ¶
func (c *NewShortcut) GetDescription() string
func (*NewShortcut) GetName ¶
func (c *NewShortcut) GetName() string
func (*NewShortcut) GetUsage ¶
func (c *NewShortcut) GetUsage() string
type PersistentConversationRepository ¶
type PersistentConversationRepository interface {
ListSavedConversations(ctx context.Context, limit, offset int) ([]convdomain.ConversationSummary, error)
LoadConversation(ctx context.Context, conversationID string) error
GetCurrentConversationMetadata() convdomain.ConversationMetadata
SaveConversation(ctx context.Context) error
StartNewConversation(title string) error
GetCurrentConversationID() string
SetConversationTitle(title string)
DeleteSavedConversation(ctx context.Context, conversationID string) error
}
PersistentConversationRepository interface for conversation persistence
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages all available shortcuts
func (*Registry) GetShortcuts ¶
GetShortcuts returns a map of shortcut names to descriptions
func (*Registry) GetShortcutsStartingWith ¶
GetShortcutsStartingWith returns shortcuts that start with the given prefix
func (*Registry) LoadCustomShortcuts ¶
func (r *Registry) LoadCustomShortcuts(baseDir string, client sdk.Client, modelService convdomain.ModelService, imageService agentdomain.ImageService, toolService agentdomain.ToolService) error
LoadCustomShortcuts loads user-defined shortcuts from the specified base directory
func (*Registry) ParseShortcut ¶
ParseShortcut parses a shortcut line input into shortcut name and arguments Handles quoted strings properly
func (*Registry) Unregister ¶
Unregister removes a shortcut from the registry
type ReleaseNotesShortcut ¶
type ReleaseNotesShortcut struct {
// contains filtered or unexported fields
}
ReleaseNotesShortcut displays release notes from GitHub Releases. It accepts an optional version argument to show notes for a specific release. When no version is given, it shows the latest release notes.
func NewReleaseNotesShortcut ¶
func NewReleaseNotesShortcut() *ReleaseNotesShortcut
NewReleaseNotesShortcut creates a new release-notes shortcut that fetches release notes from GitHub Releases using the gh CLI.
func (*ReleaseNotesShortcut) CanExecute ¶
func (r *ReleaseNotesShortcut) CanExecute(args []string) bool
func (*ReleaseNotesShortcut) Execute ¶
func (r *ReleaseNotesShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ReleaseNotesShortcut) GetDescription ¶
func (r *ReleaseNotesShortcut) GetDescription() string
func (*ReleaseNotesShortcut) GetName ¶
func (r *ReleaseNotesShortcut) GetName() string
func (*ReleaseNotesShortcut) GetUsage ¶
func (r *ReleaseNotesShortcut) GetUsage() string
type Shortcut ¶
type Shortcut interface {
GetName() string
GetDescription() string
GetUsage() string
Execute(ctx context.Context, args []string) (ShortcutResult, error)
CanExecute(args []string) bool
}
Shortcut interface represents a chat shortcut that can be executed
func LoadCustomShortcuts ¶
func LoadCustomShortcuts(baseDir string, client sdk.Client, modelService convdomain.ModelService, imageService agentdomain.ImageService, toolService agentdomain.ToolService) ([]Shortcut, error)
LoadCustomShortcuts loads user-defined shortcuts from shortcuts/ directory within the specified base directory
type ShortcutResult ¶
type ShortcutResult struct {
Output string
Success bool
SideEffect SideEffectType
Data any
}
ShortcutResult represents the result of a shortcut execution
type SideEffectType ¶
type SideEffectType int
SideEffectType defines the types of side effects a shortcut can have
const ( SideEffectNone SideEffectType = iota SideEffectClearConversation SideEffectExit SideEffectSwitchModel SideEffectSwitchTheme SideEffectShowHelp SideEffectReloadConfig SideEffectSaveConversation SideEffectShowConversationSelection SideEffectStartNewConversation SideEffectShowA2ATaskManagement SideEffectSetInput SideEffectGenerateSnippet SideEffectCompactConversation SideEffectShowInstallOpentaskSetup SideEffectEmbedImages SideEffectSendMessageWithModel // SideEffectSendMessage submits Data (a string) as a regular chat message. SideEffectSendMessage SideEffectShowDiffViewer SideEffectShowExplorer SideEffectShowToolsList SideEffectShowA2AAgents )
type SnippetConfig ¶
SnippetConfig represents the snippet generation configuration
type StatsShortcut ¶
type StatsShortcut struct {
// contains filtered or unexported fields
}
StatsShortcut renders the telemetry aggregate (tool, token, and session tables) from the local telemetry store, matching the `infer stats` output. When conversationID is set the aggregate is scoped to that conversation.
func NewStatsShortcut ¶
func NewStatsShortcut() *StatsShortcut
NewStatsShortcut creates a new StatsShortcut aggregating all telemetry.
func (*StatsShortcut) CanExecute ¶
func (s *StatsShortcut) CanExecute(args []string) bool
func (*StatsShortcut) Execute ¶
func (s *StatsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*StatsShortcut) GetDescription ¶
func (s *StatsShortcut) GetDescription() string
func (*StatsShortcut) GetName ¶
func (s *StatsShortcut) GetName() string
func (*StatsShortcut) GetUsage ¶
func (s *StatsShortcut) GetUsage() string
func (*StatsShortcut) WithConversation ¶
func (s *StatsShortcut) WithConversation(id string) *StatsShortcut
WithConversation scopes the aggregate to a single conversation id (used by channel /stats). An empty id leaves it daemon-global.
type Subcommand ¶
Subcommand represents a subcommand for autocomplete
type SubcommandConfig ¶
type SubcommandConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Command string `yaml:"command,omitempty"`
Args []string `yaml:"args,omitempty"`
WorkingDir string `yaml:"working_dir,omitempty"`
Snippet *SnippetConfig `yaml:"snippet,omitempty"`
}
SubcommandConfig represents a subcommand for shortcuts with autocomplete
type SwitchShortcut ¶
type SwitchShortcut struct {
// contains filtered or unexported fields
}
SwitchShortcut switches the active model
func NewSwitchShortcut ¶
func NewSwitchShortcut(modelService convdomain.ModelService) *SwitchShortcut
func (*SwitchShortcut) CanExecute ¶
func (c *SwitchShortcut) CanExecute(args []string) bool
func (*SwitchShortcut) Execute ¶
func (c *SwitchShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*SwitchShortcut) GetDescription ¶
func (c *SwitchShortcut) GetDescription() string
func (*SwitchShortcut) GetName ¶
func (c *SwitchShortcut) GetName() string
func (*SwitchShortcut) GetUsage ¶
func (c *SwitchShortcut) GetUsage() string
type ThemeShortcut ¶
type ThemeShortcut struct {
// contains filtered or unexported fields
}
ThemeShortcut switches the active theme
func NewThemeShortcut ¶
func NewThemeShortcut(themeService tui.ThemeService) *ThemeShortcut
func (*ThemeShortcut) CanExecute ¶
func (c *ThemeShortcut) CanExecute(args []string) bool
func (*ThemeShortcut) Execute ¶
func (c *ThemeShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ThemeShortcut) GetDescription ¶
func (c *ThemeShortcut) GetDescription() string
func (*ThemeShortcut) GetName ¶
func (c *ThemeShortcut) GetName() string
func (*ThemeShortcut) GetUsage ¶
func (c *ThemeShortcut) GetUsage() string
type ToolsShortcut ¶
type ToolsShortcut struct{}
ToolsShortcut shows the tools currently available to the agent
func NewToolsShortcut ¶
func NewToolsShortcut() *ToolsShortcut
func (*ToolsShortcut) CanExecute ¶
func (c *ToolsShortcut) CanExecute(args []string) bool
func (*ToolsShortcut) Execute ¶
func (c *ToolsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*ToolsShortcut) GetDescription ¶
func (c *ToolsShortcut) GetDescription() string
func (*ToolsShortcut) GetName ¶
func (c *ToolsShortcut) GetName() string
func (*ToolsShortcut) GetUsage ¶
func (c *ToolsShortcut) GetUsage() string
type TracesShortcut ¶
type TracesShortcut struct{}
TracesShortcut renders a session's span tree from the local per-session trace file, matching the `infer traces` output.
func NewTracesShortcut ¶
func NewTracesShortcut() *TracesShortcut
NewTracesShortcut creates a new TracesShortcut.
func (*TracesShortcut) CanExecute ¶
func (s *TracesShortcut) CanExecute(args []string) bool
func (*TracesShortcut) Execute ¶
func (s *TracesShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*TracesShortcut) GetDescription ¶
func (s *TracesShortcut) GetDescription() string
func (*TracesShortcut) GetName ¶
func (s *TracesShortcut) GetName() string
func (*TracesShortcut) GetUsage ¶
func (s *TracesShortcut) GetUsage() string
type Transcriber ¶
type Transcriber interface {
// EnsureAvailable returns an actionable error if the whisper binary is missing.
EnsureAvailable() error
Transcribe(ctx context.Context, wavPath string) (string, error)
}
Transcriber transcribes a WAV file into text.
type VoiceShortcut ¶
type VoiceShortcut struct {
// contains filtered or unexported fields
}
VoiceShortcut records the microphone, transcribes it with Whisper, and places the resulting text into the chat input field.
func NewVoiceShortcut ¶
func NewVoiceShortcut(cfg config.SpeechToTextConfig, recorder AudioRecorder, transcriber Transcriber) *VoiceShortcut
NewVoiceShortcut creates a new VoiceShortcut.
func (*VoiceShortcut) CanExecute ¶
func (v *VoiceShortcut) CanExecute(args []string) bool
func (*VoiceShortcut) Execute ¶
func (v *VoiceShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)
func (*VoiceShortcut) GetDescription ¶
func (v *VoiceShortcut) GetDescription() string
func (*VoiceShortcut) GetName ¶
func (v *VoiceShortcut) GetName() string
func (*VoiceShortcut) GetUsage ¶
func (v *VoiceShortcut) GetUsage() string