Skip to content

Fix shared drive download#206

Merged
allenhutchison merged 3 commits intogemini-cli-extensions:mainfrom
raybell-md:fix-shared-drive-download-14910952148528428578
Feb 11, 2026
Merged

Fix shared drive download#206
allenhutchison merged 3 commits intogemini-cli-extensions:mainfrom
raybell-md:fix-shared-drive-download-14910952148528428578

Conversation

@raybell-md
Copy link
Contributor

@raybell-md raybell-md commented Feb 9, 2026

Closes #205.

Tested locally and it works.

This is a Jules PR see raybell-md#7 for more details

google-labs-jules bot and others added 2 commits February 9, 2026 21:30
- Added `supportsAllDrives: true` and `includeItemsFromAllDrives: true` to Drive API calls in `DriveService`, `DocsService`, `SheetsService`, and `SlidesService`.
- Improved `drive.downloadFile` to robustly handle full Drive URLs by extracting the file ID using `extractDocumentId`.
- Updated unit tests to verify Shared Drive support and URL handling.

Co-authored-by: raybell-md <196701227+raybell-md@users.noreply.github.com>
- Added `supportsAllDrives: true` and `includeItemsFromAllDrives: true` to Drive API calls in `DriveService`, `DocsService`, `SheetsService`, and `SlidesService`.
- Improved `drive.downloadFile` to robustly handle full Drive URLs by extracting the file ID using `extractDocumentId`.
- Updated unit tests to verify Shared Drive support and URL handling.

Co-authored-by: raybell-md <196701227+raybell-md@users.noreply.github.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @raybell-md, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the integration with Google Drive by enabling comprehensive support for shared drives across document, spreadsheet, and presentation services. It also introduces the ability to download files directly using their full Google Drive URLs, streamlining the user experience for file management and access. These changes address a known issue and ensure broader compatibility with Google Drive's collaborative features.

Highlights

  • Enhanced Google Drive API Calls for Shared Drives: The pull request updates various Google Drive API calls across Docs, Sheets, and Slides services to include supportsAllDrives: true and includeItemsFromAllDrives: true parameters. This ensures that operations like creating, listing, getting, and updating files correctly interact with shared drives.
  • Direct Google Drive URL Support for Downloads: The DriveService.downloadFile method has been enhanced to accept full Google Drive URLs as input. It now extracts the file ID from the URL, providing more flexibility for users to initiate downloads directly from a shared link.
  • Comprehensive Test Coverage: New and updated test cases have been added for DocsService, DriveService, SheetsService, and SlidesService to validate the correct implementation of shared drive support and the new direct URL download functionality.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • workspace-server/src/tests/services/DocsService.test.ts
    • Updated files.create, files.update, files.get, and files.list test expectations to include supportsAllDrives: true.
    • Added includeItemsFromAllDrives: true to files.list test expectations.
  • workspace-server/src/tests/services/DriveService.test.ts
    • Added a new test case to verify the downloadFile method's ability to handle full Google Drive URLs and correctly use supportsAllDrives.
  • workspace-server/src/tests/services/SheetsService.test.ts
    • Updated files.list test expectations to include supportsAllDrives: true and includeItemsFromAllDrives: true.
  • workspace-server/src/tests/services/SlidesService.test.ts
    • Updated files.list test expectations to include supportsAllDrives: true and includeItemsFromAllDrives: true.
  • workspace-server/src/services/DocsService.ts
    • Added supportsAllDrives: true to files.create, files.get, and files.update API calls.
    • Added supportsAllDrives: true and includeItemsFromAllDrives: true to files.list API calls.
  • workspace-server/src/services/DriveService.ts
    • Imported the extractDocumentId utility.
    • Modified the downloadFile method to extract the file ID from a provided Google Drive URL.
    • Ensured supportsAllDrives: true is passed to files.get for both metadata retrieval and media download.
  • workspace-server/src/services/SheetsService.ts
    • Added supportsAllDrives: true and includeItemsFromAllDrives: true to files.list API calls.
  • workspace-server/src/services/SlidesService.ts
    • Added supportsAllDrives: true and includeItemsFromAllDrives: true to files.list API calls.
Activity
  • The author, raybell-md, initiated this pull request to resolve issue unable to download a file from a shared drive #205, which likely pertains to shared drive download functionality.
  • Local testing has been performed by the author, confirming the changes are functional.
  • This pull request is part of a broader 'Jules PR' effort, with further context available in raybell-md/workspace/pull/7.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses the issue of supporting shared drives by consistently adding supportsAllDrives: true and includeItemsFromAllDrives: true to Google Drive API calls across DocsService, DriveService, SheetsService, and SlidesService. The corresponding tests have been updated to reflect these changes, ensuring correctness. Additionally, the downloadFile method in DriveService has been enhanced to accept full Google Drive URLs, not just file IDs, and a new test has been added to cover this new functionality. The changes are well-implemented and align with the PR's goal. I have one suggestion to improve the new test's assertions for better specificity and robustness.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Contributor

@allenhutchison allenhutchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the contribution.

@allenhutchison allenhutchison merged commit 4c7200b into gemini-cli-extensions:main Feb 11, 2026
14 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.

unable to download a file from a shared drive

2 participants