Skip to content

Commit

Permalink
fix: rerender chat request context attachments when references are re…
Browse files Browse the repository at this point in the history
…ported (#223100)
  • Loading branch information
joyceerhl authored Jul 22, 2024
1 parent 642700c commit edfa11f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ export class ChatWidget extends Disposable implements IChatWidget {
// be re-rendered so progressive rendering is restarted, even if the model wasn't updated.
`${isResponseVM(element) && element.renderData ? `_${this.visibleChangeCount}` : ''}` +
// Re-render once content references are loaded
(isResponseVM(element) ? `_${element.contentReferences.length}` : '');
(isResponseVM(element) ? `_${element.contentReferences.length}` : '') +
// Rerender request if we got new content references in the response
// since this may change how we render the corresponding attachments in the request
(isRequestVM(element) && element.contentReferences ? `_${element.contentReferences?.length}` : '');
},
}
});
Expand Down

0 comments on commit edfa11f

Please sign in to comment.