Skip to content

Commit 2ff53d3

Browse files
patnikoCopilot
authored andcommitted
fix: address review findings from PR #523
- Fix Python tests: add missing required argument to create_session() calls - Fix Go: separate misplaced buildUnsupportedToolResult doc comment from mergeExcludedTools - Fix Go sample: whitespace alignment from merge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 282a297 commit 2ff53d3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

go/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,6 @@ func buildFailedToolResult(internalError string) ToolResult {
14101410
}
14111411
}
14121412

1413-
// buildUnsupportedToolResult creates a failure ToolResult for an unsupported tool.
14141413
// mergeExcludedTools returns a deduplicated list combining excludedTools with
14151414
// the names of any SDK-registered tools, so the CLI won't handle them.
14161415
func mergeExcludedTools(excludedTools []string, tools []Tool) []string {
@@ -1434,6 +1433,7 @@ func mergeExcludedTools(excludedTools []string, tools []Tool) []string {
14341433
return merged
14351434
}
14361435

1436+
// buildUnsupportedToolResult creates a failure ToolResult for an unsupported tool.
14371437
func buildUnsupportedToolResult(toolName string) ToolResult {
14381438
return ToolResult{
14391439
TextResultForLLM: fmt.Sprintf("Tool '%s' is not supported by this client instance.", toolName),

python/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async def mock_request(method, params):
244244
return await original_request(method, params)
245245

246246
client._client.request = mock_request
247-
await client.create_session()
247+
await client.create_session({})
248248
assert "excludedTools" not in captured["session.create"]
249249
finally:
250250
await client.force_stop()
@@ -255,7 +255,7 @@ async def test_resume_session_adds_tools_to_excluded(self):
255255
await client.start()
256256

257257
try:
258-
session = await client.create_session()
258+
session = await client.create_session({})
259259

260260
captured = {}
261261
original_request = client._client.request

test/scenarios/tools/tool-overrides/go/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func main() {
2525
defer client.Stop()
2626

2727
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
28-
Model: "claude-haiku-4.5",
28+
Model: "claude-haiku-4.5",
2929
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
3030
Tools: []copilot.Tool{
3131
copilot.DefineTool("grep", "A custom grep implementation that overrides the built-in",

0 commit comments

Comments
 (0)