Versions in this module Expand all Collapse all v0 v0.1.2 Sep 11, 2026 v0.1.1 Sep 9, 2026 v0.1.0 Sep 9, 2026 Changes in this version + const ErrCodeAgentTurnIncomplete + const ErrCodeElicitationUnrenderable + const ErrCodeHarnessDisconnected + const ErrCodeHarnessEmptyTurn + const ErrCodeHarnessReconnectFailed + const ErrCodeProviderQuotaExhausted + const ErrCodeProviderTransient + const EventElicitation + const EventElicitationResolved + const EventFilesDropped + const EventHarnessCapabilities + const EventHarnesses + const EventPermission + const EventPopoutChanged + const EventQueue + const EventSessionMeta + const EventStatus + const EventUpdate + func AttachEmbeddedRemote(s *ChatService, tr *application.HTTPTransport, assets http.Handler, ...) + func RegisterFilesDroppedEmitter(win *application.WebviewWindow) + type BrowseDirResult struct + Dirs []BrowseEntry + Parent string + Path string + type BrowseEntry struct + Name string + Path string + type ChatService struct + func NewChatService(cfg *config.Config) *ChatService + func (s *ChatService) AddHarness(command, name string) ([]harness.Harness, error) + func (s *ChatService) AddProject(name, path, model string) (*store.Project, error) + func (s *ChatService) BrowseDir(dir string) (*BrowseDirResult, error) + func (s *ChatService) BrowseRoots() ([]BrowseEntry, error) + func (s *ChatService) CloseSession(sessionID string) error + func (s *ChatService) CloseSessionWindow(sessionID string) + func (s *ChatService) ContinueSession(sessionID string) error + func (s *ChatService) CreateGuestSession(projectID, title, harnessID, enterPath string, mcpServerIDs []string) (*store.Session, error) + func (s *ChatService) CreateMcpServer(m store.McpServer) (*store.McpServer, error) + func (s *ChatService) CreatePermissionRule(rule store.PermissionRule) (*store.PermissionRule, error) + func (s *ChatService) CreateSession(projectID, title, harnessID string, useWorktree bool, baseRef string, ...) (*store.Session, error) + func (s *ChatService) DeleteMcpServer(id string) error + func (s *ChatService) DeletePermissionRule(id string) error + func (s *ChatService) DeleteSession(sessionID string) error + func (s *ChatService) DeleteWorktree(sessionID string, force bool) error + func (s *ChatService) DetachWorktreeGuests(sessionID string) error + func (s *ChatService) EditQueueItem(sessionID, itemID, text string) error + func (s *ChatService) EnqueueMessage(sessionID, text string, attachments []acp.Attachment) error + func (s *ChatService) ExpandSessionWindow(sessionID string) + func (s *ChatService) ExportSession(sessionID, format string) (string, error) + func (s *ChatService) FocusSessionWindow(sessionID string) + func (s *ChatService) ForkSession(sourceSessionID string) (*store.Session, error) + func (s *ChatService) GenerateRemotePairingCode() (code string, sid string, expiresAt string, err error) + func (s *ChatService) GetAutoHarnessUpgrade() bool + func (s *ChatService) GetCheckHarnessUpdates() bool + func (s *ChatService) GetConfig() map[string]string + func (s *ChatService) GetLastHarness() string + func (s *ChatService) GetPermissionTimeoutPolicy() string + func (s *ChatService) GetRemoteInfo() RemoteInfo + func (s *ChatService) GetSessionCachedCommands(sessionID string) ([]acp.SlashCommand, error) + func (s *ChatService) GetSessionCachedConfigOptions(sessionID string) ([]acp.ConfigOption, error) + func (s *ChatService) GetSessionConfigOptions(sessionID string) ([]acp.ConfigOption, error) + func (s *ChatService) GetSessionMcpServers(sessionID string) ([]store.McpServer, error) + func (s *ChatService) GetSessionProjectID(sessionID string) (string, error) + func (s *ChatService) GetSessionSnapshot(sessionID string) (string, error) + func (s *ChatService) HasGitContext(projectID string) (bool, error) + func (s *ChatService) ImportMcpConfig(jsonData string) (McpImportResult, error) + func (s *ChatService) InterruptAndSend(sessionID, text string, attachments []acp.Attachment) error + func (s *ChatService) IsGitProject(projectID string) (bool, error) + func (s *ChatService) IsSessionWindowPopped(sessionID string) bool + func (s *ChatService) ListAllSessions() (map[string][]store.Session, error) + func (s *ChatService) ListHarnessCapabilities() map[string]acp.CapabilityMatrix + func (s *ChatService) ListHarnesses() []harness.Harness + func (s *ChatService) ListMcpServers() ([]store.McpServer, error) + func (s *ChatService) ListPermissionRules() ([]store.PermissionRule, error) + func (s *ChatService) ListPoppedSessions(sessionIDs []string) []string + func (s *ChatService) ListProjects() ([]store.Project, error) + func (s *ChatService) ListSessions(projectID string) ([]store.Session, error) + func (s *ChatService) ListUserMessages(sessionID string) ([]string, error) + func (s *ChatService) ListWorktrees(projectID string) ([]worktree.WorktreeInfo, error) + func (s *ChatService) LoadMessages(sessionID string) ([]store.Message, error) + func (s *ChatService) LoadMessagesPage(sessionID string, beforeSeq int64, limit int) ([]store.Message, error) + func (s *ChatService) MatchKnownHarness(command string) *harness.KnownHarness + func (s *ChatService) MergeSession(sessionID string) (string, error) + func (s *ChatService) OpenSession(sessionID string) error + func (s *ChatService) OpenSessionWindow(sessionID string) error + func (s *ChatService) OpenURL(url string) error + func (s *ChatService) PickDirectory() (string, error) + func (s *ChatService) PickFiles() ([]string, error) + func (s *ChatService) ProbeNewHarness(command string) (*acp.ConformanceReport, error) + func (s *ChatService) RecentBaseRefs(projectID string) ([]string, error) + func (s *ChatService) RefreshHarnesses() ([]harness.Harness, error) + func (s *ChatService) RefreshSessionConfig(sessionID string) ([]acp.ConfigOption, error) + func (s *ChatService) RegenerateRemoteToken() (string, error) + func (s *ChatService) RemoteListSessions() []RemoteSessionInfo + func (s *ChatService) RemoteRevokeSession(id string) (bool, error) + func (s *ChatService) RemoveProject(id string) error + func (s *ChatService) ReorderPermissionRules(ids []string) error + func (s *ChatService) ReorderProjects(ids []string) error + func (s *ChatService) ReorderQueueItem(sessionID, activeID, overID string) error + func (s *ChatService) ResetPermissionRules() error + func (s *ChatService) ResolveBaseRefDefault(projectID string) (worktree.DefaultBaseRef, error) + func (s *ChatService) RespondElicitation(sessionID, reqID, action, contentJSON string) error + func (s *ChatService) RespondPermission(sessionID, reqID, level string) error + func (s *ChatService) RevealPath(path string) error + func (s *ChatService) RevokeQueueItem(sessionID, itemID string) error + func (s *ChatService) SaveSessionSnapshot(sessionID, snapshotJSON string) error + func (s *ChatService) ScheduleQueueItem(sessionID, itemID string, scheduledAt int64) error + func (s *ChatService) SearchBaseRefs(projectID string) ([]worktree.BranchInfo, error) + func (s *ChatService) SearchSessionContent(projectID, query string) ([]string, error) + func (s *ChatService) SendAndWaitSync(sessionID, text string, attachments []acp.Attachment) (string, error) + func (s *ChatService) SendMessage(sessionID, text string, attachments []acp.Attachment) error + func (s *ChatService) ServiceShutdown() error + func (s *ChatService) ServiceStartup(ctx context.Context, options application.ServiceOptions) error + func (s *ChatService) SessionAICommit(sessionID string) error + func (s *ChatService) SessionChanges(sessionID string) ([]worktree.FileChange, error) + func (s *ChatService) SessionCommit(sessionID, message string) error + func (s *ChatService) SessionCreateDir(sessionID, rel string) error + func (s *ChatService) SessionCreateFile(sessionID, rel, content string) error + func (s *ChatService) SessionCurrentBranch(sessionID string) (string, error) + func (s *ChatService) SessionDeletePath(sessionID, rel string) error + func (s *ChatService) SessionDiscard(sessionID string, paths []string) error + func (s *ChatService) SessionFileDiff(sessionID, path string, staged bool) (string, error) + func (s *ChatService) SessionFuzzyFind(sessionID, scope, query string, limit int) ([]fsview.FileNode, error) + func (s *ChatService) SessionListDir(sessionID, rel string) ([]fsview.FileNode, error) + func (s *ChatService) SessionMergeable(sessionID string) (bool, error) + func (s *ChatService) SessionReadFile(sessionID, rel string) (fsview.FileData, error) + func (s *ChatService) SessionReadImage(sessionID, rel string) (fsview.ImageData, error) + func (s *ChatService) SessionRenamePath(sessionID, rel, newName string) (string, error) + func (s *ChatService) SessionStage(sessionID string, paths []string) error + func (s *ChatService) SessionStatuses() map[string]string + func (s *ChatService) SessionUnstage(sessionID string, paths []string) error + func (s *ChatService) SessionWriteFile(sessionID, rel, content string) error + func (s *ChatService) SetAutoHarnessUpgrade(on bool) error + func (s *ChatService) SetCheckHarnessUpdates(on bool) error + func (s *ChatService) SetDefaultModel(model string) error + func (s *ChatService) SetPermissionTimeoutPolicy(policy string) error + func (s *ChatService) SetQueueItemRepeat(sessionID, itemID string, repeatEveryMs, maxSends int64) error + func (s *ChatService) SetRemoteEnabled(on bool) error + func (s *ChatService) SetRemotePort(port int) error + func (s *ChatService) SetRemotePublicURL(url string) error + func (s *ChatService) SetSessionConfigOption(sessionID, configId, value string) error + func (s *ChatService) SetSessionPinned(sessionID string, pinned bool) error + func (s *ChatService) SetSessionWindowOnTop(sessionID string, onTop bool) error + func (s *ChatService) ShrinkSessionWindow(sessionID string) + func (s *ChatService) StopSession(sessionID string) error + func (s *ChatService) ToggleMaximise() + func (s *ChatService) UpdateMcpServer(m store.McpServer) error + func (s *ChatService) UpdatePermissionRule(rule store.PermissionRule) error + func (s *ChatService) UpdateProject(id, name, model string) error + func (s *ChatService) UpdateSessionCustomTitle(sessionID, customTitle string) error + func (s *ChatService) UpdateSessionTags(sessionID string, tags []string) ([]string, error) + func (s *ChatService) UpdateUserHarness(id, name, command string) ([]harness.Harness, error) + func (s *ChatService) UpgradeHarness(id string) ([]harness.Harness, error) + func (s *ChatService) WorktreeGuests(sessionID string) ([]store.Session, error) + func (s *ChatService) WorktreeKind(sessionID string) (string, error) + type FilesDroppedPayload struct + Files []string + SessionID string + type McpImportResult struct + Added []string + Errors []string + Skipped []string + Warnings []string + type PopoutPayload struct + Popped bool + SessionID string + type QueueItem struct + Attachments []acp.Attachment + ID string + RepeatEveryMs int64 + ScheduledAt int64 + SentCount int64 + Text string + type QueuePayload struct + Items []QueueItem + SessionID string + type RemoteInfo struct + Attached bool + Enabled bool + Port int + PublicURL string + Running bool + Token string + URLs []string + type RemoteSessionInfo struct + CreatedAt string + ID string + Label string + LastSeen string + type SessionMetaPayload struct + SessionID string + Title string + type StatusPayload struct + Attempts int + Code string + Detail string + ResetAt string + RootCause string + SessionID string + Status string