chrome-devtools-frontend 1.0.1526203 → 1.0.1528866
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/ui_engineering.md +159 -0
- package/eslint.config.mjs +6 -1
- package/front_end/core/i18n/i18nImpl.ts +5 -0
- package/front_end/core/protocol_client/protocol_client.ts +1 -1
- package/front_end/core/root/Runtime.ts +28 -4
- package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
- package/front_end/core/sdk/CSSRule.ts +35 -6
- package/front_end/core/sdk/ChildTargetManager.ts +2 -0
- package/front_end/core/sdk/Connections.ts +2 -1
- package/front_end/core/sdk/DOMModel.ts +4 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +214 -31
- package/front_end/core/sdk/PreloadingModel.ts +82 -17
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
- package/front_end/core/sdk/RehydratingConnection.ts +29 -4
- package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
- package/front_end/core/sdk/SourceMap.ts +37 -11
- package/front_end/core/sdk/SourceMapManager.ts +13 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +17 -0
- package/front_end/core/sdk/TargetManager.ts +0 -22
- package/front_end/core/sdk/TraceObject.ts +8 -7
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +20 -25
- package/front_end/generated/InspectorBackendCommands.js +4 -3
- package/front_end/generated/protocol-mapping.d.ts +3 -1
- package/front_end/generated/protocol-proxy-api.d.ts +3 -1
- package/front_end/generated/protocol.ts +17 -3
- package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
- package/front_end/models/extensions/ExtensionView.ts +3 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +23 -27
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
- package/front_end/models/persistence/EditFileSystemView.ts +1 -0
- package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
- package/front_end/models/stack_trace/Trie.ts +9 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
- package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
- package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
- package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CookieItemsView.ts +1 -0
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
- package/front_end/panels/changes/CombinedDiffView.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +106 -0
- package/front_end/panels/console/ConsolePanel.ts +2 -0
- package/front_end/panels/console/ConsolePrompt.ts +12 -2
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +12 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +27 -0
- package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
- package/front_end/panels/console/console.ts +6 -0
- package/front_end/panels/console/consoleInsightTeaser.css +55 -0
- package/front_end/panels/coverage/CoverageListView.ts +141 -277
- package/front_end/panels/coverage/CoverageView.ts +330 -324
- package/front_end/panels/coverage/coverageView.css +17 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +1 -0
- package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
- package/front_end/panels/emulation/DeviceModeView.ts +2 -0
- package/front_end/panels/explain/ActionDelegate.ts +1 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
- package/front_end/panels/explain/explain.ts +0 -1
- package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +12 -19
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +27 -43
- package/front_end/panels/media/MainView.ts +1 -0
- package/front_end/panels/media/TickingFlameChart.ts +2 -0
- package/front_end/panels/network/BlockedURLsPane.ts +111 -85
- package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
- package/front_end/panels/network/NetworkItemView.ts +1 -0
- package/front_end/panels/network/NetworkLogView.ts +9 -7
- package/front_end/panels/network/NetworkOverview.ts +1 -0
- package/front_end/panels/network/RequestCookiesView.ts +1 -0
- package/front_end/panels/network/RequestHTMLView.ts +1 -0
- package/front_end/panels/network/RequestInitiatorView.ts +1 -0
- package/front_end/panels/network/RequestPayloadView.ts +1 -0
- package/front_end/panels/network/RequestPreviewView.ts +1 -0
- package/front_end/panels/network/RequestResponseView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -0
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
- package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
- package/front_end/panels/profiler/IsolateSelector.ts +1 -0
- package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
- package/front_end/panels/profiler/ProfileView.ts +1 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/recorder/RecorderPanel.ts +2 -0
- package/front_end/panels/screencast/ScreencastView.ts +1 -0
- package/front_end/panels/search/SearchView.ts +1 -0
- package/front_end/panels/settings/AISettingsTab.ts +3 -3
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +2 -0
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
- package/front_end/panels/sources/BreakpointsView.ts +1 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
- package/front_end/panels/timeline/README.md +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
- package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
- package/front_end/panels/timeline/TimelinePanel.ts +43 -62
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
- package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
- package/front_end/panels/timeline/components/Sidebar.ts +2 -0
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
- package/front_end/panels/web_audio/WebAudioView.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
- package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
- package/front_end/third_party/lighthouse/locales/ar.json +107 -455
- package/front_end/third_party/lighthouse/locales/bg.json +96 -444
- package/front_end/third_party/lighthouse/locales/ca.json +96 -444
- package/front_end/third_party/lighthouse/locales/cs.json +96 -444
- package/front_end/third_party/lighthouse/locales/da.json +96 -444
- package/front_end/third_party/lighthouse/locales/de.json +96 -444
- package/front_end/third_party/lighthouse/locales/el.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
- package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
- package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
- package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
- package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
- package/front_end/third_party/lighthouse/locales/es.json +96 -444
- package/front_end/third_party/lighthouse/locales/fi.json +96 -444
- package/front_end/third_party/lighthouse/locales/fil.json +96 -444
- package/front_end/third_party/lighthouse/locales/fr.json +96 -444
- package/front_end/third_party/lighthouse/locales/he.json +118 -466
- package/front_end/third_party/lighthouse/locales/hi.json +96 -444
- package/front_end/third_party/lighthouse/locales/hr.json +100 -448
- package/front_end/third_party/lighthouse/locales/hu.json +96 -444
- package/front_end/third_party/lighthouse/locales/id.json +96 -444
- package/front_end/third_party/lighthouse/locales/it.json +96 -444
- package/front_end/third_party/lighthouse/locales/ja.json +96 -444
- package/front_end/third_party/lighthouse/locales/ko.json +97 -445
- package/front_end/third_party/lighthouse/locales/lt.json +96 -444
- package/front_end/third_party/lighthouse/locales/lv.json +97 -445
- package/front_end/third_party/lighthouse/locales/nl.json +96 -444
- package/front_end/third_party/lighthouse/locales/no.json +96 -444
- package/front_end/third_party/lighthouse/locales/pl.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
- package/front_end/third_party/lighthouse/locales/pt.json +97 -445
- package/front_end/third_party/lighthouse/locales/ro.json +97 -445
- package/front_end/third_party/lighthouse/locales/ru.json +96 -444
- package/front_end/third_party/lighthouse/locales/sk.json +96 -444
- package/front_end/third_party/lighthouse/locales/sl.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
- package/front_end/third_party/lighthouse/locales/sr.json +96 -444
- package/front_end/third_party/lighthouse/locales/sv.json +96 -444
- package/front_end/third_party/lighthouse/locales/ta.json +96 -444
- package/front_end/third_party/lighthouse/locales/te.json +97 -445
- package/front_end/third_party/lighthouse/locales/th.json +96 -444
- package/front_end/third_party/lighthouse/locales/tr.json +96 -444
- package/front_end/third_party/lighthouse/locales/uk.json +96 -444
- package/front_end/third_party/lighthouse/locales/vi.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
- package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
- package/front_end/third_party/lighthouse/locales/zh.json +96 -444
- package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
- package/front_end/third_party/lighthouse/report/bundle.js +10 -49
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/web-vitals/README.chromium +5 -8
- package/front_end/third_party/web-vitals/package/README.md +191 -152
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
- package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
- package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
- package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
- package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
- package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
- package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +4 -10
- package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
- package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
- package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
- package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
- package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
- package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
- package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
- package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
- package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
- package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
- package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
- package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
- package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
- package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
- package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
- package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
- package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
- package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
- package/front_end/third_party/web-vitals/rebuild.sh +32 -18
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
- package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
- package/front_end/ui/legacy/EmptyWidget.ts +11 -1
- package/front_end/ui/legacy/InspectorView.ts +2 -0
- package/front_end/ui/legacy/SplitWidget.ts +2 -0
- package/front_end/ui/legacy/TabbedPane.ts +1 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
- package/front_end/ui/legacy/Toolbar.ts +25 -4
- package/front_end/ui/legacy/UIUtils.ts +28 -13
- package/front_end/ui/legacy/ViewManager.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +5 -0
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +9 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
- package/mcp/README.md +7 -0
- package/mcp/mcp.ts +8 -0
- package/package.json +1 -1
- package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
- package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
- package/front_end/third_party/web-vitals/package/attribution.js +0 -18
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
- package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
- package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
- package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
- package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
- package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
- package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
- package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
- package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
- package/front_end/ui/components/text_editor/textEditor.css +0 -18
- package/front_end/ui/legacy/inlineButton.css +0 -22
- /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
|
@@ -306,7 +306,6 @@ const str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelinePanel.ts', UIS
|
|
|
306
306
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
307
307
|
|
|
308
308
|
let timelinePanelInstance: TimelinePanel|undefined;
|
|
309
|
-
let isNode: boolean;
|
|
310
309
|
|
|
311
310
|
/**
|
|
312
311
|
* Represents the states that the timeline panel can be in.
|
|
@@ -350,6 +349,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
350
349
|
#viewMode: ViewMode = {mode: 'LANDING_PAGE'};
|
|
351
350
|
readonly #dimThirdPartiesSetting: Common.Settings.Setting<boolean>|null = null;
|
|
352
351
|
#thirdPartyCheckbox: UI.Toolbar.ToolbarSettingCheckbox|null = null;
|
|
352
|
+
#isNode = Root.Runtime.Runtime.isNode();
|
|
353
353
|
|
|
354
354
|
#onAnnotationModifiedEventBound = this.#onAnnotationModifiedEvent.bind(this);
|
|
355
355
|
|
|
@@ -395,7 +395,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
395
395
|
private traceLoadStart!: Trace.Types.Timing.Milli|null;
|
|
396
396
|
|
|
397
397
|
#traceEngineModel: Trace.TraceModel.Model;
|
|
398
|
-
#externalAIConversationData: AiAssistanceModel.ExternalPerformanceAIConversationData|null = null;
|
|
398
|
+
#externalAIConversationData: AiAssistanceModel.ConversationHandler.ExternalPerformanceAIConversationData|null = null;
|
|
399
399
|
#sourceMapsResolver: SourceMapsResolver.SourceMapsResolver|null = null;
|
|
400
400
|
#entityMapper: Trace.EntityMapper.EntityMapper|null = null;
|
|
401
401
|
#onSourceMapsNodeNamesResolvedBound = this.#onSourceMapsNodeNamesResolved.bind(this);
|
|
@@ -462,7 +462,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
462
462
|
this.toggleRecordAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.toggle-recording');
|
|
463
463
|
this.recordReloadAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.record-reload');
|
|
464
464
|
|
|
465
|
-
this.#historyManager = new TimelineHistoryManager(this.#minimapComponent, isNode);
|
|
465
|
+
this.#historyManager = new TimelineHistoryManager(this.#minimapComponent, this.#isNode);
|
|
466
466
|
|
|
467
467
|
this.traceLoadStart = null;
|
|
468
468
|
|
|
@@ -477,7 +477,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
477
477
|
this.captureSelectorStatsSetting.setTitle(i18nString(UIStrings.enableSelectorStats));
|
|
478
478
|
|
|
479
479
|
this.showScreenshotsSetting =
|
|
480
|
-
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode
|
|
480
|
+
Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', !this.#isNode);
|
|
481
481
|
this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots));
|
|
482
482
|
this.showScreenshotsSetting.addChangeListener(this.updateMiniMap, this);
|
|
483
483
|
|
|
@@ -503,7 +503,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
503
503
|
this.panelToolbar.wrappable = true;
|
|
504
504
|
this.panelRightToolbar = timelineToolbarContainer.createChild('devtools-toolbar');
|
|
505
505
|
this.panelRightToolbar.role = 'presentation';
|
|
506
|
-
if (!isNode && this.canRecord()) {
|
|
506
|
+
if (!this.#isNode && this.canRecord()) {
|
|
507
507
|
this.createSettingsPane();
|
|
508
508
|
this.updateShowSettingsToolbarButton();
|
|
509
509
|
}
|
|
@@ -698,11 +698,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
698
698
|
|
|
699
699
|
static instance(opts: {
|
|
700
700
|
forceNew: boolean|null,
|
|
701
|
-
isNode: boolean,
|
|
702
701
|
traceModel?: Trace.TraceModel.Model,
|
|
703
|
-
}|undefined = {forceNew: null
|
|
704
|
-
const {forceNew
|
|
705
|
-
isNode = isNodeMode;
|
|
702
|
+
}|undefined = {forceNew: null}): TimelinePanel {
|
|
703
|
+
const {forceNew} = opts;
|
|
706
704
|
|
|
707
705
|
if (!timelinePanelInstance || forceNew) {
|
|
708
706
|
timelinePanelInstance = new TimelinePanel(opts.traceModel);
|
|
@@ -751,6 +749,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
751
749
|
}
|
|
752
750
|
|
|
753
751
|
override willHide(): void {
|
|
752
|
+
super.willHide();
|
|
754
753
|
UI.Context.Context.instance().setFlavor(TimelinePanel, null);
|
|
755
754
|
this.#historyManager.cancelIfShowing();
|
|
756
755
|
|
|
@@ -937,24 +936,24 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
937
936
|
return this.#traceEngineModel;
|
|
938
937
|
}
|
|
939
938
|
|
|
940
|
-
getOrCreateExternalAIConversationData(): AiAssistanceModel.ExternalPerformanceAIConversationData {
|
|
939
|
+
getOrCreateExternalAIConversationData(): AiAssistanceModel.ConversationHandler.ExternalPerformanceAIConversationData {
|
|
941
940
|
if (!this.#externalAIConversationData) {
|
|
942
|
-
const conversationHandler = AiAssistanceModel.ConversationHandler.instance();
|
|
943
|
-
const focus = AiAssistanceModel.getPerformanceAgentFocusFromModel(this.model);
|
|
941
|
+
const conversationHandler = AiAssistanceModel.ConversationHandler.ConversationHandler.instance();
|
|
942
|
+
const focus = AiAssistanceModel.AIContext.getPerformanceAgentFocusFromModel(this.model);
|
|
944
943
|
if (!focus) {
|
|
945
944
|
throw new Error('could not create performance agent focus');
|
|
946
945
|
}
|
|
947
946
|
|
|
948
|
-
const agent = conversationHandler.createAgent(AiAssistanceModel.ConversationType.PERFORMANCE);
|
|
949
|
-
const conversation = new AiAssistanceModel.Conversation(
|
|
950
|
-
AiAssistanceModel.ConversationType.PERFORMANCE,
|
|
947
|
+
const agent = conversationHandler.createAgent(AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE);
|
|
948
|
+
const conversation = new AiAssistanceModel.AiHistoryStorage.Conversation(
|
|
949
|
+
AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE,
|
|
951
950
|
[],
|
|
952
951
|
agent.id,
|
|
953
952
|
/* isReadOnly */ true,
|
|
954
953
|
/* isExternal */ true,
|
|
955
954
|
);
|
|
956
955
|
|
|
957
|
-
const selected = new AiAssistanceModel.PerformanceTraceContext(focus);
|
|
956
|
+
const selected = new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(focus);
|
|
958
957
|
selected.external = true;
|
|
959
958
|
|
|
960
959
|
this.#externalAIConversationData = {
|
|
@@ -1060,32 +1059,17 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1060
1059
|
}
|
|
1061
1060
|
|
|
1062
1061
|
/**
|
|
1063
|
-
* Returns false if DevTools is in a standalone context where tracing/recording are
|
|
1064
|
-
*
|
|
1065
|
-
* This includes scenarios like:
|
|
1066
|
-
* - viewing an enhanced trace
|
|
1067
|
-
* - viewing a trace in trace.cafe
|
|
1068
|
-
* - other devtools_app.html scenarios without valid `ws=` param.
|
|
1069
|
-
* - See also the `isHostedMode` comment in `InspectorFrontendHost.ts`
|
|
1070
|
-
*
|
|
1071
|
-
* Possible signals to find a no-record (NR) context:
|
|
1072
|
-
* - `primaryPageTarget()?.sessionId` is empty in NR, but populated when viewing an enhanced trace.
|
|
1073
|
-
* - `primaryPageTarget.#capabilitiesMask` There's a tracing capability but the advertised capabilities are quite unreliable.
|
|
1074
|
-
* - `primaryPageTarget.targets().length === 1` Mostly correct for NC but its 2 when viewing an enhanced trace.
|
|
1075
|
-
* - `primaryPageTarget.router().connection()` Perhaps StubConnection or RehydratingConnection but MainConnection is incorrectly used sometimes. (eg devtools://devtools/bundled/devtools_app.html)
|
|
1076
|
-
* - `resourceTreeModel?.mainFrame === null`. Correct for NR, HOWEVER Node.js canRecord despite no main frame.
|
|
1077
|
-
* - `rootTarget.type !== 'tab'` Has potential but it lies. (It's "browser" for Node despite a node type)
|
|
1078
|
-
*
|
|
1079
|
-
* The best signal, for now, is this combo (`isNode || hasMainFrame`), which is both well-maintained and correct in all known cases:
|
|
1062
|
+
* Returns false if DevTools is in a standalone context where tracing/recording are
|
|
1063
|
+
* NOT available.
|
|
1080
1064
|
*/
|
|
1081
1065
|
private canRecord(): boolean {
|
|
1082
|
-
return
|
|
1066
|
+
return !Root.Runtime.Runtime.isTraceApp();
|
|
1083
1067
|
}
|
|
1084
1068
|
|
|
1085
1069
|
private populateToolbar(): void {
|
|
1086
1070
|
const canRecord = this.canRecord();
|
|
1087
1071
|
|
|
1088
|
-
if (canRecord || isNode) {
|
|
1072
|
+
if (canRecord || this.#isNode) {
|
|
1089
1073
|
this.panelToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleRecordAction));
|
|
1090
1074
|
}
|
|
1091
1075
|
if (canRecord) {
|
|
@@ -1118,7 +1102,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1118
1102
|
if (canRecord) {
|
|
1119
1103
|
this.panelToolbar.appendSeparator();
|
|
1120
1104
|
|
|
1121
|
-
if (!isNode) {
|
|
1105
|
+
if (!this.#isNode) {
|
|
1122
1106
|
this.homeButton = new UI.Toolbar.ToolbarButton(
|
|
1123
1107
|
i18nString(UIStrings.backToLiveMetrics), 'home', undefined, 'timeline.back-to-live-metrics');
|
|
1124
1108
|
this.homeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
@@ -1135,7 +1119,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1135
1119
|
|
|
1136
1120
|
// View
|
|
1137
1121
|
this.panelToolbar.appendSeparator();
|
|
1138
|
-
if (!isNode) {
|
|
1122
|
+
if (!this.#isNode) {
|
|
1139
1123
|
this.showScreenshotsToolbarCheckbox =
|
|
1140
1124
|
this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots));
|
|
1141
1125
|
this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox);
|
|
@@ -1163,14 +1147,14 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1163
1147
|
}
|
|
1164
1148
|
|
|
1165
1149
|
// Isolate selector
|
|
1166
|
-
if (isNode) {
|
|
1150
|
+
if (this.#isNode) {
|
|
1167
1151
|
const isolateSelector = new IsolateSelector();
|
|
1168
1152
|
this.panelToolbar.appendSeparator();
|
|
1169
1153
|
this.panelToolbar.appendToolbarItem(isolateSelector);
|
|
1170
1154
|
}
|
|
1171
1155
|
|
|
1172
1156
|
// Settings
|
|
1173
|
-
if (!isNode && canRecord) {
|
|
1157
|
+
if (!this.#isNode && canRecord) {
|
|
1174
1158
|
this.panelRightToolbar.appendSeparator();
|
|
1175
1159
|
this.panelRightToolbar.appendToolbarItem(this.showSettingsPaneButton);
|
|
1176
1160
|
}
|
|
@@ -1653,9 +1637,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1653
1637
|
let pathToLaunch: string|null = null;
|
|
1654
1638
|
const url = new URL(window.location.href);
|
|
1655
1639
|
const pathToEntrypoint = url.pathname.slice(0, url.pathname.lastIndexOf('/'));
|
|
1656
|
-
url.pathname = `${pathToEntrypoint}/
|
|
1657
|
-
// The standalone devtools shouldn't retain any existing query params.
|
|
1658
|
-
url.search = '';
|
|
1640
|
+
url.pathname = `${pathToEntrypoint}/trace_app.html`;
|
|
1659
1641
|
pathToLaunch = url.toString();
|
|
1660
1642
|
|
|
1661
1643
|
// Clarifying the window the code is referring to
|
|
@@ -1728,7 +1710,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1728
1710
|
}
|
|
1729
1711
|
|
|
1730
1712
|
private updateSettingsPaneVisibility(): void {
|
|
1731
|
-
if (isNode || !this.canRecord()) {
|
|
1713
|
+
if (this.#isNode || !this.canRecord()) {
|
|
1732
1714
|
return;
|
|
1733
1715
|
}
|
|
1734
1716
|
if (this.showSettingsPaneSetting.get()) {
|
|
@@ -1926,7 +1908,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1926
1908
|
this.setState(State.START_PENDING);
|
|
1927
1909
|
this.showRecordingStarted();
|
|
1928
1910
|
|
|
1929
|
-
if (isNode) {
|
|
1911
|
+
if (this.#isNode) {
|
|
1930
1912
|
await this.#startCPUProfilingRecording();
|
|
1931
1913
|
} else {
|
|
1932
1914
|
await this.#startTraceRecording();
|
|
@@ -2033,7 +2015,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2033
2015
|
return;
|
|
2034
2016
|
}
|
|
2035
2017
|
|
|
2036
|
-
this.recordReloadAction.setEnabled(isNode ? false : this.state === State.IDLE);
|
|
2018
|
+
this.recordReloadAction.setEnabled(this.#isNode ? false : this.state === State.IDLE);
|
|
2037
2019
|
this.homeButton?.setEnabled(this.state === State.IDLE && this.#hasActiveTrace());
|
|
2038
2020
|
}
|
|
2039
2021
|
|
|
@@ -2065,7 +2047,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2065
2047
|
this.flameChart.getNetworkDataProvider().reset();
|
|
2066
2048
|
this.flameChart.reset();
|
|
2067
2049
|
this.#changeView({mode: 'LANDING_PAGE'});
|
|
2068
|
-
UI.Context.Context.instance().setFlavor(AiAssistanceModel.AgentFocus, null);
|
|
2050
|
+
UI.Context.Context.instance().setFlavor(AiAssistanceModel.AIContext.AgentFocus, null);
|
|
2069
2051
|
}
|
|
2070
2052
|
|
|
2071
2053
|
#hasActiveTrace(): boolean {
|
|
@@ -2251,7 +2233,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2251
2233
|
|
|
2252
2234
|
if (parsedTrace.metadata.dataOrigin !== Trace.Types.File.DataOrigin.CPU_PROFILE) {
|
|
2253
2235
|
UI.Context.Context.instance().setFlavor(
|
|
2254
|
-
AiAssistanceModel.AgentFocus, AiAssistanceModel.AgentFocus.fromParsedTrace(parsedTrace));
|
|
2236
|
+
AiAssistanceModel.AIContext.AgentFocus, AiAssistanceModel.AIContext.AgentFocus.fromParsedTrace(parsedTrace));
|
|
2255
2237
|
}
|
|
2256
2238
|
}
|
|
2257
2239
|
|
|
@@ -2428,7 +2410,6 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2428
2410
|
}
|
|
2429
2411
|
|
|
2430
2412
|
const liveMetrics = new TimelineComponents.LiveMetricsView.LiveMetricsView();
|
|
2431
|
-
liveMetrics.isNode = isNode;
|
|
2432
2413
|
this.landingPage = LegacyWrapper.LegacyWrapper.legacyWrapper(UI.Widget.Widget, liveMetrics);
|
|
2433
2414
|
this.landingPage.element.classList.add('timeline-landing-page', 'fill');
|
|
2434
2415
|
this.landingPage.contentElement.classList.add('fill');
|
|
@@ -3032,10 +3013,10 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3032
3013
|
}
|
|
3033
3014
|
|
|
3034
3015
|
static async *
|
|
3035
|
-
handleExternalRecordRequest():
|
|
3036
|
-
|
|
3016
|
+
handleExternalRecordRequest(): AsyncGenerator<
|
|
3017
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse, AiAssistanceModel.AiAgent.ExternalRequestResponse> {
|
|
3037
3018
|
yield {
|
|
3038
|
-
type: AiAssistanceModel.ExternalRequestResponseType.NOTIFICATION,
|
|
3019
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.NOTIFICATION,
|
|
3039
3020
|
message: 'Recording performance trace',
|
|
3040
3021
|
};
|
|
3041
3022
|
TimelinePanel.instance().invalidateExternalAIConversationData();
|
|
@@ -3048,10 +3029,10 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3048
3029
|
await UI.ViewManager.ViewManager.instance().showView('timeline');
|
|
3049
3030
|
|
|
3050
3031
|
function onRecordingCompleted(eventData: EventTypes[Events.RECORDING_COMPLETED]):
|
|
3051
|
-
AiAssistanceModel.ExternalRequestResponse {
|
|
3032
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse {
|
|
3052
3033
|
if ('errorText' in eventData) {
|
|
3053
3034
|
return {
|
|
3054
|
-
type: AiAssistanceModel.ExternalRequestResponseType.ERROR,
|
|
3035
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR,
|
|
3055
3036
|
message: `Error running the trace: ${eventData.errorText}`,
|
|
3056
3037
|
};
|
|
3057
3038
|
}
|
|
@@ -3059,7 +3040,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3059
3040
|
const parsedTrace = panelInstance.model.parsedTrace(eventData.traceIndex);
|
|
3060
3041
|
if (!parsedTrace || !parsedTrace.insights || parsedTrace.insights.size === 0) {
|
|
3061
3042
|
return {
|
|
3062
|
-
type: AiAssistanceModel.ExternalRequestResponseType.ERROR,
|
|
3043
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR,
|
|
3063
3044
|
message: 'The trace was loaded successfully but no Insights were detected.',
|
|
3064
3045
|
};
|
|
3065
3046
|
}
|
|
@@ -3067,7 +3048,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3067
3048
|
const navigationId = Array.from(parsedTrace.insights.keys()).find(k => k !== 'NO_NAVIGATION');
|
|
3068
3049
|
if (!navigationId) {
|
|
3069
3050
|
return {
|
|
3070
|
-
type: AiAssistanceModel.ExternalRequestResponseType.ERROR,
|
|
3051
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR,
|
|
3071
3052
|
message: 'The trace was loaded successfully but no navigation was detected.',
|
|
3072
3053
|
};
|
|
3073
3054
|
}
|
|
@@ -3075,7 +3056,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3075
3056
|
const insightsForNav = parsedTrace.insights.get(navigationId);
|
|
3076
3057
|
if (!insightsForNav) {
|
|
3077
3058
|
return {
|
|
3078
|
-
type: AiAssistanceModel.ExternalRequestResponseType.ERROR,
|
|
3059
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ERROR,
|
|
3079
3060
|
message: 'The trace was loaded successfully but no Insights were detected.',
|
|
3080
3061
|
};
|
|
3081
3062
|
}
|
|
@@ -3089,8 +3070,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
3089
3070
|
for (const modelName in insightsForNav.model) {
|
|
3090
3071
|
const model = modelName as keyof Trace.Insights.Types.InsightModelsType;
|
|
3091
3072
|
const insight = insightsForNav.model[model];
|
|
3092
|
-
const focus = AiAssistanceModel.AgentFocus.fromParsedTrace(parsedTrace);
|
|
3093
|
-
const formatter = new AiAssistanceModel.PerformanceInsightFormatter(focus, insight);
|
|
3073
|
+
const focus = AiAssistanceModel.AIContext.AgentFocus.fromParsedTrace(parsedTrace);
|
|
3074
|
+
const formatter = new AiAssistanceModel.PerformanceInsightFormatter.PerformanceInsightFormatter(focus, insight);
|
|
3094
3075
|
if (!formatter.insightIsSupported()) {
|
|
3095
3076
|
// Not all Insights are integrated with "Ask AI" yet, let's avoid
|
|
3096
3077
|
// filling up the response with those ones because there will be no
|
|
@@ -3121,7 +3102,7 @@ These insights are passing, which means they are not considered to highlight con
|
|
|
3121
3102
|
${responseTextForPassedInsights}`;
|
|
3122
3103
|
|
|
3123
3104
|
return {
|
|
3124
|
-
type: AiAssistanceModel.ExternalRequestResponseType.ANSWER,
|
|
3105
|
+
type: AiAssistanceModel.AiAgent.ExternalRequestResponseType.ANSWER,
|
|
3125
3106
|
message: finalText,
|
|
3126
3107
|
devToolsLogs: [],
|
|
3127
3108
|
};
|
|
@@ -3138,11 +3119,11 @@ ${responseTextForPassedInsights}`;
|
|
|
3138
3119
|
});
|
|
3139
3120
|
}
|
|
3140
3121
|
|
|
3141
|
-
static async handleExternalAnalyzeRequest(prompt: string):
|
|
3142
|
-
|
|
3122
|
+
static async handleExternalAnalyzeRequest(prompt: string): Promise<AsyncGenerator<
|
|
3123
|
+
AiAssistanceModel.AiAgent.ExternalRequestResponse, AiAssistanceModel.AiAgent.ExternalRequestResponse>> {
|
|
3143
3124
|
const data = TimelinePanel.instance().getOrCreateExternalAIConversationData();
|
|
3144
3125
|
return await data.conversationHandler.handleExternalRequest({
|
|
3145
|
-
conversationType: AiAssistanceModel.ConversationType.PERFORMANCE,
|
|
3126
|
+
conversationType: AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE,
|
|
3146
3127
|
prompt,
|
|
3147
3128
|
data,
|
|
3148
3129
|
});
|
|
@@ -601,6 +601,7 @@ export class TimelineTreeView extends
|
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
override wasShown(): void {
|
|
604
|
+
super.wasShown();
|
|
604
605
|
this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SELECTED_NODE, this.#onDataGridSelectionChange, this);
|
|
605
606
|
this.dataGrid.addEventListener(DataGrid.DataGrid.Events.DESELECTED_NODE, this.#onDataGridDeselection, this);
|
|
606
607
|
}
|
|
@@ -13,6 +13,7 @@ import './MetricCard.js';
|
|
|
13
13
|
import * as Common from '../../../core/common/common.js';
|
|
14
14
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
15
15
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
16
|
+
import * as Root from '../../../core/root/root.js';
|
|
16
17
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
17
18
|
import * as CrUXManager from '../../../models/crux-manager/crux-manager.js';
|
|
18
19
|
import * as EmulationModel from '../../../models/emulation/emulation.js';
|
|
@@ -296,7 +297,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
296
297
|
export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableComponent {
|
|
297
298
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
isNode = Root.Runtime.Runtime.isNode();
|
|
300
301
|
|
|
301
302
|
#lcpValue?: LiveMetrics.LcpValue;
|
|
302
303
|
#clsValue?: LiveMetrics.ClsValue;
|
|
@@ -323,11 +324,6 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
323
324
|
this.#recordReloadAction = UI.ActionRegistry.ActionRegistry.instance().getAction('timeline.record-reload');
|
|
324
325
|
}
|
|
325
326
|
|
|
326
|
-
set isNode(isNode: boolean) {
|
|
327
|
-
this.#isNode = isNode;
|
|
328
|
-
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
327
|
#onMetricStatus(event: {data: LiveMetrics.StatusEvent}): void {
|
|
332
328
|
this.#lcpValue = event.data.lcp;
|
|
333
329
|
this.#clsValue = event.data.cls;
|
|
@@ -385,7 +381,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
385
381
|
}
|
|
386
382
|
|
|
387
383
|
async #refreshFieldDataForCurrentPage(): Promise<void> {
|
|
388
|
-
if (!this
|
|
384
|
+
if (!this.isNode) {
|
|
389
385
|
await this.#cruxManager.refresh();
|
|
390
386
|
}
|
|
391
387
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
|
@@ -1082,7 +1078,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
1082
1078
|
}
|
|
1083
1079
|
|
|
1084
1080
|
#render = (): void => {
|
|
1085
|
-
if (this
|
|
1081
|
+
if (this.isNode) {
|
|
1086
1082
|
Lit.render(this.#renderNodeView(), this.#shadow, {host: this});
|
|
1087
1083
|
return;
|
|
1088
1084
|
}
|
|
@@ -93,6 +93,7 @@ export class SidebarWidget extends UI.Widget.VBox {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
override wasShown(): void {
|
|
96
|
+
super.wasShown();
|
|
96
97
|
this.#tabbedPane.show(this.element);
|
|
97
98
|
this.#updateAnnotationsCountBadge();
|
|
98
99
|
|
|
@@ -114,6 +115,7 @@ export class SidebarWidget extends UI.Widget.VBox {
|
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
override willHide(): void {
|
|
118
|
+
super.willHide();
|
|
117
119
|
const currentlyActiveInsight = this.#insightsView.getActiveInsight();
|
|
118
120
|
this.#insightToRestoreOnOpen = currentlyActiveInsight;
|
|
119
121
|
|
|
@@ -434,7 +434,7 @@ export class SidebarSingleInsightSet extends HTMLElement {
|
|
|
434
434
|
return html``;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
const agentFocus = AIAssistance.AgentFocus.fromInsight(this.#data.parsedTrace, model);
|
|
437
|
+
const agentFocus = AIAssistance.AIContext.AgentFocus.fromInsight(this.#data.parsedTrace, model);
|
|
438
438
|
// clang-format off
|
|
439
439
|
return html`<div>
|
|
440
440
|
<${componentClass.litTagName}
|
|
@@ -87,7 +87,7 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
|
87
87
|
|
|
88
88
|
#selected = false;
|
|
89
89
|
#model: T|null = null;
|
|
90
|
-
#agentFocus: AIAssistance.AgentFocus|null = null;
|
|
90
|
+
#agentFocus: AIAssistance.AIContext.AgentFocus|null = null;
|
|
91
91
|
#fieldMetrics: Trace.Insights.Common.CrUXFieldMetricResults|null = null;
|
|
92
92
|
|
|
93
93
|
get model(): T|null {
|
|
@@ -159,7 +159,7 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
|
159
159
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
set agentFocus(agentFocus: AIAssistance.AgentFocus) {
|
|
162
|
+
set agentFocus(agentFocus: AIAssistance.AIContext.AgentFocus) {
|
|
163
163
|
this.#agentFocus = agentFocus;
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -181,19 +181,19 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
|
|
184
|
+
const focus = UI.Context.Context.instance().flavor(AIAssistance.AIContext.AgentFocus);
|
|
185
185
|
if (this.#selected) {
|
|
186
186
|
this.dispatchEvent(new SidebarInsight.InsightDeactivated());
|
|
187
187
|
|
|
188
188
|
// Clear agent (but only if currently focused on an insight).
|
|
189
189
|
if (focus) {
|
|
190
|
-
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(null));
|
|
190
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AIContext.AgentFocus, focus.withInsight(null));
|
|
191
191
|
}
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
if (focus) {
|
|
196
|
-
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus.withInsight(this.model));
|
|
196
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AIContext.AgentFocus, focus.withInsight(this.model));
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.PERFORMANCE_INSIGHT_CLICKED);
|
|
@@ -366,13 +366,13 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
let focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
|
|
369
|
+
let focus = UI.Context.Context.instance().flavor(AIAssistance.AIContext.AgentFocus);
|
|
370
370
|
if (focus) {
|
|
371
371
|
focus = focus.withInsight(this.model);
|
|
372
372
|
} else {
|
|
373
373
|
focus = this.#agentFocus;
|
|
374
374
|
}
|
|
375
|
-
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus);
|
|
375
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AIContext.AgentFocus, focus);
|
|
376
376
|
|
|
377
377
|
// Trigger the AI Assistance panel to open.
|
|
378
378
|
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(actionId);
|
|
@@ -1478,7 +1478,7 @@ export class Overlays extends EventTarget {
|
|
|
1478
1478
|
const component = new Components.EntryLabelOverlay.EntryLabelOverlay(overlay.label, shouldDrawLabelBelowEntry);
|
|
1479
1479
|
// Generate the AI Call Tree for the AI Auto-Annotation feature.
|
|
1480
1480
|
const parsedTrace = this.#queries.parsedTrace();
|
|
1481
|
-
const callTree = parsedTrace ? AIAssistance.AICallTree.fromEvent(overlay.entry, parsedTrace) : null;
|
|
1481
|
+
const callTree = parsedTrace ? AIAssistance.AICallTree.AICallTree.fromEvent(overlay.entry, parsedTrace) : null;
|
|
1482
1482
|
component.callTree = callTree;
|
|
1483
1483
|
|
|
1484
1484
|
component.addEventListener(
|
|
@@ -183,10 +183,10 @@ export class EntryLabelOverlay extends HTMLElement {
|
|
|
183
183
|
/**
|
|
184
184
|
* Required to generate a label with AI.
|
|
185
185
|
*/
|
|
186
|
-
#callTree: AiAssistanceModels.AICallTree|null = null;
|
|
186
|
+
#callTree: AiAssistanceModels.AICallTree.AICallTree|null = null;
|
|
187
187
|
// Creates or gets the setting if it exists.
|
|
188
188
|
#aiAnnotationsEnabledSetting = Common.Settings.Settings.instance().createSetting('ai-annotations-enabled', false);
|
|
189
|
-
#agent = new AiAssistanceModels.PerformanceAnnotationsAgent({
|
|
189
|
+
#agent = new AiAssistanceModels.PerformanceAnnotationsAgent.PerformanceAnnotationsAgent({
|
|
190
190
|
aidaClient: new Host.AidaClient.AidaClient(),
|
|
191
191
|
serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
|
|
192
192
|
});
|
|
@@ -246,7 +246,7 @@ export class EntryLabelOverlay extends HTMLElement {
|
|
|
246
246
|
/**
|
|
247
247
|
* So we can provide a mocked agent in tests. Do not call this method outside of a test!
|
|
248
248
|
*/
|
|
249
|
-
overrideAIAgentForTest(agent: AiAssistanceModels.PerformanceAnnotationsAgent): void {
|
|
249
|
+
overrideAIAgentForTest(agent: AiAssistanceModels.PerformanceAnnotationsAgent.PerformanceAnnotationsAgent): void {
|
|
250
250
|
this.#agent = agent;
|
|
251
251
|
}
|
|
252
252
|
|
|
@@ -497,7 +497,7 @@ export class EntryLabelOverlay extends HTMLElement {
|
|
|
497
497
|
selection?.addRange(range);
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
-
set callTree(callTree: AiAssistanceModels.AICallTree|null) {
|
|
500
|
+
set callTree(callTree: AiAssistanceModels.AICallTree.AICallTree|null) {
|
|
501
501
|
this.#callTree = callTree;
|
|
502
502
|
// If the entry has a calltree, we need to check if we need to show the 'generate label' button.
|
|
503
503
|
this.#setAIButtonRenderState();
|
|
@@ -202,6 +202,7 @@ export class WebAudioView extends UI.Widget.VBox implements SDK.TargetManager.SD
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
override willHide(): void {
|
|
205
|
+
super.willHide();
|
|
205
206
|
for (const model of SDK.TargetManager.TargetManager.instance().models(WebAudioModel)) {
|
|
206
207
|
this.removeEventListeners(model);
|
|
207
208
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://source.chromium.org/chromium/chromium/src/+/main:components/variations/proto/devtools/
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 31876d8522d405cfcc6ea0f2a717a237382faa20
|
|
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:
|
|
4
|
-
Revision:
|
|
3
|
+
Version: 13.0.0
|
|
4
|
+
Revision: 82e119638a65629f7a19b2ec11bcd6ddc1ad6b89
|
|
5
5
|
Update Mechanism: Manual
|
|
6
6
|
URL: https://github.com/GoogleChrome/lighthouse
|
|
7
7
|
License: Apache-2.0
|