chrome-devtools-frontend 1.0.1626437 → 1.0.1626840

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 (38) hide show
  1. package/front_end/core/host/UserMetrics.ts +11 -6
  2. package/front_end/core/root/ExperimentNames.ts +1 -1
  3. package/front_end/core/sdk/HeapProfilerModel.ts +1 -11
  4. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -1
  5. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -1
  6. package/front_end/entrypoints/main/MainImpl.ts +4 -29
  7. package/front_end/generated/InspectorBackendCommands.ts +3 -2
  8. package/front_end/generated/protocol-mapping.d.ts +5 -0
  9. package/front_end/generated/protocol-proxy-api.d.ts +4 -0
  10. package/front_end/generated/protocol.ts +21 -0
  11. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
  12. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +11 -5
  13. package/front_end/models/lighthouse/RunTypes.ts +1 -1
  14. package/front_end/models/workspace/UISourceCode.ts +0 -1
  15. package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -3
  16. package/front_end/panels/common/AiCodeCompletionTeaser.ts +9 -0
  17. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
  18. package/front_end/panels/lighthouse/LighthouseController.ts +18 -0
  19. package/front_end/panels/profiler/profiler-meta.ts +0 -71
  20. package/front_end/panels/profiler/profiler.ts +0 -2
  21. package/front_end/panels/sources/ProfilePlugin.ts +12 -65
  22. package/front_end/panels/sources/UISourceCodeFrame.ts +1 -2
  23. package/front_end/third_party/chromium/README.chromium +1 -1
  24. package/front_end/third_party/lighthouse/README.chromium +2 -2
  25. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +4213 -4208
  26. package/front_end/third_party/lighthouse/locales/en-US.json +26 -8
  27. package/front_end/third_party/lighthouse/locales/en-XL.json +26 -8
  28. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  29. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -1
  30. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -1
  31. package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -56
  32. package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -35
  33. package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
  34. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  35. package/package.json +1 -1
  36. package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -405
  37. package/front_end/panels/profiler/liveHeapProfile.css +0 -22
  38. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +0 -113
@@ -489,7 +489,14 @@ export enum Action {
489
489
  InsightTeaserModelDownloadCompleted = 198,
490
490
  AiCodeGenerationError = 199,
491
491
  AiCodeGenerationRequestTriggered = 200,
492
- MAX_VALUE = 201,
492
+ AiCodeCompletionRequestTriggeredFromConsole = 201,
493
+ AiCodeCompletionRequestTriggeredFromSources = 202,
494
+ AiCodeCompletionRequestTriggeredFromStyles = 203,
495
+ AiCodeGenerationRequestTriggeredFromConsole = 204,
496
+ AiCodeGenerationRequestTriggeredFromSources = 205,
497
+ AiCodeCompletionFreCompletedFromConsole = 206,
498
+ AiCodeCompletionFreCompletedFromSources = 207,
499
+ MAX_VALUE = 208,
493
500
  /* eslint-enable @typescript-eslint/naming-convention */
494
501
  }
495
502
 
