style: use loguru native format and trim comments in interim retry
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
⚡️ Delivers core agent functionality in just **~4,000** lines of code — **99% smaller** than Clawdbot's 430k+ lines.
|
||||
|
||||
📏 Real-time line count: **3,781 lines** (run `bash core_agent_lines.sh` to verify anytime)
|
||||
📏 Real-time line count: **3,793 lines** (run `bash core_agent_lines.sh` to verify anytime)
|
||||
|
||||
## 📢 News
|
||||
|
||||
|
||||
@@ -227,16 +227,11 @@ class AgentLoop:
|
||||
)
|
||||
else:
|
||||
final_content = self._strip_think(response.content)
|
||||
# Some models (MiniMax, Gemini Flash, GPT-4.1, etc.) send an
|
||||
# interim text response (e.g. "Let me investigate...") before
|
||||
# making tool calls. If no tools have been used yet and we
|
||||
# haven't already retried, add the text to the conversation
|
||||
# and give the model one more chance to use tools.
|
||||
# We do NOT forward the interim text as progress to avoid
|
||||
# duplicate messages when the model simply answers directly.
|
||||
# Some models send an interim text response before tool calls.
|
||||
# Give them one retry; don't forward the text to avoid duplicates.
|
||||
if not tools_used and not text_only_retried and final_content:
|
||||
text_only_retried = True
|
||||
logger.debug(f"Interim text response (no tools used yet), retrying: {final_content[:80]}")
|
||||
logger.debug("Interim text response (no tools used yet), retrying: {}", final_content[:80])
|
||||
messages = self.context.add_assistant_message(
|
||||
messages, response.content,
|
||||
reasoning_content=response.reasoning_content,
|
||||
|
||||
Reference in New Issue
Block a user