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
@@ -20,7 +20,7 @@ function fakeAgentWindow(ids: number[]) {
return id;
}),
remove: vi.fn(async () => {}),
ensureActiveTab: vi.fn(async () => 7),
ensureActiveTab: vi.fn(async () => 1),
};
}
@@ -197,7 +197,6 @@ describe("handleEmulate", () => {
it("targets an explicit tab_id", async () => {
const sm = await makeManager();
sm.get("aa11")?.agentCreatedTabs.add(9);
const deps = makeDeps();
const result = await handleEmulate(
sm,
@@ -277,7 +276,6 @@ describe("handleEmulate", () => {
it("keeps emulation state per tab", async () => {
const sm = await makeManager();
sm.get("aa11")?.agentCreatedTabs.add(9);
const deps = makeDeps();
await handleEmulate(sm, { session_id: "aa11", overrides: fullOverrides }, deps);
await handleEmulate(