chrome-devtools-frontend 1.0.1549484 → 1.0.1553956
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/docs/styleguide/ux/components.md +84 -17
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/ui_engineering.md +2 -2
- package/eslint.config.mjs +7 -0
- package/front_end/Images/generate-css-vars.js +8 -4
- package/front_end/core/common/Settings.ts +20 -8
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/i18n/collect-ui-strings.js +19 -10
- package/front_end/core/i18n/generate-locales-js.js +4 -4
- package/front_end/core/protocol_client/CDPConnection.ts +1 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +5 -1
- package/front_end/core/root/Runtime.ts +0 -12
- package/front_end/core/sdk/DOMModel.ts +38 -3
- package/front_end/core/sdk/DebuggerModel.ts +9 -4
- package/front_end/core/sdk/IsolateManager.ts +7 -0
- package/front_end/core/sdk/NetworkManager.ts +12 -10
- package/front_end/core/sdk/PageResourceLoader.ts +11 -4
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/core/sdk/SourceMapManager.ts +12 -6
- package/front_end/entrypoints/main/MainImpl.ts +28 -19
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -2
- package/front_end/generated/SupportedCSSProperties.js +14 -0
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +6 -0
- package/front_end/generated/protocol.ts +76 -0
- package/front_end/models/ai_assistance/AiConversation.ts +94 -4
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +30 -15
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +179 -41
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +5 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +62 -0
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +1 -7
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +124 -12
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +125 -30
- package/front_end/models/ai_assistance/performance/AICallTree.ts +42 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +12 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
- package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
- package/front_end/models/issues_manager/CookieIssue.ts +27 -30
- package/front_end/models/issues_manager/CorsIssue.ts +8 -17
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/GenericIssue.ts +11 -16
- package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
- package/front_end/models/issues_manager/Issue.ts +13 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +17 -2
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
- package/front_end/models/issues_manager/PermissionElementIssue.ts +262 -0
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
- package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -13
- package/front_end/models/stack_trace/StackTraceModel.ts +37 -18
- package/front_end/models/trace/Processor.ts +14 -15
- package/front_end/models/trace/insights/Common.ts +2 -8
- package/front_end/models/trace/insights/types.ts +12 -2
- package/front_end/models/trace/types/TraceEvents.ts +4 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +28 -6
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +9 -23
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +78 -2
- package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +71 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentFlameChart.ts +126 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +131 -2
- package/front_end/panels/ai_assistance/components/chatView.css +28 -0
- package/front_end/panels/ai_assistance/components/collapsibleAssistanceContentWidget.css +33 -0
- package/front_end/panels/application/AppManifestView.ts +1007 -521
- package/front_end/panels/application/ApplicationPanelSidebar.ts +22 -38
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -5
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/KeyValueStorageItemsView.ts +3 -2
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
- package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +46 -45
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +80 -75
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +169 -133
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +74 -93
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +143 -118
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +52 -12
- package/front_end/panels/application/preloading/components/components.ts +0 -2
- package/front_end/panels/changes/ChangesSidebar.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -0
- package/front_end/panels/common/Annotation.ts +184 -0
- package/front_end/panels/common/AnnotationManager.ts +208 -0
- package/front_end/panels/common/ExtensionView.ts +47 -0
- package/front_end/panels/common/PersistenceUtils.ts +22 -26
- package/front_end/panels/common/annotation.css +40 -0
- package/front_end/panels/common/common.ts +2 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +187 -5
- package/front_end/panels/console/ConsolePinPane.ts +437 -217
- package/front_end/panels/console/ConsolePrompt.ts +36 -227
- package/front_end/panels/console/ConsoleView.ts +69 -68
- package/front_end/panels/console/ConsoleViewMessage.ts +18 -14
- package/front_end/panels/console/consoleInsightTeaser.css +23 -0
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +5 -5
- package/front_end/panels/elements/ComputedStyleWidget.ts +16 -5
- package/front_end/panels/elements/ElementsPanel.ts +75 -0
- package/front_end/panels/elements/ElementsSidebarPane.ts +1 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +459 -451
- package/front_end/panels/elements/ElementsTreeOutline.ts +48 -15
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -20
- package/front_end/panels/elements/StylesSidebarPane.ts +5 -6
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
- package/front_end/panels/emulation/MediaQueryInspector.ts +171 -125
- package/front_end/panels/explain/components/ConsoleInsight.ts +181 -154
- package/front_end/panels/explain/components/consoleInsight.css +348 -347
- package/front_end/panels/issues/AffectedPermissionElementsView.ts +46 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +6 -4
- package/front_end/panels/issues/IssuesPane.ts +6 -0
- package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +165 -149
- package/front_end/panels/layer_viewer/Layers3DView.ts +131 -78
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +149 -100
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +91 -65
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +25 -34
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +61 -45
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +171 -152
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +50 -51
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +0 -13
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +20 -18
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/mobile_throttling/CalibrationController.ts +3 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +2 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +17 -9
- package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
- package/front_end/panels/network/NetworkItemView.ts +46 -7
- package/front_end/panels/network/NetworkLogView.ts +10 -11
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkPanel.ts +63 -1
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +146 -113
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/RequestHeaderSection.css +51 -50
- package/front_end/panels/network/components/RequestHeaderSection.ts +81 -71
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/network/components/RequestHeadersView.ts +26 -11
- package/front_end/panels/network/components/RequestTrustTokensView.css +24 -14
- package/front_end/panels/network/components/RequestTrustTokensView.ts +145 -142
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/IsolateSelector.ts +2 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +49 -33
- package/front_end/panels/recorder/RecorderController.ts +2 -3
- package/front_end/panels/recorder/components/ControlButton.ts +68 -34
- package/front_end/panels/recorder/components/CreateRecordingView.ts +10 -7
- package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +82 -89
- package/front_end/panels/recorder/components/ReplaySection.ts +226 -145
- package/front_end/panels/recorder/{controllers → components}/SelectorPicker.ts +129 -52
- package/front_end/panels/recorder/components/StepEditor.ts +21 -67
- package/front_end/panels/recorder/components/StepView.ts +223 -181
- package/front_end/panels/recorder/components/TimelineSection.ts +69 -48
- package/front_end/panels/recorder/components/components.ts +2 -2
- package/front_end/panels/recorder/components/selectorPicker.css +14 -0
- package/front_end/panels/recorder/components/stepEditor.css +0 -5
- package/front_end/panels/recorder/components/stepView.css +196 -198
- package/front_end/panels/recorder/extensions/ExtensionManager.ts +4 -48
- package/front_end/panels/recorder/models/ScreenshotUtils.ts +17 -11
- package/front_end/panels/screencast/ScreencastView.ts +8 -8
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
- package/front_end/panels/security/CookieControlsView.ts +9 -16
- package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -4
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/settings/components/SyncSection.ts +0 -1
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -8
- package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +6 -6
- package/front_end/panels/sources/CallStackSidebarPane.ts +63 -78
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +39 -30
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -7
- package/front_end/panels/sources/NavigatorView.ts +2 -2
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -15
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -26
- package/front_end/panels/sources/SourcesPanel.ts +1 -11
- package/front_end/panels/sources/SourcesView.ts +2 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +13 -11
- package/front_end/panels/sources/ThreadsSidebarPane.ts +96 -101
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -5
- package/front_end/panels/sources/threadsSidebarPane.css +6 -5
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +2 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +23 -33
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +4 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +12 -0
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +17 -14
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +164 -142
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +48 -28
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +18 -23
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +99 -74
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +9 -12
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +262 -291
- package/front_end/panels/timeline/components/Utils.ts +25 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +210 -146
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +8 -20
- package/front_end/panels/timeline/components/insights/Cache.ts +0 -9
- package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
- package/front_end/panels/timeline/components/insights/DOMSize.ts +12 -34
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +0 -9
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/EventRef.ts +47 -109
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +0 -9
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +0 -9
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +2 -11
- package/front_end/panels/timeline/components/insights/ImageRef.ts +112 -0
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +91 -0
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +4 -11
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +0 -9
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +7 -22
- package/front_end/panels/timeline/components/insights/NodeLink.ts +68 -43
- package/front_end/panels/timeline/components/insights/README.md +2 -3
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +0 -9
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +0 -9
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +0 -9
- package/front_end/panels/timeline/components/insights/Viewport.ts +7 -19
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +5 -0
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/timeline/components/interactionBreakdown.css +15 -13
- package/front_end/panels/timeline/enable-easter-egg.js +7 -3
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/panels/utils/utils.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +5 -24
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +182 -95
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +4 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +31 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/BluetoothEmulation.ts +103 -0
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +96 -1
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +2 -10
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BluetoothEmulation.ts +52 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +15 -0
- package/front_end/third_party/puppeteer/package/src/bidi/DeviceRequestPrompt.ts +138 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +10 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +30 -2
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BluetoothEmulation.ts +47 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +33 -3
- package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +3 -8
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +8 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +45 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +20 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +5 -17
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +23 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +4 -0
- package/front_end/ui/components/adorners/Adorner.ts +20 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +154 -14
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +15 -2
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +3 -3
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +0 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaserPlaceholder.ts +12 -3
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +182 -0
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/helpers/OpenInNewTab.ts +5 -1
- package/front_end/ui/i18n/i18n.ts +9 -9
- package/front_end/ui/kit/cards/Card.docs.ts +43 -0
- package/front_end/ui/kit/icons/Icon.docs.ts +34 -0
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +4 -4
- package/front_end/ui/kit/kit.ts +2 -0
- package/front_end/ui/kit/link/Link.docs.ts +15 -0
- package/front_end/ui/kit/link/Link.ts +151 -0
- package/front_end/ui/kit/link/link.css +27 -0
- package/front_end/ui/legacy/EmptyWidget.ts +6 -0
- package/front_end/ui/legacy/Floaty.ts +442 -0
- package/front_end/ui/legacy/Infobar.ts +3 -3
- package/front_end/ui/legacy/InspectorView.ts +15 -3
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -2
- package/front_end/ui/legacy/SelectMenu.docs.ts +0 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +139 -61
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -4
- package/front_end/ui/legacy/ViewManager.ts +4 -4
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +5 -5
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +36 -36
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +22 -37
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +31 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +22 -29
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -15
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -14
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -11
- package/front_end/ui/legacy/floaty.css +77 -0
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -0
- package/inspector_overlay/loadCSS.rollup.js +5 -4
- package/mcp/mcp.ts +1 -0
- package/package.json +2 -2
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +0 -99
- package/front_end/panels/recorder/components/SelectButton.ts +0 -304
- package/front_end/panels/recorder/controllers/controllers.ts +0 -7
- package/front_end/ui/components/chrome_link/ChromeLink.ts +0 -76
- package/front_end/ui/components/chrome_link/chromeLink.css +0 -12
- package/front_end/ui/components/chrome_link/chrome_link.ts +0 -9
- package/front_end/ui/components/icon_button/Icon.docs.ts +0 -78
- /package/front_end/panels/recorder/components/{selectButton.css → replaySection.css} +0 -0
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -8,6 +8,7 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
8
8
|
import * as Root from '../../../core/root/root.js';
|
|
9
9
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
10
10
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
11
|
+
import * as Annotations from '../../../ui/components/annotations/annotations.js';
|
|
11
12
|
import {ChangeManager} from '../ChangeManager.js';
|
|
12
13
|
import {debugLog} from '../debug.js';
|
|
13
14
|
import {EvaluateAction, formatError, SideEffectError} from '../EvaluateAction.js';
|
|
@@ -410,6 +411,37 @@ const data = {
|
|
|
410
411
|
return await this.executeAction(params.code, options);
|
|
411
412
|
},
|
|
412
413
|
});
|
|
414
|
+
|
|
415
|
+
if (Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
416
|
+
this.declareFunction<{
|
|
417
|
+
elementId: string,
|
|
418
|
+
annotationMessage: string,
|
|
419
|
+
}>('addElementAnnotation', {
|
|
420
|
+
description: 'Adds a visual annotation in the Elements panel, attached to a node with ' +
|
|
421
|
+
'the specific UID provided. Use it to highlight nodes in the Elements panel ' +
|
|
422
|
+
'and provide contextual suggestions to the user related to their queries.',
|
|
423
|
+
parameters: {
|
|
424
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
425
|
+
description: '',
|
|
426
|
+
nullable: false,
|
|
427
|
+
properties: {
|
|
428
|
+
elementId: {
|
|
429
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
430
|
+
description: 'The UID of the element to annotate.',
|
|
431
|
+
nullable: false,
|
|
432
|
+
},
|
|
433
|
+
annotationMessage: {
|
|
434
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
435
|
+
description: 'The message the annotation should show to the user.',
|
|
436
|
+
nullable: false,
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
handler: async params => {
|
|
441
|
+
return await this.addElementAnnotation(params.elementId, params.annotationMessage);
|
|
442
|
+
},
|
|
443
|
+
});
|
|
444
|
+
}
|
|
413
445
|
}
|
|
414
446
|
|
|
415
447
|
async generateObservation(
|
|
@@ -681,6 +713,36 @@ const data = {
|
|
|
681
713
|
}
|
|
682
714
|
}
|
|
683
715
|
|
|
716
|
+
async addElementAnnotation(elementId: string, annotationMessage: string):
|
|
717
|
+
Promise<FunctionCallHandlerResult<unknown>> {
|
|
718
|
+
if (!Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
719
|
+
console.warn('Received agent request to add annotation with annotations disabled');
|
|
720
|
+
return {error: 'Annotations are not currently enabled'};
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// eslint-disable-next-line no-console
|
|
724
|
+
console.log(
|
|
725
|
+
`AI AGENT EVENT: Styling Agent adding annotation for element ${elementId} with message '${annotationMessage}'`);
|
|
726
|
+
const selectedNode = this.#getSelectedNode();
|
|
727
|
+
if (!selectedNode) {
|
|
728
|
+
return {error: 'Error: Unable to find currently selected element.'};
|
|
729
|
+
}
|
|
730
|
+
const domModel = selectedNode.domModel();
|
|
731
|
+
const backendNodeId = Number(elementId) as Protocol.DOM.BackendNodeId;
|
|
732
|
+
const nodeMap = await domModel.pushNodesByBackendIdsToFrontend(new Set([backendNodeId]));
|
|
733
|
+
const node = nodeMap?.get(backendNodeId);
|
|
734
|
+
|
|
735
|
+
if (!node) {
|
|
736
|
+
return {error: `Error: Could not find the element with backendNodeId=${elementId}`};
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
Annotations.AnnotationRepository.instance().addElementsAnnotation(annotationMessage, node);
|
|
740
|
+
|
|
741
|
+
return {
|
|
742
|
+
result: `Annotation added for element ${elementId}: ${annotationMessage}`,
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
|
|
684
746
|
override async *
|
|
685
747
|
handleContextDetails(selectedElement: ConversationContext<SDK.DOMModel.DOMNode>|null):
|
|
686
748
|
AsyncGenerator<ContextResponse, void, void> {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
6
|
+
import * as Annotations from '../../../ui/components/annotations/annotations.js';
|
|
6
7
|
import * as Logs from '../../logs/logs.js';
|
|
7
8
|
import * as NetworkTimeCalculator from '../../network_time_calculator/network_time_calculator.js';
|
|
8
9
|
import * as TextUtils from '../../text_utils/text_utils.js';
|
|
@@ -105,7 +106,7 @@ export class NetworkRequestFormatter {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
return `Request: ${this.#request.url()}
|
|
108
|
-
|
|
109
|
+
${Annotations.AnnotationRepository.annotationsEnabled() ? `\nRequest ID: ${this.#request.requestId()}\n` : ''}
|
|
109
110
|
${this.formatRequestHeaders()}
|
|
110
111
|
|
|
111
112
|
${this.formatResponseHeaders()}${responseBody}
|
|
@@ -123,12 +123,6 @@ export class PerformanceInsightFormatter {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
insightIsSupported(): boolean {
|
|
126
|
-
// Although our types don't show it, Insights can end up as Errors if there
|
|
127
|
-
// is an issue in the processing stage. In this case we should gracefully
|
|
128
|
-
// ignore this error.
|
|
129
|
-
if (this.#insight instanceof Error) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
126
|
return this.#description().length > 0;
|
|
133
127
|
}
|
|
134
128
|
|
|
@@ -206,7 +200,7 @@ export class PerformanceInsightFormatter {
|
|
|
206
200
|
{title: 'How can I reduce the amount of legacy JavaScript on my page?'},
|
|
207
201
|
];
|
|
208
202
|
default:
|
|
209
|
-
throw new Error(
|
|
203
|
+
throw new Error(`Unknown insight key '${this.#insight.insightKey}'`);
|
|
210
204
|
}
|
|
211
205
|
}
|
|
212
206
|
|
package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt
CHANGED
|
@@ -330,6 +330,37 @@ Content:
|
|
|
330
330
|
|
|
331
331
|
IMPORTANT: Never show eventKey to the user.
|
|
332
332
|
|
|
333
|
+
The following are markdown block(s) of code that ran in the page, each representing a separate function. <FUNCTION_START> and <FUNCTION_END> marks the exact function declaration, and everything outside that is provided for additional context. Comments at the end of each line indicate the runtime performance cost of that code. Do not show the user the function markers or the additional context.
|
|
334
|
+
|
|
335
|
+
Here are 3 relevant functions:
|
|
336
|
+
|
|
337
|
+
(anonymous) @ https://s.yimg.com/aaq/prebid/prebid-2.0.js:12:53984. With added context, chunk is from 9:0 to 18:0
|
|
338
|
+
```
|
|
339
|
+
// context ...
|
|
340
|
+
|
|
341
|
+
() => { /* some code from https://s.yimg.com/aaq/prebid/prebid-2.0.js... */ }
|
|
342
|
+
|
|
343
|
+
// context ...
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
(anonymous) @ https://s.yimg.com/aaq/f10d509c/d1irmdsmbztlvx.js:0:43042. With added context, chunk is from 0:0 to 6:0
|
|
347
|
+
```
|
|
348
|
+
// context ...
|
|
349
|
+
|
|
350
|
+
() => { /* some code from https://s.yimg.com/aaq/f10d509c/d1irmdsmbztlvx.js... */ }
|
|
351
|
+
|
|
352
|
+
// context ...
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
(anonymous) @ https://s.yimg.com/aaq/prebid/prebid-2.0.js:12:15854. With added context, chunk is from 9:0 to 18:0
|
|
356
|
+
```
|
|
357
|
+
// context ...
|
|
358
|
+
|
|
359
|
+
() => { /* some code from https://s.yimg.com/aaq/prebid/prebid-2.0.js... */ }
|
|
360
|
+
|
|
361
|
+
// context ...
|
|
362
|
+
```
|
|
363
|
+
|
|
333
364
|
# Bottom-up main thread summary
|
|
334
365
|
|
|
335
366
|
This is the bottom-up summary for the entire trace. Only the top 20 activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). "Self time" represents the aggregated time spent directly in an activity, across all occurrences. "Total time" represents the aggregated time spent in an activity or any of its children.
|
|
@@ -439,18 +470,6 @@ Here are all the insights that contain some related request from the given range
|
|
|
439
470
|
- LegacyJavaScript: benji-2.2.99.js (s.yimg.com) (eventKey: s-3387, ts: 157423742567), 25fa214.caas-news_web.min.js (s.yimg.com) (eventKey: s-3412, ts: 157423743431), wnsrvbjmeprtfrnfx.js (s.yimg.com) (eventKey: s-6273, ts: 157423760794), consent.js (s.yimg.com) (eventKey: s-3384, ts: 157423742450), news.yahoo.com/ (news.yahoo.com) (eventKey: s-2116, ts: 157423489126)
|
|
440
471
|
=== end content
|
|
441
472
|
|
|
442
|
-
Title: PerformanceTraceFormatter formatCallTree
|
|
443
|
-
Content:
|
|
444
|
-
# Call tree:
|
|
445
|
-
|
|
446
|
-
1;r-62;Task;10.6;0.1;;2;;;S
|
|
447
|
-
2;r-63;Evaluate script;10.5;1.5;;3-5;;
|
|
448
|
-
3;r-75;Profiling overhead;8.8;8.8;;;;
|
|
449
|
-
4;p-3728792-1-17-3;(anonymous);0.2;0.2;;;;
|
|
450
|
-
|
|
451
|
-
IMPORTANT: Never show eventKey to the user.
|
|
452
|
-
=== end content
|
|
453
|
-
|
|
454
473
|
Title: PerformanceTraceFormatter formatTraceSummary web-dev.json.gz
|
|
455
474
|
Content:
|
|
456
475
|
URL: https://web.dev/cls/
|
|
@@ -924,6 +943,99 @@ Content:
|
|
|
924
943
|
- name: localhost, main thread time: 0.3 ms, network transfer size: 22.9 kB
|
|
925
944
|
=== end content
|
|
926
945
|
|
|
946
|
+
Title: PerformanceTraceFormatter formatCallTree long-task-from-worker-thread.json.gz
|
|
947
|
+
Content:
|
|
948
|
+
# Call tree:
|
|
949
|
+
|
|
950
|
+
1;r-62;Task;10.6;0.1;;2;;;S
|
|
951
|
+
2;r-63;Evaluate script;10.5;1.5;;3-5;;
|
|
952
|
+
3;r-75;Profiling overhead;8.8;8.8;;;;
|
|
953
|
+
4;p-3728792-1-17-3;(anonymous);0.2;0.2;;;;
|
|
954
|
+
|
|
955
|
+
IMPORTANT: Never show eventKey to the user.
|
|
956
|
+
=== end content
|
|
957
|
+
|
|
958
|
+
Title: PerformanceTraceFormatter formatCallTree web-dev.json.gz
|
|
959
|
+
Content:
|
|
960
|
+
# All URLs:
|
|
961
|
+
|
|
962
|
+
* 0: https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js
|
|
963
|
+
* 1: https://www.gstatic.com/firebasejs/6.6.1/firebase-app.js
|
|
964
|
+
|
|
965
|
+
# Call tree:
|
|
966
|
+
|
|
967
|
+
1;r-4608;Task;7.2;;;2;;
|
|
968
|
+
2;r-4619;Evaluate script;7.2;;0;3;;
|
|
969
|
+
3;p-73704-775-2074-418;(anonymous);7.2;;0;4;0;0;S
|
|
970
|
+
4;p-73704-775-2074-419;(anonymous);7.2;0.1;0;5;0;9
|
|
971
|
+
5;p-73704-775-2075-420;(anonymous);7.1;;0;6;0;200
|
|
972
|
+
6;p-73704-775-2075-421;(anonymous);7.1;2.6;0;7;0;231
|
|
973
|
+
7;p-73704-775-2095-422;(anonymous);4.5;1.3;0;8-19;0;292
|
|
974
|
+
8;p-73704-775-2095-423;(anonymous);0.5;0.1;0;19-21;0;756
|
|
975
|
+
9;p-73704-775-2097-424;Et;0.1;0.1;0;;0;10766
|
|
976
|
+
10;p-73704-775-2098-425;St;0.4;0.2;0;21;0;10904
|
|
977
|
+
11;p-73704-775-2105-427;k;0.4;0.4;0;;0;5125
|
|
978
|
+
12;p-73704-775-2108-428;Go;0.1;;0;22;0;68523
|
|
979
|
+
13;p-73704-775-2109-430;Oi;0.4;0.2;0;23;0;38264
|
|
980
|
+
14;p-73704-775-2115-432;tl;0.3;0.3;0;;0;154217
|
|
981
|
+
15;p-73704-775-2118-433;ul;0.6;0.5;0;24;0;155034
|
|
982
|
+
16;p-73704-775-2121-435;cl;0.1;0.1;0;;0;155107
|
|
983
|
+
17;p-73704-775-2123-436;hl;0.1;;0;25;0;155309
|
|
984
|
+
18;p-73704-775-2124-439;sl;0.1;0.1;0;;0;154927
|
|
985
|
+
19;p-73704-775-2127-441;hl;0.1;0.1;0;;0;155309
|
|
986
|
+
20;p-73704-775-2128-442;registerService;0.2;;1;26-28;0;9441
|
|
987
|
+
21;p-73704-775-2099-426;vt;0.2;0.2;0;;0;10155
|
|
988
|
+
22;p-73704-775-2108-429;Mo;0.1;0.1;0;;0;66493
|
|
989
|
+
23;p-73704-775-2111-431;vi;0.1;0.1;0;;0;37138
|
|
990
|
+
24;p-73704-775-2118-434;ll;0.1;0.1;0;;0;155345
|
|
991
|
+
25;p-73704-775-2123-437;ll;0.1;;0;28;0;155345
|
|
992
|
+
26;p-73704-775-2128-443;u;0.1;0.1;1;;0;10091
|
|
993
|
+
27;p-73704-775-2129-444;d;0.1;0.1;1;;0;595
|
|
994
|
+
28;p-73704-775-2123-438;get prototype;0.1;0.1;;;;
|
|
995
|
+
|
|
996
|
+
IMPORTANT: Never show eventKey to the user.
|
|
997
|
+
|
|
998
|
+
The following are markdown block(s) of code that ran in the page, each representing a separate function. <FUNCTION_START> and <FUNCTION_END> marks the exact function declaration, and everything outside that is provided for additional context. Comments at the end of each line indicate the runtime performance cost of that code. Do not show the user the function markers or the additional context.
|
|
999
|
+
|
|
1000
|
+
Here are 4 relevant functions:
|
|
1001
|
+
|
|
1002
|
+
(anonymous) @ https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js:0:0. With added context, chunk is from 0:0 to 6:0
|
|
1003
|
+
```
|
|
1004
|
+
// context ...
|
|
1005
|
+
|
|
1006
|
+
() => { /* some code from https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js... */ }
|
|
1007
|
+
|
|
1008
|
+
// context ...
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
(anonymous) @ https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js:0:231. With added context, chunk is from 0:0 to 6:0
|
|
1012
|
+
```
|
|
1013
|
+
// context ...
|
|
1014
|
+
|
|
1015
|
+
() => { /* some code from https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js... */ }
|
|
1016
|
+
|
|
1017
|
+
// context ...
|
|
1018
|
+
```
|
|
1019
|
+
|
|
1020
|
+
(anonymous) @ https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js:0:292. With added context, chunk is from 0:0 to 6:0
|
|
1021
|
+
```
|
|
1022
|
+
// context ...
|
|
1023
|
+
|
|
1024
|
+
() => { /* some code from https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js... */ }
|
|
1025
|
+
|
|
1026
|
+
// context ...
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
(anonymous) @ https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js:0:155034. With added context, chunk is from 0:0 to 6:0
|
|
1030
|
+
```
|
|
1031
|
+
// context ...
|
|
1032
|
+
|
|
1033
|
+
() => { /* some code from https://www.gstatic.com/firebasejs/6.6.1/firebase-auth.js... */ }
|
|
1034
|
+
|
|
1035
|
+
// context ...
|
|
1036
|
+
```
|
|
1037
|
+
=== end content
|
|
1038
|
+
|
|
927
1039
|
Title: PerformanceTraceFormatter formatNetworkRequests formats network requests that have redirects
|
|
928
1040
|
Content:
|
|
929
1041
|
## Network request: http://localhost:3000/redirect3
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
6
|
+
import type * as Protocol from '../../../generated/protocol.js';
|
|
7
|
+
import * as Annotations from '../../../ui/components/annotations/annotations.js';
|
|
5
8
|
import * as CrUXManager from '../../crux-manager/crux-manager.js';
|
|
6
9
|
import type * as SourceMapScopes from '../../source_map_scopes/source_map_scopes.js';
|
|
7
10
|
import * as Trace from '../../trace/trace.js';
|
|
@@ -23,7 +26,7 @@ interface FormatFactByInsightSetOptions {
|
|
|
23
26
|
title: string;
|
|
24
27
|
description?: string;
|
|
25
28
|
empty: string;
|
|
26
|
-
cb: (insightSet: Trace.Insights.Types.InsightSet) => string
|
|
29
|
+
cb: (insightSet: Trace.Insights.Types.InsightSet) => Promise<string|null>;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
export class PerformanceTraceFormatter {
|
|
@@ -31,6 +34,10 @@ export class PerformanceTraceFormatter {
|
|
|
31
34
|
#parsedTrace: Trace.TraceModel.ParsedTrace;
|
|
32
35
|
#insightSet: Trace.Insights.Types.InsightSet|null;
|
|
33
36
|
#eventsSerializer: Trace.EventsSerializer.EventsSerializer;
|
|
37
|
+
#formattedFunctionCodes = new Set<string>();
|
|
38
|
+
resolveFunctionCode?:
|
|
39
|
+
(url: Platform.DevToolsPath.UrlString, line: number,
|
|
40
|
+
column: number) => Promise<SourceMapScopes.FunctionCodeResolver.FunctionCode|null>;
|
|
34
41
|
|
|
35
42
|
constructor(focus: AgentFocus) {
|
|
36
43
|
this.#focus = focus;
|
|
@@ -140,9 +147,9 @@ export class PerformanceTraceFormatter {
|
|
|
140
147
|
'The following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.');
|
|
141
148
|
|
|
142
149
|
for (const insightSet of parsedTrace.insights?.values() ?? []) {
|
|
143
|
-
const lcp =
|
|
144
|
-
const cls =
|
|
145
|
-
const inp =
|
|
150
|
+
const lcp = Trace.Insights.Common.getLCP(insightSet);
|
|
151
|
+
const cls = Trace.Insights.Common.getCLS(insightSet);
|
|
152
|
+
const inp = Trace.Insights.Common.getINP(insightSet);
|
|
146
153
|
|
|
147
154
|
parts.push(`\n## insight set id: ${insightSet.id}\n`);
|
|
148
155
|
parts.push(`URL: ${insightSet.url}`);
|
|
@@ -150,11 +157,11 @@ export class PerformanceTraceFormatter {
|
|
|
150
157
|
if (lcp || cls || inp) {
|
|
151
158
|
parts.push('Metrics (lab / observed):');
|
|
152
159
|
if (lcp) {
|
|
153
|
-
const nodeId = insightSet
|
|
160
|
+
const nodeId = insightSet.model.LCPBreakdown?.lcpEvent?.args.data?.nodeId;
|
|
154
161
|
const nodeIdText = nodeId !== undefined ? `, nodeId: ${nodeId}` : '';
|
|
155
162
|
parts.push(
|
|
156
163
|
` - LCP: ${Math.round(lcp.value / 1000)} ms, event: ${this.serializeEvent(lcp.event)}${nodeIdText}`);
|
|
157
|
-
const subparts = insightSet
|
|
164
|
+
const subparts = insightSet.model.LCPBreakdown?.subparts;
|
|
158
165
|
if (subparts) {
|
|
159
166
|
const serializeSubpart = (subpart: Trace.Insights.Models.LCPBreakdown.Subpart): string => {
|
|
160
167
|
return `${micros(subpart.range)}, bounds: ${this.serializeBounds(subpart)}`;
|
|
@@ -176,6 +183,16 @@ export class PerformanceTraceFormatter {
|
|
|
176
183
|
if (cls) {
|
|
177
184
|
const eventText = cls.worstClusterEvent ? `, event: ${this.serializeEvent(cls.worstClusterEvent)}` : '';
|
|
178
185
|
parts.push(` - CLS: ${cls.value.toFixed(2)}${eventText}`);
|
|
186
|
+
|
|
187
|
+
if (Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
188
|
+
const worstClusterEvent = cls.worstClusterEvent as Trace.Types.Events.SyntheticLayoutShiftCluster;
|
|
189
|
+
const layoutShiftData =
|
|
190
|
+
worstClusterEvent?.worstShiftEvent?.args?.data as Trace.Types.Events.LayoutShiftData;
|
|
191
|
+
if (layoutShiftData?.impacted_nodes && layoutShiftData.impacted_nodes?.length > 0) {
|
|
192
|
+
Annotations.AnnotationRepository.instance().addElementsAnnotation(
|
|
193
|
+
'This element is impacted by a layout shift', layoutShiftData.impacted_nodes[0].node_id.toString());
|
|
194
|
+
}
|
|
195
|
+
}
|
|
179
196
|
}
|
|
180
197
|
} else {
|
|
181
198
|
parts.push('Metrics (lab / observed): n/a');
|
|
@@ -223,7 +240,7 @@ export class PerformanceTraceFormatter {
|
|
|
223
240
|
return parts.join('\n');
|
|
224
241
|
}
|
|
225
242
|
|
|
226
|
-
#formatFactByInsightSet(options: FormatFactByInsightSetOptions): string {
|
|
243
|
+
async #formatFactByInsightSet(options: FormatFactByInsightSetOptions): Promise<string> {
|
|
227
244
|
const {insights, title, description, empty, cb} = options;
|
|
228
245
|
const lines = [`# ${title}\n`];
|
|
229
246
|
|
|
@@ -237,7 +254,7 @@ export class PerformanceTraceFormatter {
|
|
|
237
254
|
if (multipleInsightSets) {
|
|
238
255
|
lines.push(`## insight set id: ${insightSet.id}\n`);
|
|
239
256
|
}
|
|
240
|
-
lines.push((cb(insightSet) ?? empty) + '\n');
|
|
257
|
+
lines.push((await cb(insightSet) ?? empty) + '\n');
|
|
241
258
|
}
|
|
242
259
|
} else {
|
|
243
260
|
lines.push(empty + '\n');
|
|
@@ -246,27 +263,27 @@ export class PerformanceTraceFormatter {
|
|
|
246
263
|
return lines.join('\n');
|
|
247
264
|
}
|
|
248
265
|
|
|
249
|
-
formatCriticalRequests(): string {
|
|
266
|
+
formatCriticalRequests(): Promise<string> {
|
|
250
267
|
const parsedTrace = this.#parsedTrace;
|
|
251
268
|
return this.#formatFactByInsightSet({
|
|
252
269
|
insights: parsedTrace.insights,
|
|
253
270
|
title: 'Critical network requests',
|
|
254
271
|
empty: 'none',
|
|
255
|
-
cb: insightSet => {
|
|
272
|
+
cb: async insightSet => {
|
|
256
273
|
const criticalRequests: Trace.Types.Events.SyntheticNetworkRequest[] = [];
|
|
257
274
|
|
|
258
275
|
const walkRequest = (node: Trace.Insights.Models.NetworkDependencyTree.CriticalRequestNode): void => {
|
|
259
276
|
criticalRequests.push(node.request);
|
|
260
277
|
node.children.forEach(walkRequest);
|
|
261
278
|
};
|
|
262
|
-
insightSet.model.NetworkDependencyTree
|
|
279
|
+
insightSet.model.NetworkDependencyTree?.rootNodes.forEach(walkRequest);
|
|
263
280
|
|
|
264
281
|
return criticalRequests.length ? this.formatNetworkRequests(criticalRequests, {verbose: false}) : null;
|
|
265
282
|
},
|
|
266
283
|
});
|
|
267
284
|
}
|
|
268
285
|
|
|
269
|
-
#serializeBottomUpRootNode(rootNode: Trace.Extras.TraceTree.BottomUpRootNode, limit: number): string {
|
|
286
|
+
async #serializeBottomUpRootNode(rootNode: Trace.Extras.TraceTree.BottomUpRootNode, limit: number): Promise<string> {
|
|
270
287
|
// Sorted by selfTime.
|
|
271
288
|
// No nodes less than 1 ms.
|
|
272
289
|
// Limit.
|
|
@@ -274,6 +291,7 @@ export class PerformanceTraceFormatter {
|
|
|
274
291
|
.filter(n => n.totalTime >= 1)
|
|
275
292
|
.sort((a, b) => b.selfTime - a.selfTime)
|
|
276
293
|
.slice(0, limit);
|
|
294
|
+
const callFrames: Protocol.Runtime.CallFrame[] = [];
|
|
277
295
|
|
|
278
296
|
function nodeToText(this: PerformanceTraceFormatter, node: Trace.Extras.TraceTree.Node): string {
|
|
279
297
|
const event = node.event;
|
|
@@ -281,10 +299,14 @@ export class PerformanceTraceFormatter {
|
|
|
281
299
|
let frame;
|
|
282
300
|
if (Trace.Types.Events.isProfileCall(event)) {
|
|
283
301
|
frame = event.callFrame;
|
|
302
|
+
if (node.selfTime >= 100 && callFrames.length < 3) {
|
|
303
|
+
callFrames.push(frame);
|
|
304
|
+
}
|
|
284
305
|
} else {
|
|
285
306
|
frame = Trace.Helpers.Trace.getStackTraceTopCallFrameInEventPayload(event);
|
|
286
307
|
}
|
|
287
308
|
|
|
309
|
+
// TODO(crbug.com/452333154): this is not source mapped.
|
|
288
310
|
let source = Trace.Name.forEntry(event);
|
|
289
311
|
if (frame?.url) {
|
|
290
312
|
source += ` (url: ${frame.url}`;
|
|
@@ -300,7 +322,8 @@ export class PerformanceTraceFormatter {
|
|
|
300
322
|
return `- self: ${millis(node.selfTime)}, total: ${millis(node.totalTime)}, source: ${source}`;
|
|
301
323
|
}
|
|
302
324
|
|
|
303
|
-
return topNodes.map(node => nodeToText.call(this, node)).join('\n')
|
|
325
|
+
return topNodes.map(node => nodeToText.call(this, node)).join('\n') +
|
|
326
|
+
await this.#serializeRelevantFunctions(callFrames);
|
|
304
327
|
}
|
|
305
328
|
|
|
306
329
|
#getSerializeBottomUpRootNodeFormat(limit: number): string {
|
|
@@ -308,7 +331,7 @@ export class PerformanceTraceFormatter {
|
|
|
308
331
|
limit} activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). "Self time" represents the aggregated time spent directly in an activity, across all occurrences. "Total time" represents the aggregated time spent in an activity or any of its children.`;
|
|
309
332
|
}
|
|
310
333
|
|
|
311
|
-
formatMainThreadBottomUpSummary(): string {
|
|
334
|
+
formatMainThreadBottomUpSummary(): Promise<string> {
|
|
312
335
|
const parsedTrace = this.#parsedTrace;
|
|
313
336
|
const limit = 10;
|
|
314
337
|
return this.#formatFactByInsightSet({
|
|
@@ -316,13 +339,13 @@ export class PerformanceTraceFormatter {
|
|
|
316
339
|
title: 'Main thread bottom-up summary',
|
|
317
340
|
description: this.#getSerializeBottomUpRootNodeFormat(limit),
|
|
318
341
|
empty: 'no activity',
|
|
319
|
-
cb: insightSet => {
|
|
342
|
+
cb: async insightSet => {
|
|
320
343
|
const rootNode = AIQueries.mainThreadActivityBottomUpSingleNavigation(
|
|
321
344
|
insightSet.navigation?.args.data?.navigationId,
|
|
322
345
|
insightSet.bounds,
|
|
323
346
|
parsedTrace,
|
|
324
347
|
);
|
|
325
|
-
return rootNode ? this.#serializeBottomUpRootNode(rootNode, limit) : null;
|
|
348
|
+
return rootNode ? await this.#serializeBottomUpRootNode(rootNode, limit) : null;
|
|
326
349
|
},
|
|
327
350
|
});
|
|
328
351
|
}
|
|
@@ -343,13 +366,13 @@ export class PerformanceTraceFormatter {
|
|
|
343
366
|
return listText;
|
|
344
367
|
}
|
|
345
368
|
|
|
346
|
-
formatThirdPartySummary(): string {
|
|
369
|
+
formatThirdPartySummary(): Promise<string> {
|
|
347
370
|
const parsedTrace = this.#parsedTrace;
|
|
348
371
|
return this.#formatFactByInsightSet({
|
|
349
372
|
insights: parsedTrace.insights,
|
|
350
373
|
title: '3rd party summary',
|
|
351
374
|
empty: 'no 3rd parties',
|
|
352
|
-
cb: insightSet => {
|
|
375
|
+
cb: async insightSet => {
|
|
353
376
|
const thirdPartySummaries =
|
|
354
377
|
Trace.Extras.ThirdParties.summarizeByThirdParty(parsedTrace.data, insightSet.bounds);
|
|
355
378
|
return thirdPartySummaries.length ? this.#formatThirdPartyEntitySummaries(thirdPartySummaries) : null;
|
|
@@ -357,13 +380,13 @@ export class PerformanceTraceFormatter {
|
|
|
357
380
|
});
|
|
358
381
|
}
|
|
359
382
|
|
|
360
|
-
formatLongestTasks(): string {
|
|
383
|
+
formatLongestTasks(): Promise<string> {
|
|
361
384
|
const parsedTrace = this.#parsedTrace;
|
|
362
385
|
return this.#formatFactByInsightSet({
|
|
363
386
|
insights: parsedTrace.insights,
|
|
364
387
|
title: 'Longest tasks',
|
|
365
388
|
empty: 'none',
|
|
366
|
-
cb: insightSet => {
|
|
389
|
+
cb: async insightSet => {
|
|
367
390
|
const longestTaskTrees =
|
|
368
391
|
AIQueries.longestTasks(insightSet.navigation?.args.data?.navigationId, insightSet.bounds, parsedTrace, 3);
|
|
369
392
|
if (!longestTaskTrees?.length) {
|
|
@@ -421,12 +444,12 @@ export class PerformanceTraceFormatter {
|
|
|
421
444
|
return results.join('\n');
|
|
422
445
|
}
|
|
423
446
|
|
|
424
|
-
formatMainThreadTrackSummary(bounds: Trace.Types.Timing.TraceWindowMicro): string {
|
|
447
|
+
async formatMainThreadTrackSummary(bounds: Trace.Types.Timing.TraceWindowMicro): Promise<string> {
|
|
425
448
|
if (!this.#parsedTrace.insights) {
|
|
426
449
|
return 'No main thread activity found';
|
|
427
450
|
}
|
|
428
451
|
|
|
429
|
-
const results = [];
|
|
452
|
+
const results: string[] = [];
|
|
430
453
|
|
|
431
454
|
const insightSet = this.#parsedTrace.insights?.values().find(
|
|
432
455
|
insightSet => Trace.Helpers.Timing.boundsIncludeTimeRange({bounds, timeRange: insightSet.bounds}));
|
|
@@ -437,7 +460,7 @@ export class PerformanceTraceFormatter {
|
|
|
437
460
|
);
|
|
438
461
|
if (topDownTree) {
|
|
439
462
|
results.push('# Top-down main thread summary');
|
|
440
|
-
results.push(this.formatCallTree(topDownTree, 2 /* headerLevel */));
|
|
463
|
+
results.push(await this.formatCallTree(topDownTree, 2 /* headerLevel */));
|
|
441
464
|
}
|
|
442
465
|
|
|
443
466
|
const bottomUpRootNode = AIQueries.mainThreadActivityBottomUp(
|
|
@@ -448,7 +471,7 @@ export class PerformanceTraceFormatter {
|
|
|
448
471
|
results.push('# Bottom-up main thread summary');
|
|
449
472
|
const limit = 20;
|
|
450
473
|
results.push(this.#getSerializeBottomUpRootNodeFormat(limit));
|
|
451
|
-
results.push(this.#serializeBottomUpRootNode(bottomUpRootNode, limit));
|
|
474
|
+
results.push(await this.#serializeBottomUpRootNode(bottomUpRootNode, limit));
|
|
452
475
|
}
|
|
453
476
|
|
|
454
477
|
const thirdPartySummaries = Trace.Extras.ThirdParties.summarizeByThirdParty(this.#parsedTrace.data, bounds);
|
|
@@ -492,8 +515,21 @@ export class PerformanceTraceFormatter {
|
|
|
492
515
|
return results.join('\n\n');
|
|
493
516
|
}
|
|
494
517
|
|
|
495
|
-
formatCallTree(tree: AICallTree, headerLevel = 1): string {
|
|
496
|
-
|
|
518
|
+
async formatCallTree(tree: AICallTree, headerLevel = 1): Promise<string> {
|
|
519
|
+
let result = `${tree.serialize(headerLevel)}\n\nIMPORTANT: Never show eventKey to the user.\n`;
|
|
520
|
+
|
|
521
|
+
const relevantCallFrames = [];
|
|
522
|
+
if (tree.selectedNode && Trace.Types.Events.isProfileCall(tree.selectedNode.event)) {
|
|
523
|
+
relevantCallFrames.push(tree.selectedNode.event.callFrame);
|
|
524
|
+
}
|
|
525
|
+
const topCallFrameByTotalTime = tree.topCallFrameByTotalTime();
|
|
526
|
+
if (topCallFrameByTotalTime) {
|
|
527
|
+
relevantCallFrames.push(topCallFrameByTotalTime);
|
|
528
|
+
}
|
|
529
|
+
relevantCallFrames.push(...tree.topCallFramesBySelfTime(3));
|
|
530
|
+
result += await this.#serializeRelevantFunctions(relevantCallFrames);
|
|
531
|
+
|
|
532
|
+
return result;
|
|
497
533
|
}
|
|
498
534
|
|
|
499
535
|
formatNetworkRequests(
|
|
@@ -562,6 +598,7 @@ export class PerformanceTraceFormatter {
|
|
|
562
598
|
string {
|
|
563
599
|
const {
|
|
564
600
|
url,
|
|
601
|
+
requestId,
|
|
565
602
|
statusCode,
|
|
566
603
|
initialPriority,
|
|
567
604
|
priority,
|
|
@@ -622,7 +659,8 @@ export class PerformanceTraceFormatter {
|
|
|
622
659
|
const eventKey = this.#eventsSerializer.keyForEvent(request);
|
|
623
660
|
const eventKeyLine = eventKey ? `eventKey: ${eventKey}\n` : '';
|
|
624
661
|
|
|
625
|
-
return `${titlePrefix}: ${url}
|
|
662
|
+
return `${titlePrefix}: ${url}${
|
|
663
|
+
Annotations.AnnotationRepository.annotationsEnabled() ? `\nrequestId: ${requestId}` : ''}
|
|
626
664
|
${eventKeyLine}Timings:
|
|
627
665
|
- Queued at: ${micros(startTimesForLifecycle.queuedAt)}
|
|
628
666
|
- Request sent at: ${micros(startTimesForLifecycle.requestSentAt)}
|
|
@@ -815,7 +853,34 @@ The order of headers corresponds to an internal fixed list. If a header is not p
|
|
|
815
853
|
return parts.join(';');
|
|
816
854
|
}
|
|
817
855
|
|
|
856
|
+
resolveFunctionCodeAtLocation(url: Platform.DevToolsPath.UrlString, line: number, column: number):
|
|
857
|
+
Promise<SourceMapScopes.FunctionCodeResolver.FunctionCode|null> {
|
|
858
|
+
if (!this.resolveFunctionCode) {
|
|
859
|
+
throw new Error('missing resolveFunctionCode');
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
return this.resolveFunctionCode(url, line, column);
|
|
863
|
+
}
|
|
864
|
+
|
|
818
865
|
formatFunctionCode(code: SourceMapScopes.FunctionCodeResolver.FunctionCode): string {
|
|
866
|
+
return this.#getFormattedFunctionCodeExplainer() + '\n\n' + this.#formatFunctionCode(code);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
#getFormattedFunctionCodeExplainer(): string {
|
|
870
|
+
return 'The following are markdown block(s) of code that ran in the page, each representing a separate function. <FUNCTION_START> and <FUNCTION_END> marks the exact function declaration, and everything outside that is provided for additional context. Comments at the end of each line indicate the runtime performance cost of that code. Do not show the user the function markers or the additional context.';
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
#functionCodeToKey(code: SourceMapScopes.FunctionCodeResolver.FunctionCode): string {
|
|
874
|
+
return code.functionBounds.uiSourceCode.url() + ':' + code.functionBounds.range.toString();
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
#hasFormattedFunctionCode(code: SourceMapScopes.FunctionCodeResolver.FunctionCode): boolean {
|
|
878
|
+
return this.#formattedFunctionCodes.has(this.#functionCodeToKey(code));
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
#formatFunctionCode(code: SourceMapScopes.FunctionCodeResolver.FunctionCode): string {
|
|
882
|
+
this.#formattedFunctionCodes.add(this.#functionCodeToKey(code));
|
|
883
|
+
|
|
819
884
|
const {startLine, startColumn} = code.range;
|
|
820
885
|
const {
|
|
821
886
|
startLine: contextStartLine,
|
|
@@ -823,18 +888,48 @@ The order of headers corresponds to an internal fixed list. If a header is not p
|
|
|
823
888
|
endLine: contextEndLine,
|
|
824
889
|
endColumn: contextEndColumn
|
|
825
890
|
} = code.rangeWithContext;
|
|
826
|
-
const name = code.functionBounds.name;
|
|
891
|
+
const name = code.functionBounds.name || '(anonymous)';
|
|
827
892
|
const url = code.functionBounds.uiSourceCode.url();
|
|
828
893
|
|
|
829
894
|
const parts = [];
|
|
830
895
|
parts.push(`${name} @ ${url}:${startLine}:${startColumn}. With added context, chunk is from ${contextStartLine}:${
|
|
831
896
|
contextStartColumn} to ${contextEndLine}:${contextEndColumn}`);
|
|
832
|
-
parts.push(
|
|
833
|
-
'\nThe following is a markdown block of JavaScript. <FUNCTION_START> and <FUNCTION_END> marks the exact function declaration, and everything outside that is provided for additional context. Comments at the end of each line indicate the runtime performance cost of that code. Do not show the user the function markers or the additional context.\n');
|
|
834
897
|
parts.push('```');
|
|
835
898
|
parts.push(code.codeWithContext);
|
|
836
899
|
parts.push('```');
|
|
837
900
|
|
|
838
901
|
return parts.join('\n');
|
|
839
902
|
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Appends the code of each call frame's function, but only if the function was not
|
|
906
|
+
* serialized previously.
|
|
907
|
+
*/
|
|
908
|
+
async #serializeRelevantFunctions(callFrames: Protocol.Runtime.CallFrame[]): Promise<string> {
|
|
909
|
+
const resolveFunctionCode = this.resolveFunctionCode;
|
|
910
|
+
if (!resolveFunctionCode) {
|
|
911
|
+
return '';
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
const functionCodeStrings = [];
|
|
915
|
+
const functionCodes = await Promise.all(callFrames.map(
|
|
916
|
+
frame =>
|
|
917
|
+
resolveFunctionCode(frame.url as Platform.DevToolsPath.UrlString, frame.lineNumber, frame.columnNumber)));
|
|
918
|
+
for (const code of functionCodes) {
|
|
919
|
+
if (code && !this.#hasFormattedFunctionCode(code)) {
|
|
920
|
+
functionCodeStrings.push(this.#formatFunctionCode(code));
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
if (!functionCodeStrings.length) {
|
|
925
|
+
return '';
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
return '\n' + [
|
|
929
|
+
this.#getFormattedFunctionCodeExplainer(),
|
|
930
|
+
functionCodeStrings.length > 1 ? `Here are ${functionCodeStrings.length} relevant functions:` :
|
|
931
|
+
`Here is a relevant function:`,
|
|
932
|
+
...functionCodeStrings,
|
|
933
|
+
].join('\n\n');
|
|
934
|
+
}
|
|
840
935
|
}
|