diff options
| author | Taylor Mullen <[email protected]> | 2025-04-18 13:37:51 -0400 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-04-18 14:02:09 -0400 |
| commit | 7cd3b95317c4d9263e514f33589cb359766d463b (patch) | |
| tree | ccca1f6d7e67e91c9a3603dd5251fa2c4c577274 /packages/cli/src/core/gemini-stream.ts | |
| parent | 93fd6a9160d4654baf2f10269ce9689c553bb8cf (diff) | |
Fix linting errors in a number of core and tool files (partial)
- As part of this work I also started building out errors.ts which will be a cumulation of error helpers to better handle the challenging `catch (error: unknown)` requirement.
- More changes are to come, this is truly a partial change in order to not disrupt as many people as possible.
Part of https://b.corp.google.com/issues/411384603
Diffstat (limited to 'packages/cli/src/core/gemini-stream.ts')
| -rw-r--r-- | packages/cli/src/core/gemini-stream.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/cli/src/core/gemini-stream.ts b/packages/cli/src/core/gemini-stream.ts index 314a829d..70361f10 100644 --- a/packages/cli/src/core/gemini-stream.ts +++ b/packages/cli/src/core/gemini-stream.ts @@ -154,14 +154,14 @@ export const processGeminiStream = async ({ if (signal.aborted) { throw new Error('Request cancelled by user'); } - } catch (error: any) { + } catch (error: unknown) { if (renderTimeoutId) { // Ensure render loop stops on error clearTimeout(renderTimeoutId); renderTimeoutId = null; } // Delegate history update for error message - addErrorMessageToHistory(error, setHistory, getNextMessageId); + addErrorMessageToHistory(error as (Error | DOMException), setHistory, getNextMessageId); } finally { isStreamComplete = true; // Signal stream end for render loop completion if (renderTimeoutId) { |
