Add params check for writeTool (#708)

This commit is contained in:
anj-s
2025-06-03 07:47:27 -07:00
committed by GitHub
parent c71d6ddc3b
commit e9d43b9388

View File

@@ -129,6 +129,9 @@ export class WriteFileTool extends BaseTool<WriteFileToolParams, ToolResult> {
}
getDescription(params: WriteFileToolParams): string {
if (!params.file_path || !params.content) {
return `Model did not provide valid parameters for write file tool`;
}
const relativePath = makeRelative(
params.file_path,
this.config.getTargetDir(),