Skip to content

feat(read): add tail mode for file reads#1334

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main
Jun 27, 2026
Merged

feat(read): add tail mode for file reads#1334
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add tail support to the Read tool so models can read the last N lines of log/output files, while keeping offset for normal forward reads. Update file read presentation and the Read card UI to handle tail reads and preserve legacy start_line display for older persisted data.

Fixes #

Type and Areas

Type:

Feature

Areas:

Rust core, execution primitives, web UI

Motivation / Impact

This gives the model a direct way to poll the end of growing files, which is useful for command output and logs. offset remains the standard forward-read parameter, and tail=true now covers tail-follow workflows without overloading line offsets.

Verification

  • pnpm run type-check:web
  • cargo test -p bitfun-core read_ -- --nocapture
  • cargo test -p tool-runtime read_file_tail -- --nocapture

Reviewer Notes

tail=true is mutually exclusive with offset. The result payload still reports the actual starting line so existing read-state and edit guardrails continue to work.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@wsp1911 wsp1911 marked this pull request as ready for review June 27, 2026 16:58
@wsp1911 wsp1911 merged commit 38a45e3 into GCWing:main Jun 27, 2026
4 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