mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
chore(build/compiler): Enable a bunch of strict TS compiler options. (#6138)
This commit is contained in:
@@ -102,11 +102,11 @@ export class WriteFileTool
|
||||
);
|
||||
}
|
||||
|
||||
toolLocations(params: WriteFileToolParams): ToolLocation[] {
|
||||
override toolLocations(params: WriteFileToolParams): ToolLocation[] {
|
||||
return [{ path: params.file_path }];
|
||||
}
|
||||
|
||||
validateToolParams(params: WriteFileToolParams): string | null {
|
||||
override validateToolParams(params: WriteFileToolParams): string | null {
|
||||
const errors = SchemaValidator.validate(
|
||||
this.schema.parametersJsonSchema,
|
||||
params,
|
||||
@@ -144,7 +144,7 @@ export class WriteFileTool
|
||||
return null;
|
||||
}
|
||||
|
||||
getDescription(params: WriteFileToolParams): string {
|
||||
override getDescription(params: WriteFileToolParams): string {
|
||||
if (!params.file_path) {
|
||||
return `Model did not provide valid parameters for write file tool, missing or empty "file_path"`;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ export class WriteFileTool
|
||||
/**
|
||||
* Handles the confirmation prompt for the WriteFile tool.
|
||||
*/
|
||||
async shouldConfirmExecute(
|
||||
override async shouldConfirmExecute(
|
||||
params: WriteFileToolParams,
|
||||
abortSignal: AbortSignal,
|
||||
): Promise<ToolCallConfirmationDetails | false> {
|
||||
|
||||
Reference in New Issue
Block a user