Here’s the gist of that post, in plain English:
What the author tried
- Explores how Copilot Chat’s @workspace context works in VS Code and how it’s essentially a local RAG setup: your question is embedded, VS Code compares it to prebuilt file embeddings, then sends the most relevant snippets + your question to the LLM. (Medium)
- Notes you can trigger or inspect this with “Build local workspace index” (⇧⌘P) and by checking Output → GitHub Copilot Chat with log level Trace. (Medium)
The pragmatic findings
- Local indexing limit: Copilot Chat will say indexing is limited (the author saw ~2,000 files; other official threads mention ~2,500 for the local index). When you exceed it, a “sparse” index is used, which can degrade answers. (Medium)
- Unofficial hack (do-at-your-own-risk): edit the installed Copilot Chat extension’s
extension.js to raise caps (e.g., the functions for manual/auto index file caps), bump an embeddings-cache max size, toggle a search timeout flag, and tweak a “parallelism” value. Paths are given for macOS/Windows; you need to reload the window afterward. (This is brittle and may be overwritten by updates.) (Medium)
- Where the cache lives: the post points to a workspace-specific embeddings cache JSON under your VS Code user storage; the author observed a size limit and experimented with raising it. (Medium)
- A few gotchas: symlinks weren’t indexed; you’ll see a “still building” warning mid-index; adding to
.gitignore may require a window reload. (Medium)
Safer, supported ways to expand context (vs. patching the extension)
- Use GitHub’s repository indexing: when your repo is on GitHub, Copilot can use a richer remote index that isn’t constrained like the local one. (GitHub)
- Prefer official context features: VS Code’s Workspace context docs explain how @workspace scopes and sources are used; trimming noise with
.gitignore and multi-root workspaces helps. (Visual Studio Code)
- Knowledge bases → Copilot Spaces: GitHub is retiring knowledge bases on Nov 1, 2025 in favor of Copilot Spaces; if you were considering KBs, plan for Spaces instead. (GitHub Docs)
Should you do the hack?
If you just want better answers on big repos, first try: (1) pushing the repo to GitHub to benefit from the remote index; (2) pruning/excluding non-code files; (3) splitting monorepos or using multi-root workspaces. Editing the extension is unsupported, may violate terms, and will likely break on updates—do it only in a disposable setup if you fully understand the risks. (GitHub Docs)
If you want, I can turn these notes into a quick checklist (with commands/paths for macOS/Windows) tailored to your setup.