Documentation
¶
Index ¶
- Variables
- func FormatCaptures(captures []PaneCapture, lines int) string
- type Client
- func (c *Client) Capture(ctx context.Context, paneID string, lines int) (string, error)
- func (c *Client) Detect(ctx context.Context) (*Environment, error)
- func (c *Client) Focus(ctx context.Context, paneID string) error
- func (c *Client) KillPane(ctx context.Context, paneID string) error
- func (c *Client) ListPaneIDs(ctx context.Context) (map[string]struct{}, error)
- func (c *Client) PaneExists(ctx context.Context, paneID string) bool
- func (c *Client) Popup(ctx context.Context, req PopupRequest) error
- func (c *Client) Split(ctx context.Context, req SplitRequest) (*Pane, error)
- type Environment
- type LayoutPane
- type Manager
- func (m *Manager) Capture(ctx context.Context, paneID string, lines int) (string, error)
- func (m *Manager) CaptureAll(ctx context.Context, lines int) []PaneCapture
- func (m *Manager) Client() *Client
- func (m *Manager) Close(ctx context.Context, paneID string) error
- func (m *Manager) Count() int
- func (m *Manager) DeleteLayout(name string) bool
- func (m *Manager) Detect(ctx context.Context) (*Environment, error)
- func (m *Manager) Focus(ctx context.Context, paneID string) error
- func (m *Manager) HasPanes() bool
- func (m *Manager) Layout(name string) []LayoutPane
- func (m *Manager) List() []Pane
- func (m *Manager) ListLayoutNames() []string
- func (m *Manager) ListLayouts() map[string][]LayoutPane
- func (m *Manager) Load() error
- func (m *Manager) ManagedPaneText() string
- func (m *Manager) MarkAlive(paneID string, alive bool)
- func (m *Manager) Popup(ctx context.Context, req PopupRequest) error
- func (m *Manager) Prune(selector string) int
- func (m *Manager) Refresh(ctx context.Context) (int, int, error)
- func (m *Manager) RenameLayout(oldName, newName string) error
- func (m *Manager) RerunPane(ctx context.Context, selector string) (*RerunResult, error)
- func (m *Manager) ResolvePaneSelector(selector string) (Pane, bool)
- func (m *Manager) Restore(ctx context.Context, selector string) ([]RestoreResult, error)
- func (m *Manager) Save() error
- func (m *Manager) SaveLayout(name string) error
- func (m *Manager) SetupLayout(ctx context.Context, name string) ([]Pane, error)
- func (m *Manager) Split(ctx context.Context, req SplitRequest) (*Pane, error)
- func (m *Manager) StopPane(ctx context.Context, selector string) (Pane, error)
- func (m *Manager) UpdateAliveState(aliveIDs map[string]struct{}) (int, int)
- func (m *Manager) Workspace() string
- type Pane
- type PaneCapture
- type PopupRequest
- type RerunResult
- type RestoreResult
- type SplitRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAlivePanes = errors.New("no alive tmux panes to save")
Functions ¶
func FormatCaptures ¶
func FormatCaptures(captures []PaneCapture, lines int) string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps tmux CLI operations. Use exec.Command args directly; do not shell-quote tmux args.
func (*Client) ListPaneIDs ¶
type Environment ¶
type Environment struct {
Available bool
InTmux bool
Version string
Session string
Window string
WindowID string
PaneID string
PaneIndex string
ClientTTY string
}
Environment describes the current tmux attachment.
func (*Environment) Label ¶
func (e *Environment) Label() string
type LayoutPane ¶
type LayoutPane struct {
Purpose string `json:"purpose"`
Command string `json:"command"`
Horizontal bool `json:"horizontal"`
Size string `json:"size"`
}
func InferDefaultLayout ¶
func InferDefaultLayout(workspace string) []LayoutPane
InferDefaultLayout returns a reasonable first-run layout for a workspace. It is intentionally conservative and only uses local project files.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager tracks tmux panes created by ggcode for a workspace.
func NewManager ¶
func NewManagerWithStorePath ¶
func SharedManager ¶
SharedManager returns the process-wide tmux pane manager for a workspace. TUI commands and LLM tools use this so they see the same managed panes.
func (*Manager) CaptureAll ¶
func (m *Manager) CaptureAll(ctx context.Context, lines int) []PaneCapture
func (*Manager) DeleteLayout ¶
func (*Manager) Layout ¶
func (m *Manager) Layout(name string) []LayoutPane
func (*Manager) ListLayoutNames ¶
func (*Manager) ListLayouts ¶
func (m *Manager) ListLayouts() map[string][]LayoutPane
func (*Manager) ManagedPaneText ¶
func (*Manager) RenameLayout ¶
func (*Manager) ResolvePaneSelector ¶
func (*Manager) SaveLayout ¶
func (*Manager) SetupLayout ¶
func (*Manager) UpdateAliveState ¶
type Pane ¶
type Pane struct {
ID string `json:"id"`
Purpose string `json:"purpose"`
Command string `json:"command"`
Workspace string `json:"workspace"`
Alive bool `json:"alive"`
Horizontal bool `json:"horizontal"`
Size string `json:"size"`
CreatedAt time.Time `json:"created_at"`
}
Pane is a tmux pane known to ggcode.
type PaneCapture ¶
type PopupRequest ¶
type RerunResult ¶
type RestoreResult ¶
Click to show internal directories.
Click to hide internal directories.