mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 07:01:09 -07:00
addressing gemini's comments
This commit is contained in:
@@ -410,20 +410,25 @@ export abstract class DeclarativeTool<
|
||||
* This allows the model to explicitly control parallel vs sequential execution.
|
||||
*/
|
||||
private addWaitForPreviousParameter(schema: unknown): unknown {
|
||||
if (!this.isSchemaObject(schema)) {
|
||||
if (!this.isSchemaObject(schema) || schema['type'] !== 'object') {
|
||||
return schema;
|
||||
}
|
||||
|
||||
const props = schema['properties'];
|
||||
let propertiesObj: Record<string, unknown> = {};
|
||||
|
||||
if (schema['type'] !== 'object' || !this.isSchemaObject(props)) {
|
||||
return schema;
|
||||
if (props !== undefined) {
|
||||
if (!this.isSchemaObject(props)) {
|
||||
// properties exists but is not an object, so it's a malformed schema.
|
||||
return schema;
|
||||
}
|
||||
propertiesObj = props;
|
||||
}
|
||||
|
||||
return {
|
||||
...schema,
|
||||
properties: {
|
||||
...props,
|
||||
...propertiesObj,
|
||||
wait_for_previous: {
|
||||
type: 'boolean',
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user