diff options
Diffstat (limited to 'packages/cli/src/ui/hooks/useThemeCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/useThemeCommand.ts | 10 |
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(() => { |
