mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 11:04:42 -07:00
Use ranged reads and limited searches and fuzzy editing improvements (#19240)
This commit is contained in:
committed by
GitHub
parent
55c628e967
commit
ce84b3cb5f
@@ -208,6 +208,7 @@ export interface ParsedLog {
|
||||
stdout?: string;
|
||||
stderr?: string;
|
||||
error?: string;
|
||||
prompt_id?: string;
|
||||
};
|
||||
scopeMetrics?: {
|
||||
metrics: {
|
||||
@@ -1051,6 +1052,7 @@ export class TestRig {
|
||||
args: string;
|
||||
success: boolean;
|
||||
duration_ms: number;
|
||||
prompt_id?: string;
|
||||
};
|
||||
}[] = [];
|
||||
|
||||
@@ -1079,6 +1081,13 @@ export class TestRig {
|
||||
args = argsMatch[1];
|
||||
}
|
||||
|
||||
// Look for prompt_id in the context
|
||||
let promptId = undefined;
|
||||
const promptIdMatch = context.match(/prompt_id:\s*'([^']+)'/);
|
||||
if (promptIdMatch) {
|
||||
promptId = promptIdMatch[1];
|
||||
}
|
||||
|
||||
// Also try to find function_name to double-check
|
||||
// Updated regex to handle tool names with hyphens and underscores
|
||||
const nameMatch = context.match(/function_name:\s*'([\w-]+)'/);
|
||||
@@ -1091,6 +1100,7 @@ export class TestRig {
|
||||
args: args,
|
||||
success: success,
|
||||
duration_ms: duration,
|
||||
prompt_id: promptId,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1138,6 +1148,7 @@ export class TestRig {
|
||||
args: obj.attributes.function_args || '{}',
|
||||
success: obj.attributes.success !== false,
|
||||
duration_ms: obj.attributes.duration_ms || 0,
|
||||
prompt_id: obj.attributes.prompt_id,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1152,6 +1163,7 @@ export class TestRig {
|
||||
args: obj.attributes.function_args,
|
||||
success: obj.attributes.success,
|
||||
duration_ms: obj.attributes.duration_ms,
|
||||
prompt_id: obj.attributes.prompt_id,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1242,6 +1254,7 @@ export class TestRig {
|
||||
args: string;
|
||||
success: boolean;
|
||||
duration_ms: number;
|
||||
prompt_id?: string;
|
||||
};
|
||||
}[] = [];
|
||||
|
||||
@@ -1258,6 +1271,7 @@ export class TestRig {
|
||||
args: logData.attributes.function_args ?? '{}',
|
||||
success: logData.attributes.success ?? false,
|
||||
duration_ms: logData.attributes.duration_ms ?? 0,
|
||||
prompt_id: logData.attributes.prompt_id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user