You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,40 @@ var config = new ResumeSessionConfig()
31
31
var session = client.resumeSession(sessionId, config).get();
32
32
```
33
33
34
+
#### EventErrorHandler for Custom Error Handling
35
+
Added `EventErrorHandler` interface for custom handling of exceptions thrown by event handlers. Set via `session.setEventErrorHandler()` to receive the event and exception when a handler fails.
logger.error("Handler failed for event: "+ event.getType(), exception);
40
+
});
41
+
```
42
+
43
+
#### Type-Safe Event Handlers
44
+
Promoted type-safe `on(Class<T>, Consumer<T>)` event handlers as the primary API. Handlers now receive strongly-typed events instead of raw `AbstractSessionEvent`.
45
+
46
+
```java
47
+
session.on(AssistantMessageEvent.class, msg -> {
48
+
System.out.println(msg.getData().getContent());
49
+
});
50
+
```
51
+
52
+
#### SpotBugs Static Analysis
53
+
Integrated SpotBugs for static code analysis with exclusion filters for `events` and `json` packages.
54
+
34
55
### Changed
35
56
36
57
-**Copilot CLI**: Minimum version updated to **0.0.405**
58
+
-**CopilotClient**: Made `final` to prevent Finalizer attacks (security hardening)
59
+
-**JBang Example**: Refactored `jbang-example.java` with streamlined session creation and usage metrics display
60
+
-**Code Style**: Use `var` for local variable type inference throughout the codebase
61
+
62
+
### Fixed
63
+
64
+
-**SpotBugs OS_OPEN_STREAM**: Wrap `BufferedReader` in try-with-resources to prevent resource leaks
65
+
-**SpotBugs REC_CATCH_EXCEPTION**: Narrow exception catch in `JsonRpcClient.handleMessage()`
66
+
-**SpotBugs DM_DEFAULT_ENCODING**: Add explicit UTF-8 charset to `InputStreamReader`
67
+
-**SpotBugs EI_EXPOSE_REP**: Add defensive copies to collection getters in events and JSON packages
0 commit comments