Submitting a question to Copilot Chat
You can open Copilot Chat from any page on GitHub. Certain questions may require you to be in a specific context, such as a repository, issue, or pull request. The following procedure describes how to ask a general software related question, and demonstrates the core functionality of Copilot Chat on GitHub. For more information on other scenarios, see Asking Copilot Chat questions in different contexts.
Depending on the question you ask, and your enterprise and organization settings, Copilot may respond using information based on the results of a Bing search. By using Bing search, Copilot can answer a broad range of tech-related questions with up-to-date details based on information currently available on the internet. For information on how to enable or disable Bing search integration, see Managing Copilot policies as an individual subscriber and Managing policies and features for Copilot in your enterprise.
-
At the top right of any page on GitHub, click the button next to the search bar.
The full-page, immersive, mode of Copilot Chat is displayed.
-
In the prompt box, type a question and press Enter.
Some examples of general questions you could ask are:
What are the advantages of the Go programming language?
What is Agile software development?
What is the most popular JavaScript framework?
Give me some examples of regular expressions.
Write a bash script to output today's date.
-
Optionally, after submitting a question, you can click in the text box to stop the response.
-
If Copilot uses a Bing search to answer your question, you can click the n references link at the top of the response to see the search results that Copilot used to answer your question.
-
Within a conversation thread, you can ask follow-up questions. Copilot will answer within the context of the conversation. For example, you could type "tell me more" to get Copilot to expand on its last comment.
You can use your initial question as a foundation for follow-up questions. A detailed foundational prompt can help Copilot provide more relevant answers to your follow-up questions. For more information, see Prompting GitHub Copilot Chat to become your personal AI assistant for accessibility on the GitHub Blog.
-
To start a new conversation, click at the top left of the page.
-
To see a list of your previous conversations, click at the top left of the page.
Viewing and editing generated files within Copilot Chat
Примечание.
This feature is currently in public preview and subject to change.
When you ask a question, Copilot may generate one or more files as part of its response. In the Copilot Chat panel, the files are displayed inline, within the chat response. In immersive view (that is, at https://github.com/copilot), the generated files are displayed in a side panel. You can view and edit the files in the panel, or download them to your computer.
For example, asking Generate a simple calculator using HTML, CSS, and JavaScript
may generate multiple files, such as index.html
, styles.css
, and script.js
.
In immersive view, you can also preview how some file formats, such as Markdown, render by toggling to the "Preview" tab in the side panel.
Regenerating a response with a different model
After Copilot responds to your question, you can regenerate the same prompt using a different model by clicking the retry icon () below the response. The new response will use your selected model and maintain the full context of the conversation.
You can switch between responses to compare the results from different models.
For help deciding which model to use, see Choosing the right AI model for your task.
Using subthreads in a conversation
Subthreads are branches of a conversation that are created from a point in a conversation where you asked a question. Subthreads offer more control and flexibility for exploring aspects of a topic, or new topics, all within the same thread.
You can create and navigate through subthreads in Copilot Chat's immersive view. In the Copilot Chat panel, if you open a conversation that contains subthreads, only the most recently edited subthread is displayed.
You can create a subthread in immersive mode by either editing or retrying any of your questions in the conversation.
To edit a question:
-
Hover over the question you want to edit.
-
Click the button that's displayed.
-
Edit the question, then click Send.
Примечание.
You can only edit the text of a question. You can't edit any attachments.
To retry a question:
-
Hover over the response to a question you want to retry. Resubmitting a question to Copilot may generate a different response.
-
Click the button.
The response to your edited or retried question is displayed in a new subthread.
To navigate between subthreads:
-
If you have retried a question, a retry counter is displayed under the response, alongside the retry button.
Click or to navigate to the previous or next subthread.
-
If you have edited a question, an edit counter is added below the question.
Hover over the counter to display the edit and navigation buttons, then click or to navigate to the previous or next subthread.
Powered by skills
Copilot has access to a collection of skills to fetch data from GitHub, which are dynamically selected based on the question you ask. You can tell which skill Copilot used by clicking to expand the status information in the chat window.
You can explicitly ask GitHub Copilot Chat in GitHub to use a particular skill - for example, Use the Bing skill to find the latest GPT4 model from OpenAI
.
You can generate a list of currently available skills by asking Copilot: What skills are available?
Asking Copilot Chat questions in different contexts
You can ask Copilot Chat different types of questions depending on where you are on GitHub. For example, to ask a question about a specific repository, you must be in the context of that repository. The following sections describe how to access the different contexts.
For examples of the types of questions you can ask in different contexts, see Getting started with prompts for Copilot Chat.
Using images in Copilot Chat
Примечание.
- Attaching images to chat prompts is currently in public preview and is subject to change.
- You can only attach an image in the immersive view of Copilot Chat (https://github.com/copilot), not in the chat panel.
You can attach an image to Copilot and then ask about the image. For example, you can attach:
- A screenshot of a code snippet and ask Copilot to explain the code.
- A mockup of the user interface for an application and ask Copilot to generate the code.
- A flowchart and ask Copilot to describe the processes shown in the image.
- A screenshot of a web page and ask Copilot to generate HTML for a similar page.
Примечание.
The following types of image file are supported: JPEG (.jpg
, .jpeg
), PNG (.png
), GIF (.gif
), or WEBP (.webp
).
Attaching an image to your chat prompt
-
Go to the immersive view of Copilot Chat (https://github.com/copilot).
-
If you see the AI model picker at the top of the page, select one of the models that supports adding images to prompts:
- GPT-4.1 (the default that's used if you don't see a model picker)
- GPT-4o
- Claude Sonnet 3.5
- Claude Sonnet 3.7
- Gemini 2.0 Flash
- Gemini 2.5 Pro
-
Do one of the following:
- Copy an image and paste it into the prompt box at the bottom of the page.
- Click in the prompt box, then click Image. Browse to the image file you want to attach, select it and click Open.
- Drag and drop an image file from your operating system's file explorer into the prompt box.
-
Type your prompt into the chat view to accompany the image. For example,
explain this diagram
,describe each of these images in detail
,what does this error message mean
.
Accessing Copilot Chat from the search bar
You can ask Copilot a question about an entire repository by typing your question in the main search box of the repository.
-
Navigate to a repository on GitHub.
-
Press /, or click in the main search box at the top of the page.
-
In the search box, after
repo:OWNER/REPO
, type the question you want to ask Copilot.For example, you could enter:
- What does this repo do?
- Where is authentication implemented in this codebase?
- How does license file detection work in this repo?
-
Click Ask Copilot.
The GitHub Copilot Chat panel is displayed and Copilot responds to your request.
-
Optionally, after submitting a question, you can click in the text box to stop the response.
Accessing Copilot Chat from the dashboard
You can access Copilot's immersive view from the dashboard. The dashboard is your personalized overview of your activity on GitHub, seen when you visit https://github.com while logged in.
-
Go to the dashboard at https://github.com.
-
In the prompt box, type a question and press Enter.
You will be taken to the immersive view where Copilot responds to your request.
Примечание.
If you don't see the Copilot Chat prompt box on your dashboard, check that Dashboard entry point in enabled in your GitHub Copilot settings.
Sharing Copilot Chat conversations
Примечание.
This feature is currently in public preview and subject to change. During the public preview, this feature is only available to users without enterprise or team memberships.
You can share Copilot Chat conversations from the immersive view (https://github.com/copilot). Shared conversations are public or private (i.e. permission-based), depending on the referenced content, for example, a conversation about a private repository. If you share a private conversation, the recipient must have the necessary permissions to view the content.
Once you share a conversation, the conversation and future messages will be visible to anyone with the link.
-
At the top right of any page on GitHub, click the button next to the search bar.
The full-page, immersive, mode of Copilot Chat is displayed.
-
After you submit your first prompt, a share button is displayed in the upper right corner.
-
Click Share to open the share dialog.
-
To share the conversation, click Share. This will generate a link to the conversation.
-
To copy the conversation link, click the copy icon. The link is copied to your clipboard.
Sharing feedback about GitHub Copilot Chat in GitHub
Примечание.
The ability to provide feedback to GitHub about Copilot pull request summaries is dependent on enterprise settings. For more information, see Managing policies and features for Copilot in your enterprise.
To give feedback about a particular Copilot Chat response, click either the thumbs up or thumbs down icon at the bottom of each chat response.
To give feedback about Copilot Chat in general, click the ellipsis (...) at the top right of the chat panel, then click Give feedback.