fix(tool-rendering): wrap expanded result bodies #17

Merged
eleith merged 1 commits from fix/tool-rendering-expanded-wrapping into main 2026-11-05 19:51:29 +00:00

Summary

  • Wrap expanded builtin tool-result bodies using Pi's public ANSI-aware wrapTextWithAnsi, including code, diffs, errors, and grep fallback output.
  • Preserve compact clipping, logical line/file/match and hidden counts, deferred rendering, and the 210-column frame cap.
  • Retain a width guard for graphemes that cannot fit in a one-column viewport; narrow characters remain visible and oversized glyphs get a clipping marker.
  • Remove web-search error pre-wrapping now that the shared error frame handles it. Existing web-fetch/search answer wrapping keeps its current behavior.
  • Include patch changesets for tool-rendering and web-search-codex, plus a brief rendering-policy README note.

Validation

  • Full suite: 76 files / 1,450 tests passed.
  • Typecheck, lint, repository formatting, whitespace checks, and all nine extension builds passed.
  • Tests cover all seven builtin result renderers, bash success/partial/error states, code indentation/token spacing, full grep fallback text, Unicode/ANSI continuity, width-one fallback, blank lines, resizing/cache/210-column cap, expansion toggles, logical counts, and immutable results.
  • Existing web render tests protect full expanded answers and errors.
  • No live interactive-terminal validation or minimum-runtime-version test performed; validation used the installed Pi 1.5 SDK.

Reviews

Independent code, readability, and test reviews completed. Three targeted test gaps were fixed with explicit whitespace-sensitive code rows, a long unfamiliar grep fixture, and exact mixed-Unicode width-one expectations. Follow-up reviews are clear.

Output padding, redundant caching, and other audit cleanup remain separate work. Execution and model-facing truncation are unchanged.

## Summary - Wrap expanded builtin tool-result bodies using Pi's public ANSI-aware `wrapTextWithAnsi`, including code, diffs, errors, and grep fallback output. - Preserve compact clipping, logical line/file/match and hidden counts, deferred rendering, and the 210-column frame cap. - Retain a width guard for graphemes that cannot fit in a one-column viewport; narrow characters remain visible and oversized glyphs get a clipping marker. - Remove web-search error pre-wrapping now that the shared error frame handles it. Existing web-fetch/search answer wrapping keeps its current behavior. - Include patch changesets for tool-rendering and web-search-codex, plus a brief rendering-policy README note. ## Validation - Full suite: 76 files / 1,450 tests passed. - Typecheck, lint, repository formatting, whitespace checks, and all nine extension builds passed. - Tests cover all seven builtin result renderers, bash success/partial/error states, code indentation/token spacing, full grep fallback text, Unicode/ANSI continuity, width-one fallback, blank lines, resizing/cache/210-column cap, expansion toggles, logical counts, and immutable results. - Existing web render tests protect full expanded answers and errors. - No live interactive-terminal validation or minimum-runtime-version test performed; validation used the installed Pi 1.5 SDK. ## Reviews Independent code, readability, and test reviews completed. Three targeted test gaps were fixed with explicit whitespace-sensitive code rows, a long unfamiliar grep fixture, and exact mixed-Unicode width-one expectations. Follow-up reviews are clear. Output padding, redundant caching, and other audit cleanup remain separate work. Execution and model-facing truncation are unchanged.
eleith-gitea-agent Bot added 1 commit 2026-11-05 19:29:31 +00:00
fix(tool-rendering): wrap expanded result bodies
ci/woodpecker/pr/codex Pipeline was successful
ci/woodpecker/pr/compact-editor-chrome Pipeline was successful
ci/woodpecker/pr/notifications Pipeline was successful
ci/woodpecker/pr/progress Pipeline was successful
ci/woodpecker/pr/title-status Pipeline was successful
ci/woodpecker/pr/tool-rendering Pipeline was successful
ci/woodpecker/pr/web-fetch Pipeline was successful
ci/woodpecker/pr/web-search-codex Pipeline was successful
ci/woodpecker/pr/welcome Pipeline was successful
ci/woodpecker/push/codex Pipeline was successful
ci/woodpecker/push/compact-editor-chrome Pipeline was successful
ci/woodpecker/push/notifications Pipeline was successful
ci/woodpecker/push/progress Pipeline was successful
ci/woodpecker/push/title-status Pipeline was successful
ci/woodpecker/push/tool-rendering Pipeline was successful
ci/woodpecker/push/web-fetch Pipeline was successful
ci/woodpecker/push/web-search-codex Pipeline was successful
ci/woodpecker/push/welcome Pipeline was successful
bcdcf31461
eleith merged commit bcdcf31461 into main 2026-11-05 19:51:29 +00:00
eleith deleted branch fix/tool-rendering-expanded-wrapping 2026-11-05 19:51:29 +00:00
Sign in to join this conversation.