From 53ddf6c8fc574eef233aafa66c76d3b52aecfd84 Mon Sep 17 00:00:00 2001
From: cc500 <2014434568@qq.com>
Date: Wed, 26 Feb 2025 11:14:52 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E8=AF=AD=E4=B9=89=E6=96=87=E4=BB=B6=E6=97=B6=E8=AF=AF=E4=BC=A0?=
=?UTF-8?q?=E7=9A=84=20serviceid?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/api/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/api/index.vue b/src/views/api/index.vue
index db1f53e..934f969 100644
--- a/src/views/api/index.vue
+++ b/src/views/api/index.vue
@@ -90,7 +90,7 @@
--
Gitee
From 731d16522391dc57ca023a04f591afb8935b4997 Mon Sep 17 00:00:00 2001
From: cc500 <2014434568@qq.com>
Date: Wed, 26 Feb 2025 11:24:09 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=A4=B1=E8=B4=A5?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Upload/index.vue | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index 41f12c1..6c1bb43 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -6,7 +6,7 @@ import { IconUpload, IconVisible, IconDelete, IconCaretRight } from '@computing/
import type { UploadFile, ElUploadProgressEvent, ElFile } from 'element-plus/es/components/upload/src/upload.type';
import { Codemirror } from 'vue-codemirror';
import { api } from 'src/apis';
-import { successMsg } from 'src/components/Message';
+import { errorMsg, successMsg } from 'src/components/Message';
const handleCreateapi = () => {
api
@@ -17,7 +17,10 @@ const handleCreateapi = () => {
.then(res => {
getServiceJson.value = res[1].result.apis;
uploadtype.value = 'get';
- });
+ }).catch(err=>{
+ errorMsg('解析失败');
+ })
+ ;
};
const props = defineProps({
--
Gitee
From be644d45f27a4f52ae325ab381b0e54b662dc67b Mon Sep 17 00:00:00 2001
From: cc500 <2014434568@qq.com>
Date: Thu, 27 Feb 2025 09:54:51 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=86=8D=E5=B0=81=E8=A3=85=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E7=BB=84=E4=BB=B6,=E5=BA=94=E7=94=A8=E4=B8=AD?=
=?UTF-8?q?=E5=BF=83=E8=B7=B3=E8=BD=AC=E9=A6=96=E9=A1=B5=E5=8F=AF=E6=AD=A3?=
=?UTF-8?q?=E5=B8=B8=E5=B1=95=E7=A4=BA=E5=BA=94=E7=94=A8=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/store/conversation.ts | 1 -
src/views/app/index.vue | 3 +-
src/views/createapp/components/appConfig.vue | 4 +-
src/views/dialogue/Copilot.vue | 62 +++---
.../dialogue/components/AppInitalPreview.vue | 24 +++
.../dialogue/components/DialogueAside.vue | 12 +-
.../dialogue/components/DialogueSession.vue | 78 ++++++--
.../dialogue/components/InterPreview.vue | 189 +++++++++++++++++-
src/views/styles/InterPreview.scss | 2 +-
9 files changed, 316 insertions(+), 59 deletions(-)
create mode 100644 src/views/dialogue/components/AppInitalPreview.vue
diff --git a/src/store/conversation.ts b/src/store/conversation.ts
index c0aa626..23d7062 100644
--- a/src/store/conversation.ts
+++ b/src/store/conversation.ts
@@ -233,7 +233,6 @@ export const useSessionStore = defineStore('conversation', () => {
break;
}
const { done, value } = await reader.read();
- console.log(value, 'value')
const decodedValue = decoder.decode(value, { stream: true });
const isLegal = judgeMessage(answerIndex, decodedValue);
if (!isLegal) {
diff --git a/src/views/app/index.vue b/src/views/app/index.vue
index 0c9b11a..826698d 100644
--- a/src/views/app/index.vue
+++ b/src/views/app/index.vue
@@ -145,7 +145,8 @@ const handleCreateApp = () => {
const routerToDetail = appItem => {
if (!appItem.published) {
- return;
+ //调试时注释
+ // return;
}
//获取appItem.id & appItem.name
router.push(`/copilot?appId=${appItem.appId}&name=${appItem.name}`);
diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue
index e791b7e..2eae57f 100644
--- a/src/views/createapp/components/appConfig.vue
+++ b/src/views/createapp/components/appConfig.vue
@@ -8,6 +8,7 @@ import { useRoute } from 'vue-router';
import { api } from 'src/apis';
import { ElMessage } from 'element-plus';
import { fa } from 'element-plus/es/locale';
+import AppInitalPreview from 'src/views/dialogue/components/AppInitalPreview.vue';
const activeName = ref([1, 2, 3]);
const activeNames = ref([1, 2, 3]);
const route = useRoute();
@@ -358,7 +359,8 @@ defineExpose({
界面预览
diff --git a/src/views/dialogue/Copilot.vue b/src/views/dialogue/Copilot.vue
index 2f612d6..ca54756 100644
--- a/src/views/dialogue/Copilot.vue
+++ b/src/views/dialogue/Copilot.vue
@@ -43,37 +43,37 @@ const readAgreement = async () => {
agreement.value = marked.parse(response.default) as string;
};
-watch(
- () => router,
- () => {
- const currRoute = router.currentRoute;
- if (currRoute.value.query.appId) {
- // 判断是否编辑--是否需要查询回显数据
- api
- .querySingleAppData({
- id: route.query?.appId as string,
- })
- .then(res => {
- const appInfo = res?.[1]?.result;
- if (appInfo) {
- createAppForm.value = {
- icon: appInfo?.icon,
- name: appInfo?.name,
- description: appInfo?.description,
- links: appInfo?.links?.map(item => item.url),
- recommendedQuestions: appInfo?.recommendedQuestions,
- dialogRounds: appInfo?.dialogRounds,
- permission: {
- visibility: appInfo?.permission?.visibility,
- authorizedUsers: appInfo?.permission?.authorizedUsers,
- },
- };
- }
- });
- }
- },
- { deep: true, immediate: true },
-);
+// watch(
+// () => router,
+// () => {
+// const currRoute = router.currentRoute;
+// if (currRoute.value.query.appId) {
+// // 判断是否编辑--是否需要查询回显数据
+// api
+// .querySingleAppData({
+// id: route.query?.appId as string,
+// })
+// .then(res => {
+// const appInfo = res?.[1]?.result;
+// if (appInfo) {
+// createAppForm.value = {
+// icon: appInfo?.icon,
+// name: appInfo?.name,
+// description: appInfo?.description,
+// links: appInfo?.links?.map(item => item.url),
+// recommendedQuestions: appInfo?.recommendedQuestions,
+// dialogRounds: appInfo?.dialogRounds,
+// permission: {
+// visibility: appInfo?.permission?.visibility,
+// authorizedUsers: appInfo?.permission?.authorizedUsers,
+// },
+// };
+// }
+// });
+// }
+// },
+// { deep: true, immediate: true },
+// );
/**
* 处理服务协议是否显示
diff --git a/src/views/dialogue/components/AppInitalPreview.vue b/src/views/dialogue/components/AppInitalPreview.vue
new file mode 100644
index 0000000..fd3d37d
--- /dev/null
+++ b/src/views/dialogue/components/AppInitalPreview.vue
@@ -0,0 +1,24 @@
+