Skip to content

Commit

Permalink
inline chat - filter response elements that are just text edits (hide…
Browse files Browse the repository at this point in the history
…s the dreaded "Made changes" messages) (#224947)
  • Loading branch information
jrieken authored Aug 6, 2024
1 parent 1835a67 commit 7c2a097
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class ChatTextEditContentPart extends Disposable implements IChatContentP
if (rendererOptions.renderTextEditsAsSummary?.(chatTextEdit.uri)) {
if (isResponseVM(element) && element.response.value.every(item => item.kind === 'textEditGroup')) {
this.domNode = $('.interactive-edits-summary', undefined, !element.isComplete
? localize('editsSummary1', "Making changes...")
? ''
: element.isCanceled
? localize('edits0', "Making changes was aborted.")
: localize('editsSummary', "Made changes."));
Expand Down
11 changes: 10 additions & 1 deletion src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,16 @@ export class InlineChatWidget {
renderInputOnTop: false,
renderFollowups: true,
supportsFileReferences: _configurationService.getValue(`chat.experimental.variables.${location.location}`) === true,
filter: item => !isWelcomeVM(item),
filter: item => {
if (isWelcomeVM(item)) {
return false;
}
if (isResponseVM(item) && item.isComplete && item.response.value.every(item => item.kind === 'textEditGroup' && options.chatWidgetViewOptions?.rendererOptions?.renderTextEditsAsSummary?.(item.uri))) {
// filter responses that are just text edits (prevents the "Made Edits")
return false;
}
return true;
},
...options.chatWidgetViewOptions
},
{
Expand Down

0 comments on commit 7c2a097

Please sign in to comment.