chrome-devtools-frontend 1.0.1545096 → 1.0.1547571
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/.stylelintrc.json +5 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/docs/styleguide/ux/styles.md +1 -1
- package/eslint.config.mjs +2 -1
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/Images/src/arrow-down.svg +8 -1
- package/front_end/Images/src/arrow-up.svg +8 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/host/AidaClient.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -5
- package/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/platform/HostRuntime.ts +25 -0
- package/front_end/core/platform/KeyboardUtilities.ts +2 -2
- package/front_end/core/platform/StringUtilities.ts +1 -1
- package/front_end/core/platform/api/HostRuntime.ts +45 -0
- package/front_end/core/platform/api/api.ts +7 -0
- package/front_end/core/{common/Worker.ts → platform/browser/HostRuntime.ts} +27 -12
- package/front_end/core/platform/browser/browser.ts +7 -0
- package/front_end/core/platform/node/HostRuntime.ts +85 -0
- package/front_end/core/platform/node/node.ts +7 -0
- package/front_end/core/platform/platform.ts +2 -2
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/Cookie.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +6 -0
- package/front_end/core/sdk/PreloadingModel.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +4 -4
- package/front_end/core/sdk/SourceMapScopesInfo.ts +141 -23
- package/front_end/core/sdk/Target.ts +5 -14
- package/front_end/core/sdk/TargetManager.ts +26 -4
- package/front_end/core/sdk/sdk-meta.ts +62 -0
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -4
- package/front_end/foundation/Universe.ts +2 -2
- package/front_end/generated/Deprecation.ts +26 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -4
- package/front_end/generated/SupportedCSSProperties.js +17 -15
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +19 -29
- package/front_end/models/ai_assistance/AiConversation.ts +268 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -172
- package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
- package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +27 -52
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -8
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +6 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -19
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +313 -313
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +8 -6
- package/front_end/models/ai_assistance/performance/AICallTree.snapshot.txt +33 -33
- package/front_end/models/ai_assistance/performance/AICallTree.ts +9 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -3
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -4
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +10 -7
- package/front_end/models/crux-manager/CrUXManager.ts +7 -4
- package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +12 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
- package/front_end/models/trace/handlers/SamplesHandler.ts +3 -0
- package/front_end/models/trace/helpers/Trace.ts +13 -0
- package/front_end/models/trace/types/TraceEvents.ts +2 -1
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -0
- package/front_end/models/workspace/IgnoreListManager.ts +1 -2
- package/front_end/models/workspace/UISourceCode.ts +50 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +86 -159
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +8 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +56 -33
- package/front_end/panels/animation/AnimationTimeline.ts +0 -8
- package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +64 -36
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +80 -0
- package/front_end/panels/common/common.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
- package/front_end/panels/console/ConsolePrompt.ts +4 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
- package/front_end/panels/console/ConsoleViewport.ts +2 -3
- package/front_end/panels/console/consoleInsightTeaser.css +1 -0
- package/front_end/panels/coverage/CoverageModel.ts +2 -2
- package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +24 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/cssValueTraceView.css +1 -1
- package/front_end/panels/elements/elements-meta.ts +1 -0
- package/front_end/panels/explain/components/ConsoleInsight.ts +44 -57
- package/front_end/panels/explain/components/consoleInsight.css +46 -1
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +19 -0
- package/front_end/panels/network/RequestConditionsDrawer.ts +116 -42
- package/front_end/panels/network/networkLogView.css +11 -0
- package/front_end/panels/network/networkTimingTable.css +8 -6
- package/front_end/panels/network/requestConditionsDrawer.css +10 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -2
- package/front_end/panels/recorder/components/StepEditor.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +21 -22
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/CoveragePlugin.ts +5 -5
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/Plugin.ts +1 -1
- package/front_end/panels/sources/ProfilePlugin.ts +22 -14
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
- package/front_end/panels/sources/sources-meta.ts +0 -62
- package/front_end/panels/timeline/README.md +1 -9
- package/front_end/panels/timeline/ThreadAppender.ts +0 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +8 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -1
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +15 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +37 -1
- package/front_end/panels/timeline/components/exportTraceOptions.css +11 -2
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +1 -1
- 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/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.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/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
- package/front_end/ui/components/text_editor/javascript.ts +1 -1
- package/front_end/ui/legacy/ARIAUtils.ts +2 -2
- package/front_end/ui/legacy/ActionRegistration.ts +11 -0
- package/front_end/ui/legacy/ListWidget.ts +51 -18
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +3 -3
- package/front_end/ui/legacy/TextPrompt.ts +3 -2
- package/front_end/ui/legacy/Treeoutline.ts +3 -2
- package/front_end/ui/legacy/UIUtils.ts +11 -10
- package/front_end/ui/legacy/Widget.ts +3 -2
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +62 -39
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -9
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +41 -13
- package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
- package/front_end/ui/legacy/inspectorCommon.css +2 -2
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
- package/inspector_overlay/tool_window_controls.ts +4 -1
- package/mcp/mcp.ts +1 -1
- package/package.json +2 -3
- package/front_end/panels/application/components/StackTrace.ts +0 -239
- package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
- package/front_end/panels/application/components/stackTraceRow.css +0 -50
- package/front_end/panels/explain/components/consoleInsightSourcesList.css +0 -51
- package/front_end/ui/components/docs/README.md +0 -6
- package/front_end/ui/components/docs/building-ui-documentation/ComponentEvents.md +0 -54
- package/front_end/ui/components/docs/building-ui-documentation/ComponentPerformance.md +0 -136
- package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +0 -242
- package/front_end/ui/components/docs/building-ui-documentation/README.md +0 -23
- package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +0 -66
- package/front_end/ui/components/docs/building-ui-documentation/TestingComponents.md +0 -111
- package/front_end/ui/components/docs/component_docs.ts +0 -24
- package/front_end/ui/components/docs/component_docs_styles.css +0 -53
- package/front_end/ui/components/docs/create_breadcrumbs.ts +0 -44
- package/front_end/ui/components/docs/slider/basic.html +0 -20
- package/front_end/ui/components/docs/switch/basic.html +0 -20
- /package/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
- /package/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
- /package/front_end/{core/platform → ui/legacy}/DOMUtilities.ts +0 -0
|
@@ -17,16 +17,14 @@ import {
|
|
|
17
17
|
type ResponseData,
|
|
18
18
|
ResponseType
|
|
19
19
|
} from './agents/AiAgent.js';
|
|
20
|
-
import {FileAgent} from './agents/FileAgent.js';
|
|
21
20
|
import {NetworkAgent, RequestContext} from './agents/NetworkAgent.js';
|
|
22
|
-
import
|
|
21
|
+
import type {PerformanceTraceContext} from './agents/PerformanceAgent.js';
|
|
23
22
|
import {NodeContext, StylingAgent} from './agents/StylingAgent.js';
|
|
23
|
+
import {AiConversation} from './AiConversation.js';
|
|
24
24
|
import {
|
|
25
|
-
Conversation,
|
|
26
25
|
ConversationType,
|
|
27
26
|
} from './AiHistoryStorage.js';
|
|
28
27
|
import {getDisabledReasons} from './AiUtils.js';
|
|
29
|
-
import type {ChangeManager} from './ChangeManager.js';
|
|
30
28
|
|
|
31
29
|
interface ExternalStylingRequestParameters {
|
|
32
30
|
conversationType: ConversationType.STYLING;
|
|
@@ -42,8 +40,7 @@ interface ExternalNetworkRequestParameters {
|
|
|
42
40
|
|
|
43
41
|
export interface ExternalPerformanceAIConversationData {
|
|
44
42
|
conversationHandler: ConversationHandler;
|
|
45
|
-
conversation:
|
|
46
|
-
agent: AiAgent<unknown>;
|
|
43
|
+
conversation: AiConversation;
|
|
47
44
|
selected: PerformanceTraceContext;
|
|
48
45
|
}
|
|
49
46
|
|
|
@@ -122,9 +119,7 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
122
119
|
aidaClient: Host.AidaClient.AidaClient, aidaAvailability?: Host.AidaClient.AidaAccessPreconditions) {
|
|
123
120
|
super();
|
|
124
121
|
this.#aidaClient = aidaClient;
|
|
125
|
-
|
|
126
|
-
this.#aidaAvailability = aidaAvailability;
|
|
127
|
-
}
|
|
122
|
+
this.#aidaAvailability = aidaAvailability;
|
|
128
123
|
this.#aiAssistanceEnabledSetting = this.#getAiAssistanceEnabledSetting();
|
|
129
124
|
}
|
|
130
125
|
|
|
@@ -144,6 +139,10 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
144
139
|
conversationHandlerInstance = undefined;
|
|
145
140
|
}
|
|
146
141
|
|
|
142
|
+
get aidaClient(): Host.AidaClient.AidaClient {
|
|
143
|
+
return this.#aidaClient;
|
|
144
|
+
}
|
|
145
|
+
|
|
147
146
|
#getAiAssistanceEnabledSetting(): Common.Settings.Setting<boolean>|undefined {
|
|
148
147
|
try {
|
|
149
148
|
return Common.Settings.moduleSetting('ai-assistance-enabled') as Common.Settings.Setting<boolean>;
|
|
@@ -207,8 +206,9 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
207
206
|
|
|
208
207
|
async *
|
|
209
208
|
handleConversationWithHistory(
|
|
210
|
-
items: AsyncIterable<ResponseData, void, void>,
|
|
211
|
-
|
|
209
|
+
items: AsyncIterable<ResponseData, void, void>,
|
|
210
|
+
conversation: AiConversation|undefined,
|
|
211
|
+
): AsyncGenerator<ResponseData, void, void> {
|
|
212
212
|
for await (const data of items) {
|
|
213
213
|
// We don't want to save partial responses to the conversation history.
|
|
214
214
|
if (data.type !== ResponseType.ANSWER || data.complete) {
|
|
@@ -225,27 +225,27 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
225
225
|
selected: NodeContext|PerformanceTraceContext|RequestContext|null,
|
|
226
226
|
}): AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse> {
|
|
227
227
|
const {conversationType, aiAgent, prompt, selected} = opts;
|
|
228
|
-
const conversation = new
|
|
228
|
+
const conversation = new AiConversation(
|
|
229
229
|
conversationType,
|
|
230
230
|
[],
|
|
231
231
|
aiAgent.id,
|
|
232
232
|
/* isReadOnly */ true,
|
|
233
|
+
this.#aidaClient,
|
|
234
|
+
undefined,
|
|
233
235
|
/* isExternal */ true,
|
|
234
236
|
);
|
|
235
|
-
return yield* this.#doExternalConversation({conversation,
|
|
237
|
+
return yield* this.#doExternalConversation({conversation, prompt, selected});
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
async * #doExternalConversation(opts: {
|
|
239
|
-
conversation:
|
|
240
|
-
aiAgent: AiAgent<unknown>,
|
|
241
|
+
conversation: AiConversation,
|
|
241
242
|
prompt: string,
|
|
242
243
|
selected: NodeContext|PerformanceTraceContext|RequestContext|null,
|
|
243
244
|
}): AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse> {
|
|
244
|
-
const {conversation,
|
|
245
|
-
const generator =
|
|
246
|
-
const generatorWithHistory = this.handleConversationWithHistory(generator, conversation);
|
|
245
|
+
const {conversation, prompt, selected} = opts;
|
|
246
|
+
const generator = conversation.run(prompt, {selected});
|
|
247
247
|
const devToolsLogs: object[] = [];
|
|
248
|
-
for await (const data of
|
|
248
|
+
for await (const data of generator) {
|
|
249
249
|
if (data.type !== ResponseType.ANSWER || data.complete) {
|
|
250
250
|
devToolsLogs.push(data);
|
|
251
251
|
}
|
|
@@ -274,7 +274,10 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
274
274
|
|
|
275
275
|
async #handleExternalStylingConversation(prompt: string, selector = 'body'):
|
|
276
276
|
Promise<AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse>> {
|
|
277
|
-
const stylingAgent =
|
|
277
|
+
const stylingAgent = new StylingAgent({
|
|
278
|
+
aidaClient: this.#aidaClient,
|
|
279
|
+
serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
|
|
280
|
+
});
|
|
278
281
|
const node = await inspectElementBySelector(selector);
|
|
279
282
|
if (node) {
|
|
280
283
|
await node.setAsInspectedNode();
|
|
@@ -292,7 +295,6 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
292
295
|
Promise<AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse>> {
|
|
293
296
|
return this.#doExternalConversation({
|
|
294
297
|
conversation: data.conversation,
|
|
295
|
-
aiAgent: data.agent,
|
|
296
298
|
prompt,
|
|
297
299
|
selected: data.selected,
|
|
298
300
|
});
|
|
@@ -300,7 +302,10 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
300
302
|
|
|
301
303
|
async #handleExternalNetworkConversation(prompt: string, requestUrl: string):
|
|
302
304
|
Promise<AsyncGenerator<ExternalRequestResponse, ExternalRequestResponse>> {
|
|
303
|
-
const networkAgent =
|
|
305
|
+
const networkAgent = new NetworkAgent({
|
|
306
|
+
aidaClient: this.#aidaClient,
|
|
307
|
+
serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
|
|
308
|
+
});
|
|
304
309
|
const request = await inspectNetworkRequestByUrl(requestUrl);
|
|
305
310
|
if (!request) {
|
|
306
311
|
return this.#generateErrorResponse(`Can't find request with the given selector ${requestUrl}`);
|
|
@@ -316,36 +321,6 @@ export class ConversationHandler extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
316
321
|
selected: new RequestContext(request, calculator),
|
|
317
322
|
});
|
|
318
323
|
}
|
|
319
|
-
|
|
320
|
-
createAgent(conversationType: ConversationType, changeManager?: ChangeManager): AiAgent<unknown> {
|
|
321
|
-
const options = {
|
|
322
|
-
aidaClient: this.#aidaClient,
|
|
323
|
-
serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
|
|
324
|
-
};
|
|
325
|
-
let agent: AiAgent<unknown>;
|
|
326
|
-
switch (conversationType) {
|
|
327
|
-
case ConversationType.STYLING: {
|
|
328
|
-
agent = new StylingAgent({
|
|
329
|
-
...options,
|
|
330
|
-
changeManager,
|
|
331
|
-
});
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
case ConversationType.NETWORK: {
|
|
335
|
-
agent = new NetworkAgent(options);
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
case ConversationType.FILE: {
|
|
339
|
-
agent = new FileAgent(options);
|
|
340
|
-
break;
|
|
341
|
-
}
|
|
342
|
-
case ConversationType.PERFORMANCE: {
|
|
343
|
-
agent = new PerformanceAgent(options);
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return agent;
|
|
348
|
-
}
|
|
349
324
|
}
|
|
350
325
|
|
|
351
326
|
export const enum ConversationHandlerEvents {
|
|
@@ -486,11 +486,14 @@ export abstract class AiAgent<T> {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
async *
|
|
489
|
-
run(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
489
|
+
run(
|
|
490
|
+
initialQuery: string,
|
|
491
|
+
options: {
|
|
492
|
+
selected: ConversationContext<T>|null,
|
|
493
|
+
signal?: AbortSignal,
|
|
494
|
+
},
|
|
495
|
+
multimodalInput?: MultimodalInput,
|
|
496
|
+
): AsyncGenerator<ResponseData, void, void> {
|
|
494
497
|
await options.selected?.refresh();
|
|
495
498
|
|
|
496
499
|
if (options.selected) {
|
|
@@ -682,9 +685,7 @@ export abstract class AiAgent<T> {
|
|
|
682
685
|
|
|
683
686
|
yield {
|
|
684
687
|
type: ResponseType.SIDE_EFFECT,
|
|
685
|
-
confirm:
|
|
686
|
-
sideEffectConfirmationPromiseWithResolvers.resolve(result);
|
|
687
|
-
},
|
|
688
|
+
confirm: sideEffectConfirmationPromiseWithResolvers.resolve,
|
|
688
689
|
};
|
|
689
690
|
|
|
690
691
|
const approvedRun = await sideEffectConfirmationPromiseWithResolvers.promise;
|
|
@@ -492,7 +492,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
492
492
|
this.#addFacts(options.selected);
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
|
|
495
|
+
yield* super.run(initialQuery, options);
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
#createFactForTraceSummary(): void {
|
|
@@ -870,7 +870,11 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
const tree = AICallTree.fromEvent(event, parsedTrace);
|
|
873
|
-
|
|
873
|
+
if (!tree) {
|
|
874
|
+
return {error: 'No call tree found'};
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
const callTree = this.#formatter.formatCallTree(tree);
|
|
874
878
|
|
|
875
879
|
const key = `getDetailedCallTree(${args.eventKey})`;
|
|
876
880
|
this.#cacheFunctionResult(focus, key, callTree);
|
|
@@ -276,12 +276,6 @@ export class StylingAgent extends AiAgent<SDK.DOMModel.DOMNode> {
|
|
|
276
276
|
this.#createExtensionScope = opts.createExtensionScope ?? ((changes: ChangeManager) => {
|
|
277
277
|
return new ExtensionScope(changes, this.id, this.context?.getItem() ?? null);
|
|
278
278
|
});
|
|
279
|
-
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
280
|
-
SDK.ResourceTreeModel.ResourceTreeModel,
|
|
281
|
-
SDK.ResourceTreeModel.Events.PrimaryPageChanged,
|
|
282
|
-
this.onPrimaryPageChanged,
|
|
283
|
-
this,
|
|
284
|
-
);
|
|
285
279
|
|
|
286
280
|
this.declareFunction<{
|
|
287
281
|
elements: string[],
|
|
@@ -327,11 +321,8 @@ export class StylingAgent extends AiAgent<SDK.DOMModel.DOMNode> {
|
|
|
327
321
|
action: `getStyles(${JSON.stringify(params.elements)}, ${JSON.stringify(params.styleProperties)})`,
|
|
328
322
|
};
|
|
329
323
|
},
|
|
330
|
-
handler: async
|
|
331
|
-
|
|
332
|
-
options,
|
|
333
|
-
) => {
|
|
334
|
-
return await this.getStyles(params.elements, params.styleProperties, options);
|
|
324
|
+
handler: async params => {
|
|
325
|
+
return await this.getStyles(params.elements, params.styleProperties);
|
|
335
326
|
},
|
|
336
327
|
});
|
|
337
328
|
|
|
@@ -421,10 +412,6 @@ const data = {
|
|
|
421
412
|
});
|
|
422
413
|
}
|
|
423
414
|
|
|
424
|
-
onPrimaryPageChanged(): void {
|
|
425
|
-
void this.#changes.clear();
|
|
426
|
-
}
|
|
427
|
-
|
|
428
415
|
async generateObservation(
|
|
429
416
|
action: string,
|
|
430
417
|
{
|
|
@@ -583,10 +570,7 @@ const data = {
|
|
|
583
570
|
return this.context?.getItem() ?? null;
|
|
584
571
|
}
|
|
585
572
|
|
|
586
|
-
async getStyles(elements: string[], properties: string[]
|
|
587
|
-
signal?: AbortSignal,
|
|
588
|
-
approved?: boolean,
|
|
589
|
-
}): Promise<FunctionCallHandlerResult<unknown>> {
|
|
573
|
+
async getStyles(elements: string[], properties: string[]): Promise<FunctionCallHandlerResult<unknown>> {
|
|
590
574
|
const result:
|
|
591
575
|
Record<string, {computed: Record<string, string|undefined>, authored: Record<string, string|undefined>}> = {};
|
|
592
576
|
for (const uid of elements) {
|
|
@@ -10,6 +10,7 @@ import * as PatchAgent from './agents/PatchAgent.js';
|
|
|
10
10
|
import * as PerformanceAgent from './agents/PerformanceAgent.js';
|
|
11
11
|
import * as PerformanceAnnotationsAgent from './agents/PerformanceAnnotationsAgent.js';
|
|
12
12
|
import * as StylingAgent from './agents/StylingAgent.js';
|
|
13
|
+
import * as AiConversation from './AiConversation.js';
|
|
13
14
|
import * as AiHistoryStorage from './AiHistoryStorage.js';
|
|
14
15
|
import * as AiUtils from './AiUtils.js';
|
|
15
16
|
import * as BuiltInAi from './BuiltInAi.js';
|
|
@@ -33,6 +34,7 @@ export {
|
|
|
33
34
|
AiAgent,
|
|
34
35
|
AICallTree,
|
|
35
36
|
AIContext,
|
|
37
|
+
AiConversation,
|
|
36
38
|
AiHistoryStorage,
|
|
37
39
|
AIQueries,
|
|
38
40
|
AiUtils,
|