@wendongfly/zihi 1.1.20 → 1.1.21
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 +3 -2
- package/dist/index.js +1 -1
- package/dist/index.min.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/chat.html
CHANGED
|
@@ -1154,7 +1154,8 @@
|
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
1156
|
function respondPermModal(requestId, allow, toolName, approveAll) {
|
|
1157
|
-
|
|
1157
|
+
// 没有控制权时先尝试夺取(同账号会话所有者后端会放行)
|
|
1158
|
+
if (!isController && canTakeControl()) socket.emit('take-control', { sessionId: SESSION_ID });
|
|
1158
1159
|
socket.emit('agent:permission', { requestId, allow, toolName, approveAll });
|
|
1159
1160
|
const inlineActions = document.querySelector(`.perm-actions[data-reqid="${requestId}"]`);
|
|
1160
1161
|
if (inlineActions) inlineActions.innerHTML = allow
|
|
@@ -1201,7 +1202,7 @@
|
|
|
1201
1202
|
});
|
|
1202
1203
|
|
|
1203
1204
|
window.respondAgentPermission = function(requestId, allow, btn, toolName) {
|
|
1204
|
-
if (!isController
|
|
1205
|
+
if (!isController && canTakeControl()) socket.emit('take-control', { sessionId: SESSION_ID });
|
|
1205
1206
|
const approveAll = !!toolName;
|
|
1206
1207
|
socket.emit('agent:permission', { requestId, allow, toolName, approveAll });
|
|
1207
1208
|
const actions = btn.closest('.perm-actions');
|