Feat: Add LlmSettingFieldItems component #3221 (#4906)

### What problem does this PR solve?

Feat: Add LlmSettingFieldItems component #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-12 15:43:31 +08:00
committed by GitHub
parent b08bb56f6c
commit 7f06712a30
6 changed files with 282 additions and 5 deletions

View File

@ -119,6 +119,26 @@ export const useFetchNextDialogList = () => {
return { data, loading, refetch };
};
export const useFetchChatAppList = () => {
const {
data,
isFetching: loading,
refetch,
} = useQuery<IDialog[]>({
queryKey: ['fetchChatAppList'],
initialData: [],
gcTime: 0,
refetchOnWindowFocus: false,
queryFn: async () => {
const { data } = await chatService.listDialog();
return data?.data ?? [];
},
});
return { data, loading, refetch };
};
export const useSetNextDialog = () => {
const queryClient = useQueryClient();