Draft
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for Copilot “session sync” as a core VS Code setting (with enterprise policy), and updates the Copilot extension’s “chronicle”/session indexing feature flags and tooling to align with the new setting.
Changes:
- Introduces
chat.sessionSync.enabled(core) withCopilotSessionSyncpolicy wiring and policy-data export updates. - Adds a new public Copilot extension setting
github.copilot.chat.localIndex.enabledwith migration from the prior team-internal key. - Extends chronicle tooling: session-sync enablement suggestion UX and a command to delete synced cloud session data, plus a cloud API client method.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/accounts/browser/defaultAccount.ts | Threads a new session_sync_enabled entitlement/policy flag from token entitlements into cached policy data. |
| src/vs/workbench/contrib/chat/common/constants.ts | Adds ChatConfiguration.SessionSyncEnabled constant. |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Registers chat.sessionSync.enabled setting with enterprise policy mapping and localization. |
| src/vs/base/common/defaultAccount.ts | Extends IPolicyData with session_sync_enabled. |
| extensions/copilot/src/platform/configuration/common/configurationService.ts | Adds Advanced.LocalIndexEnabled via defineAndMigrateExpSetting and deprecates the old team-internal key. |
| extensions/copilot/src/extension/intents/node/chronicleIntent.ts | Switches chronicle availability gating to the new local-index setting (with fallback logic). |
| extensions/copilot/src/extension/contextKeys/vscode-node/contextKeys.contribution.ts | Updates github.copilot.sessionSearch.enabled context key to follow the new local-index setting (with fallback logic). |
| extensions/copilot/src/extension/chronicle/vscode-node/sessionStoreTracker.ts | Gates local session store tracking on the new local-index setting (with fallback logic). |
| extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts | Gates cloud exporting on local index + core session sync; adds sync suggestion and delete-cloud-sessions command. |
| extensions/copilot/src/extension/chronicle/node/cloudSessionApiClient.ts | Adds deleteSession endpoint call used by the delete command. |
| extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts | Updates tests to reflect new “session sync” gate semantics. |
| extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts | Replaces repo-exclusion/cloud-sync settings with core chat.sessionSync.enabled consent check. |
| extensions/copilot/package.nls.json | Adds command title localization; renames local-index setting localization key usage. |
| extensions/copilot/package.json | Contributes new delete command and new github.copilot.chat.localIndex.enabled setting. |
| build/lib/policies/policyData.jsonc | Adds exported policy metadata for chat.sessionSync.enabled and updates policy export contents. |
Copilot's findings
Comments suppressed due to low confidence (3)
extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts:141
- This
autorunonly re-runs when observables are read.getNonExtensionConfig('chat.sessionSync.enabled')is not observable, so toggling the core setting at runtime won’t start/stop the exporter until some other observable changes. Consider wiringcloudEnabledthrough an observable (e.g., observableFromEvent ononDidChangeConfiguration+affectsConfiguration('chat.sessionSync.enabled')).
const localEnabled = this._configService.isConfigured(ConfigKey.Advanced.LocalIndexEnabled) ? localEnabledNew.read(reader) : localEnabledOld.read(reader);
const cloudEnabled = this._configService.getNonExtensionConfig<boolean>('chat.sessionSync.enabled') ?? false;
if (!localEnabled || !cloudEnabled) {
// Suggest session sync when local index is on but sync is off
if (localEnabled && !cloudEnabled) {
extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts:273
- The success
showInformationMessageconcatenates multiple localized fragments (and a raw space) into one message. Please prefer a single localized string with placeholders (or separateshowInformationMessagecalls) to avoid broken grammar/order in non-English locales.
if (errors > 0) {
vscode.window.showWarningMessage(vscode.l10n.t('Deleted {0}, not found {1}, errors {2}.', deleted, notFound, errors));
} else {
vscode.window.showInformationMessage(vscode.l10n.t('{0} session(s) deleted from the cloud.', deleted) + (notFound > 0 ? ' ' + vscode.l10n.t('{0} not found in cloud (local-only or already deleted).', notFound) : ''));
}
extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts:192
- The button label "Don't Show Again" is misleading here because there’s no persisted state; the prompt is only suppressed for the current session via
_syncSuggestionShown. Either persist a dismissal flag (globalState/storage) or rename the action to something like "Not Now".
vscode.window.showInformationMessage(
vscode.l10n.t('Session sync is available for richer cross-device Copilot session history.'),
vscode.l10n.t('Enable'),
vscode.l10n.t('Don\'t Show Again'),
).then(choice => {
- Files reviewed: 15/15 changed files
- Comments generated: 7
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
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.
Few chronicle updates