mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat(chrome): hand snapshots to context mode
This commit is contained in:
@@ -98,6 +98,12 @@ export function buildToolRoutingSection(selectedTools: SelectedTools): string {
|
||||
);
|
||||
}
|
||||
|
||||
if (hasTool(selectedTools, "chrome_snapshot") && hasTool(selectedTools, "ctx_execute_file")) {
|
||||
rules.push(
|
||||
"- After chrome_snapshot or a Chrome action with includeSnapshot=true, immediately analyze the returned workspace-relative capture path with ctx_execute_file; never use read or cat for the raw JSON. Print only the uids, text, or state needed for the next action, and take a fresh snapshot after any interaction because the previous capture may be stale.",
|
||||
);
|
||||
}
|
||||
|
||||
if (hasTool(selectedTools, "read")) {
|
||||
rules.push(
|
||||
"- Use read only when exact source is needed or the file is small. Before editing, request the smallest useful offset/limit range; do not read a complete large file merely to copy, compare, hash, count, explore, or summarize it.",
|
||||
|
||||
Reference in New Issue
Block a user