chatbox ui

This commit is contained in:
archer
2023-07-11 23:22:01 +08:00
parent eb768d9c04
commit b2e2f60e0d
46 changed files with 1123 additions and 2817 deletions

View File

@@ -18,17 +18,16 @@ const Login = () => {
const { isPc } = useGlobalStore();
const [pageType, setPageType] = useState<`${PageTypeEnum}`>(PageTypeEnum.login);
const { setUserInfo, setLastModelId, loadKbList, setLastKbId } = useUserStore();
const { setLastChatId, setLastChatModelId, loadHistory } = useChatStore();
const { setLastChatId, setLastChatAppId } = useChatStore();
const loginSuccess = useCallback(
(res: ResLogin) => {
// init store
setLastChatId('');
setLastModelId('');
setLastChatModelId('');
setLastChatAppId('');
setLastKbId('');
loadKbList(true);
loadHistory({ pageNum: 1, init: true });
setUserInfo(res.user);
setTimeout(() => {
@@ -37,11 +36,10 @@ const Login = () => {
},
[
lastRoute,
loadHistory,
loadKbList,
router,
setLastChatId,
setLastChatModelId,
setLastChatAppId,
setLastKbId,
setLastModelId,
setUserInfo