diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-28 20:30:49 +0530 |
|---|---|---|
| committer | Aman Kumar <145339995+amankumarsingh77@users.noreply.github.com> | 2026-08-02 19:12:46 +0530 |
| commit | b67faca60b21b0cf74d5c967f0f8d215ad601e93 (patch) | |
| tree | 12e8580e1b88c3ce6a2d9157cfa678cb7a55a73c /src/domains/render.ts | |
| parent | a6ec1d0915106b127affbd6b5fcc9efec48ef712 (diff) | |
refactor(domains): strip comment noise
Removes module banners, step markers, and comments restating the code.
Keeps one-line notes for safeJs's trust boundary, the select-match null
sentinels, the TUI width clamp, the single-window tab rule, the input
synthesis quirks (char events, keyCode, mousemove, focus, compositor),
the stale AX value, ignored-wrapper recursion, and isolated-tab routing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/domains/render.ts')
| -rw-r--r-- | src/domains/render.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/domains/render.ts b/src/domains/render.ts index 1e4e30d..3f7f0dc 100644 --- a/src/domains/render.ts +++ b/src/domains/render.ts @@ -1,12 +1,3 @@ -/** - * Shared TUI renderer for text-heavy tool output (browser_web_search, - * browser_read_page). Gives the native pi expand/collapse (Ctrl+O) behavior: - * a compact preview by default, the full body when expanded — mirroring the - * pattern in browser_execute_js (src/domains/js.ts:81-109). - * - * The full text always goes to the LLM via ToolOk.text; this only governs the - * human-facing TUI view. - */ import { Markdown, Text } from "@mariozechner/pi-tui"; import { getMarkdownTheme, keyHint } from "@mariozechner/pi-coding-agent"; import type { Component } from "@mariozechner/pi-tui"; @@ -15,13 +6,9 @@ import { isRecord } from "../util/guards"; const COMPACT_PREVIEW_LINES = 6; -/** Structured payload a text-heavy tool stores so renderResult can rebuild views. */ export type ExpandableText = { - /** One-line summary shown above the body in both states (e.g. "5 results · google"). */ readonly summary: string; - /** The full rendered body (markdown/plain). */ readonly body: string; - /** Path to the on-disk full output when the LLM text was truncated, if any. */ readonly fullOutputPath?: string; }; @@ -31,10 +18,6 @@ const isExpandableText = (value: unknown): value is ExpandableText => const extractRender = (details: unknown): unknown => isRecord(details) ? details["render"] : undefined; -/** - * Build a renderResult over an ExpandableText stored in `details.render`. - * `label` names the tool for the error fallback (e.g. "web_search"). - */ export const renderExpandableText = ( label: string, result: { readonly details?: unknown }, |
