mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
Add params check for writeTool (#708)
This commit is contained in:
@@ -129,6 +129,9 @@ export class WriteFileTool extends BaseTool<WriteFileToolParams, ToolResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDescription(params: WriteFileToolParams): string {
|
getDescription(params: WriteFileToolParams): string {
|
||||||
|
if (!params.file_path || !params.content) {
|
||||||
|
return `Model did not provide valid parameters for write file tool`;
|
||||||
|
}
|
||||||
const relativePath = makeRelative(
|
const relativePath = makeRelative(
|
||||||
params.file_path,
|
params.file_path,
|
||||||
this.config.getTargetDir(),
|
this.config.getTargetDir(),
|
||||||
|
|||||||
Reference in New Issue
Block a user