mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00: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 {
|
||||
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(),
|
||||
|
||||
Reference in New Issue
Block a user