在使用 Gemini Code Assist 编码时阅读文档
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本文档介绍了如何在 Gemini Code Assist 中使用 @googledocs
命令直接从 IDE(集成式开发环境)读取、总结和列出 Google 文档资源(例如文档和文件夹)。
Gemini Code Assist Google 文档工具属于 Gemini Code Assist 个人版以及 Gemini Code Assist Standard 和 Enterprise 版的一部分。如需了解详情,请参阅 Gemini Code Assist 概览。
准备工作
请针对您要使用的 Gemini Code Assist 订阅完成以下步骤。
Gemini Code Assist Standard 和 Enterprise
前两个步骤必须由管理员完成,第三个步骤可由各个开发者完成。
- 为 Standard 和 Enterprise 安装 Gemini Code Assist。
- 按照启用 Gemini Code Assist 工具中的步骤为用户启用 Google 文档工具。
- 按照配置 Gemini Code Assist 工具中的步骤,在 IDE 中安装 Google 文档。
Gemini Code Assist 个人版
- 安装 Gemini Code Assist 个人版。
- 按照配置工具中的步骤,在 IDE 中安装 Google 文档工具。
阅读文档
Gemini Code Assist 中的 Google 文档工具可以返回文档的完整内容,以便您直接从 IDE 中阅读。
总结文档
Gemini Code Assist 中的 Google 文档工具可以直接在 IDE 中为您总结 Google 文档的内容。
列出文档
Gemini Code Assist 中的 Google 文档工具可以列出具有各种修饰符的文档,例如最近查看的文档、与您共享的文档或您创建的文档。以上只是该工具列出文档的几种方式。您可以尝试让它以最适合您工作的方式列出、分组或排序文档。
- 如需详细了解 Gemini Code Assist 工具,请参阅工具概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Read documents while coding with Gemini Code Assist\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| Got 5 minutes? Help us improve the Google Workspace documentation by taking a quick [online survey](https://forms.gle/qYR2wnTRueYeQeSi6). |\n\n| **Preview**\n|\n| This product or feature is in preview. Products and features that are\n| in preview are available \"as is\".\n\nThis document describes how you can use the `@googledocs` command in\nGemini Code Assist to read, summarize, and list your Google Docs\nassets, like documents and folders, directly from your IDE (integrated\ndevelopment environment).\n\nThe Gemini Code Assist Google Docs tool is available as part of\nthe Gemini Code Assist for individuals and the\nGemini Code Assist Standard and Enterprise editions. For details, see\nthe\n[Gemini Code Assist overview](/gemini-code-assist/docs/overview).\n\nBefore you begin\n----------------\n\nComplete the following steps for the\nGemini Code Assist subscription you want to use.\n\n### Gemini Code Assist Standard and Enterprise\n\nThe first two steps must be done by an administrator, and the third step\ncan be completed by individual developers.\n\n1. [Install Gemini Code Assist for Standard and Enterprise](https://developers.google.com/gemini-code-assist/docs/set-up-gemini-standard-enterprise).\n2. Enable the Google Docs tool for users by following the steps in [Enable Gemini Code Assist tools](https://developers.google.com/gemini-code-assist/docs/tools-agents/enable-tools-standard-enterprise).\n3. Install Google Docs in your IDE by following the steps in [Configure Gemini Code Assist tools](https://developers.google.com/gemini-code-assist/docs/tools-agents/configure-tools-standard-enterprise).\n\n### Gemini Code Assist for individuals\n\n1. [Install Gemini Code Assist for individuals](https://developers.google.com/gemini-code-assist/docs/set-up-gemini).\n2. Install the Google Docs tool in your IDE by following the steps in [Configure tools](https://developers.google.com/gemini-code-assist/docs/tools-agents/configure-tools).\n\nRead a document\n---------------\n\nThe Google Docs tool in Gemini Code Assist can return the full\ncontents of a document so you can read it directly from your IDE.\n\n- In your IDE,\n [navigate to the Gemini Code Assist chat](https://cloud.google.com/gemini/docs/codeassist/use-gemini-code-assist-chat)\n and enter the following prompt:\n\n @googledocs read \u003cvar translate=\"no\"\u003eMY_DOC\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eMY_DOC\u003c/var\u003e with the title of the document you want to read.\n\nSummarize a document\n--------------------\n\nThe Google Docs tool in Gemini Code Assist can summarize\nGoogle Docs for you directly from your IDE.\n\n- In your IDE,\n [navigate to the Gemini Code Assist chat](https://cloud.google.com/gemini/docs/codeassist/use-gemini-code-assist-chat)\n chat and enter the following prompt:\n\n @googledocs summarize \u003cvar translate=\"no\"\u003eMY_DOC\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eMY_DOC\u003c/var\u003e with the title of the document you want\n summarized.\n\nList documents\n--------------\n\nThe Google Docs tool in Gemini Code Assist can list documents with a\nvariety of modifiers, like recently viewed docs, docs shared with you, or docs\nyou created. These are just a few ways The tool can list documents. Try asking\nit to list, group, or sort documents however best supports your work.\n\n- In your IDE,\n [navigate to the Gemini Code Assist chat](https://cloud.google.com/gemini/docs/codeassist/use-gemini-code-assist-chat)\n chat and enter one of the following prompts:\n\n @googledocs list recent documents\n @googledocs list documents shared with me\n @googledocs list documents created by me\n\nRelated topics\n--------------\n\n- Learn more about Gemini Code Assist tools by reading the [Tools overview](https://developers.google.com/gemini-code-assist/docs/tools-agents/tools-overview)."]]