myagent-ai 1.6.3 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/ui/chat.html +14 -2
package/package.json
CHANGED
package/web/ui/chat.html
CHANGED
|
@@ -545,6 +545,15 @@ input,textarea,select{font:inherit}
|
|
|
545
545
|
}
|
|
546
546
|
.agent-create-btn:hover{background:var(--accent2);transform:scale(1.05)}
|
|
547
547
|
.agent-create-btn svg{width:16px;height:16px}
|
|
548
|
+
.agent-manage-btn{
|
|
549
|
+
width:30px;height:30px;border-radius:var(--radius-xs);
|
|
550
|
+
background:var(--bg3);color:var(--text2);
|
|
551
|
+
display:grid;place-items:center;flex-shrink:0;
|
|
552
|
+
transition:var(--transition);font-size:16px;font-weight:600;
|
|
553
|
+
border:1px solid var(--border);
|
|
554
|
+
}
|
|
555
|
+
.agent-manage-btn:hover{background:var(--bg4);color:var(--accent);transform:scale(1.05)}
|
|
556
|
+
.agent-manage-btn svg{width:16px;height:16px}
|
|
548
557
|
|
|
549
558
|
/* Agent list */
|
|
550
559
|
.agent-list{flex:1;overflow-y:auto;padding:8px 12px}
|
|
@@ -1702,6 +1711,9 @@ input,textarea,select{font:inherit}
|
|
|
1702
1711
|
<div class="agent-toggle" onclick="toggleAgentPanel()" id="agentToggle" title="收起 Agent 面板">▶</div>
|
|
1703
1712
|
<div class="agent-panel-header">
|
|
1704
1713
|
<h3><span class="agents-emoji">🤖</span> Agents</h3>
|
|
1714
|
+
<button class="agent-manage-btn" onclick="window.open('/ui/index.html?page=agents','_blank')" title="Agent 管理后台">
|
|
1715
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
1716
|
+
</button>
|
|
1705
1717
|
<button class="agent-create-btn" onclick="showCreateAgentModal()" title="创建新 Agent">
|
|
1706
1718
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
|
1707
1719
|
</button>
|
|
@@ -3051,7 +3063,8 @@ async function loadSessions() {
|
|
|
3051
3063
|
} catch (e) {
|
|
3052
3064
|
// Offline - try cache
|
|
3053
3065
|
state.sessions = state.agentSessions[state.activeAgent] || [];
|
|
3054
|
-
|
|
3066
|
+
renderSessions();
|
|
3067
|
+
}
|
|
3055
3068
|
|
|
3056
3069
|
// Auto-select most recent session if none selected
|
|
3057
3070
|
if (!state.activeSessionId && state.sessions.length > 0) {
|
|
@@ -4196,7 +4209,6 @@ async function callChatInject(text, choice) {
|
|
|
4196
4209
|
toast(`注入失败: ${e.message}`, 'error');
|
|
4197
4210
|
}
|
|
4198
4211
|
}
|
|
4199
|
-
}
|
|
4200
4212
|
|
|
4201
4213
|
async function insertMessageToRunningSession(text) {
|
|
4202
4214
|
// 立即将消息插入到当前正在进行的会话中
|