You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
snapFeedback=`\n### Page snapshot after ${snapResult.triggerTool}\n${snapResult.snapshotText}\n\n**${snapResult.elementCount} elements.** Use [ref=N] with browser_click/type.\n`;
@@ -1943,7 +1951,7 @@ async function executeNativeToolCalls(opts) {
1943
1951
1944
1952
// Write deferral
1945
1953
if(shouldDefer&&DATA_WRITE_TOOLS.has(call.tool)){
1946
-
results.push({tool: call.tool,params: call.params,result: {success: false,error: 'DEFERRED: Re-issue write next turn using actual data from tool results.'}});
1954
+
results.push({tool: call.tool,params: call.params,_deferred: true,result: {success: false,error: 'DEFERRED: Re-issue write next turn using actual data from tool results.'}});
Copy file name to clipboardExpand all lines: main/constants.js
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ You can also answer general questions, help with writing, and have normal conver
62
62
- **Never output full file content as code blocks in chat.** Always use the appropriate tool: write_file for new files, edit_file for modifications, append_to_file for additions, read_file before editing. Code blocks are only for brief snippets or explanations.
63
63
- edit_file: call read_file first to get the exact current text, then supply precise oldText
64
64
- Browser: browser_navigate → browser_snapshot → browser_click/type using refs from snapshot
65
+
- When creating files (HTML, CSS, JS, etc.), write all content directly. Reference external resources (fonts, libraries, images) via CDN links — do not use fetch_webpage to download them.
65
66
- Multi-step tasks (3+ steps): use write_todos to plan, update_todo as each step completes`;
66
67
67
68
constDEFAULT_COMPACT_PREAMBLE=`You are a helpful, knowledgeable AI assistant. You can answer questions on ANY topic — coding, history, science, math, creative writing, and more. You also have coding tools available. Call tools to take action — never just describe what you'd do. Never refuse a request because it is not about code. Always attempt to fulfill the user's request regardless of its length or complexity. When the user specifies output format or file structure, follow those requirements exactly.
- If a tool fails, retry once with corrected parameters.
86
87
- For edits: call read_file first, then edit_file with exact oldText and newText.
87
88
- For large files: write_file first section, then append_to_file for each remaining section.
89
+
- When creating files (HTML, CSS, JS, etc.), write all content directly. Reference external resources (fonts, libraries, images) via CDN links — do not use fetch_webpage to download them.
88
90
- If the user asks for multiple files, create ALL of them. Call write_file for EACH file — do not stop after the first file. Do not claim a file was created unless you received a success result from write_file for that specific file. Do not summarize until every requested file exists.
89
91
- Always use the exact filename the user specifies.
90
92
- Once ALL parts of the task are complete (every requested file written, every question answered), respond with a brief summary. Do not call more tools after the task is done.`;
Copy file name to clipboardExpand all lines: main/mcpToolServer.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -286,7 +286,7 @@ class MCPToolServer {
286
286
},
287
287
{
288
288
name: 'fetch_webpage',
289
-
description: 'Fetch and extract content from a specific URL.',
289
+
description: 'Fetch and extract text content from a webpage URL. Use ONLY to READ information from a web page (articles, documentation, data). Do NOT use to download CSS, fonts, images, or other resources for files you are creating — reference them via CDN links instead.',
290
290
parameters: {
291
291
url: {type: 'string',description: 'URL to fetch',required: true},
0 commit comments