mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-22 21:28:12 +02:00
cleanup
This commit is contained in:
parent
3e8cdabd73
commit
be381c833e
4 changed files with 6 additions and 13 deletions
|
|
@ -99,8 +99,6 @@ export function SetupLLMStep({
|
|||
const { mutateAsync : deleteLLMConfig } = useAtomValue(deleteLLMConfigMutationAtom);
|
||||
const { data : llmConfigs = []} = useAtomValue(llmConfigsAtom);
|
||||
const { data: globalConfigs = [] } = useAtomValue(globalLLMConfigsAtom);
|
||||
|
||||
// Replace useLLMPreferences with jotai atoms
|
||||
const { data: preferences = {} } = useAtomValue(llmPreferencesAtom);
|
||||
const { mutateAsync: updatePreferences } = useAtomValue(updateLLMPreferencesMutationAtom);
|
||||
|
||||
|
|
|
|||
|
|
@ -67,13 +67,13 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {
|
|||
const {
|
||||
data: llmConfigs = [],
|
||||
isFetching: configsLoading,
|
||||
isError: configsError,
|
||||
error: configsError,
|
||||
refetch: refreshConfigs
|
||||
} = useAtomValue(llmConfigsAtom);
|
||||
const {
|
||||
data: globalConfigs = [],
|
||||
isFetching: globalConfigsLoading,
|
||||
isError: globalConfigsError,
|
||||
error: globalConfigsError,
|
||||
refetch: refreshGlobalConfigs,
|
||||
} = useAtomValue(globalLLMConfigsAtom);
|
||||
const {
|
||||
|
|
@ -235,9 +235,9 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {
|
|||
<Alert variant="destructive">
|
||||
<AlertCircle className="h-4 w-4" />
|
||||
<AlertDescription>
|
||||
{(configsError && "Failed to load LLM configurations") ||
|
||||
(preferencesError && "Failed to load preferences") ||
|
||||
(globalConfigsError && "Failed to load global configurations")}
|
||||
{(configsError?.message ?? "Failed to load LLM configurations") ||
|
||||
(preferencesError?.message ?? "Failed to load preferences") ||
|
||||
(globalConfigsError?.message ?? "Failed to load global configurations")}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue