1e8039e029
F4: the round-1 !localStreaming gate was insufficient — the PREVIOUS turn's terminal run stays cached under AI_CHAT_RUN_RQ_KEY(chatId) and cleared the latch early on turn 2+. handleServerStop now removeQueries that key so is null until the current turn's run is fetched fresh; the terminal effect's holds the latch until the current run is observed terminal. Safety net: if that refetch ERRORS while no longer streaming, release the latch so the view can't freeze on a transient failure. F5: first-turn Stop (before the start chunk adopts the chat id) latches a pending stop (stopPendingRef) fired by the onServerChatId adoption effect, so a detached run is authoritatively stopped instead of left running by a silent local-only abort. Known abort-ordering sub-window documented. F6: extract the latch-clear decision to a pure, unit-tested shouldClearStoppingLatch (run-polling.ts) — clears only when stopping, not the streamer, and the current run is terminal; tests are non-vacuous against the round-3/4 buggy behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist