mirror of
https://github.com/langgenius/dify.git
synced 2026-07-16 09:58:42 +08:00
Add onReasoning handlers to both debug-and-preview useChat paths so streamed LLM reasoning deltas accumulate per node into reasoningContent and latch reasoningFinished on the terminal marker. Lift the reasoning-done decision out of ReasoningPanel into the Answer caller: the panel now takes a single derived `done` prop. Done latches on the first answer delta (the only mid-node signal), the reasoning terminal marker, or the response ending — fixing the think->answer handoff and freezing the elapsed timer. Update tests for the new prop.