dsh-folia 4.26.0-pre.79 → 4.26.0-pre.80
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/lib/client.js +7 -2
- package/lib/routes/pet-chat.js +2 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -25959,10 +25959,15 @@ window.__ModuleLoader__.load({
|
|
|
25959
25959
|
});
|
|
25960
25960
|
return el;
|
|
25961
25961
|
};
|
|
25962
|
+
const hardConfirm = payload.hardConfirm === true;
|
|
25962
25963
|
row.appendChild(button(weT('允许'), 'allow', true));
|
|
25963
25964
|
row.appendChild(button(weT('不允许'), 'deny', false));
|
|
25964
|
-
|
|
25965
|
-
|
|
25965
|
+
if (!hardConfirm) {
|
|
25966
|
+
row.appendChild(button(weT('以后都允许'), 'always', false));
|
|
25967
|
+
row.appendChild(button(weT('以后都别问'), 'never', false));
|
|
25968
|
+
} else if (question) {
|
|
25969
|
+
question.textContent += '(写文件/剪贴板这类操作每次都会确认,避免误操作)';
|
|
25970
|
+
}
|
|
25966
25971
|
box.appendChild(row);
|
|
25967
25972
|
document.body.appendChild(box);
|
|
25968
25973
|
petChatConfirmNode = box;
|
package/lib/routes/pet-chat.js
CHANGED
|
@@ -1344,6 +1344,7 @@ export function registerPetChatRoutes(webServer, c) {
|
|
|
1344
1344
|
});
|
|
1345
1345
|
sse(res, 'confirm', {
|
|
1346
1346
|
id: row.id, tool, group: row.group, permission,
|
|
1347
|
+
hardConfirm: toolNeedsConfirm(tool),
|
|
1347
1348
|
question: row.question,
|
|
1348
1349
|
options: [
|
|
1349
1350
|
{ value: 'allow', label: '允许' },
|
|
@@ -1463,6 +1464,7 @@ export function registerPetChatRoutes(webServer, c) {
|
|
|
1463
1464
|
sse(res, 'meta', { mood: mood.mood, rate: mood.rate, intent: 'action', tool, personaId: persona && persona.id });
|
|
1464
1465
|
sse(res, 'confirm', {
|
|
1465
1466
|
id: row.id, tool, group, permission, question,
|
|
1467
|
+
hardConfirm: toolNeedsConfirm(tool),
|
|
1466
1468
|
options: [
|
|
1467
1469
|
{ value: 'allow', label: '允许' },
|
|
1468
1470
|
{ value: 'deny', label: '不允许' },
|
package/package.json
CHANGED