fix(agent): preserve separators in streamed inline reasoning

This commit is contained in:
yixi ning authored and Xubin Ren committed 2026-10-18 19:57:34 +08:00
1 parent a389633b9c
commit ed8143f7d0
2 files changed
+34 -2

No files matched your search

+2 -2
View File
@@ -288,9 +288,9 @@ class IncrementalThinkExtractor:
thinking, _ = extract_think(buf)
if not thinking or thinking == self._emitted:
return False
new = thinking[len(self._emitted) :].strip()
new = thinking[len(self._emitted) :]
self._emitted = thinking
if not new:
if not new.strip():
return False
await emit(new)
return True