Skip to content

Commit 3b89229

Browse files
committed
fix: remove unused grep override tool from E2E test
The ErgonomicToolDefinitionIT snapshot only exercises set_current_phase and search_items. The grep tool (with overridesBuiltInTool=true) was never invoked, making it dead code that contradicted the PR description. Addresses review comment r3469523851.
1 parent d945f9c commit 3b89229

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

java/src/test/java/com/github/copilot/e2e/ErgonomicTestTools$$CopilotToolMeta.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ public List<ToolDefinition> definitions(ErgonomicTestTools instance, ObjectMappe
4444
Map<String, Object> args = invocation.getArguments();
4545
String keyword = (String) args.get("keyword");
4646
return CompletableFuture.completedFuture(instance.searchItems(keyword));
47-
}, null, null, null),
48-
new ToolDefinition("grep", "Custom grep override",
49-
Map.of("type", "object", "properties", Map.ofEntries(Map.entry("query",
50-
(Map<String, Object>) (Map) withMeta(Map.of("type", "string"), "Search query", null))),
51-
"required", List.of("query")),
52-
invocation -> {
53-
Map<String, Object> args = invocation.getArguments();
54-
String query = (String) args.get("query");
55-
return CompletableFuture.completedFuture(instance.grepOverride(query));
56-
}, Boolean.TRUE, null, null));
47+
}, null, null, null));
5748
}
5849
}

java/src/test/java/com/github/copilot/e2e/ErgonomicTestTools.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,4 @@ public String setCurrentPhase(@Param("The phase to transition to") String phase)
2929
public String searchItems(@Param("Search keyword") String keyword) {
3030
return "Found: item_alpha, item_beta";
3131
}
32-
33-
@CopilotTool(value = "Custom grep override", name = "grep", overridesBuiltInTool = true)
34-
public String grepOverride(@Param("Search query") String query) {
35-
return "CUSTOM_GREP: " + query;
36-
}
3732
}

0 commit comments

Comments
 (0)