mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-01 19:03:42 +00:00
feat(core): steer model to use edit tool for surgical edits, fix a typo (#26480)
This commit is contained in:
@@ -1333,7 +1333,7 @@ Use this tool when the user's query implies needing the content of several files
|
||||
|
||||
exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview > snapshot for tool: replace 1`] = `
|
||||
{
|
||||
"description": "Replaces text within a file. By default, the tool expects to find and replace exactly ONE occurrence of \`old_string\`. If you want to replace multiple occurrences of the exact same string, set \`allow_multiple\` to true. This tool requires providing significant context around the change to ensure precise targeting.
|
||||
"description": "Replaces text within a file. By default, the tool expects to find and replace exactly ONE occurrence of \`old_string\`. If you want to replace multiple occurrences of the exact same string, set \`allow_multiple\` to true. This tool is preferred for surgical edits to existing files as it minimizes token usage, simplifies code reviews, and avoids accidental deletions. This tool requires providing significant context around the change to ensure precise targeting.
|
||||
The user has the ability to modify the \`new_string\` content. If modified, this will be stated in the response.",
|
||||
"name": "replace",
|
||||
"parametersJsonSchema": {
|
||||
@@ -1496,7 +1496,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview >
|
||||
|
||||
exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview > snapshot for tool: write_file 1`] = `
|
||||
{
|
||||
"description": "Writes the complete content to a file, automatically creating missing parent directories. Overwrites existing files. The user has the ability to modify 'content' before it is saved. Best for new or small files; use 'replace' for targeted edits to large files.",
|
||||
"description": "Writes the complete content to a file, automatically creating missing parent directories. Overwrites existing files. The user has the ability to modify 'content' before it is saved. Best for new or small files; use 'replace' for targeted edits to large files to minimize token usage and simplify reviews.",
|
||||
"name": "write_file",
|
||||
"parametersJsonSchema": {
|
||||
"properties": {
|
||||
|
||||
@@ -120,7 +120,7 @@ export const GEMINI_3_SET: CoreToolSet = {
|
||||
|
||||
write_file: {
|
||||
name: WRITE_FILE_TOOL_NAME,
|
||||
description: `Writes the complete content to a file, automatically creating missing parent directories. Overwrites existing files. The user has the ability to modify 'content' before it is saved. Best for new or small files; use '${EDIT_TOOL_NAME}' for targeted edits to large files.`,
|
||||
description: `Writes the complete content to a file, automatically creating missing parent directories. Overwrites existing files. The user has the ability to modify 'content' before it is saved. Best for new or small files; use '${EDIT_TOOL_NAME}' for targeted edits to large files to minimize token usage and simplify reviews.`,
|
||||
parametersJsonSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
@@ -355,7 +355,7 @@ export const GEMINI_3_SET: CoreToolSet = {
|
||||
|
||||
replace: {
|
||||
name: EDIT_TOOL_NAME,
|
||||
description: `Replaces text within a file. By default, the tool expects to find and replace exactly ONE occurrence of \`old_string\`. If you want to replace multiple occurrences of the exact same string, set \`allow_multiple\` to true. This tool requires providing significant context around the change to ensure precise targeting.
|
||||
description: `Replaces text within a file. By default, the tool expects to find and replace exactly ONE occurrence of \`old_string\`. If you want to replace multiple occurrences of the exact same string, set \`allow_multiple\` to true. This tool is preferred for surgical edits to existing files as it minimizes token usage, simplifies code reviews, and avoids accidental deletions. This tool requires providing significant context around the change to ensure precise targeting.
|
||||
The user has the ability to modify the \`new_string\` content. If modified, this will be stated in the response.`,
|
||||
parametersJsonSchema: {
|
||||
type: 'object',
|
||||
|
||||
Reference in New Issue
Block a user