Skip to content

Commit 4b5199b

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
Some small improvements for AI Assistance
This are small issue found regarding the panel, that help it feel more natural. Bug: none Change-Id: Ia74195aa0f80bf414338bf8fe1d0b5c98d154e40 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7594830 Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
1 parent 9f2943a commit 4b5199b

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

front_end/panels/ai_assistance/AiAssistancePanel.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,8 +1426,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
14261426
// Cancel any previous in-flight conversation.
14271427
this.#cancel();
14281428
const signal = this.#runAbortController.signal;
1429-
const context = this.#getConversationContext(this.#conversation.type);
1430-
this.#conversation.setContext(context);
14311429

14321430
// If a different context is provided, it must be from the same origin.
14331431
if (this.#conversation.isBlockedByOrigin) {

front_end/panels/ai_assistance/components/ChatInput.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
202202
jslog=${VisualLogging.link('open-ai-settings').track({
203203
click: true,
204204
})}
205-
@click=${() => {
205+
@click=${(ev: Event) => {
206+
ev.preventDefault();
206207
void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
207208
}}
208209
>${lockedString('Relevant data')}</button>&nbsp;${lockedString('is sent to Google')}

front_end/panels/network/NetworkDataGridNode.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,10 @@ export class NetworkRequestNode extends NetworkNode {
16211621
this.select();
16221622
void action.execute();
16231623
}, {capture: true});
1624+
// We need this as else the images get open under it.
1625+
floatingButton.addEventListener('dblclick', ev => {
1626+
ev.stopPropagation();
1627+
}, {capture: true});
16241628
floatingButton.addEventListener('mousedown', ev => {
16251629
ev.stopPropagation();
16261630
}, {capture: true});

0 commit comments

Comments
 (0)