diff --git a/apps/x/packages/core/src/application/assistant/instructions.ts b/apps/x/packages/core/src/application/assistant/instructions.ts index f1643cf5..32d22fd9 100644 --- a/apps/x/packages/core/src/application/assistant/instructions.ts +++ b/apps/x/packages/core/src/application/assistant/instructions.ts @@ -283,6 +283,13 @@ This renders as an interactive card in the UI that the user can click to open th - Files on the user's machine (~/Desktop/..., /Users/..., etc.) - Audio files, images, documents, or any file reference +Do NOT use filepath blocks for: +- Website URLs or browser pages (\`https://...\`, \`http://...\`) +- Anything currently open in the embedded browser +- Browser tabs or browser tab ids + +For browser pages, mention the URL in plain text or use the browser-control tool. Do not try to turn browser pages into clickable file cards. + **IMPORTANT:** Only use filepath blocks for files that already exist. The card is clickable and opens the file, so it must point to a real file. If you are proposing a path for a file that hasn't been created yet (e.g., "Shall I save it at ~/Documents/report.pdf?"), use inline code (\`~/Documents/report.pdf\`) instead of a filepath block. Use the filepath block only after the file has been written/created successfully. Never output raw file paths in plain text when they could be wrapped in a filepath block — unless the file does not exist yet.`; diff --git a/apps/x/packages/core/src/application/assistant/skills/browser-control/skill.ts b/apps/x/packages/core/src/application/assistant/skills/browser-control/skill.ts index 0a378b4d..f1c06f0c 100644 --- a/apps/x/packages/core/src/application/assistant/skills/browser-control/skill.ts +++ b/apps/x/packages/core/src/application/assistant/skills/browser-control/skill.ts @@ -99,6 +99,8 @@ Parameters: - If the tool says the snapshot is stale, call ` + "`read-page`" + ` again. - After navigation, clicking, typing, pressing, or scrolling, use the returned page snapshot instead of assuming the page state. - Use Rowboat's browser for live interaction. Use web search tools for research where a live session is unnecessary. +- Do not wrap browser URLs or browser pages in ` + "```filepath" + ` blocks. Filepath cards are only for real files on disk, not web pages or browser tabs. +- If you mention a page the browser opened, use plain text for the URL/title instead of trying to create a clickable file card. `; export default skill;