Skip to content

TUI: multi-line input + ctrl+o to expand truncated tool results #23

@owainlewis

Description

@owainlewis

Problem

  • Enter submits, so multi-line prompts aren't possible. Pasting multi-line content silently joins.
  • Tool results are truncated to 12 lines with a `+N lines` footer; there's no way to see the rest in the TUI.

Proposal

  • Multi-line: `enter` submits, `shift+enter` (or `alt+enter`) inserts a newline. Show a subtle hint in the placeholder. Textarea height grows to a cap (say 6 rows) then scrolls.
  • Expand: `ctrl+o` toggles `expanded` on the most recently rendered `toolResultBlock`. Optional: cursor selection of any block via `j`/`k` once focused.

Acceptance

  • Multi-line composition works without breaking the existing single-line UX.
  • A long tool result can be expanded to full text inline.

Agent Assessment

Risk: medium
Type: feature
Agent-ready: no

Reason:
The task is clear but touches terminal input semantics, paste behavior, block selection, and rendering of long tool results.

Suggested plan:

  1. Add multi-line input behavior without breaking single-line submit.
  2. Add expansion for long tool results behind a clear keybinding.
  3. Verify paste, submit, expand/collapse, and focus behavior in TUI tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    risk:mediumMedium-risk issue: possibly agent-suitable with human review or stronger teststype:featureNew user-facing or developer-facing capability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions