Revert "feat(core): refine Edit and WriteFile tool schemas for Gemini 3 (#19476)"

This reverts commit fb1b1b451d.
This commit is contained in:
Christian Gunderman
2026-02-26 22:20:01 +00:00
parent 55d0bf5f8e
commit f93b9f849c
2 changed files with 32 additions and 4 deletions
@@ -1304,7 +1304,21 @@ The user has the ability to modify the \`new_string\` content. If modified, this
"type": "string",
},
"instruction": {
"description": "A clear, semantic instruction for the code change, acting as a high-quality prompt for an expert LLM assistant. It must be self-contained and explain the goal of the change.",
"description": "A clear, semantic instruction for the code change, acting as a high-quality prompt for an expert LLM assistant. It must be self-contained and explain the goal of the change.
A good instruction should concisely answer:
1. WHY is the change needed? (e.g., "To fix a bug where users can be null...")
2. WHERE should the change happen? (e.g., "...in the 'renderUserProfile' function...")
3. WHAT is the high-level change? (e.g., "...add a null check for the 'user' object...")
4. WHAT is the desired outcome? (e.g., "...so that it displays a loading spinner instead of crashing.")
**GOOD Example:** "In the 'calculateTotal' function, correct the sales tax calculation by updating the 'taxRate' constant from 0.05 to 0.075 to reflect the new regional tax laws."
**BAD Examples:**
- "Change the text." (Too vague)
- "Fix the bug." (Doesn't explain the bug or the fix)
- "Replace the line with this new line." (Brittle, just repeats the other parameters)
",
"type": "string",
},
"new_string": {
@@ -1312,7 +1326,7 @@ The user has the ability to modify the \`new_string\` content. If modified, this
"type": "string",
},
"old_string": {
"description": "The exact literal text to replace, unescaped. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.",
"description": "The exact literal text to replace, preferably unescaped. For single replacements (default), include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.",
"type": "string",
},
},
@@ -300,12 +300,26 @@ The user has the ability to modify the \`new_string\` content. If modified, this
type: 'string',
},
instruction: {
description: `A clear, semantic instruction for the code change, acting as a high-quality prompt for an expert LLM assistant. It must be self-contained and explain the goal of the change.`,
description: `A clear, semantic instruction for the code change, acting as a high-quality prompt for an expert LLM assistant. It must be self-contained and explain the goal of the change.
A good instruction should concisely answer:
1. WHY is the change needed? (e.g., "To fix a bug where users can be null...")
2. WHERE should the change happen? (e.g., "...in the 'renderUserProfile' function...")
3. WHAT is the high-level change? (e.g., "...add a null check for the 'user' object...")
4. WHAT is the desired outcome? (e.g., "...so that it displays a loading spinner instead of crashing.")
**GOOD Example:** "In the 'calculateTotal' function, correct the sales tax calculation by updating the 'taxRate' constant from 0.05 to 0.075 to reflect the new regional tax laws."
**BAD Examples:**
- "Change the text." (Too vague)
- "Fix the bug." (Doesn't explain the bug or the fix)
- "Replace the line with this new line." (Brittle, just repeats the other parameters)
`,
type: 'string',
},
old_string: {
description:
'The exact literal text to replace, unescaped. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.',
'The exact literal text to replace, preferably unescaped. For single replacements (default), include at least 3 lines of context BEFORE and AFTER the target text, matching whitespace and indentation precisely. If this string is not the exact literal text (i.e. you escaped it) or does not match exactly, the tool will fail.',
type: 'string',
},
new_string: {