Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/guides/custom-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const session = await client.createSession({

```python
from copilot import CopilotClient
from copilot.types import PermissionRequestResult

client = CopilotClient()
await client.start()
Expand All @@ -87,7 +88,7 @@ session = await client.create_session({
"prompt": "You are a code editor. Make minimal, surgical changes to files as requested.",
},
],
"on_permission_request": lambda req: {"kind": "approved"},
"on_permission_request": lambda req, inv: PermissionRequestResult(kind="approved"),
})
```

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ await session.sendAndWait({ prompt: "Review this code for security issues" });

```python
from copilot import CopilotClient
from copilot.types import PermissionRequestResult

async def main():
client = CopilotClient()
Expand All @@ -54,7 +55,7 @@ async def main():
"./skills/code-review",
"./skills/documentation",
],
"on_permission_request": lambda req: {"kind": "approved"},
"on_permission_request": lambda req, inv: PermissionRequestResult(kind="approved"),
})

# Copilot now has access to skills in those directories
Expand Down
Loading