Fix Python async syntax in copilot-sdk-python.instructions.md

Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-28 23:36:47 +00:00
parent 6af8480939
commit d12b0b43e6

View File

@@ -31,10 +31,14 @@ uv add copilot-sdk
```python ```python
from copilot import CopilotClient from copilot import CopilotClient
import asyncio
async with CopilotClient() as client: async def main():
# Use client... async with CopilotClient() as client:
pass # Use client...
pass
asyncio.run(main())
``` ```
### Client Configuration Options ### Client Configuration Options
@@ -56,10 +60,13 @@ When creating a CopilotClient, use a dict with these keys:
For explicit control: For explicit control:
```python ```python
client = CopilotClient({"auto_start": False}) async def main():
await client.start() client = CopilotClient({"auto_start": False})
# Use client... await client.start()
await client.stop() # Use client...
await client.stop()
asyncio.run(main())
``` ```
Use `force_stop()` when `stop()` takes too long. Use `force_stop()` when `stop()` takes too long.