Skip to content

Commit 1508b9f

Browse files
brunoborgesCopilot
andcommitted
Update documentation for PR #52 upstream sync features
Add coverage for slash commands, elicitation (UI dialogs), session capabilities, SessionUiApi, and getSessionMetadata across: - CHANGELOG.md: Unreleased section with Added/Fixed entries - documentation.md: event types, SessionConfig reference, resume options - advanced.md: table of contents entries for new sections - site.xml: navigation menu items Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 7e094a3 commit 1508b9f

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
88
99
## [Unreleased]
1010

11-
> **Upstream sync:** [`github/copilot-sdk@4088739`](https://github.com/github/copilot-sdk/commit/40887393a9e687dacc141a645799441b0313ff15)
11+
> **Upstream sync:** [`github/copilot-sdk@f7fd757`](https://github.com/github/copilot-sdk/commit/f7fd7577109d64e261456b16c49baa56258eae4e)
12+
13+
### Added
14+
15+
- Slash commands — register `/command` handlers invoked from the CLI TUI via `SessionConfig.setCommands()` (upstream: [`f7fd757`](https://github.com/github/copilot-sdk/commit/f7fd757))
16+
- `CommandDefinition`, `CommandContext`, `CommandHandler`, `CommandWireDefinition` — types for defining and handling slash commands
17+
- `CommandExecuteEvent` — event dispatched when a registered slash command is executed
18+
- Elicitation (UI dialogs) — incoming handler via `SessionConfig.setOnElicitationRequest()` and outgoing convenience methods via `session.getUi()` (upstream: [`f7fd757`](https://github.com/github/copilot-sdk/commit/f7fd757))
19+
- `ElicitationContext`, `ElicitationHandler`, `ElicitationParams`, `ElicitationResult`, `ElicitationResultAction`, `ElicitationSchema`, `InputOptions` — types for elicitation
20+
- `ElicitationRequestedEvent` — event dispatched when an elicitation request is received
21+
- `SessionUiApi` — convenience API on `session.getUi()` for `confirm()`, `select()`, `input()`, and `elicitation()` calls
22+
- `SessionCapabilities` and `SessionUiCapabilities` — session capability reporting populated from create/resume response
23+
- `CapabilitiesChangedEvent` — event dispatched when session capabilities are updated
24+
- `CopilotClient.getSessionMetadata(String)` — O(1) session lookup by ID
25+
- `GetSessionMetadataResponse` — response type for `getSessionMetadata`
26+
27+
### Fixed
28+
29+
- Permission events already resolved by a pre-hook now short-circuit before invoking the client-side handler
30+
- `SessionUiApi` Javadoc now uses valid Java null-check syntax instead of `?.`
31+
- README updated to say "GitHub Copilot CLI 1.0.17" instead of "GitHub Copilot 1.0.17"
1232

1333
## [0.2.1-java.1] - 2026-04-02
1434

src/site/markdown/advanced.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ This guide covers advanced scenarios for extending and customizing your Copilot
4747
- [Custom Event Error Handler](#Custom_Event_Error_Handler)
4848
- [Event Error Policy](#Event_Error_Policy)
4949
- [OpenTelemetry](#OpenTelemetry)
50+
- [Slash Commands](#Slash_Commands)
51+
- [Registering Commands](#Registering_Commands)
52+
- [Elicitation (UI Dialogs)](#Elicitation_UI_Dialogs)
53+
- [Incoming Elicitation Handler](#Incoming_Elicitation_Handler)
54+
- [Session Capabilities](#Session_Capabilities)
55+
- [Outgoing Elicitation via session.getUi()](#Outgoing_Elicitation_via_session.getUi)
56+
- [Getting Session Metadata by ID](#Getting_Session_Metadata_by_ID)
5057

5158
---
5259

src/site/markdown/documentation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,19 @@ The SDK supports event types organized by category. All events extend `AbstractS
245245
|-------|-------------|-------------|
246246
| `CommandQueuedEvent` | `command.queued` | A command was queued for execution |
247247
| `CommandCompletedEvent` | `command.completed` | A queued command completed |
248+
| `CommandExecuteEvent` | `command.execute` | A registered slash command was dispatched for execution |
249+
250+
### Elicitation Events
251+
252+
| Event | Type String | Description |
253+
|-------|-------------|-------------|
254+
| `ElicitationRequestedEvent` | `elicitation.requested` | An elicitation (UI dialog) request was received |
255+
256+
### Capability Events
257+
258+
| Event | Type String | Description |
259+
|-------|-------------|-------------|
260+
| `CapabilitiesChangedEvent` | `capabilities.changed` | Session capabilities were updated |
248261

249262
### Plan Mode Events
250263

@@ -633,6 +646,8 @@ When resuming a session, you can optionally reconfigure many settings. This is u
633646
| `skillDirectories` | Directories to load skills from |
634647
| `disabledSkills` | Skills to disable |
635648
| `infiniteSessions` | Configure infinite session behavior |
649+
| `commands` | Slash command definitions for the resumed session |
650+
| `onElicitationRequest` | Handler for incoming elicitation requests |
636651
| `disableResume` | When `true`, resumes without emitting a `session.resume` event |
637652
| `onEvent` | Event handler registered before session resumption |
638653

@@ -691,6 +706,8 @@ Complete list of all `SessionConfig` options for `createSession()`:
691706
| `skillDirectories` | List&lt;String&gt; | Directories to load skills from | [Skills](advanced.html#Skills_Configuration) |
692707
| `disabledSkills` | List&lt;String&gt; | Skills to disable by name | [Skills](advanced.html#Skills_Configuration) |
693708
| `configDir` | String | Custom configuration directory | [Config Dir](advanced.html#Custom_Configuration_Directory) |
709+
| `commands` | List&lt;CommandDefinition&gt; | Slash command definitions | [Slash Commands](advanced.html#Slash_Commands) |
710+
| `onElicitationRequest` | ElicitationHandler | Handler for incoming elicitation requests | [Elicitation](advanced.html#Elicitation_UI_Dialogs) |
694711
| `onEvent` | Consumer&lt;AbstractSessionEvent&gt; | Event handler registered before session creation | [Early Event Registration](advanced.html#Early_Event_Registration) |
695712

696713
### Cloning SessionConfig

src/site/site.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
<item name="BYOK" href="advanced.html#Bring_Your_Own_Key_.28BYOK.29"/>
6060
<item name="Infinite Sessions" href="advanced.html#Infinite_Sessions"/>
6161
<item name="MCP Servers" href="advanced.html#MCP_Servers"/>
62+
<item name="Slash Commands" href="advanced.html#Slash_Commands"/>
63+
<item name="Elicitation" href="advanced.html#Elicitation_UI_Dialogs"/>
64+
<item name="Session Metadata" href="advanced.html#Getting_Session_Metadata_by_ID"/>
6265
<item name="Session Hooks" href="hooks.html"/>
6366
</menu>
6467

0 commit comments

Comments
 (0)