pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/github/copilot-sdk-java/commit/befdd933a7b9600871316ecb00d5b59fdb2d7753

https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> fix: fix release version replacement for -beta-java.N qualifier format · github/copilot-sdk-java@befdd93 · GitHub
Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Commit befdd93

Browse files
Copilotbrunoborges
andauthored
fix: fix release version replacement for -beta-java.N qualifier format
- Fix sed patterns in publish-maven.yml to use general qualifier regex `\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*` that matches any version qualifier format (-java.N, -java-preview.N, -beta-java.N) and also handles previously-chained invalid versions - Fix awk regex patterns in update-changelog.sh to recognize -beta-java.N in [Unreleased] and version link patterns (-(beta-)?java(-preview)?.N) - Fix duplicate [Unreleased] link bug: track unreleased_link_handled flag so the first-version-link insertion block only fires when there is no existing [Unreleased] link to update - Move [Unreleased] handler before first-version-link handler in awk so the flag is set before the later block evaluates it - Update version validation regex to accept -beta-java.N format - Fix CHANGELOG.md: remove duplicate [Unreleased] links and fix incorrect predecessor version references for 1.0.0-beta-java.2 and .3 - Fix README.md, jbang-example.java, and cookbook markdown files: replace chained invalid versions with correct 1.0.0-beta-java.3 - Fix test-update-changelog.sh: replace ((passed++)) with passed=$((passed+1)) to avoid set -e triggering on arithmetic result 0; add two new tests for beta-java format and no-duplicate-links guarantee Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
1 parent 9e86db7 commit befdd93

11 files changed

Lines changed: 116 additions & 73 deletions

File tree

.github/scripts/release/test-update-changelog.sh

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ run_test() {
3333

3434
if $test_func; then
3535
echo -e "${GREEN}PASSED${NC}"
36-
((passed++))
36+
passed=$((passed + 1))
3737
else
3838
echo -e "${RED}FAILED${NC}"
39-
((failed++))
39+
failed=$((failed + 1))
4040
fi
4141
}
4242

@@ -180,6 +180,71 @@ EOF
180180
fi
181181
}
182182

