fixed the CI issue and reverted the formating changes

This commit is contained in:
Subal
2026-04-17 20:39:46 +08:00
committed by Xubin Ren
parent 322da6ca06
commit b7de21131f
2 changed files with 9 additions and 12 deletions
+4 -11
View File
@@ -40,17 +40,10 @@ _MAX_INJECTION_CYCLES = 5
_SNIP_SAFETY_BUFFER = 1024
_MICROCOMPACT_KEEP_RECENT = 10
_MICROCOMPACT_MIN_CHARS = 500
_COMPACTABLE_TOOLS = frozenset(
{
"read_file",
"exec",
"grep",
"glob",
"web_search",
"web_fetch",
"list_dir",
}
)
_COMPACTABLE_TOOLS = frozenset({
"read_file", "exec", "grep", "glob",
"web_search", "web_fetch", "list_dir",
})
_BACKFILL_CONTENT = "[Tool result unavailable — call was interrupted or lost]"
+5 -1
View File
@@ -81,7 +81,11 @@ class LLMResponse:
"""
if not self.has_tool_calls:
return False
return self.finish_reason == "tool_calls"
if self.finish_reason == "tool_calls":
return True
if self.finish_reason == "stop":
return True
return False
@dataclass(frozen=True)