Documentation
¶
Index ¶
Constants ¶
const ( DialogAddProject = "add_project" DialogCreateWorkspace = "create_workspace" DialogDeleteWorkspace = "delete_workspace" DialogRenameWorkspace = "rename_workspace" DialogCommitWorkspace = "commit_workspace" DialogTrustScripts = "trust_scripts" DialogRemoveProject = "remove_project" // DialogSelectAssistant is the legacy ID for the assistant-selection flow. // The dialog itself is built by common.NewAgentPicker and carries // common.AgentPickerDialogID at runtime; handleDialogResult still matches // DialogSelectAssistant alongside it so older callers keep routing. DialogSelectAssistant = "select_assistant" DialogQuit = "quit" DialogCleanupTmux = "cleanup_tmux" )
DialogID constants
const ( HarnessCenter = "center" HarnessSidebar = "sidebar" HarnessMonitor = "monitor" )
HarnessMode values.
const ( HarnessOverlayNone = "" HarnessOverlayDialog = "dialog" HarnessOverlaySettings = "settings" HarnessOverlayPrefix = "prefix" HarnessOverlayError = "error" HarnessOverlayInput = "input" )
Overlay values accepted by HarnessOptions.Overlay. The empty value renders the base pane with no overlay (the historical harness behavior).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the root Bubbletea model.
func (*App) CleanupTmuxOnExit ¶ added in v0.0.9
func (a *App) CleanupTmuxOnExit()
CleanupTmuxOnExit is a no-op since sessions are always persisted across restarts.
func (*App) IsTmuxAvailable ¶ added in v0.0.9
IsTmuxAvailable returns whether tmux is installed and available.
func (*App) SetMsgSender ¶ added in v0.0.4
func (*App) Shutdown ¶ added in v0.0.5
func (a *App) Shutdown()
Shutdown releases resources that may outlive the Bubble Tea program.
type GitOperations ¶ added in v0.0.14
type GitOperations interface {
CreateWorkspace(repoPath, workspacePath, branch, base string) error
RemoveWorkspace(repoPath, workspacePath string) error
DeleteBranch(repoPath, branch string) error
DiscoverWorkspaces(project *data.Project) ([]data.Workspace, error)
}
GitOperations abstracts git workspace operations for testability.
type GitStatusService ¶ added in v0.0.12
type GitStatusService interface {
GetCached(root string) *git.StatusResult
UpdateCache(root string, status *git.StatusResult)
Invalidate(root string)
Refresh(root string) (*git.StatusResult, error)
RefreshFast(root string) (*git.StatusResult, error)
}
GitStatusService provides cached status reads and fresh refreshes.
type Harness ¶
type Harness struct {
// contains filtered or unexported fields
}
Harness drives a headless render loop for profiling.
func NewHarness ¶
func NewHarness(opts HarnessOptions) (*Harness, error)
NewHarness builds a headless UI harness for the requested mode.
type HarnessOptions ¶
type HarnessOptions struct {
Mode string
Tabs int
Width int
Height int
HotTabs int
PayloadBytes int
NewlineEvery int
ShowKeymapHints bool
// Overlay, when non-empty, puts the App into the corresponding overlay
// state (dialog/settings/prefix/...) after the base pane is built, so the
// rendered frame exercises composeOverlays instead of only base-pane chrome.
// See applyHarnessOverlay in harness_overlay.go for the accepted values.
Overlay string
}
HarnessOptions configures the headless UI harness.
type KeyMap ¶
type KeyMap struct {
// Prefix key (leader)
Prefix key.Binding
// Dashboard
Enter key.Binding
Delete key.Binding
Rename key.Binding
ToggleFilter key.Binding
Refresh key.Binding
// Agent/Chat
Interrupt key.Binding
SendEscape key.Binding
// Navigation
Up key.Binding
Down key.Binding
Left key.Binding
Right key.Binding
}
KeyMap defines all keybindings for the application
type ProjectRegistry ¶ added in v0.0.12
type ProjectRegistry interface {
Projects() ([]string, error)
AddProject(path string) error
RemoveProject(path string) error
}
ProjectRegistry is the minimal interface used by the app for project tracking.
type TmuxOps ¶ added in v0.0.12
type TmuxOps interface {
EnsureAvailable() error
InstallHint() string
ActiveAgentSessionsByActivity(window time.Duration, opts tmux.Options) ([]tmux.SessionActivity, error)
SessionsWithTags(match map[string]string, keys []string, opts tmux.Options) ([]tmux.SessionTagValues, error)
AllSessionStates(opts tmux.Options) (map[string]tmux.SessionState, error)
SessionStateFor(sessionName string, opts tmux.Options) (tmux.SessionState, error)
SessionHasClients(sessionName string, opts tmux.Options) (bool, error)
SessionCreatedAt(sessionName string, opts tmux.Options) (int64, error)
KillSession(sessionName string, opts tmux.Options) error
KillSessionsMatchingTags(tags map[string]string, opts tmux.Options) (bool, error)
KillSessionsWithPrefix(prefix string, opts tmux.Options) error
KillSessionsWithPrefixMissingTag(prefix, tag string, opts tmux.Options) error
KillWorkspaceSessions(wsID string, opts tmux.Options) error
SetMonitorActivityOn(opts tmux.Options) error
SetStatusOff(opts tmux.Options) error
CapturePaneTail(sessionName string, lines int, opts tmux.Options) (string, bool)
ContentHash(content string) [16]byte
}
TmuxOps defines tmux operations used by the app.
type UpdateService ¶ added in v0.0.12
type UpdateService interface {
Check() (*update.CheckResult, error)
Upgrade(release *update.Release) error
IsHomebrewBuild() bool
}
UpdateService wraps release checks and upgrades.
type WorkspaceStore ¶ added in v0.0.12
type WorkspaceStore interface {
ListByRepo(repo string) ([]*data.Workspace, error)
ListByRepoIncludingArchived(repo string) ([]*data.Workspace, error)
LoadMetadataFor(workspace *data.Workspace) (bool, error)
UpsertFromDiscovery(workspace *data.Workspace) error
Save(workspace *data.Workspace) error
Delete(id data.WorkspaceID) error
Rename(id data.WorkspaceID, newName string) error
SetEnv(id data.WorkspaceID, env map[string]string) error
ResolvedDefaultAssistant() string
}
WorkspaceStore is the minimal interface used by the app for workspace metadata.
Source Files
¶
- app_assistants.go
- app_attached_limit.go
- app_cache.go
- app_core.go
- app_dialogs_registry.go
- app_error.go
- app_focus_sync.go
- app_init.go
- app_input.go
- app_input_dialogs.go
- app_input_dispatch.go
- app_input_keys.go
- app_input_messages_center.go
- app_input_messages_dialogs.go
- app_input_messages_tmux.go
- app_input_messages_workspace.go
- app_input_mouse.go
- app_input_pty.go
- app_input_workspace.go
- app_msgpump.go
- app_operations.go
- app_persistence.go
- app_prefix.go
- app_prefix_palette.go
- app_prefix_palette_visibility.go
- app_shutdown.go
- app_state.go
- app_tmux.go
- app_tmux_activity.go
- app_tmux_activity_hysteresis.go
- app_tmux_activity_result.go
- app_tmux_activity_shared.go
- app_tmux_activity_state.go
- app_tmux_discover.go
- app_tmux_gc.go
- app_tmux_sync.go
- app_tokens.go
- app_ui.go
- app_ui_borders.go
- app_ui_click.go
- app_view.go
- app_view_content.go
- app_view_overlays.go
- app_view_panes.go
- defaults.go
- env_helpers.go
- error_context.go
- errors.go
- harness.go
- harness_overlay.go
- instance_id.go
- keybindings.go
- service_git.go
- service_tmux.go
- service_update.go
- services.go
- state_watcher.go
- workspace_delete_guard.go
- workspace_delete_tombstone.go
- workspace_lifecycle_state.go
- workspace_lookup.go
- workspace_paths.go
- workspace_reload_guard.go
- workspace_service.go
- workspace_service_helpers.go
- workspace_service_init.go
- workspace_service_load.go
- workspace_service_paths.go
- workspace_snapshot.go