Documentation
¶
Overview ¶
Package console is a terminal client for the same API used by the web UI.
Index ¶
- func PickTarget(in io.Reader, out io.Writer, targets []TargetOption) (int64, error)
- func RunControls(c *Client, in io.Reader, out io.Writer, opts DashboardOptions) error
- func RunDashboard(c *Client, in io.Reader, out io.Writer, attach func(string, string) error) error
- func RunDashboardWithOptions(c *Client, in io.Reader, out io.Writer, opts DashboardOptions) error
- type Client
- type DashboardOptions
- type HTTPError
- type TargetOption
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PickTarget ¶
PickTarget presents a searchable, keyboard-driven target picker. Callers should resolve an explicit name or ID before invoking this for scripts.
func RunControls ¶ added in v2.4.0
RunControls renders the dashboard without native attachment actions. It is the surface behind `lectern controls` and the attached terminal's Ctrl-] popup: ordinary Lectern actions stay available, but opening another terminal would nest an attachment inside itself.
func RunDashboard ¶
RunDashboard uses a full-screen renderer that owns raw mode, resizing and the suspend/restore boundary around native tmux/SSH. The line client remains useful for pipes and accessibility via console --plain.
func RunDashboardWithOptions ¶ added in v2.4.0
RunDashboardWithOptions enables native attachment and background workspace tabs.
Types ¶
type Client ¶
func (*Client) Download ¶
Download streams arbitrary binary files without the JSON response size limit. Existing local files are preserved, including when the transfer fails.
type DashboardOptions ¶ added in v2.4.0
type DashboardOptions struct {
Attach func(string, string) error
OpenTerminal func(string, string, bool) error
OpenBatch func([]string) error
TerminalWorkspace bool
BatchOpen bool
InitialSessionID string
// Insert types text into the attached terminal without submitting it. Only
// the Ctrl-] controls popup sets it, where a real pane sits underneath.
Insert func(string) error
ControlOnly bool
Popup bool
FocusKind string
FocusID string
Action string
// Cwd is the directory the dashboard was started in, set only when the
// server shares this machine's filesystem.
Cwd string
// HistorySessionID opens that session's saved-conversation picker as
// soon as the dashboard has loaded (`lectern restore ID` for a session
// whose own conversation cannot be found).
HistorySessionID string
}
DashboardOptions selects which dashboard surface to render.
type HTTPError ¶
type TargetOption ¶
TargetOption is the small, display-oriented target shape used by the command-line target picker.
Source Files
¶
- actions.go
- agent_registry.go
- approvals.go
- client.go
- console.go
- dashboard.go
- dashboard_actions.go
- dashboard_groups.go
- dashboard_preferences.go
- keys.go
- keys_top.go
- launch_profiles.go
- mods.go
- native_history.go
- native_search.go
- new_session.go
- palette.go
- readable.go
- recent_sessions.go
- review.go
- target_picker.go
- workflows.go
- workspace_extension.go
- workspace_repositories.go