Skip to content

Commit dd7ecd9

Browse files
sunbryeCopilot
andauthored
Update Copilot SDK with mentions of Java (#60627)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d656500 commit dd7ecd9

File tree

19 files changed

+46
-39
lines changed

19 files changed

+46
-39
lines changed

content/copilot/how-tos/copilot-sdk/authenticate-copilot-sdk/bring-your-own-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Azure AI Foundry (formerly Azure OpenAI) is a common BYOK deployment target for
5656

5757
Replace `YOUR-RESOURCE` with your Azure resource name and `YOUR-DEPLOYMENT-NAME` with your model deployment name. Set the `FOUNDRY_API_KEY` environment variable to your Azure API key.
5858

59-
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository.
59+
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}
6060

6161
## Provider configuration reference
6262

@@ -227,7 +227,7 @@ const client = new CopilotClient({
227227

228228
Results are cached after the first call. The handler completely replaces the CLI's `models.list` RPC—no fallback to the server occurs.
229229

230-
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository.
230+
For examples in Python, Go, and .NET, see [BYOK](https://github.com/github/copilot-sdk/blob/main/docs/auth/byok.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}
231231

232232
## Limitations
233233

content/copilot/how-tos/copilot-sdk/observability/opentelemetry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ category:
1414

1515
{% data variables.copilot.copilot_sdk %} has built-in support for configuring OpenTelemetry on the CLI process and propagating W3C Trace Context between the SDK and CLI.
1616

17-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/observability/opentelemetry.md).
17+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/observability/opentelemetry.md). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
1818

1919
## Built-in telemetry support
2020

content/copilot/how-tos/copilot-sdk/set-up-copilot-sdk/choosing-a-setup-path.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ All guides assume you have:
9090
* Python: `pip install github-copilot-sdk`
9191
* Go: `go get github.com/github/copilot-sdk/go`
9292
* .NET: `dotnet add package GitHub.Copilot.SDK`
93+
* Java: See the [`github/copilot-sdk-java`](https://github.com/github/copilot-sdk-java) repository for Maven/Gradle setup
9394

9495
If you're new to the {% data variables.copilot.copilot_sdk %}, start with [AUTOTITLE](/copilot/how-tos/copilot-sdk/sdk-getting-started) first, then return here for production configuration.
9596

content/copilot/how-tos/copilot-sdk/troubleshooting/debug-copilot-sdk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const client = new CopilotClient({
2222
});
2323
```
2424

25-
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
25+
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}
2626

2727
### Log directory
2828

@@ -60,7 +60,7 @@ For Python and Go, which do not currently support passing extra CLI arguments, r
6060
});
6161
```
6262

63-
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
63+
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}
6464

6565
### "Not authenticated"
6666

@@ -82,7 +82,7 @@ For Python and Go, which do not currently support passing extra CLI arguments, r
8282
});
8383
```
8484

85-
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository.
85+
For examples in Python, Go, and .NET, see [Debugging Guide](https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting/debugging.md) in the `github/copilot-sdk` repository. {% data reusables.copilot.copilot-sdk.java-sdk-link %}
8686

8787
### "Session not found"
8888

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/custom-agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const session = await client.createSession({
5353
});
5454
```
5555

56-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#defining-custom-agents).
56+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#defining-custom-agents). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
5757

5858
## Configuration reference
5959

@@ -96,7 +96,7 @@ const session = await client.createSession({
9696
});
9797
```
9898

99-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#selecting-an-agent-at-session-creation).
99+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#selecting-an-agent-at-session-creation). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
100100

101101
## How sub-agent delegation works
102102

@@ -172,7 +172,7 @@ const response = await session.sendAndWait({
172172
});
173173
```
174174

175-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#listening-to-sub-agent-events).
175+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/custom-agents.md#listening-to-sub-agent-events). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
176176

