diff --git a/docs/components/active-agents.md b/docs/components/active-agents.md index 21b719a2..b87352cf 100644 --- a/docs/components/active-agents.md +++ b/docs/components/active-agents.md @@ -57,6 +57,12 @@ Rows appear in the order agents are first detected. (See switching to it. - **Copy Path** / **Reveal in Finder** — the agent's working directory (or its owning worktree's directory when the agent hasn't reported one). + - **Copy Session Path** / **Reveal Session in Finder** — the on-disk session + log of the agent's native session (e.g. Claude Code's + `~/.claude/projects//.jsonl`). Shown only when + Prowl has resolved the session to a file (see + [agent-detection](agent-detection.md)); agents with server-side or + store-only sessions (e.g. Amp threads) don't offer it. - **Keyboard navigation:** `⌥⌃↓` next agent, `⌥⌃↑` previous agent (wraps). - **Resize** the panel by dragging its top edge (height is remembered). - **Auto-show:** if `autoShowActiveAgentsPanel` is on and the panel is hidden, a diff --git a/supacode/Features/ActiveAgents/Views/ActiveAgentsPanel.swift b/supacode/Features/ActiveAgents/Views/ActiveAgentsPanel.swift index 56df370f..7755b9f8 100644 --- a/supacode/Features/ActiveAgents/Views/ActiveAgentsPanel.swift +++ b/supacode/Features/ActiveAgents/Views/ActiveAgentsPanel.swift @@ -146,6 +146,21 @@ struct ActiveAgentsPanel: View { } .help("Reveal the agent's working directory in Finder") } + if let transcriptPath = entry.session?.transcriptPath { + Divider() + Button("Copy Session Path") { + NSPasteboard.general.clearContents() + NSPasteboard.general.setString(transcriptPath.path, forType: .string) + } + .help("Copy the on-disk path of this agent's session log") + Button("Reveal Session in Finder") { + NSWorkspace.shared.selectFile( + transcriptPath.path, + inFileViewerRootedAtPath: transcriptPath.deletingLastPathComponent().path + ) + } + .help("Select this agent's session log in Finder") + } } private func repositoryName(for entry: ActiveAgentEntry) -> String {