Protected ReadonlyclientReadonlyidProtected ReadonlyloggerProtectedcreateMaps the tools of the request onto tools of the CLI, reporting each invocation to the stream.
ProtecteddelayProtecteddiscardEnds the session of a request and removes what it persisted.
Disconnecting only releases the session in memory and keeps it stored for a later resumption, which Theia never does: it drives the conversation itself and starts a fresh session per request. Without the deletion, every request would leave a session behind in the Copilot home.
OptionalcancellationToken: CancellationTokenProtectedstreamOptionalcancellationToken: CancellationToken
Language model implementation for GitHub Copilot backed by the official Copilot CLI via
@github/copilot-sdk.The CLI is an agent that owns the tool-calling loop, whereas Theia's language model contract expects the caller to drive it. The two are reconciled by handing the tools of the request to the CLI as custom tools whose handlers delegate back to Theia, and by reporting every invocation as a tool call part, so that the conversation and its tool calls are recorded and rendered as usual. None of the CLI's own tools are exposed, so only what Theia provides can run.
Structured output is not supported on this path.