177177
## Building an agent tree UI
178178

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/custom-skills.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const session = await client.createSession({
4343
await session.sendAndWait({ prompt: "Review this code for security issues" });
4444
```
4545

46-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/skills.md#loading-skills).
46+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/skills.md#loading-skills). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
4747

4848
## Disabling skills
4949

@@ -56,7 +56,7 @@ const session = await client.createSession({
5656
});
5757
```
5858

59-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/skills.md#disabling-skills).
59+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/skills.md#disabling-skills). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
6060

6161
## Skill directory structure
6262

@@ -116,6 +116,8 @@ When you call `createSession()`, pass these skill-related fields in the session
116116
| Go | `DisabledSkills` | `[]string` | Skills to disable |
117117
| .NET | `SkillDirectories` | `List<string>` | Directories to load skills from |
118118
| .NET | `DisabledSkills` | `List<string>` | Skills to disable |
119+
| Java | `skillDirectories` | `List<String>` | Directories to load skills from |
120+
| Java | `disabledSkills` | `List<String>` | Skills to disable |
119121

120122
## Best practices
121123

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/image-input.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ await session.send({
5353
});
5454
```
5555

56-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/image-input.md#quick-start--file-attachment).
56+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/image-input.md#quick-start--file-attachment). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
5757

5858
## Quick start: blob attachment
5959

@@ -84,7 +84,7 @@ await session.send({
8484
});
8585
```
8686

87-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/image-input.md#quick-start--blob-attachment).
87+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/image-input.md#quick-start--blob-attachment). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
8888

8989
## Supported formats
9090

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/mcp-servers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const session = await client.createSession({
5757
});
5858
```
5959

60-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/mcp.md#configuration).
60+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/mcp.md#configuration). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
6161

6262
## Quick start: filesystem MCP server
6363

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/session-persistence.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ await session.sendAndWait({ prompt: "Analyze my codebase" });
4343
// You can safely close the client
4444
```
4545

46-
For examples in Python, Go, and C#, see the `github/copilot-sdk` [repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#quick-start-creating-a-resumable-session).
46+
For examples in Python, Go, and C#, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#quick-start-creating-a-resumable-session). For Java, see the [`github/copilot-sdk-java` repository](https://github.com/github/copilot-sdk-java).
4747

4848
## Resuming a session
4949

@@ -57,7 +57,7 @@ const session = await client.resumeSession("user-123-task-456");
5757
await session.sendAndWait({ prompt: "What did we discuss earlier?" });
5858
```
5959

60-
For examples in Python, Go, and C#, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#resuming-a-session).
60+
For examples in Python, Go, and C#, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#resuming-a-session). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
6161

6262
## Resume options
6363

@@ -173,7 +173,7 @@ const sessionId = createSessionId("alice", "code-review");
173173
// → "alice-code-review-1706932800000"
174174
```
175175

176-
For an example in Python, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#example-generating-session-ids).
176+
For an example in Python, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/session-persistence.md#example-generating-session-ids). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
177177

178178
## Managing session lifecycle
179179

@@ -238,6 +238,7 @@ Each SDK provides idiomatic automatic cleanup patterns:
238238
| **Python** | `async with` context manager | `async with await client.create_session(config) as session:` |
239239
| **C#** | `IAsyncDisposable` | `await using var session = await client.CreateSessionAsync(config);` |
240240
| **Go** | `defer` | `defer session.Disconnect()` |
241+
| **Java** | `try-with-resources` | `try (var session = client.createSession(config).get()) { ... }` |
241242

242243
> [!NOTE]
243244
> `destroy()` has been replaced by `disconnect()` and will be removed in a future release. Existing code using `destroy()` will continue to work but should be migrated.

content/copilot/how-tos/copilot-sdk/use-copilot-sdk/steering-and-queueing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ await session.send({
5050
});
5151
```
5252

53-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#steering-immediate-mode).
53+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#steering-immediate-mode). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
5454

5555
### How steering works internally
5656

@@ -94,7 +94,7 @@ await session.send({
9494
// Messages are processed in FIFO order after each turn completes
9595
```
9696

97-
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#queueing-enqueue-mode).
97+
For examples in Python, Go, and .NET, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#queueing-enqueue-mode). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
9898

9999
### How queueing works internally
100100

@@ -130,7 +130,7 @@ await session.send({
130130
});
131131
```
132132

133-
For an example in Python, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#combining-steering-and-queueing).
133+
For an example in Python, see the [`github/copilot-sdk` repository](https://github.com/github/copilot-sdk/blob/main/docs/features/steering-and-queueing.md#combining-steering-and-queueing). {% data reusables.copilot.copilot-sdk.java-sdk-link %}
134134

135135
## Choosing between steering and queueing
136136

0 commit comments

Comments
 (0)