chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
package/AUTHORS
CHANGED
|
@@ -56,6 +56,7 @@ Jeffrey Chen <jeffreyca16@gmail.com>
|
|
|
56
56
|
Jerome Vouillon <jerome.vouillon@gmail.com>
|
|
57
57
|
Jesper van den Ende <jespertheend@gmail.com>
|
|
58
58
|
Jithil p Ponnan <jithil.p@gmail.com>
|
|
59
|
+
Joseph P <thepigrammer@gmail.com>
|
|
59
60
|
Juba Borgohain <chromiumjuba@gmail.com>
|
|
60
61
|
Julian Geppert <spctstr@gmail.com>
|
|
61
62
|
Junseo Yoo <joon.yoo181@berkeley.edu>
|
package/docs/checklist/README.md
CHANGED
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
**Shipping new Web Platform features (WPFs) in Chromium requires tooling support.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
WebAssembly, Network, and other aspects — requiring only minimal or no changes to make DevTools behave as expected
|
|
9
|
-
in light of the new WPF. This document refers to such cases as _basic support_.
|
|
7
|
+
A feature is *debuggable* if developers can use DevTools (including the classic Chrome DevTools UI *and* [Chrome DevTools for agents](https://github.com/ChromeDevTools/chrome-devtools-mcp)) to more easily identify and fix a bug related to this feature. In some cases, debuggability is important for feature adoption, especially when a feature is complex by nature.
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Many new Web Platform Features (WPFs) can piggyback off of DevTools' general tooling for HTML, DOM, CSS, JavaScript, WebAssembly, Network, and other aspects — requiring only minimal or no changes to make DevTools behave as expected in light of the new WPF. This document refers to such cases as _basic support_.
|
|
10
|
+
|
|
11
|
+
However, some WPFs might warrant larger changes, including brand-new DevTools features. This document refers to such cases as _extended support_.
|
|
13
12
|
|
|
14
13
|
**What is basic support?**
|
|
15
14
|
Basic support ensures that a new WPF is introspectable and DevTools does not break or crash Chromium in its presence. In addition, developers should have a way of knowing if their web application uses this WPF correctly. Definitions and examples of basic support for common WPF categories can be found below.
|
|
@@ -59,6 +58,7 @@ This is often automatically supported because the Elements panel directly reflec
|
|
|
59
58
|
This is often automatically supported because the DevTools Console has access to the same JavaScript runtime as the page. Any property that is programmatically accessible on a DOM object will be discoverable by the Console's autocomplete mechanism.
|
|
60
59
|
|
|
61
60
|
Verify that the new properties show up in the DevTools Console autocomplete functionality. To enable argument hints for new or changed parameterized functions, run
|
|
61
|
+
|
|
62
62
|
```bash
|
|
63
63
|
devtools-frontend/src/scripts/deps/roll_deps.py
|
|
64
64
|
```
|
|
@@ -114,6 +114,7 @@ Any new CSS property that is applied to an element should also appear correctly
|
|
|
114
114
|
|
|
115
115
|
To recognize new CSS properties/values in the DevTools Styles tab’s autocomplete functionality, roll
|
|
116
116
|
[Chromium’s `css_properties.json5`](https://source.chromium.org/chromium/chromium/src/+/main:third\_party/blink/renderer/core/css/css_properties.json5;drc=be2c473625b9c28a4ff6735547cb0c1b6743f4ae) into the `devtools-frontend` repository by running
|
|
117
|
+
|
|
117
118
|
```bash
|
|
118
119
|
devtools-frontend/src/scripts/deps/roll_deps.py
|
|
119
120
|
```
|
|
@@ -123,7 +124,7 @@ see this [example CL](https://chromium-review.googlesource.com/c/devtools/devtoo
|
|
|
123
124
|
|
|
124
125
|
Additionally, verify that the Styles tab tooltips showing the property's definition and baseline status are correct and up-to-date. Otherwise, let DevTools team know that this should be updated.
|
|
125
126
|
|
|
126
|
-
### New CSS
|
|
127
|
+
### New CSS functions and value indirection
|
|
127
128
|
|
|
128
129
|
> **Basic support requirement:** The new function or value mechanism is correctly parsed and displayed in the Styles tab, showing the *authored* value (e.g., `var(--my-color)`). Hovering over the value should reveal its computed result in a tooltip. The function name should also be autocompleted.
|
|
129
130
|
|
|
@@ -135,7 +136,7 @@ Support for new CSS functions and other forms of value indirection (like CSS cus
|
|
|
135
136
|
|
|
136
137
|
Support for new pseudo-elements is not automatic. The browser's backend must be updated to expose the new pseudo-element over the Chrome DevTools Protocol (CDP). Additionally, the DevTools frontend must be updated to recognize and display these pseudo-elements in the Elements panel.
|
|
137
138
|
|
|
138
|
-
Pointers: [InspectorDOMAgent
|
|
139
|
+
Pointers: [`InspectorDOMAgent`’s supported pseudos](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/inspector/inspector_dom_agent.cc;l=122;drc=90e6a37b7c43154ea99d7cc7ff632ee181078fb2), [`InspectorStyleResolver`’s list of supported pseudo-elements](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/inspector/inspector_style_resolver.cc;l=57-71;drc=c182cb38dc164e2b83c75cdf8699b076dfe6bc5e), and [DevTools Frontend `DOMModel` updates example CL](https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6195233).
|
|
139
140
|
|
|
140
141
|
|
|
141
142
|
## Network-related features
|
package/eslint.config.mjs
CHANGED
|
@@ -899,6 +899,13 @@ export default defineConfig([
|
|
|
899
899
|
'@devtools/canvas-context-tracking': 'error',
|
|
900
900
|
},
|
|
901
901
|
},
|
|
902
|
+
{
|
|
903
|
+
name: 'AI Assistance agents',
|
|
904
|
+
files: ['front_end/models/ai_assistance/agents/**/*.ts'],
|
|
905
|
+
rules: {
|
|
906
|
+
'@devtools/no-dynamic-preamble': 'error',
|
|
907
|
+
},
|
|
908
|
+
},
|
|
902
909
|
{
|
|
903
910
|
name: 'TypeScript type-definitions',
|
|
904
911
|
files: ['**/*.d.ts'],
|
|
@@ -115,9 +115,14 @@ export class ObjectWrapper<Events> implements EventTarget<Events> {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
export type EventMixinBase = {
|
|
119
|
+
dispatchDOMEvent ? (event: Event) : void,
|
|
120
|
+
}&object;
|
|
121
|
+
|
|
118
122
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
119
|
-
export function eventMixin<Events, Base extends Platform.Constructor.Constructor<
|
|
120
|
-
|
|
123
|
+
export function eventMixin<Events, Base extends Platform.Constructor.Constructor<EventMixinBase>>(base: Base) {
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
125
|
+
console.assert(base as any !== HTMLElement);
|
|
121
126
|
return class EventHandling extends base implements EventTarget<Events> {
|
|
122
127
|
// Note that the weird name is due to TSC disallowing private/protected fields in
|
|
123
128
|
// anonmous exported classes. We use a `__` prefix to prevent clashes with `base`.
|
|
@@ -147,6 +152,10 @@ export function eventMixin<Events, Base extends Platform.Constructor.Constructor
|
|
|
147
152
|
eventType: Platform.TypeScriptUtilities.NoUnion<T>,
|
|
148
153
|
...eventData: EventPayloadToRestParameters<Events, T>): void {
|
|
149
154
|
this.__events.dispatchEventToListeners(eventType, ...eventData);
|
|
155
|
+
|
|
156
|
+
if (typeof this.dispatchDOMEvent === 'function') {
|
|
157
|
+
this.dispatchDOMEvent(new CustomEvent(eventType as string, {detail: eventData[0]}));
|
|
158
|
+
}
|
|
150
159
|
}
|
|
151
160
|
};
|
|
152
161
|
}
|
|
@@ -159,7 +159,7 @@ Node.prototype.window = function(): Window {
|
|
|
159
159
|
return this.ownerDocument.defaultView as Window;
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
Node.prototype.removeChildren = function(): void {
|
|
163
163
|
if (this.firstChild) {
|
|
164
164
|
this.textContent = '';
|
|
165
165
|
}
|
|
@@ -261,25 +261,28 @@ Node.prototype.childTextNodes = function(): Node[] {
|
|
|
261
261
|
}
|
|
262
262
|
return result;
|
|
263
263
|
};
|
|
264
|
-
|
|
265
264
|
function innerTextDescendants(node: Node): Node[] {
|
|
266
|
-
if (![Node.ELEMENT_NODE, Node.TEXT_NODE].includes(node.nodeType) ||
|
|
265
|
+
if (![Node.ELEMENT_NODE, Node.TEXT_NODE, Node.DOCUMENT_FRAGMENT_NODE].includes(node.nodeType) ||
|
|
266
|
+
['SCRIPT', 'STYLE'].includes(node.nodeName)) {
|
|
267
267
|
return [];
|
|
268
268
|
}
|
|
269
|
-
if (!(node instanceof HTMLElement)) {
|
|
270
|
-
return [node];
|
|
271
|
-
}
|
|
272
269
|
if (node instanceof HTMLSlotElement) {
|
|
273
270
|
return [...node.assignedNodes()].flatMap(innerTextDescendants);
|
|
274
271
|
}
|
|
275
|
-
if (node.shadowRoot) {
|
|
272
|
+
if (node instanceof Element && node.shadowRoot) {
|
|
276
273
|
return [...node.shadowRoot.childNodes].flatMap(innerTextDescendants);
|
|
277
274
|
}
|
|
275
|
+
if (node instanceof DocumentFragment) {
|
|
276
|
+
return [...node.childNodes].flatMap(innerTextDescendants);
|
|
277
|
+
}
|
|
278
|
+
if (!(node instanceof HTMLElement)) {
|
|
279
|
+
return [node];
|
|
280
|
+
}
|
|
278
281
|
const result: Node[] = [];
|
|
279
282
|
let expanded = false;
|
|
280
283
|
for (const child of node.childNodes) {
|
|
281
284
|
const childResult = innerTextDescendants(child);
|
|
282
|
-
if (childResult.length > 1 || childResult.length === 1 && childResult[0] !== child) {
|
|
285
|
+
if (childResult.length > 1 || (childResult.length === 1 && childResult[0] !== child)) {
|
|
283
286
|
expanded = true;
|
|
284
287
|
}
|
|
285
288
|
result.push(...childResult);
|
|
@@ -426,6 +426,14 @@ export function convertToUserTierEnum(userTier: string|undefined): UserTier {
|
|
|
426
426
|
return UserTier.PUBLIC;
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
export function getClientFeatureName(feature: ClientFeature): string {
|
|
430
|
+
const name = ClientFeature[feature];
|
|
431
|
+
if (typeof name !== 'string') {
|
|
432
|
+
throw new Error(`Invalid ClientFeature: ${feature}`);
|
|
433
|
+
}
|
|
434
|
+
return name;
|
|
435
|
+
}
|
|
436
|
+
|
|
429
437
|
let hostConfigTrackerInstance: HostConfigTracker|undefined;
|
|
430
438
|
|
|
431
439
|
export class HostConfigTracker extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
@@ -180,6 +180,7 @@ export function aidaCompletionRequestToGcaRequest(request: AIDA.CompletionReques
|
|
|
180
180
|
(request.additional_files ?? []).map(f => ({
|
|
181
181
|
fileUri: f.path,
|
|
182
182
|
inclusionReason: [AidaReasonToGcaInclusionReason[f.included_reason]],
|
|
183
|
+
segments: [{content: f.content, isSelected: false}],
|
|
183
184
|
}));
|
|
184
185
|
|
|
185
186
|
const inEditorFile: GCA.SourceFile = inFileEditRequestToSourceFile(request);
|
|
@@ -814,7 +814,6 @@ export enum DevtoolsExperiments {
|
|
|
814
814
|
'capture-node-creation-stacks' = 1,
|
|
815
815
|
'live-heap-profile' = 11,
|
|
816
816
|
'protocol-monitor' = 13,
|
|
817
|
-
'sampling-heap-profiler-timeline' = 17,
|
|
818
817
|
'timeline-invalidation-tracking' = 26,
|
|
819
818
|
'font-editor' = 41,
|
|
820
819
|
'instrumentation-breakpoints' = 61,
|
|
@@ -25,7 +25,7 @@ export interface Worker {
|
|
|
25
25
|
set onerror(listener: (event: any) => void);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
type WorkerMessagePort = typeof MessagePort.prototype;
|
|
28
|
+
export type WorkerMessagePort = typeof MessagePort.prototype;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Currently we only transfer MessagePorts to workers, but it's possible to add
|
|
@@ -37,7 +37,7 @@ export type WorkerTransferable = WorkerMessagePort;
|
|
|
37
37
|
* Used by workers to communicate with their parent.
|
|
38
38
|
*/
|
|
39
39
|
export interface WorkerScope {
|
|
40
|
-
postMessage(message: unknown): void;
|
|
40
|
+
postMessage(message: unknown, transfer?: WorkerTransferable[]): void;
|
|
41
41
|
set onmessage(listener: (event: WorkerMessageEvent) => Promise<void>| void);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
import type * as Api from '../api/api.js';
|
|
6
6
|
|
|
7
7
|
class WebWorkerScope implements Api.HostRuntime.WorkerScope {
|
|
8
|
-
postMessage(message: unknown): void {
|
|
9
|
-
|
|
8
|
+
postMessage(message: unknown, transfer?: Api.HostRuntime.WorkerTransferable[]): void {
|
|
9
|
+
// Type for frame.postMessage is conflicting here.
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
self.postMessage(message, transfer as any);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => Promise<void>| void) {
|
|
@@ -7,8 +7,8 @@ import * as WorkerThreads from 'node:worker_threads';
|
|
|
7
7
|
import type * as Api from '../api/api.js';
|
|
8
8
|
|
|
9
9
|
class NodeWorkerScope implements Api.HostRuntime.WorkerScope {
|
|
10
|
-
postMessage(message: unknown): void {
|
|
11
|
-
WorkerThreads.parentPort?.postMessage(message);
|
|
10
|
+
postMessage(message: unknown, transfer?: Api.HostRuntime.WorkerTransferable[]): void {
|
|
11
|
+
WorkerThreads.parentPort?.postMessage(message, transfer as unknown as WorkerThreads.Transferable[]);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
set onmessage(listener: (event: Api.HostRuntime.WorkerMessageEvent) => void) {
|
|
@@ -7,7 +7,6 @@ export enum ExperimentName {
|
|
|
7
7
|
CAPTURE_NODE_CREATION_STACKS = 'capture-node-creation-stacks',
|
|
8
8
|
LIVE_HEAP_PROFILE = 'live-heap-profile',
|
|
9
9
|
PROTOCOL_MONITOR = 'protocol-monitor',
|
|
10
|
-
SAMPLING_HEAP_PROFILER_TIMELINE = 'sampling-heap-profiler-timeline',
|
|
11
10
|
TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
|
|
12
11
|
FONT_EDITOR = 'font-editor',
|
|
13
12
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
@@ -169,10 +169,16 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
169
169
|
|
|
170
170
|
void this.#networkAgent.invoke_enable({
|
|
171
171
|
maxPostDataSize: MAX_EAGER_POST_REQUEST_BODY_LENGTH,
|
|
172
|
-
enableDurableMessages: Root.Runtime.hostConfig.devToolsEnableDurableMessages?.enabled,
|
|
173
172
|
maxTotalBufferSize: MAX_RESPONSE_BODY_TOTAL_BUFFER_LENGTH,
|
|
174
173
|
reportDirectSocketTraffic: true,
|
|
175
174
|
});
|
|
175
|
+
|
|
176
|
+
if (Root.Runtime.hostConfig.devToolsEnableDurableMessages?.enabled) {
|
|
177
|
+
const preserveLogSetting = settings.moduleSetting('network-log.preserve-log');
|
|
178
|
+
this.#updateDurableMessages(preserveLogSetting.get());
|
|
179
|
+
preserveLogSetting.addChangeListener(this.preserveLogChanged, this);
|
|
180
|
+
}
|
|
181
|
+
|
|
176
182
|
void this.#networkAgent.invoke_setAttachDebugStack({enabled: true});
|
|
177
183
|
|
|
178
184
|
this.#bypassServiceWorkerSetting = settings.createSetting('bypass-service-worker', false);
|
|
@@ -289,7 +295,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
289
295
|
const {postData, base64Encoded} = await manager.#networkAgent.invoke_getRequestPostData({requestId});
|
|
290
296
|
if (base64Encoded && postData) {
|
|
291
297
|
// Decode base64 to get raw bytes as an ArrayBuffer.
|
|
292
|
-
const binaryString =
|
|
298
|
+
const binaryString = globalThis.atob(postData);
|
|
293
299
|
const bytes = new Uint8Array(binaryString.length);
|
|
294
300
|
for (let i = 0; i < binaryString.length; i++) {
|
|
295
301
|
bytes[i] = binaryString.charCodeAt(i);
|
|
@@ -380,9 +386,24 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
380
386
|
void this.#networkAgent.invoke_setCacheDisabled({cacheDisabled: enabled});
|
|
381
387
|
}
|
|
382
388
|
|
|
389
|
+
private preserveLogChanged({data: enabled}: Common.EventTarget.EventTargetEvent<boolean>): void {
|
|
390
|
+
this.#updateDurableMessages(enabled);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
#updateDurableMessages(enabled: boolean): void {
|
|
394
|
+
if (enabled) {
|
|
395
|
+
void this.#networkAgent.invoke_configureDurableMessages({
|
|
396
|
+
maxTotalBufferSize: MAX_RESPONSE_BODY_TOTAL_BUFFER_LENGTH,
|
|
397
|
+
});
|
|
398
|
+
} else {
|
|
399
|
+
void this.#networkAgent.invoke_configureDurableMessages({});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
383
403
|
override dispose(): void {
|
|
384
404
|
const settings = this.target().targetManager().settings;
|
|
385
405
|
settings.moduleSetting('cache-disabled').removeChangeListener(this.cacheDisabledSettingChanged, this);
|
|
406
|
+
settings.moduleSetting('network-log.preserve-log').removeChangeListener(this.preserveLogChanged, this);
|
|
386
407
|
}
|
|
387
408
|
|
|
388
409
|
private bypassServiceWorkerChanged(): void {
|
|
@@ -398,14 +419,19 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
398
419
|
return result.status;
|
|
399
420
|
}
|
|
400
421
|
|
|
401
|
-
async enableReportingApi(enable = true): Promise<
|
|
422
|
+
async enableReportingApi(enable = true): Promise<Protocol.ProtocolResponseWithError> {
|
|
402
423
|
return await this.#networkAgent.invoke_enableReportingApi({enable});
|
|
403
424
|
}
|
|
404
425
|
|
|
405
|
-
async enableDeviceBoundSessions(enable = true): Promise<
|
|
426
|
+
async enableDeviceBoundSessions(enable = true): Promise<Protocol.ProtocolResponseWithError> {
|
|
406
427
|
return await this.#networkAgent.invoke_enableDeviceBoundSessions({enable});
|
|
407
428
|
}
|
|
408
429
|
|
|
430
|
+
async deleteDeviceBoundSession(key: Protocol.Network.DeviceBoundSessionKey):
|
|
431
|
+
Promise<Protocol.ProtocolResponseWithError> {
|
|
432
|
+
return await this.#networkAgent.invoke_deleteDeviceBoundSession({key});
|
|
433
|
+
}
|
|
434
|
+
|
|
409
435
|
async loadNetworkResource(
|
|
410
436
|
frameId: Protocol.Page.FrameId|null, url: Platform.DevToolsPath.UrlString,
|
|
411
437
|
options: Protocol.Network.LoadNetworkResourceOptions): Promise<Protocol.Network.LoadNetworkResourcePageResult> {
|
|
@@ -1508,16 +1508,8 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
1508
1508
|
if (TextUtils.ContentData.ContentData.isError(contentData)) {
|
|
1509
1509
|
return;
|
|
1510
1510
|
}
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
const cacheControl = this.responseHeaderValue('cache-control') || '';
|
|
1514
|
-
if (!cacheControl.includes('no-cache')) {
|
|
1515
|
-
imageSrc = this.#url;
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
if (imageSrc !== null) {
|
|
1519
|
-
image.src = imageSrc;
|
|
1520
|
-
}
|
|
1511
|
+
const imageSrc = contentData.asImagePreviewUrl();
|
|
1512
|
+
image.src = imageSrc ?? ''; // Empty the image if we cannot generate a preview URL
|
|
1521
1513
|
}
|
|
1522
1514
|
|
|
1523
1515
|
initiator(): Protocol.Network.Initiator|null {
|
|
@@ -204,7 +204,8 @@ export class Resource implements TextUtils.ContentProvider.ContentProvider {
|
|
|
204
204
|
if (TextUtils.ContentData.ContentData.isError(contentData)) {
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
const imageSrc = contentData.asImagePreviewUrl();
|
|
208
|
+
image.src = imageSrc ?? ''; // Empty the image if we cannot generate a preview URL
|
|
208
209
|
}
|
|
209
210
|
|
|
210
211
|
private async innerRequestContent(): Promise<TextUtils.ContentData.ContentDataOrError> {
|
|
@@ -117,7 +117,7 @@ class Base64TextDecoder {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
async addBase64Chunk(chunk: Protocol.binary): Promise<void> {
|
|
120
|
-
const binString =
|
|
120
|
+
const binString = globalThis.atob(chunk);
|
|
121
121
|
const bytes = Uint8Array.from(binString, m => m.codePointAt(0) as number);
|
|
122
122
|
|
|
123
123
|
await this.#writer.ready;
|
|
@@ -11,6 +11,10 @@ import type {RehydratingResource} from './RehydratingObject.js';
|
|
|
11
11
|
import {ResourceTreeModel} from './ResourceTreeModel.js';
|
|
12
12
|
import type {SourceMapV3} from './SourceMap.js';
|
|
13
13
|
|
|
14
|
+
interface TraceObjectWithNoMetadata {
|
|
15
|
+
readonly traceEvents: TraceObject['traceEvents'];
|
|
16
|
+
metadata?: TraceObject['metadata'];
|
|
17
|
+
}
|
|
14
18
|
/** A thin wrapper class, mostly to enable instanceof-based revealing of traces to open in Timeline. **/
|
|
15
19
|
export class TraceObject {
|
|
16
20
|
readonly traceEvents: Protocol.Tracing.DataCollectedEvent['value'];
|
|
@@ -18,13 +22,14 @@ export class TraceObject {
|
|
|
18
22
|
sourceMaps?: Array<{sourceMapUrl: string, sourceMap: SourceMapV3, url: string}>,
|
|
19
23
|
resources?: RehydratingResource[],
|
|
20
24
|
};
|
|
21
|
-
constructor(
|
|
25
|
+
constructor(
|
|
26
|
+
payload: Protocol.Tracing.DataCollectedEvent['value']|TraceObject|TraceObjectWithNoMetadata, meta?: Object) {
|
|
22
27
|
if (Array.isArray(payload)) {
|
|
23
28
|
this.traceEvents = payload;
|
|
24
29
|
this.metadata = meta ?? {};
|
|
25
30
|
} else {
|
|
26
31
|
this.traceEvents = payload.traceEvents;
|
|
27
|
-
this.metadata = payload.metadata;
|
|
32
|
+
this.metadata = payload.metadata ?? {};
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
}
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
<meta
|
|
18
18
|
http-equiv="Content-Security-Policy"
|
|
19
19
|
content="default-src 'self' devtools: data:; style-src 'self' 'unsafe-inline' devtools:; object-src 'none'; script-src
|
|
20
|
-
'self' https://chrome-devtools-frontend.appspot.com; img-src 'self' data:; frame-src * data:; connect-src data:
|
|
21
|
-
https://chromeuxreport.googleapis.com 'self' devtools: ws://127.0.0.1:*;">
|
|
20
|
+
'self' https://chrome-devtools-frontend.appspot.com; img-src 'self' data: blob:; frame-src * data:; connect-src data: https://chromeuxreport.googleapis.com 'self' devtools: ws://127.0.0.1:*;">
|
|
22
21
|
<meta name="referrer" content="no-referrer">
|
|
23
22
|
<script type="module" src="./entrypoints/%ENTRYPOINT_NAME%/%ENTRYPOINT_NAME%.js"></script>
|
|
24
23
|
<link href="./application_tokens.css" rel="stylesheet">
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import '../../core/sdk/sdk-meta.js';
|
|
7
7
|
import '../../models/workspace/workspace-meta.js';
|
|
8
|
+
import '../../models/logs/logs-meta.js';
|
|
8
9
|
import '../../panels/sensors/sensors-meta.js';
|
|
9
10
|
import '../../entrypoints/inspector_main/inspector_main-meta.js';
|
|
10
11
|
import '../../entrypoints/main/main-meta.js';
|
|
@@ -19,6 +20,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
19
20
|
import * as Foundation from '../../foundation/foundation.js';
|
|
20
21
|
import type * as Protocol from '../../generated/protocol.js';
|
|
21
22
|
import * as AiAssistance from '../../models/ai_assistance/ai_assistance.js';
|
|
23
|
+
import * as Greendev from '../../models/greendev/greendev.js';
|
|
22
24
|
import type {SyncMessage} from '../../panels/greendev/GreenDevShared.js';
|
|
23
25
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
24
26
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
@@ -33,7 +35,7 @@ class GreenDevFloaty {
|
|
|
33
35
|
#textField!: HTMLInputElement;
|
|
34
36
|
#playButton!: HTMLButtonElement;
|
|
35
37
|
#node?: SDK.DOMModel.DOMNode;
|
|
36
|
-
#agent?: AiAssistance.StylingAgent.StylingAgent;
|
|
38
|
+
#agent?: AiAssistance.GreenDevAgent.GreenDevAgent|AiAssistance.StylingAgent.StylingAgent;
|
|
37
39
|
#nodeContext?: AiAssistance.StylingAgent.NodeContext;
|
|
38
40
|
#backendNodeId?: Protocol.DOM.BackendNodeId;
|
|
39
41
|
#syncChannel: BroadcastChannel;
|
|
@@ -92,7 +94,7 @@ class GreenDevFloaty {
|
|
|
92
94
|
const msg = JSON.stringify({
|
|
93
95
|
id: 9999,
|
|
94
96
|
method: 'Overlay.setShowInspectedElementAnchor',
|
|
95
|
-
params: {inspectedElementAnchorConfig: {backendNodeId: this.#backendNodeId}}
|
|
97
|
+
params: {inspectedElementAnchorConfig: {backendNodeId: this.#backendNodeId}},
|
|
96
98
|
});
|
|
97
99
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.sendMessageToBackend(msg);
|
|
98
100
|
}
|
|
@@ -112,7 +114,7 @@ class GreenDevFloaty {
|
|
|
112
114
|
type: 'full-state',
|
|
113
115
|
messages: this.#getMessages(),
|
|
114
116
|
sessionId: this.#backendNodeId,
|
|
115
|
-
nodeDescription: document.querySelector('.green-dev-floaty-dialog-node-description')?.textContent
|
|
117
|
+
nodeDescription: document.querySelector('.green-dev-floaty-dialog-node-description')?.textContent,
|
|
116
118
|
};
|
|
117
119
|
this.#syncChannel.postMessage(state);
|
|
118
120
|
}
|
|
@@ -143,10 +145,7 @@ class GreenDevFloaty {
|
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
147
|
|
|
146
|
-
static instance(opts: {
|
|
147
|
-
forceNew: boolean|null,
|
|
148
|
-
document: Document,
|
|
149
|
-
} = {forceNew: null, document}): GreenDevFloaty {
|
|
148
|
+
static instance(opts: {forceNew: boolean|null, document: Document} = {forceNew: null, document}): GreenDevFloaty {
|
|
150
149
|
const {forceNew, document} = opts;
|
|
151
150
|
if (!greenDevFloatyInstance || forceNew) {
|
|
152
151
|
greenDevFloatyInstance = new GreenDevFloaty(document);
|
|
@@ -235,7 +234,7 @@ class GreenDevFloaty {
|
|
|
235
234
|
const msg = JSON.stringify({
|
|
236
235
|
id: 9999,
|
|
237
236
|
method: 'Overlay.setShowInspectedElementAnchor',
|
|
238
|
-
params: {inspectedElementAnchorConfig: {backendNodeId: this.#backendNodeId}}
|
|
237
|
+
params: {inspectedElementAnchorConfig: {backendNodeId: this.#backendNodeId}},
|
|
239
238
|
});
|
|
240
239
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.sendMessageToBackend(msg);
|
|
241
240
|
}
|
|
@@ -265,10 +264,16 @@ class GreenDevFloaty {
|
|
|
265
264
|
const query = this.#textField.value || this.#textField.placeholder;
|
|
266
265
|
this.#textField.value = '';
|
|
267
266
|
|
|
267
|
+
const useGreenDevAgent = Greendev.Prototypes.instance().isEnabled('beyondStyling');
|
|
268
|
+
|
|
268
269
|
if (!this.#agent) {
|
|
269
270
|
const aidaClient = new AidaClient();
|
|
270
|
-
|
|
271
|
-
|
|
271
|
+
if (useGreenDevAgent) {
|
|
272
|
+
this.#agent = new AiAssistance.GreenDevAgent.GreenDevAgent({aidaClient});
|
|
273
|
+
} else {
|
|
274
|
+
this.#agent = new AiAssistance.StylingAgent.StylingAgent({aidaClient});
|
|
275
|
+
this.#nodeContext = new AiAssistance.StylingAgent.NodeContext(this.#node);
|
|
276
|
+
}
|
|
272
277
|
}
|
|
273
278
|
|
|
274
279
|
this.#addMessageInternal(query, true);
|
|
@@ -290,10 +295,111 @@ class GreenDevFloaty {
|
|
|
290
295
|
});
|
|
291
296
|
|
|
292
297
|
try {
|
|
293
|
-
|
|
294
|
-
|
|
298
|
+
let results;
|
|
299
|
+
if (useGreenDevAgent && this.#agent instanceof AiAssistance.GreenDevAgent.GreenDevAgent) {
|
|
300
|
+
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
301
|
+
if (!target) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// --- Add the Accessibility Tree ---
|
|
306
|
+
const accessibilityModel = target.model(SDK.AccessibilityModel.AccessibilityModel);
|
|
307
|
+
let axTree = '';
|
|
308
|
+
if (accessibilityModel) {
|
|
309
|
+
await accessibilityModel.resumeModel();
|
|
310
|
+
const axResponse = await accessibilityModel.agent.invoke_getFullAXTree({});
|
|
311
|
+
if (!axResponse.getError()) {
|
|
312
|
+
axTree = JSON.stringify(axResponse.nodes);
|
|
313
|
+
} else {
|
|
314
|
+
console.error('Failed to capture Accessibility Tree:', axResponse.getError());
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// --- Add the most recent network requests ---
|
|
319
|
+
const allNetworkRequests = await AiAssistance.GreenDevAgent.GreenDevAgent.getNetworkContextData(target);
|
|
320
|
+
const networkResourcesMax = 50;
|
|
321
|
+
const startNetworkIndex = Math.max(0, allNetworkRequests.length - networkResourcesMax);
|
|
322
|
+
const lastNetworkRequests = allNetworkRequests.slice(startNetworkIndex);
|
|
323
|
+
let formattedNetworkContext = lastNetworkRequests.map(req => req.string).join('\n');
|
|
324
|
+
|
|
325
|
+
if (!formattedNetworkContext) {
|
|
326
|
+
formattedNetworkContext = 'No network requests found.';
|
|
327
|
+
} else {
|
|
328
|
+
const footer = allNetworkRequests.length > lastNetworkRequests.length ?
|
|
329
|
+
`${
|
|
330
|
+
allNetworkRequests.length -
|
|
331
|
+
lastNetworkRequests.length} additional requests are available (network requests shown are capped at ${
|
|
332
|
+
networkResourcesMax} requests).` :
|
|
333
|
+
'No further network requests have been issued.';
|
|
334
|
+
|
|
335
|
+
formattedNetworkContext = `Showing network requests with indices ${startNetworkIndex}-${
|
|
336
|
+
startNetworkIndex + lastNetworkRequests.length - 1}:\n\n${formattedNetworkContext}\n\n${footer}`;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// --- Add the most recent console messages ---
|
|
340
|
+
const consoleModel = target.model(SDK.ConsoleModel.ConsoleModel);
|
|
341
|
+
const allConsoleMessages = consoleModel ? consoleModel.messages() : [];
|
|
342
|
+
const consoleMsgLimit = 50;
|
|
343
|
+
const startIndex = Math.max(0, allConsoleMessages.length - consoleMsgLimit);
|
|
344
|
+
const lastConsoleMessages = allConsoleMessages.slice(startIndex);
|
|
345
|
+
let formattedConsoleMessages =
|
|
346
|
+
lastConsoleMessages
|
|
347
|
+
.map(
|
|
348
|
+
(entry: SDK.ConsoleModel.ConsoleMessage, i: number) =>
|
|
349
|
+
AiAssistance.GreenDevAgent.GreenDevAgent.formatConsoleMessage(entry, startIndex + i))
|
|
350
|
+
.join('\n');
|
|
351
|
+
formattedConsoleMessages = formattedConsoleMessages.trimEnd();
|
|
352
|
+
|
|
353
|
+
if (!formattedConsoleMessages) {
|
|
354
|
+
formattedConsoleMessages = 'No console messages found.';
|
|
355
|
+
} else {
|
|
356
|
+
const footer = allConsoleMessages.length > lastConsoleMessages.length ?
|
|
357
|
+
`${
|
|
358
|
+
allConsoleMessages.length -
|
|
359
|
+
lastConsoleMessages.length} additional messages are available (errors shown are capped at ${
|
|
360
|
+
consoleMsgLimit} most recent).` :
|
|
361
|
+
'No further console messages have been emitted.';
|
|
362
|
+
|
|
363
|
+
formattedConsoleMessages = `Showing console messages with indices ${startIndex}-${
|
|
364
|
+
startIndex + lastConsoleMessages.length - 1}:\n\n${formattedConsoleMessages}\n\n${footer}`;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const mainUrl = target.inspectedURL();
|
|
368
|
+
|
|
369
|
+
// --- Add some context information about the selected node ---
|
|
370
|
+
const elementContext = await AiAssistance.StylingAgent.StylingAgent.describeElement(this.#node);
|
|
371
|
+
const context = `# Page URL
|
|
372
|
+
|
|
373
|
+
${mainUrl}
|
|
374
|
+
|
|
375
|
+
# User-selected node
|
|
376
|
+
|
|
377
|
+
${elementContext}
|
|
378
|
+
|
|
379
|
+
# Recent network requests
|
|
380
|
+
|
|
381
|
+
${formattedNetworkContext}
|
|
382
|
+
|
|
383
|
+
# Recent console messages
|
|
384
|
+
|
|
385
|
+
${formattedConsoleMessages}
|
|
386
|
+
|
|
387
|
+
# Accessibility tree
|
|
388
|
+
|
|
389
|
+
${axTree}`;
|
|
390
|
+
|
|
391
|
+
const nodeContext = new AiAssistance.GreenDevAgent.GreenDevContext(context);
|
|
392
|
+
results = this.#agent.run(query, {selected: nodeContext});
|
|
393
|
+
} else if (this.#agent instanceof AiAssistance.StylingAgent.StylingAgent) {
|
|
394
|
+
if (!this.#nodeContext) {
|
|
395
|
+
throw new Error('Node context not found.');
|
|
396
|
+
}
|
|
397
|
+
results = this.#agent.run(query, {selected: this.#nodeContext});
|
|
398
|
+
} else {
|
|
399
|
+
throw new Error('Agent not initialized correctly');
|
|
295
400
|
}
|
|
296
|
-
|
|
401
|
+
|
|
402
|
+
for await (const result of results) {
|
|
297
403
|
switch (result.type) {
|
|
298
404
|
case ResponseType.ANSWER:
|
|
299
405
|
aiContent.textContent = result.text;
|
|
@@ -366,8 +472,6 @@ async function init(): Promise<void> {
|
|
|
366
472
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
|
|
367
473
|
safeRegisterExperiment(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
|
|
368
474
|
safeRegisterExperiment(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
|
|
369
|
-
safeRegisterExperiment(
|
|
370
|
-
Root.ExperimentNames.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE, 'Sampling heap profiler timeline');
|
|
371
475
|
|
|
372
476
|
const hostUnsyncedStorage: Common.Settings.SettingsBackingStore = {
|
|
373
477
|
register: (name: string) =>
|
|
@@ -252,8 +252,6 @@ async function init(): Promise<void> {
|
|
|
252
252
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
|
|
253
253
|
Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE, 'Live heap profile');
|
|
254
254
|
Root.Runtime.experiments.register(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, 'Protocol Monitor');
|
|
255
|
-
Root.Runtime.experiments.register(
|
|
256
|
-
Root.ExperimentNames.ExperimentName.SAMPLING_HEAP_PROFILER_TIMELINE, 'Sampling heap profiler timeline');
|
|
257
255
|
|
|
258
256
|
const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
|
|
259
257
|
register(_setting: string): void{},
|