chrome-devtools-frontend 1.0.1642845 → 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.
- package/SECURITY.md +1 -0
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +55 -26
- package/front_end/core/sdk/CSSRule.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +4 -3
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +4 -3
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +4 -5
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +7 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +100 -18
- package/front_end/models/ai_assistance/AiConversation.ts +18 -14
- package/front_end/models/ai_assistance/AiUtils.ts +71 -0
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -5
- package/front_end/models/ai_assistance/{agents/ConversationSummaryAgent.ts → ConversationSummary.ts} +29 -66
- package/front_end/models/ai_assistance/ExtensionScope.ts +1 -4
- package/front_end/models/ai_assistance/{agents/PerformanceAnnotationsAgent.ts → PerformanceAnnotations.ts} +47 -89
- package/front_end/models/ai_assistance/README.md +8 -0
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +65 -40
- package/front_end/models/ai_assistance/agents/AiAgent.ts +37 -6
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +55 -5
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +119 -78
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +47 -38
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -25
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +46 -326
- package/front_end/models/ai_assistance/ai_assistance.ts +14 -4
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.snapshot.txt +51 -0
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +200 -0
- package/front_end/models/ai_assistance/skills/styling.md +44 -2
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +140 -0
- package/front_end/models/ai_assistance/tools/GetStyles.ts +141 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +64 -0
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +36 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -7
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +5 -0
- package/front_end/models/live-metrics/LiveMetrics.ts +24 -13
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +2 -2
- package/front_end/models/stack_trace/StackTrace.ts +4 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +9 -2
- package/front_end/models/stack_trace/StackTraceModel.ts +17 -4
- package/front_end/models/stack_trace/Trie.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +16 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +96 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
- package/front_end/panels/application/DOMStorageItemsView.ts +4 -0
- package/front_end/panels/application/KeyValueStorageItemsView.ts +39 -7
- package/front_end/panels/application/components/AdsView.ts +219 -0
- package/front_end/panels/application/components/adsView.css +54 -0
- package/front_end/panels/application/components/components.ts +2 -0
- package/front_end/panels/common/ExtensionServer.ts +26 -15
- package/front_end/panels/console/SymbolizedErrorWidget.ts +73 -22
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +8 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +4 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -5
- package/front_end/panels/elements/StylesContainer.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -4
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +106 -132
- package/front_end/panels/lighthouse/LighthousePanel.ts +4 -3
- package/front_end/panels/network/NetworkLogView.ts +8 -1
- package/front_end/panels/network/networkLogView.css +0 -15
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +5 -4
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1607 -5733
- package/front_end/third_party/lighthouse/locales/ar-XB.json +290 -65
- package/front_end/third_party/lighthouse/locales/ar.json +290 -65
- package/front_end/third_party/lighthouse/locales/bg.json +290 -65
- package/front_end/third_party/lighthouse/locales/ca.json +295 -70
- package/front_end/third_party/lighthouse/locales/cs.json +290 -65
- package/front_end/third_party/lighthouse/locales/da.json +294 -69
- package/front_end/third_party/lighthouse/locales/de.json +295 -70
- package/front_end/third_party/lighthouse/locales/el.json +290 -65
- package/front_end/third_party/lighthouse/locales/en-GB.json +290 -65
- package/front_end/third_party/lighthouse/locales/en-US.json +79 -67
- package/front_end/third_party/lighthouse/locales/en-XA.json +253 -64
- package/front_end/third_party/lighthouse/locales/en-XL.json +79 -67
- package/front_end/third_party/lighthouse/locales/es-419.json +290 -65
- package/front_end/third_party/lighthouse/locales/es.json +298 -73
- package/front_end/third_party/lighthouse/locales/fi.json +290 -65
- package/front_end/third_party/lighthouse/locales/fil.json +290 -65
- package/front_end/third_party/lighthouse/locales/fr.json +294 -69
- package/front_end/third_party/lighthouse/locales/he.json +293 -68
- package/front_end/third_party/lighthouse/locales/hi.json +291 -66
- package/front_end/third_party/lighthouse/locales/hr.json +290 -65
- package/front_end/third_party/lighthouse/locales/hu.json +290 -65
- package/front_end/third_party/lighthouse/locales/id.json +290 -65
- package/front_end/third_party/lighthouse/locales/it.json +294 -69
- package/front_end/third_party/lighthouse/locales/ja.json +290 -65
- package/front_end/third_party/lighthouse/locales/ko.json +290 -65
- package/front_end/third_party/lighthouse/locales/lt.json +290 -65
- package/front_end/third_party/lighthouse/locales/lv.json +290 -65
- package/front_end/third_party/lighthouse/locales/nl.json +290 -65
- package/front_end/third_party/lighthouse/locales/no.json +290 -65
- package/front_end/third_party/lighthouse/locales/pl.json +290 -65
- package/front_end/third_party/lighthouse/locales/pt-PT.json +291 -66
- package/front_end/third_party/lighthouse/locales/pt.json +290 -65
- package/front_end/third_party/lighthouse/locales/ro.json +290 -65
- package/front_end/third_party/lighthouse/locales/ru.json +301 -76
- package/front_end/third_party/lighthouse/locales/sk.json +291 -66
- package/front_end/third_party/lighthouse/locales/sl.json +290 -65
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +290 -65
- package/front_end/third_party/lighthouse/locales/sr.json +290 -65
- package/front_end/third_party/lighthouse/locales/sv.json +297 -72
- package/front_end/third_party/lighthouse/locales/ta.json +291 -66
- package/front_end/third_party/lighthouse/locales/te.json +293 -68
- package/front_end/third_party/lighthouse/locales/th.json +291 -66
- package/front_end/third_party/lighthouse/locales/tr.json +290 -65
- package/front_end/third_party/lighthouse/locales/uk.json +290 -65
- package/front_end/third_party/lighthouse/locales/vi.json +291 -66
- package/front_end/third_party/lighthouse/locales/zh-HK.json +292 -67
- package/front_end/third_party/lighthouse/locales/zh-TW.json +291 -66
- package/front_end/third_party/lighthouse/locales/zh.json +291 -66
- package/front_end/third_party/lighthouse/report/bundle.d.ts +6 -6
- package/front_end/third_party/lighthouse/report/bundle.js +4 -7
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
- package/front_end/ui/legacy/Widget.ts +32 -8
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +36 -3
- package/front_end/ui/legacy/components/data_grid/dataGridAiButton.css +20 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +19 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
|
@@ -2661,10 +2661,11 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2661
2661
|
return container;
|
|
2662
2662
|
}
|
|
2663
2663
|
|
|
2664
|
-
#getLinkableFunction(
|
|
2665
|
-
|
|
2664
|
+
#getLinkableFunction(
|
|
2665
|
+
functionName: string, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
|
2666
|
+
property: SDK.CSSProperty.CSSProperty): InlineEditor.LinkSwatch.LinkSwatch {
|
|
2666
2667
|
const swatch = new InlineEditor.LinkSwatch.LinkSwatch();
|
|
2667
|
-
const registeredFunction = matchedStyles.getRegisteredFunction(functionName);
|
|
2668
|
+
const {registeredFunction, treeScopeDistance} = matchedStyles.getRegisteredFunction(functionName, property);
|
|
2668
2669
|
const isDefined = Boolean(registeredFunction);
|
|
2669
2670
|
swatch.data = {
|
|
2670
2671
|
jslogContext: 'css-function',
|
|
@@ -2675,7 +2676,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2675
2676
|
if (!registeredFunction) {
|
|
2676
2677
|
return;
|
|
2677
2678
|
}
|
|
2678
|
-
this.#stylesContainer.jumpToFunctionDefinition(registeredFunction);
|
|
2679
|
+
this.#stylesContainer.jumpToFunctionDefinition(registeredFunction, treeScopeDistance);
|
|
2679
2680
|
},
|
|
2680
2681
|
};
|
|
2681
2682
|
return swatch;
|
|
@@ -2696,7 +2697,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2696
2697
|
const tooltipId = this.getTooltipId(`${functionName}-trace`);
|
|
2697
2698
|
// clang-format off
|
|
2698
2699
|
return html`
|
|
2699
|
-
<span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName.startsWith('--') ? this.#getLinkableFunction(functionName, matchedStyles) : functionName}</span>
|
|
2700
|
+
<span tabIndex=-1 class=tracing-anchor aria-details=${tooltipId}>${functionName.startsWith('--') ? this.#getLinkableFunction(functionName, matchedStyles, context.property) : functionName}</span>
|
|
2700
2701
|
<devtools-tooltip
|
|
2701
2702
|
id=${tooltipId}
|
|
2702
2703
|
use-hotkey
|
|
@@ -37,7 +37,7 @@ export interface StylesContainer {
|
|
|
37
37
|
computedValue: string|null): ElementsComponents.CSSVariableValueView.CSSVariableValueView;
|
|
38
38
|
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, variableName: string):
|
|
39
39
|
ElementsComponents.CSSVariableValueView.CSSVariableParserError|null;
|
|
40
|
-
jumpToFunctionDefinition(functionName: string): void;
|
|
40
|
+
jumpToFunctionDefinition(functionName: string, treeScopeDistance: number): void;
|
|
41
41
|
continueEditingElement(sectionIndex: number, propertyIndex: number): void;
|
|
42
42
|
revealProperty(cssProperty: SDK.CSSProperty.CSSProperty): void;
|
|
43
43
|
resetFocus(): void;
|
|
@@ -344,16 +344,16 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
jumpToSection(sectionName: string, blockName: string): void {
|
|
348
|
-
this.decorator.findAndHighlightSection(sectionName, blockName);
|
|
347
|
+
jumpToSection(sectionName: string, blockName: string, treeScopeDistance?: number): void {
|
|
348
|
+
this.decorator.findAndHighlightSection(sectionName, blockName, treeScopeDistance);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
jumpToSectionBlock(section: string): void {
|
|
352
352
|
this.decorator.findAndHighlightSectionBlock(section);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
jumpToFunctionDefinition(functionName: string): void {
|
|
356
|
-
this.jumpToSection(functionName, FUNCTION_SECTION_NAME);
|
|
355
|
+
jumpToFunctionDefinition(functionName: string, treeScopeDistance: number): void {
|
|
356
|
+
this.jumpToSection(functionName, FUNCTION_SECTION_NAME, treeScopeDistance);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
jumpToFontPaletteDefinition(paletteName: string): void {
|
|
@@ -11,9 +11,13 @@ import type * as SDK from '../../core/sdk/sdk.js';
|
|
|
11
11
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
13
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
|
+
import * as Lit from '../../ui/lit/lit.js';
|
|
14
15
|
|
|
15
16
|
import paintProfilerStyles from './paintProfiler.css.js';
|
|
16
17
|
|
|
18
|
+
const {html, render, nothing} = Lit;
|
|
19
|
+
const {repeat} = Lit.Directives;
|
|
20
|
+
|
|
17
21
|
const UIStrings = {
|
|
18
22
|
/**
|
|
19
23
|
* @description Text to indicate the progress of a profile
|
|
@@ -397,161 +401,131 @@ export interface EventTypes {
|
|
|
397
401
|
[Events.WINDOW_CHANGED]: void;
|
|
398
402
|
}
|
|
399
403
|
|
|
400
|
-
export
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
private readonly treeItemCache: Map<SDK.PaintProfiler.PaintProfilerLogItem, LogTreeElement>;
|
|
404
|
-
private selectionWindow?: {left: number, right: number}|null;
|
|
405
|
-
constructor() {
|
|
406
|
-
super();
|
|
407
|
-
this.setMinimumSize(100, 25);
|
|
408
|
-
this.element.classList.add('overflow-auto');
|
|
409
|
-
|
|
410
|
-
this.treeOutline = new UI.TreeOutline.TreeOutlineInShadow();
|
|
411
|
-
UI.ARIAUtils.setLabel(this.treeOutline.contentElement, i18nString(UIStrings.commandLog));
|
|
412
|
-
this.element.appendChild(this.treeOutline.element);
|
|
413
|
-
this.setDefaultFocusedElement(this.treeOutline.contentElement);
|
|
414
|
-
|
|
415
|
-
this.log = [];
|
|
416
|
-
this.treeItemCache = new Map();
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
setCommandLog(log: SDK.PaintProfiler.PaintProfilerLogItem[]): void {
|
|
420
|
-
this.log = log;
|
|
404
|
+
export interface CommandLogViewInput {
|
|
405
|
+
visibleLogItems: SDK.PaintProfiler.PaintProfilerLogItem[];
|
|
406
|
+
}
|
|
421
407
|
|
|
422
|
-
|
|
408
|
+
function paramToString(param: SDK.PaintProfiler.RawPaintProfilerLogItemParamValue, name: string): string {
|
|
409
|
+
if (typeof param !== 'object') {
|
|
410
|
+
return typeof param === 'string' && param.length > 100 ? name : JSON.stringify(param);
|
|
423
411
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
|
|
412
|
+
let str = '';
|
|
413
|
+
let keyCount = 0;
|
|
414
|
+
for (const key in param) {
|
|
415
|
+
const paramKey = param[key];
|
|
416
|
+
if (++keyCount > 4 || typeof paramKey === 'object' || (typeof paramKey === 'string' && paramKey.length > 100)) {
|
|
417
|
+
return name;
|
|
418
|
+
}
|
|
419
|
+
if (str) {
|
|
420
|
+
str += ', ';
|
|
432
421
|
}
|
|
433
|
-
|
|
422
|
+
str += paramKey;
|
|
434
423
|
}
|
|
424
|
+
return str;
|
|
425
|
+
}
|
|
435
426
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
427
|
+
function paramsToString(params: SDK.PaintProfiler.RawPaintProfilerLogItemParams|null): string {
|
|
428
|
+
let str = '';
|
|
429
|
+
for (const key in params) {
|
|
430
|
+
if (str) {
|
|
431
|
+
str += ', ';
|
|
432
|
+
}
|
|
433
|
+
str += paramToString(params[key], key);
|
|
439
434
|
}
|
|
435
|
+
return str;
|
|
436
|
+
}
|
|
440
437
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
438
|
+
function renderProperty(name: string, value: SDK.PaintProfiler.RawPaintProfilerLogItemParamValue): Lit.LitTemplate {
|
|
439
|
+
const isObject = value !== null && typeof value === 'object';
|
|
440
|
+
|
|
441
|
+
// clang-format off
|
|
442
|
+
return html`
|
|
443
|
+
<li role="treeitem">
|
|
444
|
+
<span>${name}: </span>${
|
|
445
|
+
isObject ? html`
|
|
446
|
+
<ul role="group">
|
|
447
|
+
${Object.entries(value).map(([key, val]) => renderProperty(key, val))}
|
|
448
|
+
</ul>` : html`
|
|
449
|
+
<span>${JSON.stringify(value)}</span>`
|
|
451
450
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
const child = root.lastChild() as LogTreeElement;
|
|
456
|
-
if (!child || child.logItem.commandIndex < this.selectionWindow.right) {
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
459
|
-
root.removeChildAtIndex(root.children().length - 1);
|
|
460
|
-
}
|
|
461
|
-
for (let i = this.selectionWindow.left, right = this.selectionWindow.right; i < right; ++i) {
|
|
462
|
-
this.appendLogItem(this.log[i]);
|
|
463
|
-
}
|
|
464
|
-
return Promise.resolve();
|
|
465
|
-
}
|
|
451
|
+
</li>
|
|
452
|
+
`;
|
|
453
|
+
// clang-format on
|
|
466
454
|
}
|
|
467
455
|
|
|
468
|
-
|
|
469
|
-
|
|
456
|
+
function renderLogItem(logItem: SDK.PaintProfiler.PaintProfilerLogItem): Lit.LitTemplate {
|
|
457
|
+
const hasParams = Boolean(logItem.params && Object.keys(logItem.params).length > 0);
|
|
458
|
+
const titleText = logItem.method + '(' + paramsToString(logItem.params) + ')';
|
|
459
|
+
|
|
460
|
+
// clang-format off
|
|
461
|
+
return html`
|
|
462
|
+
<li role="treeitem">
|
|
463
|
+
${titleText}
|
|
464
|
+
${hasParams ? html`
|
|
465
|
+
<ul role="group">
|
|
466
|
+
${Object.entries(logItem.params || {}).map(([key, val]) => renderProperty(key, val))}
|
|
467
|
+
</ul>` : nothing}
|
|
468
|
+
</li>
|
|
469
|
+
`;
|
|
470
|
+
// clang-format on
|
|
471
|
+
}
|
|
470
472
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
473
|
+
// clang-format off
|
|
474
|
+
export const COMMAND_LOG_DEFAULT_VIEW = (input: CommandLogViewInput, _output: undefined, target: HTMLElement): void => {
|
|
475
|
+
render(html`
|
|
476
|
+
<div class="overflow-auto flex-auto vbox">
|
|
477
|
+
<devtools-tree
|
|
478
|
+
autofocus
|
|
479
|
+
aria-label=${i18nString(UIStrings.commandLog)}
|
|
480
|
+
.template=${html`
|
|
481
|
+
<ul role="tree">
|
|
482
|
+
${repeat(input.visibleLogItems,
|
|
483
|
+
item => item.commandIndex,
|
|
484
|
+
item => renderLogItem(item))}
|
|
485
|
+
</ul>`}>
|
|
486
|
+
</devtools-tree>
|
|
487
|
+
</div>`,
|
|
488
|
+
target);
|
|
489
|
+
};
|
|
490
|
+
// clang-format on
|
|
491
|
+
|
|
492
|
+
type CommandLogView = typeof COMMAND_LOG_DEFAULT_VIEW;
|
|
475
493
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
}
|
|
494
|
+
export class PaintProfilerCommandLogView extends UI.Widget.VBox {
|
|
495
|
+
private log: SDK.PaintProfiler.PaintProfilerLogItem[];
|
|
496
|
+
private selectionWindow?: {left: number, right: number}|null;
|
|
497
|
+
readonly #view: CommandLogView;
|
|
479
498
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
499
|
+
constructor(element?: HTMLElement, view: CommandLogView = COMMAND_LOG_DEFAULT_VIEW) {
|
|
500
|
+
super(element);
|
|
501
|
+
this.#view = view;
|
|
502
|
+
this.setMinimumSize(100, 25);
|
|
485
503
|
|
|
486
|
-
|
|
487
|
-
if (typeof param !== 'object') {
|
|
488
|
-
return typeof param === 'string' && param.length > 100 ? name : JSON.stringify(param);
|
|
489
|
-
}
|
|
490
|
-
let str = '';
|
|
491
|
-
let keyCount = 0;
|
|
492
|
-
for (const key in param) {
|
|
493
|
-
const paramKey = param[key];
|
|
494
|
-
if (++keyCount > 4 || paramKey === 'object' || (paramKey === 'string' && paramKey.length > 100)) {
|
|
495
|
-
return name;
|
|
496
|
-
}
|
|
497
|
-
if (str) {
|
|
498
|
-
str += ', ';
|
|
499
|
-
}
|
|
500
|
-
str += paramKey;
|
|
501
|
-
}
|
|
502
|
-
return str;
|
|
504
|
+
this.log = [];
|
|
503
505
|
}
|
|
504
506
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
if (str) {
|
|
509
|
-
str += ', ';
|
|
510
|
-
}
|
|
511
|
-
str += this.paramToString(params[key], key);
|
|
512
|
-
}
|
|
513
|
-
return str;
|
|
507
|
+
override wasShown(): void {
|
|
508
|
+
super.wasShown();
|
|
509
|
+
this.requestUpdate();
|
|
514
510
|
}
|
|
515
511
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
this.title = title;
|
|
512
|
+
setCommandLog(log: SDK.PaintProfiler.PaintProfilerLogItem[]): void {
|
|
513
|
+
this.log = log;
|
|
514
|
+
this.updateWindow({left: 0, right: this.log.length});
|
|
520
515
|
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
export class LogPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
524
|
-
private property: {name: string, value: SDK.PaintProfiler.RawPaintProfilerLogItemParamValue};
|
|
525
516
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
this.
|
|
517
|
+
updateWindow(selectionWindow: {left: number, right: number}|null): void {
|
|
518
|
+
this.selectionWindow = selectionWindow;
|
|
519
|
+
this.requestUpdate();
|
|
529
520
|
}
|
|
530
521
|
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
element.appendChild(treeElement);
|
|
536
|
-
if (value && typeof value === 'object') {
|
|
537
|
-
for (const property in value) {
|
|
538
|
-
LogPropertyTreeElement.appendLogPropertyItem(treeElement, property, value[property]);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}
|
|
522
|
+
override performUpdate(): Promise<void> {
|
|
523
|
+
const visibleLogItems = this.selectionWindow && this.log.length ?
|
|
524
|
+
this.log.slice(this.selectionWindow.left, this.selectionWindow.right) :
|
|
525
|
+
[];
|
|
542
526
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
const nameElement = title.createChild('span', 'name');
|
|
546
|
-
nameElement.textContent = this.property.name;
|
|
547
|
-
const separatorElement = title.createChild('span', 'separator');
|
|
548
|
-
separatorElement.textContent = ': ';
|
|
549
|
-
if (this.property.value === null || typeof this.property.value !== 'object') {
|
|
550
|
-
const valueElement = title.createChild('span', 'value');
|
|
551
|
-
valueElement.textContent = JSON.stringify(this.property.value);
|
|
552
|
-
valueElement.classList.add('cm-js-' + (this.property.value === null ? 'null' : typeof this.property.value));
|
|
553
|
-
}
|
|
554
|
-
this.title = title;
|
|
527
|
+
this.#view({visibleLogItems}, undefined, this.contentElement);
|
|
528
|
+
return Promise.resolve();
|
|
555
529
|
}
|
|
556
530
|
}
|
|
557
531
|
|
|
@@ -374,11 +374,12 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
private loadedFromFile(report: string): void {
|
|
377
|
-
const data = JSON.parse(report);
|
|
378
|
-
if (!data
|
|
377
|
+
const data = JSON.parse(report) as LighthouseModel.ReporterTypes.ReportJSON;
|
|
378
|
+
if (!data.lighthouseVersion) {
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
data.isImported = true;
|
|
382
|
+
this.buildReportUI(data);
|
|
382
383
|
}
|
|
383
384
|
|
|
384
385
|
override elementsToRestoreScrollPositionsFor(): Element[] {
|
|
@@ -54,6 +54,8 @@ import * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
|
54
54
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
55
55
|
import * as RenderCoordinator from '../../ui/components/render_coordinator/render_coordinator.js';
|
|
56
56
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
57
|
+
// eslint-disable-next-line @devtools/es-modules-import
|
|
58
|
+
import dataGridAiButtonStyles from '../../ui/legacy/components/data_grid/dataGridAiButton.css.js';
|
|
57
59
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
58
60
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
59
61
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -560,6 +562,7 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
560
562
|
networkLogLargeRowsSetting: Common.Settings.Setting<boolean>) {
|
|
561
563
|
super();
|
|
562
564
|
this.registerRequiredCSS(networkLogViewStyles);
|
|
565
|
+
this.registerRequiredCSS(dataGridAiButtonStyles);
|
|
563
566
|
this.setMinimumSize(50, 64);
|
|
564
567
|
|
|
565
568
|
this.element.id = 'network-container';
|
|
@@ -2504,7 +2507,11 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
2504
2507
|
// (it may be different from the inspected page platform).
|
|
2505
2508
|
const escapeString = platform === 'win' ? escapeStringWin : escapeStringPosix;
|
|
2506
2509
|
|
|
2507
|
-
|
|
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, '\\$&'));
|
|
2508
2515
|
|
|
2509
2516
|
let inferredMethod = 'GET';
|
|
2510
2517
|
const data = [];
|
|
@@ -268,21 +268,6 @@ td.time-column {
|
|
|
268
268
|
vertical-align: sub;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.data-grid-data-grid-node .ai-button-container {
|
|
272
|
-
display: none;
|
|
273
|
-
float: right;
|
|
274
|
-
|
|
275
|
-
devtools-floating-button {
|
|
276
|
-
position: absolute;
|
|
277
|
-
z-index: 999;
|
|
278
|
-
margin-left: -17px;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.data-grid-data-grid-node:hover .ai-button-container {
|
|
283
|
-
display: inline-flex;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
271
|
.image-network-icon-preview {
|
|
287
272
|
inset: 0;
|
|
288
273
|
margin: auto;
|
|
@@ -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
|
-
#
|
|
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
|
-
|
|
258
|
-
|
|
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.#
|
|
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:
|
|
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.
|
|
4
|
-
Revision:
|
|
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
|