app

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 90 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package app implements the root Bubble Tea application model, orchestrating plugins, modals, project switching, themes, and global keyboard bindings.

Index

Constants

View Source
const (
	GlobalSessions = "sessions"
	GlobalActivity = "activity"

	// Deprecated compatibility names. Session state and older callers used the
	// surface names before the header established the fleet vocabulary.
	GlobalWorkspaces = GlobalSessions
	GlobalAgents     = GlobalActivity
)

The two app-owned global surfaces. Everything else in the global space is a plugin, named by its descriptor ID.

Variables

View Source
var (
	ShowFlash     = msg.ShowFlash
	ShowFlashFrom = msg.ShowFlashFrom
)

ShowFlash and ShowFlashFrom are re-exported for symmetry with ShowToast.

View Source
var (
	Alert   = msg.Alert
	Blocked = msg.Blocked
)

Alert and Blocked are re-exported: the source-aware notification path, for events that should not speak as generic `system` chrome.

View Source
var ShowToast = msg.ShowToast

ShowToast is re-exported from msg package for backward compatibility.

View Source
var ThemeChanged = msg.ThemeChanged

ThemeChanged is re-exported from msg package for backward compatibility.

Functions

func ActivateTarget added in v1.2.0

func ActivateTarget(target uirequest.Target) tea.Cmd

ActivateTarget returns a command that activates a target in the current project. Use ActivateTargetIn for a cross-project jump.

func ActivateTargetIn added in v1.2.0

func ActivateTargetIn(target uirequest.Target, project string) tea.Cmd

ActivateTargetIn returns a command that activates a target in a named project.

func AttachSession added in v1.2.0

func AttachSession(session string) tea.Cmd

AttachSession returns a command that attaches a tmux session by name.

func BoundDestinationNavbarLabel added in v1.12.0

func BoundDestinationNavbarLabel(d Destination) string

BoundDestinationNavbarLabel is the project-selector text for a bound destination, including the host.

func BoundDestinationTitleProject added in v1.12.0

func BoundDestinationTitleProject(d Destination) string

BoundDestinationTitleProject is the {project} value a bound destination feeds the terminal-title template, including the host.

func BoundDestinationTitleWorktree added in v1.12.0

func BoundDestinationTitleWorktree(d Destination) string

BoundDestinationTitleWorktree is the {worktree} value a bound destination feeds the terminal-title template. Empty on the main checkout.

func CheckCurrentWorktree

func CheckCurrentWorktree(workDir string) (exists bool, mainPath string)

CheckCurrentWorktree checks if the current working directory is still a valid worktree. Returns (exists, mainPath) where mainPath is the path to switch to if worktree was deleted.

func DestinationMatches added in v1.12.0

func DestinationMatches(d Destination, query string) bool

DestinationMatches reports whether query is a case-insensitive substring of the destination's host id, project name, Root, or worktree name. An empty query matches everything.

func DismissNotification added in v1.2.0

func DismissNotification(id string) tea.Cmd

DismissNotification returns a command that dismisses one notification.

func FilterInput added in v1.0.0

func FilterInput(model tea.Model, msg tea.Msg) tea.Msg

FilterInput is the Bubble Tea pre-update filter. Boundary wheel events are discarded here so trackpad and Magic Mouse inertia cannot make Update and View repaint an already stationary surface hundreds of times.

func FocusPlugin

func FocusPlugin(pluginID string) tea.Cmd

FocusPlugin returns a command that requests focusing a plugin by ID.

func FormatDestination added in v1.12.0

func FormatDestination(d Destination) string

FormatDestination is the one-line label `@`, `W`, the navbar, and toasts share. Local destinations are unprefixed; a worktree suffix is present only for a linked worktree. Host is the registered host id, not the SSH target.

func GetAllRelatedPaths

func GetAllRelatedPaths(workDir string) []string

GetAllRelatedPaths returns all paths that share the same git repository: the main worktree and all linked worktrees. Each path is absolute. Returns nil if workDir is not in a git repository.

func GetMainWorktreePath

func GetMainWorktreePath(workDir string) string

GetMainWorktreePath returns the path to the main worktree for the repository. Returns empty string if not in a git repo or no main worktree found.

func GetRepoName

func GetRepoName(workDir string) string

GetRepoName returns the git repository name for the given directory. It tries to extract the name from the remote URL first, falling back to the directory name if no remote is configured. Returns empty string if the directory is not a git repository.

func GlobalDescriptors added in v1.14.0

