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 {
235235
236236 constructor ( value : IMarkdownString | ReadonlyArray < IMarkdownString | IChatResponseProgressFileTreeData | IChatContentInlineReference | IChatAgentMarkdownContentWithVulnerability | IChatResponseCodeblockUriPart > ) {
237237 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 ) ?
239247 { content : v , kind : 'markdownContent' } satisfies IChatMarkdownContent :
240248 'kind' in v ? v : { kind : 'treeData' , treeData : v } ) ) ;
241249
@@ -256,6 +264,10 @@ export class Response extends Disposable implements IResponse {
256264 }
257265
258266 updateContent ( progress : IChatProgressResponseContent | IChatTextEdit | IChatTask , quiet ?: boolean ) : void {
267+ if ( progress . kind === 'inlineReference' && ! Object . keys ( progress . inlineReference ) . length ) {
268+ return ;
269+ }
270+
259271 if ( progress . kind === 'markdownContent' ) {
260272 const responsePartLength = this . _responseParts . length - 1 ;
261273 const lastResponsePart = this . _responseParts [ responsePartLength ] ;
You can’t perform that action at this time.
0 commit comments