Skip to content

Add line numbers to read tool text output - #38

Merged
K-Mistele merged 1 commit into
mainfrom
add-line-numbers-to-text-file-reader
Sep 4, 2026
Merged

Add line numbers to read tool text output#38
K-Mistele merged 1 commit into
mainfrom
add-line-numbers-to-text-file-reader

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Summary

  • Add right-aligned, 1-indexed line numbers with arrow separator to the read tool's text file output, matching agentlayer's format
  • Update the tool contract description to tell the model that text lines include line numbers
  • Update unit tests and integration test expectations

Test plan

  • ReadTool.vi.test.ts — 10 tests pass (line numbering, right-alignment, offset/limit, truncation, images, errors, macOS filename variants)
  • ToolResultFormattingIntegration.vi.test.ts — 2 tests pass (durable result encoding, model-facing output)
  • Typecheck passes for fold-agent and fold-core

🤖 Generated with Claude Code

Match agentlayer's format: right-aligned 1-indexed line numbers with
arrow separator on every text line. Updates tool description, unit
tests, and integration test expectations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a06e1f-c013-7ca0-a97e-2c566e117dd2
@K-Mistele
K-Mistele merged commit a6ffbf2 into main Sep 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant