Repository navigation
Conversation
The ReasoningPart component was using the `<code>` renderable with `filetype="markdown"`, which renders content as a code block with one token per line during streaming. Switch to the `<markdown>` renderable (same as TextPart) so markdown is rendered inline with proper word-wrapping. Fixes #36037
Models that emit \r characters in question strings cause the TUI to render one word per line. Strip carriage returns in parseQuestions before passing text to the renderer. Fixes #36040
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Splitting into 5 individual PRs for better review granularity. |
|
The following comment was made by an LLM, it may be inaccurate: Found one potential duplicate: PR #35979: fix(llm): map DeepSeek cache miss tokens This appears to be addressing the same issue as fix #3 in the current PR (mapping DeepSeek cache miss tokens to cache write). However, since the current PR references issue #35974, these may be related but separate efforts. You should verify whether #35979 supersedes or complements the DeepSeek cache fix in PR #36086. The other 4 fixes in this PR (markdown renderer, carriage returns, streaming batching, and permission coalescing) do not have matching open PRs. |
Summary
Five focused bug fixes targeting TUI streaming stability and core permission behavior.
fix(tui): use markdown renderer for reasoning content (Reasoning/thinking content renders one token per line in TUI during streaming #36037)
<code filetype="markdown">which rendered tokens one-per-line. Changed to<markdown>matching TextPart's approach.fix(tui): normalize carriage returns in question text (TUI: question/ask prompt renders one word per line when model emits carriage returns #36040)
\rcaused single-word-per-line rendering. Added.replace(/\r/g, "")inparseQuestions.fix(core): map DeepSeek cache miss tokens to cache write (DeepSeek provider: prompt_cache_miss_tokens not mapped to cache.write #35974)
prompt_cache_miss_tokensin provider metadata butgetUsage()never read it. Added fallback to the metadata chain alongside Anthropic/Vertex/Bedrock/Venice.fix(tui): batch streaming delta updates to prevent scroll freeze (TUI scroll freezes for seconds during fast-streaming responses (message.part.delta applied per-chunk with no batching) #36043)
batch()so rapid delta bursts coalesce into a single render cycle.fix(core): coalesce equivalent pending permission requests (Duplicate equivalent external_directory permission requests are emitted for concurrent tool calls #36055)
fs_write) spawned duplicate dialogs. Now coalesces bysessionID + actionso one approval resolves all pending requests of that type.Testing
bun typecheckpasses frompackages/tuiandpackages/opencodeChecklist
else,constoverlet, notry/catch)