func GlobalDescriptors() []plugin.Descriptor

GlobalDescriptors is the ordered list of global-scope plugin descriptors the app shell hosts. The shell builds one globalPluginHost per enabled entry, and the header row follows the same order.

It is here rather than read from internal/plugins/assembly because the plugin packages import this one, so an import of the assembly would be a cycle. The descriptor values themselves are the single source of truth — this list and assembly's catalog both call the same tasks.Descriptor() — and TestGlobalDescriptorsMatchTheAssemblyCatalog in internal/plugins/assembly fails if the two lists ever disagree.

func IntroTick

func IntroTick() tea.Cmd

func OpenConfiguration added in v1.0.0

func OpenConfiguration(page configui.PageID) tea.Cmd

OpenConfiguration returns a command that opens Configuration on a page.

func OpenDiffPane added in v1.2.0

func OpenDiffPane(spec string) tea.Cmd

OpenDiffPane returns a command that opens a git spec in a diff pane.

func OpenIssueInTD added in v1.0.0

func OpenIssueInTD(issueID string) tea.Cmd

OpenIssueInTD is the one jump: focus the td plugin and open the issue there. The preview modal, the project Workspaces issue pane, and the global Workspaces issue preview all reach td through this, so "open in td" cannot come to mean three slightly different things.

func OpenIssuePane added in v1.2.0

func OpenIssuePane(issue string) tea.Cmd

OpenIssuePane returns a command that opens an issue in an issue pane.

func OpenNotesPreferences added in v1.2.0

func OpenNotesPreferences() tea.Cmd

func OpenPluginPane added in v1.14.0

func OpenPluginPane(instance, collection, query, row, filters string) tea.Cmd

OpenPluginPane returns a command that opens a plugin collection tab, or one row's document tab when row is non-empty.

func OpenResourcePane added in v1.2.0

func OpenResourcePane(provider, matcher, locator string) tea.Cmd

OpenResourcePane returns a command that opens a provider locator in a resource pane.

func PluginFocused

func PluginFocused() tea.Cmd

PluginFocused returns a command that sends PluginFocusedMsg.

func PostNotification added in v1.2.0

func PostNotification(n notify.Notification) tea.Cmd

PostNotification returns a command that files a notification.

func ReadNotification added in v1.2.0

func ReadNotification(id string) tea.Cmd

ReadNotification returns a command that marks one notification read.

func Refresh

func Refresh() tea.Cmd

Refresh returns a command to trigger a refresh.

func ReportError

func ReportError(err error) tea.Cmd

ReportError returns a command to report an error.

func ResourceProviderManager added in v1.0.3

func ResourceProviderManager() *pluginhost.Manager

ResourceProviderManager returns the live manager, or nil before the first describe pass has started. M1 injects its read-only snapshot and Resolve into both workspace surfaces through this.

func ShutdownResourceProviders added in v1.0.3

func ShutdownResourceProviders()

ShutdownResourceProviders cancels any provider work still in flight. Queued work is cancellable, and an invocation in progress has its process group killed, so nothing survives the app.

func ShutdownSessionRestore added in v1.11.0

func ShutdownSessionRestore()

ShutdownSessionRestore cancels an in-flight automatic restore.

func SwitchToMainWorktree

func SwitchToMainWorktree(mainPath string) tea.Cmd

SwitchToMainWorktree returns a command that requests switching to the main worktree.

func SwitchWorktree

func SwitchWorktree(path string) tea.Cmd

SwitchWorktree returns a command that requests switching to a worktree by path.

func TerminalConfig added in v0.98.0

func TerminalConfig(cfg *config.Config) tty.Config

TerminalConfig resolves the user's terminal-interaction settings once, so every surface that hosts a terminal answers the same chords. Surfaces override individual fields where they genuinely differ; nothing below re-reads config.

func Tick

func Tick(d time.Duration, tag string) tea.Cmd

Tick returns a custom tick command with a tag.

func WorktreeExists

func WorktreeExists(worktreePath string) bool

WorktreeExists checks if the given worktree path still exists and is valid. Returns false if the directory doesn't exist or is not a valid git worktree.

func WorktreeNameForPath

func WorktreeNameForPath(workDir, targetPath string) string

WorktreeNameForPath returns the worktree name for a given absolute path. Returns empty string if the path is the main worktree or not found.

Types

type ActivateTargetMsg added in v1.2.0

type ActivateTargetMsg struct {
	Target  uirequest.Target
	Project string
}