183+
# Test 6: Beta-java version format (e.g., 1.0.0-beta-java.N)
184+
test_beta_java_version() {
185+
local test_file="${TEST_DIR}/test6.md"
186+
cat > "$test_file" << 'EOF'
187+
# Changelog
188+
189+
## [Unreleased]
190+
191+
### Added
192+
- New feature
193+
194+
## [1.0.0-beta-java.1] - 2026-05-01
195+
196+
[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...HEAD
197+
[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1
198+
[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2
199+
EOF
200+
201+
CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.2 > /dev/null 2>&1
202+
203+
# The [Unreleased] link should now point to v1.0.0-beta-java.2
204+
# [1.0.0-beta-java.2] should compare from v1.0.0-beta-java.1
205+
if grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD" "$test_file" && \
206+
grep -q "\[1.0.0-beta-java.2\]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2" "$test_file"; then
207+
return 0
208+
else
209+
return 1
210+
fi
211+
}
212+
213+
# Test 7: No duplicate [Unreleased] links when existing [Unreleased] link is present
214+
test_no_duplicate_unreleased_links() {
215+
local test_file="${TEST_DIR}/test7.md"
216+
cat > "$test_file" << 'EOF'
217+
# Changelog
218+
219+
## [Unreleased]
220+
221+
### Added
222+
- New feature
223+
224+
## [1.0.0-beta-java.2] - 2026-05-08
225+
226+
## [1.0.0-beta-java.1] - 2026-05-05
227+
228+
[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD
229+
[1.0.0-beta-java.2]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2
230+
[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1
231+
[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2
232+
EOF
233+
234+
CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.3 > /dev/null 2>&1
235+
236+
# Count [Unreleased] link definitions - there should be exactly one
237+
local unreleased_count
238+
unreleased_count=$(grep -c "^\[Unreleased\]:" "$test_file")
239+
if [ "$unreleased_count" -eq 1 ] && \
240+
grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.3...HEAD" "$test_file" && \
241+
grep -q "\[1.0.0-beta-java.3\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3" "$test_file"; then
242+
return 0
243+
else
244+
return 1
245+
fi
246+
}
247+
183248
# Run all tests
184249
echo "Running CHANGELOG update script tests..."
185250
echo ""
@@ -189,6 +254,8 @@ run_test "Handle CHANGELOG without Unreleased link" test_no_unreleased_link
189254
run_test "Preserve content structure" test_preserve_content
190255
run_test "Error handling - no Unreleased section" test_no_unreleased_section
191256
run_test "Multiple version handling" test_multiple_versions
257+
run_test "Beta-java version format (e.g., 1.0.0-beta-java.N)" test_beta_java_version
258+
run_test "No duplicate [Unreleased] links when existing link is present" test_no_duplicate_unreleased_links
192259

193260
echo ""
194261
echo "=========================================="

.github/scripts/release/update-changelog.sh

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ BEGIN {
4545
links_section = 0
4646
first_version_link = ""
4747
repo_url = ""
48+
unreleased_link_handled = 0
4849
}
4950
5051
# Track if we are in the links section at the bottom
@@ -53,7 +54,7 @@ BEGIN {
5354
}
5455
5556
# Capture the repository URL from the first version link
56-
links_section && repo_url == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?\]:/ {
57+
links_section && repo_url == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ {
5758
match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\//, arr)
5859
if (arr[1] != "") {
5960
repo_url = arr[1]
@@ -86,28 +87,30 @@ skip_old_reference_impl && /^[[:space:]]*$/ { next }
8687
skip_old_reference_impl && /^> \*\*Reference implementation sync:\*\*/ { next }
8788
skip_old_reference_impl && !/^[[:space:]]*$/ && !/^> \*\*Reference implementation sync:\*\*/ { skip_old_reference_impl = 0 }
8889
89-
# Capture the first version link to get the previous version
90-
links_section && first_version_link == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?\]:/ {
91-
match($0, /\[([0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?)\]:/, arr)
92-
if (arr[1] != "" && repo_url != "") {
93-
first_version_link = arr[1]
94-
# Insert Unreleased and new version links before first version link
95-
print "[Unreleased]: " repo_url "/compare/v" version "...HEAD"
96-
print "[" version "]: " repo_url "/compare/v" arr[1] "...v" version
97-
}
98-
}
99-
100-
# Update existing [Unreleased] link if present
90+
# Update existing [Unreleased] link if present (must be checked before the first-version-link block)
10191
links_section && /^\[Unreleased\]:/ {
10292
# Get the previous version and repo URL from the existing link
103-
match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\/compare\/v([0-9]+\.[0-9]+\.[0-9]+(-java\.[0-9]+)?)\.\.\.HEAD/, arr)
93+
match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\/compare\/v([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\.\.\.HEAD/, arr)
10494
if (arr[1] != "" && arr[2] != "") {
10595
print "[Unreleased]: " arr[1] "/compare/v" version "...HEAD"
10696
print "[" version "]: " arr[1] "/compare/v" arr[2] "...v" version
97+
unreleased_link_handled = 1
10798
next
10899
}
109100
}
110101
102+
# Capture the first version link to get the previous version
103+
# Only fires if the [Unreleased] link was not already handled above
104+
links_section && first_version_link == "" && !unreleased_link_handled && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ {
105+
match($0, /\[([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\]:/, arr)
106+
if (arr[1] != "" && repo_url != "") {
107+
first_version_link = arr[1]
108+
# Insert Unreleased and new version links before first version link
109+
print "[Unreleased]: " repo_url "/compare/v" version "...HEAD"
110+
print "[" version "]: " repo_url "/compare/v" arr[1] "...v" version
111+
}
112+
}
113+
111114
# Print all other lines unchanged
112115
{ print }
113116
' "$CHANGELOG_FILE" > "$TEMP_FILE"

.github/workflows/publish-maven.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ jobs:
8787
else
8888
# Split version: supports "0.1.32", "0.1.32-java.0", and "0.1.32-java-preview.0" formats
8989
# Validate RELEASE_VERSION format explicitly to provide clear errors
90-
if ! echo "$RELEASE_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-java(-preview)?\.[0-9]+)?$'; then
91-
echo "Error: RELEASE_VERSION '$RELEASE_VERSION' is invalid. Expected format: M.M.P, M.M.P-java.N, or M.M.P-java-preview.N (e.g., 1.2.3, 1.2.3-java.0, or 1.2.3-java-preview.0)." >&2
90+
if ! echo "$RELEASE_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?$'; then
91+
echo "Error: RELEASE_VERSION '$RELEASE_VERSION' is invalid. Expected format: M.M.P, M.M.P-java.N, M.M.P-java-preview.N, or M.M.P-beta-java.N (e.g., 1.2.3, 1.2.3-java.0, 1.2.3-java-preview.0, or 1.2.3-beta-java.0)." >&2
9292
exit 1
9393
fi
9494
# Extract the base M.M.P portion (before any qualifier)
@@ -121,21 +121,21 @@ jobs:
121121
# Update CHANGELOG.md with release version and Reference implementation sync hash
122122
./.github/scripts/release/update-changelog.sh "${VERSION}" "${REFERENCE_IMPL_HASH}"
123123
124-
# Update version in README.md (supports versions like 1.0.0, 0.1.32-java.0, and 0.3.0-java-preview.0)
125-
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}</version>|<version>${VERSION}</version>|g" README.md
126-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" README.md
124+
# Update version in README.md (supports any version qualifier like -java.N, -java-preview.N, -beta-java.N)
125+
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*</version>|<version>${VERSION}</version>|g" README.md
126+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md
127127
128128
# Update snapshot version in README.md
129129
DEV_VERSION="${{ steps.versions.outputs.dev_version }}"
130-
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}-SNAPSHOT</version>|<version>${DEV_VERSION}</version>|g" README.md
130+
sed -i "s|<version>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*-SNAPSHOT</version>|<version>${DEV_VERSION}</version>|g" README.md
131131
132132
# Update version in jbang-example.java
133-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" jbang-example.java
133+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" jbang-example.java
134134
sed -i 's|copilot-sdk-java:${project\.version}|copilot-sdk-java:'"${VERSION}"'|g' jbang-example.java
135135
136136
# Update version in cookbook files (hardcoded for direct GitHub browsing and JBang usage)
137137
find src/site/markdown/cookbook -name "*.md" -type f -exec \
138-
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\)\{0,1\}|copilot-sdk-java:${VERSION}|g" {} \;
138+
sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" {} \;
139139
140140
# Commit the documentation changes before release:prepare (requires clean working directory)
141141
git add CHANGELOG.md README.md jbang-example.java src/site/markdown/cookbook/

CHANGELOG.md

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -506,38 +506,12 @@ New types: `GetForegroundSessionResponse`, `SetForegroundSessionResponse`
506506
- Pre-commit hook for Spotless code formatting
507507
- Comprehensive API documentation
508508

509-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
510-
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
511-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
512-
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
513-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.1...HEAD
514-
[0.3.0-java-preview.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.1
515-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...HEAD
516-
[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
517-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...HEAD
518-
[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
519-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.2...HEAD
520-
[1.0.0-beta-java.2]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.2
521509
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.3...HEAD
522-
[1.0.0-beta-java.3]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.3
510+
[1.0.0-beta-java.3]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3
511+
[1.0.0-beta-java.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2
512+
[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1
523513
[0.3.0-java.2]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java.2
524-
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
525-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
526-
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
527-
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
528-
[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
529-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
530-
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
531-
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
532-
[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
533-
[0.2.1-java.0]: https://github.com/github/copilot-sdk-java/compare/v0.1.32-java.0...v0.2.1-java.0
534-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
535-
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
536-
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
537-
[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
538-
[0.2.1-java.0]: https://github.com/github/copilot-sdk-java/compare/v0.1.32-java.0...v0.2.1-java.0
539-
[0.1.32-java.0]: https://github.com/github/copilot-sdk-java/compare/v1.0.11...v0.1.32-java.0
540-
[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java-preview.0...HEAD
514+
[0.3.0-java-preview.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.1
541515
[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0
542516
[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1
543517
[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1
@@ -555,4 +529,3 @@ New types: `GetForegroundSessionResponse`, `SetForegroundSessionResponse`
555529
[1.0.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.1...v1.0.2
556530
[1.0.1]: https://github.com/github/copilot-sdk-java/compare/1.0.0...v1.0.1
557531
[1.0.0]: https://github.com/github/copilot-sdk-java/releases/tag/1.0.0
558-

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Java SDK for programmatic control of GitHub Copilot CLI, enabling you to build A
3333
<dependency>
3434
<groupId>com.github</groupId>
3535
<artifactId>copilot-sdk-java</artifactId>
36-
<version>1.0.0-beta-java.1</version>
36+
<version>1.0.0-beta-java.3</version>
3737
</dependency>
3838
```
3939

@@ -60,7 +60,7 @@ Snapshot builds of the next development version are published to Maven Central S
6060
### Gradle
6161

6262
```groovy
63-
implementation 'com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1'
63+
implementation 'com.github:copilot-sdk-java:1.0.0-beta-java.3'
6464
```
6565

6666
## Quick Start

jbang-example.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//github.com/usr/bin/env jbang "$0" "$@" ; exit $?
2-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2
2+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
33
import com.github.copilot.sdk.CopilotClient;
44
import com.github.copilot.sdk.generated.AssistantMessageEvent;
55
import com.github.copilot.sdk.generated.SessionUsageInfoEvent;

src/site/markdown/cookbook/error-handling.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jbang BasicErrorHandling.java
3030

3131
**Code:**
3232
```java
33-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
33+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
3434
import com.github.copilot.sdk.CopilotClient;
3535
import com.github.copilot.sdk.generated.AssistantMessageEvent;
3636
import com.github.copilot.sdk.json.MessageOptions;
@@ -64,7 +64,7 @@ public class BasicErrorHandling {
6464
## Handling specific error types
6565

6666
```java
67-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
67+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
6868
import com.github.copilot.sdk.CopilotClient;
6969
import java.util.concurrent.ExecutionException;
7070

@@ -99,7 +99,7 @@ public class SpecificErrorHandling {
9999
## Timeout handling
100100

101101
```java
102-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
102+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
103103
import com.github.copilot.sdk.CopilotSession;
104104
import com.github.copilot.sdk.generated.AssistantMessageEvent;
105105
import com.github.copilot.sdk.json.MessageOptions;
@@ -130,7 +130,7 @@ public class TimeoutHandling {
130130
## Aborting a request
131131

132132
```java
133-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
133+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
134134
import com.github.copilot.sdk.CopilotSession;
135135
import com.github.copilot.sdk.json.MessageOptions;
136136
import java.util.concurrent.Executors;
@@ -162,7 +162,7 @@ public class AbortRequest {
162162
## Graceful shutdown
163163

164164
```java
165-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
165+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
166166
import com.github.copilot.sdk.CopilotClient;
167167

168168
public class GracefulShutdown {
@@ -192,7 +192,7 @@ public class GracefulShutdown {
192192
## Try-with-resources pattern
193193

194194
```java
195-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
195+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
196196
import com.github.copilot.sdk.CopilotClient;
197197
import com.github.copilot.sdk.generated.AssistantMessageEvent;
198198
import com.github.copilot.sdk.json.MessageOptions;
@@ -224,7 +224,7 @@ public class TryWithResources {
224224
## Handling tool errors
225225

226226
```java
227-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
227+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
228228
import com.github.copilot.sdk.CopilotClient;
229229
import com.github.copilot.sdk.generated.AssistantMessageEvent;
230230
import com.github.copilot.sdk.json.MessageOptions;

src/site/markdown/cookbook/managing-local-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jbang ManagingLocalFiles.java
3434

3535
**Code:**
3636
```java
37-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
37+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
3838
import com.github.copilot.sdk.CopilotClient;
3939
import com.github.copilot.sdk.generated.AssistantMessageEvent;
4040
import com.github.copilot.sdk.generated.SessionIdleEvent;
@@ -161,7 +161,7 @@ session.send(new MessageOptions().setPrompt(prompt));
161161
## Interactive file organization
162162

163163
```java
164-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
164+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
165165
import java.io.BufferedReader;
166166
import java.io.InputStreamReader;
167167

src/site/markdown/cookbook/multiple-sessions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jbang MultipleSessions.java
3030

3131
**Code:**
3232
```java
33-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
33+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
3434
import com.github.copilot.sdk.CopilotClient;
3535
import com.github.copilot.sdk.generated.AssistantMessageEvent;
3636
import com.github.copilot.sdk.json.MessageOptions;
@@ -123,7 +123,7 @@ try {
123123
## Managing session lifecycle with CompletableFuture
124124

125125
```java
126-
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3-beta-java.2-beta-java.1
126+
//DEPS com.github:copilot-sdk-java:1.0.0-beta-java.3
127127
import java.util.concurrent.CompletableFuture;
128128
import java.util.List;
129129

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy