perf: model provider show; perf: get init data buffer (#3459)

* pr code

* perf: model table show

* perf: model provider show

* perf: get init data buffer

* perf: get init data buffer

* perf: icon
This commit is contained in:
Archer
2024-12-24 15:12:07 +08:00
committed by GitHub
parent f646ef8595
commit 108e1b92ef
59 changed files with 558 additions and 329 deletions

View File

@@ -5,6 +5,7 @@ import { useSystemStore } from '@/web/common/system/useSystemStore';
import type { FastGPTFeConfigsType } from '@fastgpt/global/common/system/types/index.d';
import { useMemoizedFn, useMount } from 'ahooks';
import { TrackEventName } from '../common/system/constants';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
export const useInitApp = () => {
const router = useRouter();
@@ -41,8 +42,6 @@ export const useInitApp = () => {
});
useMount(() => {
initFetch();
const errorTrack = (event: ErrorEvent) => {
window.umami?.track(TrackEventName.windowError, {
device: {
@@ -62,6 +61,11 @@ export const useInitApp = () => {
};
});
useRequest2(initFetch, {
manual: false,
pollingInterval: 300000
});
useEffect(() => {
hiId && localStorage.setItem('inviterId', hiId);
bd_vid && sessionStorage.setItem('bd_vid', bd_vid);