summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useThemeCommand.ts
diff options
context:
space:
mode:
authorJacob Richman <[email protected]>2025-08-20 12:49:15 -0700
committerGitHub <[email protected]>2025-08-20 19:49:15 +0000
commit52e340a11bc6c9ca10674799fa784566d4bbd538 (patch)
treebfe028836c7c861d83cb445242ada8b46b02869b /packages/cli/src/ui/hooks/useThemeCommand.ts
parentfd64d89da03840802c4d39b01a5915207514d29c (diff)
Revert "Ignore workspace settings for untrusted folders" (#6672)
Diffstat (limited to 'packages/cli/src/ui/hooks/useThemeCommand.ts')
-rw-r--r--packages/cli/src/ui/hooks/useThemeCommand.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/cli/src/ui/hooks/useThemeCommand.ts b/packages/cli/src/ui/hooks/useThemeCommand.ts
index 06d1c5b1..cf881f53 100644
--- a/packages/cli/src/ui/hooks/useThemeCommand.ts
+++ b/packages/cli/src/ui/hooks/useThemeCommand.ts
@@ -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(() => {