codeburn/windows/src/lib/watched.ts
iamtoruk f021513479 fix(windows): one answer to what CodeBurn watches
The empty state and the tab strip's known-tool fallback both answer the
first-run question "where does this look?", and they answered it
differently: the strip said "Pi session logs" where the empty state said
%USERPROFILE%\.pi, and "OpenCode session storage" against
%USERPROFILE%\.local\share\opencode. Neither Pi spelling was right
either. The CLI reads ~/.pi/agent/sessions.

Both read one table now, lib/watched, whose paths are the roots the CLI's
own providers probe. Cursor and Copilot gain the paths they never had
rather than a description, so all six rows read the same way, and a long
path wraps inside the hover card instead of running past it.
2026-09-02 00:11:17 -07:00

35 lines
1.7 KiB
TypeScript

/// What CodeBurn watches for, in one place. Two surfaces answer the first-run question
/// "where does this look?": the empty state and the dimmed tab in the strip's known-tool
/// fallback. They used to answer it differently (the strip said "Pi session logs" where the
/// empty state said `~/.pi`, and neither was the directory the CLI reads), so both read this
/// table now.
///
/// The paths are the roots the CLI's own providers probe (`probeRoots` in
/// src/providers/<tool>.ts), spelled the way the reader's OS spells them. A provider that
/// resolves several roots is named by the one a reader can act on.
import { appDataPath, homePath } from './platform'
export type WatchedTool = {
/// The CLI provider id, which is also what `--provider` takes.
id: string
/// The tab chip label.
label: string
/// The tool's own name, for a sentence.
tool: string
path: string
}
export const WATCHED_TOOLS: WatchedTool[] = [
{ id: 'claude', label: 'Claude', tool: 'Claude Code', path: homePath('.claude', 'projects') },
{ id: 'codex', label: 'Codex', tool: 'Codex CLI', path: homePath('.codex', 'sessions') },
{ id: 'cursor', label: 'Cursor', tool: 'Cursor', path: appDataPath('Cursor', 'User', 'globalStorage') },
{ id: 'copilot', label: 'Copilot', tool: 'GitHub Copilot', path: homePath('.copilot') },
{ id: 'opencode', label: 'OpenCode', tool: 'OpenCode', path: homePath('.local', 'share', 'opencode') },
{ id: 'pi', label: 'Pi', tool: 'Pi', path: homePath('.pi', 'agent', 'sessions') },
]
/// The phrase both surfaces put after "CodeBurn watches".
export function watchedSource(tool: WatchedTool): string {
return `${tool.tool} sessions in ${tool.path}`
}