mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-21 09:13:05 -07:00
More reverts.
This commit is contained in:
Generated
-1
@@ -2150,7 +2150,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz",
|
||||
"integrity": "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@hono/node-server": "^1.19.9",
|
||||
"ajv": "^8.17.1",
|
||||
|
||||
@@ -547,7 +547,6 @@ class EditToolInvocation
|
||||
error: undefined,
|
||||
originalLineEnding,
|
||||
strategy: secondAttemptResult.strategy,
|
||||
matchRanges: secondAttemptResult.matchRanges,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -660,7 +659,6 @@ class EditToolInvocation
|
||||
error: undefined,
|
||||
originalLineEnding,
|
||||
strategy: replacementResult.strategy,
|
||||
matchRanges: replacementResult.matchRanges,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -877,10 +875,28 @@ class EditToolInvocation
|
||||
};
|
||||
}
|
||||
|
||||
const totalLength = finalContent.split(String.fromCharCode(10)).length;
|
||||
const metadataParts = [];
|
||||
const totalLength = finalContent.split(String.fromCharCode(10)).length;
|
||||
const metadataParts = [];
|
||||
if (editData.matchRanges && editData.matchRanges.length > 0) {
|
||||
if (editData.matchRanges.length === 1) {
|
||||
metadataParts.push(
|
||||
`start_line: ${editData.matchRanges[0].start}, end_line: ${editData.matchRanges[0].end}`,
|
||||
);
|
||||
} else {
|
||||
const ranges = editData.matchRanges
|
||||
.map((r) => `${r.start}-${r.end}`)
|
||||
.join(', ');
|
||||
metadataParts.push(`ranges: ${ranges}`);
|
||||
}
|
||||
}
|
||||
metadataParts.push(`file_length: ${totalLength}`);
|
||||
|
||||
const llmSuccessMessageParts = [
|
||||
editData.isNewFile
|
||||
? `Created new file: ${this.params.file_path} with provided content.`
|
||||
: `Successfully modified file: ${this.params.file_path} (${editData.occurrences} replacements).`,
|
||||
? `Created new file: ${this.params.file_path} with provided content. [file_length: ${totalLength}]`
|
||||
: `Successfully modified file: ${this.params.file_path}. [${metadataParts.join(', ')}]`,
|
||||
];
|
||||
|
||||
// Return a diff of the file before and after the write so that the agent
|
||||
@@ -1240,7 +1256,6 @@ async function calculateFuzzyReplacement(
|
||||
finalOldString: normalizedSearch,
|
||||
finalNewString: normalizedReplace,
|
||||
strategy: 'fuzzy',
|
||||
matchRanges,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user