mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 14:22:47 +02:00
feat(llm-config): replace useGlobalLLMConfigs with globalLLMConfigsAtom in ChatInputGroup
This commit is contained in:
parent
c91c83d40d
commit
636db67d65
1 changed files with 3 additions and 7 deletions
|
|
@ -28,10 +28,10 @@ import {
|
||||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
||||||
import { getConnectorIcon } from "@/contracts/enums/connectorIcons";
|
import { getConnectorIcon } from "@/contracts/enums/connectorIcons";
|
||||||
import { Document } from "@/contracts/types/document.types";
|
import { Document } from "@/contracts/types/document.types";
|
||||||
import { useGlobalLLMConfigs, useLLMPreferences } from "@/hooks/use-llm-configs";
|
import { useLLMPreferences } from "@/hooks/use-llm-configs";
|
||||||
import { useSearchSourceConnectors } from "@/hooks/use-search-source-connectors";
|
import { useSearchSourceConnectors } from "@/hooks/use-search-source-connectors";
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { llmConfigsAtom } from "@/atoms/llm-config/llm-config-query.atoms";
|
import { llmConfigsAtom, globalLLMConfigsAtom } from "@/atoms/llm-config/llm-config-query.atoms";
|
||||||
|
|
||||||
const DocumentSelector = React.memo(
|
const DocumentSelector = React.memo(
|
||||||
({
|
({
|
||||||
|
|
@ -542,11 +542,7 @@ const LLMSelector = React.memo(() => {
|
||||||
const searchSpaceId = Number(search_space_id);
|
const searchSpaceId = Number(search_space_id);
|
||||||
|
|
||||||
const { data: llmConfigs = [], isFetching: llmLoading, isError: error } = useAtomValue(llmConfigsAtom);
|
const { data: llmConfigs = [], isFetching: llmLoading, isError: error } = useAtomValue(llmConfigsAtom);
|
||||||
const {
|
const { data: globalConfigs = [], isFetching: globalConfigsLoading, isError: globalConfigsError } = useAtomValue(globalLLMConfigsAtom);
|
||||||
globalConfigs,
|
|
||||||
loading: globalConfigsLoading,
|
|
||||||
error: globalConfigsError,
|
|
||||||
} = useGlobalLLMConfigs();
|
|
||||||
const {
|
const {
|
||||||
preferences,
|
preferences,
|
||||||
updatePreferences,
|
updatePreferences,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue