agentHost: support file completions across workspace roots - #328944
Merged
DonJayamanne merged 5 commits intoAug 4, 2026
Conversation
Enumerate the minimal set of workspace roots, attribute files to their most specific logical root, and preserve fair deterministic completion ordering across chat surfaces. Handle partial root failures, bounded ripgrep concurrency, and worktree rebasing for nested secondary roots. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Extends agent-host file completions across effective session and chat workspace roots.
Changes:
- Adds multi-root enumeration, deduplication, ranking, and failure isolation.
- Preserves attachment ownership during worktree rebasing.
- Adds completion filtering, ordering metadata, documentation, and tests.
Show a summary per file
| File | Description |
|---|---|
chatInputCompletions.test.ts |
Tests filtering and ordering metadata. |
agentHostChatContribution.test.ts |
Tests nested-root rebasing. |
chatInputCompletionUtils.ts |
Adds resource filter text helper. |
agentHostInputCompletionsBase.ts |
Assigns completion ordering metadata. |
agentHostInputCompletions.ts |
Enables absolute-path filtering. |
agentHostSessionHandler.ts |
Restricts rebasing to the owning root. |
SESSIONS.md |
Documents completion behavior. |
sessions/.../agentHostInputCompletions.ts |
Applies filtering in Agents Window. |
agentHostWorkspaceFiles.test.ts |
Tests caching and nested enumeration. |
agentHostFileCompletionUtils.test.ts |
Tests root planning and attribution. |
agentHostFileCompletionProvider.test.ts |
Covers multi-root provider behavior. |
agentService.ts |
Supplies logging to the provider. |
agentHostWorkspaceFiles.ts |
Limits concurrency and propagates failures. |
agentHostFileCompletionUtils.ts |
Computes logical and enumeration roots. |
agentHostFileCompletionProvider.ts |
Implements multi-root ranking and labels. |
agentHostWorkingDirectories.ts |
Resolves the most-specific owning root. |
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 4
- Review effort level: Balanced
Rename the helper to describe its deepest-containing-directory semantics and document the behavior at its shared definition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve host ordering through Monaco filtering, disambiguate duplicate filenames, recover nested roots after truncated enumeration, and start cache expiry only after successful completion. Clarify the completion-root model with focused documentation and regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
17 tasks
Qualify duplicate filenames with concise logical-root and relative-path labels while keeping unique filenames basename-only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DonJayamanne
marked this pull request as ready for review
August 4, 2026 12:25
DonJayamanne
enabled auto-merge (squash)
August 4, 2026 12:25
Giuspepe
approved these changes
Aug 4, 2026
DonJayamanne
deleted the
don/agents/multi-root-support-feasibility-study
branch
August 4, 2026 14:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
For #321651
Testing
npm run typecheck-clientnpm run valid-layers-checkHere's what it looks like now