ActivateTargetMsg is the one route for "jump to the thing this text names". Every surface — a terminal link, the notification centre, a future CLI action — sends this rather than reaching into a plugin, because only the app shell can both focus plugins and switch projects.

Target is the cross-surface vocabulary (uirequest.Target). Project is an optional qualifier — a project path or its base name — and empty means the project the user is already in.

type AppScope added in v0.98.0

type AppScope uint8

AppScope is the space the user is currently in. Sidecar has exactly two: the project the plugins are initialized against, and the global space whose data spans every configured project.

It replaces the implicit `overviewActive bool`: the scope decides which tabs the header owns, which surface receives keys and mouse events, and what the destination title says. The project underneath is untouched by a scope change — no registry.Reinit, no worktree move, no plugin lifecycle.

const (
	ScopeProject AppScope = iota
	ScopeGlobal
)

type AttachSessionMsg added in v1.2.0

type AttachSessionMsg struct{ Session string }

AttachSessionMsg attaches a tmux session by name. The host honours the same full-attach feature gate as every other attach path.

type Destination added in v1.12.0

type Destination struct {
	HostID          string // empty = this machine
	HostIncarnation uint64 // 0 when local
	ProjectKey      string // owning host's inventory key = canonical(root) on that machine; NOT a local path
	ProjectName     string
	WorktreeKey     string // canonical worktree path on the owning host; empty = main checkout
	WorktreeName    string
	Root            string // hint from the owning host, never passed to local os/git/td
}

Destination is the host-qualified identity both the project (`@`) and worktree (`W`) switchers will share. A same-named checkout on two machines is two destinations; persist and compare ProjectKey only as hosts.ScopedKey(HostID, ProjectKey).

Slice 1 wires this into `@` listing, Enter bind, navbar, and toasts.

type EditorReturnedMsg

type EditorReturnedMsg struct {
	Err error
	// Fallback is the direct-exec argv to try when the shell that was asked to
	// load the user's profile never got as far as running the editor. It is
	// empty once the fallback has been used, so a failure can never loop.
	Fallback []string
}

EditorReturnedMsg signals that an external editor process has exited. Used to restore terminal state (mouse support) after returning from vim/etc.

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg represents an error condition.

type FlashMsg added in v1.2.0

type FlashMsg = msg.FlashMsg

FlashMsg is re-exported from the msg package: the status-flash tier beside ToastMsg. A flash is transient feedback, never a stored notification.

type FocusPluginByIDMsg

type FocusPluginByIDMsg struct {
	PluginID string
}

FocusPluginByIDMsg requests focusing a specific plugin by ID. Used for cross-plugin navigation (e.g., opening file in file browser from git).

type Intent added in v1.2.0

type Intent any

Intent is a handler-owned, validated Sidecar navigation intent.

type IntentAppContext added in v1.2.0

type IntentAppContext struct {
	ProjectRoot string
}

IntentAppContext is the bounded application state an intent may observe. Handlers return messages rather than reaching into plugin models.

type IntentHandler added in v1.2.0

type IntentHandler interface {
	Namespace() string
	Parse(id string, query url.Values) (Intent, error)
	Activate(IntentAppContext, Intent) tea.Cmd
}

IntentHandler owns one static sidecar:// namespace.

type IntroLetter

type IntroLetter struct {
	Char     rune
	TargetX  float64
	CurrentX float64

	// Overshoot logic
	ReachedTarget bool
	OvershootMax  float64

	// Color interpolation
	StartColor   RGB
	EndColor     RGB
	CurrentColor RGB

	Delay time.Duration
}

type IntroModel

type IntroModel struct {
	Active    bool
	StartTime time.Time
	Letters   []*IntroLetter
	Done      bool // Set to true when animation is finished

	// Repo name fade-in (starts after logo animation completes)
	RepoName      string
	RepoOpacity   float64   // 0.0 to 1.0
	RepoFadeStart time.Time // When the fade began
}

IntroModel handles the intro animation state.

func NewIntroModel

func NewIntroModel(repoName string) IntroModel

func (IntroModel) RepoNameView

func (m IntroModel) RepoNameView() string

RepoNameView returns the repo name with current fade opacity applied. Returns empty string if no repo name or opacity is 0.

func (*IntroModel) Update

func (m *IntroModel) Update(dt time.Duration)

Update progresses the animation

func (IntroModel) View

func (m IntroModel) View() string

type IntroTickMsg

type IntroTickMsg time.Time

IntroTickMsg is sent to update the animation frame.

type IssuePreviewData

type IssuePreviewData = issueview.Data

IssuePreviewData is the issue component's data; the modal is one host of it.

type IssuePreviewResultMsg

type IssuePreviewResultMsg struct {
	Data  *IssuePreviewData
	Error error
}

IssuePreviewResultMsg carries fetched issue data back to the app.

type IssueSearchResult

type IssueSearchResult struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Status   string `json:"status"`
	Type     string `json:"type"`
	Priority string `json:"priority"`
}

IssueSearchResult holds a single search result from td search.

type IssueSearchResultMsg

type IssueSearchResultMsg struct {
	Query   string
	Results []IssueSearchResult
	Error   error
}

IssueSearchResultMsg carries search results back to the app.

type ModalKind

type ModalKind int

ModalKind identifies an app-level modal with explicit priority ordering. Lower values = higher priority (checked first for rendering and input routing).

const (
	ModalNone             ModalKind = iota // No modal open
	ModalPalette                           // Command palette (highest priority)
	ModalHelp                              // Help overlay
	ModalUpdate                            // Update modal
	ModalDiagnostics                       // Diagnostics/version info
	ModalQuitConfirm                       // Quit confirmation dialog
	ModalProjectSwitcher                   // Project switcher
	ModalWorktreeSwitcher                  // Worktree switcher
	ModalThemeSwitcher                     // Theme switcher
	ModalOpenIn                            // Open In IDE picker
	ModalIssueInput                        // Issue ID text input
	ModalIssuePreview                      // Issue preview display
	ModalPaneReposition                    // Reposition one app content-deck leaf
	ModalPaneSwitcher                      // Pane switcher over a plugin's content deck (lowest priority)
)

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the root Bubble Tea model for the sidecar application.

func New

func New(reg *plugin.Registry, km *keymap.Registry, cfg *config.Config, currentVersion, workDir, projectRoot, initialPluginID string, opts ...Option) Model

New creates a new application model. initialPluginID optionally specifies which plugin to focus on startup (empty = first plugin).

func (Model) ActivePlugin

func (m Model) ActivePlugin() plugin.Plugin

ActivePlugin returns the currently active plugin.

func (*Model) FocusPluginByID

func (m *Model) FocusPluginByID(id string) tea.Cmd

FocusPluginByID switches to a plugin by its ID.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model and returns initial commands.

func (*Model) NextPlugin

func (m *Model) NextPlugin() tea.Cmd

NextPlugin switches to the next plugin.

func (*Model) Notifications added in v1.2.0

func (m *Model) Notifications() []notify.Notification

Notifications returns the current snapshot, newest first.

func (*Model) PrevPlugin

func (m *Model) PrevPlugin() tea.Cmd

PrevPlugin switches to the previous plugin.

func (*Model) SetActivePlugin

func (m *Model) SetActivePlugin(idx int) tea.Cmd

SetActivePlugin sets the active plugin by index and returns a command to notify the plugin it has been focused.

func (*Model) ShowToast

func (m *Model) ShowToast(message string, duration time.Duration)

ShowToast files a transient message as a `system` notification. It keeps the old name and signature because dozens of callers use it, but there is no footer toast behind it any more: the message becomes a real notification, so it floats as a toast for `duration` and then stays in the centre instead of vanishing unseen.

func (*Model) ToastableNotifications added in v1.2.0

func (m *Model) ToastableNotifications(now time.Time) []notify.Notification

ToastableNotifications is the set a toast host should currently be drawing.

func (*Model) UnreadNotifications added in v1.2.0

func (m *Model) UnreadNotifications() int

UnreadNotifications is what the header indicator counts.

func (Model) Update

func (m Model) Update(msg tea.Msg) (result tea.Model, command tea.Cmd)

Update handles all messages and returns the updated model and commands.

func (Model) View

func (m Model) View() tea.View

View renders the entire application UI and declares the terminal features (alt-screen, mouse) that were previously NewProgram options in v1.

type NavigateToFileMsg struct {
	Path string // Relative path from workdir
	Line int    // Optional 1-based line to reveal after loading
}

NavigateToFileMsg asks the Files plugin to open a path. Hosts send this rather than importing filebrowser.

type NavigateToNoteMsg struct {
	ID          string
	ProjectRoot string
}

NavigateToNoteMsg asks Notes to verify and select a stable note identity in the named project. Notes focuses itself only after the note is confirmed to exist, so a stale or foreign link cannot move the user.

