say what the live opencode rows actually do

Two comments describing behaviour the code does not have.

LiveOpenCodeSession had been inserted between LiveClaudeSession and its docblock, so a
comment about isGenerating, pendingTasks and the idle GC read as documentation for the
OpenCode type — where it is contradicted by the correct comment directly beneath it.
Moved below, and it now states that it carries no ses_ id.

That absence is the point: /chat/live claimed title and cwd come from the session store
"so a turn whose id has not been reported yet shows unnamed". Nothing is looked up, and
there is no id here to look one up with. They are null permanently, not until-known.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-10 12:50:46 +01:00
co-authored by Claude Opus 5
parent c252f24f1d
commit 42190f007f
2 changed files with 19 additions and 11 deletions
+12 -8
View File
@@ -11,14 +11,6 @@ export type SidecarMessage = SidecarCommand | SidecarEvent;
* together with `isGenerating` it is exactly what the agent's own idle GC consults before deciding a
* session may be collected, so a caller can tell "busy" from "merely open" the same way it does.
*/
/**
* An OpenCode turn in flight. Only ever the generating ones — see `listRunningOpenCodeTurns` for why
* this carries neither `isGenerating` (it is always true) nor `pendingTasks` (no such concept).
*/
export type LiveOpenCodeSession = {
sessionKey: string;
};
export type LiveClaudeSession = {
sessionKey: string;
/**
@@ -33,6 +25,18 @@ export type LiveClaudeSession = {
pendingTasks: number;
};
/**
* An OpenCode turn in flight. Only ever the generating ones — see `listRunningOpenCodeTurns` for why
* this carries neither `isGenerating` (it is always true) nor `pendingTasks` (no such concept).
*
* It also carries no id for OpenCode's own `ses_…` session, which is why a live OpenCode row cannot be
* named: the runner reports that id separately, over `opencode:session`, and nothing correlates the two
* back here. Adding it is what a titled OpenCode row in the Live panel would need.
*/
export type LiveOpenCodeSession = {
sessionKey: string;
};
// ── Commands (API server → sidecar) ──
export type SidecarCommand =