plugins

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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) End

func (a *AIPlugin) End(ce *base.CommandExecution, shell *base.Shell) error

End 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) ID

func (a *AIPlugin) ID() string

ID implements base.ShellPlugin.

func (*AIPlugin) Install

func (a *AIPlugin) Install(shell *base.Shell) error

Install 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) ID

func (p *ExtensionPlugin) ID() string

ID implements base.ShellPlugin.

func (*ExtensionPlugin) Install

func (p *ExtensionPlugin) Install(shell *base.Shell) error

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

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 (*PathAutocompletePlugin) End

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

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) Install

func (p *PromptPlugin) Install(shell *base.Shell) error

func (*PromptPlugin) PrepareContext

func (a *PromptPlugin) PrepareContext(ce *base.CommandExecution, shell *base.Shell) (context.Context, error)

type ToolName

type ToolName string
const (
	ToolNameExecute           ToolName = "EXECUTE"
	ToolNameUserDefinedPrefix ToolName = "TOOL_"
)

Jump to

Keyboard shortcuts

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