type OpenConfigurationMsg added in v1.0.0

type OpenConfigurationMsg struct {
	Page       configui.PageID
	AddProject bool
}

OpenConfigurationMsg asks the host to open Configuration on a destination. An empty or unknown Page means Configuration's own default, Sidecar Setup.

It is how a surface that is empty because something is not configured yet offers a way out of that state — a plugin sends this rather than importing the Configuration surface — and it is also how a launch command's startup destination is honored. Escape returns to whatever sent it.

AddProject opens the Add Project child of Projects after the page is shown, which is the first-run path when Sidecar launches in a non-Git directory with no configured projects.

type OpenDiffPaneMsg added in v1.2.0

type OpenDiffPaneMsg struct{ Spec string }

OpenDiffPaneMsg opens a git spec in a diff pane. The host re-resolves the spec in its own checkout, so a crafted spec cannot skip rev-parse.

type OpenFullIssueMsg

type OpenFullIssueMsg struct {
	IssueID string
}

OpenFullIssueMsg is broadcast to plugins to open the full rich issue view. Currently handled by the TD monitor plugin via monitor.OpenIssueByIDMsg.

type OpenIssuePaneMsg added in v1.2.0

type OpenIssuePaneMsg struct{ Issue string }

OpenIssuePaneMsg opens an issue id in an issue pane.

type OpenNotesPreferencesMsg added in v1.2.0

type OpenNotesPreferencesMsg struct{}

OpenNotesPreferencesMsg asks the host to open the one existing Notes enablement control and focus it. It is separate from the generic page route so a setup dialog does not need to know Configuration's private control ID.

type OpenPrefilledShellMsg added in v1.0.0

type OpenPrefilledShellMsg struct {
	Command string
}

OpenPrefilledShellMsg asks the Workspaces plugin for an ordinary new shell with a command typed into it and left unexecuted. Hosts send this rather than importing workspace.

Nothing about it is privileged: it is the same shell the user could create by hand, and the command sits at the prompt until the user reads it and presses Enter. Sidecar never runs it, and never sends one that needs sudo.

type OpenResourcePaneMsg added in v1.2.0

type OpenResourcePaneMsg struct{ Provider, Matcher, Locator, Collection, Query, Filters string }

OpenResourcePaneMsg opens one of a Resource leaf's three tab shapes.

With Collection empty it is a matched locator: Matcher may be empty, and the host's live matcher snapshot then decides which matcher claims the locator, refusing out loud when none does. With Collection set it is a plugin tab — the collection's list when Locator is empty, and that row's document when it is not — and no matcher is consulted, because a plugin row is addressed by its collection and ID. Filters is a collection tab's applied filter set in resource.EncodeFilters form, which keeps the message a comparable value.

type Option added in v1.0.0

type Option func(*Model)

Option adjusts the model at construction. Options exist for the deliberate, caller-supplied startup choices — where Configuration opens, so far — and are deliberately not a general settings channel: everything else comes from the config file the app was handed.

func WithNotificationDelivery added in v1.11.0

func WithNotificationDelivery(delivery notifydelivery.Coordinator) Option

WithNotificationDelivery injects a coordinator for focused app tests and alternate hosts. Production uses the lazy platform coordinator.

func WithPluginDescriptors added in v1.14.0

func WithPluginDescriptors(descriptors []plugin.Descriptor) Option

WithPluginDescriptors hands the shell the full plugin catalog, which it passes to the settings page. It is an option rather than a parameter because internal/app cannot import internal/plugins/assembly — the plugin packages import this one — so the catalog arrives from the process that owns both. Without it the shell still hosts the global plugins it knows about; only the settings page's loop is empty.

func WithStartupConfigPage added in v1.0.0

func WithStartupConfigPage(page configui.PageID) Option

WithStartupConfigPage opens Configuration on a destination as soon as the app starts. `sidecar setup` is the only caller today; an unknown page falls back to Configuration's own default rather than failing the launch.

type PluginFocusedMsg

type PluginFocusedMsg = plugin.PluginFocusedMsg

PluginFocusedMsg is sent to a plugin when it becomes the active plugin. Plugins can use this to refresh data or update their state on focus. Re-exported from plugin package for backward compatibility.

type RGB

type RGB struct {
	R, G, B float64
}

type RefreshMsg

type RefreshMsg struct{}

RefreshMsg triggers a full refresh.

type ResourceProvidersDescribedMsg added in v1.0.3

