Show tool call args in chat and raise max iterations to 15
- Display tool arguments in the calling indicator so user can see what each tool call is doing (e.g. Calling delegate_task(prompt='...')...) - Bump MAX_TOOL_ITERATIONS from 5 to 15 for complex chat interactions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cora-start
parent
d9e0020b67
commit
dd39fa2e94
|
|
@ -16,7 +16,7 @@ from .router import build_system_prompt, format_messages_for_llm
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
MAX_TOOL_ITERATIONS = 5
|
||||
MAX_TOOL_ITERATIONS = 15
|
||||
|
||||
_IMAGE_MIME = {
|
||||
".png": "image/png",
|
||||
|
|
@ -250,9 +250,17 @@ class Agent:
|
|||
)
|
||||
|
||||
for i, tc in enumerate(unique_tool_calls):
|
||||
args = tc.get("input", {})
|
||||
# Build a brief summary of the args for the user
|
||||
arg_summary = ", ".join(
|
||||
f"{k}={repr(v)[:60]}" for k, v in args.items()
|
||||
)
|
||||
if arg_summary:
|
||||
yield f"\n\n*Calling {tc['name']}({arg_summary})...*\n"
|
||||
else:
|
||||
yield f"\n\n*Calling {tc['name']}...*\n"
|
||||
try:
|
||||
result = self._tools.execute(tc["name"], tc.get("input", {}))
|
||||
result = self._tools.execute(tc["name"], args)
|
||||
except Exception as e:
|
||||
result = f"Tool error: {e}"
|
||||
log.info("Tool %s result: %s", tc["name"], result[:500])
|
||||
|
|
|
|||
Loading…
Reference in New Issue