fix(chat): keep tool totals neutral and count individual errors

This commit is contained in:
2026-10-20 22:05:21 +01:00
parent e29be1181f
commit aa57fe8a04
8 changed files with 123 additions and 10 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ test("shell updates retain unrelated caches and the current app cache", async ()
let activation;
vm.runInNewContext(await readFile(new URL("../sw.js", import.meta.url), "utf8"), {
self: { addEventListener: (type, handler) => handlers.set(type, handler), clients: { claim: async () => {} } },
caches: { keys: async () => ["pipelines-shell-v8", "pipelines-shell-v9", "unrelated-user-cache"], delete: async (key) => deleted.push(key) },
caches: { keys: async () => ["pipelines-shell-v9", "pipelines-shell-v10", "unrelated-user-cache"], delete: async (key) => deleted.push(key) },
});
handlers.get("activate")({ waitUntil: (promise) => { activation = promise; } });
await activation;
assert.deepEqual(deleted, ["pipelines-shell-v8"]);
assert.deepEqual(deleted, ["pipelines-shell-v9"]);
});