@deep-tui/plugin-render-read-file
v0.1.0
Published
Prettified read_file output with line numbers and syntax highlighting for Deep TUI's TUI.
Readme
@deep-tui/plugin-render-read-file
Renders read_file activity in Deep TUI's TUI. By default, reads join the compact
Claude-style exploration log and file contents stay out of the transcript:
• Explored
└ Read src/index.ts
Read src/shell.tsSet showResults: true to render successful file contents as a bounded box
with line numbers, language detection, and optional syntax highlighting:
┌ src/index.ts · 120 lines · typescript
│ 1 │ import ...
│ 2 │ ...
│ [100 lines omitted]
└ ✓ read_fileThe plugin is a pure TUI event renderer. It replaces only successful
read_file tool-result events whose output is a string. Read errors and other
tools fall through to the default renderer. Syntax highlighting is provided by
the existing TUI code-highlighter contract (for example
@deep-tui/plugin-highlight-shiki); without a registered highlighter, the file
renders as plain text with line numbers.
The bundled read_file tool also attaches type: "read-file" presentation
metadata carrying the requested path. The renderer uses that metadata first,
so resumed durable conversations keep the file label and language even though
tool arguments are not persisted.
Configuration
showResults: trueshows successful file contents (defaultfalse);maxLineslimits visible file lines (default 20);maxLineLengthis the syntax-highlighting safety threshold; longer lines remain complete, render plain, and wrap (default 4000);showLineNumbers: falsehides the line-number gutter;syntaxHighlight: falsedisables the code-highlighter hook;showToolName: falsehides the tool name in the completion footer.
