Commit 929b769
Add optional
Companion to the runtime change (github/copilot-agent-runtime#10078), which adds a
short, model-populated `header` to the `ask_user` tool / `user_input.requested`
event / `userInput.request` RPC — mirroring Anthropic's `AskUserQuestion.header`.
Hosts can render it as a dialog title instead of synthesizing one from the question.
This surfaces `header` to SDK integrators in every language, on both the generated
`UserInputRequestedData` event type and the hand-written `userInput.request` handler
request type:
- Node: generated/session-events.ts, types.ts (UserInputRequest), client.ts handler, README
- Python: generated/session_events.py (from/to_dict), session.py (TypedDict + handler), README
- Go: rpc/zsession_events.go, types.go (public + wire structs), client.go mapping, README
- .NET: Generated/SessionEvents.cs, Types.cs, Client.cs RPC param
- Rust: generated/session_events.rs, handler.rs trait, session.rs dispatch, example/tests, README
- Java: generated UserInputRequestedEvent record, rpc/UserInputRequest (+getHeader/setHeader),
RpcHandlerDispatcher param mapping
The field is optional everywhere; existing callers are unaffected.
BREAKING (Rust only): `UserInputHandler::handle` gains a `header: Option<String>`
parameter. All in-repo implementors are updated.
Notes for finalization (do not merge before these):
- The generated-type edits are a PREVIEW. Codegen could not run here: node_modules
`@github/copilot` is stale (1.0.40) and the schema carrying `header` isn't published
yet. Once the runtime change ships, bump `@github/copilot`, run `npm run generate`
(ts/csharp/python/go/rust) and `mvn generate-sources -Pcodegen` (java), and confirm
the regenerated files match these edits.
- E2E snapshots under test/snapshots/ask_user/ are unchanged; re-record once the CLI
emits `header`.
Verified: Node typecheck, Go build, .NET build, Rust build + test-compile, Python
py_compile. Java not compiled (no JDK in env); edits follow existing patterns.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>header field to ask_user across all SDKs1 parent 53ffb24 commit 929b769
24 files changed
Lines changed: 95 additions & 7 deletions
File tree
- dotnet/src
- Generated
- go
- rpc
- java/src
- generated/java/com/github/copilot/generated
- main/java/com/github/copilot
- rpc
- nodejs
- src
- generated
- python
- copilot
- generated
- rust
- examples
- src
- generated
- tests
- e2e
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2138 | 2138 | | |
2139 | 2139 | | |
2140 | 2140 | | |
2141 | | - | |
| 2141 | + | |
2142 | 2142 | | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | 2145 | | |
2146 | 2146 | | |
| 2147 | + | |
2147 | 2148 | | |
2148 | 2149 | | |
2149 | 2150 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
762 | 768 | | |
763 | 769 | | |
764 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1955 | 1955 | | |
1956 | 1956 | | |
1957 | 1957 | | |
| 1958 | + | |
1958 | 1959 | | |
1959 | 1960 | | |
1960 | 1961 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
1980 | 1981 | | |
1981 | 1982 | | |
1982 | 1983 | | |
| 1984 | + | |
1983 | 1985 | | |
1984 | 1986 | | |
1985 | 1987 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
58 | 83 | | |
59 | 84 | | |
60 | 85 | | |
| |||
0 commit comments