Skip to content

Commit b96ec88

Browse files
committed
fix(agent-core): authorize direct edit tool test
1 parent 704f4eb commit b96ec88

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • src-tauri/crates/agent-core/src/core/tools/impls/coding/edit_file

src-tauri/crates/agent-core/src/core/tools/impls/coding/edit_file/tests.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@ async fn test_tool_rejects_empty_search_without_changing_file() {
2121
let workspace = tempfile::tempdir().unwrap();
2222
let file = workspace.path().join("test.txt");
2323
let tool = EditTool::new().with_workspace(workspace.path().to_path_buf());
24+
let ctx = CallContext::trusted_sde();
2425

2526
tool.execute_text(
2627
json!({"file_path": "test.txt", "content": "original", "old_string": "", "new_string": ""}),
27-
&CallContext::default(),
28+
&ctx,
2829
)
2930
.await
3031
.unwrap();
3132

3233
let error = tool
3334
.execute_text(
3435
json!({"file_path": "test.txt", "content": "partial", "old_string": "", "new_string": "x"}),
35-
&CallContext::default(),
36+
&ctx,
3637
)
3738
.await
3839
.unwrap_err();

0 commit comments

Comments
 (0)