mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-22 09:47:47 +00:00
feat(core): Cleanup after migrating tools. (#6199)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import * as Diff from 'diff';
|
||||
import { DEFAULT_DIFF_OPTIONS } from './diffOptions.js';
|
||||
import { tildeifyPath } from '../utils/paths.js';
|
||||
import { ModifiableDeclarativeTool, ModifyContext } from './modifiable-tool.js';
|
||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||
|
||||
const memoryToolSchemaData: FunctionDeclaration = {
|
||||
name: 'save_memory',
|
||||
@@ -294,15 +293,9 @@ export class MemoryTool
|
||||
);
|
||||
}
|
||||
|
||||
override validateToolParams(params: SaveMemoryParams): string | null {
|
||||
const errors = SchemaValidator.validate(
|
||||
this.schema.parametersJsonSchema,
|
||||
params,
|
||||
);
|
||||
if (errors) {
|
||||
return errors;
|
||||
}
|
||||
|
||||
protected override validateToolParamValues(
|
||||
params: SaveMemoryParams,
|
||||
): string | null {
|
||||
if (params.fact.trim() === '') {
|
||||
return 'Parameter "fact" must be a non-empty string.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user