mirror of
https://github.com/langgenius/dify.git
synced 2026-07-14 17:07:03 +08:00
PR #37460 added an out-of-band `reasoning_chunk` SSE channel for chatflow apps whose LLM node uses reasoning_format=separated: the answer stream stays free of <think> and the chain-of-thought streams on its own channel. difyctl dropped these events, so `--think` showed nothing for such apps. - new sys/io/reasoning module: parse reasoning_chunk payloads (nested under `data`), frame them to stderr identically to inline <think> blocks - ChatStreamPrinter renders reasoning_chunk deltas to stderr under --think - ChatCollector accumulates reasoning as a fallback; the server's persisted message_end metadata.reasoning stays the JSON source of truth - streaming-structured echoes separated reasoning to stderr under --think - update --think help to mention separated reasoning streams