-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(cli): /status preserves prior error history items (#4169) #4265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1688,6 +1688,11 @@ export const useGeminiStream = ( | |||||||||||||
| pendingRetryCountdownItemRef.current || | ||||||||||||||
| pendingRetryErrorItemRef.current | ||||||||||||||
| ) { | ||||||||||||||
| const pendingError = pendingRetryErrorItemRef.current; | ||||||||||||||
| if (pendingError && pendingError.type === 'error') { | ||||||||||||||
| const { hint: _hint, ...errorWithoutHint } = pendingError; | ||||||||||||||
| addItem(errorWithoutHint, userMessageTimestamp); | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit — timestamp semantics worth a one-liner.
Suggest a short comment so the intent is explicit:
Suggested change
|
||||||||||||||
| } | ||||||||||||||
| clearRetryCountdown(); | ||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defensive narrow looks right.
pendingRetryErrorItemRefis typedHistoryItemWithoutId | null, and the three set-sites (:486-490,:1091-1095,:1880-1887) all producetype: 'error'items today — but the discriminator guard keeps this robust if a future set-site lands a different variant, andHistoryItemErrordeclareshint?: stringintypes.tsso the rest-spread is type-safe with nohintproperty in the persisted shape. No change requested; flagging because it's a thoughtful detail.