mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 13:04:49 -07:00
Enable write_todo tool and fix output function schema (#12905)
This commit is contained in:
@@ -514,7 +514,7 @@ export class Config {
|
||||
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
|
||||
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
||||
this.useSmartEdit = params.useSmartEdit ?? true;
|
||||
this.useWriteTodos = params.useWriteTodos ?? false;
|
||||
this.useWriteTodos = params.useWriteTodos ?? true;
|
||||
this.initialUseModelRouter = params.useModelRouter ?? false;
|
||||
this.useModelRouter = this.initialUseModelRouter;
|
||||
this.disableModelRouterForAuth = params.disableModelRouterForAuth ?? [];
|
||||
|
||||
@@ -173,14 +173,48 @@ export class WriteTodosTool extends BaseDeclarativeTool<
|
||||
},
|
||||
},
|
||||
required: ['description', 'status'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
required: ['todos'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
override get schema() {
|
||||
return {
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
parametersJsonSchema: this.parameterSchema,
|
||||
responseJsonSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
todos: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
description: {
|
||||
type: 'string',
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
enum: TODO_STATUSES,
|
||||
},
|
||||
},
|
||||
required: ['description', 'status'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
required: ['todos'],
|
||||
additionalProperties: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override validateToolParamValues(
|
||||
params: WriteTodosToolParams,
|
||||
): string | null {
|
||||
|
||||
Reference in New Issue
Block a user