mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
improve CodeCompareBlockPart (#210964)
* polish code compare block for chat widgets * show edits unless applied * show summary after applying * know when original file has changed * don't double apply edits * separate `IChatTextEdit` (progress chunk) and `IChatTextEditGroup` (response value) so that latter can hold extra state and allows for groups of edits * fix compile errors
This commit is contained in:
@@ -504,13 +504,15 @@ export class InlineChatSessionServiceImpl implements IInlineChatSessionService {
|
||||
for (const item of response.response.value) {
|
||||
if (item.kind === 'markdownContent') {
|
||||
markdownContent.value += item.content.value;
|
||||
} else if (item.kind === 'textEdit') {
|
||||
for (const edit of item.edits) {
|
||||
raw.edits.edits.push({
|
||||
resource: item.uri,
|
||||
textEdit: edit,
|
||||
versionId: undefined
|
||||
});
|
||||
} else if (item.kind === 'textEditGroup') {
|
||||
for (const group of item.edits) {
|
||||
for (const edit of group) {
|
||||
raw.edits.edits.push({
|
||||
resource: item.uri,
|
||||
textEdit: edit,
|
||||
versionId: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user