shortcuts

package
v0.133.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A2AAgentsShortcut added in v0.128.0

type A2AAgentsShortcut struct{}

A2AAgentsShortcut shows the registered A2A agents and their readiness

func NewA2AAgentsShortcut added in v0.128.0

func NewA2AAgentsShortcut() *A2AAgentsShortcut

func (*A2AAgentsShortcut) CanExecute added in v0.128.0

func (c *A2AAgentsShortcut) CanExecute(args []string) bool

func (*A2AAgentsShortcut) Execute added in v0.128.0

func (c *A2AAgentsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*A2AAgentsShortcut) GetDescription added in v0.128.0

func (c *A2AAgentsShortcut) GetDescription() string

func (*A2AAgentsShortcut) GetName added in v0.128.0

func (c *A2AAgentsShortcut) GetName() string

func (*A2AAgentsShortcut) GetUsage added in v0.128.0

func (c *A2AAgentsShortcut) GetUsage() string

type A2ATaskManagementShortcut added in v0.53.3

type A2ATaskManagementShortcut struct {
	// contains filtered or unexported fields
}

A2ATaskManagementShortcut shows the A2A task management dropdown

func NewA2ATaskManagementShortcut added in v0.53.3

func NewA2ATaskManagementShortcut(cfg *config.Config) *A2ATaskManagementShortcut

NewA2ATaskManagementShortcut creates a new A2A task management shortcut

func (*A2ATaskManagementShortcut) CanExecute added in v0.53.3

func (t *A2ATaskManagementShortcut) CanExecute(args []string) bool

func (*A2ATaskManagementShortcut) Execute added in v0.53.3

func (*A2ATaskManagementShortcut) GetDescription added in v0.53.3

func (t *A2ATaskManagementShortcut) GetDescription() string

func (*A2ATaskManagementShortcut) GetName added in v0.53.3

func (t *A2ATaskManagementShortcut) GetName() string

func (*A2ATaskManagementShortcut) GetUsage added in v0.53.3

func (t *A2ATaskManagementShortcut) GetUsage() string

type AudioRecorder added in v0.116.0

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 domain.ConversationRepository, taskTracker domain.A2ATaskTracker) *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 added in v0.116.0

type ClipboardWriter interface {
	Copy(ctx context.Context, text string) error
}

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 added in v0.63.0

type CompactShortcut struct {
	// contains filtered or unexported fields
}

CompactShortcut runs conversation optimization to reduce token usage

func NewCompactShortcut added in v0.63.0

func NewCompactShortcut(repo domain.ConversationRepository) *CompactShortcut

func (*CompactShortcut) CanExecute added in v0.63.0

func (c *CompactShortcut) CanExecute(args []string) bool

func (*CompactShortcut) Execute added in v0.63.0

func (c *CompactShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*CompactShortcut) GetDescription added in v0.63.0

func (c *CompactShortcut) GetDescription() string

func (*CompactShortcut) GetName added in v0.63.0

func (c *CompactShortcut) GetName() string

func (*CompactShortcut) GetUsage added in v0.63.0

func (c *CompactShortcut) GetUsage() string

type ContextShortcut added in v0.63.0

type ContextShortcut struct {
	// contains filtered or unexported fields
}

ContextShortcut shows context window usage information

func NewContextShortcut added in v0.63.0

func NewContextShortcut(repo domain.ConversationRepository, modelService domain.ModelService, tokenizer domain.TokenEstimator) *ContextShortcut

func (*ContextShortcut) CanExecute added in v0.63.0

func (c *ContextShortcut) CanExecute(args []string) bool

func (*ContextShortcut) Execute added in v0.63.0

func (c *ContextShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*ContextShortcut) GetDescription added in v0.63.0

func (c *ContextShortcut) GetDescription() string

func (*ContextShortcut) GetName added in v0.63.0

func (c *ContextShortcut) GetName() string

func (*ContextShortcut) GetUsage added in v0.63.0

