@@ -686,10 +686,12 @@ class CopilotClient:
686686 >>> await client.start()
687687 >>>
688688 >>> # Create a session and send a message
689- >>> session = await client.create_session({
690- ... "on_permission_request": PermissionHandler.approve_all,
691- ... "model": "gpt-4",
692- ... })
689+ >>> session = await client.create_session(
690+ ... {
691+ ... "on_permission_request": PermissionHandler.approve_all,
692+ ... "model": "gpt-4",
693+ ... }
694+ ... )
693695 >>> session.on(lambda event: print(event.type))
694696 >>> await session.send("Hello!")
695697 >>>
@@ -728,10 +730,12 @@ def __init__(
728730 >>> client = CopilotClient(ExternalServerConfig(url="localhost:3000"))
729731 >>>
730732 >>> # Custom CLI path with specific log level
731- >>> client = CopilotClient(SubprocessConfig(
732- ... cli_path="/usr/local/bin/copilot",
733- ... log_level="debug",
734- ... ))
733+ >>> client = CopilotClient(
734+ ... SubprocessConfig(
735+ ... cli_path="/usr/local/bin/copilot",
736+ ... log_level="debug",
737+ ... )
738+ ... )
735739 """
736740 if config is None :
737741 config = SubprocessConfig ()
@@ -1033,11 +1037,13 @@ async def create_session(self, config: SessionConfig) -> CopilotSession:
10331037 >>> session = await client.create_session(config)
10341038 >>>
10351039 >>> # Session with model and streaming
1036- >>> session = await client.create_session({
1037- ... "on_permission_request": PermissionHandler.approve_all,
1038- ... "model": "gpt-4",
1039- ... "streaming": True
1040- ... })
1040+ >>> session = await client.create_session(
1041+ ... {
1042+ ... "on_permission_request": PermissionHandler.approve_all,
1043+ ... "model": "gpt-4",
1044+ ... "streaming": True,
1045+ ... }
1046+ ... )
10411047 """
10421048 if not self ._client :
10431049 if self ._auto_start :
@@ -1230,10 +1236,13 @@ async def resume_session(self, session_id: str, config: ResumeSessionConfig) ->
12301236 >>> session = await client.resume_session("session-123", config)
12311237 >>>
12321238 >>> # Resume with new tools
1233- >>> session = await client.resume_session("session-123", {
1234- ... "on_permission_request": PermissionHandler.approve_all,
1235- ... "tools": [my_new_tool]
1236- ... })
1239+ >>> session = await client.resume_session(
1240+ ... "session-123",
1241+ ... {
1242+ ... "on_permission_request": PermissionHandler.approve_all,
1243+ ... "tools": [my_new_tool],
1244+ ... },
1245+ ... )
12371246 """
12381247 if not self ._client :
12391248 if self ._auto_start :
0 commit comments