Documentation
¶
Overview ¶
Package sidebar implements the sidebar pane: the workspace file tree plus an embedded tmux-backed terminal with its own PTY I/O and text selection.
Index ¶
- type AheadBehindLoaded
- type BranchChangesLoaded
- type DetachedTerminalTabInfo
- type Model
- func (m *Model) Blur()
- func (m *Model) FilterActive() bool
- func (m *Model) Focus()
- func (m *Model) Focused() bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetGitStatus(status *git.StatusResult)
- func (m *Model) SetShowKeymapHints(show bool)
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetStyles(styles common.Styles)
- func (m *Model) SetWorkspace(ws *data.Workspace) tea.Cmd
- func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd)
- func (m *Model) View() string
- type OpenFileInEditor
- type ProjectTree
- func (m *ProjectTree) Blur()
- func (m *ProjectTree) Focus()
- func (m *ProjectTree) Focused() bool
- func (m *ProjectTree) Init() tea.Cmd
- func (m *ProjectTree) SetShowKeymapHints(show bool)
- func (m *ProjectTree) SetSize(width, height int)
- func (m *ProjectTree) SetStyles(styles common.Styles)
- func (m *ProjectTree) SetWorkspace(ws *data.Workspace)
- func (m *ProjectTree) Update(msg tea.Msg) (*ProjectTree, tea.Cmd)
- func (m *ProjectTree) View() string
- type ProjectTreeNode
- type SessionAttachInfo
- type SidebarSelectionScrollTick
- type SidebarTab
- type SidebarTerminalCreateFailed
- type SidebarTerminalCreated
- type SidebarTerminalReattachFailed
- type SidebarTerminalReattachResult
- type TabbedSidebar
- func (m *TabbedSidebar) ActiveTab() SidebarTab
- func (m *TabbedSidebar) Blur()
- func (m *TabbedSidebar) CanConsumeWheel() bool
- func (m *TabbedSidebar) Changes() *Model
- func (m *TabbedSidebar) ContentView() string
- func (m *TabbedSidebar) Focus()
- func (m *TabbedSidebar) Focused() bool
- func (m *TabbedSidebar) Init() tea.Cmd
- func (m *TabbedSidebar) NextTab()
- func (m *TabbedSidebar) PrevTab()
- func (m *TabbedSidebar) ProjectTree() *ProjectTree
- func (m *TabbedSidebar) RefreshAheadBehind() tea.Cmd
- func (m *TabbedSidebar) SetActiveTab(tab SidebarTab)
- func (m *TabbedSidebar) SetGitStatus(status *git.StatusResult)
- func (m *TabbedSidebar) SetShowKeymapHints(show bool)
- func (m *TabbedSidebar) SetSize(width, height int)
- func (m *TabbedSidebar) SetStyles(styles common.Styles)
- func (m *TabbedSidebar) SetWorkspace(ws *data.Workspace) tea.Cmd
- func (m *TabbedSidebar) TabBarBuildCount() uint64
- func (m *TabbedSidebar) TabBarVersion() uint64
- func (m *TabbedSidebar) TabBarView() string
- func (m *TabbedSidebar) Update(msg tea.Msg) (*TabbedSidebar, tea.Cmd)
- func (m *TabbedSidebar) View() string
- type TerminalModel
- func (m *TerminalModel) AddTabsFromSessionInfos(ws *data.Workspace, sessions []SessionAttachInfo) []tea.Cmd
- func (m *TerminalModel) AddTabsFromSessions(ws *data.Workspace, sessions []string) []tea.Cmd
- func (m *TerminalModel) AddTerminalForHarness(ws *data.Workspace)
- func (m *TerminalModel) Blur()
- func (m *TerminalModel) CanConsumeWheel() bool
- func (m *TerminalModel) CloseActiveTab() tea.Cmd
- func (m *TerminalModel) CloseAll()
- func (m *TerminalModel) CloseTerminal(wsID string)
- func (m *TerminalModel) CreateNewTab() tea.Cmd
- func (m *TerminalModel) DetachActiveTab() tea.Cmd
- func (m *TerminalModel) EnforceAttachedTerminalTabLimit(maxAttached int) []DetachedTerminalTabInfo
- func (m *TerminalModel) EnsureTerminalTab() tea.Cmd
- func (m *TerminalModel) Focus()
- func (m *TerminalModel) Focused() bool
- func (m *TerminalModel) HandleTerminalCreated(wsID string, tabID TerminalTabID, term *pty.Terminal, sessionName string) tea.Cmd
- func (m *TerminalModel) HasMultipleTabs() bool
- func (m *TerminalModel) HelpLines(width int) []string
- func (m *TerminalModel) Init() tea.Cmd
- func (m *TerminalModel) NextTab()
- func (m *TerminalModel) PrevTab()
- func (m *TerminalModel) ReattachActiveTab() tea.Cmd
- func (m *TerminalModel) RebindWorkspaceID(previous, current *data.Workspace) tea.Cmd
- func (m *TerminalModel) RestartActiveTab() tea.Cmd
- func (m *TerminalModel) SelectTab(idx int)
- func (m *TerminalModel) SendToTerminal(s string)
- func (m *TerminalModel) SetInstanceID(id string)
- func (m *TerminalModel) SetMsgSink(sink func(tea.Msg))
- func (m *TerminalModel) SetOffset(x, y int)
- func (m *TerminalModel) SetShowKeymapHints(show bool)
- func (m *TerminalModel) SetSize(width, height int)
- func (m *TerminalModel) SetStyles(styles common.Styles)
- func (m *TerminalModel) SetTmuxOptions(opts tmux.Options)
- func (m *TerminalModel) SetWorkspace(ws *data.Workspace) tea.Cmd
- func (m *TerminalModel) SetWorkspacePreview(ws *data.Workspace)
- func (m *TerminalModel) StartPTYReaders() tea.Cmd
- func (m *TerminalModel) StatusLine() string
- func (m *TerminalModel) TabBarView() string
- func (m *TerminalModel) TerminalLayer() *compositor.VTermLayer
- func (m *TerminalModel) TerminalLayerWithCursorOwner(cursorOwner bool) *compositor.VTermLayer
- func (m *TerminalModel) TerminalOrigin() (int, int)
- func (m *TerminalModel) TerminalSize() (int, int)
- func (m *TerminalModel) Update(msg tea.Msg) (*TerminalModel, tea.Cmd)
- func (m *TerminalModel) View() string
- func (m *TerminalModel) WriteToTerminal(data []byte)
- type TerminalState
- type TerminalTab
- type TerminalTabID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AheadBehindLoaded ¶ added in v0.0.20
AheadBehindLoaded carries the result of an async AheadBehind fetch, triggered on workspace switch, manual refresh ("g"), and after a commit.
type BranchChangesLoaded ¶ added in v0.0.20
BranchChangesLoaded carries the result of an async BranchChangesVsBase fetch triggered by toggling branch mode on. It is routed back into the sidebar explicitly by internal/app (see app_input.go), since Bubbletea has no generic message broadcast.
type DetachedTerminalTabInfo ¶ added in v0.0.20
type DetachedTerminalTabInfo struct {
WorkspaceID string
TabID TerminalTabID
}
DetachedTerminalTabInfo identifies a terminal tab detached by automatic limit enforcement.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubbletea model for the sidebar pane (rendering lives in model_view.go, input in model_input.go; branch-mode fetch/render helpers live in branch.go).
func (*Model) FilterActive ¶ added in v0.0.20
FilterActive reports whether the Changes view is currently in filter-input mode (used so the tab bar doesn't steal digit keys meant for the filter).
func (*Model) SetGitStatus ¶
func (m *Model) SetGitStatus(status *git.StatusResult)
SetGitStatus sets the git status.
func (*Model) SetShowKeymapHints ¶
SetShowKeymapHints controls whether helper text is rendered.
func (*Model) SetWorkspace ¶ added in v0.0.5
SetWorkspace sets the active workspace. It returns a command that fetches the ahead/behind badge for the new workspace (nil when ws is nil or this is just a pointer rebind of the same workspace).
type OpenFileInEditor ¶ added in v0.0.4
OpenFileInEditor is a message to open a file in the editor
type ProjectTree ¶ added in v0.0.4
type ProjectTree struct {
// contains filtered or unexported fields
}
ProjectTree is a nerdtree-like file browser
func NewProjectTree ¶ added in v0.0.4
func NewProjectTree() *ProjectTree
NewProjectTree creates a new project tree model
func (*ProjectTree) Focus ¶ added in v0.0.4
func (m *ProjectTree) Focus()
Focus sets the focus state
func (*ProjectTree) Focused ¶ added in v0.0.4
func (m *ProjectTree) Focused() bool
Focused returns whether the tree is focused
func (*ProjectTree) Init ¶ added in v0.0.4
func (m *ProjectTree) Init() tea.Cmd
Init initializes the project tree
func (*ProjectTree) SetShowKeymapHints ¶ added in v0.0.4
func (m *ProjectTree) SetShowKeymapHints(show bool)
SetShowKeymapHints controls whether helper text is rendered.
func (*ProjectTree) SetSize ¶ added in v0.0.4
func (m *ProjectTree) SetSize(width, height int)
SetSize sets the project tree size
func (*ProjectTree) SetStyles ¶ added in v0.0.4
func (m *ProjectTree) SetStyles(styles common.Styles)
SetStyles updates the component's styles (for theme changes).
func (*ProjectTree) SetWorkspace ¶ added in v0.0.5
func (m *ProjectTree) SetWorkspace(ws *data.Workspace)
SetWorkspace sets the active workspace
func (*ProjectTree) Update ¶ added in v0.0.4
func (m *ProjectTree) Update(msg tea.Msg) (*ProjectTree, tea.Cmd)
Update handles messages
func (*ProjectTree) View ¶ added in v0.0.4
func (m *ProjectTree) View() string
View renders the project tree
type ProjectTreeNode ¶ added in v0.0.4
type ProjectTreeNode struct {
Name string
Path string
IsDir bool
Expanded bool
Depth int
Children []*ProjectTreeNode
Parent *ProjectTreeNode
}
ProjectTreeNode represents a file or directory in the tree
type SessionAttachInfo ¶ added in v0.0.9
type SidebarSelectionScrollTick ¶ added in v0.0.10
type SidebarSelectionScrollTick struct {
WorkspaceID string
TabID TerminalTabID
Gen uint64
Seq uint64
}
SidebarSelectionScrollTick is sent by the tick loop to continue auto-scrolling during mouse-drag selection past viewport edges.
type SidebarTab ¶ added in v0.0.4
type SidebarTab int
SidebarTab represents a tab type in the sidebar
const ( TabChanges SidebarTab = iota TabProject )
type SidebarTerminalCreateFailed ¶ added in v0.0.5
SidebarTerminalCreateFailed is a message for terminal creation failure
type SidebarTerminalCreated ¶
type SidebarTerminalCreated struct {
WorkspaceID string
TabID TerminalTabID
Terminal *pty.Terminal
SessionName string
CaptureCols int
CaptureRows int
ptyio.SessionRestoreCapture
}
SidebarTerminalCreated is a message for terminal creation
type SidebarTerminalReattachFailed ¶ added in v0.0.9
type SidebarTerminalReattachFailed struct {
WorkspaceID string
TabID TerminalTabID
Err error
Stopped bool
Action string
}
type SidebarTerminalReattachResult ¶ added in v0.0.9
type SidebarTerminalReattachResult struct {
WorkspaceID string
TabID TerminalTabID
Terminal *pty.Terminal
SessionName string
CaptureCols int
CaptureRows int
ptyio.SessionRestoreCapture
}
type TabbedSidebar ¶ added in v0.0.4
type TabbedSidebar struct {
// contains filtered or unexported fields
}
TabbedSidebar wraps the Changes and Project views with tabs
func NewTabbedSidebar ¶ added in v0.0.4
func NewTabbedSidebar() *TabbedSidebar
NewTabbedSidebar creates a new tabbed sidebar
func (*TabbedSidebar) ActiveTab ¶ added in v0.0.4
func (m *TabbedSidebar) ActiveTab() SidebarTab
ActiveTab returns the currently active tab
func (*TabbedSidebar) CanConsumeWheel ¶ added in v0.0.18
func (m *TabbedSidebar) CanConsumeWheel() bool
CanConsumeWheel reports whether the active sidebar tab has meaningful wheel scroll content. This avoids hover-wheel focus steals from empty panes.
func (*TabbedSidebar) Changes ¶ added in v0.0.4
func (m *TabbedSidebar) Changes() *Model
Changes returns the changes model (for direct access if needed)
func (*TabbedSidebar) ContentView ¶ added in v0.0.4
func (m *TabbedSidebar) ContentView() string
ContentView returns only the content view without tab bar (for compositor)
func (*TabbedSidebar) Focus ¶ added in v0.0.4
func (m *TabbedSidebar) Focus()
Focus sets the focus state
func (*TabbedSidebar) Focused ¶ added in v0.0.4
func (m *TabbedSidebar) Focused() bool
Focused returns whether the sidebar is focused
func (*TabbedSidebar) Init ¶ added in v0.0.4
func (m *TabbedSidebar) Init() tea.Cmd
Init initializes the tabbed sidebar
func (*TabbedSidebar) NextTab ¶ added in v0.0.4
func (m *TabbedSidebar) NextTab()
NextTab switches to the next tab (circular)
func (*TabbedSidebar) PrevTab ¶ added in v0.0.4
func (m *TabbedSidebar) PrevTab()
PrevTab switches to the previous tab (circular)
func (*TabbedSidebar) ProjectTree ¶ added in v0.0.4
func (m *TabbedSidebar) ProjectTree() *ProjectTree
ProjectTree returns the project tree model (for direct access if needed)
func (*TabbedSidebar) RefreshAheadBehind ¶ added in v0.0.20
func (m *TabbedSidebar) RefreshAheadBehind() tea.Cmd
RefreshAheadBehind re-fetches the ahead/behind badge for the active workspace (e.g. after a commit changes HEAD's distance from base).
func (*TabbedSidebar) SetActiveTab ¶ added in v0.0.4
func (m *TabbedSidebar) SetActiveTab(tab SidebarTab)
SetActiveTab sets the active tab
func (*TabbedSidebar) SetGitStatus ¶ added in v0.0.4
func (m *TabbedSidebar) SetGitStatus(status *git.StatusResult)
SetGitStatus sets the git status (forwards to changes view)
func (*TabbedSidebar) SetShowKeymapHints ¶ added in v0.0.4
func (m *TabbedSidebar) SetShowKeymapHints(show bool)
SetShowKeymapHints controls whether helper text is rendered.
func (*TabbedSidebar) SetSize ¶ added in v0.0.4
func (m *TabbedSidebar) SetSize(width, height int)
SetSize sets the sidebar size
func (*TabbedSidebar) SetStyles ¶ added in v0.0.4
func (m *TabbedSidebar) SetStyles(styles common.Styles)
SetStyles updates the component's styles (for theme changes).
func (*TabbedSidebar) SetWorkspace ¶ added in v0.0.5
func (m *TabbedSidebar) SetWorkspace(ws *data.Workspace) tea.Cmd
SetWorkspace sets the active workspace. It returns the Changes view's ahead/behind refresh command (nil for a no-op rebind); see Model.SetWorkspace.
func (*TabbedSidebar) TabBarBuildCount ¶ added in v0.0.20
func (m *TabbedSidebar) TabBarBuildCount() uint64
TabBarBuildCount reports how many times TabBarView has been invoked. Test instrumentation for the compose-time skip gate; not for production use.
func (*TabbedSidebar) TabBarVersion ¶ added in v0.0.20
func (m *TabbedSidebar) TabBarVersion() uint64
TabBarVersion returns the monotonic version of the inputs to TabBarView. The compose layer in internal/app skips rebuilding the tab bar string while this version and the compose geometry are unchanged.
func (*TabbedSidebar) TabBarView ¶ added in v0.0.4
func (m *TabbedSidebar) TabBarView() string
TabBarView returns only the tab bar view (for compositor)
func (*TabbedSidebar) Update ¶ added in v0.0.4
func (m *TabbedSidebar) Update(msg tea.Msg) (*TabbedSidebar, tea.Cmd)
Update handles messages
func (*TabbedSidebar) View ¶ added in v0.0.4
func (m *TabbedSidebar) View() string
View renders the tabbed sidebar
type TerminalModel ¶
type TerminalModel struct {
// contains filtered or unexported fields
}
TerminalModel is the Bubbletea model for the sidebar terminal section
func NewTerminalModel ¶
func NewTerminalModel() *TerminalModel
NewTerminalModel creates a new sidebar terminal model
func (*TerminalModel) AddTabsFromSessionInfos ¶ added in v0.0.9
func (m *TerminalModel) AddTabsFromSessionInfos(ws *data.Workspace, sessions []SessionAttachInfo) []tea.Cmd
AddTabsFromSessionInfos ensures tabs exist for the provided tmux sessions, optionally attaching.
func (*TerminalModel) AddTabsFromSessions ¶ added in v0.0.9
AddTabsFromSessions ensures tabs exist for the provided tmux session names.
func (*TerminalModel) AddTerminalForHarness ¶
func (m *TerminalModel) AddTerminalForHarness(ws *data.Workspace)
AddTerminalForHarness creates a terminal state without a PTY for benchmarks/tests.
func (*TerminalModel) CanConsumeWheel ¶ added in v0.0.18
func (m *TerminalModel) CanConsumeWheel() bool
CanConsumeWheel reports whether the active terminal has scrollback to view.
func (*TerminalModel) CloseActiveTab ¶ added in v0.0.4
func (m *TerminalModel) CloseActiveTab() tea.Cmd
CloseActiveTab closes the active terminal tab
func (*TerminalModel) CloseTerminal ¶
func (m *TerminalModel) CloseTerminal(wsID string)
CloseTerminal closes all terminal tabs for the given workspace
func (*TerminalModel) CreateNewTab ¶ added in v0.0.4
func (m *TerminalModel) CreateNewTab() tea.Cmd
CreateNewTab creates a new terminal tab for the current workspace and returns a command
func (*TerminalModel) DetachActiveTab ¶ added in v0.0.9
func (m *TerminalModel) DetachActiveTab() tea.Cmd
DetachActiveTab closes the PTY client but keeps the tmux session alive.
func (*TerminalModel) EnforceAttachedTerminalTabLimit ¶ added in v0.0.20
func (m *TerminalModel) EnforceAttachedTerminalTabLimit(maxAttached int) []DetachedTerminalTabInfo
EnforceAttachedTerminalTabLimit detaches least-recently-used sidebar terminal PTYs when the number of attached terminals exceeds maxAttached.
Tabs of the currently selected workspace are never auto-detached: sidebar session discovery re-attaches the active workspace's terminals on its periodic scan, so detaching them would thrash. Auto-detached sessions stay alive in tmux (UserDetached remains false) and are re-attached transparently by discovery when their workspace is selected again.
A tab's recency is the later of its workspace's last selection and its own last PTY output, so a background terminal still streaming (e.g. a build) outranks one sitting at an idle prompt.
func (*TerminalModel) EnsureTerminalTab ¶ added in v0.0.5
func (m *TerminalModel) EnsureTerminalTab() tea.Cmd
EnsureTerminalTab creates a terminal tab if none exists for the current workspace. Used for lazy initialization when the terminal pane is focused.
func (*TerminalModel) Focused ¶
func (m *TerminalModel) Focused() bool
Focused returns whether the terminal is focused
func (*TerminalModel) HandleTerminalCreated ¶
func (m *TerminalModel) HandleTerminalCreated(wsID string, tabID TerminalTabID, term *pty.Terminal, sessionName string) tea.Cmd
HandleTerminalCreated handles the terminal tab creation message
func (*TerminalModel) HasMultipleTabs ¶ added in v0.0.4
func (m *TerminalModel) HasMultipleTabs() bool
HasMultipleTabs returns true if there are multiple tabs for the current workspace
func (*TerminalModel) HelpLines ¶
func (m *TerminalModel) HelpLines(width int) []string
HelpLines returns the help lines for the given width, respecting visibility and height.
func (*TerminalModel) Init ¶
func (m *TerminalModel) Init() tea.Cmd
Init initializes the terminal model
func (*TerminalModel) NextTab ¶ added in v0.0.4
func (m *TerminalModel) NextTab()
NextTab switches to the next terminal tab (circular)
func (*TerminalModel) PrevTab ¶ added in v0.0.4
func (m *TerminalModel) PrevTab()
PrevTab switches to the previous terminal tab (circular)
func (*TerminalModel) ReattachActiveTab ¶ added in v0.0.9
func (m *TerminalModel) ReattachActiveTab() tea.Cmd
ReattachActiveTab reattaches to a detached tmux session for the active terminal tab.
func (*TerminalModel) RebindWorkspaceID ¶ added in v0.0.14
func (m *TerminalModel) RebindWorkspaceID(previous, current *data.Workspace) tea.Cmd
RebindWorkspaceID migrates terminal tabs from a previous workspace ID to a new one. This preserves running/session-backed terminal tabs across workspace ID rewrites.
func (*TerminalModel) RestartActiveTab ¶ added in v0.0.9
func (m *TerminalModel) RestartActiveTab() tea.Cmd
RestartActiveTab starts a fresh tmux session for the active terminal tab.
func (*TerminalModel) SelectTab ¶ added in v0.0.4
func (m *TerminalModel) SelectTab(idx int)
SelectTab selects a tab by index
func (*TerminalModel) SendToTerminal ¶
func (m *TerminalModel) SendToTerminal(s string)
SendToTerminal sends a string directly to the current terminal
func (*TerminalModel) SetInstanceID ¶ added in v0.0.9
func (m *TerminalModel) SetInstanceID(id string)
SetInstanceID sets the tmux instance tag for sessions created by this model.
func (*TerminalModel) SetMsgSink ¶ added in v0.0.4
func (m *TerminalModel) SetMsgSink(sink func(tea.Msg))
SetMsgSink sets a callback for PTY messages.
func (*TerminalModel) SetOffset ¶
func (m *TerminalModel) SetOffset(x, y int)
SetOffset sets the absolute screen coordinates where the terminal starts
func (*TerminalModel) SetShowKeymapHints ¶
func (m *TerminalModel) SetShowKeymapHints(show bool)
SetShowKeymapHints controls whether helper text is rendered.
func (*TerminalModel) SetSize ¶
func (m *TerminalModel) SetSize(width, height int)
SetSize sets the terminal section size
func (*TerminalModel) SetStyles ¶
func (m *TerminalModel) SetStyles(styles common.Styles)
SetStyles updates the component's styles (for theme changes).
func (*TerminalModel) SetTmuxOptions ¶ added in v0.0.20
func (m *TerminalModel) SetTmuxOptions(opts tmux.Options)
SetTmuxOptions stores the resolved tmux options for this model.
func (*TerminalModel) SetWorkspace ¶ added in v0.0.5
func (m *TerminalModel) SetWorkspace(ws *data.Workspace) tea.Cmd
SetWorkspace sets the active workspace and creates terminal tab if needed
func (*TerminalModel) SetWorkspacePreview ¶ added in v0.0.5
func (m *TerminalModel) SetWorkspacePreview(ws *data.Workspace)
SetWorkspacePreview sets the active workspace without creating tabs.
func (*TerminalModel) StartPTYReaders ¶ added in v0.0.5
func (m *TerminalModel) StartPTYReaders() tea.Cmd
StartPTYReaders ensures PTY readers are running for all tabs.
func (*TerminalModel) StatusLine ¶
func (m *TerminalModel) StatusLine() string
StatusLine returns the status line for the active terminal.
func (*TerminalModel) TabBarView ¶ added in v0.0.4
func (m *TerminalModel) TabBarView() string
TabBarView returns the rendered tab bar string.
func (*TerminalModel) TerminalLayer ¶
func (m *TerminalModel) TerminalLayer() *compositor.VTermLayer
TerminalLayer returns a VTermLayer for the active workspace terminal.
func (*TerminalModel) TerminalLayerWithCursorOwner ¶ added in v0.0.16
func (m *TerminalModel) TerminalLayerWithCursorOwner(cursorOwner bool) *compositor.VTermLayer
TerminalLayerWithCursorOwner returns a VTermLayer for the active workspace terminal while enforcing whether this pane currently owns cursor rendering.
func (*TerminalModel) TerminalOrigin ¶
func (m *TerminalModel) TerminalOrigin() (int, int)
TerminalOrigin returns the absolute origin for terminal rendering.
func (*TerminalModel) TerminalSize ¶
func (m *TerminalModel) TerminalSize() (int, int)
TerminalSize returns the terminal render size.
func (*TerminalModel) Update ¶
func (m *TerminalModel) Update(msg tea.Msg) (*TerminalModel, tea.Cmd)
func (*TerminalModel) View ¶
func (m *TerminalModel) View() string
View renders the terminal section
func (*TerminalModel) WriteToTerminal ¶
func (m *TerminalModel) WriteToTerminal(data []byte)
WriteToTerminal writes bytes to the active terminal while holding the lock.
type TerminalState ¶
type TerminalState struct {
Terminal *pty.Terminal
VTerm *vterm.VTerm
Running bool
Detached bool
UserDetached bool
SessionName string
// ptyio.State holds the shared PTY buffering/reader/restart/snapshot
// bookkeeping (locking owned by mu, as documented on the type).
ptyio.State
// Selection state
Selection common.SelectionState
// contains filtered or unexported fields
}
TerminalState holds the terminal state for a workspace
type TerminalTab ¶ added in v0.0.4
type TerminalTab struct {
ID TerminalTabID
Name string // "Terminal 1", "Terminal 2", etc.
State *TerminalState
}
TerminalTab represents a single terminal tab
type TerminalTabID ¶ added in v0.0.4
type TerminalTabID string
TerminalTabID is a unique identifier for a terminal tab
Source Files
¶
- branch.go
- doc.go
- model.go
- model_input.go
- model_lifecycle.go
- model_view.go
- project_tree.go
- project_tree_view.go
- tabs.go
- terminal.go
- terminal_pty_attach.go
- terminal_pty_config.go
- terminal_pty_lifecycle.go
- terminal_pty_reader.go
- terminal_pty_session_tags.go
- terminal_render.go
- terminal_selection.go
- terminal_sessions.go
- terminal_tab_ops.go
- terminal_tabs_limit.go
- terminal_update.go
- terminal_update_pty.go
- terminal_update_session.go
- terminal_workspace_rebind.go
- wheel.go
- workspace_identity.go