-
Notifications
You must be signed in to change notification settings - Fork 42.1k
chat: register Agents Window settings in editor #335539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Megan Rogge (meganrogge)
merged 4 commits into
main
from
agents/unknown-settings-debugging-1-138
Sep 10, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
54b7a46
chat: register Agents Window settings in editor
meganrogge dd96928
test: load shared chat configuration contribution
meganrogge e966f2b
chat: isolate shared settings registration
meganrogge 6948915
test: snapshot shared chat settings registration
meganrogge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
src/vs/workbench/contrib/chat/browser/agentSessionsConfiguration.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import * as nls from '../../../../nls.js'; | ||
| import { AgentHostAutoArchiveMergedSessionsAfterDaysConfigKey, AgentHostAutoDeleteArchivedMergedSessionsAfterDaysConfigKey } from '../../../../platform/agentHost/common/agentHostSchema.js'; | ||
| import { ConfigurationScope, Extensions as ConfigurationExtensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js'; | ||
| import product from '../../../../platform/product/common/product.js'; | ||
| import { Registry } from '../../../../platform/registry/common/platform.js'; | ||
| import { AGENT_SESSION_CLEANUP_SETTINGS_TAG, ChatConfiguration } from '../common/constants.js'; | ||
|
|
||
| Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({ | ||
| id: 'chat', | ||
| properties: { | ||
| [ChatConfiguration.UnifiedWorkspacePicker]: { | ||
| type: 'boolean', | ||
| default: product.quality !== 'stable', | ||
| scope: ConfigurationScope.APPLICATION, | ||
| description: nls.localize('sessions.chat.unifiedWorkspacePicker.enabled', "Controls whether the Agents Window uses the unified workspace picker, which combines GitHub and remote workspaces, provides search, and, when supported, allows creating sessions with no workspace."), | ||
| tags: ['experimental'], | ||
| experiment: { mode: 'auto' }, | ||
| }, | ||
| [ChatConfiguration.AutoArchiveMergedSessionsAfterDays]: { | ||
| type: 'integer', | ||
| minimum: 0, | ||
| default: 0, | ||
| scope: ConfigurationScope.APPLICATION, | ||
| tags: ['preview', AGENT_SESSION_CLEANUP_SETTINGS_TAG], | ||
| markdownDescription: nls.localize('autoArchiveMergedSessions.description', "Controls the number of inactive days before agent sessions with a merged pull request are automatically archived. Archiving safely removes eligible worktrees. Permanent deletion is controlled separately by {0}. Set to 0 to disable automatic archival. The recommended value is 15.", '`#chat.agentSessions.autoDeleteArchivedMergedSessionsAfterDays#`'), | ||
| agentHost: { key: AgentHostAutoArchiveMergedSessionsAfterDaysConfigKey }, | ||
| }, | ||
| [ChatConfiguration.AutoDeleteArchivedMergedSessionsAfterDays]: { | ||
| type: 'integer', | ||
| minimum: 0, | ||
| default: 0, | ||
| scope: ConfigurationScope.APPLICATION, | ||
| tags: ['preview', AGENT_SESSION_CLEANUP_SETTINGS_TAG], | ||
| markdownDescription: nls.localize('autoDeleteArchivedMergedSessions.description', "Controls the number of days after automatic archival before agent sessions with a merged pull request are permanently deleted. Retained eligible worktrees are safely removed before deletion. Automatic archival is controlled separately by {0}. Set to 0 to disable permanent deletion. The recommended value is 15.", '`#chat.agentSessions.autoArchiveMergedSessionsAfterDays#`'), | ||
| agentHost: { key: AgentHostAutoDeleteArchivedMergedSessionsAfterDaysConfigKey }, | ||
| }, | ||
| }, | ||
| }); |
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
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
27 changes: 27 additions & 0 deletions
27
src/vs/workbench/contrib/chat/test/browser/chatConfiguration.test.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import * as assert from 'assert'; | ||
| import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../base/test/common/utils.js'; | ||
| import { Extensions as ConfigurationExtensions, IConfigurationRegistry } from '../../../../../platform/configuration/common/configurationRegistry.js'; | ||
| import { Registry } from '../../../../../platform/registry/common/platform.js'; | ||
| import { ChatConfiguration } from '../../common/constants.js'; | ||
| import '../../browser/agentSessionsConfiguration.js'; | ||
|
|
||
| const configurationProperties = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).getConfigurationProperties(); | ||
| const registeredAgentSessionsSettings = [ | ||
| ChatConfiguration.UnifiedWorkspacePicker, | ||
| ChatConfiguration.AutoArchiveMergedSessionsAfterDays, | ||
| ChatConfiguration.AutoDeleteArchivedMergedSessionsAfterDays, | ||
| ].map(key => configurationProperties[key] !== undefined); | ||
|
|
||
| suite('Chat configuration', () => { | ||
|
|
||
| ensureNoDisposablesAreLeakedInTestSuite(); | ||
|
|
||
| test('registers Agents Window settings in the shared workbench contribution', () => { | ||
| assert.deepStrictEqual(registeredAgentSessionsSettings, [true, true, true]); | ||
| }); | ||
| }); |
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.
Uh oh!
There was an error while loading. Please reload this page.