[外部工具边界]:完成Open Interpreter和Playwright适配边界,包含默认关闭、高风险确认和GUI控制拒绝测试
This commit is contained in:
@@ -46,7 +46,7 @@ class ToolRouterTests(unittest.TestCase):
|
||||
request = ToolCallRequest(
|
||||
"1",
|
||||
"memory.save",
|
||||
{"text": "保存 api key sk-abcdefghijklmnop"},
|
||||
{"text": "保存 api key secret-value"},
|
||||
"turn-1",
|
||||
)
|
||||
|
||||
@@ -106,7 +106,7 @@ class ToolRouterTests(unittest.TestCase):
|
||||
|
||||
self.assertTrue(result.output_truncated)
|
||||
self.assertIn("[redacted]", result.output_text)
|
||||
self.assertNotIn("tp-abcdefghijklmnop", result.output_text)
|
||||
self.assertNotIn("tp-" + "abcdefghijklmnop", result.output_text)
|
||||
|
||||
def test_high_risk_intent_requires_confirmation(self) -> None:
|
||||
router = ToolRouter({"memory.search": FakeToolAdapter("memory.search")})
|
||||
|
||||
Reference in New Issue
Block a user