Documentation
¶
Index ¶
- Constants
- func CommandName(command string) string
- func ConfirmPresentationText(confirm ConfirmData) string
- func FormPresentationText(form FormData) string
- func FormatServerStatus(status core.ServerStatus) string
- func HelpText() string
- func InfoPresentationText(info InfoData) string
- func PickerCloseCommand(picker PickerData) string
- func PickerCommandFor(kind PickerKind, contextID string, itemID string) string
- func PickerCommandLabel(picker PickerData) string
- func PickerItemCommand(picker PickerData, item PickerItem) string
- func PickerItemDisplayInfo(kind PickerKind, item PickerItem) string
- func PickerItemDisplayTitle(item PickerItem) string
- func PickerLegend(picker PickerData) string
- func PickerPresentationText(picker PickerData) string
- func PickerPresentationTitle(picker PickerData) string
- func PickerSelectedPage(items []PickerItem, pageSize int) int
- type AutomationRuntime
- type ClientRuntime
- type CommandID
- type CommandSpec
- type CommandView
- type ConfirmData
- type ContextRuntime
- type Dispatcher
- type ExternalAgentRuntime
- type FormData
- type FormField
- type InfoData
- type InfoRow
- type MenuItemGroup
- type MenuState
- type PermissionRuntime
- type PickerBuilder
- func (b *PickerBuilder) Action(id string, title string, info string, command ...string) *PickerBuilder
- func (b *PickerBuilder) Back(command string) *PickerBuilder
- func (b *PickerBuilder) Build() PickerData
- func (b *PickerBuilder) Close(command string) *PickerBuilder
- func (b *PickerBuilder) CloseItem(label ...string) *PickerBuilder
- func (b *PickerBuilder) Context(id string) *PickerBuilder
- func (b *PickerBuilder) Danger(id string, title string, info string, command ...string) *PickerBuilder
- func (b *PickerBuilder) HideBack(hide bool) *PickerBuilder
- func (b *PickerBuilder) Item(item PickerItem) *PickerBuilder
- func (b *PickerBuilder) Items(items ...PickerItem) *PickerBuilder
- func (b *PickerBuilder) Ptr() *PickerData
- func (b *PickerBuilder) Row(id string, title string, info string, command ...string) *PickerBuilder
- type PickerData
- type PickerItem
- type PickerItemRole
- type PickerKind
- type PickerPage
- type PickerPresentationItem
- type PickerViewItem
- type PlanRuntime
- type PromptData
- type ProviderRuntime
- type Result
- type SearchRuntime
- type ServerRuntime
- type SessionMessageRuntime
- type SessionRuntime
- type SessionRuntimeOptions
- type StorageRuntime
- type UsageRuntime
Constants ¶
View Source
const ( CommandNewSession = commandcatalog.CommandNewSession CommandSessions = commandcatalog.CommandSessions CommandSession = commandcatalog.CommandSession CommandProvider = commandcatalog.CommandProvider CommandPermissions = commandcatalog.CommandPermissions CommandContext = commandcatalog.CommandContext CommandUsage = commandcatalog.CommandUsage CommandPlan = commandcatalog.CommandPlan CommandSearch = commandcatalog.CommandSearch CommandModules = commandcatalog.CommandModules CommandRemind = commandcatalog.CommandRemind CommandTasks = commandcatalog.CommandTasks CommandServer = commandcatalog.CommandServer CommandStatus = commandcatalog.CommandStatus CommandRestart = commandcatalog.CommandRestart CommandHelp = commandcatalog.CommandHelp )
Variables ¶
This section is empty.
Functions ¶
func CommandName ¶
func ConfirmPresentationText ¶
func ConfirmPresentationText(confirm ConfirmData) string
func FormPresentationText ¶
func FormatServerStatus ¶
func FormatServerStatus(status core.ServerStatus) string
func InfoPresentationText ¶
func PickerCloseCommand ¶
func PickerCloseCommand(picker PickerData) string
func PickerCommandFor ¶
func PickerCommandFor(kind PickerKind, contextID string, itemID string) string
func PickerCommandLabel ¶
func PickerCommandLabel(picker PickerData) string
func PickerItemCommand ¶
func PickerItemCommand(picker PickerData, item PickerItem) string
func PickerItemDisplayInfo ¶
func PickerItemDisplayInfo(kind PickerKind, item PickerItem) string
func PickerItemDisplayTitle ¶
func PickerItemDisplayTitle(item PickerItem) string
func PickerLegend ¶
func PickerLegend(picker PickerData) string
func PickerPresentationText ¶
func PickerPresentationText(picker PickerData) string
func PickerPresentationTitle ¶
func PickerPresentationTitle(picker PickerData) string
func PickerSelectedPage ¶
func PickerSelectedPage(items []PickerItem, pageSize int) int
Types ¶
type AutomationRuntime ¶
type AutomationRuntime interface {
ClientRuntime
CreateAutomationJob(ctx context.Context, input automation.CreateJobInput) (automation.Job, error)
ListAutomationJobs(ctx context.Context) ([]automation.Job, error)
PauseAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
ResumeAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
CompleteAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
DeleteAutomationJob(ctx context.Context, jobID string) (automation.Job, error)
RunAutomationJobNow(ctx context.Context, jobID string) (automation.Fire, error)
}
type ClientRuntime ¶
type ClientRuntime interface {
ClientName() string
}
type CommandID ¶
type CommandID = commandcatalog.CommandID
type CommandSpec ¶
type CommandSpec = commandcatalog.CommandSpec
func Catalog ¶
func Catalog() []CommandSpec
type CommandView ¶
type CommandView struct {
ID string
Command string
Title string
Status string
Group MenuItemGroup
Public bool
Menu bool
}
func BuildCommandView ¶
func BuildCommandView(state MenuState) []CommandView
func PublicCommandView ¶
func PublicCommandView() []CommandView
type ConfirmData ¶
type ContextRuntime ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func New ¶
func New(runtime any, workingDir string) *Dispatcher
type ExternalAgentRuntime ¶ added in v0.1.6
type InfoRow ¶
func FormatServerStatusRows ¶
func FormatServerStatusRows(status core.ServerStatus) []InfoRow
type MenuItemGroup ¶
type MenuItemGroup string
const ( MenuItemGroupPrimary MenuItemGroup = "" MenuItemGroupSecondary MenuItemGroup = "secondary" )
type MenuState ¶
type MenuState struct {
SessionTitle string
ProviderID string
ModelID string
PermissionMode core.PermissionMode
}
type PermissionRuntime ¶
type PickerBuilder ¶
type PickerBuilder struct {
// contains filtered or unexported fields
}
func NewPickerData ¶
func NewPickerData(kind PickerKind, title string) *PickerBuilder
func (*PickerBuilder) Action ¶
func (b *PickerBuilder) Action(id string, title string, info string, command ...string) *PickerBuilder
func (*PickerBuilder) Back ¶
func (b *PickerBuilder) Back(command string) *PickerBuilder
func (*PickerBuilder) Build ¶
func (b *PickerBuilder) Build() PickerData
func (*PickerBuilder) Close ¶
func (b *PickerBuilder) Close(command string) *PickerBuilder
func (*PickerBuilder) CloseItem ¶
func (b *PickerBuilder) CloseItem(label ...string) *PickerBuilder
func (*PickerBuilder) Context ¶
func (b *PickerBuilder) Context(id string) *PickerBuilder
func (*PickerBuilder) Danger ¶
func (b *PickerBuilder) Danger(id string, title string, info string, command ...string) *PickerBuilder
func (*PickerBuilder) HideBack ¶
func (b *PickerBuilder) HideBack(hide bool) *PickerBuilder
func (*PickerBuilder) Item ¶
func (b *PickerBuilder) Item(item PickerItem) *PickerBuilder
func (*PickerBuilder) Items ¶
func (b *PickerBuilder) Items(items ...PickerItem) *PickerBuilder
func (*PickerBuilder) Ptr ¶
func (b *PickerBuilder) Ptr() *PickerData
func (*PickerBuilder) Row ¶
func (b *PickerBuilder) Row(id string, title string, info string, command ...string) *PickerBuilder
type PickerData ¶
type PickerData struct {
Kind PickerKind
ContextID string
Title string
BackCommand string
CloseCommand string
HideBackItem bool
Items []PickerItem
}
type PickerItem ¶
type PickerItem struct {
ID string
Title string
Info string
Command string
Selected bool
Focused bool
Role PickerItemRole
}
func BackItem ¶
func BackItem(label ...string) PickerItem
func CloseItem ¶
func CloseItem(label ...string) PickerItem
func ProviderPickerItems ¶
func ProviderPickerItems(items []setup.ProviderSetupItem, session *core.Session) []PickerItem
func (PickerItem) IsAction ¶
func (item PickerItem) IsAction() bool
func (PickerItem) IsBack ¶
func (item PickerItem) IsBack() bool
func (PickerItem) IsCancel ¶
func (item PickerItem) IsCancel() bool
func (PickerItem) IsDanger ¶
func (item PickerItem) IsDanger() bool
func (PickerItem) IsNavigation ¶
func (item PickerItem) IsNavigation() bool
func (PickerItem) NeedsSeparator ¶
func (item PickerItem) NeedsSeparator() bool
type PickerItemRole ¶
type PickerItemRole string
const ( PickerItemRoleNormal PickerItemRole = "" PickerItemRoleDanger PickerItemRole = "danger" PickerItemRoleBack PickerItemRole = "back" PickerItemRoleCancel PickerItemRole = "cancel" PickerItemRoleAction PickerItemRole = "action" )
type PickerKind ¶
type PickerKind string
const ( PickerSessions PickerKind = "sessions" PickerSessionRuntime PickerKind = "session_runtime" PickerSessionActions PickerKind = "session_actions" PickerProvider PickerKind = "provider" PickerProviderCustom PickerKind = "provider_custom" PickerProviderActions PickerKind = "provider_actions" PickerPermissions PickerKind = "permissions" PickerContext PickerKind = "context" PickerPlan PickerKind = "plan" PickerModules PickerKind = "modules" PickerExternalAgents PickerKind = "external_agents" PickerExternalAgent PickerKind = "external_agent" PickerStorage PickerKind = "storage" PickerStorageFiles PickerKind = "storage_files" PickerStorageFile PickerKind = "storage_file" PickerStorageTemp PickerKind = "storage_temp" PickerStorageCleanup PickerKind = "storage_cleanup" PickerStorageTempFile PickerKind = "storage_temp_file" PickerTasks PickerKind = "tasks" PickerTaskActions PickerKind = "task_actions" PickerTaskArchive PickerKind = "task_archive" PickerServer PickerKind = "server" )
type PickerPage ¶
type PickerPage struct {
Items []PickerItem
Trailing []PickerItem
Page int
Pages int
}
func PaginatePicker ¶
func PaginatePicker(picker PickerData, page int, pageSize int) PickerPage
type PickerPresentationItem ¶
type PickerPresentationItem struct {
Item PickerItem
Command string
Title string
Info string
Status string
CompactLabel string
Selected bool
SeparatorBefore bool
}
func PresentPickerItem ¶
func PresentPickerItem(picker PickerData, item PickerItem) PickerPresentationItem
func PresentPickerItems ¶
func PresentPickerItems(picker PickerData) []PickerPresentationItem
type PickerViewItem ¶
type PickerViewItem struct {
Item PickerItem
Command string
SeparatorBefore bool
}
func PickerViewItems ¶
func PickerViewItems(picker PickerData) []PickerViewItem
type PlanRuntime ¶ added in v0.1.7
type PlanRuntime interface {
SessionPlan(ctx context.Context, sessionID string) (core.SessionPlan, error)
SetSessionGoal(ctx context.Context, sessionID string, goal string) (core.SessionPlan, error)
ClearSessionPlan(ctx context.Context, sessionID string) (core.SessionPlan, error)
AddPlanItem(ctx context.Context, sessionID string, text string, parentID string) (core.SessionPlan, error)
UpdatePlanItem(ctx context.Context, sessionID string, itemID string, status core.PlanItemStatus, text string) (core.SessionPlan, error)
}
type PromptData ¶
type ProviderRuntime ¶
type ProviderRuntime interface {
ListSetupProviders(ctx context.Context) ([]setup.ProviderSetupItem, error)
ConfigureSetupProvider(ctx context.Context, providerID string, update setup.ProviderSetupUpdate) (setup.ProviderSetupItem, error)
ProviderModels(ctx context.Context, providerID string, update setup.ProviderSetupUpdate) ([]string, error)
DeleteSetupProvider(ctx context.Context, providerID string) error
UpdateSessionProvider(ctx context.Context, sessionID string, providerID string) (core.Session, error)
}
type Result ¶
type Result struct {
Handled bool
Text string
ReloadSnapshot bool
Picker *PickerData
Form *FormData
Prompt *PromptData
Confirm *ConfirmData
Info *InfoData
}
type SearchRuntime ¶ added in v0.1.7
type SearchRuntime interface {
Search(ctx context.Context, filter core.SearchFilter) (core.SearchReport, error)
}
type ServerRuntime ¶
type SessionMessageRuntime ¶
type SessionRuntime ¶
type SessionRuntime interface {
CurrentBinding(ctx context.Context, externalKey string) (core.ClientBinding, error)
ListSessions(ctx context.Context) ([]core.Session, error)
CreateSession(ctx context.Context, externalKey string, title string, workingDir string) (core.Session, error)
UseSession(ctx context.Context, externalKey string, sessionID string) (core.ClientBinding, error)
RenameSession(ctx context.Context, sessionID string, title string) (core.Session, error)
DeleteSession(ctx context.Context, sessionID string) error
}
type SessionRuntimeOptions ¶ added in v0.1.4
type StorageRuntime ¶
type StorageRuntime interface {
SaveStorageFile(ctx context.Context, storagePath string, content []byte, title string, tags []string, mimeType string) (localstorage.Entry, error)
ListTemporaryStorageFiles(ctx context.Context, limit int) (localstorage.TempListResult, error)
PromoteTemporaryStorageFile(ctx context.Context, tempPath string, destPath string) (localstorage.Entry, error)
DeleteTemporaryStorageFile(ctx context.Context, tempPath string) (localstorage.TempEntry, error)
CleanupTemporaryStorageFiles(ctx context.Context) (localstorage.CleanupResult, error)
UpdateTemporaryStorageSettings(ctx context.Context, autoCleanup *bool, ttlDays int64, maxGB float64) (localstorage.TempSettings, error)
ListStorageFiles(ctx context.Context, filter localstorage.ListFilter) (localstorage.ListResult, error)
ReadStorageFile(ctx context.Context, storagePath string) (localstorage.ReadResult, error)
DeleteStorageFile(ctx context.Context, storagePath string) (localstorage.Entry, error)
}
type UsageRuntime ¶ added in v0.1.7
Source Files
¶
- automation_commands.go
- automation_format.go
- automation_time.go
- catalog.go
- context.go
- dispatcher.go
- menu_view.go
- modules.go
- parse.go
- permissions.go
- picker_builder.go
- picker_commands.go
- picker_presentation.go
- picker_view.go
- plan.go
- presentation_text.go
- provider_custom.go
- provider_custom_create.go
- provider_custom_delete.go
- provider_custom_edit.go
- provider_custom_fields.go
- provider_custom_lookup.go
- provider_format.go
- provider_view.go
- providers.go
- reminders.go
- result_types.go
- search.go
- server.go
- sessions.go
- storage_files.go
- storage_format.go
- storage_picker.go
- storage_temp.go
- tasks_add.go
- tasks_picker.go
- usage.go
Click to show internal directories.
Click to hide internal directories.