Skip to content

Commit 95efe81

Browse files
authored
Merge branch 'main' into feat/records-for-data-types
2 parents f5e9662 + 48c18a2 commit 95efe81

9 files changed

Lines changed: 20 additions & 18 deletions

File tree

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
```skill
21
---
32
name: commit-as-pull-request
43
description: Commit current changes as a pull request — creates a branch, pushes, opens a PR, squash-merges, and syncs local main.
54
license: MIT
65
---
76

87
Follow instructions in the [commit-as-pull-request prompt](../../../.github/prompts/commit-as-pull-request.prompt.md) to take the current uncommitted changes, create a feature branch, push it, open a pull request, squash-merge it into main, and sync the local repository.
9-
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: documentation-coverage
3+
description: Assess whether the documentation in src/site/markdown/ adequately covers the Java SDK functionality.
4+
license: MIT
5+
---
6+
7+
Follow instructions in the [documentation-coverage prompt](../../../.github/prompts/documentation-coverage.prompt.md) to analyze gaps between the SDK's implemented features and its documentation.

.github/badges/jacoco.svg

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
```skill
21
---
32
name: commit-as-pull-request
43
description: Commit current changes as a pull request — creates a branch, pushes, opens a PR, squash-merges, and syncs local main.
54
license: MIT
65
---
76

87
Follow instructions in the [commit-as-pull-request prompt](../../prompts/commit-as-pull-request.prompt.md) to take the current uncommitted changes, create a feature branch, push it, open a pull request, squash-merge it into main, and sync the local repository.
9-
```
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
```skill
21
---
32
name: documentation-coverage
43
description: Assess whether the documentation in src/site/markdown/ adequately covers the Java SDK functionality.
54
license: MIT
65
---
76

87
Follow instructions in the [documentation-coverage prompt](../../prompts/documentation-coverage.prompt.md) to analyze gaps between the SDK's implemented features and its documentation.
9-
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Site](https://github.com/copilot-community-sdk/copilot-sdk-java/actions/workflows/deploy-site.yml/badge.svg)](https://github.com/copilot-community-sdk/copilot-sdk-java/actions/workflows/deploy-site.yml)
55
[![Coverage](.github/badges/jacoco.svg)](https://copilot-community-sdk.github.io/copilot-sdk-java/snapshot/jacoco/index.html)
66
[![Documentation](https://img.shields.io/badge/docs-online-brightgreen)](https://copilot-community-sdk.github.io/copilot-sdk-java/)
7-
[![Java 17+](https://img.shields.io/badge/Java-17%2B-blue)](https://openjdk.org/)
7+
[![Java 17+](https://img.shields.io/badge/Java-17%2B-blue?logo=openjdk&logoColor=white)](https://openjdk.org/)
88
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
99

1010
#### Latest release
@@ -179,4 +179,4 @@ MIT — see [LICENSE](LICENSE) for details.
179179

180180
[![Star History Chart](https://api.star-history.com/svg?repos=copilot-community-sdk/copilot-sdk-java&type=Date)](https://www.star-history.com/#copilot-community-sdk/copilot-sdk-java&Date)
181181

182-
⭐ Drop a star if you find this useful!
182+
⭐ Drop a star if you find this useful!

src/site/markdown/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ session.on(AssistantMessageEvent.class, msg -> {
7272
});
7373

7474
session.on(SessionErrorEvent.class, err -> {
75-
System.err.println("Error: " + err.getData().getMessage());
75+
System.err.println("Error: " + err.getData().message());
7676
});
7777

7878
session.on(SessionIdleEvent.class, idle -> {
@@ -91,7 +91,7 @@ session.on(event -> {
9191
case AssistantMessageEvent msg ->
9292
System.out.println("Response: " + msg.getData().getContent());
9393
case SessionErrorEvent err ->
94-
System.err.println("Error: " + err.getData().getMessage());
94+
System.err.println("Error: " + err.getData().message());
9595
case SessionIdleEvent idle ->
9696
done.complete(null);
9797
default -> { }
@@ -202,7 +202,7 @@ var done = new CompletableFuture<Void>();
202202

203203
session.on(AssistantMessageDeltaEvent.class, delta -> {
204204
// Print each chunk as it arrives
205-
System.out.print(delta.getData().getDeltaContent());
205+
System.out.print(delta.getData().deltaContent());
206206
});
207207

208208
session.on(SessionIdleEvent.class, idle -> {

src/site/markdown/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public class StreamingExample {
128128

129129
// Listen for response chunks
130130
session.on(AssistantMessageDeltaEvent.class, delta -> {
131-
System.out.print(delta.getData().getDeltaContent());
131+
System.out.print(delta.getData().deltaContent());
132132
});
133133
session.on(SessionIdleEvent.class, idle -> {
134134
System.out.println(); // New line when done
@@ -204,7 +204,7 @@ public class ToolExample {
204204
var done = new CompletableFuture<Void>();
205205

206206
session.on(AssistantMessageDeltaEvent.class, delta -> {
207-
System.out.print(delta.getData().getDeltaContent());
207+
System.out.print(delta.getData().deltaContent());
208208
});
209209
session.on(SessionIdleEvent.class, idle -> {
210210
System.out.println();
@@ -283,7 +283,7 @@ public class WeatherAssistant {
283283

284284
// Register listener once, outside the loop
285285
session.on(AssistantMessageDeltaEvent.class, delta -> {
286-
System.out.print(delta.getData().getDeltaContent());
286+
System.out.print(delta.getData().deltaContent());
287287
});
288288
session.on(SessionIdleEvent.class, idle -> {
289289
System.out.println();

src/test/java/com/github/copilot/sdk/SessionEventHandlingTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void testHandlerReceivesCorrectEventData() {
178178
capturedSessionId.set(start.getData().sessionId());
179179
});
180180

181-
SessionStartEvent startEvent = createSessionStartEvent("my-session-123");
181+
SessionStartEvent startEvent = createSessionStartEvent();
182+
startEvent.setData(new SessionStartEvent.SessionStartData("my-session-123", 0, null, null, null, null));
182183
dispatchEvent(startEvent);
183184

184185
AssistantMessageEvent msgEvent = createAssistantMessageEvent("Test content");
@@ -854,7 +855,7 @@ private SessionStartEvent createSessionStartEvent() {
854855

855856
private SessionStartEvent createSessionStartEvent(String sessionId) {
856857
var event = new SessionStartEvent();
857-
var data = new SessionStartEvent.SessionStartData(sessionId, 0, null, null, null, null);
858+
var data = new SessionStartEvent.SessionStartData("test-session", 0, null, null, null, null);
858859
event.setData(data);
859860
return event;
860861
}

0 commit comments

Comments
 (0)