Repository navigation
condense ipython tool calls into a single-line summary - #193
Conversation
ENG-4145 Condense tool calls into main semantic values
Right now, we show collapsed versions of the IPython blocks by default, which shows 3-4 lines of the input and output to the user. At any time, users can hit ctrl+o to expand all blocks and see all the code within these. The line limit is great, but this is inherently not so useful as you cannot extract meaningful data from just 1-2 lines of input and output, especially when one line is often just %%bash. We're considering doubling down and simplifying the UI so we don't render these blocks at all, and instead have a single descriptive line for each tool call, and users just hit ctrl+o if they actually want to see what these tool calls are. It would be incredibly cool to have natural language semantic summaries of each tool call. For example, Vercel's v0 shows "Read particles file" "Removed hover interaction" "Removed event listeners", etc, for each tool call, which can then be expanded to see the actual tool call block. Albeit this idea might be slow and token expensive with tool calls, so we can avoid that unless you think it's feasible. So instead, if that isn't possible, we can simplify it to be a single line with different states. For each IPython block, we can simply show a line with an animated ascii icon to the left and then basic information, similar to our current "Working", "Waiting", "Writing code", etc animation. The main things we should show are python/bash, main commands being run if possible (like git, sed, or whatever is being written— unsure what we can do for python code here though), number of tokens, time, and any other interesting ideas |
…t-ai#193) * condense ipython tool calls into a single-line summary * trim comments * update ipython cell tests for single-line collapsed view
Note
Low Risk
Interactive TUI presentation and status labeling only; expand behavior and execution paths are unchanged aside from clearer done-state when rehydrating past sessions.
Overview
Collapsed IPython/bash tool calls now render as one truncated status line instead of multi-line code/output previews. The line shows a colored status glyph (✓/✗/▸), language, the leading bash command (with
cd … &&stripped and comments skipped), ↑/↓ line counts, duration, and error name, plus the expand key hint.statusKindnow treats a cell as done when any result exists (stdout, stderr, result, error, diffs, or content), so sessions rehydrated without a liveexecutionStartedevent no longer show running. Expanded view (Ctrl+O) is unchanged: full panel with code, output, and diffs.Tests were updated to expect the new collapsed copy and to set
expanded: truewhere full diff/panel output is asserted.Reviewed by Cursor Bugbot for commit 2035cfc. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Condense collapsed IPython tool calls into a single-line status summary
IPythonCellComponentcells now render a single status line instead of a multi-line preview, showing a status marker (✓/✗/▸), language (bash/python), an optional summarized bash command, input/output line counts, duration, and error name.summarizeCell,collapseWhitespace, andtruncateDescriptorstrip magic prefixes, comments, blank lines, and leadingcd … &&sequences before truncating the command to fit available width.statusKindnormalizes cell state to a single category (done/error/aborted/running/queued); cells rehydrated with results but no live start now showdoneinstead ofrunning.Macroscope summarized 2035cfc.