Commit 64dcd25
Expose new session options across SDKs (#1865)
* Expose new session options across SDKs
Adds enable citations, excluded built-in agents, and session limits to create and resume session options across the SDKs, with forwarding tests and replay-backed E2E coverage for session limits, agent exclusion, and citation request shaping.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Address Java PR review comments
Defensively copy excluded built-in agents lists and use the non-deprecated Java session request builder overload in tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Fix Rust and Java CI failures for session options PR
Rust: add missing model field/builder to ResumeSessionConfig so
sessions can switch models on resume, matching the existing
capability in the other language SDKs (Go, Node.js, Python, .NET,
Java). The newly added citations-on-resume e2e test called
ResumeSessionConfig::with_model, which didn't exist, causing a
compile failure on all three Rust CI runners. Also removed the
resulting unused SessionConfig import in the e2e test file.
Java: run 'mvn spotless:apply' to fix formatting violations in
SessionConfigE2ETest.java, CreateSessionRequest.java, and
ResumeSessionRequest.java introduced by the new session option
changes.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Fix Rust citation e2e tests: don't combine gitHubToken with provider
The two new should_enable_citations_for_anthropic_file_attachments_on_create/
on_resume e2e tests set a session-level gitHubToken (via
approve_all_session_config()/with_github_token) while also specifying a
Provider, which the CLI rejects with 'Cannot specify both gitHubToken and
provider in session.create/resume.' This matches the .NET SDK's equivalent
tests, which never pass GitHubToken alongside Provider.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent b168366 commit 64dcd25
41 files changed
Lines changed: 3069 additions & 25 deletions
File tree
- dotnet
- src
- test
- E2E
- Harness
- Unit
- go
- internal/e2e
- testharness
- java/src
- main/java/com/github/copilot
- rpc
- test/java/com/github/copilot
- nodejs
- src
- test
- e2e
- python
- copilot
- e2e
- rust
- src
- tests
- e2e
- test/snapshots/session_config
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
| 983 | + | |
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
| 987 | + | |
986 | 988 | | |
987 | 989 | | |
988 | 990 | | |
| |||
1013 | 1015 | | |
1014 | 1016 | | |
1015 | 1017 | | |
| 1018 | + | |
1016 | 1019 | | |
1017 | 1020 | | |
1018 | 1021 | | |
| |||
1189 | 1192 | | |
1190 | 1193 | | |
1191 | 1194 | | |
| 1195 | + | |
1192 | 1196 | | |
1193 | 1197 | | |
1194 | 1198 | | |
| 1199 | + | |
1195 | 1200 | | |
1196 | 1201 | | |
1197 | 1202 | | |
| |||
1223 | 1228 | | |
1224 | 1229 | | |
1225 | 1230 | | |
| 1231 | + | |
1226 | 1232 | | |
1227 | 1233 | | |
1228 | 1234 | | |
| |||
2431 | 2437 | | |
2432 | 2438 | | |
2433 | 2439 | | |
| 2440 | + | |
2434 | 2441 | | |
2435 | 2442 | | |
2436 | 2443 | | |
| 2444 | + | |
2437 | 2445 | | |
2438 | 2446 | | |
2439 | 2447 | | |
| |||
2464 | 2472 | | |
2465 | 2473 | | |
2466 | 2474 | | |
| 2475 | + | |
2467 | 2476 | | |
2468 | 2477 | | |
2469 | 2478 | | |
| |||
2525 | 2534 | | |
2526 | 2535 | | |
2527 | 2536 | | |
| 2537 | + | |
2528 | 2538 | | |
2529 | 2539 | | |
2530 | 2540 | | |
| 2541 | + | |
2531 | 2542 | | |
2532 | 2543 | | |
2533 | 2544 | | |
| |||
2559 | 2570 | | |
2560 | 2571 | | |
2561 | 2572 | | |
| 2573 | + | |
2562 | 2574 | | |
2563 | 2575 | | |
2564 | 2576 | | |
| |||
2660 | 2672 | | |
2661 | 2673 | | |
2662 | 2674 | | |
| 2675 | + | |
2663 | 2676 | | |
2664 | 2677 | | |
2665 | 2678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2758 | 2758 | | |
2759 | 2759 | | |
2760 | 2760 | | |
| 2761 | + | |
2761 | 2762 | | |
2762 | 2763 | | |
2763 | 2764 | | |
| |||
2768 | 2769 | | |
2769 | 2770 | | |
2770 | 2771 | | |
| 2772 | + | |
2771 | 2773 | | |
2772 | 2774 | | |
2773 | 2775 | | |
| |||
2815 | 2817 | | |
2816 | 2818 | | |
2817 | 2819 | | |
| 2820 | + | |
2818 | 2821 | | |
2819 | 2822 | | |
2820 | 2823 | | |
| |||
2853 | 2856 | | |
2854 | 2857 | | |
2855 | 2858 | | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
2856 | 2869 | | |
2857 | 2870 | | |
2858 | 2871 | | |
| |||
2945 | 2958 | | |
2946 | 2959 | | |
2947 | 2960 | | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
2948 | 2971 | | |
2949 | 2972 | | |
2950 | 2973 | | |
| |||
3137 | 3160 | | |
3138 | 3161 | | |
3139 | 3162 | | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
3140 | 3173 | | |
3141 | 3174 | | |
3142 | 3175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
| 59 | + | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
160 | 164 | | |
161 | 165 | | |
162 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
163 | 170 | | |
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
168 | | - | |
| 175 | + | |
0 commit comments