You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/concepts/context/repository-indexing.md
+17-6Lines changed: 17 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Indexing repositories for GitHub Copilot Chat
2
+
title: Indexing repositories for GitHub Copilot
3
3
shortTitle: Repository indexing
4
-
intro: '{% data variables.copilot.copilot_chat %} improves responses to questions about code by indexing your repositories.'
4
+
intro: '{% data variables.product.prodname_copilot_short %} improves responses by indexing your repositories.'
5
5
versions:
6
6
feature: copilot
7
7
redirect_from:
@@ -20,19 +20,30 @@ category:
20
20
21
21
## Benefit of indexing repositories
22
22
23
-
{% data variables.copilot.copilot_chat_short %}'s ability to answer natural language questions in a repository context is optimized when the semantic code search index for the repository is up to date.
23
+
{% data variables.product.prodname_copilot_short %}'s ability to answer natural language questions and complete tasks in a repository context is optimized when the semantic code search index for the repository is up to date.
24
24
25
-
When you start a conversation with {% data variables.copilot.copilot_chat_short %} that has a repository context, the repository is automatically indexed to improve context-enriched answers to your questions about the code's structure and logic in {% data variables.product.github %} and {% data variables.product.prodname_vscode %}. For example, you can ask **“How does this repo manage HTTP requests and responses?”** and {% data variables.copilot.copilot_chat_short %} will reference relevant sections of your code to deliver an informed answer.
25
+
**{% data variables.product.prodname_copilot_short %} will not use your indexed repository for model training.**
26
+
27
+
## Semantic code search in {% data variables.copilot.copilot_chat_short %}
26
28
27
-
**{% data variables.copilot.copilot_chat_short %} will not use your indexed repository for model training.**
29
+
When you start a conversation with {% data variables.copilot.copilot_chat_short %} that has a repository context, the repository is automatically indexed to improve context-enriched answers to your questions about the code's structure and logic in {% data variables.product.github %} and {% data variables.product.prodname_vscode %}. For example, you can ask **“How does this repo manage HTTP requests and responses?”** and {% data variables.copilot.copilot_chat_short %} will reference relevant sections of your code to deliver an informed answer.
28
30
29
31
For more information on how to ask questions, see [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-github).
30
32
33
+
## Semantic code search in {% data variables.copilot.copilot_coding_agent %}
34
+
35
+
{% data variables.copilot.copilot_coding_agent %} uses semantic code search to find relevant code based on meaning, rather than relying solely on exact text matches with tools like `grep`. When the agent doesn't know the precise names or patterns to search for, semantic code search helps it locate the right code faster. No configuration is required—the agent automatically uses semantic code search when appropriate.
36
+
37
+
For more information about {% data variables.copilot.copilot_coding_agent %}, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-coding-agent).
38
+
31
39
## About index creation and use
32
40
33
41
Indexing runs in the background and initial indexing can take up to 60 seconds for a large repository. Once a repository has been indexed for the first time, re-indexing is much quicker and the index will typically be automatically updated to include the latest changes within seconds of you starting a new conversation.
34
42
35
-
Once an index has been created for a repository, {% data variables.copilot.copilot_chat_short %} uses it to answer questions asked by any {% data variables.product.prodname_copilot_short %} user in {% data variables.product.github %} and {% data variables.product.prodname_vscode %}.
43
+
Once an index has been created for a repository, it can be used by:
44
+
45
+
* {% data variables.copilot.copilot_chat_short %} in {% data variables.product.github %} and {% data variables.product.prodname_vscode %}
46
+
* {% data variables.copilot.copilot_coding_agent %}
36
47
37
48
> [!TIP] There is no limit to how many repositories you can index.
Copy file name to clipboardExpand all lines: content/copilot/responsible-use/copilot-coding-agent.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,9 @@ For more information about limitations, see [Limitations of {% data variables.co
75
75
76
76
### Customize your experience with additional context
77
77
78
-
{% data variables.copilot.copilot_coding_agent %} leverages your prompt, comments and the repository’s code as context when generating suggested changes. To enhance Copilot’s performance, consider implementing custom Copilot instructions to help the agent better understand your project and how to build, test and validate its changes. For more information, see "Add custom instructions to your repository" in [AUTOTITLE](/copilot/tutorials/coding-agent/best-practices#adding-custom-instructions-to-your-repository).
78
+
{% data variables.copilot.copilot_coding_agent %} leverages your prompt, comments and the repository’s code as context when generating suggested changes. The agent also has access to semantic code search, which helps it find relevant code based on meaning rather than just exact text matches, allowing it to complete tasks faster.
79
+
80
+
To enhance {% data variables.product.prodname_copilot_short %}’s performance, consider implementing custom {% data variables.product.prodname_copilot_short %} instructions to help the agent better understand your project and how to build, test and validate its changes. For more information, see "Add custom instructions to your repository" in [AUTOTITLE](/copilot/tutorials/coding-agent/best-practices#adding-custom-instructions-to-your-repository).
79
81
80
82
For information about other customizations for {% data variables.copilot.copilot_coding_agent %}, see:
Copy file name to clipboardExpand all lines: content/copilot/tutorials/coding-agent/get-the-best-results.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,9 @@ category:
31
31
* Complete acceptance criteria on what a good solution looks like (for example, should there be unit tests?).
32
32
* Directions about which files need to be changed.
33
33
34
+
> [!TIP]
35
+
> {% data variables.copilot.copilot_coding_agent %} has the ability to search your codebase, including semantic code search, which helps it find relevant code based on meaning rather than just exact text matches. Even if you don't specify exact file paths in a task, the agent can often discover the right code on its own.
36
+
34
37
If you pass a task to {% data variables.product.prodname_copilot_short %} by assigning an issue, it's useful to think of the issue you assign to {% data variables.product.prodname_copilot_short %} as a prompt. Consider whether the issue description is likely to work as an AI prompt, and will enable {% data variables.product.prodname_copilot_short %} to make the required code changes.
35
38
36
39
## Choosing the right type of tasks to give to {% data variables.product.prodname_copilot_short %}
0 commit comments