refactor(agent): 重构智能体页面布局和样式

-调整了智能体卡片的布局结构,优化了标题和描述的显示方式
- 改进了历史对话的展示样式,增加了滚动指示器
- 统一了标签和图标的样式,提升了视觉一致性
- 优化了搜索框和卡片列表的样式,提高了用户体验
This commit is contained in:
林志军
2025-07-28 19:59:54 +08:00
parent aa13941a83
commit f13384309a
7 changed files with 80 additions and 86 deletions

View File

@ -28,18 +28,7 @@
{{cozeInfo.description}}
</div>
</div>
<div class="divider"></div>
<!-- <div class="history-section">-->
<!-- <div class="history-title">-->
<!-- <div class="text">历史对话</div>-->
<!-- </div>-->
<!-- <div class="history-list">-->
<!-- <div class="history-item">-->
<!-- <div class="item-text">梳理这次舆情的时间线和关键节点</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</template>

View File

@ -37,7 +37,7 @@
.info-section {
align-self: stretch;
padding: 15px;
padding: 10px 0 0 10px;
display: flex;
justify-content: space-between;
align-items: flex-start;
@ -110,7 +110,7 @@
}
.label {
left: 43px;
left: 22px;
top: 10px;
position: absolute;
color: var(--Text-3, #737478);
@ -142,12 +142,7 @@
}
}
.divider {
align-self: stretch;
height: 0px;
outline: 1px var(--Border-2, #E6E6E8) solid;
outline-offset: -0.50px;
}
.history-section {
align-self: stretch;

View File

@ -14,20 +14,23 @@
class="history-chat-col">
<HistoryChat v-if="cozeInfo?.bot_id && !isCollapsed" :cozeInfo="cozeInfo" />
</a-col>
<!-- 右侧聊天内容 -->
<a-col :xs="24"
:sm="isCollapsed ? 24 : 12"
:md="isCollapsed ? 24 : 16"
:lg="isCollapsed ? 24 : 18"
:xl="isCollapsed ? 24 : 15" class="chat-content-col">
<div class="toggle-btn" @click="toggleCollapse">
<a-tooltip :content="isCollapsed ? '展开' : '折叠'">
<img class="status-icon" :src="isCollapsed ? menuFold : menuUnfold" />
</a-tooltip>
</div>
<a-card :bordered="false">
:xl="isCollapsed ? 24 : 16" class="chat-content-col">
<div id="coze-chat-container" style="width: 100%; margin-left: 100px"></div>
<a-card :bordered="false">
<div class="chat-content-col" style="min-height: fit-content;">
<div class="toggle-btn" @click="toggleCollapse">
<a-tooltip :content="isCollapsed ? '展开' : '折叠'">
<img class="status-icon" :src="isCollapsed ? menuUnfold : menuFold" />
</a-tooltip>
</div>
<div id="coze-chat-container" style="width: 100%; margin-left: 100px"></div>
</div>
</a-card>
</a-col>
</a-row>
@ -107,7 +110,7 @@ const initChat = async () => {
}
Object.assign(cozeInfo, data.info);
await loadScript('https://lf-cdn.coze.cn/obj/unpkg/flow-platform/chat-app-sdk/1.2.0-beta.10/libs/cn/index.js');
await loadScript('https://lf-cdn.coze.cn/obj/unpkg/flow-platform/chat-app-sdk/1.2.0-beta.17/libs/cn/index.js');
let cozeConfig = await cozeWebSdkConfig(data.info.bot_id, data.info.name, data.info.auth, data.info.user_info);
cozeWebSDK = cozeWebSDK = new CozeWebSDK.WebChatClient(cozeConfig);
showChatPage();
@ -124,7 +127,7 @@ const cozeWebSdkConfig = (botId, name, auth, userInfo) => {
ui: {
chatBot: {
el: document.getElementById('coze-chat-container'),
width: '80%',
width: '95%',
height: '100%',
title: name,
isNeedFunctionCallMessage: true,
@ -132,10 +135,20 @@ const cozeWebSdkConfig = (botId, name, auth, userInfo) => {
base: {
icon: '',
zIndex: 1000,
lang:'zh-CN'
},
footer: {
expressionText: '内容由AI生成无法确保真实准确仅供参考。',
},
header: {
isShow: true,
isNeedClose: true
},
conversations: {
isNeed: true,
isNeedAddNewConversationBoolean: true,
isNeedQuoteBoolean: true,
}
},
auth: auth,
userInfo: userInfo,