func (c *ContextShortcut) GetUsage() string

type ConversationMetadata added in v0.45.0

type ConversationMetadata struct {
	ID           string
	Title        string
	CreatedAt    string
	UpdatedAt    string
	MessageCount int
	TokenStats   TokenStats
	CostStats    domain.SessionCostStats
	Model        string
	Tags         []string
	Summary      string
}

ConversationMetadata represents conversation metadata

type ConversationSelectShortcut added in v0.45.0

type ConversationSelectShortcut struct {
	// contains filtered or unexported fields
}

ConversationSelectShortcut shows the conversation selection dropdown

func NewConversationSelectShortcut added in v0.45.0

func NewConversationSelectShortcut(repo PersistentConversationRepository) *ConversationSelectShortcut

NewConversationSelectShortcut creates a new conversation select shortcut

func (*ConversationSelectShortcut) CanExecute added in v0.45.0

func (c *ConversationSelectShortcut) CanExecute(args []string) bool

func (*ConversationSelectShortcut) Execute added in v0.45.0

func (*ConversationSelectShortcut) GetDescription added in v0.45.0

func (c *ConversationSelectShortcut) GetDescription() string

func (*ConversationSelectShortcut) GetName added in v0.45.0

func (c *ConversationSelectShortcut) GetName() string

func (*ConversationSelectShortcut) GetUsage added in v0.45.0

func (c *ConversationSelectShortcut) GetUsage() string

type ConversationSummary added in v0.45.0

type ConversationSummary struct {
	ID           string
	Title        string
	CreatedAt    string
	UpdatedAt    string
	MessageCount int
	TokenStats   TokenStats
	CostStats    domain.SessionCostStats
	Model        string
	Tags         []string
	Summary      string
}

ConversationSummary represents a saved conversation summary

type CopyShortcut added in v0.116.0

type CopyShortcut struct {
	// contains filtered or unexported fields
}

CopyShortcut copies the current conversation to the system clipboard.

func NewCopyShortcut added in v0.116.0

func NewCopyShortcut(repo domain.ConversationRepository, clipboard ClipboardWriter) *CopyShortcut

NewCopyShortcut creates a new CopyShortcut.

func (*CopyShortcut) CanExecute added in v0.116.0

func (c *CopyShortcut) CanExecute(args []string) bool

func (*CopyShortcut) Execute added in v0.116.0

func (c *CopyShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*CopyShortcut) GetDescription added in v0.116.0

func (c *CopyShortcut) GetDescription() string

func (*CopyShortcut) GetName added in v0.116.0

func (c *CopyShortcut) GetName() string

func (*CopyShortcut) GetUsage added in v0.116.0

func (c *CopyShortcut) GetUsage() string

type CostShortcut added in v0.86.0

type CostShortcut struct {
	// contains filtered or unexported fields
}

CostShortcut displays cost information for the current session

func NewCostShortcut added in v0.86.0

func NewCostShortcut(repo domain.ConversationRepository) *CostShortcut

func (*CostShortcut) CanExecute added in v0.86.0

func (c *CostShortcut) CanExecute(args []string) bool

func (*CostShortcut) Execute added in v0.86.0

func (c *CostShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*CostShortcut) GetDescription added in v0.86.0

func (c *CostShortcut) GetDescription() string

func (*CostShortcut) GetName added in v0.86.0

func (c *CostShortcut) GetName() string

func (*CostShortcut) GetUsage added in v0.86.0

func (c *CostShortcut) GetUsage() string

type CustomShortcut added in v0.44.0

type CustomShortcut struct {
	// contains filtered or unexported fields
}

CustomShortcut implements the Shortcut interface for user-defined shortcuts

func NewCustomShortcut added in v0.44.0

func NewCustomShortcut(config CustomShortcutConfig, client sdk.Client, modelService domain.ModelService, imageService domain.ImageService, toolService domain.ToolService) *CustomShortcut

NewCustomShortcut creates a new custom shortcut from configuration

