Skip to content

[FEATURE]: Color file contents in read and search tool output by language #56006

Open

Description

@Nowaker

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Much of what an agent does is read and search files, and that output is drawn as plain text: cat src/x.ts | sed -n 1,60p, grep -n, rg with headings, git show HEAD:path, and GitHub code search results from MCP servers. The read and grep tools show no output at all, only their row.

In ten days of my own sessions, two thirds of 57,000 bash calls had a read or search stage, and most named files of a single language (TypeScript alone in 11,900). The output shapes are few and regular: plain file content, path:line:code, rg's path headings followed by line:code, and a line: gutter.

Proposal: a syntax.file_output setting in tui.json, off by default. It colors that output in each file's language and mutes the path and line-number prefixes, and leaves output whose language is unclear plain. It would also let a click on a read or grep row show what it found.

This is AI generated, but under direct supervision and on request of @Nowaker.

Activity

  1. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for the request! To restate it: you'd like an opt-in syntax.file_output setting in tui.json. It would color file contents in read and search output in each file's language: cat/sed -n/git show ref:path output, grep/rg results in path:line:code or heading form, and code search results from MCP servers. Path and line-number prefixes would be muted. It would also let a click on a read or grep row show what that tool found.

    In v2 the TUI draws this output as plain text. TUI plugins can't change that: there's no plugin slot for drawing a tool's output, so it would need a change in OpenCode itself. Maintainers will consider it.

    Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions