Skip to content

Conversation

@Becktor
Copy link

@Becktor Becktor commented Jan 20, 2026

Closes #9655
Related: #8322, #7093, #5872

What does this PR do?

Adds a "Running" section to the sidebar that displays:

  • LLM status (Sending, Planning, Reasoning, Streaming, Waiting, Retry) with elapsed time
  • Running tools (bash, grep, glob, read, write, edit, etc.) with command preview
  • Background agents numbered as agent1:, agent2:, etc.

Implementation

  • Extended SessionStatus with explicit LLM phases (sending, planning, reasoning, streaming, waiting)
  • Server emits status changes at stream events (text-start, reasoning-start, tool-input-start, tool-call, etc.)
  • Created modular running state hooks in tui/util/running*.tsx
  • Tick interval only runs when session is active (performance)
  • 1 second threshold before showing items (avoids flicker - arbitrarily selected)

How did you verify it works?

  • Typecheck and tests pass
  • Tested manually with parallel tools and background agents

Screenshot

image

Becktor and others added 2 commits January 20, 2026 16:57
- Add 'Running' section to sidebar showing active tools with elapsed time
- Display LLM inference states: Sending, Pondering, Streaming, Retry
- Extract extractToolCommand utility to tui/util/running.ts
- Reuse existing formatDuration from @/util/format
- Add tests for extractToolCommand with 100% coverage
- Add 'Running' section showing active tools with elapsed time
- Display LLM inference states: Sending, Pondering, Streaming, Retry
- Show background agents as 'agent1:', 'agent2:', etc. with numbering
- Always show LLM status on top, even while tools/agents are running
- Extract createRunningState hook to tui/util/running.ts
- Reuse existing formatDuration from @/util/format
- Tick interval only runs when session is busy (perf optimization)
- Add tests for extractToolCommand
@github-actions
Copy link
Contributor

Hey! Your PR title Feat/running tools sidebar doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@Becktor Becktor changed the title Feat/running tools sidebar feat(tui) - running tools sidebar Jan 20, 2026
@Becktor Becktor changed the title feat(tui) - running tools sidebar feat(tui): running tools sidebar Jan 20, 2026
Adds a Running section to the sidebar showing LLM status (Pondering, Streaming, etc.) and active tools/agents with elapsed time.

Closes anomalyco#9655
Related: anomalyco#8322, anomalyco#7093, anomalyco#5872
- Extract running-tools.tsx for tool tracking
- Extract running-llm.tsx for LLM status
- Make extractToolCommand generic with pattern-based fallback
- Add tests for generic tool command extraction
Replace nested loops with functional flatMap/filter/map chain for cleaner code
Replace inferred LLM status with explicit server-side phases:
- sending: waiting for LLM response
- reasoning: receiving reasoning tokens
- streaming: receiving text output

This simplifies running-llm.tsx from inference logic to direct status lookup
@Becktor Becktor changed the title feat(tui): running tools sidebar feat(tui): show running tools and LLM status in sidebar Jan 20, 2026
Becktor and others added 3 commits January 20, 2026 20:05
- Add 'planning' status emitted on tool-input-start event
- Add 'waiting' status emitted on tool-call event
- Add TaskMetadata and str() helper for type-safe metadata access
- Remove all 'as any' casts from running tools code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): show running tools and LLM status in sidebar

1 participant