Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created May 7, 2026 10:04
Show Gist options
  • Select an option

  • Save wullemsb/b9b43bf23f4635f57dbffcb7f19698d5 to your computer and use it in GitHub Desktop.

Select an option

Save wullemsb/b9b43bf23f4635f57dbffcb7f19698d5 to your computer and use it in GitHub Desktop.
import asyncio
from copilot import CopilotClient
from copilot.session import PermissionHandler
async def main():
client = CopilotClient()
await client.start()
session = await client.create_session(on_permission_request=PermissionHandler.approve_all, model="gpt-4.1")
response = await session.send_and_wait("What does this codebase do?")
print(response.data.content)
await client.stop()
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment