Documentation
¶
Index ¶
- func Available() bool
- func Run(demoMode bool, agentMode string) error
- type ConversationItem
- type CredentialStatus
- type SessionFull
- type SessionItem
- type SessionService
- func (s *SessionService) Attach()
- func (s *SessionService) Detach()
- func (s *SessionService) GetAPIToken() string
- func (s *SessionService) GetActiveCount() int
- func (s *SessionService) GetCardDensity() string
- func (s *SessionService) GetCloudStatus() core.CloudStatus
- func (s *SessionService) GetConfig() core.Config
- func (s *SessionService) GetCursorCredentialStatus() CredentialStatus
- func (s *SessionService) GetDetailWidth() int
- func (s *SessionService) GetLimits() limits.View
- func (s *SessionService) GetSessionDetail(id string) *SessionFull
- func (s *SessionService) GetSessionName(sessionID string) string
- func (s *SessionService) GetSessions() []SessionItem
- func (s *SessionService) GetSettings() Settings
- func (s *SessionService) GetUpdateVersion() string
- func (s *SessionService) GetWindowMinutes() int
- func (s *SessionService) IsAPIConfigured() bool
- func (s *SessionService) IsDetached() bool
- func (s *SessionService) IsPinned() bool
- func (s *SessionService) OpenCloudSession(id string) error
- func (s *SessionService) OpenCursorAPIKeys() error
- func (s *SessionService) OpenInEditor(cwd, agent string)
- func (s *SessionService) OpenReleases()
- func (s *SessionService) Refresh()
- func (s *SessionService) RemoveCursorAPIKey() error
- func (s *SessionService) ResumeInTerminal(sessionID string, yolo bool)
- func (s *SessionService) SaveSettings(st Settings) error
- func (s *SessionService) ServiceShutdown() error
- func (s *SessionService) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
- func (s *SessionService) SetAPIPassphrase(p string) error
- func (s *SessionService) SetActivityFilter(f string)
- func (s *SessionService) SetCardDensity(d string) error
- func (s *SessionService) SetCloudShowIdle(show bool)
- func (s *SessionService) SetCursorAPIKey(key string) error
- func (s *SessionService) SetDetailWidth(w int) error
- func (s *SessionService) SetSearchQuery(q string)
- func (s *SessionService) SetSessionName(sessionID, name string) error
- func (s *SessionService) SetWindowMinutes(m int)
- func (s *SessionService) TogglePin()
- type Settings
- type ToolItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConversationItem ¶
type ConversationItem struct {
Role string `json:"role"`
Text string `json:"text"`
Timestamp time.Time `json:"timestamp"`
}
ConversationItem is a conversation message for the detail view.
type CredentialStatus ¶ added in v0.16.0
type CredentialStatus struct {
Configured bool `json:"configured"`
Source string `json:"source"`
Error string `json:"error"`
}
CredentialStatus deliberately returns only configuration presence and source.
type SessionFull ¶
type SessionFull struct {
SessionItem
Version string `json:"version"`
IsWorktree bool `json:"isWorktree"`
MainRepo string `json:"mainRepo"`
InputTokens int `json:"inputTokens"`
OutputTokens int `json:"outputTokens"`
CacheCreationTokens int `json:"cacheCreationTokens"`
CacheReadTokens int `json:"cacheReadTokens"`
UserMessages int `json:"userMessages"`
AssistantMessages int `json:"assistantMessages"`
LastFileWrite string `json:"lastFileWrite"`
LastFileWriteAt time.Time `json:"lastFileWriteAt"`
RecentTools []ToolItem `json:"recentTools"`
RecentMessages []ConversationItem `json:"recentMessages"`
DesktopTitle string `json:"desktopTitle,omitempty"`
DesktopID string `json:"desktopId,omitempty"`
PermissionMode string `json:"permissionMode,omitempty"`
RemoteURL string `json:"remoteUrl,omitempty"`
ResumeCommand string `json:"resumeCommand,omitempty"`
ResumeCommandYolo string `json:"resumeCommandYolo,omitempty"`
}
SessionFull is the detailed session representation.
type SessionItem ¶
type SessionItem struct {
SessionID string `json:"sessionId"`
Agent string `json:"agent"`
Source string `json:"source"`
CloudURL string `json:"cloudUrl,omitempty"`
RepoURL string `json:"repoUrl,omitempty"`
CWD string `json:"cwd"`
ShortName string `json:"shortName"`
AgentName string `json:"agentName"`
CustomName string `json:"customName"`
Activity string `json:"activity"`
IsActive bool `json:"isActive"`
Model string `json:"model"`
GitBranch string `json:"gitBranch"`
CostUSD float64 `json:"costUsd"`
LastActivity time.Time `json:"lastActivity"`
TotalMessages int `json:"totalMessages"`
SparklineData []int `json:"sparklineData"`
CurrentTool string `json:"currentTool"`
LastMessage string `json:"lastMessage"`
ResumeAvailable bool `json:"resumeAvailable"`
YoloResumeAvailable bool `json:"yoloResumeAvailable"`
}
SessionItem is a lightweight session representation for the list view.
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
SessionService is the Go service exposed to the Svelte frontend via Wails bindings.
func (*SessionService) Attach ¶ added in v0.7.3
func (s *SessionService) Attach()
Attach switches from detached window back to tray panel mode.
func (*SessionService) Detach ¶ added in v0.7.3
func (s *SessionService) Detach()
Detach switches from tray panel to a normal detached window.
func (*SessionService) GetAPIToken ¶ added in v0.13.0
func (s *SessionService) GetAPIToken() string
GetAPIToken derives and returns the API bearer token. It exists for the explicit "copy token" action in Settings; empty when unconfigured.
func (*SessionService) GetActiveCount ¶
func (s *SessionService) GetActiveCount() int
GetActiveCount returns the number of sessions with active work.
func (*SessionService) GetCardDensity ¶ added in v0.13.0
func (s *SessionService) GetCardDensity() string
GetCardDensity returns the persisted desktop card density. Missing or invalid values fall back to "live".
func (*SessionService) GetCloudStatus ¶ added in v0.16.0
func (s *SessionService) GetCloudStatus() core.CloudStatus
func (*SessionService) GetConfig ¶
func (s *SessionService) GetConfig() core.Config
GetConfig returns the current config. The API passphrase is scrubbed before returning so the secret never crosses the Wails IPC boundary into the frontend (mirrors what /api/config does for HTTP callers).
func (*SessionService) GetCursorCredentialStatus ¶ added in v0.16.0
func (s *SessionService) GetCursorCredentialStatus() CredentialStatus
func (*SessionService) GetDetailWidth ¶ added in v0.13.0
func (s *SessionService) GetDetailWidth() int
GetDetailWidth returns the persisted desktop detail-panel width in pixels. Missing or out-of-range values fall back to 400.
func (*SessionService) GetLimits ¶ added in v0.12.4
func (s *SessionService) GetLimits() limits.View
GetLimits fetches all supported providers and returns the computed limits view. The GUI calls it when the limits page opens and on manual refresh; it does not poll. Missing/errored agents are omitted.
func (*SessionService) GetSessionDetail ¶
func (s *SessionService) GetSessionDetail(id string) *SessionFull
GetSessionDetail returns full detail for a session.
func (*SessionService) GetSessionName ¶
func (s *SessionService) GetSessionName(sessionID string) string
GetSessionName returns the custom name for a session.
func (*SessionService) GetSessions ¶
func (s *SessionService) GetSessions() []SessionItem
GetSessions returns all visible sessions for the list view.
func (*SessionService) GetSettings ¶ added in v0.13.0
func (s *SessionService) GetSettings() Settings
GetSettings returns the GUI-editable settings.
func (*SessionService) GetUpdateVersion ¶ added in v0.7.2
func (s *SessionService) GetUpdateVersion() string
GetUpdateVersion returns the newer version available, or empty if up-to-date.
func (*SessionService) GetWindowMinutes ¶
func (s *SessionService) GetWindowMinutes() int
GetWindowMinutes returns the current time window in minutes.
func (*SessionService) IsAPIConfigured ¶ added in v0.13.0
func (s *SessionService) IsAPIConfigured() bool
IsAPIConfigured reports whether an API passphrase is set. The passphrase itself never crosses the IPC boundary (GetConfig scrubs it).
func (*SessionService) IsDetached ¶ added in v0.7.3
func (s *SessionService) IsDetached() bool
IsDetached returns whether the app is currently in detached window mode.
func (*SessionService) IsPinned ¶ added in v0.7.3
func (s *SessionService) IsPinned() bool
IsPinned returns whether the detached window is always on top.
func (*SessionService) OpenCloudSession ¶ added in v0.16.0
func (s *SessionService) OpenCloudSession(id string) error
OpenCloudSession resolves the selected ID and validates the provider URL.
func (*SessionService) OpenCursorAPIKeys ¶ added in v0.16.0
func (s *SessionService) OpenCursorAPIKeys() error
func (*SessionService) OpenInEditor ¶
func (s *SessionService) OpenInEditor(cwd, agent string)
OpenInEditor opens a directory in the user's editor. For Cursor sessions, it opens Cursor IDE directly. Otherwise it follows POSIX semantics: $VISUAL is a GUI editor (launched directly), $EDITOR is a terminal editor (opened inside the configured terminal). The config "editor" field is treated as VISUAL (GUI) for backward compatibility.
func (*SessionService) OpenReleases ¶ added in v0.7.2
func (s *SessionService) OpenReleases()
OpenReleases opens the GitHub releases page in the system browser.
func (*SessionService) Refresh ¶ added in v0.13.0
func (s *SessionService) Refresh()
Refresh forces a session reload. Bound to the toolbar refresh button and the View menu.
func (*SessionService) RemoveCursorAPIKey ¶ added in v0.16.0
func (s *SessionService) RemoveCursorAPIKey() error
func (*SessionService) ResumeInTerminal ¶ added in v0.13.0
func (s *SessionService) ResumeInTerminal(sessionID string, yolo bool)
ResumeInTerminal opens a new terminal window in the session's working directory running either the normal or agent-specific YOLO resume command.
func (*SessionService) SaveSettings ¶ added in v0.13.0
func (s *SessionService) SaveSettings(st Settings) error
SaveSettings persists the GUI-editable settings. Exclude filters apply immediately; agent toggles take effect at the next launch (the session provider is built at startup).
func (*SessionService) ServiceShutdown ¶
func (s *SessionService) ServiceShutdown() error
ServiceShutdown is called by Wails when the app stops.
func (*SessionService) ServiceStartup ¶
func (s *SessionService) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
ServiceStartup is called by Wails when the app starts.
func (*SessionService) SetAPIPassphrase ¶ added in v0.13.0
func (s *SessionService) SetAPIPassphrase(p string) error
SetAPIPassphrase sets — or, with an empty string, clears — the API passphrase, ensuring a salt exists. A running --api server picks the change up at its next restart.
func (*SessionService) SetActivityFilter ¶
func (s *SessionService) SetActivityFilter(f string)
SetActivityFilter sets the activity filter.
func (*SessionService) SetCardDensity ¶ added in v0.13.0
func (s *SessionService) SetCardDensity(d string) error
SetCardDensity persists the desktop card density choice. core.UpdateConfig holds a file lock for the whole read-modify-write, so concurrent writers (this process or another lazyagent process) cannot clobber each other's config fields.
func (*SessionService) SetCloudShowIdle ¶ added in v0.16.0
func (s *SessionService) SetCloudShowIdle(show bool)
func (*SessionService) SetCursorAPIKey ¶ added in v0.16.0
func (s *SessionService) SetCursorAPIKey(key string) error
func (*SessionService) SetDetailWidth ¶ added in v0.13.0
func (s *SessionService) SetDetailWidth(w int) error
SetDetailWidth persists the desktop detail-panel width. Unlike the density setter it clamps instead of rejecting: the value comes from a drag gesture, not typed input.
func (*SessionService) SetSearchQuery ¶
func (s *SessionService) SetSearchQuery(q string)
SetSearchQuery sets the search query.
func (*SessionService) SetSessionName ¶
func (s *SessionService) SetSessionName(sessionID, name string) error
SetSessionName stores a custom name for a session. Empty name resets it.
func (*SessionService) SetWindowMinutes ¶
func (s *SessionService) SetWindowMinutes(m int)
SetWindowMinutes updates the time window.
func (*SessionService) TogglePin ¶ added in v0.7.3
func (s *SessionService) TogglePin()
TogglePin toggles always-on-top for the detached window.