@@ -66,10 +66,10 @@ declare module 'vscode' {
6666
6767 export class ChatResponseConfirmationPart {
6868 title : string ;
69- message : string ;
69+ message : string | MarkdownString ;
7070 data : any ;
7171 buttons ?: string [ ] ;
72- constructor ( title : string , message : string , data : any , buttons ?: string [ ] ) ;
72+ constructor ( title : string , message : string | MarkdownString , data : any , buttons ?: string [ ] ) ;
7373 }
7474
7575 export class ChatResponseCodeCitationPart {
@@ -84,8 +84,72 @@ declare module 'vscode' {
8484 constructor ( toolName : string ) ;
8585 }
8686
87- export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseNotebookEditPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart | ChatResponseExtensionsPart | ChatPrepareToolInvocationPart ;
87+ export interface ChatTerminalToolInvocationData {
88+ commandLine : {
89+ original : string ;
90+ userEdited ?: string ;
91+ toolEdited ?: string ;
92+ } ;
93+ language : string ;
94+ }
95+
96+ export class ChatToolInvocationPart {
97+ toolName : string ;
98+ toolCallId : string ;
99+ isError ?: boolean ;
100+ invocationMessage ?: string | MarkdownString ;
101+ originMessage ?: string | MarkdownString ;
102+ pastTenseMessage ?: string | MarkdownString ;
103+ isConfirmed ?: boolean ;
104+ isComplete ?: boolean ;
105+ toolSpecificData ?: ChatTerminalToolInvocationData ;
106+
107+ constructor ( toolName : string , toolCallId : string , isError ?: boolean ) ;
108+ }
109+
110+ /**
111+ * Represents a single file diff entry in a multi diff view.
112+ */
113+ export interface ChatResponseDiffEntry {
114+ /**
115+ * The original file URI (undefined for new files).
116+ */
117+ originalUri ?: Uri ;
118+
119+ /**
120+ * The modified file URI (undefined for deleted files).
121+ */
122+ modifiedUri ?: Uri ;
123+
124+ /**
125+ * Optional URI to navigate to when clicking on the file.
126+ */
127+ goToFileUri ?: Uri ;
128+ }
88129
130+ /**
131+ * Represents a part of a chat response that shows multiple file diffs.
132+ */
133+ export class ChatResponseMultiDiffPart {
134+ /**
135+ * Array of file diff entries to display.
136+ */
137+ value : ChatResponseDiffEntry [ ] ;
138+
139+ /**
140+ * The title for the multi diff editor.
141+ */
142+ title : string ;
143+
144+ /**
145+ * Create a new ChatResponseMultiDiffPart.
146+ * @param value Array of file diff entries.
147+ * @param title The title for the multi diff editor.
148+ */
149+ constructor ( value : ChatResponseDiffEntry [ ] , title : string ) ;
150+ }
151+
152+ export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseNotebookEditPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart | ChatResponseExtensionsPart | ChatResponsePullRequestPart | ChatPrepareToolInvocationPart | ChatToolInvocationPart | ChatResponseMultiDiffPart ;
89153 export class ChatResponseWarningPart {
90154 value : MarkdownString ;
91155 constructor ( value : string | MarkdownString ) ;
@@ -171,6 +235,15 @@ declare module 'vscode' {
171235 constructor ( extensions : string [ ] ) ;
172236 }
173237
238+ export class ChatResponsePullRequestPart {
239+ readonly uri : Uri ;
240+ readonly linkTag : string ;
241+ readonly title : string ;
242+ readonly description : string ;
243+ readonly author : string ;
244+ constructor ( uri : Uri , title : string , description : string , author : string , linkTag : string ) ;
245+ }
246+
174247 export interface ChatResponseStream {
175248
176249 /**
@@ -205,7 +278,7 @@ declare module 'vscode' {
205278 * TODO@API should this be MarkdownString?
206279 * TODO@API should actually be a more generic function that takes an array of buttons
207280 */
208- confirmation ( title : string , message : string , data : any , buttons ?: string [ ] ) : void ;
281+ confirmation ( title : string , message : string | MarkdownString , data : any , buttons ?: string [ ] ) : void ;
209282
210283 /**
211284 * Push a warning to this stream. Short-hand for
@@ -258,6 +331,50 @@ declare module 'vscode' {
258331 readonly tools : Map < string , boolean > ;
259332 }
260333
334+ export namespace lm {
335+ /**
336+ * Fired when the set of tools on a chat request changes.
337+ */
338+ export const onDidChangeChatRequestTools : Event < ChatRequest > ;
339+ }
340+
341+ export class LanguageModelToolExtensionSource {
342+ /**
343+ * ID of the extension that published the tool.
344+ */
345+ readonly id : string ;
346+
347+ /**
348+ * Label of the extension that published the tool.
349+ */
350+ readonly label : string ;
351+
352+ private constructor ( id : string , label : string ) ;
353+ }
354+
355+ export class LanguageModelToolMCPSource {
356+ /**
357+ * Editor-configured label of the MCP server that published the tool.
358+ */
359+ readonly label : string ;
360+
361+ /**
362+ * Server-defined name of the MCP server.
363+ */
364+ readonly name : string ;
365+
366+ /**
367+ * Server-defined instructions for MCP tool use.
368+ */
369+ readonly instructions ?: string ;
370+
371+ private constructor ( label : string , name : string , instructions ?: string ) ;
372+ }
373+
374+ export interface LanguageModelToolInformation {
375+ source : LanguageModelToolExtensionSource | LanguageModelToolMCPSource | undefined ;
376+ }
377+
261378 // TODO@API fit this into the stream
262379 export interface ChatUsedContext {
263380 documents : ChatDocumentContext [ ] ;
@@ -307,6 +424,10 @@ declare module 'vscode' {
307424 participant ?: string ;
308425 command ?: string ;
309426 } ;
427+ /**
428+ * An optional detail string that will be rendered at the end of the response in certain UI contexts.
429+ */
430+ details ?: string ;
310431 }
311432
312433 export namespace chat {
@@ -401,6 +522,15 @@ declare module 'vscode' {
401522 outcome : ChatEditingSessionActionOutcome ;
402523 }
403524
525+ export interface ChatEditingHunkAction {
526+ // eslint-disable-next-line local/vscode-dts-string-type-literals
527+ kind : 'chatEditingHunkAction' ;
528+ uri : Uri ;
529+ lineCount : number ;
530+ outcome : ChatEditingSessionActionOutcome ;
531+ hasRemainingEdits : boolean ;
532+ }
533+
404534 export enum ChatEditingSessionActionOutcome {
405535 Accepted = 1 ,
406536 Rejected = 2 ,
@@ -409,7 +539,7 @@ declare module 'vscode' {
409539
410540 export interface ChatUserActionEvent {
411541 readonly result : ChatResult ;
412- readonly action : ChatCopyAction | ChatInsertAction | ChatApplyAction | ChatTerminalAction | ChatCommandAction | ChatFollowupAction | ChatBugReportAction | ChatEditorAction | ChatEditingSessionAction ;
542+ readonly action : ChatCopyAction | ChatInsertAction | ChatApplyAction | ChatTerminalAction | ChatCommandAction | ChatFollowupAction | ChatBugReportAction | ChatEditorAction | ChatEditingSessionAction | ChatEditingHunkAction ;
413543 }
414544
415545 export interface ChatPromptReference {
0 commit comments