trading_agent.terminal.widgets.tool_run_view
¶
Tool calls in a row, folded into one summary line as Claude Code shows them.
Pictures the tools showed the model stay visible under the summary even while the run is folded, as on the web page.
Typical usage example:
view = ToolRunView('general', run) view.show(run)
ToolRunView
¶
Bases: Vertical
A run of tool calls, with their pictures.
Creates the run's view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
desk_name
|
str
|
The desk, whose folder the pictures are in. |
required |
run
|
ToolRun
|
The tool calls. |
required |
Source code in src/trading_agent/terminal/widgets/tool_run_view.py
compose
¶
Builds the view.
Yields:
| Type | Description |
|---|---|
Widget
|
The folded run and the pictures under it. |
on_mount
¶
show
¶
Updates the summary, the cards and the pictures, adding new ones.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
run
|
ToolRun
|
The tool calls, perhaps with more of them or more results. |
required |
Source code in src/trading_agent/terminal/widgets/tool_run_view.py
expand_all
¶
Opens or folds the run and every card in it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expanded
|
bool
|
True to open, False to fold. |
required |