Skip to content

Commit 0e1f836

Browse files
vijayupadyaCopilot
andauthored
Make localIndex setting public (#312402)
* Make localIndex setting public Co-authored-by: Copilot <copilot@github.com> * fix the namespace * update desc --------- Co-authored-by: Copilot <copilot@github.com>
1 parent 10e4db6 commit 0e1f836

9 files changed

Lines changed: 21 additions & 18 deletions

File tree

extensions/copilot/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4018,6 +4018,15 @@
40184018
"tags": [
40194019
"experimental"
40204020
]
4021+
},
4022+
"github.copilot.chat.localIndex.enabled": {
4023+
"type": "boolean",
4024+
"default": false,
4025+
"markdownDescription": "%github.copilot.config.localIndex.enabled%",
4026+
"tags": [
4027+
"experimental",
4028+
"onExp"
4029+
]
40214030
}
40224031
}
40234032
},

extensions/copilot/package.nls.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@
169169
"copilot.agent.description": "Edit files in your workspace in agent mode",
170170
"copilot.agent.compact.description": "Free up context by compacting the conversation history. Optionally include extra instructions for compaction.",
171171
"copilot.chronicle.description": "Session history tools and insights",
172-
"copilot.chronicle.standup.description": "Generate a standup report from recent coding sessions",
173-
"copilot.chronicle.tips.description": "Get personalized tips based on your Copilot usage patterns",
172+
"copilot.chronicle.standup.description": "Generate a standup report from recent chat sessions",
173+
"copilot.chronicle.tips.description": "Get personalized tips based on your chat session usage patterns",
174174
"github.copilot.config.sessionSearch.enabled": "Enable session search and /chronicle commands. This is a team-internal setting.",
175175
"github.copilot.config.sessionSearch.localIndex.enabled": "Enable local session tracking. When enabled, Copilot tracks session data locally for /chronicle commands.",
176+
"github.copilot.config.localIndex.enabled": "Enable local session tracking. When enabled, session data is tracked locally for /chronicle commands.",
176177
"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.",
177178
"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.",
178179
"copilot.workspace.explain.description": "Explain how the code in your active editor works",

extensions/copilot/src/extension/chronicle/common/sessionIndexingPreference.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ export type SessionIndexingLevel = 'local' | 'user' | 'repo_and_user';
1616

1717
/**
1818
* Manages user preferences for session indexing via VS Code settings.
19-
*
20-
* Two settings control behavior:
21-
* - `chat.sessionSearch.localIndex.enabled` (team-internal, ExP) — enables local
22-
* SQLite tracking and /chronicle commands
23-
* - `chat.sessionSearch.cloudSync.enabled` — enables
24-
* cloud upload to cloud
25-
* - `chat.sessionSearch.cloudSync.excludeRepositories` — repo patterns
26-
* to exclude from cloud sync
2719
*/
2820
export class SessionIndexingPreference {
2921

extensions/copilot/src/extension/chronicle/common/test/sessionIndexingPreference.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function createMockConfigService(opts: {
1313
} = {}) {
1414
const configs: Record<string, unknown> = {};
1515
// Map by fullyQualifiedId
16-
configs['github.copilot.chat.advanced.sessionSearch.localIndex.enabled'] = opts.localIndexEnabled ?? false;
16+
configs['github.copilot.chat.localIndex.enabled'] = opts.localIndexEnabled ?? false;
1717
configs['github.copilot.chat.advanced.sessionSearch.cloudSync.enabled'] = opts.cloudSyncEnabled ?? false;
1818
configs['github.copilot.chat.advanced.sessionSearch.cloudSync.excludeRepositories'] = opts.excludeRepositories ?? [];
1919

extensions/copilot/src/extension/chronicle/vscode-node/remoteSessionExporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class RemoteSessionExporter extends Disposable implements IExtensionContr
120120

121121
// Only set up span listener when both local index and cloud sync are enabled.
122122
// Uses autorun to react if settings change at runtime.
123-
const localEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService);
123+
const localEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.LocalIndexEnabled, this._expService);
124124
const cloudEnabled = this._configService.getConfigObservable(ConfigKey.TeamInternal.SessionSearchCloudSyncEnabled);
125125
const spanListenerStore = this._register(new DisposableStore());
126126
this._register(autorun(reader => {

extensions/copilot/src/extension/chronicle/vscode-node/sessionStoreTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class SessionStoreTracker extends Disposable implements IExtensionContrib
8080

8181
// Only set up span listener and flush timer when the feature is enabled.
8282
// Uses autorun to react if the setting changes at runtime.
83-
const featureEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService);
83+
const featureEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.LocalIndexEnabled, this._expService);
8484
const spanListenerStore = this._register(new DisposableStore());
8585
this._register(autorun(reader => {
8686
spanListenerStore.clear();

extensions/copilot/src/extension/contextKeys/vscode-node/contextKeys.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class ContextKeysContribution extends Disposable {
8585
commands.executeCommand('setContext', debugReportFeedbackContextKey, debugReportFeedback.read(reader));
8686
}));
8787

88-
const sessionSearchEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService);
88+
const sessionSearchEnabled = this._configService.getExperimentBasedConfigObservable(ConfigKey.LocalIndexEnabled, this._expService);
8989
this._register(autorun(reader => {
9090
commands.executeCommand('setContext', sessionSearchEnabledContextKey, sessionSearchEnabled.read(reader));
9191
}));

extensions/copilot/src/extension/intents/node/chronicleIntent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class ChronicleIntent implements IIntent {
4949
readonly id = ChronicleIntent.ID;
5050
readonly description = l10n.t('Session history tools and insights (standup, tips, improve)');
5151
get locations(): ChatLocation[] {
52-
return this._configService.getExperimentBasedConfig(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService) ? [ChatLocation.Panel] : [];
52+
return this._configService.getExperimentBasedConfig(ConfigKey.LocalIndexEnabled, this._expService) ? [ChatLocation.Panel] : [];
5353
}
5454

5555
readonly commandInfo: IIntentSlashCommandInfo = {
@@ -86,7 +86,7 @@ export class ChronicleIntent implements IIntent {
8686
location: ChatLocation,
8787
chatTelemetry: ChatTelemetryBuilder,
8888
): Promise<vscode.ChatResult> {
89-
if (!this._configService.getExperimentBasedConfig(ConfigKey.TeamInternal.SessionSearchLocalIndexEnabled, this._expService)) {
89+
if (!this._configService.getExperimentBasedConfig(ConfigKey.LocalIndexEnabled, this._expService)) {
9090
stream.markdown(l10n.t('Session search is not available yet.'));
9191
return {};
9292
}

extensions/copilot/src/platform/configuration/common/configurationService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,6 @@ export namespace ConfigKey {
875875
export const ResponsesApiWebSocketEnabled = defineTeamInternalSetting<boolean>('chat.advanced.responsesApi.webSocket.enabled', ConfigType.ExperimentBased, false);
876876
export const DebugSimulateWebSocketResponse = defineTeamInternalSetting<string>('chat.advanced.debug.simulateWebSocketResponse', ConfigType.Simple, '');
877877

878-
/** Enable local session search index — tracks sessions locally and enables chronicle commands.*/
879-
export const SessionSearchLocalIndexEnabled = defineTeamInternalSetting<boolean>('chat.advanced.sessionSearch.localIndex.enabled', ConfigType.ExperimentBased, false, vBoolean());
880878
/** Enable cloud sync of session data to cloud. */
881879
export const SessionSearchCloudSyncEnabled = defineTeamInternalSetting<boolean>('chat.advanced.sessionSearch.cloudSync.enabled', ConfigType.Simple, false, vBoolean());
882880
/** Repository patterns to exclude from cloud sync (exact owner/repo or glob patterns like my-org/*). */
@@ -1030,6 +1028,9 @@ export namespace ConfigKey {
10301028
export const CopilotMemoryEnabled = defineSetting<boolean>('chat.copilotMemory.enabled', ConfigType.ExperimentBased, false);
10311029
export const MemoryToolEnabled = defineSetting<boolean>('chat.tools.memory.enabled', ConfigType.ExperimentBased, true);
10321030
export const ViewImageToolEnabled = defineSetting<boolean>('chat.tools.viewImage.enabled', ConfigType.ExperimentBased, true);
1031+
1032+
/** Enable local session search index — tracks sessions locally and enables chronicle commands.*/
1033+
export const LocalIndexEnabled = defineSetting<boolean>('chat.localIndex.enabled', ConfigType.ExperimentBased, false);
10331034
}
10341035

10351036
export function getAllConfigKeys(): string[] {

0 commit comments

Comments
 (0)