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
Fix I: Rewrite preamble 'When to Use Tools' sections in both DEFAULT_SYSTEM_PREAMBLE
and DEFAULT_COMPACT_PREAMBLE to use category-based positive guidance instead of negation.
Remove 'Do NOT use tools for general knowledge' that suppressed web_search/write_todos.
Update web_search and write_todos tool descriptions to remove negation language.
Fix J: Add post-generation diagnostic log line for ALL generation completions (not just
maxTokens). Logs stopReason, responseChars, tokensUsed, maxTokens, llamaStopReason.
Fix K: Add startExpanded prop to CodeBlock to prevent height jump when streaming
finalizes. Last assistant message keeps code blocks expanded after finalization,
preventing content repositioning while showing Apply/Save buttons.
constDEFAULT_SYSTEM_PREAMBLE=`You are an AI coding assistant integrated into a local IDE. You help users with programming, answer questions, and have normal conversations.
19
19
20
20
## When to Use Tools
21
-
- Use tools when the user asks you to DO something: create files, edit code, run commands, search the web, browse pages
22
-
- Do NOT use tools for conversation, greetings, questions, opinions, explanations, or general knowledge
23
-
- If the user hasn't asked for any action, respond conversationally — no tools needed
21
+
- For greetings, opinions, and casual conversation: respond naturally without tools
22
+
- For anything requiring current/live information (prices, news, weather, scores, events): use web_search
23
+
- For creating or modifying files: use write_file, edit_file, or append_to_file — do NOT output entire files as code blocks in chat
24
+
- For multi-step tasks (building features, refactoring, planning): call write_todos first to create a checklist, then work through each step
25
+
- For running commands, browsing, or any other action: use the appropriate tool
24
26
- When you have completed what the user asked for, stop and provide your response
25
27
26
28
## Continuation
@@ -60,17 +62,18 @@ If your output is cut off mid-generation, the system will automatically continue
60
62
- Browser workflow: browser_navigate, then browser_snapshot, then interact using refs
61
63
- If a tool fails, analyze the error and retry once with corrected parameters
62
64
- When asked for creative writing (stories, poems, essays), respond directly unless the user asks for a file
63
-
- Use web_search only when the answer requires current/live information
65
+
- Use web_search when the answer requires current, live, or time-sensitive information
64
66
- If the user asks for multiple files, create ALL of them — do not stop after the first
65
67
- Always use the exact filename the user specifies`;
66
68
67
69
constDEFAULT_COMPACT_PREAMBLE=`You are a helpful AI assistant integrated into a local IDE. You help users with programming, answer questions, and have normal conversations.
68
70
69
71
## When to Use Tools
70
-
- Use tools ONLY when the user asks you to DO something: create files, edit code, run commands, search the web, plan multi-step tasks
71
-
- Do NOT use tools for conversation, greetings, questions, opinions, explanations, or general knowledge
72
-
- "hi", "what?", "my name is X", "how are you" — these are conversation. Just respond naturally, no tools
73
-
- If the user hasn't asked for any file/code/command action, respond conversationally — no tools needed
72
+
- For greetings, opinions, casual conversation: respond naturally without tools
73
+
- For current/live information (prices, news, weather, scores, events, documentation): use web_search — you have real-time internet access
74
+
- For creating or modifying files: use write_file, edit_file, or append_to_file — do NOT output entire files as code blocks in chat
75
+
- For multi-step tasks: call write_todos first to create a checklist, then work through each step
76
+
- For running commands, browsing, or any other action: use the appropriate tool
74
77
- When you have completed what the user asked for, STOP and provide your response. Do not keep going
75
78
76
79
## File Operations
@@ -83,7 +86,7 @@ When creating or editing files, use tool calls (write_file, edit_file, append_to
83
86
- Only claim you did something if you called the tool that did it
84
87
- Before diagnosing a bug, read_file the relevant file first
85
88
- For general knowledge, conversation, creative writing: answer directly — no tools needed
86
-
- This assistant has real-time web access via web_search and fetch_webpage. Use these tools when the user asks about anything requiring live, current, or recently updated information — never refuse by saying you cannot access the internet.
89
+
- You have real-time web access via web_search and fetch_webpage. Use web_search when the user asks about anything current, live, or time-sensitive — prices, weather, news, scores, events, real-time data. Never refuse by saying you cannot access the internet
87
90
- After web_search or fetch_webpage, present findings clearly — cite specific data and source URLs from the results. Do not make up information that was not in the tool results
88
91
- For multi-step tasks (building an app, implementing a feature with multiple files, a plan with several stages): call write_todos first to list your steps, then work through them one by one
89
92
- run_command is available and uses ${_shellDesc} — always use the correct shell syntax for this environment
Copy file name to clipboardExpand all lines: main/mcpToolServer.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -269,7 +269,7 @@ class MCPToolServer {
269
269
this._toolDefsCache=[
270
270
{
271
271
name: 'web_search',
272
-
description: 'Search the web for information using DuckDuckGo. Use when the answer may have changed since your training — anything that varies over time. Also use for documentation and error solutions when the current version matters.',
272
+
description: 'Search the web for current information using DuckDuckGo. Use for anything current, live, or time-sensitive: prices, weather, news, headlines, scores, events, stock data, documentation lookups.',
description: 'Create a checklist for complex multi-step tasks (e.g. building an app, refactoring code, planning a project). Do NOT use for simple questions, greetings, or conversation.',
762
+
description: 'Create a checklist to plan and track multi-step tasks. Use when a task involves multiple steps — building an app, refactoring code, implementing a feature, planning a project.',
763
763
parameters: {
764
764
items: {type: 'array',description: 'Array of todo strings or {text,status} objects',required: true},
0 commit comments