mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 05:00:46 +00:00
refactor: refactor settings to a nested structure (#7244)
This commit is contained in:
parent
b8a7bfd136
commit
f22263c9e8
41 changed files with 2852 additions and 1424 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue