Sử dụng tính năng trò chuyện của Gemini Code Assist
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài liệu này mô tả cách nhận hỗ trợ dựa trên AI trong cuộc trò chuyện Hỗ trợ mã Gemini trong môi trường phát triển tích hợp (IDE).
Tính năng trò chuyện của công cụ Hỗ trợ mã Gemini cho phép bạn viết câu lệnh hoặc câu hỏi bằng ngôn ngữ tự nhiên (được gọi là lệnh gọi) để nhận nội dung giải thích chuyên sâu về mã, hành động được đề xuất hoặc quy trình làm việc có hướng dẫn giúp bạn hoàn thành công việc nhanh chóng và hiệu quả mà không cần rời khỏi IDE.
Cách mở tính năng trò chuyện của Gemini Code Assist trong IDE:
VS Code
Trong thanh hoạt động của IDE, hãy nhấp vào
sparkGemini Code Assist (Hỗ trợ mã Gemini).
Trong cuộc trò chuyện Hỗ trợ lập trình bằng Gemini, hãy nhập câu lệnh rồi nhấp vào biểu tượng sendGửi.
IntelliJ
Trong cửa sổ công cụ Gemini Code Assist, hãy nhập một câu lệnh rồi nhấp vào Submit (Gửi).
Xem nhật ký truy vấn
VS Code
VS Code không có nhật ký truy vấn.
IntelliJ
Nếu muốn sử dụng lại các câu lệnh trước đó, bạn có thể tìm thấy các câu lệnh đó trong Nhật ký truy vấn trong cửa sổ công cụ Hỗ trợ mã Gemini bằng cách nhấp vào lịch biểuHiện nhật ký truy vấn.
Đặt lại nhật ký trò chuyện
Tính năng Trợ giúp lập trình của Gemini sử dụng nhật ký trò chuyện để biết thêm ngữ cảnh khi phản hồi câu lệnh của bạn. Nếu nhật ký trò chuyện không còn liên quan đến mục tiêu của bạn, bạn có thể đặt lại nhật ký trò chuyện:
VS Code
Trong ngăn Gemini Code Assist (Hỗ trợ mã Gemini), hãy nhấp vào biểu tượng deleteReset Chat (Đặt lại cuộc trò chuyện).
IntelliJ
Trong cửa sổ công cụ Gemini Code Assist, hãy nhấp vào biểu tượng deleteXoá nhật ký trò chuyện. Thao tác này cũng sẽ xoá nhật ký truy vấn của bạn.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-11 UTC."],[],[],null,["# Use the Gemini Code Assist chat\n\n\u003cbr /\u003e\n\nThis document describes how to get AI-powered assistance in the\n[Gemini Code Assist](/gemini/docs/codeassist/overview) chat in your integrated\ndevelopment environment (IDE).\n\nGemini Code Assist chat lets you write natural language statements\nor questions (called *prompts*) to get in-depth explanations of your code,\nsuggested actions, or guided workflows that help you complete tasks quickly and\nefficiently without leaving the IDE.\n\nLearn [how and when Gemini\nfor Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\nOpen Gemini Code Assist chat\n----------------------------\n\nTo open Gemini Code Assist chat in the IDE: \n\n### VS Code\n\n1. In the activity bar of your IDE, click\n spark\n **Gemini Code Assist**.\n\n2. In the **Gemini Code Assist** chat, enter a prompt and then click\n send\n **Send**.\n\n### IntelliJ\n\nIn the Gemini Code Assist tool window, enter a prompt and\nthen click **Submit**.\n\nView query history\n------------------\n\n### VS Code\n\nQuery history isn't available for VS Code.\n\n### IntelliJ\n\nIf you want to re-use your previous prompts, you can find them in your\n**Query History** in the **Gemini Code Assist** tool window by clicking\nschedule **Show Query History**.\n\nClear chat history\n------------------\n\nGemini Code Assist uses the chat history for additional context\nwhen responding to your prompts. If your chat history is no longer relevant to\nwhat you're trying to achieve, you can clear the chat history: \n\n### VS Code\n\n1. In the **Gemini Code Assist** pane, click\n history **Resume\n Previous Chat**.\n\n2. When the previous chats appear in the **Select chat** menu, hold your\n pointer over the chat that you want to clear, and select **Delete**.\n\n | **Note:** Your chat threads persist across IDE sessions until you clear your history.\n3. When prompted to confirm the deletion of the chat thread, select\n **Delete**.\n\n### IntelliJ\n\nIn the **Gemini Code Assist** tool window, click\ndelete **Clear\nConversation History**. This also clears your query history.\n\n| **Note:** Your query and conversation history persist across IDE sessions until you clear the history.\n\nWhat's next\n-----------\n\nFor more information on using Gemini Code Assist in the IDE, see [Code with Gemini Code Assist](/gemini/docs/codeassist/write-code-gemini)."]]