@@ -519,7 +526,7 @@ export enum PanelCodes {
519
526
  'changes.changes' = 23,
520
527
  'performance.monitor' = 24,
521
528
  'release-note' = 25,
522
- 'live-heap-profile' = 26,
529
+
523
530
  'sources.quick' = 27,
524
531
  'network.blocked-urls' = 28,
525
532
  'settings-preferences' = 29,
@@ -669,8 +676,6 @@ export enum KeyboardShortcutAction {
669
676
  'inspector-main.focus-debuggee' = 47,
670
677
  'inspector-main.hard-reload' = 48,
671
678
  'inspector-main.reload' = 49,
672
- 'live-heap-profile.start-with-reload' = 50,
673
- 'live-heap-profile.toggle-recording' = 51,
674
679
  'main.debug-reload' = 52,
675
680
  'main.next-tab' = 53,
676
681
  'main.previous-tab' = 54,
@@ -758,7 +763,6 @@ export const enum IssueOpener {
758
763
  export enum DevtoolsExperiments {
759
764
  /* eslint-disable @typescript-eslint/naming-convention */
760
765
  'capture-node-creation-stacks' = 1,
761
- 'live-heap-profile' = 11,
762
766
  'protocol-monitor' = 13,
763
767
  'timeline-invalidation-tracking' = 26,
764
768
  'instrumentation-breakpoints' = 61,
@@ -1142,7 +1146,8 @@ export const enum LighthouseCategoryUsed {
1142
1146
  SEO = 3,
1143
1147
  PWA = 4,
1144
1148
  PUB_ADS = 5,
1145
- MAX_VALUE = 6,
1149
+ AGENTIC_BROWSING = 6,
1150
+ MAX_VALUE = 7,
1146
1151
  }
1147
1152
 
1148
1153
  export const enum SwatchType {
@@ -5,7 +5,7 @@
5
5
  export enum ExperimentName {
6
6
  ALL = '*',
7
7
  CAPTURE_NODE_CREATION_STACKS = 'capture-node-creation-stacks',
8
- LIVE_HEAP_PROFILE = 'live-heap-profile',
8
+
9
9
  PROTOCOL_MONITOR = 'protocol-monitor',
10
10
  TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
11
11
  INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
@@ -16,7 +16,6 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
16
16
  #enabled = false;
17
17
  readonly #heapProfilerAgent: ProtocolProxyApi.HeapProfilerApi;
18
18
  readonly #runtimeModel: RuntimeModel;
19
- #samplingProfilerDepth = 0;
20
19
 
21
20
  constructor(target: Target) {
22
21
  super(target);
@@ -43,9 +42,6 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
43
42
  }
44
43
 
45
44
  async startSampling(samplingRateInBytes?: number): Promise<boolean> {
46
- if (this.#samplingProfilerDepth++) {
47
- return false;
48
- }
49
45
  const defaultSamplingIntervalInBytes = 16384;
50
46
  const response = await this.#heapProfilerAgent.invoke_startSampling(
51
47
  {samplingInterval: samplingRateInBytes || defaultSamplingIntervalInBytes});
@@ -53,15 +49,9 @@ export class HeapProfilerModel extends SDKModel<EventTypes> {
53
49
  }
54
50
 
55
51
  async stopSampling(): Promise<Protocol.HeapProfiler.SamplingHeapProfile|null> {
56
- if (!this.#samplingProfilerDepth) {
57
- throw new Error('Sampling profiler is not running.');
58
- }
59
- if (--this.#samplingProfilerDepth) {
60
- return await this.getSamplingProfile();
61
- }
62
52
  const response = await this.#heapProfilerAgent.invoke_stopSampling();
63
53
  if (response.getError()) {
64
- return null;
54
+ throw new Error('Sampling profiler is not running.');
65
55
  }
66
56
  return response.profile;
67
57
  }
@@ -534,7 +534,6 @@ async function init(): Promise<void> {
534
534
  Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Enable instrumentation breakpoints');
535
535
  safeRegisterExperiment(
536
536
  Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
537
- safeRegisterExperiment(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
538
537
  safeRegisterExperiment(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
539
538
 
540
539
  const hostUnsyncedStorage: Common.Settings.SettingsBackingStore = {
@@ -250,7 +250,6 @@ async function init(): Promise<void> {
250
250
  Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Enable instrumentation breakpoints');
251
251
  Root.Runtime.experiments.register(
252
252
  Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
253
- Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
254
253
  Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
255
254
 
256
255
  const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
@@ -350,7 +350,6 @@ export class MainImpl {
350
350
  #initializeExperiments(): void {
351
351
  Root.Runtime.experiments.register(
352
352
  Root.ExperimentNames.ExperimentName.CAPTURE_NODE_CREATION_STACKS, 'Capture node creation stacks');
353
- Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
354
353
 
355
354
  const enableProtocolMonitor = (Root.Runtime.hostConfig.devToolsProtocolMonitor?.enabled ?? false) ||
356
355
  Boolean(Root.Runtime.Runtime.queryParam('isChromeForTesting'));
@@ -404,13 +403,6 @@ export class MainImpl {
404
403
  Root.Runtime.experiments.setServerEnabledExperiments(enabledExperiments.split(';'));
405
404
  }
406
405
 
407
- if (Host.InspectorFrontendHost.isUnderTest()) {
408
- const testParam = Root.Runtime.Runtime.queryParam('test');
409
- if (testParam?.includes('live-line-level-heap-profile.js')) {
410
- Root.Runtime.experiments.enableForTest(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE);
411
- }
412
- }
413
-
414
406
  for (const experiment of Root.Runtime.experiments.allConfigurableExperiments()) {
415
407
  if (experiment.isEnabled()) {
416
408
  Host.userMetrics.experimentEnabledAtLaunch(experiment.name);
@@ -667,27 +659,10 @@ export class MainImpl {
667
659
  async #lateInitialization(): Promise<void> {
668
660
  MainImpl.time('Main._lateInitialization');
669
661
  PanelCommon.ExtensionServer.ExtensionServer.instance().initializeExtensions();
670
- const promises: Array<Promise<void>> =
671
- Common.Runnable.lateInitializationRunnables().map(async lateInitializationLoader => {
672
- const runnable = await lateInitializationLoader();
673
- return await runnable.run();
674
- });
675
- if (Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE)) {
676
- const PerfUI = await import('../../ui/legacy/components/perf_ui/perf_ui.js');
677
- const setting = 'memory-live-heap-profile';
678
- if (Common.Settings.Settings.instance().moduleSetting(setting).get()) {
679
- promises.push(PerfUI.LiveHeapProfile.LiveHeapProfile.instance().run());
680
- } else {
681
- const changeListener = async(event: Common.EventTarget.EventTargetEvent<unknown>): Promise<void> => {
682
- if (!event.data) {
683
- return;
684
- }
685
- Common.Settings.Settings.instance().moduleSetting(setting).removeChangeListener(changeListener);
686
- void PerfUI.LiveHeapProfile.LiveHeapProfile.instance().run();
687
- };
688
- Common.Settings.Settings.instance().moduleSetting(setting).addChangeListener(changeListener);
689
- }
690
- }
662
+ void Promise.all(Common.Runnable.lateInitializationRunnables().map(async lateInitializationLoader => {
663
+ const runnable = await lateInitializationLoader();
664
+ return await runnable.run();
665
+ }));
691
666
 
692
667
  MainImpl.timeEnd('Main._lateInitialization');
693
668
  }
@@ -266,7 +266,8 @@ inspectorBackend.registerCommand("CSS.setEffectivePropertyValueForNode", [{"name
266
266
  inspectorBackend.registerCommand("CSS.setPropertyRulePropertyName", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "propertyName", "type": "string", "optional": false, "description": "", "typeRef": null}], ["propertyName"], "Modifies the property rule property name.");
267
267
  inspectorBackend.registerCommand("CSS.setKeyframeKey", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "keyText", "type": "string", "optional": false, "description": "", "typeRef": null}], ["keyText"], "Modifies the keyframe rule key text.");
268
268
  inspectorBackend.registerCommand("CSS.setMediaText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["media"], "Modifies the rule selector.");
269
- inspectorBackend.registerCommand("CSS.setContainerQueryText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "Modifies the expression of a container query.");
269
+ inspectorBackend.registerCommand("CSS.setContainerQueryText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "Modifies the expression of a container query. Deprecated. Use setContainerQueryConditionText instead.");
270
+ inspectorBackend.registerCommand("CSS.setContainerQueryConditionText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "");
270
271
  inspectorBackend.registerCommand("CSS.setSupportsText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["supports"], "Modifies the expression of a supports at-rule.");
271
272
  inspectorBackend.registerCommand("CSS.setNavigationText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["navigation"], "Modifies the expression of a navigation at-rule.");
272
273
  inspectorBackend.registerCommand("CSS.setScopeText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["scope"], "Modifies the expression of a scope at-rule.");
@@ -298,7 +299,7 @@ inspectorBackend.registerType("CSS.CSSProperty", [{"name": "name", "type": "stri
298
299
  inspectorBackend.registerType("CSS.CSSMedia", [{"name": "text", "type": "string", "optional": false, "description": "Media query text.", "typeRef": null}, {"name": "source", "type": "string", "optional": false, "description": "Source of the media query: \\\"mediaRule\\\" if specified by a @media rule, \\\"importRule\\\" if specified by an @import rule, \\\"linkedSheet\\\" if specified by a \\\"media\\\" attribute in a linked stylesheet's LINK tag, \\\"inlineSheet\\\" if specified by a \\\"media\\\" attribute in an inline stylesheet's STYLE tag.", "typeRef": null}, {"name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "mediaList", "type": "array", "optional": true, "description": "Array of media queries.", "typeRef": "CSS.MediaQuery"}]);
299
300
  inspectorBackend.registerType("CSS.MediaQuery", [{"name": "expressions", "type": "array", "optional": false, "description": "Array of media query expressions.", "typeRef": "CSS.MediaQueryExpression"}, {"name": "active", "type": "boolean", "optional": false, "description": "Whether the media query condition is satisfied.", "typeRef": null}]);
300
301
  inspectorBackend.registerType("CSS.MediaQueryExpression", [{"name": "value", "type": "number", "optional": false, "description": "Media query expression value.", "typeRef": null}, {"name": "unit", "type": "string", "optional": false, "description": "Media query expression units.", "typeRef": null}, {"name": "feature", "type": "string", "optional": false, "description": "Media query expression feature.", "typeRef": null}, {"name": "valueRange", "type": "object", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable).", "typeRef": null}]);
301
- inspectorBackend.registerType("CSS.CSSContainerQuery", [{"name": "text", "type": "string", "optional": false, "description": "Container query text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null}, {"name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes"}, {"name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes"}, {"name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null}, {"name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null}]);
302
+ inspectorBackend.registerType("CSS.CSSContainerQuery", [{"name": "text", "type": "string", "optional": false, "description": "Container query text. Contains the query part without the container name for a single query. Deprecated in favor of conditionText which contains the full prelude after @container.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null}, {"name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes"}, {"name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes"}, {"name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null}, {"name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null}, {"name": "conditionText", "type": "string", "optional": false, "description": "CSSContainerRule.conditionText", "typeRef": null}]);
302
303
  inspectorBackend.registerType("CSS.CSSSupports", [{"name": "text", "type": "string", "optional": false, "description": "Supports rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": false, "description": "Whether the supports condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
303
304
  inspectorBackend.registerType("CSS.CSSNavigation", [{"name": "text", "type": "string", "optional": false, "description": "Navigation rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": true, "description": "Whether the navigation condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
304
305
  inspectorBackend.registerType("CSS.CSSScope", [{"name": "text", "type": "string", "optional": false, "description": "Scope rule text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
@@ -1729,11 +1729,16 @@ export namespace ProtocolMapping {
1729
1729
  };
1730
1730
  /**
1731
1731
  * Modifies the expression of a container query.
1732
+ * Deprecated. Use setContainerQueryConditionText instead.
1732
1733
  */
1733
1734
  'CSS.setContainerQueryText': {
1734
1735
  paramsType: [Protocol.CSS.SetContainerQueryTextRequest];
1735
1736
  returnType: Protocol.CSS.SetContainerQueryTextResponse;
1736
1737
  };
1738
+ 'CSS.setContainerQueryConditionText': {
1739
+ paramsType: [Protocol.CSS.SetContainerQueryConditionTextRequest];
1740
+ returnType: Protocol.CSS.SetContainerQueryConditionTextResponse;
1741
+ };
1737
1742
  /**
1738
1743
  * Modifies the expression of a supports at-rule.
1739
1744
  */
@@ -880,9 +880,13 @@ declare namespace ProtocolProxyApi {
880
880
 
881
881
  /**
882
882
  * Modifies the expression of a container query.
883
+ * Deprecated. Use setContainerQueryConditionText instead.
884
+ * @deprecated
883
885
  */
884
886
  invoke_setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest): Promise<Protocol.CSS.SetContainerQueryTextResponse>;
885
887
 
888
+ invoke_setContainerQueryConditionText(params: Protocol.CSS.SetContainerQueryConditionTextRequest): Promise<Protocol.CSS.SetContainerQueryConditionTextResponse>;
889
+
886
890
  /**
887
891
  * Modifies the expression of a supports at-rule.
888
892
  */
@@ -3240,6 +3240,10 @@ export namespace CSS {
3240
3240
  export interface CSSContainerQuery {
3241
3241
  /**
3242
3242
  * Container query text.
3243
+ * Contains the query part without the container name for a single query.
3244
+ * Deprecated in favor of conditionText which contains the full prelude
3245
+ * after @container.
3246
+ * @deprecated
3243
3247
  */
3244
3248
  text: string;
3245
3249
  /**
@@ -3271,6 +3275,10 @@ export namespace CSS {
3271
3275
  * true if the query contains anchored() queries.
3272
3276
  */
3273
3277
  queriesAnchored?: boolean;
3278
+ /**
3279
+ * CSSContainerRule.conditionText
3280
+ */
3281
+ conditionText: string;
3274
3282
  }
3275
3283
 
3276
3284
  /**
@@ -4138,6 +4146,19 @@ export namespace CSS {
4138
4146
  containerQuery: CSSContainerQuery;
4139
4147
  }
4140
4148
 
4149
+ export interface SetContainerQueryConditionTextRequest {
4150
+ styleSheetId: DOM.StyleSheetId;
4151
+ range: SourceRange;
4152
+ text: string;
4153
+ }
4154
+
4155
+ export interface SetContainerQueryConditionTextResponse extends ProtocolResponseWithError {
4156
+ /**
4157
+ * The resulting CSS container query rule after modification.
4158
+ */
4159
+ containerQuery: CSSContainerQuery;
4160
+ }
4161
+
4141
4162
  export interface SetSupportsTextRequest {
4142
4163
  styleSheetId: DOM.StyleSheetId;
4143
4164
  range: SourceRange;
@@ -8,6 +8,7 @@ import type * as SDK from '../../../core/sdk/sdk.js';
8
8
  import type * as Protocol from '../../../generated/protocol.js';
9
9
  import * as Greendev from '../../greendev/greendev.js';
10
10
  import type * as LHModel from '../../lighthouse/lighthouse.js';
11
+ import type * as TextUtils from '../../text_utils/text_utils.js';
11
12
  import type * as Trace from '../../trace/trace.js';
12
13
  import {debugLog, isStructuredLogEnabled} from '../debug.js';
13
14
 
@@ -236,7 +237,7 @@ export interface DomTreeAiWidget {
236
237
  size: number,
237
238
  resourceType: Protocol.Network.ResourceType,
238
239
  mimeType: string,
239
- imageUrl?: string,
240
+ imageContent?: TextUtils.ContentData.ContentData,
240
241
  },
241
242
  };
242
243
  }
@@ -985,9 +985,14 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
985
985
  const nodeMap = await domModel.pushNodesByBackendIdsToFrontend(new Set([nodeId]));
986
986
  const node = nodeMap?.get(nodeId);
987
987
  if (node) {
988
- const snapshot = await node.takeSnapshot();
989
- let networkRequest;
990
988
  const lcpSyntheticRequest = insight.lcpRequest;
989
+ const [snapshot, imageContent] = await Promise.all([
990
+ node.takeSnapshot(),
991
+ lcpSyntheticRequest ? this.#getNetworkRequestImageData(lcpSyntheticRequest) :
992
+ Promise.resolve(undefined),
993
+ ]);
994
+
995
+ let networkRequest;
991
996
  if (lcpSyntheticRequest) {
992
997
  networkRequest = {
993
998
  url: lcpSyntheticRequest.args.data.url,
@@ -995,7 +1000,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
995
1000
  lcpSyntheticRequest.args.data.encodedDataLength ?? 0,
996
1001
  resourceType: lcpSyntheticRequest.args.data.resourceType,
997
1002
  mimeType: lcpSyntheticRequest.args.data.mimeType ?? '',
998
- imageUrl: await this.#getNetworkRequestImageData(lcpSyntheticRequest),
1003
+ imageContent,
999
1004
  };
1000
1005
  }
1001
1006
  widgets.push({
@@ -1567,7 +1572,8 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
1567
1572
  return {result: {success: true}};
1568
1573
  }
1569
1574
 
1570
- async #getNetworkRequestImageData(lcpRequest: Trace.Types.Events.SyntheticNetworkRequest): Promise<string|undefined> {
1575
+ async #getNetworkRequestImageData(lcpRequest: Trace.Types.Events.SyntheticNetworkRequest):
1576
+ Promise<TextUtils.ContentData.ContentData|undefined> {
1571
1577
  const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
1572
1578
  const networkManager = target?.model(SDK.NetworkManager.NetworkManager);
1573
1579
  if (!target || !networkManager) {
@@ -1581,7 +1587,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
1581
1587
  if (sdkRequest?.contentType().isImage()) {
1582
1588
  const contentData = await sdkRequest.requestContentData();
1583
1589
  if (!TextUtils.ContentData.ContentData.isError(contentData)) {
1584
- return contentData.asDataUrl() ?? undefined;
1590
+ return contentData;
1585
1591
  }
1586
1592
  }
1587
1593
  return undefined;
@@ -5,7 +5,7 @@ import type * as Common from '../../core/common/common.js';
5
5
  import type * as Host from '../../core/host/host.js';
6
6
  import type * as Platform from '../../core/platform/platform.js';
7
7
 
8
- export type CategoryId = 'performance'|'accessibility'|'best-practices'|'seo';
8
+ export type CategoryId = 'performance'|'accessibility'|'best-practices'|'seo'|'agentic-browsing';
9
9
  export type RunMode = 'navigation'|'timespan'|'snapshot';
10
10
 
11
11
  export interface Preset {
@@ -719,7 +719,6 @@ export class UISourceCodeMetadata {
719
719
 
720
720
  export const enum DecoratorType {
721
721
  PERFORMANCE = 'performance',
722
- MEMORY = 'memory',
723
722
  COVERAGE = 'coverage',
724
723
  }
725
724
 
@@ -1330,17 +1330,18 @@ function renderNetworkRequestPreview(networkRequest: NonNullable<DomTreeAiWidget
1330
1330
  const resourceType = Common.ResourceType.resourceTypes[networkRequest.resourceType];
1331
1331
  const {iconName, color} = PanelUtils.iconDataForResourceType(resourceType);
1332
1332
 
1333
+ const imageUrl = networkRequest.imageContent?.asImagePreviewUrl() ?? networkRequest.url;
1334
+
1333
1335
  return html`
1334
1336
  <div class="network-request-preview">
1335
1337
  <div class="network-request-header">
1336
1338
  <div class="network-request-icon">
1337
1339
  ${
1338
- resourceType.isImage() ? html`<img src=${networkRequest.imageUrl ?? networkRequest.url} alt=${filename} />` :
1340
+ resourceType.isImage() ? html`<img src=${imageUrl} alt=${filename} />` :
1339
1341
  html`<devtools-icon name=${iconName} style=${Lit.Directives.styleMap({
1340
1342
  color: color ?? ''
1341
1343
  })}></devtools-icon>`}
1342
- </div>
1343
- <div class="network-request-details">
1344
+ </div> <div class="network-request-details">
1344
1345
  <div class="network-request-name" title=${networkRequest.url}>${filename}</div>
1345
1346
  <div class="network-request-size">${size}</div>
1346
1347
  </div>
@@ -9,6 +9,7 @@ import * as Host from '../../core/host/host.js';
9
9
  import * as i18n from '../../core/i18n/i18n.js';
10
10
  import * as Root from '../../core/root/root.js';
11
11
  import * as AIAssistance from '../../models/ai_assistance/ai_assistance.js';
12
+ import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
12
13
  import * as AiCodeGeneration from '../../models/ai_code_generation/ai_code_generation.js';
13
14
  import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
14
15
  import * as UI from '../../ui/legacy/legacy.js';
@@ -163,6 +164,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
163
164
 
164
165
  interface AiCodeCompletionTeaserConfig {
165
166
  onDetach: () => void;
167
+ panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
166
168
  }
167
169
 
168
170
  export class AiCodeCompletionTeaser extends UI.Widget.Widget {
@@ -172,6 +174,7 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
172
174
  #boundOnAidaAvailabilityChange: () => Promise<void>;
173
175
  #boundOnAiCodeCompletionSettingChanged: () => void;
174
176
  #onDetach: () => void;
177
+ #panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
175
178
 
176
179
  // Whether the user completed first run experience dialog or not.
177
180
  #aiCodeCompletionFreCompletedSetting =
@@ -186,6 +189,7 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
186
189
  super();
187
190
  this.markAsExternallyManaged();
188
191
  this.#onDetach = config.onDetach;
192
+ this.#panel = config.panel;
189
193
  this.#view = view ?? DEFAULT_VIEW;
190
194
  this.#boundOnAidaAvailabilityChange = this.#onAidaAvailabilityChange.bind(this);
191
195
  this.#boundOnAiCodeCompletionSettingChanged = this.#onAiCodeCompletionSettingChanged.bind(this);
@@ -283,6 +287,11 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
283
287
 
284
288
  if (result) {
285
289
  this.#aiCodeCompletionFreCompletedSetting.set(true);
290
+ if (this.#panel === AiCodeCompletion.AiCodeCompletion.ContextFlavor.CONSOLE) {
291
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionFreCompletedFromConsole);
292
+ } else if (this.#panel === AiCodeCompletion.AiCodeCompletion.ContextFlavor.SOURCES) {
293
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionFreCompletedFromSources);
294
+ }
286
295
  this.detach();
287
296
  } else {
288
297
  this.requestUpdate();
@@ -166,7 +166,7 @@ export class StylesAiCodeCompletionProvider {
166
166
  }|null> {
167
167
  this.#aiCodeCompletionConfig?.onRequestTriggered();
168
168
  // Registering AiCodeCompletionRequestTriggered metric even if the request is served from cache
169
- Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionRequestTriggered);
169
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionRequestTriggeredFromStyles);
170
170
 
171
171
  try {
172
172
  const completionResponse = await this.#aiCodeCompletion?.completeCode(
@@ -84,6 +84,15 @@ const UIStrings = {
84
84
  * @description Tooltip text of checkbox to include running the Search Engine Optimization audits in Lighthouse
85
85
  */
86
86
  isThisPageOptimizedForSearch: 'Is this page optimized for search engine results ranking',
87
+ /**
88
+ * @description Text of checkbox to include running the Agentic Browsing audits in Lighthouse
89
+ */
90
+ agenticBrowsing: 'Agentic browsing',
91
+ /**
92
+ * @description Tooltip text of checkbox to include running the Agentic Browsing audits in Lighthouse
93
+ */
94
+ agenticBrowsingDescription:
95
+ 'These checks ensure high-quality, browsable websites for AI agents and validate the correctness of WebMCP integrations. This category is still under development and subject to change.',
87
96
  /**
88
97
  * @description ARIA label for a radio button input to emulate mobile device behavior when running audits in Lighthouse.
89
98
  */
@@ -749,6 +758,15 @@ export function getPresets(): LighthouseModel.RunTypes.Preset[] {
749
758
  supportedModes: ['navigation', 'snapshot'],
750
759
  userMetric: Host.UserMetrics.LighthouseCategoryUsed.SEO,
751
760
  },
761
+ {
762
+ setting: Common.Settings.Settings.instance().createSetting(
763
+ 'lighthouse.cat-agentic-browsing', false, Common.Settings.SettingStorageType.SYNCED),
764
+ configID: 'agentic-browsing',
765
+ title: i18nLazyString(UIStrings.agenticBrowsing),
766
+ description: i18nLazyString(UIStrings.agenticBrowsingDescription),
767
+ supportedModes: ['navigation', 'snapshot'],
768
+ userMetric: Host.UserMetrics.LighthouseCategoryUsed.AGENTIC_BROWSING,
769
+ },
752
770
  ];
753
771
  }
754
772
  return presets;
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Root from '../../core/root/root.js';
7
6
  import * as SDK from '../../core/sdk/sdk.js';
8
7
  import * as UI from '../../ui/legacy/legacy.js';
9
8
 
@@ -16,22 +15,6 @@ const UIStrings = {
16
15
  * @description Title for the profiler tab
17
16
  */
18
17
  memory: 'Memory',
19
- /**
20
- * @description Title of the 'Live Heap Profile' tool in the bottom drawer
21
- */
22
- liveHeapProfile: 'Live Heap Profile',
23
- /**
24
- * @description Title of an action under the Performance category that can be invoked through the Command Menu
25
- */
26
- startRecordingHeapAllocations: 'Start recording heap allocations',
27
- /**
28
- * @description Title of an action under the Performance category that can be invoked through the Command Menu
29
- */
30
- stopRecordingHeapAllocations: 'Stop recording heap allocations',
31
- /**
32
- * @description Title of an action in the live heap profile tool to start with reload
33
- */
34
- startRecordingHeapAllocationsAndReload: 'Start recording heap allocations and reload the page',
35
18
  /**
36
19
  * @description Text in the Shortcuts page to explain a keyboard shortcut (start/stop recording performance)
37
20
  */
@@ -40,10 +23,6 @@ const UIStrings = {
40
23
  * @description Command for showing the profiler tab
41
24
  */
42
25
  showMemory: 'Show Memory',
43
- /**
44
- * @description Command for showing the 'Live Heap Profile' tool in the bottom drawer
45
- */
46
- showLiveHeapProfile: 'Show Live Heap Profile',
47
26
  /**
48
27
  * @description Tooltip text that appears when hovering over the largeicon clear button in the Profiles Panel of a profiler tool
49
28
  */
@@ -90,56 +69,6 @@ UI.ViewManager.registerViewExtension({
90
69
  },
91
70
  });
92
71
 
93
- UI.ViewManager.registerViewExtension({
94
- location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,
95
- id: 'live-heap-profile',
96
- commandPrompt: i18nLazyString(UIStrings.showLiveHeapProfile),
97
- title: i18nLazyString(UIStrings.liveHeapProfile),
98
- persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,
99
- order: 100,
100
- async loadView() {
101
- const Profiler = await loadProfilerModule();
102
- return Profiler.LiveHeapProfileView.LiveHeapProfileView.instance();
103
- },
104
- experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
105
- });
106
-
107
- UI.ActionRegistration.registerActionExtension({
108
- actionId: 'live-heap-profile.toggle-recording',
109
- iconClass: UI.ActionRegistration.IconClass.START_RECORDING,
110
- toggleable: true,
111
- toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING,
112
- toggleWithRedColor: true,
113
- async loadActionDelegate() {
114
- const Profiler = await loadProfilerModule();
115
- return new Profiler.LiveHeapProfileView.ActionDelegate();
116
- },
117
- category: UI.ActionRegistration.ActionCategory.MEMORY,
118
- experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
119
- options: [
120
- {
121
- value: true,
122
- title: i18nLazyString(UIStrings.startRecordingHeapAllocations),
123
- },
124
- {
125
- value: false,
126
- title: i18nLazyString(UIStrings.stopRecordingHeapAllocations),
127
- },
128
- ],
129
- });
130
-
131
- UI.ActionRegistration.registerActionExtension({
132
- actionId: 'live-heap-profile.start-with-reload',
133
- iconClass: UI.ActionRegistration.IconClass.REFRESH,
134
- async loadActionDelegate() {
135
- const Profiler = await loadProfilerModule();
136
- return new Profiler.LiveHeapProfileView.ActionDelegate();
137
- },
138
- category: UI.ActionRegistration.ActionCategory.MEMORY,
139
- experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
140
- title: i18nLazyString(UIStrings.startRecordingHeapAllocationsAndReload),
141
- });
142
-
143
72
  UI.ActionRegistration.registerActionExtension({
144
73
  actionId: 'profiler.heap-toggle-recording',
145
74
  category: UI.ActionRegistration.ActionCategory.MEMORY,
@@ -10,7 +10,6 @@ import * as HeapSnapshotGridNodes from './HeapSnapshotGridNodes.js';
10
10
  import * as HeapSnapshotView from './HeapSnapshotView.js';
11
11
  import * as HeapTimelineOverview from './HeapTimelineOverview.js';
12
12
  import * as IsolateSelector from './IsolateSelector.js';
13
- import * as LiveHeapProfileView from './LiveHeapProfileView.js';
14
13
  import * as ProfileDataGrid from './ProfileDataGrid.js';
15
14
  import * as ProfileFlameChart from './ProfileFlameChartDataProvider.js';
16
15
  import * as ProfileHeader from './ProfileHeader.js';
@@ -30,7 +29,6 @@ export {
30
29
  HeapSnapshotView,
31
30
  HeapTimelineOverview,
32
31
  IsolateSelector,
33
- LiveHeapProfileView,
34
32
  ProfileDataGrid,
35
33
  ProfileFlameChart,
36
34
  ProfileHeader,