MCPcopy Index your code
hub / github.com/github/copilot-sdk / connect

Method connect

python/copilot/generated/rpc.py:25411–25414  ·  view source on GitHub ↗

Connects to an existing remote session and exposes it as an SDK session.\n\nArgs:\n params: Remote session connection parameters.\n\nReturns:\n Remote session connection result.

(self, params: ConnectRemoteSessionParams, *, timeout: float | None = None)

Source from the content-addressed store, hash-verified

25409 return SessionsForkResult.from_dict(await self._client.request("sessions.fork", params_dict, **_timeout_kwargs(timeout)))
25410
25411 async def connect(self, params: ConnectRemoteSessionParams, *, timeout: float | None = None) -> RemoteSessionConnectionResult:
25412 "Connects to an existing remote session and exposes it as an SDK session.\n\nArgs:\n params: Remote session connection parameters.\n\nReturns:\n Remote session connection result."
25413 params_dict = {k: v for k, v in params.to_dict().items() if v is not None}
25414 return RemoteSessionConnectionResult.from_dict(await self._client.request("sessions.connect", params_dict, **_timeout_kwargs(timeout)))
25415
25416 async def list(self, params: SessionsListRequest, *, timeout: float | None = None) -> SessionList:
25417 "Lists sessions, optionally filtered by source and working-directory context. Returned entries are discriminated by `isRemote`: local entries carry only the lightweight `LocalSessionMetadataValue` shape; remote entries carry the full `RemoteSessionMetadataValue` shape (repository, PR number, taskType, etc.).\n\nArgs:\n params: Optional source filter, metadata-load limit, and context filter applied to the returned sessions.\n\nReturns:\n Sessions matching the filter, ordered most-recently-modified first."

Calls 4

_timeout_kwargsFunction · 0.85
to_dictMethod · 0.45
from_dictMethod · 0.45
requestMethod · 0.45