diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index ff73334..313e671 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -5,6 +5,8 @@ "ComputedRef": true, "DirectiveBinding": true, "EffectScope": true, + "ElMessage": true, + "ElMessageBox": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, @@ -71,8 +73,6 @@ "watch": true, "watchEffect": true, "watchPostEffect": true, - "watchSyncEffect": true, - "ElMessage": true, - "ElMessageBox": true + "watchSyncEffect": true } } diff --git a/src/assets/icons/svg/code.svg b/src/assets/icons/svg/code.svg new file mode 100644 index 0000000..734790f --- /dev/null +++ b/src/assets/icons/svg/code.svg @@ -0,0 +1 @@ + diff --git a/src/components/FilesSelect/index.vue b/src/components/FilesSelect/index.vue new file mode 100644 index 0000000..63427e8 --- /dev/null +++ b/src/components/FilesSelect/index.vue @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + 上传文件或图片 + + + + + + + + + 上传代码 + + + + + + + + + + { + ElMessage.warning('暂未开放'); + } + " + > + 代码文件 + + + { + ElMessage.warning('暂未开放'); + } + " + > + 代码文件夹 + + + + + + + + + diff --git a/src/components/ModelSelect/index.vue b/src/components/ModelSelect/index.vue index abf7a1b..8456586 100644 --- a/src/components/ModelSelect/index.vue +++ b/src/components/ModelSelect/index.vue @@ -28,6 +28,10 @@ const popoverStyle = ref({ width: '200px', padding: '4px', height: 'fit-content', + background: 'var(--el-bg-color, #fff)', + border: '1px solid var(--el-border-color-light)', + borderRadius: '8px', + boxShadow: '0 2px 12px 0 rgba(0, 0, 0, 0.1)', }); const popoverRef = ref(); @@ -45,25 +49,25 @@ function handleClick(item: GetSessionListVO) { - + - + - + {{ currentModelName }} @@ -73,30 +77,30 @@ function handleClick(item: GetSessionListVO) { - - - - {{ item.remark }} + + + {{ item.modelName }} - {{ item.modelName }} + {{ item.remark }} - + @@ -104,7 +108,7 @@ function handleClick(item: GetSessionListVO) { diff --git a/src/components/Popover/index.vue b/src/components/Popover/index.vue index 07c3678..55233b2 100644 --- a/src/components/Popover/index.vue +++ b/src/components/Popover/index.vue @@ -1,31 +1,9 @@ - - - - - + + + + - - - + - + diff --git a/src/layouts/components/Aside/index.vue b/src/layouts/components/Aside/index.vue index 010001b..6faedd4 100644 --- a/src/layouts/components/Aside/index.vue +++ b/src/layouts/components/Aside/index.vue @@ -28,10 +28,16 @@ onMounted(async () => { const currentSessionRes = await get_session(`${sessionId.value}`); // 通过 ID 查询详情,设置当前会话 (因为有分页) sessionStore.setCurrentSession(currentSessionRes.data); - active.value = `${sessionId.value}`; } }); +watch( + () => sessionStore.currentSession, + (newValue) => { + active.value = newValue ? `${newValue.id}` : undefined; + }, +); + // 创建会话 function handleCreatChat() { // 创建会话, 跳转到默认聊天 diff --git a/src/layouts/components/Header/components/Avatar.vue b/src/layouts/components/Header/components/Avatar.vue index 3e14a80..87c8766 100644 --- a/src/layouts/components/Header/components/Avatar.vue +++ b/src/layouts/components/Header/components/Avatar.vue @@ -94,8 +94,8 @@ function handleClick(item: any) { - + diff --git a/src/pages/chat/layouts/chatDefaul/index.vue b/src/pages/chat/layouts/chatDefaul/index.vue index 05c67e3..6c3c716 100644 --- a/src/pages/chat/layouts/chatDefaul/index.vue +++ b/src/pages/chat/layouts/chatDefaul/index.vue @@ -1,13 +1,19 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - - diff --git a/src/pages/chat/layouts/chatWithId/index.vue b/src/pages/chat/layouts/chatWithId/index.vue index 3f79a83..425d8e2 100644 --- a/src/pages/chat/layouts/chatWithId/index.vue +++ b/src/pages/chat/layouts/chatWithId/index.vue @@ -2,12 +2,15 @@ @@ -243,32 +368,46 @@ function handleChange(payload: { value: boolean; status: ThinkingStatus }) { variant="updown" clearable allow-speech + :loading="isLoading" @submit="startSSE" > - - - + + - - - - + + + + + + + + + + + + + + + + - - -