altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

feat: show elapsed time and context on pending tool spinners

Open anandgupta42 opened this issue 8 months ago • 0 comments

What does this issue track?

When the LLM is generating a tool call (e.g., writing a bash command, preparing a query), the TUI shows a spinner with "Writing command..." but gives no indication of:

  • How long it's been waiting
  • What the tool is doing
  • Whether it's stuck or actually working

This makes it impossible to distinguish between "LLM is thinking" (normal, takes 5-30s) and "something is stuck" (needs intervention).

Proposed improvements

  1. Elapsed timer on pending spinners — show ⠋ Writing command... 12s so the user knows how long they've been waiting
  2. Partial input preview — as the LLM streams the command, show a truncated preview of what's been generated so far (e.g., ⠋ Writing command... 12s SELECT o.*, c.name...)
  3. Context line — show which agent/model is generating the response (already shown in footer, but easy to miss)

Why this matters

Data engineering queries can take 30+ seconds for the LLM to compose (complex JOINs, CTEs, window functions). During this time, the user stares at a static spinner with no feedback. This is especially frustrating when:

  • The LLM is generating a very long command (bash script, multi-statement SQL)
  • Network latency causes slow token streaming
  • The user needs to decide whether to interrupt (esc) or wait

Screenshot

The current experience — no way to know if this is 2 seconds in or 30 seconds in:

~ Writing command...
■ Builder · claude-opus-4-6

Proposed experience

⠋ Writing command... 14s
  SELECT o.*, c.name, SUM(li.amount) as total FROM orders o J...
■ Builder · claude-opus-4-6

Scope

This affects all tool types in pending state, not just data tools. The InlineTool component's pending prop is a static string — it could accept a reactive elapsed timer.

anandgupta42 avatar Mar 16 '26 00:03 anandgupta42