From d0b39ca8feda9ae61c4e52c8e0798a2f3009f218 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Mon, 31 Mar 2025 15:53:15 +0200 Subject: [PATCH] [AI Assistance] Don't hide changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the Patch Widget rerenders the changes may be empty. We should respect the current status. Bug: none Change-Id: I229d9c54f21415511b336a03d88d68efb9a35706 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6416093 Reviewed-by: Ergün Erdoğmuş Commit-Queue: Ergün Erdoğmuş Auto-Submit: Nikolay Vitkov --- front_end/panels/ai_assistance/PatchWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front_end/panels/ai_assistance/PatchWidget.ts b/front_end/panels/ai_assistance/PatchWidget.ts index 3ec9f91251..2b03f56e86 100644 --- a/front_end/panels/ai_assistance/PatchWidget.ts +++ b/front_end/panels/ai_assistance/PatchWidget.ts @@ -207,7 +207,7 @@ export class PatchWidget extends UI.Widget.Widget { } function renderContent(): LitTemplate { - if (!input.changeSummary || input.savedToDisk) { + if ((!input.changeSummary || input.savedToDisk) && input.patchSuggestionState === PatchSuggestionState.INITIAL) { return nothing; } @@ -218,7 +218,7 @@ export class PatchWidget extends UI.Widget.Widget { } return html`