feat: chat ui

This commit is contained in:
archer
2023-07-26 11:01:25 +08:00
parent 2b993b926a
commit 248be38939
19 changed files with 153 additions and 54 deletions

View File

@@ -96,7 +96,7 @@ const ChatTest = (
<IconButton
className="chat"
size={'sm'}
icon={<MyIcon name={'clearLight'} w={'14px'} />}
icon={<MyIcon name={'clear'} w={'14px'} />}
variant={'base'}
borderRadius={'md'}
aria-label={'delete'}

View File

@@ -596,7 +596,7 @@ const ChatTest = ({ appId }: { appId: string }) => {
<IconButton
className="chat"
size={'sm'}
icon={<MyIcon name={'clearLight'} w={'14px'} />}
icon={<MyIcon name={'clear'} w={'14px'} />}
variant={'base'}
borderRadius={'md'}
aria-label={'delete'}

View File

@@ -33,7 +33,7 @@ const MyApps = () => {
const { t } = useTranslation();
const theme = useTheme();
const router = useRouter();
const { myApps, loadMyModels } = useUserStore();
const { myApps, loadMyApps } = useUserStore();
const { openConfirm, ConfirmChild } = useConfirm({
title: '删除提示',
content: '确认删除该应用所有信息?'
@@ -53,7 +53,7 @@ const MyApps = () => {
title: '删除成功',
status: 'success'
});
loadMyModels();
loadMyApps();
} catch (err: any) {
toast({
title: err?.message || '删除失败',
@@ -61,11 +61,11 @@ const MyApps = () => {
});
}
},
[toast, loadMyModels]
[toast, loadMyApps]
);
/* 加载模型 */
useQuery(['loadModels'], loadMyModels, {
useQuery(['loadModels'], loadMyApps, {
refetchOnMount: true
});
@@ -166,7 +166,7 @@ const MyApps = () => {
))}
</Grid>
<ConfirmChild />
{isOpenCreateModal && <CreateModal onClose={onCloseCreateModal} onSuccess={loadMyModels} />}
{isOpenCreateModal && <CreateModal onClose={onCloseCreateModal} onSuccess={loadMyApps} />}
</PageContainer>
);
};