Skip to content

Commit cbb941f

Browse files
QUSETIONSclaude
andcommitted
fix: include /collapse TUI handler (was missed when committing its test)
The /collapse command registration (cli_commands.py) and its test were committed earlier, but the input_handler.py handler that actually collapses expanded tool-output blocks was left in the working tree. Re-apply it so the committed /collapse command is functional. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 73cb6bf commit cbb941f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

minicode/tui/input_handler.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,26 @@ def _handle_input(
335335
)
336336
return False
337337

338+
# /collapse — collapse every expanded tool-output block in the transcript
339+
if input_text == "/collapse":
340+
collapsed = 0
341+
for entry in state.transcript:
342+
if getattr(entry, "kind", None) == "tool" and not getattr(entry, "collapsed", False):
343+
entry.collapsed = True
344+
if not getattr(entry, "collapsedSummary", None):
345+
entry.collapsedSummary = "output collapsed"
346+
collapsed += 1
347+
_push_transcript_entry(
348+
state,
349+
kind="assistant",
350+
body=(
351+
f"Collapsed {collapsed} tool-output block(s)."
352+
if collapsed
353+
else "No expanded tool-output blocks to collapse."
354+
),
355+
)
356+
return False
357+
338358
# Local commands
339359
if state.session is not None:
340360
refresh_tty_session_snapshot(args, state)

0 commit comments

Comments
 (0)