The Codex parallel-calls fan-out emits N independent SSE streams concurrently, so a chunk for tab 2 can arrive between two chunks for tab 1. The previous chat-adapter logic appended every chunk into a single `cumulativeText` buffer in arrival order, which made tab 1's text show up under tab 2's header (or vice versa) whenever the workers raced. With four or more parallel calls the rendered output became unreadable. Replaced the append-on-arrival path with per-tab buffers keyed by `tab_id`, plus a `renderCodexBuffer()` helper that rebuilds the Codex block from scratch on every fan-out event: - `codex_tab_open` allocates an empty buffer for the tab id. - `codex_tab_chunk` appends only into that tab's buffer. - `codex_tab_error` records the error string against the tab id. - `codex_tab_close` marks the tab finished (visual separator). - `codex_gather` flips a flag that draws the `--- Synthesis ---` divider; the synthesis text itself still arrives as a normal content delta on the same stream and so is not duplicated here. The block is re-rendered in `tab_id` order on every event, so the final output is deterministic regardless of arrival interleaving. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| package-lock.json | ||
| package.json | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||