chrome-devtools-frontend 1.0.1642899 → 1.0.1643099

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.
Files changed (93) hide show
  1. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  2. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +4 -5
  3. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  4. package/front_end/generated/protocol.ts +7 -0
  5. package/front_end/models/ai_assistance/AiAgent2.ts +23 -5
  6. package/front_end/models/ai_assistance/AiConversation.ts +15 -12
  7. package/front_end/models/ai_assistance/AiUtils.ts +71 -0
  8. package/front_end/models/ai_assistance/ChangeManager.ts +2 -5
  9. package/front_end/models/ai_assistance/{agents/ConversationSummaryAgent.ts → ConversationSummary.ts} +29 -66
  10. package/front_end/models/ai_assistance/ExtensionScope.ts +1 -4
  11. package/front_end/models/ai_assistance/{agents/PerformanceAnnotationsAgent.ts → PerformanceAnnotations.ts} +47 -89
  12. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +31 -21
  13. package/front_end/models/ai_assistance/agents/AiAgent.ts +21 -6
  14. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
  15. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +53 -3
  16. package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -0
  17. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +72 -79
  18. package/front_end/models/ai_assistance/agents/StorageAgent.ts +47 -38
  19. package/front_end/models/ai_assistance/agents/StylingAgent.ts +22 -21
  20. package/front_end/models/ai_assistance/ai_assistance.ts +6 -4
  21. package/front_end/models/ai_assistance/skills/styling.md +12 -4
  22. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +140 -0
  23. package/front_end/models/ai_assistance/tools/GetStyles.ts +6 -2
  24. package/front_end/models/ai_assistance/tools/Tool.ts +10 -1
  25. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
  26. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -7
  27. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +6 -7
  28. package/front_end/panels/ai_assistance/components/ChatMessage.ts +96 -4
  29. package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
  30. package/front_end/panels/application/components/AdsView.ts +219 -0
  31. package/front_end/panels/application/components/adsView.css +54 -0
  32. package/front_end/panels/application/components/components.ts +2 -0
  33. package/front_end/panels/console/SymbolizedErrorWidget.ts +73 -22
  34. package/front_end/panels/network/NetworkLogView.ts +5 -1
  35. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +5 -4
  36. package/front_end/third_party/chromium/README.chromium +1 -1
  37. package/front_end/third_party/lighthouse/README.chromium +2 -2
  38. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1607 -5733
  39. package/front_end/third_party/lighthouse/locales/ar-XB.json +290 -65
  40. package/front_end/third_party/lighthouse/locales/ar.json +290 -65
  41. package/front_end/third_party/lighthouse/locales/bg.json +290 -65
  42. package/front_end/third_party/lighthouse/locales/ca.json +295 -70
  43. package/front_end/third_party/lighthouse/locales/cs.json +290 -65
  44. package/front_end/third_party/lighthouse/locales/da.json +294 -69
  45. package/front_end/third_party/lighthouse/locales/de.json +295 -70
  46. package/front_end/third_party/lighthouse/locales/el.json +290 -65
  47. package/front_end/third_party/lighthouse/locales/en-GB.json +290 -65
  48. package/front_end/third_party/lighthouse/locales/en-US.json +79 -67
  49. package/front_end/third_party/lighthouse/locales/en-XA.json +253 -64
  50. package/front_end/third_party/lighthouse/locales/en-XL.json +79 -67
  51. package/front_end/third_party/lighthouse/locales/es-419.json +290 -65
  52. package/front_end/third_party/lighthouse/locales/es.json +298 -73
  53. package/front_end/third_party/lighthouse/locales/fi.json +290 -65
  54. package/front_end/third_party/lighthouse/locales/fil.json +290 -65
  55. package/front_end/third_party/lighthouse/locales/fr.json +294 -69
  56. package/front_end/third_party/lighthouse/locales/he.json +293 -68
  57. package/front_end/third_party/lighthouse/locales/hi.json +291 -66
  58. package/front_end/third_party/lighthouse/locales/hr.json +290 -65
  59. package/front_end/third_party/lighthouse/locales/hu.json +290 -65
  60. package/front_end/third_party/lighthouse/locales/id.json +290 -65
  61. package/front_end/third_party/lighthouse/locales/it.json +294 -69
  62. package/front_end/third_party/lighthouse/locales/ja.json +290 -65
  63. package/front_end/third_party/lighthouse/locales/ko.json +290 -65
  64. package/front_end/third_party/lighthouse/locales/lt.json +290 -65
  65. package/front_end/third_party/lighthouse/locales/lv.json +290 -65
  66. package/front_end/third_party/lighthouse/locales/nl.json +290 -65
  67. package/front_end/third_party/lighthouse/locales/no.json +290 -65
  68. package/front_end/third_party/lighthouse/locales/pl.json +290 -65
  69. package/front_end/third_party/lighthouse/locales/pt-PT.json +291 -66
  70. package/front_end/third_party/lighthouse/locales/pt.json +290 -65
  71. package/front_end/third_party/lighthouse/locales/ro.json +290 -65
  72. package/front_end/third_party/lighthouse/locales/ru.json +301 -76
  73. package/front_end/third_party/lighthouse/locales/sk.json +291 -66
  74. package/front_end/third_party/lighthouse/locales/sl.json +290 -65
  75. package/front_end/third_party/lighthouse/locales/sr-Latn.json +290 -65
  76. package/front_end/third_party/lighthouse/locales/sr.json +290 -65
  77. package/front_end/third_party/lighthouse/locales/sv.json +297 -72
  78. package/front_end/third_party/lighthouse/locales/ta.json +291 -66
  79. package/front_end/third_party/lighthouse/locales/te.json +293 -68
  80. package/front_end/third_party/lighthouse/locales/th.json +291 -66
  81. package/front_end/third_party/lighthouse/locales/tr.json +290 -65
  82. package/front_end/third_party/lighthouse/locales/uk.json +290 -65
  83. package/front_end/third_party/lighthouse/locales/vi.json +291 -66
  84. package/front_end/third_party/lighthouse/locales/zh-HK.json +292 -67
  85. package/front_end/third_party/lighthouse/locales/zh-TW.json +291 -66
  86. package/front_end/third_party/lighthouse/locales/zh.json +291 -66
  87. package/front_end/third_party/lighthouse/report/bundle.d.ts +6 -6
  88. package/front_end/third_party/lighthouse/report/bundle.js +4 -7
  89. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
  90. package/front_end/ui/legacy/Widget.ts +32 -8
  91. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  92. package/mcp/mcp.ts +1 -0
  93. package/package.json +1 -1
