You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The CLI bypasses the permission request for this tool invocation, so no <code>PermissionRequestedEvent</code>
337
+
is emitted and the <code>onPermissionRequest</code> handler is not called.</p>
338
+
<p>See <ahref="apidocs/com/github/copilot/sdk/json/ToolDefinition.html">ToolDefinition</a> Javadoc for details.</p><hr/></section></section><section><aid="Switching_Models_Mid-Session"></a>
308
339
<h2>Switching Models Mid-Session</h2>
309
340
<p>You can change the model used by an existing session without losing conversation history.
310
341
The new model takes effect starting with the next message sent.</p>
session.sendAndWait(new MessageOptions().setPrompt("Continue with the new model")).get();
322
356
</code></pre>
357
+
<p>The <code>reasoningEffort</code> parameter accepts <code>"low"</code>, <code>"medium"</code>, <code>"high"</code>, or <code>"xhigh"</code> for models
358
+
that support reasoning. Pass <code>null</code> (or use the single-argument overload) to use the default.</p>
323
359
<p>The session emits a <ahref="apidocs/com/github/copilot/sdk/events/SessionModelChangeEvent.html"><code>SessionModelChangeEvent</code></a>
324
360
when the switch completes, which you can observe with <code>session.on(SessionModelChangeEvent.class, event -> ...)</code>.</p>
325
361
<p>See <ahref="apidocs/com/github/copilot/sdk/CopilotSession.html#setModel.28java.lang.String.29">CopilotSession.setModel()</a> Javadoc for details.</p><hr/></section><section><aid="System_Messages"></a>
@@ -349,7 +385,50 @@ <h3>Full Control</h3>
349
385
.setMode(SystemMessageMode.REPLACE)
350
386
.setContent("You are a helpful coding assistant."))
<ahref="apidocs/com/github/copilot/sdk/json/SectionOverride.html">SectionOverride</a>, and
431
+
<ahref="apidocs/com/github/copilot/sdk/json/SystemPromptSections.html">SystemPromptSections</a> Javadoc for details.</p><hr/></section></section><section><aid="File_Attachments"></a>
353
432
<h2>File Attachments</h2>
354
433
<p>Include files as context for the AI to analyze. The <code>Attachment</code> record takes three parameters:</p>
355
434
<tableclass="table table-striped">
@@ -388,7 +467,40 @@ <h2>File Attachments</h2>
388
467
new Attachment("file", "/src/main/NewImpl.java", "New Implementation")
<p>See <ahref="apidocs/com/github/copilot/sdk/EventErrorPolicy.html">EventErrorPolicy</a> and <ahref="apidocs/com/github/copilot/sdk/EventErrorHandler.html">EventErrorHandler</a> Javadoc for details.</p><hr/></section></section><section><aid="Next_Steps"></a>
1169
+
<p>See <ahref="apidocs/com/github/copilot/sdk/EventErrorPolicy.html">EventErrorPolicy</a> and <ahref="apidocs/com/github/copilot/sdk/EventErrorHandler.html">EventErrorHandler</a> Javadoc for details.</p><hr/></section></section><section><aid="OpenTelemetry"></a>
1170
+
<h2>OpenTelemetry</h2>
1171
+
<p>Enable OpenTelemetry tracing in the Copilot CLI server by configuring a <code>TelemetryConfig</code>
1172
+
on the <code>CopilotClientOptions</code>. This is useful for observability, performance monitoring,
1173
+
and debugging.</p>
1174
+
1175
+
<preclass="prettyprint"><codeclass="language-java">var options = new CopilotClientOptions()
<td>Whether to capture message content</td></tr></tbody>
1216
+
</table>
1217
+
1218
+
<p>See <ahref="apidocs/com/github/copilot/sdk/json/TelemetryConfig.html">TelemetryConfig</a> Javadoc for details.</p><hr/></section><section><aid="Next_Steps"></a>
0 commit comments