@@ -71,9 +71,18 @@ declare module 'vscode' {
7171 export interface ChatSessionItem {
7272 /**
7373 * Unique identifier for the chat session.
74+ *
75+ * @deprecated Will be replaced by `resource`
7476 */
7577 id : string ;
7678
79+ /**
80+ * The resource associated with the chat session.
81+ *
82+ * This is uniquely identifies the chat session and is used to open the chat session.
83+ */
84+ resource : Uri | undefined ;
85+
7786 /**
7887 * Human readable name of the session shown in the UI
7988 */
@@ -139,6 +148,11 @@ declare module 'vscode' {
139148 // TODO: link request + response to encourage correct usage?
140149 readonly history : ReadonlyArray < ChatRequestTurn | ChatResponseTurn2 > ;
141150
151+ /**
152+ * Options configured for this session.
153+ */
154+ readonly options ?: { model ?: LanguageModelChatInformation } ;
155+
142156 /**
143157 * Callback invoked by the editor for a currently running response. This allows the session to push items for the
144158 * current response and stream these in as them come in. The current response will be considered complete once the
@@ -166,6 +180,32 @@ declare module 'vscode' {
166180 * @param token A cancellation token that can be used to cancel the operation.
167181 */
168182 provideChatSessionContent ( sessionId : string , token : CancellationToken ) : Thenable < ChatSession > | ChatSession ;
183+
184+ /**
185+ *
186+ * @param sessionId Identifier of the chat session being updated.
187+ * @param updates Collection of option identifiers and their new values. Only the options that changed are included.
188+ * @param token A cancellation token that can be used to cancel the notification if the session is disposed.
189+ */
190+ provideHandleOptionsChange ?( sessionId : string , updates : ReadonlyArray < ChatSessionOptionUpdate > , token : CancellationToken ) : void ;
191+
192+ /**
193+ * Called as soon as you register (call me once)
194+ * @param token
195+ */
196+ provideChatSessionProviderOptions ?( token : CancellationToken ) : Thenable < ChatSessionProviderOptions > | ChatSessionProviderOptions ;
197+ }
198+
199+ export interface ChatSessionOptionUpdate {
200+ /**
201+ * Identifier of the option that changed (for example `model`).
202+ */
203+ readonly optionId : string ;
204+
205+ /**
206+ * The new value assigned to the option. When `undefined`, the option is cleared.
207+ */
208+ readonly value : string | undefined ;
169209 }
170210
171211 export namespace chat {
@@ -212,6 +252,16 @@ declare module 'vscode' {
212252 supportsInterruptions ?: boolean ;
213253 }
214254
255+ export interface ChatSessionProviderOptions {
256+ /**
257+ * Set of available models.
258+ */
259+ models ?: LanguageModelChatInformation [ ] ;
260+ }
261+
262+ /**
263+ * @deprecated
264+ */
215265 export interface ChatSessionShowOptions {
216266 /**
217267 * The editor view column to show the chat session in.
@@ -224,6 +274,8 @@ declare module 'vscode' {
224274 export namespace window {
225275 /**
226276 * Shows a chat session in the panel or editor.
277+ *
278+ * @deprecated
227279 */
228280 export function showChatSession ( chatSessionType : string , sessionId : string , options : ChatSessionShowOptions ) : Thenable < void > ;
229281 }
0 commit comments