mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
Merge pull request #2110 from QwenLM/fix/clear-message-after-change-modle
fix(cli): clear static error message when starting new query
This commit is contained in:
commit
a4136f484d
2 changed files with 81 additions and 3 deletions
|
|
@ -1107,8 +1107,13 @@ export const useGeminiStream = (
|
|||
if (!options?.isContinuation) {
|
||||
setModelSwitchedFromQuotaError(false);
|
||||
// Commit any pending retry error to history (without hint) since the
|
||||
// user is starting a new conversation turn
|
||||
if (pendingRetryCountdownItemRef.current) {
|
||||
// user is starting a new conversation turn.
|
||||
// Clear both countdown-based errors AND static errors (those without
|
||||
// an active countdown timer, e.g. "Press Ctrl+Y to retry").
|
||||
if (
|
||||
pendingRetryCountdownItemRef.current ||
|
||||
pendingRetryErrorItemRef.current
|
||||
) {
|
||||
clearRetryCountdown();
|
||||
}
|
||||
}
|
||||
|
|
@ -1203,7 +1208,8 @@ export const useGeminiStream = (
|
|||
}
|
||||
// Only clear auto-retry countdown errors (those with an active timer).
|
||||
// Do NOT clear static error+hint from handleErrorEvent — those should
|
||||
// remain visible until the user presses Ctrl+Y to retry.
|
||||
// remain visible until the user presses Ctrl+Y to retry or starts
|
||||
// a new conversation turn (cleared in submitQuery).
|
||||
if (retryCountdownTimerRef.current) {
|
||||
clearRetryCountdown();
|
||||
}
|
||||
|
|
@ -1250,6 +1256,7 @@ export const useGeminiStream = (
|
|||
handleLoopDetectedEvent,
|
||||
clearRetryCountdown,
|
||||
pendingRetryCountdownItemRef,
|
||||
pendingRetryErrorItemRef,
|
||||
setPendingRetryErrorItem,
|
||||
],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue