chrome-devtools-frontend 1.0.1621678 → 1.0.1624409
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/foundation-test-migration/SKILL.md +171 -0
- package/.agents/skills/verification/SKILL.md +2 -11
- package/front_end/Images/src/expand.svg +1 -0
- package/front_end/core/common/Base64.ts +12 -2
- package/front_end/core/i18n/i18nImpl.ts +8 -4
- package/front_end/core/root/Runtime.ts +28 -9
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +1 -1
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +72 -8
- package/front_end/entrypoints/greendev_floaty/floaty.html +1 -1
- package/front_end/entrypoints/shell/shell.ts +1 -1
- package/front_end/generated/Deprecation.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.js +6 -6
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +373 -112
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +57 -0
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -4
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +295 -45
- package/front_end/panels/console/ConsoleView.ts +86 -7
- package/front_end/panels/console/ConsoleViewMessage.ts +23 -1
- package/front_end/panels/console/SymbolizedErrorWidget.ts +69 -0
- package/front_end/panels/console/console.ts +3 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +17 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +189 -132
- package/front_end/panels/emulation/deviceModeView.css +25 -0
- package/front_end/panels/greendev/GreenDevPanel.ts +30 -3
- package/front_end/panels/media/EventDisplayTable.ts +1 -1
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +48 -27
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +67 -38
- package/front_end/panels/network/NetworkConfigView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -22
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +12 -4
- package/front_end/panels/timeline/components/liveMetricsView.css +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/{core → ui}/dom_extension/DOMExtension.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +26 -4
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +19 -0
- package/package.json +1 -1
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +0 -134
- package/front_end/panels/emulation/components/components.ts +0 -9
- /package/front_end/{core → ui}/dom_extension/dom_extension.ts +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Bindings from '../../models/bindings/bindings.js';
|
|
6
|
+
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
7
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
|
+
|
|
9
|
+
export interface ViewInput {
|
|
10
|
+
error: Bindings.SymbolizedError.SymbolizedError;
|
|
11
|
+
ignoreListManager?: Workspace.IgnoreListManager.IgnoreListManager;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const DEFAULT_VIEW = (_input: ViewInput, _output: object, _target: HTMLElement): void => {};
|
|
15
|
+
|
|
16
|
+
export class SymbolizedErrorWidget extends UI.Widget.Widget {
|
|
17
|
+
#error?: Bindings.SymbolizedError.SymbolizedError;
|
|
18
|
+
#view: typeof DEFAULT_VIEW;
|
|
19
|
+
#ignoreListManager?: Workspace.IgnoreListManager.IgnoreListManager;
|
|
20
|
+
|
|
21
|
+
constructor(element?: HTMLElement, view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
|
|
22
|
+
super(element);
|
|
23
|
+
this.#view = view;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
set ignoreListManager(ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager) {
|
|
27
|
+
this.#ignoreListManager = ignoreListManager;
|
|
28
|
+
this.requestUpdate();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
get ignoreListManager(): Workspace.IgnoreListManager.IgnoreListManager|undefined {
|
|
32
|
+
return this.#ignoreListManager;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
set error(error: Bindings.SymbolizedError.SymbolizedError) {
|
|
36
|
+
this.#error?.removeEventListener(Bindings.SymbolizedError.Events.UPDATED, this.requestUpdate, this);
|
|
37
|
+
this.#error = error;
|
|
38
|
+
if (this.isShowing()) {
|
|
39
|
+
this.#error?.addEventListener(Bindings.SymbolizedError.Events.UPDATED, this.requestUpdate, this);
|
|
40
|
+
}
|
|
41
|
+
this.requestUpdate();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
get error(): Bindings.SymbolizedError.SymbolizedError|undefined {
|
|
45
|
+
return this.#error;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
override wasShown(): void {
|
|
49
|
+
super.wasShown();
|
|
50
|
+
this.#error?.addEventListener(Bindings.SymbolizedError.Events.UPDATED, this.requestUpdate, this);
|
|
51
|
+
this.requestUpdate();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
override willHide(): void {
|
|
55
|
+
super.willHide();
|
|
56
|
+
this.#error?.removeEventListener(Bindings.SymbolizedError.Events.UPDATED, this.requestUpdate, this);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
override performUpdate(): void {
|
|
60
|
+
if (!this.#error) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const input: ViewInput = {
|
|
64
|
+
error: this.#error,
|
|
65
|
+
ignoreListManager: this.#ignoreListManager,
|
|
66
|
+
};
|
|
67
|
+
this.#view(input, {}, this.contentElement);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -13,6 +13,7 @@ import './ConsoleViewMessage.js';
|
|
|
13
13
|
import './ConsolePrompt.js';
|
|
14
14
|
import './ConsoleView.js';
|
|
15
15
|
import './ConsolePanel.js';
|
|
16
|
+
import './SymbolizedErrorWidget.js';
|
|
16
17
|
import './PromptBuilder.js';
|
|
17
18
|
|
|
18
19
|
import * as ConsoleContextSelector from './ConsoleContextSelector.js';
|
|
@@ -27,6 +28,7 @@ import * as ConsoleView from './ConsoleView.js';
|
|
|
27
28
|
import * as ConsoleViewMessage from './ConsoleViewMessage.js';
|
|
28
29
|
import * as ConsoleViewport from './ConsoleViewport.js';
|
|
29
30
|
import * as PromptBuilder from './PromptBuilder.js';
|
|
31
|
+
import * as SymbolizedErrorWidget from './SymbolizedErrorWidget.js';
|
|
30
32
|
|
|
31
33
|
export {
|
|
32
34
|
ConsoleContextSelector,
|
|
@@ -41,4 +43,5 @@ export {
|
|
|
41
43
|
ConsoleViewMessage,
|
|
42
44
|
ConsoleViewport,
|
|
43
45
|
PromptBuilder,
|
|
46
|
+
SymbolizedErrorWidget,
|
|
44
47
|
};
|
|
@@ -907,8 +907,7 @@ export class StylePropertiesSection {
|
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
909
909
|
const sourceTreeElement = this.closestPropertyForEditing(this.#activeAiSuggestion.cssProperty.index);
|
|
910
|
-
if (!(sourceTreeElement instanceof StylePropertyTreeElement)
|
|
911
|
-
sourceTreeElement.property !== this.#activeAiSuggestion.cssProperty) {
|
|
910
|
+
if (!(sourceTreeElement instanceof StylePropertyTreeElement)) {
|
|
912
911
|
return;
|
|
913
912
|
}
|
|
914
913
|
return sourceTreeElement;
|
|
@@ -3515,7 +3515,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3515
3515
|
if (this.prompt) {
|
|
3516
3516
|
this.prompt.detach();
|
|
3517
3517
|
this.prompt = null;
|
|
3518
|
-
this
|
|
3518
|
+
this.section().activeAiSuggestion = undefined;
|
|
3519
3519
|
}
|
|
3520
3520
|
}
|
|
3521
3521
|
|
|
@@ -55,9 +55,13 @@ export class StylesAiCodeCompletionProvider {
|
|
|
55
55
|
// early return as this means that code completion was previously setup
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
+
// Adding '}' as a stop sequence so that suggestion is limited to properties for a given style section
|
|
59
|
+
const stopSequences = ['}'];
|
|
60
|
+
if (this.#aiCodeCompletionConfig.completionContext.stopSequences) {
|
|
61
|
+
stopSequences.push(...this.#aiCodeCompletionConfig.completionContext.stopSequences);
|
|
62
|
+
}
|
|
58
63
|
this.#aiCodeCompletion = new AiCodeCompletion.AiCodeCompletion.AiCodeCompletion(
|
|
59
|
-
{aidaClient: this.#aidaClient}, this.#aiCodeCompletionConfig.panel, undefined,
|
|
60
|
-
this.#aiCodeCompletionConfig.completionContext.stopSequences);
|
|
64
|
+
{aidaClient: this.#aidaClient}, this.#aiCodeCompletionConfig.panel, undefined, stopSequences);
|
|
61
65
|
this.#aiCodeCompletionConfig.onFeatureEnabled();
|
|
62
66
|
}
|
|
63
67
|
|
|
@@ -1918,14 +1918,18 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
1918
1918
|
return;
|
|
1919
1919
|
}
|
|
1920
1920
|
break;
|
|
1921
|
-
case 'Enter':
|
|
1921
|
+
case 'Enter': {
|
|
1922
1922
|
if (keyboardEvent.shiftKey) {
|
|
1923
1923
|
return;
|
|
1924
1924
|
}
|
|
1925
1925
|
// Accept any available autocompletions and advance to the next field.
|
|
1926
|
-
this.tabKeyPressed();
|
|
1926
|
+
const handled = this.tabKeyPressed();
|
|
1927
|
+
if (this.aiCodeCompletionProvider && handled) {
|
|
1928
|
+
event.consume(true);
|
|
1929
|
+
}
|
|
1927
1930
|
keyboardEvent.preventDefault();
|
|
1928
1931
|
return;
|
|
1932
|
+
}
|
|
1929
1933
|
case 'Escape':
|
|
1930
1934
|
if (this.#handleEscape(keyboardEvent)) {
|
|
1931
1935
|
return;
|
|
@@ -2264,9 +2268,18 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
2264
2268
|
if (!this.queryRange) {
|
|
2265
2269
|
this.queryRange = new TextUtils.TextRange.TextRange(0, 0, 0, this.text().length);
|
|
2266
2270
|
}
|
|
2271
|
+
|
|
2272
|
+
const properties = this.#getAiSuggestedProperties(args.text);
|
|
2273
|
+
if (properties.length === 0) {
|
|
2274
|
+
this.treeElement.section().activeAiSuggestion = undefined;
|
|
2275
|
+
this.activeAiSuggestionInfo = undefined;
|
|
2276
|
+
return;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
const styleText = properties.map(p => `${p.name}: ${p.value};`).join(' ');
|
|
2267
2280
|
this.treeElement.section().activeAiSuggestion = {
|
|
2268
|
-
text:
|
|
2269
|
-
properties
|
|
2281
|
+
text: styleText,
|
|
2282
|
+
properties,
|
|
2270
2283
|
cursorPosition: args.from,
|
|
2271
2284
|
clearCachedRequest: args.clearCachedRequest,
|
|
2272
2285
|
cssProperty: this.treeElement.property,
|