mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
14 lines
469 B
TypeScript
14 lines
469 B
TypeScript
import { useContext } from 'react';
|
|
import { AISettingsContext, type AISettingsContextType } from '@/contexts/AISettingsContext';
|
|
|
|
/**
|
|
* Hook to access and update AI settings
|
|
* @returns AI settings context with settings and update methods
|
|
*/
|
|
export function useAISettings(): AISettingsContextType {
|
|
const context = useContext(AISettingsContext);
|
|
if (!context) {
|
|
throw new Error('useAISettings must be used within AISettingsProvider');
|
|
}
|
|
return context;
|
|
} |