[eric] island: stop counting the workflow Edit Agent as one of the user's finished agents

This commit is contained in:
ciregenz
2026-07-31 21:32:27 -07:00
parent 29f33b6821
commit a926d63abe
3 changed files with 24 additions and 4 deletions
@@ -0,0 +1,14 @@
// Plumbing chats the UI spins up for itself: a workflow card's Edit Agent, a workflow run, a browser
// or sub agent working for a parent. They are real sessions, they just aren't things the user started.
const PLUMBING_MODES: ReadonlySet<string> = new Set(['browser-agent', 'invoked-agent', 'sub-agent']);
export interface SessionOrigin {
mode: string;
workflow_run_id?: string | null;
workflow_edit_id?: string | null;
}
/** True for a chat the user started themselves, which is the only kind that earns a card or a notification. */
export function isUserLaunchedSession(session: SessionOrigin): boolean {
return !session.workflow_run_id && !session.workflow_edit_id && !PLUMBING_MODES.has(session.mode);
}