Documentation
¶
Index ¶
- func EnsureDaemon(sockPath, configFile string) (net.Conn, error)
- func FetchScreenSnapshot(cfg *config.Config, paths config.Paths, configFile string, sessionID string) *protocol.ScreenSnapshotResponseMsg
- func FetchScrollbackPreview(cfg *config.Config, paths config.Paths, configFile string, sessionID string) string
- func RunShellInWorktree(worktreePath string) error
- func WriteScreenRestore(snap *protocol.ScreenSnapshotResponseMsg)
- type Client
- func (c *Client) Close()
- func (c *Client) Handshake() error
- func (c *Client) ReadControlResponse() (protocol.Envelope, error)
- func (c *Client) ReadFrame() (protocol.Frame, error)
- func (c *Client) RunPassthrough(ctx context.Context, keys PassthroughKeys) PassthroughResult
- func (c *Client) SendControl(msgType string, payload any) error
- func (c *Client) SendData(data []byte) error
- type OverlayResult
- type PassthroughKeys
- type PassthroughResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchScreenSnapshot ¶ added in v0.2.0
func FetchScrollbackPreview ¶
func RunShellInWorktree ¶
RunShellInWorktree spawns an interactive shell with its working directory set to the given worktree path, and GRAITH_WORKTREE exported in the env.
func WriteScreenRestore ¶ added in v0.2.0
func WriteScreenRestore(snap *protocol.ScreenSnapshotResponseMsg)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Connect ¶
Connect creates a new client, performs the handshake, and reads the handshake response. On failure the connection is closed automatically.
func (*Client) ReadControlResponse ¶
func (*Client) RunPassthrough ¶
func (c *Client) RunPassthrough(ctx context.Context, keys PassthroughKeys) PassthroughResult
type OverlayResult ¶
OverlayResult holds the outcome of the overlay interaction.
func RunOverlay ¶
func RunOverlay(sessions []protocol.SessionInfo, fetchPreview func(sessionID string) string) *OverlayResult
RunOverlay launches the bubbletea overlay listing sessions grouped by repo. fetchPreview is called asynchronously to load scrollback for the selected session. It may be nil, in which case no preview is shown.
type PassthroughKeys ¶
type PassthroughResult ¶
type PassthroughResult int
const ( ResultDetached PassthroughResult = iota ResultOverlay ResultShell ResultQuit ResultDisconnected ResultRestart ResultNextSession ResultPrevSession )
Click to show internal directories.
Click to hide internal directories.