Documentation
¶
Index ¶
- func CopyToClipboard(text string) error
- func CreateSession(name string) error
- func DetachSession(name string) error
- func DisplayAgentModel(kind, model string) string
- func DisplayAgentState(state string, updatedAt int64) string
- func FetchPreview(name string, lines int) string
- func FetchProcessInfo(sessions []Session) map[string]ProcessInfo
- func FormatBytes(b uint64) string
- func FormatRelativeTime(unixTS int64) string
- func FormatUptime(secs int) string
- func KillSession(name string) error
- func PreviewWidth(raw string) int
- func RenameSession(oldName, newName string) error
- func ScrollPreview(raw string, offsetX, maxWidth int) string
- type ProcessInfo
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyToClipboard ¶
CopyToClipboard copies text to the system clipboard.
func CreateSession ¶
CreateSession spawns a new daemon process for the named session.
func DetachSession ¶
DetachSession disconnects all attached clients from the named session.
func DisplayAgentModel ¶
func DisplayAgentState ¶ added in v0.4.2
func FetchPreview ¶
FetchPreview returns the last `lines` lines of the daemon-rendered preview.
func FetchProcessInfo ¶
func FetchProcessInfo(sessions []Session) map[string]ProcessInfo
FetchProcessInfo returns a map of session name → ProcessInfo. Uses a single `ps` call to read all processes, then walks the tree in memory.
func FormatBytes ¶
FormatBytes formats bytes as a human-readable string (e.g., "12M", "1.2G").
func FormatRelativeTime ¶
func FormatUptime ¶
FormatUptime formats seconds as a compact human-readable duration.
func KillSession ¶
KillSession sends a kill message to the named session via Unix socket.
func PreviewWidth ¶
func RenameSession ¶
RenameSession renames a session.
func ScrollPreview ¶
ScrollPreview applies a horizontal offset and width to raw preview text.
Types ¶
type ProcessInfo ¶
type ProcessInfo struct {
Memory uint64
Uptime int // seconds
AgentKind string
AgentState string
AgentSummary string
AgentUpdated int64
AgentModel string
AgentVersion string
AgentPrompt string
AgentPlan string
AgentApproval string
AgentSandbox string
AgentBranch string
AgentGitSHA string
AgentGitOrigin string
AgentName string
AgentRole string
AgentMemory string
AgentSessionID string
AgentSubagent bool
AgentInput int64
AgentOutput int64
AgentCached int64
AgentTotal int64
AgentContext int64
AgentCostUSD float64
AgentDurationMS int64
AgentAPIMS int64
AgentLinesAdded int64
AgentLinesRemoved int64
AgentOutputStyle string
AgentProjectDir string
AgentWorktreePath string
}
ProcessInfo holds per-session process data fetched asynchronously.