Uh oh!
There was an error while loading. Please reload this page.
Commit 80c2dac
committed
Fix: always remove optimistic message on dispatch error to prevent ghost messages
When attemptedTurnStart is true but the thread.turn.start dispatch fails
(e.g. network error), the optimistic user message was never removed from
optimisticUserMessages. The catch block only cleaned up when
!attemptedTurnStart, leaving a permanently visible ghost message.
Move setOptimisticUserMessages filter outside the !attemptedTurnStart guard
so it always runs on error. The prompt/image restoration remains gated
behind !attemptedTurnStart since that only applies to pre-send failures.1 parent 5121dad commit 80c2dac
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
1512 | 1515 | | |
1513 | 1516 | | |
1514 | 1517 | | |
1515 | 1518 | | |
1516 | 1519 | | |
1517 | | - | |
1518 | | - | |
1519 | | - | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
| |||
0 commit comments