[PR #13885] feat(tui): add native status line template system #14854

Open
opened 2026-02-16 18:19:36 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13885

State: open
Merged: No


What does this PR do?

Fixes #8619

Adds a native status line template system. Users define per-target template strings in config (tui.status_line.templates) that are resolved server-side from built-in variables (project info, session data, model/token stats), shell commands, and plugin-provided data. Display targets: terminal_title, session_footer, home_footer.

This replaces the plugin breadcrumb approach (which costs ~30 tokens/message and pollutes chat context) with a zero-LLM-cost alternative.

How did you verify your code works?

  • 24 unit tests covering resolver, format specs, and shell command execution
  • Full test suite passes (1008 pass, 0 fail, 5 skip)
  • tsgo --noEmit clean across all 17 packages
  • Build passes across all 11 platform targets
  • Manual TUI verification: terminal title, session footer, and home footer all rendering correctly
  • API endpoint verified via curl: GET /tui/statusline returns resolved templates
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13885 **State:** open **Merged:** No --- ### What does this PR do? Fixes #8619 Adds a native status line template system. Users define per-target template strings in config (`tui.status_line.templates`) that are resolved server-side from built-in variables (project info, session data, model/token stats), shell commands, and plugin-provided data. Display targets: `terminal_title`, `session_footer`, `home_footer`. This replaces the plugin breadcrumb approach (which costs ~30 tokens/message and pollutes chat context) with a zero-LLM-cost alternative. ### How did you verify your code works? - 24 unit tests covering resolver, format specs, and shell command execution - Full test suite passes (1008 pass, 0 fail, 5 skip) - `tsgo --noEmit` clean across all 17 packages - Build passes across all 11 platform targets - Manual TUI verification: terminal title, session footer, and home footer all rendering correctly - API endpoint verified via curl: `GET /tui/statusline` returns resolved templates
yindo added the pull-request label 2026-02-16 18:19:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14854