chrome-devtools-frontend 1.0.1526630 → 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 +6 -1
- 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/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 +3 -2
- 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 +29 -11
- package/front_end/panels/coverage/CoverageView.ts +292 -284
- 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 +1 -0
- 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 +1 -0
- 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/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/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/UIUtils.ts +8 -19
- package/front_end/ui/legacy/ViewManager.ts +1 -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/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 +2 -0
- 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
|
@@ -608,8 +608,18 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
private isAiCodeCompletionEnabled(): boolean {
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
|
|
612
|
+
const aidaAvailability = Root.Runtime.hostConfig.aidaAvailability;
|
|
613
|
+
if (!devtoolsLocale.locale.startsWith('en-')) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
if (aidaAvailability?.blockedByGeo) {
|
|
617
|
+
return false;
|
|
618
|
+
}
|
|
619
|
+
if (aidaAvailability?.blockedByAge) {
|
|
620
|
+
return false;
|
|
621
|
+
}
|
|
622
|
+
return Boolean(aidaAvailability?.enabled && Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled);
|
|
613
623
|
}
|
|
614
624
|
|
|
615
625
|
private editorSetForTest(): void {
|
|
@@ -109,7 +109,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
109
109
|
n: group.messageCount
|
|
110
110
|
})}
|
|
111
111
|
${group.messageCount === 0 ? nothing : html`
|
|
112
|
-
<ul role="group"
|
|
112
|
+
<ul role="group" hidden>
|
|
113
113
|
${group.urlGroups.values().map(urlGroup => html`
|
|
114
114
|
<li
|
|
115
115
|
${Directives.ref(element => element && nodeFilterMap.set(element, group.filter))}
|
|
@@ -767,6 +767,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
769
|
override willHide(): void {
|
|
770
|
+
super.willHide();
|
|
770
771
|
this.hidePromptSuggestBox();
|
|
771
772
|
}
|
|
772
773
|
|
|
@@ -1698,6 +1699,17 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1698
1699
|
}
|
|
1699
1700
|
|
|
1700
1701
|
private isAiCodeCompletionEnabled(): boolean {
|
|
1702
|
+
const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
|
|
1703
|
+
const aidaAvailability = Root.Runtime.hostConfig.aidaAvailability;
|
|
1704
|
+
if (!devtoolsLocale.locale.startsWith('en-')) {
|
|
1705
|
+
return false;
|
|
1706
|
+
}
|
|
1707
|
+
if (aidaAvailability?.blockedByGeo) {
|
|
1708
|
+
return false;
|
|
1709
|
+
}
|
|
1710
|
+
if (aidaAvailability?.blockedByAge) {
|
|
1711
|
+
return false;
|
|
1712
|
+
}
|
|
1701
1713
|
return Boolean(Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled);
|
|
1702
1714
|
}
|
|
1703
1715
|
}
|
|
@@ -41,6 +41,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
41
41
|
import * as Root from '../../core/root/root.js';
|
|
42
42
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
43
43
|
import * as Protocol from '../../generated/protocol.js';
|
|
44
|
+
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
44
45
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
45
46
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
46
47
|
import * as Logs from '../../models/logs/logs.js';
|
|
@@ -61,6 +62,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
61
62
|
import * as Security from '../security/security.js';
|
|
62
63
|
|
|
63
64
|
import {format, updateStyle} from './ConsoleFormat.js';
|
|
65
|
+
import {ConsoleInsightTeaser} from './ConsoleInsightTeaser.js';
|
|
64
66
|
import consoleViewStyles from './consoleView.css.js';
|
|
65
67
|
import type {ConsoleViewportElement} from './ConsoleViewport.js';
|
|
66
68
|
import {augmentErrorStackWithScriptIds, parseSourcePositionsFromErrorStack} from './ErrorStackParser.js';
|
|
@@ -317,6 +319,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
317
319
|
private requestResolver: Logs.RequestResolver.RequestResolver;
|
|
318
320
|
private issueResolver: IssuesManager.IssueResolver.IssueResolver;
|
|
319
321
|
#adjacentUserCommandResult = false;
|
|
322
|
+
#teaser: ConsoleInsightTeaser|undefined = undefined;
|
|
320
323
|
|
|
321
324
|
/** Formatting Error#stack is asynchronous. Allow tests to wait for the result */
|
|
322
325
|
#formatErrorStackPromiseForTest = Promise.resolve();
|
|
@@ -365,7 +368,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
365
368
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.InsightClosed);
|
|
366
369
|
this.elementInternal?.classList.toggle('has-insight', false);
|
|
367
370
|
this.elementInternal?.removeChild(insight);
|
|
371
|
+
this.#teaser?.setInactive(false);
|
|
368
372
|
}, {once: true});
|
|
373
|
+
this.#teaser?.setInactive(true);
|
|
369
374
|
}
|
|
370
375
|
|
|
371
376
|
element(): HTMLElement {
|
|
@@ -374,6 +379,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
374
379
|
|
|
375
380
|
wasShown(): void {
|
|
376
381
|
this.isVisibleInternal = true;
|
|
382
|
+
if (this.elementInternal) {
|
|
383
|
+
this.#teaser?.show(this.elementInternal);
|
|
384
|
+
}
|
|
377
385
|
}
|
|
378
386
|
|
|
379
387
|
onResize(): void {
|
|
@@ -382,6 +390,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
382
390
|
willHide(): void {
|
|
383
391
|
this.isVisibleInternal = false;
|
|
384
392
|
this.cachedHeight = this.element().offsetHeight;
|
|
393
|
+
this.#teaser?.detach();
|
|
385
394
|
}
|
|
386
395
|
|
|
387
396
|
isVisible(): boolean {
|
|
@@ -1359,6 +1368,13 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1359
1368
|
this.elementInternal.removeChildren();
|
|
1360
1369
|
this.consoleRowWrapper = this.elementInternal.createChild('div');
|
|
1361
1370
|
this.consoleRowWrapper.classList.add('console-row-wrapper');
|
|
1371
|
+
|
|
1372
|
+
if (this.shouldShowTeaser()) {
|
|
1373
|
+
const uuid = crypto.randomUUID();
|
|
1374
|
+
this.elementInternal.setAttribute('aria-details', `teaser-${uuid}`);
|
|
1375
|
+
this.#teaser = new ConsoleInsightTeaser(uuid, this);
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1362
1378
|
if (this.message.isGroupStartMessage()) {
|
|
1363
1379
|
this.elementInternal.classList.add('console-group-title');
|
|
1364
1380
|
}
|
|
@@ -1430,6 +1446,17 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1430
1446
|
this.message.level === Protocol.Log.LogEntryLevel.Warning;
|
|
1431
1447
|
}
|
|
1432
1448
|
|
|
1449
|
+
shouldShowTeaser(): boolean {
|
|
1450
|
+
if (!this.shouldShowInsights() || !AiAssistanceModel.BuiltInAi.BuiltInAi.cachedIsAvailable()) {
|
|
1451
|
+
return false;
|
|
1452
|
+
}
|
|
1453
|
+
const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
|
|
1454
|
+
if (!devtoolsLocale.locale.startsWith('en-')) {
|
|
1455
|
+
return false;
|
|
1456
|
+
}
|
|
1457
|
+
return true;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1433
1460
|
getExplainLabel(): string {
|
|
1434
1461
|
if (this.message.level === Protocol.Log.LogEntryLevel.Error) {
|
|
1435
1462
|
return i18nString(UIStrings.explainThisError);
|
|
@@ -9,7 +9,8 @@ import * as Formatter from '../../models/formatter/formatter.js';
|
|
|
9
9
|
import * as Logs from '../../models/logs/logs.js';
|
|
10
10
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
11
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
import type {ConsoleViewMessage} from './ConsoleViewMessage.js';
|
|
13
14
|
|
|
14
15
|
const MAX_MESSAGE_SIZE = 1000;
|
|
15
16
|
const MAX_STACK_TRACE_SIZE = 1000;
|
|
@@ -28,9 +29,9 @@ export interface Source {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export class PromptBuilder {
|
|
31
|
-
#consoleMessage:
|
|
32
|
+
#consoleMessage: ConsoleViewMessage;
|
|
32
33
|
|
|
33
|
-
constructor(consoleMessage:
|
|
34
|
+
constructor(consoleMessage: ConsoleViewMessage) {
|
|
34
35
|
this.#consoleMessage = consoleMessage;
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -270,14 +271,18 @@ export function formatNetworkRequest(
|
|
|
270
271
|
string {
|
|
271
272
|
return `Request: ${request.url()}
|
|
272
273
|
|
|
273
|
-
${
|
|
274
|
+
${
|
|
275
|
+
AiAssistanceModel.NetworkRequestFormatter.NetworkRequestFormatter.formatHeaders(
|
|
276
|
+
'Request headers:', request.requestHeaders())}
|
|
274
277
|
|
|
275
|
-
${
|
|
278
|
+
${
|
|
279
|
+
AiAssistanceModel.NetworkRequestFormatter.NetworkRequestFormatter.formatHeaders(
|
|
280
|
+
'Response headers:', request.responseHeaders)}
|
|
276
281
|
|
|
277
282
|
Response status: ${request.statusCode} ${request.statusText}`;
|
|
278
283
|
}
|
|
279
284
|
|
|
280
|
-
export function formatConsoleMessage(message:
|
|
285
|
+
export function formatConsoleMessage(message: ConsoleViewMessage): string {
|
|
281
286
|
return message.toMessageTextString().substr(0, MAX_MESSAGE_SIZE);
|
|
282
287
|
}
|
|
283
288
|
|
|
@@ -285,7 +290,7 @@ export function formatConsoleMessage(message: Console.ConsoleViewMessage.Console
|
|
|
285
290
|
* This formats the stacktrace from the console message which might or might not
|
|
286
291
|
* match the content of stacktrace(s) in the console message arguments.
|
|
287
292
|
*/
|
|
288
|
-
export function formatStackTrace(message:
|
|
293
|
+
export function formatStackTrace(message: ConsoleViewMessage): string {
|
|
289
294
|
const previewContainer = message.contentElement().querySelector('.stack-preview-container');
|
|
290
295
|
|
|
291
296
|
if (!previewContainer) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import './ConsoleContextSelector.js';
|
|
6
6
|
import './ConsoleFilter.js';
|
|
7
7
|
import './ConsoleFormat.js';
|
|
8
|
+
import './ConsoleInsightTeaser.js';
|
|
8
9
|
import './ConsolePinPane.js';
|
|
9
10
|
import './ConsoleSidebar.js';
|
|
10
11
|
import './ConsoleViewport.js';
|
|
@@ -12,10 +13,12 @@ import './ConsoleViewMessage.js';
|
|
|
12
13
|
import './ConsolePrompt.js';
|
|
13
14
|
import './ConsoleView.js';
|
|
14
15
|
import './ConsolePanel.js';
|
|
16
|
+
import './PromptBuilder.js';
|
|
15
17
|
|
|
16
18
|
import * as ConsoleContextSelector from './ConsoleContextSelector.js';
|
|
17
19
|
import * as ConsoleFilter from './ConsoleFilter.js';
|
|
18
20
|
import * as ConsoleFormat from './ConsoleFormat.js';
|
|
21
|
+
import * as ConsoleInsightTeaser from './ConsoleInsightTeaser.js';
|
|
19
22
|
import * as ConsolePanel from './ConsolePanel.js';
|
|
20
23
|
import * as ConsolePinPane from './ConsolePinPane.js';
|
|
21
24
|
import * as ConsolePrompt from './ConsolePrompt.js';
|
|
@@ -24,11 +27,13 @@ import * as ConsoleView from './ConsoleView.js';
|
|
|
24
27
|
import * as ConsoleViewMessage from './ConsoleViewMessage.js';
|
|
25
28
|
import * as ConsoleViewport from './ConsoleViewport.js';
|
|
26
29
|
import * as ErrorStackParser from './ErrorStackParser.js';
|
|
30
|
+
import * as PromptBuilder from './PromptBuilder.js';
|
|
27
31
|
|
|
28
32
|
export {
|
|
29
33
|
ConsoleContextSelector,
|
|
30
34
|
ConsoleFilter,
|
|
31
35
|
ConsoleFormat,
|
|
36
|
+
ConsoleInsightTeaser,
|
|
32
37
|
ConsolePanel,
|
|
33
38
|
ConsolePinPane,
|
|
34
39
|
ConsolePrompt,
|
|
@@ -37,4 +42,5 @@ export {
|
|
|
37
42
|
ConsoleViewMessage,
|
|
38
43
|
ConsoleViewport,
|
|
39
44
|
ErrorStackParser,
|
|
45
|
+
PromptBuilder,
|
|
40
46
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@scope to (devtools-widget > *) {
|
|
8
|
+
.teaser-tooltip-container {
|
|
9
|
+
width: var(--sys-size-31);
|
|
10
|
+
padding: var(--sys-size-1) var(--sys-size-3) var(--sys-size-3);
|
|
11
|
+
margin-top: var(--sys-size-2);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes gradient {
|
|
15
|
+
0% { background-position: 100% 0; }
|
|
16
|
+
100% { background-position: -100% 0; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.loader {
|
|
20
|
+
background-size: 400% 100%;
|
|
21
|
+
animation: gradient 4s infinite linear;
|
|
22
|
+
margin-top: var(--sys-size-5);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (prefers-color-scheme: light) {
|
|
26
|
+
.loader {
|
|
27
|
+
background-image: linear-gradient(
|
|
28
|
+
70deg,
|
|
29
|
+
color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 0%,
|
|
30
|
+
color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 30%,
|
|
31
|
+
color-mix(in srgb, var(--sys-color-on-surface) 15%, transparent) 50%,
|
|
32
|
+
color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 70%,
|
|
33
|
+
color-mix(in srgb, var(--sys-color-on-surface) 5%, transparent) 100%
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (prefers-color-scheme: dark) {
|
|
39
|
+
.loader {
|
|
40
|
+
background-image: linear-gradient(
|
|
41
|
+
70deg,
|
|
42
|
+
color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 0%,
|
|
43
|
+
color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 30%,
|
|
44
|
+
color-mix(in srgb, var(--sys-color-on-surface) 30%, transparent) 50%,
|
|
45
|
+
color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 70%,
|
|
46
|
+
color-mix(in srgb, var(--sys-color-on-surface) 10%, transparent) 100%
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
h2 {
|
|
52
|
+
font: var(--sys-typescale-body4-bold);
|
|
53
|
+
margin: 0 0 var(--sys-size-3);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -177,32 +177,46 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
export class CoverageListView extends UI.Widget.VBox {
|
|
180
|
-
|
|
180
|
+
#highlightRegExp: RegExp|null;
|
|
181
181
|
#coverageInfo: CoverageListItem[] = [];
|
|
182
182
|
#selectedUrl: Platform.DevToolsPath.UrlString|null = null;
|
|
183
183
|
#maxSize = 0;
|
|
184
184
|
#view: View;
|
|
185
185
|
|
|
186
|
-
constructor(view = DEFAULT_VIEW) {
|
|
187
|
-
super({useShadowDom: true, delegatesFocus: true});
|
|
186
|
+
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
187
|
+
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
188
188
|
this.#view = view;
|
|
189
|
-
this
|
|
189
|
+
this.#highlightRegExp = null;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
this
|
|
194
|
-
this
|
|
192
|
+
set highlightRegExp(highlightRegExp: RegExp|null) {
|
|
193
|
+
this.#highlightRegExp = highlightRegExp;
|
|
194
|
+
this.requestUpdate();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
get highlightRegExp(): RegExp|null {
|
|
198
|
+
return this.#highlightRegExp;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
set coverageInfo(coverageInfo: CoverageListItem[]) {
|
|
195
202
|
this.#coverageInfo = coverageInfo;
|
|
203
|
+
this.#maxSize = coverageInfo.reduce((acc, entry) => Math.max(acc, entry.size), 0);
|
|
196
204
|
this.requestUpdate();
|
|
197
205
|
}
|
|
198
206
|
|
|
207
|
+
get coverageInfo(): CoverageListItem[] {
|
|
208
|
+
return this.#coverageInfo;
|
|
209
|
+
}
|
|
210
|
+
|
|
199
211
|
override performUpdate(): void {
|
|
200
212
|
const input: ViewInput = {
|
|
201
213
|
items: this.#coverageInfo,
|
|
202
214
|
selectedUrl: this.#selectedUrl,
|
|
203
215
|
maxSize: this.#maxSize,
|
|
204
|
-
onOpen:
|
|
205
|
-
|
|
216
|
+
onOpen: (url: Platform.DevToolsPath.UrlString) => {
|
|
217
|
+
this.selectedUrl = url;
|
|
218
|
+
},
|
|
219
|
+
highlightRegExp: this.#highlightRegExp,
|
|
206
220
|
};
|
|
207
221
|
this.#view(input, {}, this.contentElement);
|
|
208
222
|
}
|
|
@@ -213,7 +227,7 @@ export class CoverageListView extends UI.Widget.VBox {
|
|
|
213
227
|
this.requestUpdate();
|
|
214
228
|
}
|
|
215
229
|
|
|
216
|
-
|
|
230
|
+
set selectedUrl(url: Platform.DevToolsPath.UrlString|null) {
|
|
217
231
|
const info = this.#coverageInfo.find(info => info.url === url);
|
|
218
232
|
if (!info) {
|
|
219
233
|
return;
|
|
@@ -222,13 +236,17 @@ export class CoverageListView extends UI.Widget.VBox {
|
|
|
222
236
|
this.#selectedUrl = url as Platform.DevToolsPath.UrlString;
|
|
223
237
|
this.requestUpdate();
|
|
224
238
|
}
|
|
225
|
-
const sourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url);
|
|
239
|
+
const sourceCode = url ? Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url) : null;
|
|
226
240
|
if (!sourceCode) {
|
|
227
241
|
return;
|
|
228
242
|
}
|
|
229
243
|
|
|
230
244
|
void Common.Revealer.reveal(sourceCode);
|
|
231
245
|
}
|
|
246
|
+
|
|
247
|
+
get selectedUrl(): Platform.DevToolsPath.UrlString|null {
|
|
248
|
+
return this.#selectedUrl;
|
|
249
|
+
}
|
|
232
250
|
}
|
|
233
251
|
|
|
234
252
|
let percentageFormatter: Intl.NumberFormat|null = null;
|