chrome-devtools-frontend 1.0.1609381 → 1.0.1611099

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/eslint.config.mjs CHANGED
@@ -552,7 +552,9 @@ export default defineConfig([
552
552
  },
553
553
  ],
554
554
 
555
- '@typescript-eslint/prefer-optional-chain': 'error',
555
+ // Broke in 8.58.0, waiting for a fix
556
+ // https://github.com/typescript-eslint/typescript-eslint/issues/12204
557
+ '@typescript-eslint/prefer-optional-chain': 'off',
556
558
 
557
559
  '@typescript-eslint/no-unsafe-function-type': 'error',
558
560
 
@@ -2779,16 +2779,6 @@ export abstract class HeapSnapshot {
2779
2779
  return null;
2780
2780
  }
2781
2781
 
2782
- idsOfObjectsWithName(name: string): number[] {
2783
- const ids = [];
2784
- for (let it = this.allNodes(); it.hasNext(); it.next()) {
2785
- if (it.item().name() === name) {
2786
- ids.push(it.item().id());
2787
- }
2788
- }
2789
- return ids;
2790
- }
2791
-
2792
2782
  createEdgesProvider(nodeIndex: number): HeapSnapshotEdgesProvider {
2793
2783
  const node = this.createNode(nodeIndex);
2794
2784
  const filter = this.containmentEdgesFilter();
@@ -512,6 +512,7 @@ export const generatedProperties = [
512
512
  "grid-template-areas",
513
513
  "grid-template-columns",
514
514
  "grid-template-rows",
515
+ "hanging-punctuation",
515
516
  "hash",
516
517
  "height",
517
518
  "hostname",
@@ -1823,7 +1824,7 @@ export const generatedProperties = [
1823
1824
  "inherited": false,
1824
1825
  "keywords": [
1825
1826
  "all",
1826
- "auto",
1827
+ "normal",
1827
1828
  "around",
1828
1829
  "between"
1829
1830
  ],
@@ -2778,6 +2779,16 @@ export const generatedProperties = [
2778
2779
  ],
2779
2780
  "name": "grid-template-rows"
2780
2781
  },
2782
+ {
2783
+ "inherited": true,
2784
+ "keywords": [
2785
+ "none",
2786
+ "first",
2787
+ "last",
2788
+ "allow-end"
2789
+ ],
2790
+ "name": "hanging-punctuation"
2791
+ },
2781
2792
  {
2782
2793
  "name": "hash"
2783
2794
  },
@@ -3904,7 +3915,7 @@ export const generatedProperties = [
3904
3915
  "inherited": false,
3905
3916
  "keywords": [
3906
3917
  "all",
3907
- "auto",
3918
+ "normal",
3908
3919
  "around",
3909
3920
  "between"
3910
3921
  ],
@@ -5663,7 +5674,7 @@ export const generatedPropertyValues = {
5663
5674
  "column-rule-visibility-items": {
5664
5675
  "values": [
5665
5676
  "all",
5666
- "auto",
5677
+ "normal",
5667
5678
  "around",
5668
5679
  "between"
5669
5680
  ]
@@ -6244,6 +6255,14 @@ export const generatedPropertyValues = {
6244
6255
  "none"
6245
6256
  ]
6246
6257
  },
6258
+ "hanging-punctuation": {
6259
+ "values": [
6260
+ "none",
6261
+ "first",
6262
+ "last",
6263
+ "allow-end"
6264
+ ]
6265
+ },
6247
6266
  "height": {
6248
6267
  "values": [
6249
6268
  "auto",
@@ -6824,7 +6843,7 @@ export const generatedPropertyValues = {
6824
6843
  "row-rule-visibility-items": {
6825
6844
  "values": [
6826
6845
  "all",
6827
- "auto",
6846
+ "normal",
6828
6847
  "around",
6829
6848
  "between"
6830
6849
  ]
@@ -62,6 +62,7 @@ Your role is to help users understand and fix accessibility issues found in Ligh
62
62
  # Constraints
63
63
  * **CRITICAL**: ALWAYS call a tool before providing an answer if an element path is available.
64
64
  * **CRITICAL**: You are an accessibility agent. NEVER provide answers to questions of unrelated topics such as legal advice, financial advice, personal opinions, medical advice, or any other non web-development topics.
65
+ * **CRITICAL**: If the Lighthouse report shows scores as "n/a" or indicates a failure, it means the data is missing or the run failed. Do NOT assume that the page passed or has no issues.
65
66
 
66
67
  ## Response Structure
67
68
 
@@ -462,7 +463,13 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
462
463
  #getInitialPayload(context: ConversationContext<LHModel.ReporterTypes.ReportJSON>): string {
463
464
  const report = context.getItem();
464
465
  const formatter = new LighthouseFormatter();
465
- return `# Lighthouse Report:\n${formatter.summary(report)}\n${formatter.audits(report, 'accessibility')}\n`;
466
+ const summary = formatter.summary(report);
467
+ const audits = formatter.audits(report, 'accessibility');
468
+ const allFailed = Object.values(report.categories).every(category => category.score === null);
469
+ if (allFailed) {
470
+ return '**CRITICAL**: The Lighthouse report failed to record or all category scores are error/unavailable (n/a). This indicates a failed run or missing data.';
471
+ }
472
+ return `# Lighthouse Report:\n${summary}\n${audits}`;
466
473
  }
467
474
 
468
475
  override async enhanceQuery(query: string, lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
@@ -17,7 +17,7 @@ const MAX_BODY_SIZE = 10000;
17
17
  /**
18
18
  * Sanitizes the set of headers, removing values that are not on the allow-list and replacing them with '<redacted>'.
19
19
  */
20
- function sanitizeHeaders(headers: Array<{name: string, value: string}>): Array<{name: string, value: string}> {
20
+ export function sanitizeHeaders(headers: Array<{name: string, value: string}>): Array<{name: string, value: string}> {
21
21
  return headers.map(header => {
22
22
  if (NetworkRequestFormatter.allowHeader(header.name)) {
23
23
  return header;
@@ -69,11 +69,16 @@ export class NetworkRequestFormatter {
69
69
  }
70
70
 
71
71
  static formatInitiatorUrl(initiatorUrl: string, allowedOrigin: string): string {
72
- const initiatorOrigin = new URL(initiatorUrl).origin;
73
- if (initiatorOrigin === allowedOrigin) {
74
- return initiatorUrl;
72
+ try {
73
+ // Some scheme or URLs might cause errors depending on the runtime environment.
74
+ const initiatorOrigin = new URL(initiatorUrl).origin;
75
+ if (initiatorOrigin === allowedOrigin) {
76
+ return initiatorUrl;
77
+ }
78
+ return '<redacted cross-origin initiator URL>';
79
+ } catch {
80
+ return '<redacted cross-origin initiator URL>';
75
81
  }
76
- return '<redacted cross-origin initiator URL>';
77
82
  }
78
83
 
79
84
  static formatStatus(status: {
@@ -7100,6 +7100,10 @@ export const NativeFunctions = [
7100
7100
  name: "getElementTransform",
7101
7101
  signatures: [["element","draw_transform"]]
7102
7102
  },
7103
+ {
7104
+ name: "captureElementImage",
7105
+ signatures: [["element"]]
7106
+ },
7103
7107
  {
7104
7108
  name: "configureHighDynamicRange",
7105
7109
  signatures: [["options"]]
@@ -7735,18 +7739,14 @@ export const NativeFunctions = [
7735
7739
  name: "drawMesh",
7736
7740
  signatures: [["vertex_buffer","uv_buffer","index_buffer","image"]]
7737
7741
  },
7738
- {
7739
- name: "CanvasFilter",
7740
- signatures: [["init"]]
7741
- },
7742
- {
7743
- name: "drawElement",
7744
- signatures: [["element","dx","dy","?dwidth","?dheight"]]
7745
- },
7746
7742
  {
7747
7743
  name: "drawElementImage",
7748
7744
  signatures: [["element","dx","dy","?dwidth","?dheight"],["element","sx","sy","swidth","sheight","dx","dy","?dwidth","?dheight"]]
7749
7745
  },
7746
+ {
7747
+ name: "CanvasFilter",
7748
+ signatures: [["init"]]
7749
+ },
7750
7750
  {
7751
7751
  name: "Path2D",
7752
7752
  signatures: [["?path"]]
@@ -9073,10 +9073,6 @@ export const NativeFunctions = [
9073
9073
  name: "texElementImage2D",
9074
9074
  signatures: [["target","level","internalformat","format","type","element"],["target","level","internalformat","width","height","format","type","element"],["target","level","internalformat","sx","sy","swidth","sheight","format","type","element"],["target","level","internalformat","sx","sy","swidth","sheight","width","height","format","type","element"]]
9075
9075
  },
9076
- {
9077
- name: "texElement2D",
9078
- signatures: [["target","level","internalformat","format","type","element"],["target","level","internalformat","width","height","format","type","element"],["target","level","internalformat","sx","sy","swidth","sheight","format","type","element"],["target","level","internalformat","sx","sy","swidth","sheight","width","height","format","type","element"]]
9079
- },
9080
9076
  {
9081
9077
  name: "drawingBufferStorage",
9082
9078
  signatures: [["sizedformat","width","height"]]
@@ -539,15 +539,13 @@ function defaultView(input: ViewInput, output: PanelViewOutput, target: HTMLElem
539
539
  <div slot="main" class="main-view">
540
540
  ${renderState()}
541
541
  </div>
542
- <div slot="sidebar" class="sidebar-view">
543
- ${shouldShowWalkthrough ? html`
544
- <devtools-widget ${widget(WalkthroughView, {
545
- message: input.props.walkthrough.activeSidebarMessage,
546
- isLoading: input.props.isLoading && walkthroughIsForLastMessage,
547
- markdownRenderer: input.props.markdownRenderer,
548
- onToggle: input.props.walkthrough.onToggle,
549
- })}></devtools-widget>` : Lit.nothing}
550
- </div>
542
+ ${shouldShowWalkthrough ? html`
543
+ <devtools-widget slot="sidebar" ${widget(WalkthroughView, {
544
+ message: input.props.walkthrough.activeSidebarMessage,
545
+ isLoading: input.props.isLoading && walkthroughIsForLastMessage,
546
+ markdownRenderer: input.props.markdownRenderer,
547
+ onToggle: input.props.walkthrough.onToggle,
548
+ })}></devtools-widget>` : Lit.nothing}
551
549
  </devtools-split-view>
552
550
  </div>
553
551
  `, target);
@@ -199,7 +199,7 @@ const UIStringsNotTranslate = {
199
199
  /**
200
200
  * @description The title of the button that allows exporting the conversation for agents.
201
201
  */
202
- exportForAgents: 'Copy for your coding agent',
202
+ exportForAgents: 'Copy to coding agent',
203
203
  /**
204
204
  * @description Title for the bottom up thread activity widget.
205
205
  */
@@ -417,6 +417,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
417
417
  ` : Lit.nothing}
418
418
  ${input.showActions ? renderActions(input, output) : Lit.nothing}
419
419
  </div>
420
+ ${hasAiV2 ? renderSideEffectStepsUI(input, steps) : Lit.nothing}
420
421
  </section>
421
422
  `, target);
422
423
  // clang-format on
@@ -609,7 +610,6 @@ function renderWalkthroughUI(input: ChatMessageViewInput, steps: Step[]): Lit.Li
609
610
  // No steps = no walkthrough UI in the chat view.
610
611
  return Lit.nothing;
611
612
  }
612
- const sideEffectSteps = steps.filter(s => s.requestApproval);
613
613
  // If the walkthrough is in the sidebar, we render a button into the
614
614
  // ChatView to open it.
615
615
  const openWalkThroughSidebarButton =
@@ -622,22 +622,6 @@ function renderWalkthroughUI(input: ChatMessageViewInput, steps: Step[]): Lit.Li
622
622
  input.walkthrough.inlineExpandedMessages.includes(input.message as ModelChatMessage) :
623
623
  (input.walkthrough.isExpanded && input.walkthrough.activeSidebarMessage === input.message);
624
624
 
625
- // When a side-effect step is present and needs user approval, it's
626
- // shown in the main chat UI, regardless of if the walkthrough is
627
- // open or closed.
628
- // Once the user has approved/denied it, it goes back into the sidebar.
629
- // clang-format off
630
- const sideEffectStepsUI = sideEffectSteps.length > 0 ? sideEffectSteps.map(step => html`
631
- <div class="side-effect-container">
632
- ${renderStep({
633
- step,
634
- isLoading: input.isLoading,
635
- markdownRenderer: input.markdownRenderer,
636
- isLast: true
637
- })}
638
- </div> `) : Lit.nothing;
639
- // clang-format on
640
-
641
625
  // clang-format off
642
626
  const walkthroughInline = input.walkthrough.isInlined ? html`
643
627
  <div class="walkthrough-container">
@@ -656,7 +640,26 @@ function renderWalkthroughUI(input: ChatMessageViewInput, steps: Step[]): Lit.Li
656
640
  return html`
657
641
  ${openWalkThroughSidebarButton}
658
642
  ${walkthroughInline}
659
- ${sideEffectStepsUI}
643
+ `;
644
+ // clang-format on
645
+ }
646
+
647
+ function renderSideEffectStepsUI(input: ChatMessageViewInput, steps: Step[]): Lit.LitTemplate {
648
+ const sideEffectSteps = steps.filter(s => s.requestApproval);
649
+ if (sideEffectSteps.length === 0) {
650
+ return Lit.nothing;
651
+ }
652
+ // clang-format off
653
+ return html`
654
+ ${sideEffectSteps.map(step => html`
655
+ <div class="side-effect-container">
656
+ ${renderStep({
657
+ step,
658
+ isLoading: input.isLoading,
659
+ markdownRenderer: input.markdownRenderer,
660
+ isLast: true
661
+ })}
662
+ </div> `)}
660
663
  `;
661
664
  // clang-format on
662
665
  }
@@ -19,7 +19,7 @@ const UIStrings = {
19
19
  /**
20
20
  * @description Title for the export for agents dialog.
21
21
  */
22
- exportForAgents: 'Copy for your coding agent',
22
+ exportForAgents: 'Copy to coding agent',
23
23
  /**
24
24
  * @description Button text for copying to clipboard.
25
25
  */
@@ -246,6 +246,7 @@ export class WalkthroughView extends UI.Widget.Widget {
246
246
  constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
247
247
  super(element);
248
248
  this.#view = view;
249
+ this.setMinimumSize(330, 0);
249
250
  }
250
251
 
251
252
  override wasShown(): void {
@@ -13,6 +13,8 @@
13
13
  align-items: center;
14
14
  margin-block: calc(-1 * var(--sys-size-3));
15
15
  margin-top: var(--sys-size-5);
16
+ overflow: hidden;
17
+ mask-image: linear-gradient(to right, var(--ref-palette-neutral0) calc(100% - var(--sys-size-15)), transparent 100%);
16
18
 
17
19
  &.not-v2 {
18
20
  /* Can be removed when AIv2 ships */
@@ -99,23 +99,24 @@
99
99
 
100
100
  .inline-wrapper {
101
101
  display: flex;
102
- /* Note: no gap here; the gap is dealt with in padding on the text */
103
- align-items: flex-start;
102
+ align-items: center;
103
+ gap: var(--sys-size-2);
104
104
  justify-content: flex-start;
105
105
 
106
106
  .inline-icon {
107
107
  display: block;
108
- margin-top: var(--sys-size-2);
108
+ margin-top: var(--sys-size-2);
109
109
  }
110
110
  }
111
111
 
112
112
  .walkthrough-inline {
113
- border-radius: var(--sys-size-5);
113
+ border-radius: var(--sys-shape-corner-full);
114
114
  overflow: hidden;
115
115
  width: fit-content;
116
116
  max-width: 100%;
117
117
 
118
118
  &[open] {
119
+ border-radius: var(--sys-size-5);
119
120
  width: auto;
120
121
  background-color: var(--sys-color-surface1);
121
122
  margin-left: calc(var(--sys-size-6) / 2);
@@ -159,7 +159,6 @@ export class LighthousePanel extends UI.Panel.Panel {
159
159
  this.renderStatusView();
160
160
  const {lhr, artifacts} = await this.controller.collectLighthouseResults();
161
161
  this.buildReportUI(lhr, artifacts);
162
- UI.Context.Context.instance().setFlavor(ActiveLighthouseReport, new ActiveLighthouseReport(lhr));
163
162
  return {report: lhr};
164
163
  } catch (err) {
165
164
  this.handleError(err);
@@ -278,6 +277,7 @@ export class LighthousePanel extends UI.Panel.Panel {
278
277
  this.statusView.hide();
279
278
 
280
279
  this.reportSelector.selectNewReport();
280
+ UI.Context.Context.instance().setFlavor(ActiveLighthouseReport, null);
281
281
  this.contentElement.classList.toggle('in-progress', false);
282
282
 
283
283
  this.startView.show(this.contentElement);
@@ -324,6 +324,8 @@ export class LighthousePanel extends UI.Panel.Panel {
324
324
  this.newButton.setEnabled(true);
325
325
  this.refreshToolbarUI();
326
326
 
327
+ UI.Context.Context.instance().setFlavor(ActiveLighthouseReport, new ActiveLighthouseReport(lighthouseResult));
328
+
327
329
  const cachedRenderedReport = this.cachedRenderedReports.get(lighthouseResult);
328
330
  if (cachedRenderedReport) {
329
331
  this.auditResultsElement.appendChild(cachedRenderedReport);
@@ -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: 5b539f63dc636f6b69d9c294a65bc5aff0bea3de
4
+ Revision: 295046833fe5ffe7765e09abf4e9c15980d09e76
5
5
  Update Mechanism: Manual (https://crbug.com/428069060)
6
6
  License: BSD-3-Clause
7
7
  License File: LICENSE
@@ -1850,6 +1850,7 @@ export const knownContextValues = new Set([
1850
1850
  'gu',
1851
1851
  'gutter',
1852
1852
  'gzip',
1853
+ 'hanging-punctuation',
1853
1854
  'hardware-concurrency',
1854
1855
  'hardware-concurrency-reset',
1855
1856
  'hardware-concurrency-selector',
package/mcp/mcp.ts CHANGED
@@ -28,6 +28,7 @@ export {Target} from '../front_end/core/sdk/Target.js';
28
28
  export {TargetManager} from '../front_end/core/sdk/TargetManager.js';
29
29
  export * as Foundation from '../front_end/foundation/foundation.js';
30
30
  export * as Protocol from '../front_end/generated/protocol.js';
31
+ export {NetworkRequestFormatter} from '../front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.js';
31
32
  export {
32
33
  PerformanceInsightFormatter
33
34
  } from '../front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.js';
package/package.json CHANGED
@@ -49,8 +49,8 @@
49
49
  "@types/webidl2": "24.4.3",
50
50
  "@types/yargs": "17.0.35",
51
51
  "@types/yargs-unparser": "2.0.3",
52
- "@typescript-eslint/rule-tester": "8.47.0",
53
- "@typescript-eslint/utils": "8.47.0",
52
+ "@typescript-eslint/rule-tester": "8.58.0",
53
+ "@typescript-eslint/utils": "8.58.0",
54
54
  "@web/rollup-plugin-import-meta-assets": "2.3.0",
55
55
  "chai": "4.3.4",
56
56
  "cssnano": "7.1.2",
@@ -90,14 +90,13 @@
90
90
  "terser": "5.44.1",
91
91
  "ts-lit-plugin": "2.0.2",
92
92
  "typescript": "5.9.3",
93
- "typescript-eslint": "8.47.0",
93
+ "typescript-eslint": "8.58.0",
94
94
  "uuid": "13.0.0",
95
95
  "webidl2": "24.5.0",
96
96
  "yargs": "17.7.2",
97
97
  "js-rouge": "3.2.0"
98
98
  },
99
99
  "overrides": {
100
- "@typescript-eslint/types": "8.47.0",
101
100
  "baseline-browser-mapping": "2.8.25",
102
101
  "electron-to-chromium": "1.5.248",
103
102
  "caniuse-lite": "1.0.30001754",
@@ -105,5 +104,5 @@
105
104
  "flat-cache": "6.1.12"
106
105
  }
107
106
  },
108
- "version": "1.0.1609381"
107
+ "version": "1.0.1611099"
109
108
  }