[Extension Reloading]: Update custom commands, add enable/disable command (#12547)

This commit is contained in:
Jacob MacDonald
2025-11-05 11:36:07 -08:00
committed by GitHub
parent ca6cfaaf4e
commit fa93b56243
24 changed files with 664 additions and 187 deletions

View File

@@ -7,7 +7,11 @@
import React, { useState, useEffect } from 'react';
import { Box, Text } from 'ink';
import { theme } from '../semantic-colors.js';
import type { LoadedSettings, Settings } from '../../config/settings.js';
import type {
LoadableSettingScope,
LoadedSettings,
Settings,
} from '../../config/settings.js';
import { SettingScope } from '../../config/settings.js';
import {
getScopeItems,
@@ -63,7 +67,7 @@ export function SettingsDialog({
'settings',
);
// Scope selector state (User by default)
const [selectedScope, setSelectedScope] = useState<SettingScope>(
const [selectedScope, setSelectedScope] = useState<LoadableSettingScope>(
SettingScope.User,
);
// Active indices
@@ -358,11 +362,11 @@ export function SettingsDialog({
key: item.value,
}));
const handleScopeHighlight = (scope: SettingScope) => {
const handleScopeHighlight = (scope: LoadableSettingScope) => {
setSelectedScope(scope);
};
const handleScopeSelect = (scope: SettingScope) => {
const handleScopeSelect = (scope: LoadableSettingScope) => {
handleScopeHighlight(scope);
setFocusSection('settings');
};