Skip to content

Commit 9fa1ec4

Browse files
CopilotBestraam-stead
authored
Add guidance for repository vs. file attachment in Copilot Spaces (#59360)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bestra <2043348+Bestra@users.noreply.github.com> Co-authored-by: Chris Westra <bestra@github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
1 parent 350f697 commit 9fa1ec4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/copilot/how-tos/provide-context/use-copilot-spaces/create-copilot-spaces.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ You can add two types of context to your space:
4949
* **{% octicon "upload" aria-hidden="true" aria-label="upload" %} Upload a file**: You can upload files directly from your local machine. This includes images, text files, rich documents, and spreadsheets.
5050
* **{% octicon "paste" aria-hidden="true" aria-label="paste" %} Add text content**: You can type or paste free-text content, such as transcripts, notes, or any other relevant information that can help {% data variables.product.prodname_copilot_short %} understand the context of your space.
5151

52+
## Choosing repositories or files as context
53+
54+
When adding sources to your space, you can choose to attach entire repositories or individual files. Understanding how each option works can help you get the best results from {% data variables.product.prodname_copilot_short %}.
55+
56+
* **Attach a repository**: When you attach a repository, {% data variables.product.prodname_copilot_short %} doesn't load the entire project into memory. Instead, it searches the repository and retrieves only the most relevant content needed to answer your question. This is recommended for large-scale use cases (for example, answering questions across all documentation in a repository).
57+
58+
* **Attach individual files**: When you attach a file, its full contents are loaded into {% data variables.product.prodname_copilot_short %}'s context window and considered for every query in that space. This is best when you want {% data variables.product.prodname_copilot_short %} to consistently prioritize a specific document or small set of files.
59+
5260
## Adding context as you're working
5361

5462
You can add files to a space directly from the code view on {% data variables.product.github %}, so you don't need to break your flow when building context for your space.

0 commit comments

Comments
 (0)