feat: 智能体对话标题自动更新+历史显示优化
This commit is contained in:
@@ -792,7 +792,7 @@ function renderAgentsPage() {
|
||||
<span class="recent-agent-name">${conv.title}</span>
|
||||
</div>
|
||||
<div class="recent-agent-right">
|
||||
<span class="recent-agent-agent-name">${conv.agent ? conv.agent.name : '未知智能体'}</span>
|
||||
<span class="recent-agent-category">${conv.agent ? getCategoryLabel(conv.agent.category) : '未知'}</span>
|
||||
<span class="recent-agent-time">${formatTime(conv.updatedAt)}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3006,7 +3006,7 @@ function showAgentHistoryPage() {
|
||||
<span class="agent-history-name">${conv.title}</span>
|
||||
</div>
|
||||
<div class="agent-history-right">
|
||||
<span class="agent-history-agent">${conv.agent ? conv.agent.name : '未知智能体'}</span>
|
||||
<span class="agent-history-category">${conv.agent ? getCategoryLabel(conv.agent.category) : '未知'}</span>
|
||||
<span class="agent-history-time">${formatTime(conv.updatedAt)}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3087,7 +3087,7 @@ async function openAgent(agentId) {
|
||||
// 创建新对话并设置智能体
|
||||
const newConv = {
|
||||
id: backendId || Date.now().toString(),
|
||||
title: currentAgent.name,
|
||||
title: '新对话', // 和普通对话一样,初始标题为"新对话",后续自动生成
|
||||
messages: [],
|
||||
agentId: agentId,
|
||||
createdAt: Date.now(),
|
||||
|
||||
@@ -1730,7 +1730,7 @@ body {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.recent-agent-agent-name {
|
||||
.recent-agent-category {
|
||||
font-size: 12px;
|
||||
color: var(--primary);
|
||||
background: rgba(102, 126, 234, 0.1);
|
||||
@@ -1807,7 +1807,7 @@ body {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.agent-history-agent {
|
||||
.agent-history-category {
|
||||
font-size: 12px;
|
||||
color: var(--primary);
|
||||
background: rgba(102, 126, 234, 0.1);
|
||||
|
||||
Reference in New Issue
Block a user