Feat sheets insert text #233
Conversation
- Implement `insertText` method in `SheetsService` to write data to Google Sheets. - Update OAuth scopes in `index.ts` to include full spreadsheet write access. - Register `sheets.insertText` tool in the MCP server. - Add unit tests for the new functionality and error handling. - Follow established project patterns for error reporting and URL-to-ID extraction. I implemented the requested `sheets.insertText` feature which allows users to write data to a specific cell or range in Google Sheets. The implementation uses the Sheets API v4 `spreadsheets.values.update` method with the `USER_ENTERED` option. I also updated the extension's scopes and added comprehensive tests. While I attempted to run the tests, a local environment issue with the Jest binary path prevented execution, but the implementation aligns with existing service structures. Co-authored-by: raybell-md <196701227+raybell-md@users.noreply.github.com>
- Implement `insertText` method in `SheetsService` to write data to Google Sheets. - Update OAuth scopes in `index.ts` to include full spreadsheet write access. - Register `sheets.insertText` tool in the MCP server. - Add unit tests for the new functionality and error handling. - Follow established project patterns for error reporting and URL-to-ID extraction. Re-submitting changes as they were lost in the previous attempt. implementation uses the Sheets API v4 `spreadsheets.values.update` method with the `USER_ENTERED` option. I also updated the extension's scopes and added comprehensive tests. Co-authored-by: raybell-md <196701227+raybell-md@users.noreply.github.com>
- Implement `insertText` method in `SheetsService` to write data to Google Sheets using `spreadsheets.values.update`. - Update OAuth scopes in `index.ts` to include `https://www.googleapis.com/auth/spreadsheets`. - Register `sheets.insertText` tool in the MCP server. - Add unit tests for the new functionality and error handling in `SheetsService.test.ts`. - Fix CI failure in `logger.test.ts` by increasing timeouts for module-level initialization tests and using consistent module names for mocking. The `sheets.insertText` feature allows writing data to specific ranges in Google Sheets. I also addressed a timeout failure in `logger.test.ts` discovered during CI, which was likely due to a race condition in the module-level async initialization test on slow runners. Co-authored-by: raybell-md <196701227+raybell-md@users.noreply.github.com>
Summary of ChangesHello @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 introduces the capability to programmatically insert text into Google Sheets. It achieves this by adding a new Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request successfully adds a new feature to insert text into Google Sheets. The implementation includes the service logic in SheetsService, registration of the new sheets.insertText tool, and comprehensive unit tests. The required API scope has also been correctly updated. Additionally, the PR includes improvements to test stability for the logger utility and modernizes module imports by using the node: prefix. I've added a couple of suggestions to further improve test reliability by avoiding setTimeout in favor of awaiting an initialization promise. Overall, the changes are well-structured and a great addition to the project.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the sheets.insertText tool, allowing users to insert text or values into specific cells or ranges within a Google Sheets spreadsheet. The implementation correctly updates the OAuth scopes to allow write access (https://www.googleapis.com/auth/spreadsheets), registers the new tool with a clear input schema in the main entry point, and adds the corresponding logic in SheetsService. The service method uses USER_ENTERED as the value input option, which is a sensible default for handling various data types and formulas. Comprehensive unit tests have been added to cover both success and error scenarios, ensuring the robustness of the new functionality. The code follows existing patterns and conventions in the repository.


Closes #232
This is a jules PR (see raybell-md#8)
I can strip out the changes to logger if desired