Documentation
¶
Index ¶
- Constants
- type AIExecToolParams
- type AIPlugin
- func (a *AIPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (a *AIPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
- func (a *AIPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (a *AIPlugin) End(ce *base.CommandExecution, shell *base.Shell) error
- func (a *AIPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
- func (a *AIPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
- func (a *AIPlugin) ID() string
- func (a *AIPlugin) Install(shell *base.Shell) error
- func (a *AIPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
- type AIUserToolParams
- type ExtensionCommandName
- type ExtensionPlugin
- func (p *ExtensionPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (p *ExtensionPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
- func (p *ExtensionPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (p *ExtensionPlugin) End(ce *base.CommandExecution, shell *base.Shell) error
- func (p *ExtensionPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
- func (p *ExtensionPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
- func (p *ExtensionPlugin) ID() string
- func (p *ExtensionPlugin) Install(shell *base.Shell) error
- func (p *ExtensionPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
- type PathAutocompletePlugin
- func (p *PathAutocompletePlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (p *PathAutocompletePlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
- func (p *PathAutocompletePlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (p *PathAutocompletePlugin) End(ce *base.CommandExecution, shell *base.Shell) error
- func (p *PathAutocompletePlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
- func (p *PathAutocompletePlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
- func (p *PathAutocompletePlugin) ID() string
- func (p *PathAutocompletePlugin) Install(shell *base.Shell) error
- func (p *PathAutocompletePlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
- type PromptPlugin
- func (p *PromptPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (a *PromptPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
- func (p *PromptPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
- func (p *PromptPlugin) End(ce *base.CommandExecution, shell *base.Shell) error
- func (p *PromptPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
- func (p *PromptPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
- func (p *PromptPlugin) ID() string
- func (p *PromptPlugin) Install(shell *base.Shell) error
- func (a *PromptPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
- type ToolName
Constants ¶
const ( IconUser = "🚀" IconAuto = "🪄" IconAI = "💬" IconArrow = "➜" )
Unicode Icons
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIExecToolParams ¶
type AIExecToolParams struct {
Code string `json:"code"`
}
type AIPlugin ¶
type AIPlugin struct {
// contains filtered or unexported fields
}
func NewAIPlugin ¶
func NewAIPlugin() *AIPlugin
func (*AIPlugin) AfterExecute ¶
func (a *AIPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
func (*AIPlugin) AutoComplete ¶
func (a *AIPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
AutoComplete implements base.ShellPlugin.
func (*AIPlugin) BeforeExecute ¶
func (a *AIPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
BeforeExecute implements base.ShellPlugin.
func (*AIPlugin) Execute ¶
func (a *AIPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
Execute implements base.ShellPlugin.
func (*AIPlugin) GeneratePrompt ¶
func (a *AIPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
GeneratePrompt implements base.ShellPlugin.
func (*AIPlugin) PrepareContext ¶
func (a *AIPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
PrepareContext implements base.ShellPlugin.
type AIUserToolParams ¶
type AIUserToolParams struct {
Args []string `json:"args"`
}
type ExtensionCommandName ¶
type ExtensionCommandName string
const ( ExtensionCommandAutoMode ExtensionCommandName = "auto:" ExtensionCommandAIMode ExtensionCommandName = "ai:" ExtensionCommandUserMode ExtensionCommandName = "user:" ExtensionCommandUserModeShort ExtensionCommandName = "::" ExtensionCommandAISet ExtensionCommandName = "aiset" ExtensionCommandAIGet ExtensionCommandName = "aiget" ExtensionCommandAIPrompt ExtensionCommandName = "aiprompt" ExtensionCommandAITool ExtensionCommandName = "aitool" ExtensionCommandHistory ExtensionCommandName = "history" )
type ExtensionPlugin ¶
type ExtensionPlugin struct {
// contains filtered or unexported fields
}
func NewExtensionPlugin ¶
func NewExtensionPlugin() *ExtensionPlugin
func (*ExtensionPlugin) AfterExecute ¶
func (p *ExtensionPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
AfterExecute implements base.ShellPlugin.
func (*ExtensionPlugin) AutoComplete ¶
func (p *ExtensionPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
AutoComplete implements base.ShellPlugin.
func (*ExtensionPlugin) BeforeExecute ¶
func (p *ExtensionPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
func (*ExtensionPlugin) End ¶
func (p *ExtensionPlugin) End(ce *base.CommandExecution, shell *base.Shell) error
func (*ExtensionPlugin) Execute ¶
func (p *ExtensionPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
Execute implements base.ShellPlugin.
func (*ExtensionPlugin) GeneratePrompt ¶
func (p *ExtensionPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
GeneratePrompt implements base.ShellPlugin.
func (*ExtensionPlugin) PrepareContext ¶
func (p *ExtensionPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
PrepareContext implements base.ShellPlugin.
type PathAutocompletePlugin ¶
type PathAutocompletePlugin struct {
// contains filtered or unexported fields
}
func NewPathAutocompletePlugin ¶
func NewPathAutocompletePlugin() *PathAutocompletePlugin
func (*PathAutocompletePlugin) AfterExecute ¶
func (p *PathAutocompletePlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
AfterExecute implements base.ShellPlugin.
func (*PathAutocompletePlugin) AutoComplete ¶
func (p *PathAutocompletePlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
AutoComplete implements base.ShellPlugin.
func (*PathAutocompletePlugin) BeforeExecute ¶
func (p *PathAutocompletePlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
func (*PathAutocompletePlugin) End ¶
func (p *PathAutocompletePlugin) End(ce *base.CommandExecution, shell *base.Shell) error
func (*PathAutocompletePlugin) Execute ¶
func (p *PathAutocompletePlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
Execute implements base.ShellPlugin.
func (*PathAutocompletePlugin) GeneratePrompt ¶
func (p *PathAutocompletePlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
GeneratePrompt implements base.ShellPlugin.
func (*PathAutocompletePlugin) ID ¶
func (p *PathAutocompletePlugin) ID() string
ID implements base.ShellPlugin.
func (*PathAutocompletePlugin) Install ¶
func (p *PathAutocompletePlugin) Install(shell *base.Shell) error
Install implements base.ShellPlugin.
func (*PathAutocompletePlugin) PrepareContext ¶
func (p *PathAutocompletePlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)
PrepareContext implements base.ShellPlugin.
type PromptPlugin ¶
type PromptPlugin struct {
}
func NewPromptPlugin ¶
func NewPromptPlugin() *PromptPlugin
func (*PromptPlugin) AfterExecute ¶
func (p *PromptPlugin) AfterExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
func (*PromptPlugin) AutoComplete ¶
func (a *PromptPlugin) AutoComplete(line []rune, pos int, shell *base.Shell) (newLine [][]rune, length int)
AutoComplete implements base.ShellPlugin.
func (*PromptPlugin) BeforeExecute ¶
func (p *PromptPlugin) BeforeExecute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) error
func (*PromptPlugin) End ¶
func (p *PromptPlugin) End(ce *base.CommandExecution, shell *base.Shell) error
func (*PromptPlugin) Execute ¶
func (p *PromptPlugin) Execute(ce *base.CommandExecution, sce *base.SubCommandExecution, shell *base.Shell) (ok bool, err error)
func (*PromptPlugin) GeneratePrompt ¶
func (p *PromptPlugin) GeneratePrompt(ce *base.CommandExecution, shell *base.Shell) (ok bool, prompt string, err error)
GeneratePrompt implements base.ShellPlugin.
func (*PromptPlugin) ID ¶
func (p *PromptPlugin) ID() string
func (*PromptPlugin) PrepareContext ¶
func (a *PromptPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)