Revert "Ignore workspace settings for untrusted folders" (#6672)

This commit is contained in:
Jacob Richman
2025-08-20 12:49:15 -07:00
committed by GitHub
parent fd64d89da0
commit 52e340a11b
16 changed files with 122 additions and 386 deletions

View File

@@ -4,11 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { useState, useCallback, useEffect, useContext } from 'react';
import { useState, useCallback, useEffect } from 'react';
import { themeManager } from '../themes/theme-manager.js';
import { HistoryItem, MessageType } from '../types.js';
import { SettingScope } from '../../config/settings.js';
import { SettingsContext } from '../contexts/SettingsContext.js';
import { LoadedSettings, SettingScope } from '../../config/settings.js'; // Import LoadedSettings, AppSettings, MergedSetting
import { type HistoryItem, MessageType } from '../types.js';
import process from 'node:process';
interface UseThemeCommandReturn {
@@ -22,12 +21,11 @@ interface UseThemeCommandReturn {
}
export const useThemeCommand = (
loadedSettings: LoadedSettings,
setThemeError: (error: string | null) => void,
addItem: (item: Omit<HistoryItem, 'id'>, timestamp: number) => void,
): UseThemeCommandReturn => {
const [isThemeDialogOpen, setIsThemeDialogOpen] = useState(false);
const settingsContext = useContext(SettingsContext);
const loadedSettings = settingsContext!.settings;
// Check for invalid theme configuration on startup
useEffect(() => {