bolt.diy/app/shared/hooks/useLocalProviders.ts
KevIsDev 4d3222ee96 refactor: reorganize project structure by moving files to a more dev friendly setup
- Move stores/utils/types to their relative directories (i.e chat stores in chat directory)
- Move utility files to shared/utils
- Move component files to shared/components
- Move type definitions to shared/types
- Move stores to shared/stores
- Update import paths across the project
2025-06-16 15:33:59 +01:00

26 lines
711 B
TypeScript

import { useCallback, useState } from 'react';
import type { IProviderConfig } from '~/shared/types/model';
export interface UseLocalProvidersReturn {
localProviders: IProviderConfig[];
refreshLocalProviders: () => void;
}
export function useLocalProviders(): UseLocalProvidersReturn {
const [localProviders, setLocalProviders] = useState<IProviderConfig[]>([]);
const refreshLocalProviders = useCallback(() => {
/*
* Refresh logic for local providers
* This would typically involve checking the status of Ollama and LMStudio
* For now, we'll just return an empty array
*/
setLocalProviders([]);
}, []);
return {
localProviders,
refreshLocalProviders,
};
}