diff --git a/extensions/copilot/package.json b/extensions/copilot/package.json index 60ca97bd0ce8e..753fd9704d985 100644 --- a/extensions/copilot/package.json +++ b/extensions/copilot/package.json @@ -3968,15 +3968,6 @@ { "id": "advanced", "properties": { - "github.copilot.chat.sessionSearch.cloudSync.enabled": { - "type": "boolean", - "default": false, - "markdownDescription": "%github.copilot.config.sessionSearch.cloudSync.enabled%", - "tags": [ - "advanced", - "onExp" - ] - }, "github.copilot.chat.reasoningEffortOverride": { "type": [ "string", diff --git a/extensions/copilot/package.nls.json b/extensions/copilot/package.nls.json index 48568dfeee76e..0b4674414975e 100644 --- a/extensions/copilot/package.nls.json +++ b/extensions/copilot/package.nls.json @@ -173,7 +173,7 @@ "copilot.chronicle.tips.description": "Get personalized tips based on your Copilot usage patterns", "github.copilot.config.sessionSearch.enabled": "Enable session search and /chronicle commands. This is a team-internal setting.", "github.copilot.config.sessionSearch.localIndex.enabled": "Enable local session tracking. When enabled, Copilot tracks session data locally for /chronicle commands.", - "github.copilot.config.sessionSearch.cloudSync.enabled": "Enable cloud sync for session data. When enabled, chat session data is synced to the cloud for cross-device querying.", + "github.copilot.config.sessionSearch.cloudSync.enabled": "Enable cloud sync for session data. When enabled, session data is synced to your Copilot account for cross-device access.", "github.copilot.config.sessionSearch.cloudSync.excludeRepositories": "Repository patterns to exclude from cloud sync. Use exact `owner/repo` names or glob patterns like `my-org/*`. Sessions from matching repos will only be stored locally.", "copilot.workspace.explain.description": "Explain how the code in your active editor works", "copilot.workspace.edit.description": "Edit files in your workspace", diff --git a/extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts b/extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts index f5816ce96404f..404adb2c5cb10 100644 --- a/extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts +++ b/extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts @@ -46,19 +46,9 @@ export class SessionIndexingPreference { /** * Check if cloud sync is enabled for a given repo. * Returns true if cloudSync.enabled is true AND the repo is not excluded. - * Check both new and old setting for backward compatibility. */ hasCloudConsent(repoNwo?: string): boolean { - let cloudEnabled: boolean; - if (this._configService.isConfigured(ConfigKey.Advanced.SessionSearchCloudSync)) { - // New key explicitly set by user — authoritative - cloudEnabled = this._configService.getConfig(ConfigKey.Advanced.SessionSearchCloudSync); - } else { - // Fall back to old internal key for existing users who haven't migrated yet - cloudEnabled = this._configService.getConfig(ConfigKey.TeamInternal.SessionSearchCloudSyncEnabled); - } - - if (!cloudEnabled) { + if (!this._configService.getConfig(ConfigKey.TeamInternal.SessionSearchCloudSyncEnabled)) { return false; } diff --git a/extensions/copilot/src/extension/chronicle/common/standupPrompt.ts b/extensions/copilot/src/extension/chronicle/common/standupPrompt.ts index f1cd693471d47..eaf68d3a42284 100644 --- a/extensions/copilot/src/extension/chronicle/common/standupPrompt.ts +++ b/extensions/copilot/src/extension/chronicle/common/standupPrompt.ts @@ -132,6 +132,7 @@ Standup for : - Key files: list 2-3 most important files changed - Tools used: mention key tools if visible (e.g., apply_patch, run_in_terminal, search) - PR: [#123](link) — merged/closed (if applicable) + - Sessions: \`session-id-1\`, \`session-id-2\` **🚧 In Progress** @@ -139,6 +140,7 @@ Standup for : - Summary of current work (1-2 sentences based on turn content) - Key files: list 2-3 most important files being worked on - PR: [#789](link) — draft/open (if applicable) + - Sessions: \`session-id\` Formatting rules: - Use the turn data (user messages AND assistant responses) to understand WHAT was done, not just that something happened diff --git a/extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts b/extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts index a3788ec5897d3..e5b07ca575163 100644 --- a/extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts +++ b/extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts @@ -9,25 +9,16 @@ import { SessionIndexingPreference } from '../sessionIndexingPreference'; function createMockConfigService(opts: { localIndexEnabled?: boolean; cloudSyncEnabled?: boolean; - cloudSyncPublicEnabled?: boolean; excludeRepositories?: string[]; } = {}) { const configs: Record = {}; // Map by fullyQualifiedId configs['github.copilot.chat.advanced.sessionSearch.localIndex.enabled'] = opts.localIndexEnabled ?? false; configs['github.copilot.chat.advanced.sessionSearch.cloudSync.enabled'] = opts.cloudSyncEnabled ?? false; - configs['github.copilot.chat.sessionSearch.cloudSync.enabled'] = opts.cloudSyncPublicEnabled ?? false; configs['github.copilot.chat.advanced.sessionSearch.cloudSync.excludeRepositories'] = opts.excludeRepositories ?? []; - // Track which keys are explicitly configured (set by the user) - const configuredKeys = new Set(); - if (opts.cloudSyncPublicEnabled !== undefined) { - configuredKeys.add('github.copilot.chat.sessionSearch.cloudSync.enabled'); - } - return { getConfig: (key: { fullyQualifiedId: string }) => configs[key.fullyQualifiedId], - isConfigured: (key: { fullyQualifiedId: string }) => configuredKeys.has(key.fullyQualifiedId), } as unknown as import('../../../../platform/configuration/common/configurationService').IConfigurationService; } @@ -90,19 +81,4 @@ describe('SessionIndexingPreference', () => { expect(pref.hasCloudConsent('private-org/repo-b')).toBe(false); expect(pref.hasCloudConsent('public-org/repo-a')).toBe(true); }); - - it('hasCloudConsent uses new public key when explicitly configured', () => { - const pref = new SessionIndexingPreference(createMockConfigService({ - cloudSyncPublicEnabled: true, - })); - expect(pref.hasCloudConsent()).toBe(true); - }); - - it('hasCloudConsent new public key overrides old internal key', () => { - const pref = new SessionIndexingPreference(createMockConfigService({ - cloudSyncEnabled: true, - cloudSyncPublicEnabled: false, - })); - expect(pref.hasCloudConsent()).toBe(false); - }); }); diff --git a/extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts b/extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts index 1779504dae207..c469e4e8d0fcd 100644 --- a/extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts +++ b/extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts @@ -120,16 +120,12 @@ export class RemoteSessionExporter extends Disposable implements IExtensionContr // Only set up span listener when both local index and cloud sync are enabled. // Uses autorun to react if settings change at runtime. - // Both new and old settings taken into account for backward compatibility const localEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService); - const cloudEnabledInternal = this._configService.getConfigObservable(ConfigKey.TeamInternal.SessionSearchCloudSyncEnabled); - const cloudEnabledPublic = this._configService.getConfigObservable(ConfigKey.Advanced.SessionSearchCloudSync); + const cloudEnabled = this._configService.getConfigObservable(ConfigKey.TeamInternal.SessionSearchCloudSyncEnabled); const spanListenerStore = this._register(new DisposableStore()); this._register(autorun(reader => { spanListenerStore.clear(); - const publicValue = cloudEnabledPublic.read(reader); - const cloudEnabled = this._configService.isConfigured(ConfigKey.Advanced.SessionSearchCloudSync) ? publicValue : cloudEnabledInternal.read(reader); - if (!localEnabled.read(reader) || !cloudEnabled) { + if (!localEnabled.read(reader) || !cloudEnabled.read(reader)) { return; } @@ -268,10 +264,9 @@ export class RemoteSessionExporter extends Disposable implements IExtensionContr } // Only export remotely if the user has cloud consent for this repo - // Also require localIndex to be enabled (team-internal gate) as defense-in-depth const repoNwo = `${repo.owner}/${repo.repo}`; - if (!this._configService.getExperimentBasedConfig(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService) || !this._indexingPreference.hasCloudConsent(repoNwo)) { + if (!this._indexingPreference.hasCloudConsent(repoNwo)) { this._disabledSessions.add(sessionId); return; } diff --git a/extensions/copilot/src/platform/configuration/common/configurationService.ts b/extensions/copilot/src/platform/configuration/common/configurationService.ts index 3aa6a83755686..e489b45e399ae 100644 --- a/extensions/copilot/src/platform/configuration/common/configurationService.ts +++ b/extensions/copilot/src/platform/configuration/common/configurationService.ts @@ -713,8 +713,6 @@ export namespace ConfigKey { /** Internal: override reasoning/thinking effort sent to model APIs (e.g. Responses API, Messages API). Used by evals. */ export const ReasoningEffortOverride = defineSetting('chat.reasoningEffortOverride', ConfigType.Simple, null); - - export const SessionSearchCloudSync = defineAndMigrateSetting('chat.advanced.sessionSearch.cloudSync.enabled', 'chat.sessionSearch.cloudSync.enabled', false); } /** diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index d285ce397abaa..f7d4917de6895 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -1085,36 +1085,6 @@ export function registerChatActions() { } }); - registerAction2(class ToggleSessionCloudSyncAction extends Action2 { - private static readonly _settingKey = 'github.copilot.chat.sessionSearch.cloudSync.enabled'; - constructor() { - super({ - id: 'workbench.action.chat.toggleSessionCloudSync', - title: localize2('chat.toggleSessionCloudSync', "Sync Chat Sessions to Cloud"), - category: CHAT_CATEGORY, - f1: false, - toggled: ContextKeyExpr.equals(`config.${ToggleSessionCloudSyncAction._settingKey}`, true), - menu: [{ - id: CHAT_CONFIG_MENU_ID, - when: ContextKeyExpr.and(ChatContextKeys.enabled, ContextKeyExpr.equals('view', ChatViewId), ContextKeyExpr.equals('github.copilot.sessionSearch.enabled', true)), - order: 2, - group: '4_logs' - }, { - id: MenuId.ViewTitle, - when: ContextKeyExpr.and(ChatContextKeys.enabled, ContextKeyExpr.equals('view', ChatViewId), ContextKeyExpr.equals('github.copilot.sessionSearch.enabled', true)), - order: 2, - group: '4_logs' - }] - }); - } - - async run(accessor: ServicesAccessor): Promise { - const configurationService = accessor.get(IConfigurationService); - const currentValue = configurationService.getValue(ToggleSessionCloudSyncAction._settingKey); - await configurationService.updateValue(ToggleSessionCloudSyncAction._settingKey, !currentValue); - } - }); - const nonEnterpriseCopilotUsers = ContextKeyExpr.and(ChatContextKeys.enabled, ContextKeyExpr.notEquals(`config.${defaultChat.completionsAdvancedSetting}.authProvider`, defaultChat.provider.enterprise.id)); registerAction2(class extends Action2 { constructor() {