Skip to content

Commit f7dd96f

Browse files
authored
docs: correct the remote sessions client option name (#2179)
The remote sessions guide told users to enable Mission Control remote sessions with a client option named `remote` (TypeScript) / `Remote` (Go, C#). No such option exists. It was renamed to `enableRemoteSessions` / `EnableRemoteSessions` during the per-language API reviews (#1343, #1357, #1360), none of which updated this guide. The Rust (#1367) and Python (#1376) reviews did update their own tabs, which is why those two were already correct. As a result, the documented client construction does not compile in TypeScript, Go or C#. - Correct the option name in the section lead-in and in the TypeScript, Go and C# examples. - Fix the Go example's return arity on the same line: NewClient returns a single value. - Correct the Notes bullet, which named the same nonexistent option and also said the option applies only when the SDK spawns the CLI process. It is honored on both the child-process and in-process host paths. Co-authored-by: examon <examon@users.noreply.github.com>
1 parent 5214bde commit f7dd96f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/features/remote-sessions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For running sessions on GitHub-hosted compute, see [Cloud Sessions](./cloud-sess
1313

1414
### Always-on (client-level)
1515

16-
Set `remote: true` when creating the client. Every session in a GitHub repo automatically gets a remote URL.
16+
Set `enableRemoteSessions: true` when creating the client. Every session in a GitHub repo automatically gets a remote URL.
1717

1818
<!-- tabs:start -->
1919

@@ -23,7 +23,7 @@ Set `remote: true` when creating the client. Every session in a GitHub repo auto
2323
```typescript
2424
import { CopilotClient } from "@github/copilot-sdk";
2525

26-
const client = new CopilotClient({ remote: true });
26+
const client = new CopilotClient({ enableRemoteSessions: true });
2727
const session = await client.createSession({
2828
workingDirectory: "/path/to/github-repo",
2929
onPermissionRequest: async () => ({ allowed: true }),
@@ -59,7 +59,7 @@ session.on(on_event)
5959

6060
<!-- docs-validate: skip -->
6161
```go
62-
client, _ := copilot.NewClient(&copilot.ClientOptions{Remote: true})
62+
client := copilot.NewClient(&copilot.ClientOptions{EnableRemoteSessions: true})
6363
session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
6464
WorkingDirectory: "/path/to/github-repo",
6565
OnPermissionRequest: func(req copilot.PermissionRequest, inv copilot.PermissionInvocation) (rpc.PermissionDecision, error) {
@@ -78,7 +78,7 @@ session.On(func(event copilot.SessionEvent) {
7878

7979
<!-- docs-validate: skip -->
8080
```csharp
81-
var client = new CopilotClient(new CopilotClientOptions { Remote = true });
81+
var client = new CopilotClient(new CopilotClientOptions { EnableRemoteSessions = true });
8282
var session = await client.CreateSessionAsync(new SessionConfig
8383
{
8484
WorkingDirectory = "/path/to/github-repo",
@@ -201,6 +201,6 @@ The remote URL can be rendered as a QR code for easy mobile access. The SDK prov
201201

202202
## Notes
203203

204-
* The `remote` client option only applies when the SDK spawns the CLI process. It is ignored when connecting to an external server via `cliUrl`.
204+
* The `enableRemoteSessions` client option applies when the SDK starts the runtime, either as a child process or as an in-process host. It is ignored when connecting to an already-running runtime.
205205
* If the working directory is not a GitHub repository, remote setup is silently skipped (always-on mode) or returns an error (on-demand mode).
206206
* Remote sessions require authentication. Ensure `gitHubToken` or `useLoggedInUser` is configured.

0 commit comments

Comments
 (0)