feat: add include tabs content option for Google Docs get actions#5883
feat: add include tabs content option for Google Docs get actions#5883RenzoMXD wants to merge 3 commits intoFlowiseAI:mainfrom
Conversation
Summary of ChangesHello, 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 a significant enhancement to the Google Docs integration by providing users with the ability to control whether content from all document tabs is included when retrieving document or text content. This new functionality allows for more comprehensive data extraction from multi-tab Google Docs, improving the flexibility and utility of the Google Docs tools. Highlights
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 adds a new 'Include Tabs Content' option for the 'Get Document' and 'Get Text Content' actions in the Google Docs tool. The implementation is well-structured, adding the new UI parameter and correctly passing it to the Google Docs API. The logic to handle the new API response structure with tabs is also sound. I've included a couple of suggestions to improve how the API query parameters are constructed, which will make the code more robust and easier to maintain for future enhancements.
| let endpoint = `documents/${encodeURIComponent(params.documentId)}` | ||
| if (params.includeTabsContent) { | ||
| endpoint += '?includeTabsContent=true' | ||
| } |
There was a problem hiding this comment.
To improve maintainability and make the code more robust for handling potential future query parameters, I suggest using URLSearchParams to build the query string. This approach avoids manual string concatenation and correctly handles the ? separator.
| let endpoint = `documents/${encodeURIComponent(params.documentId)}` | |
| if (params.includeTabsContent) { | |
| endpoint += '?includeTabsContent=true' | |
| } | |
| const queryParams = new URLSearchParams() | |
| if (params.includeTabsContent) { | |
| queryParams.set('includeTabsContent', 'true') | |
| } | |
| const endpoint = `documents/${encodeURIComponent(params.documentId)}` + (queryParams.size > 0 ? `?${queryParams.toString()}` : '') |
| let endpoint = `documents/${encodeURIComponent(params.documentId)}` | ||
| if (params.includeTabsContent) { | ||
| endpoint += '?includeTabsContent=true' | ||
| } |
There was a problem hiding this comment.
To improve maintainability and make the code more robust for handling potential future query parameters, I suggest using URLSearchParams to build the query string. This approach avoids manual string concatenation and correctly handles the ? separator.
| let endpoint = `documents/${encodeURIComponent(params.documentId)}` | |
| if (params.includeTabsContent) { | |
| endpoint += '?includeTabsContent=true' | |
| } | |
| const queryParams = new URLSearchParams() | |
| if (params.includeTabsContent) { | |
| queryParams.set('includeTabsContent', 'true') | |
| } | |
| const endpoint = `documents/${encodeURIComponent(params.documentId)}` + (queryParams.size > 0 ? `?${queryParams.toString()}` : '') |
|
thank you! do you have a screenshot or recordings? |

feat: add include tabs content option for Google Docs get actions
Closes #5851