feat: agent 会话危险命令确认提示新增「全部确认」选项

This commit is contained in:
yumoqing 2026-08-19 14:09:27 +08:00
parent 972e9307c8
commit ad2459b073
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ if action == 'send_message':
_tool = data.get('tool', '')
_params = data.get('params', {}) or {}
_cmd = _params.get('command', '') if isinstance(_params, dict) else ''
yield json.dumps({"content": "⚠️ 需要你确认执行命令:`" + str(_cmd)[:120] + "`\n请回复「确认」执行或「取消」放弃。"}, ensure_ascii=False) + '\n'
yield json.dumps({"content": "⚠️ 需要你确认执行命令:`" + str(_cmd)[:120] + "`\n请回复「确认」执行、「全部确认」本会话不再询问,或「取消」放弃。"}, ensure_ascii=False) + '\n'
elif t == 'error':
yield json.dumps({"error": data.get('message', '')}, ensure_ascii=False) + '\n'
else:

View File

@ -42,7 +42,7 @@ if action == 'send_message':
_tool = data.get('tool', '')
_params = data.get('params', {}) or {}
_cmd = _params.get('command', '') if isinstance(_params, dict) else ''
yield json.dumps({"content": "⚠️ 需要你确认执行命令:`" + str(_cmd)[:120] + "`\n请回复「确认」执行或「取消」放弃。"}, ensure_ascii=False) + '\n'
yield json.dumps({"content": "⚠️ 需要你确认执行命令:`" + str(_cmd)[:120] + "`\n请回复「确认」执行、「全部确认」本会话不再询问,或「取消」放弃。"}, ensure_ascii=False) + '\n'
elif t == 'error':
yield json.dumps({"error": data.get('message', '')}, ensure_ascii=False) + '\n'
else: