add reasoning content to on progress message
This commit is contained in:
@@ -202,9 +202,16 @@ class AgentLoop:
|
|||||||
|
|
||||||
if response.has_tool_calls:
|
if response.has_tool_calls:
|
||||||
if on_progress:
|
if on_progress:
|
||||||
clean = self._strip_think(response.content)
|
thoughts = [
|
||||||
if clean:
|
self._strip_think(response.content),
|
||||||
await on_progress(clean)
|
response.reasoning_content,
|
||||||
|
*(f"Thinking [{b.get('signature', '...')}]:\n{b.get('thought', '...')}"
|
||||||
|
for b in (response.thinking_blocks or []) if isinstance(b, dict) and "signature" in b)
|
||||||
|
]
|
||||||
|
|
||||||
|
if combined := "\n\n".join(filter(None, thoughts)):
|
||||||
|
await on_progress(combined)
|
||||||
|
|
||||||
await on_progress(self._tool_hint(response.tool_calls), tool_hint=True)
|
await on_progress(self._tool_hint(response.tool_calls), tool_hint=True)
|
||||||
|
|
||||||
tool_call_dicts = [
|
tool_call_dicts = [
|
||||||
|
|||||||
Reference in New Issue
Block a user