feat(chrome): hand snapshots to context mode

This commit is contained in:
云服务部-叶林立
2026-08-28 14:45:37 +08:00
parent 221e978622
commit f3a2abe1e4
96 changed files with 12800 additions and 26 deletions
+8
View File
@@ -50,6 +50,14 @@ test("context routing analyzes large files without a full read", () => {
assert.match(section, /host permission approval does not bypass this Context Mode boundary/);
});
test("Chrome snapshot routing keeps raw page data out of model context", () => {
const section = buildToolRoutingSection(["chrome_snapshot", "ctx_execute_file"]);
assert.match(section, /immediately analyze the returned workspace-relative capture path with ctx_execute_file/);
assert.match(section, /never use read or cat for the raw JSON/);
assert.match(section, /take a fresh snapshot after any interaction/);
});
test("hashline routing uses small reads and fresh anchors for edits", () => {
const section = buildToolRoutingSection(["read", "edit"]);