search: fix search-on-type not working in agents window search editor#316117
Merged
Conversation
Register search.searchOnType and search.searchOnTypeDebouncePeriod settings in search.common.contribution.ts so they are available in the agents window. Previously these were only registered in search.contribution.ts (workbench-only), so the agents window read undefined for searchOnType, disabling search-as-you-type. Also introduce searchConfigurationNode in search.ts (common) to share the configuration node metadata (id, order, title, type) across all three registration sites without duplication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Search Editor “search as you type” in the Agents window by ensuring the relevant search configuration settings are registered in code that’s loaded by both the full workbench and the Agents window.
Changes:
- Move
search.searchOnTypeandsearch.searchOnTypeDebouncePeriodsetting registrations intosearch.common.contribution.ts(shared by workbench + Agents window). - Introduce a shared
searchConfigurationNodeconstant and reuse it across Search, Search Editor, and common search contributions to avoid duplicated configuration-node boilerplate. - Remove the moved settings from the full workbench-only
search.contribution.tsregistration.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.ts | Uses shared searchConfigurationNode when registering Search Editor settings. |
| src/vs/workbench/contrib/search/common/search.ts | Adds exported searchConfigurationNode shared config metadata. |
| src/vs/workbench/contrib/search/browser/search.contribution.ts | Reuses shared searchConfigurationNode and removes workbench-only registration of search-on-type settings. |
| src/vs/workbench/contrib/search/browser/search.common.contribution.ts | Registers search.searchOnType and debounce settings in the shared contribution so Agents window picks them up. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bhavyaus
approved these changes
May 12, 2026
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.
Problem
In the agents window, the search editor does not show results as you type — you have to press Enter to trigger a search.
Root cause:
search.searchOnTypeandsearch.searchOnTypeDebouncePeriodwere only registered insearch.contribution.ts, which is the full workbench-only search contribution. The agents window does not import this file, soconfigurationService.getValue('search').searchOnTypereturnedundefined(falsy). TheSearchWidget.onSearchInputChanged()guardif (this.searchConfiguration.searchOnType)then never fired, silently disabling search-as-you-type.Fix
search.searchOnTypeandsearch.searchOnTypeDebouncePeriodintosearch.common.contribution.ts, which is imported by both the main workbench and the agents window.searchConfigurationNodeinsearch.ts(common) — a shared constant for the configuration node metadata (id,order,title,type) — and use it with spread syntax in all three registration sites (search.common.contribution.ts,search.contribution.ts,searchEditor.contribution.ts) to avoid duplicating this boilerplate.