File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/vs/workbench/contrib/chat/common Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,15 @@ export class Response extends Disposable implements IResponse {
235
235
236
236
constructor ( value : IMarkdownString | ReadonlyArray < IMarkdownString | IChatResponseProgressFileTreeData | IChatContentInlineReference | IChatAgentMarkdownContentWithVulnerability | IChatResponseCodeblockUriPart > ) {
237
237
super ( ) ;
238
- this . _responseParts = asArray ( value ) . map ( ( v ) => ( isMarkdownString ( v ) ?
238
+ const valueArr = asArray ( value ) . filter ( v => {
239
+ if ( 'kind' in v && v . kind === 'inlineReference' && ! Object . keys ( v . inlineReference ) . length ) {
240
+ return false ;
241
+ }
242
+
243
+ return true ;
244
+ } ) ;
245
+
246
+ this . _responseParts = valueArr . map ( ( v ) => ( isMarkdownString ( v ) ?
239
247
{ content : v , kind : 'markdownContent' } satisfies IChatMarkdownContent :
240
248
'kind' in v ? v : { kind : 'treeData' , treeData : v } ) ) ;
241
249
@@ -256,6 +264,10 @@ export class Response extends Disposable implements IResponse {
256
264
}
257
265
258
266
updateContent ( progress : IChatProgressResponseContent | IChatTextEdit | IChatTask , quiet ?: boolean ) : void {
267
+ if ( progress . kind === 'inlineReference' && ! Object . keys ( progress . inlineReference ) . length ) {
268
+ return ;
269
+ }
270
+
259
271
if ( progress . kind === 'markdownContent' ) {
260
272
const responsePartLength = this . _responseParts . length - 1 ;
261
273
const lastResponsePart = this . _responseParts [ responsePartLength ] ;
You can’t perform that action at this time.
0 commit comments