Skip to content

Function: getOpenBlockIdsForDefinition()

agentmux


agentmux / agent-pane-state-store / getOpenBlockIdsForDefinition

getOpenBlockIdsForDefinition(definitionId): string[]

Defined in: agent-pane-state-store.ts:524

Every open block showing definitionId, not just a representative one.

getOpenDefinitionMap keys by definition, so a definition open in more than one pane collapses to whichever block was registered last. That is the right shape for its callers — the fork prompt only needs a pane to offer “switch to existing” — but wrong for anything that has to act on all of them. Deleting an agent swept that single block and left every other pane running against a now-deleted agent (codex P2 on PR #3262).

Scope: THIS renderer only. slots is module-local, so a pane showing the same agent in another window is not listed here, and a caller sweeping on this result will miss it. Closing those needs a backend-global block query or a cross-window broadcast — until that exists, treat a result as “the panes I can see”, not “all of them”, and tell the user when one survives.

string

string[]