Repository navigation
feat(google): One read tool for Docs, Sheets and Slides - #3364
Merged
Merged
Conversation
readGoogleFile takes a link or a file id. A Docs, Sheets, or Slides link names the type in its path, and the file must have that type. A bare id or a Drive link takes the type from the Drive MIME type. It replaces readGoogleDoc, readGoogleSheet, and readGoogleSlides. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 13, 2026
BYK
pushed a commit
that referenced
this pull request
Nov 13, 2026
## Problem #3364 replaced `readGoogleDoc`, `readGoogleSheet` and `readGoogleSlides` with `readGoogleFile`. #3349 then merged with its old `readTool` map, so on `main` the Attach note for a Google file tells the next Turn to use a tool that no longer exists. ## Fix - A link type's `readTool` is now a plain tool name (`readTool?: string`), not a function of the URL. One tool reads every Google file type and takes the type from the link, so the map has no job left. - Google file links name `readGoogleFile`. Calendar still names no tool. ## Tests - `junior-google/tests/links.test.ts`: Docs, Sheets and Slides links name `readGoogleFile`, and Calendar names none. - `tests/integration/api/object-attach.test.ts` uses the new `readTool` shape. - Passing: typecheck, lint, the Google tests (62), the attach, objects and egress integration tests (10), the object-links e2e (8), and the pre-push hook. <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ab4ab1661aa9222ed540303a34bce2d99 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ab4ab1661aa9222ed540303a34bce2d99) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab4ab1661aa9222ed540303a34bce2d99/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
23 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the review on #3349.
Problem
The agent had to pick one of three tools (
readGoogleDoc,readGoogleSheet,readGoogleSlides) for a Google file. Each tool accepted any link or id, so a wrong choice failed only after the Drive read. Code that tells the agent how to read a file, such as the Attach note in #3349, had to map each type to its tool.Fix
readGoogleFiletool takes a link or a file id./document/d/,/spreadsheets/d/,/presentation/d/), and the file must have that type.mimeTypethatfiles.getreturns.rangeis optional, and a range on a file that is not a Sheet is refused. Docs still returnrevision_id.typeandfile_id(this replacesdocument_id,spreadsheet_id, andpresentation_id), plus the fields for that type.revision_iddescription and the "changed after you read it" error), thesearchGoogleFilesdescription and the README now namereadGoogleFile.FILE_TYPES, so the link cards and the tool use one map.Tests
tests/files.test.ts:All Google tests pass (57). typecheck and lint pass, and so does the pre-push hook.
via @BYK.
--
View Session [Sentry]