@wendongfly/myhi 1.0.124 → 1.2.0
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/dist/chat.html +9 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -1469,10 +1469,17 @@
|
|
|
1469
1469
|
|
|
1470
1470
|
// ── 清除会话 ──────────────────────────────────
|
|
1471
1471
|
window.doClear = function() {
|
|
1472
|
-
//
|
|
1472
|
+
// 清除聊天区 UI
|
|
1473
1473
|
chatArea.innerHTML = '';
|
|
1474
1474
|
endStream();
|
|
1475
|
-
|
|
1475
|
+
// Agent 模式:发送 /clear 清除 Claude 上下文
|
|
1476
|
+
if (currentSession?.mode === 'agent') {
|
|
1477
|
+
if (!isController && canTakeControl()) socket.emit('take-control', { sessionId: SESSION_ID });
|
|
1478
|
+
socket.emit('agent:query', { prompt: '/clear' });
|
|
1479
|
+
addStatusMessage('已清除对话和 Claude 上下文');
|
|
1480
|
+
} else {
|
|
1481
|
+
addStatusMessage('聊天记录已清除');
|
|
1482
|
+
}
|
|
1476
1483
|
};
|
|
1477
1484
|
|
|
1478
1485
|
// ── 会话命名 ──────────────────────────────────
|
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"1.0
|
|
1
|
+
{"type":"module","version":"1.2.0"}
|