Skip to content

Commit cd919b2

Browse files
Add todo
1 parent 41850ee commit cd919b2

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

dotnet/test/ToolsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ static string SafeLookup([Description("Lookup ID")] string id)
195195
new Dictionary<string, object?> { ["skip_permission"] = true })
196196
});
197197

198+
// TODO: Once the CLI respects skip_permission, use a tracking permission handler
199+
// and assert it was NOT called for this tool.
198200
var session = await CreateSessionAsync(new SessionConfig
199201
{
200202
Tools = [tool],

go/internal/e2e/tools_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ func TestTools(t *testing.T) {
277277
})
278278
safeLookupTool.SkipPermission = true
279279

280+
// TODO: Once the CLI respects SkipPermission, use a tracking permission handler
281+
// and assert it was NOT called for this tool.
280282
session, err := client.CreateSession(t.Context(), &copilot.SessionConfig{
281283
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
282284
Tools: []copilot.Tool{

nodejs/test/e2e/tools.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ describe("Custom tools", async () => {
160160
});
161161

162162
it("skipPermission sent in tool definition", async () => {
163+
// TODO: Once the CLI respects skipPermission, use a tracking permission handler
164+
// and assert it was NOT called for this tool.
163165
const session = await client.createSession({
164166
onPermissionRequest: approveAll,
165167
tools: [

python/e2e/test_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ class LookupParams(BaseModel):
150150
def safe_lookup(params: LookupParams, invocation: ToolInvocation) -> str:
151151
return f"RESULT: {params.id}"
152152

153+
# TODO: Once the CLI respects skip_permission, use a tracking permission handler
154+
# and assert it was NOT called for this tool.
153155
session = await ctx.client.create_session(
154156
{"tools": [safe_lookup], "on_permission_request": PermissionHandler.approve_all}
155157
)

0 commit comments

Comments
 (0)