diff --git a/frontend/app/web-gold/src/views/agents/Agents.vue b/frontend/app/web-gold/src/views/agents/Agents.vue
index 102ee2d799..6f5c38e09e 100644
--- a/frontend/app/web-gold/src/views/agents/Agents.vue
+++ b/frontend/app/web-gold/src/views/agents/Agents.vue
@@ -144,10 +144,16 @@
@@ -170,6 +176,13 @@
:agent="currentAgent"
@send="handleSendMessage"
/>
+
+
+
@@ -182,11 +195,13 @@ import {
MessageOutlined,
AppstoreOutlined,
StarOutlined,
- StarFilled
+ StarFilled,
+ HistoryOutlined
} from '@ant-design/icons-vue'
import { message } from 'ant-design-vue'
import FullWidthLayout from '@/layouts/components/FullWidthLayout.vue'
import ChatDrawer from '@/components/agents/ChatDrawer.vue'
+import HistoryPanel from '@/components/agents/HistoryPanel.vue'
import { getAgentList, addFavorite, removeFavorite } from '@/api/agent'
import tokenManager from '@gold/utils/token-manager'
@@ -200,6 +215,8 @@ const categoryScrollRef = ref(null)
const expandTriggerRef = ref(null)
const showCategoryPanel = ref(false)
const panelTop = ref(0)
+const historyPanelVisible = ref(false)
+const historyAgentId = ref(null)
// 面板样式
const panelStyle = computed(() => ({
@@ -339,6 +356,20 @@ const handleChat = (agent) => {
chatDrawerVisible.value = true
}
+const handleHistory = (agent) => {
+ // 检查登录状态
+ if (!tokenManager.isLoggedIn()) {
+ message.warning('请先登录')
+ return
+ }
+ historyAgentId.value = agent.id
+ historyPanelVisible.value = true
+}
+
+const closeHistoryPanel = () => {
+ historyPanelVisible.value = false
+}
+
const handleSendMessage = (data) => {
console.log('发送消息:', data)
}
@@ -798,7 +829,7 @@ onMounted(() => {
.card-footer {
display: flex;
align-items: center;
- justify-content: center;
+ justify-content: flex-end;
padding: 12px 16px;
border-top: 1px solid #F3F4F6;
background: #FAFAFA;
@@ -807,31 +838,50 @@ onMounted(() => {
transition: all 0.25s ease;
}
-.chat-btn {
+.footer-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.action-btn {
display: inline-flex;
align-items: center;
- gap: 6px;
- padding: 6px 14px;
- background: #111827;
- border: none;
+ gap: 5px;
+ padding: 6px 12px;
+ background: white;
+ border: 1px solid #E5E7EB;
border-radius: 8px;
font-size: 12px;
font-weight: 500;
- color: white;
+ color: #6B7280;
cursor: pointer;
transition: all 0.2s ease;
&:hover {
- background: #1F2937;
- transform: scale(1.02);
+ border-color: #D1D5DB;
+ background: #F9FAFB;
+ color: #374151;
}
&:active {
transform: scale(0.98);
}
+
+ &--primary {
+ background: #111827;
+ border-color: #111827;
+ color: white;
+
+ &:hover {
+ background: #1F2937;
+ border-color: #1F2937;
+ color: white;
+ }
+ }
}
-.chat-btn-icon {
+.action-btn-icon {
font-size: 13px;
}