feat: agent 会话危险命令确认提示新增「全部确认」选项
This commit is contained in:
parent
972e9307c8
commit
ad2459b073
@ -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:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user