Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.31 KB

File metadata and controls

27 lines (16 loc) · 1.31 KB

Part 03: Referencing Code Files in Chat

In this section, you'll learn how to reference existing code files in your chat conversations.

  1. [] Open the Products.razor again from the Store project.

  2. [] Ensure that GitHub Copilto Chat is open by clicking on the Github Copilot Chat in the top-right corner of Visual Studio and select Open Chat Window or press Ctrl+\+C if Copilot chat isn't open.

    Open chat window dialog

  3. Change the mode to Ask

    Change to chat

  4. Start a new chat by clicking the + icon in the top right corner of the chat window.

    New chat

  5. [] Type: #ProductService.cs to reference the ProductService file.

  6. [] Ask: How would I implement getting and visualizing the products in a table using the code in #ProductService and the css required.

  7. [] Review the code suggestion but don't implement it yet.

  8. [] Notice how Copilot can reference existing code to provide contextual suggestions.

Key Takeaway: Referencing files in your chat provides Copilot with the context it needs to give more accurate, project-specific suggestions.


Back: Part 02 - Enhancing UI with Inline Chat | Next: Part 04 - Using Custom Instructions