@workspace
A context variable in GitHub Copilot Chat that uses semantic indexing and a RAG architecture to enable AI reasoning over an entire code workspace. It supports complex programming assistance tasks such as cross-file refactoring and project-level code understanding.
Timeline (last 90 days)
@workspace is a context variable in GitHub Copilot Chat that enables the AI to reason with the entire workspace as its scope
Entering @workspace in the Copilot chat box scans the files, directory structure, and dependencies within the workspace to build an overall understanding of the project
@workspace does not stuff all files verbatim into the context window; instead it employs a retrieval and indexing mechanism that first builds a semantic index of the codebase and then dynamically selects the most relevant file snippets for reasoning based on the query
The more specific and targeted the question, the more accurate the results @workspace returns, because a more precise query vector retrieves more relevant code snippets
@workspace can locate all call sites while generating differentiated modification plans based on the specific usage at each site, making it more reliable than regex search-and-replace for semantic-level refactoring involving type signature changes or interface contract adjustments
For very large monorepos, the context retrieved by @workspace may still be incomplete, and it is recommended to manually review critical changes
The index quality of @workspace depends on the clarity of the project structure, and well-organized codebases yield better results
All Facts (7)
@workspace is a context variable in GitHub Copilot Chat that enables the AI to reason with the entire workspace as its scope
50%UnverifiedEntering @workspace in the Copilot chat box scans the files, directory structure, and dependencies within the workspace to build an overall understanding of the project
50%Unverified@workspace does not stuff all files verbatim into the context window; instead it employs a retrieval and indexing mechanism that first builds a semantic index of the codebase and then dynamically selects the most relevant file snippets for reasoning based on the query
50%UnverifiedThe more specific and targeted the question, the more accurate the results @workspace returns, because a more precise query vector retrieves more relevant code snippets
50%Unverified@workspace can locate all call sites while generating differentiated modification plans based on the specific usage at each site, making it more reliable than regex search-and-replace for semantic-level refactoring involving type signature changes or interface contract adjustments
50%UnverifiedFor very large monorepos, the context retrieved by @workspace may still be incomplete, and it is recommended to manually review critical changes
50%UnverifiedThe index quality of @workspace depends on the clarity of the project structure, and well-organized codebases yield better results
50%