AltimateAI / AltimateAI/altimate-code

feat: show elapsed time and context on pending tool spinners

Aperta
#171 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
811
Fork
134
Merge medio
3g 2h
PR unite (30g)
50

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.