+
返回空间
+
-
-
- 返回空间
-
-
-
+
-
-
-
- {{ workFlowRes.output }}
-
-
-
+
+
+ {{ workFlowRes?.output }}
+
@@ -33,8 +27,8 @@
import { ref, reactive } from 'vue';
import HistoryChat from './components/historyChat.vue';
import { executeWorkFlow, getWorkFlowInfo } from '@/api/all/agent';
-import { useRoute } from 'vue-router';
import DynamicForm from './components/DynamicForm.vue';
+import { useRoute, useRouter } from 'vue-router';
const formFields = ref([]);
@@ -46,7 +40,12 @@ const id = route.query.id;
const query = reactive({
id: id,
});
-
+const router = useRouter();
+const goChatIndex = async () => {
+ router.push({
+ path: '/agent/index',
+ });
+};
const loading = ref(false);
const cozeInfo = reactive({
@@ -64,11 +63,17 @@ const workFlowRes = reactive({});
// 提交表单
const handleSubmit = async (formData) => {
console.log(formData, 'formData');
- const param = { form_data: formData, workflow_id: cozeInfo.workflow_id };
- loading.value = true;
- const { code, data } = await executeWorkFlow(param);
- if (code === 200) {
- Object.assign(workFlowRes, data.data);
+
+ try {
+ const param = { form_data: formData, workflow_id: cozeInfo.workflow_id };
+ loading.value = true;
+ const { code, data } = await executeWorkFlow(param);
+ if (code === 200) {
+ Object.assign(workFlowRes, data.data);
+ loading.value = false;
+ }
+ } catch (error) {
+ console.log(error, 'error');
loading.value = false;
}
};
diff --git a/src/views/Agent/work-flow/style.scss b/src/views/Agent/work-flow/style.scss
index 203353e..e199739 100644
--- a/src/views/Agent/work-flow/style.scss
+++ b/src/views/Agent/work-flow/style.scss
@@ -34,8 +34,24 @@
line-height: 34px;
}
- .layout-sider{
+ .layout-sider {
border-radius: 6px;
margin-left: 20px;
}
+
+
+ .spin-center {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ }
+
+ .work-res {
+ line-height: 26px;
+ font-size: 15px;
+ padding: 20px;
+
+ }
+
}
From af147625ae1d67cfcc68ce8643a9c66aa1786244 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com>
Date: Thu, 17 Jul 2025 19:32:47 +0800
Subject: [PATCH 08/65] =?UTF-8?q?refactor(agent):=20=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E6=99=BA=E8=83=BD=E4=BD=93=E8=81=8A=E5=A4=A9=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改 HistoryChat组件中显示智能体名称而非标题
- 优化 Chat 页面初始化逻辑,添加组件卸载时的销毁操作
- 更新 Index 页面中智能体产品的展示方式
---
.../Agent/Chat/components/HistoryChat.vue | 2 +-
src/views/Agent/Chat/index.vue | 55 +++++++++++++++++--
src/views/Agent/Index/index.vue | 16 +++---
3 files changed, 60 insertions(+), 13 deletions(-)
diff --git a/src/views/Agent/Chat/components/HistoryChat.vue b/src/views/Agent/Chat/components/HistoryChat.vue
index c3abfd3..1ead5f6 100644
--- a/src/views/Agent/Chat/components/HistoryChat.vue
+++ b/src/views/Agent/Chat/components/HistoryChat.vue
@@ -6,7 +6,7 @@
-
+
{{ cozeInfo.type == 1 ? '智能体' : '对话式' }}
{{ cozeInfo.views }}次使用
{{ cozeInfo.description }}
diff --git a/src/views/Agent/Chat/index.vue b/src/views/Agent/Chat/index.vue
index 7cf179c..b2a0231 100644
--- a/src/views/Agent/Chat/index.vue
+++ b/src/views/Agent/Chat/index.vue
@@ -23,10 +23,11 @@
diff --git a/src/router/index.ts b/src/router/index.ts
index af3a60b..93c5b5c 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -38,7 +38,18 @@ export const router = createRouter({
{
path: '/agent/chat',
name: 'Chat',
- component: () => import('@/views/Agent/chat'),
+ component: () => import('@/views/agent/chat'),
+ meta: {
+ hideSidebar: true,
+ requiresAuth: false,
+ requireLogin: true,
+ id: MENU_GROUP_IDS.WORK_BENCH_ID,
+ },
+ },
+ {
+ path: '/agent/workFlow',
+ name: 'WorkFlow',
+ component: () => import('@/views/agent/work-flow'),
meta: {
hideSidebar: true,
requiresAuth: false,
diff --git a/src/router/routes/modules/agent.ts b/src/router/routes/modules/agent.ts
index 24544a0..b7619da 100644
--- a/src/router/routes/modules/agent.ts
+++ b/src/router/routes/modules/agent.ts
@@ -4,42 +4,31 @@ import { MENU_GROUP_IDS } from '@/router/constants';
import IconRepository from '@/assets/svg/icon-repository.svg';
const COMPONENTS: AppRouteRecordRaw[] = [
- {
- path: '/agent',
- name: 'Agent',
- redirect: 'agent/index',
- meta: {
- locale: '扣子智能体',
- icon: IconRepository,
- requiresAuth: true,
- requireLogin: true,
- roles: ['*'],
- id: MENU_GROUP_IDS.PROPERTY_ID,
- },
- children: [
- {
- path: 'index',
- name: 'AgentIndex',
- component: () => import('@/views/agent/index'),
- meta: {
- requiresAuth: false,
- requireLogin: true,
- id: MENU_GROUP_IDS.WORK_BENCH_ID,
- },
- },
- {
- path: 'chat',
- name: 'Chat',
- component: () => import('@/views/agent/chat'),
- meta: {
- hideSidebar: true,
- requiresAuth: false,
- requireLogin: true,
- id: MENU_GROUP_IDS.WORK_BENCH_ID,
- },
- },
- ],
- },
+ // {
+ // path: '/agent',
+ // name: 'Agent',
+ // redirect: 'agent/index',
+ // meta: {
+ // locale: '扣子智能体',
+ // icon: IconRepository,
+ // requiresAuth: true,
+ // requireLogin: true,
+ // roles: ['*'],
+ // id: MENU_GROUP_IDS.AGENT,
+ // },
+ // children: [
+ // {
+ // path: 'index',
+ // name: 'AgentIndex',
+ // component: () => import('@/views/agent/index'),
+ // meta: {
+ // requiresAuth: false,
+ // requireLogin: true,
+ // },
+ // }
+ //
+ // ],
+ // },
];
export default COMPONENTS;
diff --git a/src/views/Agent/Chat/components/ChatBox.vue b/src/views/Agent/Chat/components/ChatBox.vue
deleted file mode 100644
index b2f5b32..0000000
--- a/src/views/Agent/Chat/components/ChatBox.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-

-
舆情脉络整理
-
-
-
- 您好,我是舆情脉络整理助手,可以帮您梳理事件发展脉络,提取核心观点,分析情绪倾向,快速生成舆情摘要与应对建议。
-
-
-
-
- 内容由AI生成,无法确保真实准确,仅供参考。
-
-
-
-
-
diff --git a/src/views/Agent/Chat/components/CozeChat.vue b/src/views/Agent/Chat/components/CozeChat.vue
deleted file mode 100644
index 66d02e2..0000000
--- a/src/views/Agent/Chat/components/CozeChat.vue
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/Agent/work-flow/components/WorkFlow.vue b/src/views/Agent/work-flow/components/WorkFlow.vue
deleted file mode 100644
index 66d02e2..0000000
--- a/src/views/Agent/work-flow/components/WorkFlow.vue
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/views/Agent/AgentConstants.ts b/src/views/agent/AgentConstants.ts
similarity index 100%
rename from src/views/Agent/AgentConstants.ts
rename to src/views/agent/AgentConstants.ts
diff --git a/src/views/Agent/Chat/components/HistoryChat.vue b/src/views/agent/chat/components/HistoryChat.vue
similarity index 100%
rename from src/views/Agent/Chat/components/HistoryChat.vue
rename to src/views/agent/chat/components/HistoryChat.vue
diff --git a/src/views/Agent/Chat/index.vue b/src/views/agent/chat/index.vue
similarity index 93%
rename from src/views/Agent/Chat/index.vue
rename to src/views/agent/chat/index.vue
index 5f42670..542333c 100644
--- a/src/views/Agent/Chat/index.vue
+++ b/src/views/agent/chat/index.vue
@@ -27,7 +27,7 @@ import { useRouter } from 'vue-router';
const router = useRouter();
// 存储认证令牌
-const authToken = ref('pat_tuIM7jubM1hLXaIWzbWg1U15lBe66AlYwu9BkXMQXInh8VdPszRFTwlTPmdziHwg');
+const authToken = ref('');
// 模拟从API获取token
const fetchToken = async () => {
@@ -89,9 +89,8 @@ const initChat = async () => {
};
const cozeWebSdkConfig = (botId, name, auth) => {
- console.log(name, 'title');
auth.onRefreshToken = function () {
- return 'pat_tuIM7jubM1hLXaIWzbWg1U15lBe66AlYwu9BkXMQXInh8VdPszRFTwlTPmdziHwg';
+ return '';
};
let config = {
config: {
@@ -105,6 +104,9 @@ const cozeWebSdkConfig = (botId, name, auth) => {
title: name,
isNeedFunctionCallMessage: true,
},
+ footer:{
+ expressionText:"内容由AI生成,无法确保真实准确,仅供参考。",
+ },
},
auth: auth,
base: {
diff --git a/src/views/Agent/Chat/style.scss b/src/views/agent/chat/style.scss
similarity index 100%
rename from src/views/Agent/Chat/style.scss
rename to src/views/agent/chat/style.scss
diff --git a/src/views/Agent/Index/index.vue b/src/views/agent/index/index.vue
similarity index 98%
rename from src/views/Agent/Index/index.vue
rename to src/views/agent/index/index.vue
index ea730a0..c81addc 100644
--- a/src/views/Agent/Index/index.vue
+++ b/src/views/agent/index/index.vue
@@ -2,7 +2,7 @@
{
};
const query = reactive({
- title: '',
+ name: '',
});
const goDetail = (type: number, id: number) => {
if (type === 1) {
diff --git a/src/views/Agent/Index/style.scss b/src/views/agent/index/style.scss
similarity index 100%
rename from src/views/Agent/Index/style.scss
rename to src/views/agent/index/style.scss
diff --git a/src/views/Agent/work-flow/components/DynamicForm.vue b/src/views/agent/work-flow/components/DynamicForm.vue
similarity index 55%
rename from src/views/Agent/work-flow/components/DynamicForm.vue
rename to src/views/agent/work-flow/components/DynamicForm.vue
index 73ea51f..2dbe195 100644
--- a/src/views/Agent/work-flow/components/DynamicForm.vue
+++ b/src/views/agent/work-flow/components/DynamicForm.vue
@@ -4,16 +4,30 @@
-
-
-
-
-
-
+
+
+
+
+
+
{{ option.label }}
@@ -25,6 +39,7 @@
diff --git a/src/views/Agent/work-flow/components/HistoryChat.vue b/src/views/agent/work-flow/components/HistoryChat.vue
similarity index 72%
rename from src/views/Agent/work-flow/components/HistoryChat.vue
rename to src/views/agent/work-flow/components/HistoryChat.vue
index 671927f..a9c7d0b 100644
--- a/src/views/Agent/work-flow/components/HistoryChat.vue
+++ b/src/views/agent/work-flow/components/HistoryChat.vue
@@ -5,11 +5,10 @@
- {{ cozeInfo.title }}
+ {{ cozeInfo.name }}
{{ cozeInfo.type == 1 ? '智能体' : '对话式' }}
- {{ cozeInfo.views }}次使用
+ {{ cozeInfo.views }}次使用
- 历史对话
@@ -28,15 +27,8 @@ const props = defineProps({
default: '',
},
});
-console.log(props.cozeInfo, 'cozeInfo');
-const getHistoryChat = async () => {
- const { code, data } = await getHistoryChat({ botId: props.botId });
- console.log(data, 'data');
- // 获取历史对话
-};
onMounted(() => {
- getHistoryChat();
});
diff --git a/src/views/Agent/work-flow/index.vue b/src/views/agent/work-flow/index.vue
similarity index 81%
rename from src/views/Agent/work-flow/index.vue
rename to src/views/agent/work-flow/index.vue
index 824ae77..4349dbd 100644
--- a/src/views/Agent/work-flow/index.vue
+++ b/src/views/agent/work-flow/index.vue
@@ -13,9 +13,8 @@
-
- {{ workFlowRes?.output }}
-
+
+
@@ -26,9 +25,11 @@
diff --git a/src/views/agent/chat/components/history.scss b/src/views/agent/chat/components/history.scss
new file mode 100644
index 0000000..d2b4103
--- /dev/null
+++ b/src/views/agent/chat/components/history.scss
@@ -0,0 +1,227 @@
+
+.agent-card {
+ width: 100%;
+ height: 100%;
+ background: var(--BG-100, #F7F8FA);
+ overflow: hidden;
+ border-radius: 8px;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
+
+ .header-section {
+ align-self: stretch;
+ height: 160px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 10px;
+
+ .image-container {
+ align-self: stretch;
+ flex: 1 1 0;
+ position: relative;
+ background: #FFEDED;
+ overflow: hidden;
+ border-radius: 8px;
+
+ img {
+ width: 408.14px;
+ height: 219px;
+ left: -24.07px;
+ top: -29px;
+ position: absolute;
+ }
+ }
+ }
+
+ .info-section {
+ align-self: stretch;
+ padding-top: 15px;
+ padding-bottom: 15px;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+
+ .title-group {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 4px;
+
+ .title {
+ color: var(--Text-1, #211F24);
+ font-size: 18px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 26px;
+ }
+
+ .tag {
+ height: 20px;
+ padding: 0 8px;
+ background: var(--Brand-1, #F0EDFF);
+ border-radius: 2px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 4px;
+
+ .icon {
+ width: 12px;
+ height: 12px;
+ position: relative;
+
+ &::before {
+ content: '';
+ width: 10.74px;
+ height: 10.50px;
+ left: 0.63px;
+ top: 0.75px;
+ position: absolute;
+ background: var(--Brand-6, #6D4CFE);
+ }
+ }
+
+ .text {
+ color: var(--Brand-6, #6D4CFE);
+ font-size: 12px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 20px;
+ }
+ }
+ }
+
+ .usage-info {
+ width: 79px;
+ height: 24px;
+ position: relative;
+
+ .count {
+ left: 0px;
+ top: 0px;
+ position: absolute;
+ color: var(--Text-2, #3C4043);
+ font-size: 16px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 24px;
+ }
+
+ .label {
+ left: 43px;
+ top: 3px;
+ position: absolute;
+ color: var(--Text-3, #737478);
+ font-size: 12px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 20px;
+ }
+ }
+ }
+
+ .description-section {
+ align-self: stretch;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
+
+ .description {
+ align-self: stretch;
+ color: var(--Text-2, #3C4043);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+
+ .divider {
+ align-self: stretch;
+ height: 0px;
+ outline: 1px var(--Border-2, #E6E6E8) solid;
+ outline-offset: -0.50px;
+ }
+
+ .history-section {
+ align-self: stretch;
+ flex: 1 1 0;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
+
+ .history-title {
+ align-self: stretch;
+ height: 40px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
+
+ .text {
+ color: var(--Text-3, #737478);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+
+ .history-list {
+ align-self: stretch;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
+
+ .history-item {
+ align-self: stretch;
+ height: 40px;
+ padding: 8px;
+ border-radius: 8px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
+
+ .item-text {
+ flex: 1 1 0;
+ color: var(--Text-1, #211F24);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+ }
+
+ .scroll-indicator {
+ width: 8px;
+ height: 240px;
+ padding: 8px 1px;
+ position: absolute;
+ left: 362px;
+ top: 40px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: flex-start;
+ gap: 10px;
+
+ .indicator-bar {
+ flex: 1 1 0;
+ height: 80px;
+ background: var(--BG-600, #939499);
+ border-radius: 4px;
+ }
+ }
+ }
+}
diff --git a/src/views/agent/index/index.vue b/src/views/agent/index/index.vue
index c81addc..01f81e0 100644
--- a/src/views/agent/index/index.vue
+++ b/src/views/agent/index/index.vue
@@ -24,15 +24,23 @@
{{ product?.name }}
{{ product?.description }}
+
@@ -47,7 +55,8 @@
diff --git a/src/views/agent/work-flow/components/history.scss b/src/views/agent/work-flow/components/history.scss
new file mode 100644
index 0000000..b212e99
--- /dev/null
+++ b/src/views/agent/work-flow/components/history.scss
@@ -0,0 +1,198 @@
+.container {
+ width: 100%;
+ height: 100%;
+ background: var(--BG-100, #F7F8FA);
+ overflow: hidden;
+ border-radius: 8px;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
+ display: inline-flex;
+}
+
+.header-image-container {
+ align-self: stretch;
+ height: 160px;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 10px;
+ display: flex;
+}
+
+.header-image {
+ align-self: stretch;
+ flex: 1 1 0;
+ position: relative;
+ background: #FFEDED;
+ overflow: hidden;
+ border-radius: 8px;
+}
+
+.header-image img {
+ width: 408.90px;
+ height: 218px;
+ left: -24.45px;
+ top: -29px;
+ position: absolute;
+}
+
+.title-container {
+ align-self: stretch;
+ padding-top: 15px;
+ padding-bottom: 15px;
+ justify-content: space-between;
+ align-items: flex-start;
+ display: inline-flex;
+}
+
+.title {
+ justify-content: center;
+ display: flex;
+ flex-direction: column;
+ color: var(--Text-1, #211F24);
+ font-size: 18px;
+ padding: 5px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 26px;
+ word-wrap: break-word;
+}
+
+.tag {
+ height: 20px;
+ padding-left: 8px;
+ padding-right: 8px;
+ background: var(--Functional-Red-1, #FFE9E7);
+ overflow: hidden;
+ border-radius: 2px;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 4px;
+ display: flex;
+}
+
+.tag-icon {
+ width: 12px;
+ height: 12px;
+ position: relative;
+}
+
+.tag-icon-inner {
+ width: 11.50px;
+ height: 10.75px;
+ left: 0.25px;
+ top: 0.63px;
+ position: absolute;
+ background: var(--Functional-Red-6, #F64B31);
+}
+
+.tag-text {
+ color: var(--Functional-Red-6, #F64B31);
+ font-size: 12px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 20px;
+ word-wrap: break-word;
+}
+
+.usage-stats {
+ width: 79px;
+ height: 24px;
+ position: relative;
+}
+
+.usage-count {
+ left: 0px;
+ top: 0px;
+ position: absolute;
+ color: var(--Text-2, #3C4043);
+ font-size: 16px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 24px;
+ word-wrap: break-word;
+}
+
+.usage-label {
+ left: 43px;
+ top: 3px;
+ position: absolute;
+ color: var(--Text-3, #737478);
+ font-size: 12px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 20px;
+ word-wrap: break-word;
+}
+
+.description {
+ align-self: stretch;
+ color: var(--Text-2, #3C4043);
+ font-size: 14px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 22px;
+ word-wrap: break-word;
+ padding-inline: 5px;
+}
+
+.divider {
+ align-self: stretch;
+ height: 0px;
+ outline: 1px var(--Border-2, #E6E6E8) solid;
+ outline-offset: -0.50px;
+}
+
+.history-title {
+ color: var(--Text-3, #737478);
+ font-size: 14px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 22px;
+ word-wrap: break-word;
+}
+
+.history-item {
+ align-self: stretch;
+ height: 40px;
+ padding: 8px;
+ border-radius: 8px;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
+ display: inline-flex;
+}
+
+.history-item-text {
+ flex: 1 1 0;
+ color: var(--Text-1, #211F24);
+ font-size: 14px;
+ font-family: Alibaba PuHuiTi;
+ font-weight: 400;
+ line-height: 22px;
+ word-wrap: break-word;
+}
+
+.scroll-indicator {
+ width: 8px;
+ height: 240px;
+ padding-left: 1px;
+ padding-right: 1px;
+ padding-top: 8px;
+ padding-bottom: 8px;
+ left: 362px;
+ top: 40px;
+ position: absolute;
+ justify-content: flex-start;
+ align-items: flex-start;
+ gap: 10px;
+ display: inline-flex;
+}
+
+.scroll-indicator-bar {
+ flex: 1 1 0;
+ height: 80px;
+ background: var(--BG-600, #939499);
+ border-radius: 4px;
+}
diff --git a/src/views/agent/work-flow/index.vue b/src/views/agent/work-flow/index.vue
index 4349dbd..c91b716 100644
--- a/src/views/agent/work-flow/index.vue
+++ b/src/views/agent/work-flow/index.vue
@@ -5,7 +5,7 @@
-
+
@@ -24,7 +24,7 @@
diff --git a/src/views/agent/work-flow/components/history.scss b/src/views/agent/work-flow/components/history.scss
index b212e99..e70c356 100644
--- a/src/views/agent/work-flow/components/history.scss
+++ b/src/views/agent/work-flow/components/history.scss
@@ -1,198 +1,225 @@
-.container {
+
+.agent-card {
width: 100%;
height: 100%;
background: var(--BG-100, #F7F8FA);
overflow: hidden;
border-radius: 8px;
+ display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
- display: inline-flex;
-}
-.header-image-container {
- align-self: stretch;
- height: 160px;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- gap: 10px;
- display: flex;
-}
+ .header-section {
+ align-self: stretch;
+ height: 300px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ gap: 10px;
-.header-image {
- align-self: stretch;
- flex: 1 1 0;
- position: relative;
- background: #FFEDED;
- overflow: hidden;
- border-radius: 8px;
-}
+ .image-container {
+ height: 400px;
+ overflow: hidden;
+ border-radius: 8px;
+ }
-.header-image img {
- width: 408.90px;
- height: 218px;
- left: -24.45px;
- top: -29px;
- position: absolute;
-}
+ .image-container img {
+ width: 100%;
+ height: auto;
+ aspect-ratio: 1 / 1;
+ object-fit: cover;
+ }
+ }
-.title-container {
- align-self: stretch;
- padding-top: 15px;
- padding-bottom: 15px;
- justify-content: space-between;
- align-items: flex-start;
- display: inline-flex;
-}
+ .info-section {
+ align-self: stretch;
+ padding-top: 15px;
+ padding-bottom: 15px;
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
-.title {
- justify-content: center;
- display: flex;
- flex-direction: column;
- color: var(--Text-1, #211F24);
- font-size: 18px;
- padding: 5px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 26px;
- word-wrap: break-word;
-}
+ .title-group {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 4px;
-.tag {
- height: 20px;
- padding-left: 8px;
- padding-right: 8px;
- background: var(--Functional-Red-1, #FFE9E7);
- overflow: hidden;
- border-radius: 2px;
- justify-content: flex-start;
- align-items: center;
- gap: 4px;
- display: flex;
-}
+ .title {
+ color: var(--Text-1, #211F24);
+ font-size: 18px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 26px;
+ padding: 10px;
+ }
-.tag-icon {
- width: 12px;
- height: 12px;
- position: relative;
-}
+ .tag {
+ height: 20px;
+ padding: 0 8px;
+ background: var(--Functional-Red-1, #FFE9E7);
+ border-radius: 2px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 4px;
-.tag-icon-inner {
- width: 11.50px;
- height: 10.75px;
- left: 0.25px;
- top: 0.63px;
- position: absolute;
- background: var(--Functional-Red-6, #F64B31);
-}
+ .icon {
+ width: 12px;
+ height: 12px;
+ position: relative;
-.tag-text {
- color: var(--Functional-Red-6, #F64B31);
- font-size: 12px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 20px;
- word-wrap: break-word;
-}
+ &::before {
+ content: '';
+ width: 10.74px;
+ height: 10.50px;
+ left: 0.63px;
+ top: 0.75px;
+ position: absolute;
+ background: var(--Brand-6, #6D4CFE);
+ }
+ }
-.usage-stats {
- width: 79px;
- height: 24px;
- position: relative;
-}
+ .text {
+ color: var(--Functional-Red-6, #F64B31);
+ font-size: 12px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 20px;
+ }
+ }
+ }
-.usage-count {
- left: 0px;
- top: 0px;
- position: absolute;
- color: var(--Text-2, #3C4043);
- font-size: 16px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 24px;
- word-wrap: break-word;
-}
+ .usage-info {
+ width: 79px;
+ height: 34px;
+ position: relative;
-.usage-label {
- left: 43px;
- top: 3px;
- position: absolute;
- color: var(--Text-3, #737478);
- font-size: 12px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 20px;
- word-wrap: break-word;
-}
+ .count {
+ left: 0px;
+ top: 10px;
+ position: absolute;
+ color: var(--Text-2, #3C4043);
+ font-size: 16px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 24px;
+ }
-.description {
- align-self: stretch;
- color: var(--Text-2, #3C4043);
- font-size: 14px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 22px;
- word-wrap: break-word;
- padding-inline: 5px;
-}
+ .label {
+ left: 43px;
+ top: 10px;
+ position: absolute;
+ color: var(--Text-3, #737478);
+ font-size: 12px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 20px;
+ }
+ }
+ }
-.divider {
- align-self: stretch;
- height: 0px;
- outline: 1px var(--Border-2, #E6E6E8) solid;
- outline-offset: -0.50px;
-}
+ .description-section {
+ align-self: stretch;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
-.history-title {
- color: var(--Text-3, #737478);
- font-size: 14px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 22px;
- word-wrap: break-word;
-}
+ .description {
+ align-self: stretch;
+ color: var(--Text-2, #3C4043);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ padding: 10px;
+ }
+ }
-.history-item {
- align-self: stretch;
- height: 40px;
- padding: 8px;
- border-radius: 8px;
- justify-content: flex-start;
- align-items: center;
- gap: 10px;
- display: inline-flex;
-}
+ .divider {
+ align-self: stretch;
+ height: 0px;
+ outline: 1px var(--Border-2, #E6E6E8) solid;
+ outline-offset: -0.50px;
+ }
-.history-item-text {
- flex: 1 1 0;
- color: var(--Text-1, #211F24);
- font-size: 14px;
- font-family: Alibaba PuHuiTi;
- font-weight: 400;
- line-height: 22px;
- word-wrap: break-word;
-}
+ .history-section {
+ align-self: stretch;
+ flex: 1 1 0;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
-.scroll-indicator {
- width: 8px;
- height: 240px;
- padding-left: 1px;
- padding-right: 1px;
- padding-top: 8px;
- padding-bottom: 8px;
- left: 362px;
- top: 40px;
- position: absolute;
- justify-content: flex-start;
- align-items: flex-start;
- gap: 10px;
- display: inline-flex;
-}
+ .history-title {
+ align-self: stretch;
+ height: 40px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
-.scroll-indicator-bar {
- flex: 1 1 0;
- height: 80px;
- background: var(--BG-600, #939499);
- border-radius: 4px;
+ .text {
+ color: var(--Functional-Red-6, #F64B31);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+
+ .history-list {
+ align-self: stretch;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: flex-start;
+
+ .history-item {
+ align-self: stretch;
+ height: 40px;
+ padding: 8px;
+ border-radius: 8px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ gap: 10px;
+
+ .item-text {
+ flex: 1 1 0;
+ color: var(--Text-1, #211F24);
+ font-size: 14px;
+ font-family: 'Alibaba PuHuiTi', sans-serif;
+ font-weight: 400;
+ line-height: 22px;
+ }
+ }
+ }
+
+ .scroll-indicator {
+ width: 8px;
+ height: 240px;
+ padding: 8px 1px;
+ position: absolute;
+ left: 362px;
+ top: 40px;
+ display: flex;
+ justify-content: flex-start;
+ align-items: flex-start;
+ gap: 10px;
+
+ .indicator-bar {
+ flex: 1 1 0;
+ height: 80px;
+ background: var(--BG-600, #939499);
+ border-radius: 4px;
+ }
+ }
+ }
}
From 6a43cfad75114e6ede9faf91447cc78874033005 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com>
Date: Mon, 28 Jul 2025 14:45:32 +0800
Subject: [PATCH 18/65] =?UTF-8?q?refactor(agent):=20=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E6=99=BA=E8=83=BD=E4=BD=93=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?=
=?UTF-8?q?=E5=92=8C=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-调整了智能体卡片的布局结构,优化了标题和描述的显示方式
- 改进了历史对话的展示样式,增加了滚动指示器
- 统一了标签和图标的样式,提升了视觉一致性
- 优化了搜索框和卡片列表的样式,提高了用户体验
---
src/router/routes/modules/agent.ts | 4 ++--
src/views/agent/chat/components/HistoryChat.vue | 2 +-
src/views/agent/chat/components/history.scss | 5 ++---
src/views/agent/chat/index.vue | 3 ++-
src/views/agent/chat/style.scss | 15 +++++++++++++++
src/views/agent/index/index.vue | 6 +++++-
6 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/src/router/routes/modules/agent.ts b/src/router/routes/modules/agent.ts
index c97b82d..c9efb45 100644
--- a/src/router/routes/modules/agent.ts
+++ b/src/router/routes/modules/agent.ts
@@ -9,7 +9,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
name: 'Agent',
redirect: 'agent/index',
meta: {
- locale: '扣子智能体',
+ locale: '灵机ai',
icon: IconRepository,
requiresAuth: true,
requireLogin: true,
@@ -22,7 +22,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
name: 'AgentIndex',
component: () => import('@/views/agent/index'),
meta: {
- locale:'ai应用',
+ locale:'智能体应用',
requiresAuth: false,
requireLogin: true,
},
diff --git a/src/views/agent/chat/components/HistoryChat.vue b/src/views/agent/chat/components/HistoryChat.vue
index b68b64b..e572ac6 100644
--- a/src/views/agent/chat/components/HistoryChat.vue
+++ b/src/views/agent/chat/components/HistoryChat.vue
@@ -9,7 +9,7 @@
{{cozeInfo.name}}
-
+
返回空间
-
+
@@ -136,4 +136,5 @@ onUnmounted(() => {
diff --git a/src/views/agent/chat/style.scss b/src/views/agent/chat/style.scss
index 5e867e7..780a2d8 100644
--- a/src/views/agent/chat/style.scss
+++ b/src/views/agent/chat/style.scss
@@ -24,4 +24,19 @@
line-height: 22px;
word-wrap: break-word
}
+ .custom-sider {
+ width: 20% !important; // 强制覆盖
+ }
+
+ @media (min-width: 1400px) and (max-width: 1799px) {
+ .custom-sider {
+ width: 30% !important;
+ }
+ }
+
+ @media (min-width: 1800px) {
+ .custom-sider {
+ width: 15% !important;
+ }
+ }
}
diff --git a/src/views/agent/index/index.vue b/src/views/agent/index/index.vue
index 5f467af..f816baa 100644
--- a/src/views/agent/index/index.vue
+++ b/src/views/agent/index/index.vue
@@ -15,7 +15,11 @@
{{ item.name }}
-
+
![]()
Date: Mon, 28 Jul 2025 16:08:02 +0800
Subject: [PATCH 19/65] =?UTF-8?q?refactor(agent):=20=E9=87=8D=E6=9E=84?=
=?UTF-8?q?=E6=99=BA=E8=83=BD=E4=BD=93=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?=
=?UTF-8?q?=E5=92=8C=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-调整了智能体卡片的布局结构,优化了标题和描述的显示方式
- 改进了历史对话的展示样式,增加了滚动指示器
- 统一了标签和图标的样式,提升了视觉一致性
- 优化了搜索框和卡片列表的样式,提高了用户体验
---
src/assets/svg/menu-fold.svg | 3 ++
src/assets/svg/menu-unfold.svg | 3 ++
src/layouts/Page.vue | 3 +-
src/router/routes/modules/agent.ts | 1 +
src/views/agent/chat/index.vue | 52 ++++++++++++++++++++++--------
src/views/agent/chat/style.scss | 2 ++
src/views/agent/index/index.vue | 10 +++---
src/views/agent/index/style.scss | 1 +
8 files changed, 56 insertions(+), 19 deletions(-)
create mode 100644 src/assets/svg/menu-fold.svg
create mode 100644 src/assets/svg/menu-unfold.svg
diff --git a/src/assets/svg/menu-fold.svg b/src/assets/svg/menu-fold.svg
new file mode 100644
index 0000000..08a646c
--- /dev/null
+++ b/src/assets/svg/menu-fold.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/assets/svg/menu-unfold.svg b/src/assets/svg/menu-unfold.svg
new file mode 100644
index 0000000..fde0009
--- /dev/null
+++ b/src/assets/svg/menu-unfold.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/layouts/Page.vue b/src/layouts/Page.vue
index 6f6a6aa..d9fbcb5 100644
--- a/src/layouts/Page.vue
+++ b/src/layouts/Page.vue
@@ -8,6 +8,7 @@ const route = useRoute();
const routerKey = computed(() => {
return route.path + Math.random();
});
+const hideFooter = computed(() => route.meta?.hideFooter);
/*** - end */
@@ -19,7 +20,7 @@ const routerKey = computed(() => {
-