Skip to content

Commit 12abf2f

Browse files
Deploy documentation: snapshot
1 parent 0ff2f49 commit 12abf2f

359 files changed

Lines changed: 5428 additions & 973 deletions

File tree

Some content is hidden

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

snapshot/advanced.html

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
<!--
5-
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from target/filtered-site/markdown/advanced.md at 2026-02-04
5+
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from target/filtered-site/markdown/advanced.md at 2026-02-05
66
| Rendered using Apache Maven Fluido Skin 2.1.0
77
-->
88
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
@@ -101,7 +101,7 @@
101101

102102
<div id="breadcrumbs">
103103
<ul class="breadcrumb">
104-
<li id="publishDate">Last Published: 2026-02-04<span class="divider">|</span>
104+
<li id="publishDate">Last Published: 2026-02-05<span class="divider">|</span>
105105
</li>
106106
<li id="projectVersion">Version: 1.0.7-SNAPSHOT<span class="divider">|</span></li>
107107
<li><a href="index.html">Home</a><span class="divider">/</span></li>
@@ -386,7 +386,54 @@ <h2>Manual Server Control</h2>
386386
client.start().get(); // Start manually
387387
// ... use client ...
388388
client.stop().get(); // Stop manually
389-
</code></pre><hr /></section><section><a id="Error_Handling"></a>
389+
</code></pre><hr /></section><section><a id="Session_Lifecycle_Events"></a>
390+
<h2>Session Lifecycle Events</h2>
391+
<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>
392+
<h3>Subscribing to All Lifecycle Events</h3>
393+
394+
<pre class="prettyprint"><code class="language-java">AutoCloseable subscription = client.onLifecycle(event -&gt; {
395+
System.out.println(&quot;Session &quot; + event.getSessionId() + &quot;: &quot; + event.getType());
396+
397+
if (event.getMetadata() != null) {
398+
System.out.println(&quot; Summary: &quot; + event.getMetadata().getSummary());
399+
}
400+
});
401+
402+
// Later, when done listening:
403+
subscription.close();
404+
</code></pre></section><section><a id="Subscribing_to_Specific_Event_Types"></a>
405+
<h3>Subscribing to Specific Event Types</h3>
406+
407+
<pre class="prettyprint"><code class="language-java">import com.github.copilot.sdk.json.SessionLifecycleEventTypes;
408+
409+
// Listen only for session creation
410+
AutoCloseable subscription = client.onLifecycle(
411+
SessionLifecycleEventTypes.CREATED,
412+
event -&gt; System.out.println(&quot;New session: &quot; + event.getSessionId())
413+
);
414+
</code></pre>
415+
<p>Available event types:</p>
416+
<ul>
417+
418+
<li><code>SessionLifecycleEventTypes.CREATED</code> - Session was created</li>
419+
<li><code>SessionLifecycleEventTypes.DELETED</code> - Session was deleted</li>
420+
<li><code>SessionLifecycleEventTypes.UPDATED</code> - Session was updated</li>
421+
<li><code>SessionLifecycleEventTypes.FOREGROUND</code> - Session moved to foreground (TUI+server mode)</li>
422+
<li><code>SessionLifecycleEventTypes.BACKGROUND</code> - Session moved to background (TUI+server mode)</li>
423+
</ul><hr /></section></section><section><a id="Foreground_Session_Control_.28TUI.2BServer_Mode.29"></a>
424+
<h2>Foreground Session Control (TUI+Server Mode)</h2>
425+
<p>When connecting to a server running in TUI+server mode (<code>--ui-server</code>), you can control which session is displayed in the TUI.</p><section><a id="Getting_the_Foreground_Session"></a>
426+
<h3>Getting the Foreground Session</h3>
427+
428+
<pre class="prettyprint"><code class="language-java">String sessionId = client.getForegroundSessionId().get();
429+
if (sessionId != null) {
430+
System.out.println(&quot;TUI is displaying session: &quot; + sessionId);
431+
}
432+
</code></pre></section><section><a id="Setting_the_Foreground_Session"></a>
433+
<h3>Setting the Foreground Session</h3>
434+
435+
<pre class="prettyprint"><code class="language-java">client.setForegroundSessionId(&quot;session-123&quot;).get();
436+
</code></pre><hr /></section></section><section><a id="Error_Handling"></a>
390437
<h2>Error Handling</h2>
391438
<p>All SDK methods return <code>CompletableFuture</code>. Errors surface via <code>ExecutionException</code>:</p>
392439

snapshot/apidocs/allclasses-index.html

Lines changed: 201 additions & 153 deletions
Large diffs are not rendered by default.

snapshot/apidocs/allpackages-index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 04 17:12:34 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 16:33:08 UTC 2026 -->
55
<title>All Packages (GitHub Copilot Community SDK :: Java 1.0.7-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">
8-
<meta name="dc.created" content="2026-02-04">
8+
<meta name="dc.created" content="2026-02-05">
99
<meta name="description" content="package index">
1010
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
1111
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Wed Feb 04 17:12:34 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 16:33:08 UTC 2026 -->
55
<title>ConnectionState (GitHub Copilot Community SDK :: Java 1.0.7-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">
8-
<meta name="dc.created" content="2026-02-04">
8+
<meta name="dc.created" content="2026-02-05">
99
<meta name="description" content="declaration: package: com.github.copilot.sdk, enum: ConnectionState">
1010
<meta name="generator" content="javadoc/ClassWriterImpl">
1111
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

0 commit comments

Comments
 (0)