@@ -0,0 +1,219 @@
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 i18n from '../../../core/i18n/i18n.js';
6
+ import * as SDK from '../../../core/sdk/sdk.js';
7
+ import type * as Protocol from '../../../generated/protocol.js';
8
+ import * as UI from '../../../ui/legacy/legacy.js';
9
+ import * as Lit from '../../../ui/lit/lit.js';
10
+
11
+ import adsViewStyles from './adsView.css.js';
12
+
13
+ const {html} = Lit;
14
+
15
+ const UIStrings = {
16
+ /**
17
+ * @description Title for a metric showing the percentage of the viewport covered by ads.
18
+ */
19
+ viewportAdDensity: 'Viewport ad density',
20
+ /**
21
+ * @description Title for a metric showing the number of ads in the viewport.
22
+ */
23
+ viewportAdCount: 'Viewport ad count',
24
+ /**
25
+ * @description Title for a metric showing the total CPU usage by ads.
26
+ */
27
+ totalCpuUsage: 'Total CPU usage by ads',
28
+ /**
29
+ * @description Title for a metric showing the total network usage by ads.
30
+ */
31
+ totalNetworkUsage: 'Total network usage by ads',
32
+ /**
33
+ * @description Subtext showing the average value of a metric.
34
+ * @example {5.00%} PH1
35
+ */
36
+ average: '(Average: {PH1})',
37
+ } as const;
38
+
39
+ const str_ = i18n.i18n.registerUIStrings('panels/application/components/AdsView.ts', UIStrings);
40
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
41
+
42
+ export interface ViewInput {
43
+ metrics: Protocol.Ads.AdMetrics;
44
+ }
45
+
46
+ export type View = (input: ViewInput, output: undefined, target: HTMLElement|DocumentFragment) => void;
47
+
48
+ const DEFAULT_VIEW: View = (input, output, target) => {
49
+ const metrics = input.metrics;
50
+
51
+ const formatValue = (val: number, isPercentage: boolean): string => {
52
+ if (isPercentage) {
53
+ return new Intl
54
+ .NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {
55
+ style: 'percent',
56
+ maximumFractionDigits: 0,
57
+ })
58
+ .format(val / 100);
59
+ }
60
+ return new Intl.NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale).format(val);
61
+ };
62
+
63
+ const formatAverage = (val: number, isPercentage: boolean): string => {
64
+ if (isPercentage) {
65
+ return new Intl
66
+ .NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {
67
+ style: 'percent',
68
+ minimumFractionDigits: 2,
69
+ maximumFractionDigits: 2,
70
+ })
71
+ .format(val / 100);
72
+ }
73
+ return new Intl
74
+ .NumberFormat(i18n.DevToolsLocale.DevToolsLocale.instance().locale, {
75
+ minimumFractionDigits: 2,
76
+ maximumFractionDigits: 2,
77
+ })
78
+ .format(val);
79
+ };
80
+
81
+ const formatCpu = (val: number): string => {
82
+ return i18n.TimeUtilities.preciseMillisToString(val, 1);
83
+ };
84
+
85
+ const formatNetwork = (val: number): string => {
86
+ return i18n.ByteUtilities.bytesToString(val);
87
+ };
88
+
89
+ // clang-format off
90
+ Lit.render(html`
91
+ <style>${adsViewStyles}</style>
92
+ <dl class="metrics-container">
93
+ <div class="metric-box">
94
+ <dt class="metric-title">${i18nString(UIStrings.viewportAdDensity)}</dt>
95
+ <dd class="metric-value">
96
+ <span>${formatValue(metrics.viewportAdDensityByArea, true)}</span>
97
+ <span class="metric-average">${i18nString(UIStrings.average, {PH1: formatAverage(metrics.averageViewportAdDensityByArea, true)})}</span>
98
+ </dd>
99
+ </div>
100
+ <div class="metric-box">
101
+ <dt class="metric-title">${i18nString(UIStrings.viewportAdCount)}</dt>
102
+ <dd class="metric-value">
103
+ <span>${formatValue(metrics.viewportAdCount, false)}</span>
104
+ <span class="metric-average">${i18nString(UIStrings.average, {PH1: formatAverage(metrics.averageViewportAdCount, false)})}</span>
105
+ </dd>
106
+ </div>
107
+ <div class="metric-box">
108
+ <dt class="metric-title">${i18nString(UIStrings.totalCpuUsage)}</dt>
109
+ <dd class="metric-value">
110
+ <span>${formatCpu(metrics.totalAdCpuTime)}</span>
111
+ </dd>
112
+ </div>
113
+ <div class="metric-box">
114
+ <dt class="metric-title">${i18nString(UIStrings.totalNetworkUsage)}</dt>
115
+ <dd class="metric-value">
116
+ <span>${formatNetwork(metrics.totalAdNetworkBytes)}</span>
117
+ </dd>
118
+ </div>
119
+ </dl>
120
+ `, target);
121
+ // clang-format on
122
+ };
123
+
124
+ export class AdsView extends UI.Widget.Widget {
125
+ #currentMetrics: Protocol.Ads.AdMetrics;
126
+ #pollTimer?: number;
127
+ #isPolling = false;
128
+ #pollSessionId = 0;
129
+ #view: View;
130
+
131
+ constructor(view: View = DEFAULT_VIEW) {
132
+ super({useShadowDom: true});
133
+ this.#view = view;
134
+ this.#currentMetrics = {
135
+ viewportAdDensityByArea: 0,
136
+ averageViewportAdDensityByArea: 0,
137
+ viewportAdCount: 0,
138
+ averageViewportAdCount: 0,
139
+ totalAdCpuTime: 0,
140
+ totalAdNetworkBytes: 0,
141
+ };
142
+ this.requestUpdate();
143
+ }
144
+
145
+ override wasShown(): void {
146
+ super.wasShown();
147
+ this.#startPolling();
148
+ SDK.TargetManager.TargetManager.instance().addModelListener(SDK.ResourceTreeModel.ResourceTreeModel,
149
+ SDK.ResourceTreeModel.Events.PrimaryPageChanged,
150
+ this.#onPrimaryPageChanged, this);
151
+ }
152
+
153
+ override willHide(): void {
154
+ this.#stopPolling();
155
+ SDK.TargetManager.TargetManager.instance().removeModelListener(SDK.ResourceTreeModel.ResourceTreeModel,
156
+ SDK.ResourceTreeModel.Events.PrimaryPageChanged,
157
+ this.#onPrimaryPageChanged, this);
158
+ super.willHide();
159
+ }
160
+
161
+ #startPolling(): void {
162
+ if (this.#isPolling) {
163
+ return;
164
+ }
165
+ this.#isPolling = true;
166
+ this.#pollSessionId++;
167
+ void this.#pollMetrics(this.#pollSessionId);
168
+ }
169
+
170
+ #stopPolling(): void {
171
+ this.#isPolling = false;
172
+ if (this.#pollTimer !== undefined) {
173
+ window.clearTimeout(this.#pollTimer);
174
+ this.#pollTimer = undefined;
175
+ }
176
+ }
177
+
178
+ async #pollMetrics(sessionId: number): Promise<void> {
179
+ if (!this.#isPolling || this.#pollSessionId !== sessionId) {
180
+ return;
181
+ }
182
+ const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
183
+ if (target) {
184
+ const adsAgent = target.adsAgent();
185
+ if (adsAgent) {
186
+ const response = await adsAgent.invoke_getAdMetrics();
187
+ if (!this.#isPolling || this.#pollSessionId !== sessionId) {
188
+ return;
189
+ }
190
+ if (!response.getError()) {
191
+ this.#currentMetrics = response.metrics;
192
+ this.requestUpdate();
193
+ }
194
+ }
195
+ }
196
+ if (this.#isPolling && this.#pollSessionId === sessionId) {
197
+ this.#pollTimer = window.setTimeout(() => this.#pollMetrics(sessionId), 500);
198
+ }
199
+ }
200
+
201
+ #onPrimaryPageChanged(): void {
202
+ this.#currentMetrics = {
203
+ viewportAdDensityByArea: 0,
204
+ averageViewportAdDensityByArea: 0,
205
+ viewportAdCount: 0,
206
+ averageViewportAdCount: 0,
207
+ totalAdCpuTime: 0,
208
+ totalAdNetworkBytes: 0,
209
+ };
210
+ this.requestUpdate();
211
+ }
212
+
213
+ override performUpdate(): void {
214
+ const viewInput: ViewInput = {
215
+ metrics: this.#currentMetrics,
216
+ };
217
+ this.#view(viewInput, undefined, this.contentElement);
218
+ }
219
+ }
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Copyright 2026 The Chromium Authors
3
+ * Use of this source code is governed by a BSD-style license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ :host {
8
+ padding: 12px;
9
+ display: flex;
10
+ flex-direction: column;
11
+ overflow: auto;
12
+ }
13
+
14
+ .metrics-container {
15
+ flex: 0 0 auto;
16
+ margin: 0 0 24px;
17
+ border: 1px solid var(--sys-color-divider);
18
+ display: grid;
19
+ grid-template-columns: repeat(2, 1fr);
20
+ gap: 1px;
21
+ background-color: var(--sys-color-divider);
22
+ }
23
+
24
+ .metric-box {
25
+ background-color: var(--sys-color-surface);
26
+ padding: 12px;
27
+ display: flex;
28
+ flex-direction: column;
29
+ align-items: center;
30
+ justify-content: center;
31
+ }
32
+
33
+ .metric-title {
34
+ font-size: 12px;
35
+ color: var(--sys-color-on-surface-subtle);
36
+ margin: 0 0 4px;
37
+ }
38
+
39
+ .metric-value {
40
+ font-size: 18px;
41
+ font-weight: bold;
42
+ color: var(--sys-color-on-surface);
43
+ display: flex;
44
+ flex-direction: column;
45
+ align-items: center;
46
+ margin: 0;
47
+ gap: 2px;
48
+ }
49
+
50
+ .metric-average {
51
+ font-size: 12px;
52
+ font-weight: normal;
53
+ color: var(--sys-color-on-surface-subtle);
54
+ }
@@ -2,6 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import * as AdsView from './AdsView.js';
5
6
  import * as BackForwardCacheView from './BackForwardCacheView.js';
6
7
  import * as BounceTrackingMitigationsView from './BounceTrackingMitigationsView.js';
7
8
  import * as CrashReportContextGrid from './CrashReportContextGrid.js';
@@ -17,6 +18,7 @@ import * as StorageMetadataView from './StorageMetadataView.js';
17
18
  import * as TrustTokensView from './TrustTokensView.js';
18
19
 
19
20
  export {
21
+ AdsView,
20
22
  BackForwardCacheView,
21
23
  BounceTrackingMitigationsView,
22
24
  CrashReportContextGrid,
@@ -2,6 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import type * as Platform from '../../core/platform/platform.js';
5
6
  import * as Bindings from '../../models/bindings/bindings.js';
6
7
  import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
7
8
  import type * as Workspace from '../../models/workspace/workspace.js';
@@ -9,6 +10,8 @@ import * as Components from '../../ui/legacy/components/utils/utils.js';
9
10
  import * as UI from '../../ui/legacy/legacy.js';
10
11
  import * as Lit from '../../ui/lit/lit.js';
11
12
 
13
+ import {ConsoleViewMessage} from './ConsoleViewMessage.js';
14
+
12
15
  const {html, render} = Lit;
13
16
 
14
17
  export interface ViewInput {
@@ -24,20 +27,64 @@ function renderHeader(content: Lit.LitTemplate|Node|UI.Widget.Widget, isCause: b
24
27
  return html`<span class="error-message-text">${content}</span>`;
25
28
  }
26
29
 
27
- function renderFramePrefix(
28
- frame: StackTrace.StackTrace.ParsedErrorStackFrame,
29
- _options: Components.Linkifier.LinkifyOptions): Lit.LitTemplate {
30
+ function formatName(frame: StackTrace.StackTrace.ParsedErrorStackFrame): string {
31
+ let name = frame.name || '';
32
+ const isInline = Boolean(frame.rawName) && frame.name !== frame.rawName;
33
+ const shouldAppendMethodAlias = !isInline && frame.methodName && name && name !== frame.methodName &&
34
+ !name.endsWith('.' + frame.methodName) && !name.endsWith(' ' + frame.methodName);
35
+ if (shouldAppendMethodAlias) {
36
+ name += ` [as ${frame.methodName}]`;
37
+ }
38
+ return name;
39
+ }
40
+
41
+ function renderLinkElement(frame: StackTrace.StackTrace.ParsedErrorStackFrame,
42
+ options: Components.Linkifier.LinkifyOptions): HTMLElement|Lit.LitTemplate {
43
+ if (frame.url || frame.uiSourceCode) {
44
+ const link = Components.Linkifier.Linkifier.linkifyStackTraceFrame(frame, options);
45
+ link.tabIndex = -1;
46
+ return link;
47
+ }
48
+ return html`<span>&lt;anonymous&gt;</span>`;
49
+ }
50
+
51
+ function renderEvalOrigin(frame: StackTrace.StackTrace.ParsedErrorStackFrame,
52
+ options: Components.Linkifier.LinkifyOptions): Lit.LitTemplate {
53
+ const name = formatName(frame);
54
+ const linkElement = renderLinkElement(frame, options);
55
+
56
+ const asyncPrefix = frame.isAsync ? 'async ' : '';
57
+ const constructorPrefix = frame.isConstructor ? 'new ' : '';
58
+
59
+ if (frame.isEval) {
60
+ const evalOrigin = frame.evalOrigin ? renderEvalOrigin(frame.evalOrigin, options) : '<anonymous>';
61
+ if (name) {
62
+ return html`${asyncPrefix}${constructorPrefix}eval at ${name} (${evalOrigin})`;
63
+ }
64
+ return html`${asyncPrefix}${constructorPrefix}eval at ${evalOrigin}`;
65
+ }
66
+ if (name) {
67
+ return html`${asyncPrefix}${constructorPrefix}eval at ${name} (${linkElement})`;
68
+ }
69
+ return html`${asyncPrefix}${constructorPrefix}eval at ${linkElement}`;
70
+ }
71
+
72
+ function renderFramePrefix(frame: StackTrace.StackTrace.ParsedErrorStackFrame,
73
+ options: Components.Linkifier.LinkifyOptions): Lit.LitTemplate {
30
74
  const asyncPrefix = frame.isAsync ? 'async ' : '';
31
75
  if (frame.promiseIndex !== undefined) {
32
76
  const name = frame.name || 'Promise.all';
33
77
  return html`${asyncPrefix}${name} (index ${frame.promiseIndex})`;
34
78
  }
35
79
  const constructorPrefix = frame.isConstructor ? 'new ' : '';
36
- let name = frame.name || '';
37
- const isInline = Boolean(frame.rawName) && frame.name !== frame.rawName;
38
- if (!isInline && frame.methodName && name && name !== frame.methodName && !name.endsWith('.' + frame.methodName) &&
39
- !name.endsWith(' ' + frame.methodName)) {
40
- name += ` [as ${frame.methodName}]`;
80
+ const name = formatName(frame);
81
+
82
+ if (frame.isEval) {
83
+ const evalOrigin = frame.evalOrigin ? renderEvalOrigin(frame.evalOrigin, options) : '<anonymous>';
84
+ if (name) {
85
+ return html`${asyncPrefix}${constructorPrefix}${name} (${evalOrigin}, `;
86
+ }
87
+ return html`${asyncPrefix}${constructorPrefix}${evalOrigin}, `;
41
88
  }
42
89
 
43
90
  if (name) {
@@ -58,10 +105,25 @@ function renderFrameSuffix(frame: StackTrace.StackTrace.ParsedErrorStackFrame):
58
105
 
59
106
  const DEFAULT_VIEW = (input: ViewInput, _output: object, target: HTMLElement): void => {
60
107
  const renderError = (error: Bindings.SymbolizedError.SymbolizedError, isCause: boolean): Lit.LitTemplate => {
61
- if (!(error instanceof Bindings.SymbolizedError.SymbolizedErrorObject)) {
108
+ if (error instanceof Bindings.SymbolizedError.SymbolizedSyntaxError) {
62
109
  console.error('SymbolizedErrorWidget received an unsupported error type:', error);
63
110
  return Lit.nothing;
64
111
  }
112
+ if (error instanceof Bindings.SymbolizedError.UnparsableError) {
113
+ const fragment = ConsoleViewMessage.linkifyWithCustomLinkifier(
114
+ error.errorStack,
115
+ (text: string, url: Platform.DevToolsPath.UrlString, lineNumber?: number, columnNumber?: number) => {
116
+ const options = {text, lineNumber, columnNumber, ignoreListManager: input.ignoreListManager};
117
+ const linkElement = Components.Linkifier.Linkifier.linkifyURL(url, options);
118
+ linkElement.tabIndex = -1;
119
+ return linkElement;
120
+ });
121
+ const header = renderHeader(fragment, isCause);
122
+ return html`
123
+ <span class=${isCause ? 'console-message-stack-trace-wrapper' : ''}>${header}</span>
124
+ `;
125
+ }
126
+
65
127
  const linkOptions: Components.Linkifier.LinkifyOptions = {
66
128
  showColumnNumber: true,
67
129
  inlineFrameIndex: 0,
@@ -75,19 +137,8 @@ const DEFAULT_VIEW = (input: ViewInput, _output: object, target: HTMLElement): v
75
137
  return html`
76
138
  <span class=${isCause ? 'console-message-stack-trace-wrapper' : ''}
77
139
  >${header}${syncFrames.length > 0 ? '\n' : ''}${syncFrames.map((frame: StackTrace.StackTrace.ParsedErrorStackFrame, i: number) => {
78
- let linkElement: HTMLElement|Lit.LitTemplate = Lit.nothing;
79
- let isBuiltin = false;
80
- if (frame.promiseIndex !== undefined) {
81
- // Promise.all doesn't have a linkable location.
82
- isBuiltin = true;
83
- } else if (frame.url || frame.uiSourceCode) {
84
- const link = Components.Linkifier.Linkifier.linkifyStackTraceFrame(frame, linkOptions);
85
- link.tabIndex = -1;
86
- linkElement = link;
87
- } else {
88
- linkElement = html`<span>&lt;anonymous&gt;</span>`;
89
- isBuiltin = true;
90
- }
140
+ const isBuiltin = frame.promiseIndex !== undefined || (!frame.url && !frame.uiSourceCode);
141
+ const linkElement = frame.promiseIndex !== undefined ? Lit.nothing : renderLinkElement(frame, linkOptions);
91
142
 
92
143
  const newline = i < error.stackTrace.syncFragment.frames.length - 1 ? '\n' : '';
93
144
  const frameClass = isBuiltin ? 'formatted-builtin-stack-frame' : 'formatted-stack-frame';
@@ -2507,7 +2507,11 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
2507
2507
  // (it may be different from the inspected page platform).
2508
2508
  const escapeString = platform === 'win' ? escapeStringWin : escapeStringPosix;
2509
2509
 
2510
- command.push(escapeString(request.url()).replace(/[[{}\]]/g, '\\$&'));
2510
+ // The shell escaping above protects the *shell* parser, but not curl's own
2511
+ // argv parser: if the (HAR-imported) URL begins with '-', curl will parse
2512
+ // it as an option (e.g. "-K//host/share/file" -> --config UNC path).
2513
+ // Passing the URL via --url forces curl to treat it as a URL operand.
2514
+ command.push('--url ' + escapeString(request.url()).replace(/[[{}\]]/g, '\\$&'));
2511
2515
 
2512
2516
  let inferredMethod = 'GET';
2513
2517
  const data = [];
@@ -194,7 +194,7 @@ export class EntryLabelOverlay extends HTMLElement {
194
194
  #callTree: AiAssistanceModels.AICallTree.AICallTree|null = null;
195
195
  // Creates or gets the setting if it exists.
196
196
  #aiAnnotationsEnabledSetting = Common.Settings.Settings.instance().createSetting('ai-annotations-enabled', false);
197
- #agent = new AiAssistanceModels.PerformanceAnnotationsAgent.PerformanceAnnotationsAgent({
197
+ #performanceAnnotations = new AiAssistanceModels.PerformanceAnnotations.PerformanceAnnotations({
198
198
  aidaClient: new Host.AidaClient.AidaClient(),
199
199
  serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
200
200
  });
@@ -254,8 +254,9 @@ export class EntryLabelOverlay extends HTMLElement {
254
254
  /**
255
255
  * So we can provide a mocked agent in tests. Do not call this method outside of a test!
256
256
  */
257
- overrideAIAgentForTest(agent: AiAssistanceModels.PerformanceAnnotationsAgent.PerformanceAnnotationsAgent): void {
258
- this.#agent = agent;
257
+ overridePerformanceAnnotationsForTest(performanceAnnotations:
258
+ AiAssistanceModels.PerformanceAnnotations.PerformanceAnnotations): void {
259
+ this.#performanceAnnotations = performanceAnnotations;
259
260
  }
260
261
 
261
262
  entryHighlightWrapper(): HTMLElement|null {
@@ -534,7 +535,7 @@ export class EntryLabelOverlay extends HTMLElement {
534
535
  this.#focusInputBox();
535
536
  void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
536
537
 
537
- this.#label = await this.#agent.generateAIEntryLabel(this.#callTree);
538
+ this.#label = await this.#performanceAnnotations.generateAIEntryLabel(this.#callTree);
538
539
  this.dispatchEvent(new EntryLabelChangeEvent(this.#label));
539
540
  this.#inputField.innerText = this.#label;
540
541
  this.#placeCursorAtInputEnd();
@@ -1,7 +1,7 @@
1
1
  Name: Dependencies sourced from the upstream `chromium` repository
2
2
  URL: Internal
3
3
  Version: N/A
4
- Revision: 2d046db188ecad76b2859f8baeb9685cb8fe9c08
4
+ Revision: e1605f15bac37245745e5fb8327995ededbe2337
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1,7 +1,7 @@
1
1
  Name: Lighthouse
2
2
  Short Name: lighthouse
3
- Version: 13.3.0
4
- Revision: 7d8dcf5004950cad3faa20664e4a7cf2817bd653
3
+ Version: 13.4.0
4
+ Revision: cb79bea56c4668fd7a338f2f421f87754ee927a2
5
5
  Update Mechanism: Manual
6
6
  URL: https://github.com/GoogleChrome/lighthouse
7
7
  License: Apache-2.0