type ResourceProvidersDescribedMsg struct {
	Statuses []pluginhost.Status
	// SnapshotError is the error from a refused snapshot replacement, if any.
	// The previous snapshot stays live when this is set.
	SnapshotError error
}

ResourceProvidersDescribedMsg reports the outcome of a describe pass. In M0 it is diagnostics only: nothing in the TUI changes shape because of it.

type SessionRestoredMsg added in v1.11.0

type SessionRestoredMsg struct {
	Result sessionrestore.Result
	// Pending are the conversations that could be resumed and are waiting on the
	// user. They are named in the summary rather than acted on.
	Pending []sessionrestore.Step
	Err     error
}

SessionRestoredMsg reports a completed automatic restore.

type SwitchToMainWorktreeMsg

type SwitchToMainWorktreeMsg struct {
	MainWorktreePath string // Path to the main worktree to switch to
}

SwitchToMainWorktreeMsg requests switching to the main worktree. Sent when the current WorkDir (a worktree) has been deleted and sidecar should gracefully switch to the main repository.

type SwitchWorktreeMsg

type SwitchWorktreeMsg struct {
	WorktreePath string // Absolute path to the worktree
}

SwitchWorktreeMsg requests switching to a different worktree. Used by the worktree switcher modal and workspace plugin "Open in Git Tab" command.

type TabBounds

type TabBounds struct {
	Start, End int
	Tab        tabRef
}

TabBounds represents the X position range of a tab for mouse hit testing. The tab is identified by its typed reference, not by a bare index, so a hit region can only ever activate a tab of the scope that painted it.

type TaggedTickMsg

type TaggedTickMsg struct {
	Time time.Time
	Tag  string
}

TaggedTickMsg is a tick with an identifying tag.

type ThemeChangedMsg added in v1.0.3

type ThemeChangedMsg = msg.ThemeChangedMsg

ThemeChangedMsg is re-exported from msg package for backward compatibility.

type TickMsg

type TickMsg time.Time

TickMsg is sent on each clock tick.

type ToastMsg

type ToastMsg = msg.ToastMsg

ToastMsg is re-exported from msg package for backward compatibility.

type UIState

type UIState struct {
	Clock       time.Time
	LastRefresh time.Time
	WorkDir     string
	ProjectRoot string // Main repo root for shared state (same as WorkDir for non-worktrees)
}

UIState holds header/footer state information.

func NewUIState

func NewUIState() *UIState

NewUIState creates a new UI state.

func (*UIState) MarkRefresh

func (u *UIState) MarkRefresh()

MarkRefresh updates the last refresh timestamp.

func (*UIState) UpdateClock

func (u *UIState) UpdateClock()

UpdateClock updates the current clock time.

type UpdateBatchReadyMsg added in v0.96.0

type UpdateBatchReadyMsg struct {
	PlanID int
}

UpdateBatchReadyMsg signals that package-manager metadata was refreshed and the confirmed batch may start installing.

type UpdateElapsedTickMsg

type UpdateElapsedTickMsg struct{}

UpdateElapsedTickMsg triggers elapsed time update during update.

type UpdateModalState

type UpdateModalState int

UpdateModalState represents the current state of the update modal.

const (
	UpdateModalClosed   UpdateModalState = iota // Modal not visible
	UpdateModalPreview                          // Show release notes before update
	UpdateModalProgress                         // Show multi-phase progress during update
	UpdateModalComplete                         // Show completion message
	UpdateModalError                            // Show error details
)

type UpdateTargetResultMsg added in v0.96.0

type UpdateTargetResultMsg struct {
	PlanID int
	Index  int
	Result version.Result
}

UpdateTargetResultMsg carries the settled result of one target in a batch.

type WorktreeDeletedMsg

type WorktreeDeletedMsg struct {
	DeletedPath string // Path of the deleted worktree
	MainPath    string // Path to switch to (main worktree)
}

WorktreeDeletedMsg is sent when the current worktree has been deleted.

type WorktreeInfo

type WorktreeInfo struct {
	Path   string // Absolute path to the worktree
	Branch string // Branch name (e.g., "feature-auth")
	IsMain bool   // True if this is the main worktree
}

WorktreeInfo contains information about a git worktree.

func GetWorktrees

func GetWorktrees(workDir string) []WorktreeInfo

GetWorktrees returns all worktrees for the repository containing workDir. Returns nil if workDir is not in a git repository.

Jump to

Keyboard shortcuts

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