mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-23 10:13:12 -07:00
fix(cli): align non-interactive loop warning handling
This commit is contained in:
committed by
Adam Weidman
parent
7c7150f487
commit
6795567d28
@@ -2388,7 +2388,7 @@ describe('runNonInteractive', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should emit warning event for loop_detected custom event in streaming JSON mode', async () => {
|
||||
it('should emit warning event for loop_detected in streaming JSON mode', async () => {
|
||||
vi.mocked(mockConfig.getOutputFormat).mockReturnValue(
|
||||
OutputFormat.STREAM_JSON,
|
||||
);
|
||||
|
||||
@@ -538,19 +538,6 @@ export async function runNonInteractive({
|
||||
streamEnded = true;
|
||||
break;
|
||||
}
|
||||
case 'custom': {
|
||||
if (event.kind === 'loop_detected') {
|
||||
if (streamFormatter) {
|
||||
streamFormatter.emitEvent({
|
||||
type: JsonStreamEventType.ERROR,
|
||||
timestamp: new Date().toISOString(),
|
||||
severity: 'warning',
|
||||
message: 'Loop detected, stopping execution',
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user