WeKnora/internal
lyingbug e5c46642e9 fix: handle thinking stream edge cases (unclosed tags + missing done)
Two related fixes for thinking mode streaming:

1. chat_completion_stream.go: When the response channel closes
   unexpectedly (context cancelled, upstream error) while thinking
   is in progress, the <think> tag was left unclosed. This caused
   the stored message to have an incomplete tag, making the frontend
   show a perpetual "thinking..." state on history reload.
   Now we emit a closing </think> tag when the channel ends with
   thinkingStarted=true but thinkingEnded=false.

2. remote_api.go: The thinking Done=true event was only sent when
   the first answer content chunk arrived. If the model produced
   only reasoning with no answer (e.g., finish_reason set with
   empty content), the thinking-done signal was never emitted.
   Now we also check isDone && state.hasThinking at the end of
   processStreamDelta to ensure the done event is always sent.
2026-03-25 22:08:29 +08:00
..
agent feat: auto-describe MCP tool result images via VLM 2026-03-25 21:38:15 +08:00
application fix: handle thinking stream edge cases (unclosed tags + missing done) 2026-03-25 22:08:29 +08:00
common feat: add organization management features 2026-02-09 11:40:25 +08:00
config feat(im): add multi-instance support with Redis-based distributed coordination 2026-03-20 15:49:59 +08:00
container feat(im): add AI card streaming for DingTalk and improve IM platform robustness 2026-03-24 22:12:08 +08:00
database feat: enhance system information display with database version 2026-03-02 21:21:49 +08:00
errors feat: Add agent configuration and cleanup scripts for database migrations 2025-11-05 23:18:44 +08:00
event feat: add fallback response handling and UI indicators 2026-03-05 18:14:14 +08:00
handler feat(im): add DingTalk platform integration 2026-03-24 22:12:08 +08:00
im feat(im): add AI card streaming for DingTalk and improve IM platform robustness 2026-03-24 22:12:08 +08:00
infrastructure feat: expose builtin parser engine in settings 2026-03-20 15:52:33 +08:00
logger chore: update fallback templates 2026-03-17 22:23:24 +08:00
mcp fix: MCP Client connection state not marked as closed after connection loss in SSE transport type 2026-02-02 10:42:19 +08:00
middleware refactor: update session title generation and language context handling 2026-03-17 22:23:24 +08:00
models fix: handle thinking stream edge cases (unclosed tags + missing done) 2026-03-25 22:08:29 +08:00
router feat(knowledge): offload manual processing to async tasks 2026-03-18 21:56:34 +08:00
runtime init commit 2025-08-05 15:08:07 +08:00
sandbox feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
searchutil feat: implement parent-child chunking strategy for enhanced context management 2026-03-05 18:14:14 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing init commit 2025-08-05 15:08:07 +08:00
types feat: auto-describe MCP tool result images via VLM 2026-03-25 21:38:15 +08:00
utils fix(tenant): prevent api_key encryption loss on tenant settings update 2026-03-25 21:25:21 +08:00