mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 10:25:13 +00:00
All 5 Python recipes and their markdown docs used a synchronous, kwargs-based API that doesn't match the real github-copilot-sdk: - client.start() -> await client.start() (all methods are async) - create_session(model=...) -> create_session(SessionConfig(model=...)) - session.send(prompt=...) -> session.send(MessageOptions(prompt=...)) - session.wait_for_idle() -> session.send_and_wait() (wait_for_idle doesn't exist) - event['type']/event['data']['content'] -> event.type/event.data.content - All code wrapped in async def main() + asyncio.run(main()) Verified all imports resolve against github-copilot-sdk.
GitHub Copilot SDK Cookbook — Python
This folder hosts short, practical recipes for using the GitHub Copilot SDK with Python. Each recipe is concise, copy‑pasteable, and points to fuller examples and tests.
Recipes
- Error Handling: Handle errors gracefully including connection failures, timeouts, and cleanup.
- Multiple Sessions: Manage multiple independent conversations simultaneously.
- Managing Local Files: Organize files by metadata using AI-powered grouping strategies.
- PR Visualization: Generate interactive PR age charts using GitHub MCP Server.
- Persisting Sessions: Save and resume sessions across restarts.
Contributing
Add a new recipe by creating a markdown file in this folder and linking it above. Follow repository guidance in CONTRIBUTING.md.
Status
These recipes are complete and ready to use; new contributions and additional recipes are welcome.