func (*CustomShortcut) CanExecute added in v0.44.0

func (c *CustomShortcut) CanExecute(args []string) bool

func (*CustomShortcut) Execute added in v0.44.0

func (c *CustomShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*CustomShortcut) GenerateSnippet added in v0.70.0

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 added in v0.44.0

func (c *CustomShortcut) GetDescription() string

func (*CustomShortcut) GetName added in v0.44.0

func (c *CustomShortcut) GetName() string

func (*CustomShortcut) GetSubcommands added in v0.90.0

func (c *CustomShortcut) GetSubcommands() []Subcommand

GetSubcommands returns the list of subcommands for this shortcut

func (*CustomShortcut) GetUsage added in v0.44.0

func (c *CustomShortcut) GetUsage() string

type CustomShortcutConfig added in v0.44.0

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 added in v0.44.0

type CustomShortcutsConfig struct {
	Shortcuts []CustomShortcutConfig `yaml:"shortcuts"`
}

CustomShortcutsConfig represents the structure of a custom shortcuts YAML file

type DiffShortcut added in v0.118.0

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.

func NewDiffShortcut added in v0.118.0

func NewDiffShortcut() *DiffShortcut

NewDiffShortcut creates a new diff shortcut.

func (*DiffShortcut) CanExecute added in v0.118.0

func (d *DiffShortcut) CanExecute(args []string) bool

func (*DiffShortcut) Execute added in v0.118.0

func (d *DiffShortcut) Execute(_ context.Context, _ []string) (ShortcutResult, error)

func (*DiffShortcut) GetDescription added in v0.118.0

func (d *DiffShortcut) GetDescription() string

func (*DiffShortcut) GetName added in v0.118.0

func (d *DiffShortcut) GetName() string

func (*DiffShortcut) GetUsage added in v0.118.0

func (d *DiffShortcut) 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 added in v0.118.0

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 added in v0.118.0

func NewExplorerShortcut() *ExplorerShortcut

NewExplorerShortcut creates a new explorer shortcut.

func (*ExplorerShortcut) CanExecute added in v0.118.0

func (e *ExplorerShortcut) CanExecute(args []string) bool

func (*ExplorerShortcut) Execute added in v0.118.0

func (*ExplorerShortcut) GetDescription added in v0.118.0

func (e *ExplorerShortcut) GetDescription() string

func (*ExplorerShortcut) GetName added in v0.118.0

func (e *ExplorerShortcut) GetName() string

func (*ExplorerShortcut) GetUsage added in v0.118.0

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 InitGithubActionShortcut added in v0.69.19

type InitGithubActionShortcut struct{}

InitGithubActionShortcut helps setup Init GitHub Action for infer-action

func NewInitGithubActionShortcut added in v0.69.19

func NewInitGithubActionShortcut() *InitGithubActionShortcut

NewInitGithubActionShortcut creates a new Init GitHub Action setup shortcut

func (*InitGithubActionShortcut) CanExecute added in v0.69.19

func (g *InitGithubActionShortcut) CanExecute(args []string) bool

func (*InitGithubActionShortcut) Execute added in v0.69.19

func (*InitGithubActionShortcut) GetDescription added in v0.69.19

func (g *InitGithubActionShortcut) GetDescription() string

func (*InitGithubActionShortcut) GetName added in v0.69.19

func (g *InitGithubActionShortcut) GetName() string

func (*InitGithubActionShortcut) GetUsage added in v0.69.19

func (g *InitGithubActionShortcut) GetUsage() string

type InitShortcut added in v0.59.0

type InitShortcut struct {
	// contains filtered or unexported fields
}

InitShortcut sets the input field with a configurable prompt for project initialization

func NewInitShortcut added in v0.59.0

func NewInitShortcut(cfg *config.Config) *InitShortcut

NewInitShortcut creates a new init shortcut

func (*InitShortcut) CanExecute added in v0.59.0

func (c *InitShortcut) CanExecute(args []string) bool

