mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1723] [MERGED] Fix terminal LLM stream cleanup #5235
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1723
Author: @Promansis
Created: 5/31/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @Promansis
Base:
refactor← Head:fix/issue-1716-llm-stream-channel📝 Commits (5)
2137405auto cancel streams when streams finished.f952e35Fix LLM stream semantic completion cleanupba30678Fix terminal LLM stream cleanupc30ce81Harden LLM stream cancellation pruninge2c920aSuppress LLM stream done events📊 Changes
4 files changed (+436 additions, -72 deletions)
View changed files
📝
src-tauri/crates/llm/src/lib.rs(+233 -50)📝
src-tauri/src/state.rs(+82 -11)📝
src/shared/api/llm-api.test.ts(+74 -2)📝
src/shared/api/llm-api.ts(+47 -9)📄 Description
Linked issue
Closes #1716
Why this change
[DONE]-style marker.What changed
finish_reasonchunks as terminal while preserving emitted token content.finishReasonchunks as terminal even when the terminal metadata block does not include content parts.Refactor impact
Primary owner:
shared API, Rust LLM provider transport
Impact areas reviewed:
Boundary notes:
src/shared/api/llm-api.ts.src-tauri/crates/llm.Pressure points touched:
llm_stream_channelcleanup behavior through the shared API wrapper.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
pnpm exec vitest run src/shared/api/llm-api.test.tscargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_chat_stream_finish_reason_is_terminalcargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm google_stream_finish_reason_is_terminal_without_partspnpm typecheckcargo check --manifest-path src-tauri/Cargo.tomlpnpm check:architectureDocs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
No visible UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.