Add params check for writeTool (#708)
This commit is contained in:
parent
c71d6ddc3b
commit
e9d43b9388
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue