refactor: refactor settings to a nested structure (#7244)

This commit is contained in:
Gal Zahavi 2025-08-27 18:39:45 -07:00 committed by GitHub
parent b8a7bfd136
commit f22263c9e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 2852 additions and 1424 deletions

View file

@ -187,7 +187,11 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
Date.now(),
);
if (result.success) {
context.services.settings.setValue(SettingScope.User, 'ideMode', true);
context.services.settings.setValue(
SettingScope.User,
'ide.enabled',
true,
);
// Poll for up to 5 seconds for the extension to activate.
for (let i = 0; i < 10; i++) {
await config.setIdeModeAndSyncConnection(true);
@ -227,7 +231,11 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
description: 'enable IDE integration',
kind: CommandKind.BUILT_IN,
action: async (context: CommandContext) => {
context.services.settings.setValue(SettingScope.User, 'ideMode', true);
context.services.settings.setValue(
SettingScope.User,
'ide.enabled',
true,
);
await config.setIdeModeAndSyncConnection(true);
const { messageType, content } = getIdeStatusMessage(ideClient);
context.ui.addItem(
@ -245,7 +253,11 @@ export const ideCommand = (config: Config | null): SlashCommand | null => {
description: 'disable IDE integration',
kind: CommandKind.BUILT_IN,
action: async (context: CommandContext) => {
context.services.settings.setValue(SettingScope.User, 'ideMode', false);
context.services.settings.setValue(
SettingScope.User,
'ide.enabled',
false,
);
await config.setIdeModeAndSyncConnection(false);
const { messageType, content } = getIdeStatusMessage(ideClient);
context.ui.addItem(