Skip to content

Commit 8609d4b

Browse files
Deploy documentation: snapshot
1 parent be34b0f commit 8609d4b

File tree

353 files changed

+709
-598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+709
-598
lines changed

snapshot/advanced.html

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,43 @@ <h3>Full Control</h3>
271271
).get();
272272
</code></pre><hr /></section></section><section><a id="File_Attachments"></a>
273273
<h2>File Attachments</h2>
274-
<p>Include files as context for the AI to analyze.</p>
274+
<p>Include files as context for the AI to analyze. The <code>Attachment</code> record takes three parameters:</p>
275+
<table class="table table-striped">
276+
<thead>
277+
<tr class="a">
278+
<th>Parameter</th>
279+
<th>Type</th>
280+
<th>Description</th></tr></thead><tbody>
281+
<tr class="b">
282+
<td><code>type</code></td>
283+
<td>String</td>
284+
<td>The attachment type &#x2014; use <code>&quot;file&quot;</code> for filesystem files</td></tr>
285+
<tr class="a">
286+
<td><code>path</code></td>
287+
<td>String</td>
288+
<td>The absolute path to the file on disk</td></tr>
289+
<tr class="b">
290+
<td><code>displayName</code></td>
291+
<td>String</td>
292+
<td>A human-readable label shown to the AI (e.g., the filename or a description)</td></tr></tbody>
293+
</table>
275294

276295
<pre class="prettyprint"><code class="language-java">session.send(new MessageOptions()
277296
.setPrompt(&quot;Review this file for bugs&quot;)
278297
.setAttachments(List.of(
279298
new Attachment(&quot;file&quot;, &quot;/path/to/file.java&quot;, &quot;MyService.java&quot;)
280299
))
281300
).get();
301+
</code></pre>
302+
<p>You can attach multiple files in a single message:</p>
303+
304+
<pre class="prettyprint"><code class="language-java">session.send(new MessageOptions()
305+
.setPrompt(&quot;Compare these two implementations&quot;)
306+
.setAttachments(List.of(
307+
new Attachment(&quot;file&quot;, &quot;/src/main/OldImpl.java&quot;, &quot;Old Implementation&quot;),
308+
new Attachment(&quot;file&quot;, &quot;/src/main/NewImpl.java&quot;, &quot;New Implementation&quot;)
309+
))
310+
).get();
282311
</code></pre><hr /></section><section><a id="Bring_Your_Own_Key_.28BYOK.29"></a>
283312
<h2>Bring Your Own Key (BYOK)</h2>
284313
<p>Use your own OpenAI or Azure OpenAI API key instead of GitHub Copilot.</p><section><a id="API_Key_Authentication"></a>
@@ -564,7 +593,36 @@ <h2>Manual Server Control</h2>
564593
client.start().get(); // Start manually
565594
// ... use client ...
566595
client.stop().get(); // Stop manually
567-
</code></pre><hr /></section><section><a id="Session_Lifecycle_Events"></a>
596+
</code></pre><section><a id="Graceful_Stop_vs_Force_Stop"></a>
597+
<h3>Graceful Stop vs Force Stop</h3>
598+
<p>The SDK provides two shutdown methods:</p>
599+
<table class="table table-striped">
600+
<thead>
601+
<tr class="a">
602+
<th>Method</th>
603+
<th>Behavior</th></tr></thead><tbody>
604+
<tr class="b">
605+
<td><code>stop()</code></td>
606+
<td>Gracefully closes all open sessions, then shuts down the connection</td></tr>
607+
<tr class="a">
608+
<td><code>forceStop()</code></td>
609+
<td>Immediately clears sessions and shuts down &#x2014; no graceful session cleanup</td></tr></tbody>
610+
</table>
611+
612+
<p>Use <code>stop()</code> for normal shutdown &#x2014; it ensures each session is properly closed (flushing pending operations) before terminating the connection:</p>
613+
614+
<pre class="prettyprint"><code class="language-java">// Graceful: closes all sessions, then disconnects
615+
client.stop().get();
616+
</code></pre>
617+
<p>Use <code>forceStop()</code> when you need to terminate immediately, such as during error recovery or when the server is unresponsive:</p>
618+
619+
<pre class="prettyprint"><code class="language-java">// Immediate: skips session cleanup, kills connection
620+
client.forceStop().get();
621+
</code></pre>
622+
<blockquote>
623+
624+
<p><strong>Tip:</strong> In <code>try-with-resources</code> blocks, <code>close()</code> delegates to <code>stop()</code>, so graceful cleanup happens automatically.</p>
625+
</blockquote><hr /></section></section><section><a id="Session_Lifecycle_Events"></a>
568626
<h2>Session Lifecycle Events</h2>
569627
<p>Subscribe to lifecycle events to be notified when sessions are created, deleted, updated, or change foreground/background state.</p><section><a id="Subscribing_to_All_Lifecycle_Events"></a>
570628
<h3>Subscribing to All Lifecycle Events</h3>

snapshot/apidocs/allclasses-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>All Classes and Interfaces (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/allpackages-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>All Packages (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/ConnectionState.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>ConnectionState (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/CopilotClient.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>CopilotClient (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/CopilotSession.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>CopilotSession (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/EventErrorHandler.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>EventErrorHandler (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/EventErrorPolicy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>EventErrorPolicy (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/SdkProtocolVersion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>SdkProtocolVersion (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/SystemMessageMode.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 11 06:10:54 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Wed Feb 11 15:28:59 UTC 2026 -->
55
<title>SystemMessageMode (GitHub Copilot Community SDK :: Java 1.0.9-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

0 commit comments

Comments
 (0)