chrome-devtools-frontend 1.0.1611099 → 1.0.1611825

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 (33) hide show
  1. package/front_end/core/host/AidaClientTypes.ts +5 -0
  2. package/front_end/core/host/AidaGcaTranslation.ts +2 -1
  3. package/front_end/core/sdk/ResourceTreeModel.ts +2 -1
  4. package/front_end/core/sdk/Target.ts +1 -3
  5. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  6. package/front_end/generated/SupportedCSSProperties.js +4 -0
  7. package/front_end/generated/protocol.ts +0 -8
  8. package/front_end/models/web_mcp/WebMCPModel.ts +73 -18
  9. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +2 -3
  10. package/front_end/panels/ai_assistance/components/ChatMessage.ts +30 -7
  11. package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +8 -4
  12. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +6 -2
  13. package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +1 -1
  14. package/front_end/panels/ai_assistance/components/walkthroughView.css +18 -17
  15. package/front_end/panels/application/WebMCPView.ts +97 -6
  16. package/front_end/panels/application/webMCPView.css +7 -1
  17. package/front_end/panels/console/ConsolePinPane.ts +6 -2
  18. package/front_end/panels/sources/BreakpointEditDialog.ts +6 -0
  19. package/front_end/third_party/chromium/README.chromium +1 -1
  20. package/front_end/third_party/lighthouse/README.chromium +2 -2
  21. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +5635 -1498
  22. package/front_end/third_party/lighthouse/locales/en-GB.json +2 -2
  23. package/front_end/third_party/lighthouse/locales/en-US.json +14 -2
  24. package/front_end/third_party/lighthouse/locales/en-XL.json +12 -0
  25. package/front_end/third_party/lighthouse/report/bundle.d.ts +4 -4
  26. package/front_end/third_party/lighthouse/report/bundle.js +30 -3
  27. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
  28. package/front_end/ui/components/markdown_view/CodeBlock.ts +6 -0
  29. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +83 -68
  30. package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
  31. package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
  32. package/mcp/mcp.ts +2 -1
  33. package/package.json +1 -1
@@ -433,19 +433,23 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
433
433
  @click=${() => input.onCallSelect(null)}
434
434
  ></devtools-button>
435
435
  <devtools-widget
436
- id="details"
436
+ id="webmcp.tool-details"
437
437
  title=${i18nString(UIStrings.toolDetails)}
438
438
  ${widget(ToolDetailsWidget, {tool: input.selectedCall?.tool})}>
439
439
  </devtools-widget>
440
440
  <devtools-widget
441
- id="inputs"
441
+ id="webmcp.call-inputs"
442
442
  title=${i18nString(UIStrings.input)}
443
443
  ${widget(PayloadWidget, parsePayload(input.selectedCall?.input))}>
444
444
  </devtools-widget>
445
445
  <devtools-widget
446
- id="outputs"
446
+ id="webmcp.call-outputs"
447
447
  title=${i18nString(UIStrings.output)}
448
- ${widget(PayloadWidget, parsePayload(input.selectedCall?.result?.output))}>
448
+ ${widget(PayloadWidget, {
449
+ valueObject: input.selectedCall?.result?.output,
450
+ errorText: input.selectedCall?.result?.errorText,
451
+ exceptionDetails: input.selectedCall?.result?.exceptionDetails,
452
+ })}>
449
453
  </devtools-widget>
450
454
  </devtools-tabbed-pane>
451
455
  </div>
@@ -685,10 +689,12 @@ export class WebMCPView extends UI.Widget.VBox {
685
689
  export interface PayloadViewInput {
686
690
  valueObject?: unknown;
687
691
  valueString?: string;
692
+ errorText?: string;
693
+ exceptionDetails?: WebMCP.WebMCPModel.ExceptionDetails;
688
694
  }
689
695
 
690
696
  export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, target: HTMLElement): void => {
691
- if (input.valueObject === undefined && input.valueString === undefined) {
697
+ if (!input.valueObject && !input.valueString && !input.errorText && !input.exceptionDetails) {
692
698
  render(nothing, target);
693
699
  return;
694
700
  }
@@ -715,6 +721,52 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
715
721
  };
716
722
 
717
723
  const createSourceText = (text: string): TemplateResult => html`<div class="payload-value source-code">${text}</div>`;
724
+ const createErrorText = (text: string): TemplateResult =>
725
+ html`<div class="payload-value source-code error-text">${text}</div>`;
726
+
727
+ const createException = (
728
+ details: WebMCP.WebMCPModel.ExceptionDetails,
729
+ linkifier: Components.Linkifier.Linkifier = new Components.Linkifier.Linkifier(),
730
+ ): TemplateResult => {
731
+ const renderFrame = (
732
+ frame: StackTrace.ErrorStackParser.ParsedErrorFrame,
733
+ index: number,
734
+ array: StackTrace.ErrorStackParser.ParsedErrorFrame[],
735
+ ): TemplateResult => {
736
+ const newline = index < array.length - 1 ? '\n' : '';
737
+ const {line, link, isCallFrame} = frame;
738
+
739
+ if (!isCallFrame) {
740
+ return html`<span>${line}${newline}</span>`;
741
+ }
742
+
743
+ if (!link) {
744
+ return html`<span class="formatted-builtin-stack-frame">${line}${newline}</span>`;
745
+ }
746
+
747
+ const scriptLocationLink = linkifier.linkifyScriptLocation(
748
+ details.error.runtimeModel().target(),
749
+ link.scriptId || null,
750
+ link.url,
751
+ link.lineNumber,
752
+ {
753
+ columnNumber: link.columnNumber,
754
+ inlineFrameIndex: 0,
755
+ showColumnNumber: true,
756
+ },
757
+ );
758
+ scriptLocationLink.tabIndex = -1;
759
+
760
+ return html`<span class="formatted-stack-frame">${link.prefix}${scriptLocationLink}${link.suffix}${
761
+ newline}</span>`;
762
+ };
763
+
764
+ return html`
765
+ <div class="payload-value source-code error-text">
766
+ ${details.frames.length === 0 && details.description ? html`<span>${details.description}\n</span>` : nothing}
767
+ <div>${details.frames.map(renderFrame)}</div>
768
+ ${details.cause ? html`\nCaused by:\n${createException(details.cause, linkifier)}` : nothing}</div>`;
769
+ };
718
770
 
719
771
  render(
720
772
  html`
@@ -723,7 +775,10 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
723
775
  <div class="call-payload-content">
724
776
  ${
725
777
  isParsable ? createPayload(input.valueObject) :
726
- (input.valueString !== undefined ? createSourceText(input.valueString) : nothing)}
778
+ (input.valueString !== undefined ?
779
+ createSourceText(input.valueString) :
780
+ (input.exceptionDetails ? createException(input.exceptionDetails) :
781
+ (input.errorText ? createErrorText(input.errorText) : nothing)))}
727
782
  </div>
728
783
  </div>
729
784
  `,
@@ -733,6 +788,9 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
733
788
  export class PayloadWidget extends UI.Widget.Widget {
734
789
  #valueObject?: unknown;
735
790
  #valueString?: string;
791
+ #errorText?: string;
792
+ #exceptionDetailsPromise?: Promise<WebMCP.WebMCPModel.ExceptionDetails|undefined>;
793
+ #exceptionDetails?: WebMCP.WebMCPModel.ExceptionDetails;
736
794
  #view: typeof PAYLOAD_DEFAULT_VIEW;
737
795
 
738
796
  constructor(element?: HTMLElement, view = PAYLOAD_DEFAULT_VIEW) {
@@ -758,6 +816,37 @@ export class PayloadWidget extends UI.Widget.Widget {
758
816
  return this.#valueString;
759
817
  }
760
818
 
819
+ set errorText(errorText: string|undefined) {
820
+ this.#errorText = errorText;
821
+ this.requestUpdate();
822
+ }
823
+
824
+ get errorText(): string|undefined {
825
+ return this.#errorText;
826
+ }
827
+
828
+ async #updateExceptionDetails(
829
+ exceptionDetailsPromise: Promise<WebMCP.WebMCPModel.ExceptionDetails|undefined>|undefined): Promise<void> {
830
+ if (this.#exceptionDetailsPromise === exceptionDetailsPromise) {
831
+ return;
832
+ }
833
+ this.#exceptionDetailsPromise = exceptionDetailsPromise;
834
+ this.#exceptionDetails = undefined;
835
+ this.requestUpdate();
836
+ const exceptionDetails = await exceptionDetailsPromise;
837
+ if (this.#exceptionDetailsPromise === exceptionDetailsPromise) {
838
+ this.#exceptionDetails = exceptionDetails;
839
+ this.requestUpdate();
840
+ }
841
+ }
842
+
843
+ set exceptionDetails(exceptionDetailsPromise: Promise<WebMCP.WebMCPModel.ExceptionDetails|undefined>|undefined) {
844
+ void this.#updateExceptionDetails(exceptionDetailsPromise);
845
+ }
846
+
847
+ get exceptionDetails(): Promise<WebMCP.WebMCPModel.ExceptionDetails|undefined>|undefined {
848
+ return this.#exceptionDetailsPromise;
849
+ }
761
850
  override wasShown(): void {
762
851
  super.wasShown();
763
852
  this.requestUpdate();
@@ -767,6 +856,8 @@ export class PayloadWidget extends UI.Widget.Widget {
767
856
  const input: PayloadViewInput = {
768
857
  valueObject: this.#valueObject,
769
858
  valueString: this.#valueString,
859
+ errorText: this.#errorText,
860
+ exceptionDetails: this.#exceptionDetails,
770
861
  };
771
862
  this.#view(input, {}, this.contentElement);
772
863
  }
@@ -48,7 +48,8 @@
48
48
  background-color: var(--sys-color-tonal-container);
49
49
  }
50
50
 
51
- tr.selected.status-error {
51
+ tbody tr.selected.status-error,
52
+ tbody tr.selected.status-error.revealed {
52
53
  background-color: var(--sys-color-error-container);
53
54
  color: var(--sys-color-error);
54
55
  }
@@ -210,4 +211,9 @@
210
211
  flex: auto;
211
212
  overflow: auto;
212
213
  }
214
+
215
+ .payload-value.error-text {
216
+ color: var(--sys-color-error);
217
+ white-space: pre-wrap;
218
+ }
213
219
  }
@@ -19,7 +19,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
19
19
 
20
20
  import consolePinPaneStyles from './consolePinPane.css.js';
21
21
 
22
- const {createRef, ref} = Directives;
22
+ const {createRef, ref, repeat} = Directives;
23
23
  const {widget} = UI.Widget;
24
24
 
25
25
  const UIStrings = {
@@ -72,7 +72,7 @@ export const DEFAULT_PANE_VIEW = (input: PaneViewInput, _output: object, target:
72
72
  render(html`
73
73
  <style>${consolePinPaneStyles}</style>
74
74
  <div class='console-pins monospace' jslog=${VisualLogging.pane('console-pins')} @contextmenu=${input.onContextMenu}>
75
- ${input.pins.map(pin => widget(ConsolePinPresenter, {
75
+ ${repeat(input.pins, pin => pin, pin => widget(ConsolePinPresenter, {
76
76
  pin,
77
77
  focusOut: input.focusOut,
78
78
  onRemove: () => input.onRemove(pin),
@@ -298,6 +298,10 @@ export class ConsolePinPresenter extends UI.Widget.Widget {
298
298
  set pin(pin: ConsolePin) {
299
299
  this.#pin?.removeEventListener(ConsolePinEvent.EVALUATE_RESULT_READY, this.requestUpdate, this);
300
300
  this.#pin = pin;
301
+ // Clear the existing editor reference so `performUpdate()` creates
302
+ // a new EditorState with the new pin's text, rather than reusing
303
+ // the stale one from the previous pin.
304
+ this.#editor = undefined;
301
305
  this.#pin.setEditor(this.#pinEditor);
302
306
  this.#pin.addEventListener(ConsolePinEvent.EVALUATE_RESULT_READY, this.requestUpdate, this);
303
307
  this.requestUpdate();
@@ -208,6 +208,12 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
208
208
  this.requestUpdate();
209
209
  }
210
210
 
211
+ override focus(): void {
212
+ void this.updateComplete.then(() => {
213
+ this.#editor?.focus();
214
+ });
215
+ }
216
+
211
217
  override performUpdate(): void {
212
218
  const input: ViewInput = {
213
219
  state: this.#getEditorState(),
@@ -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: 295046833fe5ffe7765e09abf4e9c15980d09e76
4
+ Revision: ba9b7fcecd6da792b29305cac5a406adc76fc1e5
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.0.2
4
- Revision: 440f8bf87117ef61dc970c3ce4cebf91d46eb181
3
+ Version: 13.1.0
4
+ Revision: 0248afea9c9443c9fddd73e705256e38e8c6e042
5
5
  Update Mechanism: Manual
6
6
  URL: https://github.com/GoogleChrome/lighthouse
7
7
  License: Apache-2.0