Documentation
¶
Index ¶
- Constants
- func ClaudeExchangeCodeCmd(session *auth.ClaudeLoginSession, code, redirectURI string) tea.Cmd
- func ClaudeLoginCmd() tea.Cmd
- func ClaudeLogoutCmd() tea.Cmd
- func ClaudeWaitAutoCodeCmd(session *auth.ClaudeLoginSession) tea.Cmd
- func GetClaudeAuthStatusCmd() tea.Cmd
- func GetSelectedModel(cfg *config.Config) models.Model
- func IsHidden(file string) (bool, error)
- func LoadClaudeStatsCmd() tea.Cmd
- type AttachmentAddedMsg
- type ClaudeAuthStatusMsg
- type ClaudeLoginCodeSubmitMsg
- type ClaudeLoginDialogCancelMsg
- type ClaudeLoginDialogCmp
- func (m ClaudeLoginDialogCmp) Bindings() []key.Binding
- func (m ClaudeLoginDialogCmp) Init() tea.Cmd
- func (m ClaudeLoginDialogCmp) Session() *auth.ClaudeLoginSession
- func (m *ClaudeLoginDialogCmp) SetSize(width, height int)
- func (m ClaudeLoginDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m ClaudeLoginDialogCmp) View() string
- type ClaudeLoginDoneMsg
- type ClaudeLoginStartMsg
- type ClaudeLogoutDoneMsg
- type ClaudeStatsMsg
- type CloseCommandDialogMsg
- type CloseCronJobsDialogMsg
- type CloseInfoDialogMsg
- type CloseInitDialogMsg
- type CloseModelDialogMsg
- type CloseMultiArgumentsDialogMsg
- type ClosePersonaDialogMsg
- type CloseProjectsDialogMsg
- type CloseQuitMsg
- type CloseSessionDialogMsg
- type CloseSkillsCatalogMsg
- type CloseThemeDialogMsg
- type Command
- type CommandCategory
- type CommandDialog
- type CommandRunCustomMsg
- type CommandSelectedMsg
- type CompletionDialog
- type CompletionDialogCloseMsg
- type CompletionDialogCompleteItemMsg
- type CompletionItem
- type CompletionItemI
- type CompletionProvider
- type CompletionSelectedMsg
- type ConfigGeneratedMsg
- type CronJobRunNowMsg
- type CronJobViewTasksMsg
- type CronJobsDialog
- type DirNode
- type FilePrickerKeyMap
- type FilepickerCmp
- type HelpCmp
- type HelpSection
- type InfoDialogCmp
- type InitDialogCmp
- type InstallSkillMsg
- type ModelDialog
- type ModelSelectedMsg
- type MultiArgumentsDialogCmp
- type OpenCronJobsDialogMsg
- type OpenFilepickerMsg
- type OpenModelDialogMsg
- type OpenPersonaDialogMsg
- type OpenProjectsDialogMsg
- type OpenSessionDialogMsg
- type OpenSkillsCatalogMsg
- type OpenThemeDialogMsg
- type PermissionAction
- type PermissionDialogCmp
- type PermissionResponseMsg
- type PersonaClearedMsg
- type PersonaDialog
- type PersonaSelectedMsg
- type ProjectActivatedMsg
- type ProjectAddConfirmMsg
- type ProjectInitConfirmDialog
- type ProjectInitConfirmMsg
- type ProjectInitNoMsg
- type ProjectInitYesMsg
- type ProjectRemoveMsg
- type ProjectsDialog
- type QuitDialog
- type SessionDialog
- type SessionSelectedMsg
- type ShowInfoDialogMsg
- type ShowInitDialogMsg
- type ShowMultiArgumentsDialogMsg
- type SkillInstalledMsg
- type SkillsCatalogDialog
- type ThemeChangedMsg
- type ThemeDialog
Constants ¶
const ( UserCommandPrefix = "user:" ProjectCommandPrefix = "project:" )
Command prefix constants
const ( DialogDialogWidth = 52 DialogDialogHeight = 18 )
Variables ¶
This section is empty.
Functions ¶
func ClaudeExchangeCodeCmd ¶ added in v0.20.0
func ClaudeExchangeCodeCmd(session *auth.ClaudeLoginSession, code, redirectURI string) tea.Cmd
ClaudeExchangeCodeCmd performs the token exchange (phase 2). It is called after the TUI receives the authorization code — either from the automatic browser callback (ClaudeAutoCode) or from the manual input dialog.
func ClaudeLoginCmd ¶ added in v0.16.0
ClaudeLoginCmd starts the OAuth flow (phase 1): initializes the session and returns ClaudeLoginStartMsg so the TUI can show the dialog and open the browser.
func ClaudeLogoutCmd ¶ added in v0.16.0
ClaudeLogoutCmd performs logout.
func ClaudeWaitAutoCodeCmd ¶ added in v0.20.0
func ClaudeWaitAutoCodeCmd(session *auth.ClaudeLoginSession) tea.Cmd
ClaudeWaitAutoCodeCmd waits for the automatic browser callback to deliver the authorization code. It blocks until the code arrives or the session times out.
func GetClaudeAuthStatusCmd ¶ added in v0.16.0
GetClaudeAuthStatusCmd fetches current auth status.
func LoadClaudeStatsCmd ¶ added in v0.16.0
LoadClaudeStatsCmd loads stats and sends ClaudeStatsMsg.
Types ¶
type AttachmentAddedMsg ¶
type AttachmentAddedMsg struct {
Attachment message.Attachment
}
type ClaudeAuthStatusMsg ¶ added in v0.16.0
type ClaudeAuthStatusMsg struct {
Status *auth.ClaudeAuthStatus
Err error
}
ClaudeAuthStatusMsg is sent to show auth status.
type ClaudeLoginCodeSubmitMsg ¶ added in v0.20.0
type ClaudeLoginCodeSubmitMsg struct {
Code string
RedirectURI string // always auth.ClaudeManualRedirectURL
}
ClaudeLoginCodeSubmitMsg is sent when the user submits a manual authorization code.
type ClaudeLoginDialogCancelMsg ¶ added in v0.20.0
type ClaudeLoginDialogCancelMsg struct{}
ClaudeLoginDialogCancelMsg is sent when the user cancels the login dialog.
type ClaudeLoginDialogCmp ¶ added in v0.20.0
type ClaudeLoginDialogCmp struct {
// contains filtered or unexported fields
}
ClaudeLoginDialogCmp is the OAuth login dialog. It shows the authorization URL (manual flow) and a text input for pasting the code returned by platform.claude.com. It is closed automatically when the automatic browser callback delivers the code.
func NewClaudeLoginDialogCmp ¶ added in v0.20.0
func NewClaudeLoginDialogCmp(session *auth.ClaudeLoginSession) ClaudeLoginDialogCmp
NewClaudeLoginDialogCmp creates a new login dialog for the given session.
func (ClaudeLoginDialogCmp) Bindings ¶ added in v0.20.0
func (m ClaudeLoginDialogCmp) Bindings() []key.Binding
Bindings implements layout.Bindings.
func (ClaudeLoginDialogCmp) Init ¶ added in v0.20.0
func (m ClaudeLoginDialogCmp) Init() tea.Cmd
Init implements tea.Model.
func (ClaudeLoginDialogCmp) Session ¶ added in v0.20.0
func (m ClaudeLoginDialogCmp) Session() *auth.ClaudeLoginSession
Session returns the underlying auth session (used by tui.go to exchange the code).
func (*ClaudeLoginDialogCmp) SetSize ¶ added in v0.20.0
func (m *ClaudeLoginDialogCmp) SetSize(width, height int)
SetSize propagates terminal size to the component.
func (ClaudeLoginDialogCmp) View ¶ added in v0.20.0
func (m ClaudeLoginDialogCmp) View() string
View implements tea.Model.
type ClaudeLoginDoneMsg ¶ added in v0.16.0
ClaudeLoginDoneMsg is sent after login completes (success or failure).
type ClaudeLoginStartMsg ¶ added in v0.16.0
type ClaudeLoginStartMsg struct {
Session *auth.ClaudeLoginSession
}
ClaudeLoginStartMsg is sent when the OAuth session has been initialized. The TUI uses it to show the login dialog and open the browser.
type ClaudeLogoutDoneMsg ¶ added in v0.16.0
type ClaudeLogoutDoneMsg struct {
Err error
}
ClaudeLogoutDoneMsg is sent after logout completes.
type ClaudeStatsMsg ¶ added in v0.16.0
type ClaudeStatsMsg struct {
Content string // pre-formatted stats text
}
ClaudeStatsMsg is sent when stats should be shown.
type CloseCommandDialogMsg ¶
type CloseCommandDialogMsg struct{}
CloseCommandDialogMsg is sent when the command dialog is closed.
type CloseCronJobsDialogMsg ¶ added in v0.244.0
type CloseCronJobsDialogMsg struct{}
CloseCronJobsDialogMsg closes the cronjobs dialog.
type CloseInfoDialogMsg ¶ added in v0.200.0
type CloseInfoDialogMsg struct{}
CloseInfoDialogMsg is sent when the info dialog is closed.
type CloseInitDialogMsg ¶
type CloseInitDialogMsg struct {
Initialize bool // run AGENTS.md creation
GenerateConfig bool // write .pando.toml to cwd
}
CloseInitDialogMsg is a message that is sent when the init dialog is closed.
type CloseModelDialogMsg ¶
type CloseModelDialogMsg struct{}
CloseModelDialogMsg is sent when a model is selected
type CloseMultiArgumentsDialogMsg ¶
type CloseMultiArgumentsDialogMsg struct {
Submit bool
CommandID string
Content string
Args map[string]string
}
CloseMultiArgumentsDialogMsg is a message that is sent when the multi-arguments dialog is closed.
type ClosePersonaDialogMsg ¶ added in v0.200.0
type ClosePersonaDialogMsg struct{}
ClosePersonaDialogMsg is sent when the persona dialog is closed without selection.
type CloseProjectsDialogMsg ¶ added in v0.240.0
type CloseProjectsDialogMsg struct{}
CloseProjectsDialogMsg is fired when the dialog is dismissed.
type CloseQuitMsg ¶
type CloseQuitMsg struct{}
type CloseSessionDialogMsg ¶
type CloseSessionDialogMsg struct{}
CloseSessionDialogMsg is sent when the session dialog is closed
type CloseSkillsCatalogMsg ¶ added in v0.32.1
type CloseSkillsCatalogMsg struct{}
CloseSkillsCatalogMsg closes the skills catalog dialog.
type CloseThemeDialogMsg ¶
type CloseThemeDialogMsg struct{}
CloseThemeDialogMsg is sent when the theme dialog is closed
type Command ¶
type Command struct {
ID string
Title string
Description string
Shortcut string
Category CommandCategory
Handler func(cmd Command) tea.Cmd
}
Command represents a command that can be executed.
func LoadCustomCommands ¶
LoadCustomCommands loads custom commands from both XDG_CONFIG_HOME and project data directory
type CommandCategory ¶ added in v0.2.0
type CommandCategory string
const ( CommandCategoryGeneral CommandCategory = "General" CommandCategoryFiles CommandCategory = "Files" CommandCategorySessions CommandCategory = "Sessions" CommandCategoryModels CommandCategory = "Models" CommandCategoryView CommandCategory = "View" CommandCategoryAccount CommandCategory = "Account" )
type CommandDialog ¶
CommandDialog interface for the command selection dialog.
func NewCommandDialogCmp ¶
func NewCommandDialogCmp() CommandDialog
NewCommandDialogCmp creates a new command selection dialog.
type CommandRunCustomMsg ¶
type CommandRunCustomMsg struct {
Content string
Args map[string]string // Map of argument names to values
}
CommandRunCustomMsg is sent when a custom command is executed
type CommandSelectedMsg ¶
type CommandSelectedMsg struct {
Command Command
}
CommandSelectedMsg is sent when a command is selected.
type CompletionDialog ¶
func NewCompletionDialogCmp ¶
func NewCompletionDialogCmp(completionProvider CompletionProvider) CompletionDialog
type CompletionDialogCloseMsg ¶
type CompletionDialogCloseMsg struct{}
type CompletionDialogCompleteItemMsg ¶
type CompletionDialogCompleteItemMsg struct {
Value string
}
type CompletionItem ¶
func (*CompletionItem) DisplayValue ¶
func (ci *CompletionItem) DisplayValue() string
func (*CompletionItem) GetValue ¶
func (ci *CompletionItem) GetValue() string
type CompletionItemI ¶
type CompletionItemI interface {
utilComponents.SimpleListItem
GetValue() string
DisplayValue() string
}
func NewCompletionItem ¶
func NewCompletionItem(completionItem CompletionItem) CompletionItemI
type CompletionProvider ¶
type CompletionProvider interface {
GetId() string
GetEntry() CompletionItemI
GetChildEntries(query string) ([]CompletionItemI, error)
}
type CompletionSelectedMsg ¶
type ConfigGeneratedMsg ¶ added in v0.236.1
type ConfigGeneratedMsg struct {
Path string
}
ConfigGeneratedMsg is sent after .pando.toml has been successfully written to the current directory so the TUI can navigate to the settings page.
type CronJobRunNowMsg ¶ added in v0.244.0
type CronJobRunNowMsg struct {
Name string
}
CronJobRunNowMsg asks the app to run a cronjob immediately.
type CronJobViewTasksMsg ¶ added in v0.244.0
type CronJobViewTasksMsg struct {
Name string
}
CronJobViewTasksMsg asks the app to navigate to the orchestrator filtered by this job.
type CronJobsDialog ¶ added in v0.244.0
CronJobsDialog is the interface for the cronjobs management dialog.
func NewCronJobsDialogCmp ¶ added in v0.244.0
func NewCronJobsDialogCmp() CronJobsDialog
NewCronJobsDialogCmp creates a new cronjobs dialog.
type FilePrickerKeyMap ¶
type FilepickerCmp ¶
type FilepickerCmp interface {
tea.Model
layout.Bindings
ToggleFilepicker(showFilepicker bool)
IsCWDFocused() bool
}
func NewFilepickerCmp ¶
func NewFilepickerCmp(app *app.App) FilepickerCmp
type HelpCmp ¶
type HelpCmp interface {
tea.Model
SetBindings([]key.Binding)
SetSections([]HelpSection)
}
func NewHelpCmp ¶
func NewHelpCmp() HelpCmp
type HelpSection ¶ added in v0.2.0
type InfoDialogCmp ¶ added in v0.200.0
type InfoDialogCmp struct {
// contains filtered or unexported fields
}
InfoDialogCmp is an overlay dialog that displays scrollable text content.
func NewInfoDialogCmp ¶ added in v0.200.0
func NewInfoDialogCmp() InfoDialogCmp
NewInfoDialogCmp creates a new InfoDialogCmp.
func (InfoDialogCmp) BindingKeys ¶ added in v0.200.0
func (m InfoDialogCmp) BindingKeys() []key.Binding
BindingKeys returns the key bindings for this dialog.
func (InfoDialogCmp) Init ¶ added in v0.200.0
func (m InfoDialogCmp) Init() tea.Cmd
Init implements tea.Model.
func (*InfoDialogCmp) SetContent ¶ added in v0.200.0
func (m *InfoDialogCmp) SetContent(title, content string)
SetContent sets the title and text content of the dialog and resets the viewport.
func (InfoDialogCmp) View ¶ added in v0.200.0
func (m InfoDialogCmp) View() string
View implements tea.Model.
type InitDialogCmp ¶
type InitDialogCmp struct {
// contains filtered or unexported fields
}
InitDialogCmp is a component that asks the user if they want to initialize the project (create AGENTS.md) and, when no local config file exists, whether to generate a .pando.toml in the current directory.
func NewInitDialogCmp ¶
func NewInitDialogCmp() InitDialogCmp
NewInitDialogCmp creates a new InitDialogCmp. It automatically detects whether the config-generation section should be shown.
func (InitDialogCmp) Bindings ¶
func (m InitDialogCmp) Bindings() []key.Binding
Bindings implements layout.Bindings.
func (*InitDialogCmp) SetSize ¶
func (m *InitDialogCmp) SetSize(width, height int)
SetSize sets the size of the component.
type InstallSkillMsg ¶ added in v0.32.1
type InstallSkillMsg struct {
Skill catalog.CatalogSkill
Global bool // true = ~/.pando/skills/, false = .pando/skills/
}
InstallSkillMsg requests installation of a skill.
type ModelDialog ¶
ModelDialog interface for the model selection dialog
func NewModelDialogCmp ¶
func NewModelDialogCmp() ModelDialog
type ModelSelectedMsg ¶
ModelSelectedMsg is sent when a model is selected
type MultiArgumentsDialogCmp ¶
type MultiArgumentsDialogCmp struct {
// contains filtered or unexported fields
}
MultiArgumentsDialogCmp is a component that asks the user for multiple command arguments.
func NewMultiArgumentsDialogCmp ¶
func NewMultiArgumentsDialogCmp(commandID, content string, argNames []string) MultiArgumentsDialogCmp
NewMultiArgumentsDialogCmp creates a new MultiArgumentsDialogCmp.
func (MultiArgumentsDialogCmp) Bindings ¶
func (m MultiArgumentsDialogCmp) Bindings() []key.Binding
Bindings implements layout.Bindings.
func (MultiArgumentsDialogCmp) Init ¶
func (m MultiArgumentsDialogCmp) Init() tea.Cmd
Init implements tea.Model.
func (*MultiArgumentsDialogCmp) SetSize ¶
func (m *MultiArgumentsDialogCmp) SetSize(width, height int)
SetSize sets the size of the component.
func (MultiArgumentsDialogCmp) View ¶
func (m MultiArgumentsDialogCmp) View() string
View implements tea.Model.
type OpenCronJobsDialogMsg ¶ added in v0.244.0
type OpenCronJobsDialogMsg struct{}
OpenCronJobsDialogMsg triggers the cronjobs dialog to open.
type OpenFilepickerMsg ¶ added in v0.2.0
type OpenFilepickerMsg struct{}
type OpenModelDialogMsg ¶ added in v0.2.0
type OpenModelDialogMsg struct{}
type OpenPersonaDialogMsg ¶ added in v0.200.0
type OpenPersonaDialogMsg struct{}
OpenPersonaDialogMsg triggers opening the persona picker.
type OpenProjectsDialogMsg ¶ added in v0.240.0
type OpenProjectsDialogMsg struct{}
OpenProjectsDialogMsg triggers opening the projects dialog.
type OpenSessionDialogMsg ¶ added in v0.2.0
type OpenSessionDialogMsg struct{}
type OpenSkillsCatalogMsg ¶ added in v0.32.1
type OpenSkillsCatalogMsg struct{}
OpenSkillsCatalogMsg opens the skills catalog dialog.
type OpenThemeDialogMsg ¶ added in v0.2.0
type OpenThemeDialogMsg struct{}
type PermissionAction ¶
type PermissionAction string
const ( PermissionAllow PermissionAction = "allow" PermissionAllowForSession PermissionAction = "allow_session" PermissionDeny PermissionAction = "deny" )
Permission responses
type PermissionDialogCmp ¶
type PermissionDialogCmp interface {
tea.Model
layout.Bindings
SetPermissions(permission permission.PermissionRequest) tea.Cmd
}
PermissionDialogCmp interface for permission dialog component
func NewPermissionDialogCmp ¶
func NewPermissionDialogCmp() PermissionDialogCmp
type PermissionResponseMsg ¶
type PermissionResponseMsg struct {
Permission permission.PermissionRequest
Action PermissionAction
}
PermissionResponseMsg represents the user's response to a permission request
type PersonaClearedMsg ¶ added in v0.200.0
type PersonaClearedMsg struct{}
PersonaClearedMsg is fired when "None (auto)" is selected.
type PersonaDialog ¶ added in v0.200.0
type PersonaDialog interface {
tea.Model
layout.Bindings
SetPersonas(personas []string, active string)
}
PersonaDialog interface for the persona selection dialog.
func NewPersonaDialogCmp ¶ added in v0.200.0
func NewPersonaDialogCmp() PersonaDialog
NewPersonaDialogCmp creates a new persona selection dialog.
type PersonaSelectedMsg ¶ added in v0.200.0
type PersonaSelectedMsg struct {
Name string
}
PersonaSelectedMsg is fired when a persona is selected.
type ProjectActivatedMsg ¶ added in v0.240.0
ProjectActivatedMsg is fired when the user selects a project to activate.
type ProjectAddConfirmMsg ¶ added in v0.240.0
ProjectAddConfirmMsg is fired when the user confirms a new project path.
type ProjectInitConfirmDialog ¶ added in v0.240.0
ProjectInitConfirmDialog is the interface for the init confirmation dialog.
func NewProjectInitConfirmDialogCmp ¶ added in v0.240.0
func NewProjectInitConfirmDialogCmp() ProjectInitConfirmDialog
NewProjectInitConfirmDialogCmp creates a new project init confirmation dialog.
type ProjectInitConfirmMsg ¶ added in v0.240.0
ProjectInitConfirmMsg is fired when ErrProjectNeedsInit was returned and the user confirms they want to initialize the path.
type ProjectInitNoMsg ¶ added in v0.240.0
type ProjectInitNoMsg struct{}
ProjectInitNoMsg is fired when the user declines project initialization.
type ProjectInitYesMsg ¶ added in v0.240.0
ProjectInitYesMsg is fired when the user confirms project initialization.
type ProjectRemoveMsg ¶ added in v0.240.0
type ProjectRemoveMsg struct {
ProjectID string
}
ProjectRemoveMsg is fired when the user wants to remove a project.
type ProjectsDialog ¶ added in v0.240.0
type ProjectsDialog interface {
tea.Model
layout.Bindings
SetProjects(projects []project.Project, activeID string)
}
ProjectsDialog interface for the project selection dialog.
func NewProjectsDialogCmp ¶ added in v0.240.0
func NewProjectsDialogCmp() ProjectsDialog
NewProjectsDialogCmp creates a new projects dialog.
type QuitDialog ¶
func NewQuitCmp ¶
func NewQuitCmp() QuitDialog
type SessionDialog ¶
type SessionDialog interface {
tea.Model
layout.Bindings
SetSessions(sessions []session.Session)
SetSelectedSession(sessionID string)
}
SessionDialog interface for the session switching dialog
func NewSessionDialogCmp ¶
func NewSessionDialogCmp() SessionDialog
NewSessionDialogCmp creates a new session switching dialog
type SessionSelectedMsg ¶
SessionSelectedMsg is sent when a session is selected
type ShowInfoDialogMsg ¶ added in v0.200.0
ShowInfoDialogMsg triggers the info dialog with the given title and content.
type ShowInitDialogMsg ¶
type ShowInitDialogMsg struct {
Show bool
}
ShowInitDialogMsg is a message that is sent to show the init dialog.
type ShowMultiArgumentsDialogMsg ¶
ShowMultiArgumentsDialogMsg is a message that is sent to show the multi-arguments dialog.
type SkillInstalledMsg ¶ added in v0.32.1
SkillInstalledMsg reports the result of a skill installation.
type SkillsCatalogDialog ¶ added in v0.32.1
type SkillsCatalogDialog struct {
// contains filtered or unexported fields
}
SkillsCatalogDialog is a Bubbletea component for browsing and installing skills.
func NewSkillsCatalogDialog ¶ added in v0.32.1
func NewSkillsCatalogDialog(width, height int, client *catalog.Client) SkillsCatalogDialog
NewSkillsCatalogDialog creates a new SkillsCatalogDialog.
func (SkillsCatalogDialog) Init ¶ added in v0.32.1
func (m SkillsCatalogDialog) Init() tea.Cmd
Init focuses the text input.
func (SkillsCatalogDialog) View ¶ added in v0.32.1
func (m SkillsCatalogDialog) View() string
View renders the dialog.
type ThemeChangedMsg ¶
type ThemeChangedMsg struct {
ThemeName string
}
ThemeChangedMsg is sent when the theme is changed
type ThemeDialog ¶
ThemeDialog interface for the theme switching dialog
func NewThemeDialogCmp ¶
func NewThemeDialogCmp() ThemeDialog
NewThemeDialogCmp creates a new theme switching dialog