fix(extension): preserve existing tab scope semantics

This commit is contained in:
drakezhang
2026-09-04 13:14:26 +08:00
parent 0dc11b30ea
commit 386ef91c24
17 changed files with 92 additions and 90 deletions
@@ -117,6 +117,13 @@ export class SessionManager {
return Array.from(this.sessions.values());
}
/** Remove a closed tab from agent-created ownership tracking. */
forgetAgentCreatedTab(tabId: number): void {
for (const ctx of this.sessions.values()) {
ctx.agentCreatedTabs.delete(tabId);
}
}
/**
* Look up whether `tabId` is currently borrowed by some *other*
* session than the one calling. Used by M8 `tab_borrow` to refuse