Skip to content

feat(read): surface lines-read/total in Read transcript label#26

Closed
justin-carper wants to merge 1 commit into
mainfrom
actually-doppler
Closed

feat(read): surface lines-read/total in Read transcript label#26
justin-carper wants to merge 1 commit into
mainfrom
actually-doppler

Conversation

@justin-carper

Copy link
Copy Markdown
Collaborator

Summary

  • Cursor's read tool accepts only { path } — no offset/limit/line-range exists in ReadArgsSchema. Two same-path reads in a transcript are re-reads of identical content, never different sections.
  • Derive per-call detail from result: count content lines vs totalLines. Title becomes e.g. handlers.go (2000/5000 lines).
  • Block metadata now includes linesReturned and fileSize.
  • Added comment above the adapter documenting the no-range constraint so the question doesn't recur.

Test Plan

  • Updated success assertion: title: "/a.ts (2/2 lines)", metadata includes linesReturned, fileSize
  • Added truncation case: title: "/a.ts (1/10 lines)" when content is shorter than totalLines
  • All 193 tests pass, typecheck clean

Cursor ReadArgs = { path } only — no offset/limit (cursor-sdk-shared
ReadArgsSchema is a strip object). Two same-path reads are re-reads of
identical content, never different sections.

Derive per-call detail from result instead: count content lines and
compare to totalLines. Title becomes e.g. "handlers.go (2000/5000 lines)"
so a reader can spot redundant re-reads and see truncation at a glance.

Also stores linesReturned + fileSize in block metadata, and documents
the no-range constraint in a comment above the adapter so the question
does not recur.
justin-carper added a commit that referenced this pull request Jun 17, 2026
* feat(read): surface lines-read/total in Read transcript label

Cursor ReadArgs = { path } only — no offset/limit (cursor-sdk-shared
ReadArgsSchema is a strip object). Two same-path reads are re-reads of
identical content, never different sections.

Derive per-call detail from result instead: count content lines and
compare to totalLines. Title becomes e.g. "handlers.go (2000/5000 lines)"
so a reader can spot redundant re-reads and see truncation at a glance.

Also stores linesReturned + fileSize in block metadata, and documents
the no-range constraint in a comment above the adapter so the question
does not recur.

* chore(deps-dev): bump the dev-dependencies group with 2 updates

Bumps the dev-dependencies group with 2 updates: [@opencode-ai/sdk](https://github.com/sst/opencode-sdk-js) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@opencode-ai/sdk` from 1.17.3 to 1.17.7
- [Release notes](https://github.com/sst/opencode-sdk-js/releases)
- [Changelog](https://github.com/anomalyco/opencode-sdk-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sst/opencode-sdk-js/commits)

Updates `vitest` from 4.1.8 to 4.1.9
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.9/packages/vitest)

---
updated-dependencies:
- dependency-name: "@opencode-ai/sdk"
  dependency-version: 1.17.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: vitest
  dependency-version: 4.1.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump @cursor/sdk from 1.0.18 to 1.0.19

Bumps [@cursor/sdk](https://github.com/cursor/cursor) from 1.0.18 to 1.0.19.
- [Commits](https://github.com/cursor/cursor/commits)

---
updated-dependencies:
- dependency-name: "@cursor/sdk"
  dependency-version: 1.0.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): bump @opencode-ai/plugin from 1.17.3 to 1.17.7

Bumps @opencode-ai/plugin from 1.17.3 to 1.17.7.

---
updated-dependencies:
- dependency-name: "@opencode-ai/plugin"
  dependency-version: 1.17.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(release): 0.4.1-next.0

Consolidate dependency updates and Read transcript feature for @next prerelease:
- feat(read): surface lines-read/total in Read transcript label (#26)
- chore(deps-dev): bump dev-dependencies group, 2 updates (#27)
- chore(deps): bump @cursor/sdk 1.0.18 -> 1.0.19 (#28)
- chore(deps): bump @opencode-ai/plugin 1.17.3 -> 1.17.7 (#29)

* refactor: remove obsolete sqlite3 native-binding self-heal

@cursor/sdk@1.0.19 (#28) drops the sqlite3 native addon in favor of Node's
built-in node:sqlite, so the self-heal that rebuilt sqlite3's binding under
Bun is no longer needed.

- Remove src/native-binding.ts and its tests
- Drop ensureSqliteBinding() from cursor-runtime loadCursorSdk and the
  sidecar agent backend (direct SDK import / client delegation)
- Remove the now-obsolete sqlite troubleshooting note from README

Verified: clean npm ci has no sqlite3, @cursor/sdk@1.0.19 imports cleanly,
and the opencode integration smoke test lists Cursor models.

* chore(release): 0.4.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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