func (*InitShortcut) Execute added in v0.59.0

func (c *InitShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*InitShortcut) GetDescription added in v0.59.0

func (c *InitShortcut) GetDescription() string

func (*InitShortcut) GetName added in v0.59.0

func (c *InitShortcut) GetName() string

func (*InitShortcut) GetUsage added in v0.59.0

func (c *InitShortcut) GetUsage() string

type ModelSwitchData added in v0.89.0

type ModelSwitchData struct {
	TargetModel   string
	OriginalModel string
	Prompt        string
}

ModelSwitchData contains data for temporary model switching

type NewShortcut added in v0.46.0

type NewShortcut struct {
	// contains filtered or unexported fields
}

NewShortcut starts a new conversation

func NewNewShortcut added in v0.46.0

func NewNewShortcut(repo PersistentConversationRepository, taskTracker domain.A2ATaskTracker) *NewShortcut

func (*NewShortcut) CanExecute added in v0.46.0

func (c *NewShortcut) CanExecute(args []string) bool

func (*NewShortcut) Execute added in v0.46.0

func (c *NewShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*NewShortcut) GetDescription added in v0.46.0

func (c *NewShortcut) GetDescription() string

func (*NewShortcut) GetName added in v0.46.0

func (c *NewShortcut) GetName() string

func (*NewShortcut) GetUsage added in v0.46.0

func (c *NewShortcut) GetUsage() string

type PersistentConversationRepository added in v0.45.0

type PersistentConversationRepository interface {
	ListSavedConversations(ctx context.Context, limit, offset int) ([]ConversationSummary, error)
	LoadConversation(ctx context.Context, conversationID string) error
	GetCurrentConversationMetadata() 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 NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new shortcut registry

func (*Registry) Execute

func (r *Registry) Execute(ctx context.Context, name string, args []string) (ShortcutResult, error)

Execute executes a shortcut by name with arguments

func (*Registry) Get

func (r *Registry) Get(name string) (Shortcut, bool)

Get retrieves a shortcut by name

func (*Registry) GetAll

func (r *Registry) GetAll() []Shortcut

GetAll returns all registered shortcuts

func (*Registry) GetShortcuts

func (r *Registry) GetShortcuts() map[string]string

GetShortcuts returns a map of shortcut names to descriptions

func (*Registry) GetShortcutsStartingWith

func (r *Registry) GetShortcutsStartingWith(prefix string) []string

GetShortcutsStartingWith returns shortcuts that start with the given prefix

func (*Registry) List

func (r *Registry) List() []string

List returns all registered shortcut names

func (*Registry) LoadCustomShortcuts added in v0.44.0

func (r *Registry) LoadCustomShortcuts(baseDir string, client sdk.Client, modelService domain.ModelService, imageService domain.ImageService, toolService domain.ToolService) error

LoadCustomShortcuts loads user-defined shortcuts from the specified base directory

func (*Registry) ParseShortcut

func (r *Registry) ParseShortcut(input string) (string, []string, error)

ParseShortcut parses a shortcut line input into shortcut name and arguments Handles quoted strings properly

func (*Registry) Register

func (r *Registry) Register(shortcut Shortcut)

Register adds a shortcut to the registry

func (*Registry) Unregister

func (r *Registry) Unregister(name string)

Unregister removes a shortcut from the registry

type ReleaseNotesShortcut added in v0.122.0

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 added in v0.122.0

func NewReleaseNotesShortcut() *ReleaseNotesShortcut

NewReleaseNotesShortcut creates a new release-notes shortcut that fetches release notes from GitHub Releases using the gh CLI.

func (*ReleaseNotesShortcut) CanExecute added in v0.122.0

func (r *ReleaseNotesShortcut) CanExecute(args []string) bool

func (*ReleaseNotesShortcut) Execute added in v0.122.0

func (r *ReleaseNotesShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*ReleaseNotesShortcut) GetDescription added in v0.122.0

func (r *ReleaseNotesShortcut) GetDescription() string

func (*ReleaseNotesShortcut) GetName added in v0.122.0

func (r *ReleaseNotesShortcut) GetName() string

func (*ReleaseNotesShortcut) GetUsage added in v0.122.0

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 added in v0.44.0

func LoadCustomShortcuts(baseDir string, client sdk.Client, modelService domain.ModelService, imageService domain.ImageService, toolService domain.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
	SideEffectShowInitGithubActionSetup
	SideEffectEmbedImages
	SideEffectSendMessageWithModel
	SideEffectShowDiffViewer
	SideEffectShowExplorer
	SideEffectShowToolsList
	SideEffectShowA2AAgents
)

type SnippetConfig added in v0.70.0

type SnippetConfig struct {
	Prompt   string `yaml:"prompt"`
	Template string `yaml:"template"`
}

SnippetConfig represents the snippet generation configuration

type Subcommand added in v0.90.0

type Subcommand struct {
	Name        string
	Description string
}

Subcommand represents a subcommand for autocomplete

type SubcommandConfig added in v0.90.0

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 domain.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 added in v0.47.0

type ThemeShortcut struct {
	// contains filtered or unexported fields
}

ThemeShortcut switches the active theme

func NewThemeShortcut added in v0.47.0

func NewThemeShortcut(themeService domain.ThemeService) *ThemeShortcut

func (*ThemeShortcut) CanExecute added in v0.47.0

func (c *ThemeShortcut) CanExecute(args []string) bool

func (*ThemeShortcut) Execute added in v0.47.0

func (c *ThemeShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*ThemeShortcut) GetDescription added in v0.47.0

func (c *ThemeShortcut) GetDescription() string

func (*ThemeShortcut) GetName added in v0.47.0

func (c *ThemeShortcut) GetName() string

func (*ThemeShortcut) GetUsage added in v0.47.0

func (c *ThemeShortcut) GetUsage() string

type TokenStats added in v0.45.0

type TokenStats struct {
	TotalInputTokens  int
	TotalOutputTokens int
	TotalTokens       int
	RequestCount      int
}

TokenStats represents token usage statistics

type ToolsShortcut added in v0.128.0

type ToolsShortcut struct{}

ToolsShortcut shows the tools currently available to the agent

func NewToolsShortcut added in v0.128.0

func NewToolsShortcut() *ToolsShortcut

func (*ToolsShortcut) CanExecute added in v0.128.0

func (c *ToolsShortcut) CanExecute(args []string) bool

func (*ToolsShortcut) Execute added in v0.128.0

func (c *ToolsShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*ToolsShortcut) GetDescription added in v0.128.0

func (c *ToolsShortcut) GetDescription() string

func (*ToolsShortcut) GetName added in v0.128.0

func (c *ToolsShortcut) GetName() string

func (*ToolsShortcut) GetUsage added in v0.128.0

func (c *ToolsShortcut) GetUsage() string

type Transcriber added in v0.116.0

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 added in v0.116.0

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 added in v0.116.0

func NewVoiceShortcut(cfg config.SpeechToTextConfig, recorder AudioRecorder, transcriber Transcriber) *VoiceShortcut

NewVoiceShortcut creates a new VoiceShortcut.

func (*VoiceShortcut) CanExecute added in v0.116.0

func (v *VoiceShortcut) CanExecute(args []string) bool

func (*VoiceShortcut) Execute added in v0.116.0

func (v *VoiceShortcut) Execute(ctx context.Context, args []string) (ShortcutResult, error)

func (*VoiceShortcut) GetDescription added in v0.116.0

func (v *VoiceShortcut) GetDescription() string

func (*VoiceShortcut) GetName added in v0.116.0

func (v *VoiceShortcut) GetName() string

func (*VoiceShortcut) GetUsage added in v0.116.0

func (v *VoiceShortcut) GetUsage() string

Jump to

Keyboard shortcuts

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