Use a light weight diff for live inline chat mode (#199027)

* wip

* add yet another live mode which is live and live preview...

* use `renderLines` and view zones for orginal contents, render accept, discard, and compare in line

* remove LiveStrategy2 again

* render insertion diff as progressive changes happen

* implement discard

* implement explicit accept via button and implict accept via typing inside changes

* merge diff changes that are somewhat near

* pass zone, not just widget to strategies

* add `IEditorDecorationsCollection#append`

* move live3 actions into widget, don't render normal accept, discard, allow strategry to trigger accept, discard flows

* cleanup

* make sure re-run works
This commit is contained in:
Johannes Rieken
2023-11-24 15:14:53 +01:00
committed by GitHub
parent ac336e664a
commit 5d73488bb3
12 changed files with 640 additions and 146 deletions

View File

@@ -314,7 +314,7 @@ MenuRegistry.appendMenuItem(MENU_INLINE_CHAT_WIDGET_STATUS, {
icon: Codicon.discard,
group: '0_main',
order: 2,
when: ContextKeyExpr.and(CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo(EditMode.Preview), CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChateResponseTypes.OnlyMessages)),
when: ContextKeyExpr.and(CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo(EditMode.Preview), CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo(EditMode.Live3), CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChateResponseTypes.OnlyMessages)),
rememberDefaultAction: true
});
@@ -513,7 +513,7 @@ export class ApplyPreviewEdits extends AbstractInlineChatAction {
when: CTX_INLINE_CHAT_USER_DID_EDIT
}],
menu: {
when: CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChateResponseTypes.OnlyMessages),
when: ContextKeyExpr.and(CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChateResponseTypes.OnlyMessages), CTX_INLINE_CHAT_EDIT_MODE.notEqualsTo(EditMode.Live3)),
id: MENU_INLINE_CHAT_WIDGET_STATUS,
group: '0_main',
order: 0