Documentation
¶
Index ¶
- func Available() bool
- func Run(demoMode bool, agentMode string) error
- type ConversationItem
- type SessionFull
- type SessionItem
- type SessionService
- func (s *SessionService) GetActiveCount() int
- func (s *SessionService) GetConfig() core.Config
- func (s *SessionService) GetSessionDetail(id string) *SessionFull
- func (s *SessionService) GetSessionName(sessionID string) string
- func (s *SessionService) GetSessions() []SessionItem
- func (s *SessionService) GetWindowMinutes() int
- func (s *SessionService) OpenInEditor(cwd, agent string)
- func (s *SessionService) ServiceShutdown() error
- func (s *SessionService) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
- func (s *SessionService) SetActivityFilter(f string)
- func (s *SessionService) SetSearchQuery(q string)
- func (s *SessionService) SetSessionName(sessionID, name string) error
- func (s *SessionService) SetWindowMinutes(m int)
- 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 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"`
CurrentTool string `json:"currentTool"`
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"`
}
SessionFull is the detailed session representation.
type SessionItem ¶
type SessionItem struct {
SessionID string `json:"sessionId"`
Agent string `json:"agent"`
Source string `json:"source"`
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"`
}
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) GetActiveCount ¶
func (s *SessionService) GetActiveCount() int
GetActiveCount returns the number of sessions with active work.
func (*SessionService) GetConfig ¶
func (s *SessionService) GetConfig() core.Config
GetConfig returns the current config.
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) GetWindowMinutes ¶
func (s *SessionService) GetWindowMinutes() int
GetWindowMinutes returns the current time window in minutes.
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 a Terminal.app window). The config "editor" field is treated as VISUAL (GUI) for backward compatibility.
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) SetActivityFilter ¶
func (s *SessionService) SetActivityFilter(f string)
SetActivityFilter sets the activity filter.
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.