Skip to content

Commit e5f11eb

Browse files
authored
Improve tool call visualization (#20)
1 parent af09fee commit e5f11eb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

openhands/core/conversation/conversation.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,11 @@ def _render_tool_call(self, tool_call) -> None:
7171
try:
7272
args = json.loads(tool_call.function.arguments)
7373
args_text = ""
74-
75-
# Show only the most important arguments
76-
key_args = ["command", "path", "message", "query"]
77-
for key in key_args:
78-
if key in args and args[key]:
79-
value = str(args[key])
80-
if len(value) > 100:
81-
value = value[:97] + "..."
82-
args_text += f" {key}: {value}\n"
74+
for key, value in args.items():
75+
value = str(value)
76+
if len(value) > 100:
77+
value = value[:97] + "..."
78+
args_text += f" {key}: {value}\n"
8379

8480
except (json.JSONDecodeError, AttributeError):
8581
args_text = f" arguments: {tool_call.function.arguments}"

0 commit comments

Comments
 (0)