Skip to content

Commit d0b39ca

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[AI Assistance] Don't hide changes
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ş <[email protected]> Commit-Queue: Ergün Erdoğmuş <[email protected]> Auto-Submit: Nikolay Vitkov <[email protected]>
1 parent 6258ac7 commit d0b39ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

front_end/panels/ai_assistance/PatchWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class PatchWidget extends UI.Widget.Widget {
207207
}
208208

209209
function renderContent(): LitTemplate {
210-
if (!input.changeSummary || input.savedToDisk) {
210+
if ((!input.changeSummary || input.savedToDisk) && input.patchSuggestionState === PatchSuggestionState.INITIAL) {
211211
return nothing;
212212
}
213213

@@ -218,7 +218,7 @@ export class PatchWidget extends UI.Widget.Widget {
218218
}
219219

220220
return html`<devtools-code-block
221-
.code=${input.changeSummary}
221+
.code=${input.changeSummary ?? ''}
222222
.codeLang=${'css'}
223223
.displayNotice=${true}
224224
></devtools-code-block>

0 commit comments

Comments
 (0)