Documentation
¶
Index ¶
- type Model
- func (m *Model) Blur()
- 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)
- 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 SelectionState
- 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) 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) 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)
- 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) 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) 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) 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) SetTmuxConfig(serverName, configPath string)
- 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) 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 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).
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.
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 SelectionState ¶
type SelectionState struct {
Active bool
StartX int
StartLine int // Absolute line number (0 = first scrollback line)
EndX int
EndLine int // Absolute line number
}
SelectionState tracks mouse selection state
type SessionAttachInfo ¶ added in v0.0.9
type SidebarSelectionScrollTick ¶ added in v0.0.10
type SidebarSelectionScrollTick struct {
WorkspaceID string
TabID TerminalTabID
Gen 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
Scrollback []byte
}
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 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) 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) 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)
SetWorkspace sets the active workspace
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) 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) 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) 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) SetTmuxConfig ¶ added in v0.0.9
func (m *TerminalModel) SetTmuxConfig(serverName, configPath string)
SetTmuxConfig updates the tmux configuration.
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) 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
SessionName string
// Selection state
Selection 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