chrome-devtools-frontend 1.0.1538310 → 1.0.1539728
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/eslint.config.mjs +1 -1
- package/front_end/core/protocol_client/CDPConnection.ts +12 -10
- package/front_end/core/protocol_client/InspectorBackend.ts +74 -101
- package/front_end/core/protocol_client/NodeURL.ts +1 -3
- package/front_end/core/sdk/ChildTargetManager.ts +5 -41
- package/front_end/core/sdk/Connections.ts +9 -58
- package/front_end/core/sdk/DOMModel.ts +1 -0
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +15 -26
- package/front_end/entrypoints/node_app/{NodeConnectionsPanel.ts → app/NodeConnectionsPanel.ts} +8 -8
- package/front_end/entrypoints/node_app/{NodeMain.ts → app/NodeMain.ts} +11 -11
- package/front_end/entrypoints/node_app/app/app.ts +6 -0
- package/front_end/entrypoints/node_app/node_app.ts +4 -2
- package/front_end/generated/{InspectorBackendCommands.js → InspectorBackendCommands.ts} +16 -34
- package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +18 -3
- package/front_end/models/trace/types/TraceEvents.ts +19 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +49 -26
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -134
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +170 -0
- package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatView.css +0 -31
- package/front_end/panels/ai_assistance/components/disabledWidget.css +45 -0
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/application/components/FrameDetailsView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +123 -95
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/NodeStackTraceWidget.ts +8 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +0 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +57 -33
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +12 -5
- package/front_end/panels/network/RequestInitiatorView.ts +1 -1
- package/front_end/panels/network/components/EditableSpan.ts +1 -1
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/recorder/models/RecordingPlayer.ts +8 -7
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +4 -4
- package/front_end/panels/timeline/TimelineFlameChartView.ts +10 -10
- package/front_end/panels/timeline/TimelinePanel.ts +3 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +21 -24
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +3 -2
- package/front_end/panels/utils/utils.ts +4 -2
- package/front_end/services/puppeteer/PuppeteerConnection.ts +56 -53
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +26 -9
- 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 +1 -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 +11 -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/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -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/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -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 +4 -0
- 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 +10 -4
- 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/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 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +37 -18
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +26 -9
- 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 +1 -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 +11 -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/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -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/BrowserContext.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js +11 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
- 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 +10 -4
- 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/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 -3
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +34 -10
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +15 -1
- package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +7 -5
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +22 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/switch/Switch.docs.ts +38 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +69 -45
- package/front_end/ui/legacy/Slider.docs.ts +49 -0
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +77 -5
- package/front_end/ui/legacy/components/utils/Linkifier.ts +62 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/templates/version.ts.tmpl +0 -4
- package/front_end/ui/components/docs/color_swatch/basic.html +0 -32
- package/front_end/ui/components/docs/color_swatch/basic.ts +0 -38
- package/front_end/ui/components/docs/color_swatch/change-color.html +0 -24
- package/front_end/ui/components/docs/color_swatch/change-color.ts +0 -28
- package/front_end/ui/components/docs/computed_style_property/basic.html +0 -25
- package/front_end/ui/components/docs/computed_style_property/basic.ts +0 -19
- package/front_end/ui/components/docs/computed_style_property/traceable.html +0 -25
- package/front_end/ui/components/docs/computed_style_property/traceable.ts +0 -16
- package/front_end/ui/components/docs/computed_style_trace/basic.html +0 -25
- package/front_end/ui/components/docs/computed_style_trace/basic.ts +0 -24
- package/front_end/ui/components/docs/console_insight/basic.html +0 -28
- package/front_end/ui/components/docs/console_insight/basic.ts +0 -103
- package/front_end/ui/components/docs/console_insight/error.html +0 -28
- package/front_end/ui/components/docs/console_insight/error.ts +0 -33
- package/front_end/ui/components/docs/console_insight/loading.html +0 -28
- package/front_end/ui/components/docs/console_insight/loading.ts +0 -47
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.html +0 -43
- package/front_end/ui/components/docs/elements_breadcrumbs/basic.ts +0 -54
- package/front_end/ui/components/docs/elements_breadcrumbs/helpers.ts +0 -29
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.html +0 -38
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.ts +0 -90
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll.html +0 -29
- package/front_end/ui/components/docs/elements_breadcrumbs/scroll.ts +0 -62
- package/front_end/ui/components/docs/icon_button/basic.html +0 -34
- package/front_end/ui/components/docs/icon_button/basic.ts +0 -67
- package/front_end/ui/components/docs/issue_counter/basic.html +0 -35
- package/front_end/ui/components/docs/issue_counter/basic.ts +0 -34
- package/front_end/ui/components/docs/issue_link_icon/basic.html +0 -31
- package/front_end/ui/components/docs/issue_link_icon/basic.ts +0 -26
- package/front_end/ui/components/docs/linear_memory_inspector/basic.html +0 -26
- package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +0 -44
- package/front_end/ui/components/docs/menu/basic.html +0 -28
- package/front_end/ui/components/docs/menu/basic.ts +0 -66
- package/front_end/ui/components/docs/recorder_control_button/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_control_button/basic.ts +0 -15
- package/front_end/ui/components/docs/recorder_recording_list_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_recording_list_view/basic.ts +0 -26
- package/front_end/ui/components/docs/recorder_select_button/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_select_button/basic.ts +0 -81
- package/front_end/ui/components/docs/recorder_split_view/basic.html +0 -17
- package/front_end/ui/components/docs/recorder_split_view/basic.ts +0 -22
- package/front_end/ui/components/docs/request_link_icon/basic.html +0 -31
- package/front_end/ui/components/docs/request_link_icon/basic.ts +0 -21
- package/front_end/ui/components/docs/slider/basic.ts +0 -62
- package/front_end/ui/components/docs/style_property_editor/flex.html +0 -21
- package/front_end/ui/components/docs/style_property_editor/flex.ts +0 -52
- package/front_end/ui/components/docs/style_property_editor/grid.html +0 -22
- package/front_end/ui/components/docs/style_property_editor/grid.ts +0 -50
- package/front_end/ui/components/docs/style_property_editor/masonry.html +0 -21
- package/front_end/ui/components/docs/style_property_editor/masonry.ts +0 -50
- package/front_end/ui/components/docs/switch/basic.ts +0 -51
- /package/front_end/entrypoints/node_app/{nodeConnectionsPanel.css → app/nodeConnectionsPanel.css} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as ProtocolClient from '../../core/protocol_client/protocol_client.js';
|
|
5
6
|
import * as Root from '../../core/root/root.js';
|
|
6
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import * as PuppeteerService from '../../services/puppeteer/puppeteer.js';
|
|
8
8
|
import * as ThirdPartyWeb from '../../third_party/third-party-web/third-party-web.js';
|
|
9
9
|
|
|
@@ -12,19 +12,12 @@ function disableLoggingForTest(): void {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* WorkerConnectionTransport is a DevTools `ConnectionTransport` implementation that talks
|
|
16
|
+
* CDP via web worker postMessage. The system is described in LighthouseProtocolService.
|
|
17
17
|
*/
|
|
18
|
-
class
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
onDisconnect: ((arg0: string) => void)|null;
|
|
22
|
-
|
|
23
|
-
constructor(sessionId: string) {
|
|
24
|
-
this.sessionId = sessionId;
|
|
25
|
-
this.onMessage = null;
|
|
26
|
-
this.onDisconnect = null;
|
|
27
|
-
}
|
|
18
|
+
class WorkerConnectionTransport implements ProtocolClient.ConnectionTransport.ConnectionTransport {
|
|
19
|
+
onMessage: ((arg0: Object) => void)|null = null;
|
|
20
|
+
onDisconnect: ((arg0: string) => void)|null = null;
|
|
28
21
|
|
|
29
22
|
setOnMessage(onMessage: (arg0: Object|string) => void): void {
|
|
30
23
|
this.onMessage = onMessage;
|
|
@@ -34,14 +27,6 @@ class ConnectionProxy implements SDK.Connections.ParallelConnectionInterface {
|
|
|
34
27
|
this.onDisconnect = onDisconnect;
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
getOnDisconnect(): (((arg0: string) => void)|null) {
|
|
38
|
-
return this.onDisconnect;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getSessionId(): string {
|
|
42
|
-
return this.sessionId;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
30
|
sendRawMessage(message: string): void {
|
|
46
31
|
notifyFrontendViaWorkerMessage('sendProtocolMessage', {message});
|
|
47
32
|
}
|
|
@@ -53,7 +38,7 @@ class ConnectionProxy implements SDK.Connections.ParallelConnectionInterface {
|
|
|
53
38
|
}
|
|
54
39
|
}
|
|
55
40
|
|
|
56
|
-
let
|
|
41
|
+
let cdpTransport: WorkerConnectionTransport|undefined;
|
|
57
42
|
let endTimespan: (() => unknown)|undefined;
|
|
58
43
|
|
|
59
44
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -98,11 +83,15 @@ async function invokeLH(action: string, args: any): Promise<unknown> {
|
|
|
98
83
|
self.thirdPartyWeb.provideThirdPartyWeb(ThirdPartyWeb.ThirdPartyWeb);
|
|
99
84
|
|
|
100
85
|
const {rootTargetId, mainSessionId} = args;
|
|
101
|
-
|
|
86
|
+
cdpTransport = new WorkerConnectionTransport();
|
|
87
|
+
// TODO(crbug.com/453469270): Use "DevToolsCDPConnection" once we split SessionRouter into
|
|
88
|
+
// a connection handling part and a session handling part.
|
|
89
|
+
const connection = new ProtocolClient.InspectorBackend.SessionRouter(cdpTransport);
|
|
102
90
|
puppeteerHandle =
|
|
103
91
|
await PuppeteerService.PuppeteerConnection.PuppeteerConnectionHelper.connectPuppeteerToConnectionViaTab({
|
|
104
|
-
connection
|
|
105
|
-
rootTargetId,
|
|
92
|
+
connection,
|
|
93
|
+
targetId: rootTargetId,
|
|
94
|
+
sessionId: mainSessionId,
|
|
106
95
|
// Lighthouse can only audit normal pages.
|
|
107
96
|
isPageTargetCallback: targetInfo => targetInfo.type === 'page',
|
|
108
97
|
});
|
|
@@ -212,7 +201,7 @@ async function onFrontendMessage(event: MessageEvent): Promise<void> {
|
|
|
212
201
|
break;
|
|
213
202
|
}
|
|
214
203
|
case 'dispatchProtocolMessage': {
|
|
215
|
-
|
|
204
|
+
cdpTransport?.onMessage?.(messageFromFrontend.args.message);
|
|
216
205
|
break;
|
|
217
206
|
}
|
|
218
207
|
default: {
|
package/front_end/entrypoints/node_app/{NodeConnectionsPanel.ts → app/NodeConnectionsPanel.ts}
RENAMED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
5
|
|
|
6
|
-
import type * as Common from '
|
|
7
|
-
import * as Host from '
|
|
8
|
-
import * as i18n from '
|
|
9
|
-
import * as Buttons from '
|
|
10
|
-
import * as uiI18n from '
|
|
11
|
-
import * as UI from '
|
|
6
|
+
import type * as Common from '../../../core/common/common.js';
|
|
7
|
+
import * as Host from '../../../core/host/host.js';
|
|
8
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
|
+
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
10
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
11
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
12
12
|
|
|
13
13
|
import nodeConnectionsPanelStyles from './nodeConnectionsPanel.css.js';
|
|
14
14
|
|
|
@@ -36,10 +36,10 @@ const UIStrings = {
|
|
|
36
36
|
*/
|
|
37
37
|
networkAddressEgLocalhost: 'Network address (e.g. localhost:9229)',
|
|
38
38
|
} as const;
|
|
39
|
-
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/NodeConnectionsPanel.ts', UIStrings);
|
|
39
|
+
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/app/NodeConnectionsPanel.ts', UIStrings);
|
|
40
40
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
41
41
|
|
|
42
|
-
const nodejsIconUrl = new URL('
|
|
42
|
+
const nodejsIconUrl = new URL('../../../Images/node-stack-icon.svg', import.meta.url).toString();
|
|
43
43
|
|
|
44
44
|
export class NodeConnectionsPanel extends UI.Panel.Panel {
|
|
45
45
|
#config!: Adb.Config;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import type * as Common from '
|
|
6
|
-
import * as Host from '
|
|
7
|
-
import * as i18n from '
|
|
8
|
-
import type * as Platform from '
|
|
9
|
-
import type * as ProtocolClient from '
|
|
10
|
-
import * as SDK from '
|
|
11
|
-
import type * as ProtocolProxyApi from '
|
|
12
|
-
import type * as Protocol from '
|
|
13
|
-
import * as Components from '
|
|
5
|
+
import type * as Common from '../../../core/common/common.js';
|
|
6
|
+
import * as Host from '../../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
9
|
+
import type * as ProtocolClient from '../../../core/protocol_client/protocol_client.js';
|
|
10
|
+
import * as SDK from '../../../core/sdk/sdk.js';
|
|
11
|
+
import type * as ProtocolProxyApi from '../../../generated/protocol-proxy-api.js';
|
|
12
|
+
import type * as Protocol from '../../../generated/protocol.js';
|
|
13
|
+
import * as Components from '../../../ui/legacy/components/utils/utils.js';
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/**
|
|
@@ -28,7 +28,7 @@ const UIStrings = {
|
|
|
28
28
|
*/
|
|
29
29
|
NodejsTitleS: 'DevTools - Node.js: {PH1}',
|
|
30
30
|
} as const;
|
|
31
|
-
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/NodeMain.ts', UIStrings);
|
|
31
|
+
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/app/NodeMain.ts', UIStrings);
|
|
32
32
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
33
33
|
let nodeMainImplInstance: NodeMainImpl;
|
|
34
34
|
|
|
@@ -119,7 +119,7 @@ export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implemen
|
|
|
119
119
|
const connection = new NodeConnection(this.#targetAgent, sessionId);
|
|
120
120
|
this.#childConnections.set(sessionId, connection);
|
|
121
121
|
target = this.#targetManager.createTarget(
|
|
122
|
-
targetInfo.targetId, name, SDK.Target.Type.NODE,
|
|
122
|
+
targetInfo.targetId, name, SDK.Target.Type.NODE, null, undefined, undefined, connection);
|
|
123
123
|
}
|
|
124
124
|
this.#childTargets.set(sessionId, target);
|
|
125
125
|
void target.runtimeAgent().invoke_runIfWaitingForDebugger();
|
|
@@ -13,8 +13,10 @@ import type * as Sources from '../../panels/sources/sources.js';
|
|
|
13
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
14
|
import * as Main from '../main/main.js';
|
|
15
15
|
|
|
16
|
-
import
|
|
17
|
-
|
|
16
|
+
import * as App from './app/app.js';
|
|
17
|
+
|
|
18
|
+
const {NodeConnectionsPanel} = App.NodeConnectionsPanel;
|
|
19
|
+
const {NodeMainImpl} = App.NodeMain;
|
|
18
20
|
|
|
19
21
|
const UIStrings = {
|
|
20
22
|
/**
|
|
@@ -3,41 +3,23 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
// File is generated by scripts/build/code_generator_frontend.py
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* @typedef {{
|
|
8
|
-
* registerCommand: function(
|
|
9
|
-
* string&any,
|
|
10
|
-
* !Array.<!{
|
|
11
|
-
* name: string,
|
|
12
|
-
* type: string,
|
|
13
|
-
* optional: boolean,
|
|
14
|
-
* description: string,
|
|
15
|
-
* typeRef: string | null
|
|
16
|
-
* }>,
|
|
17
|
-
* !Array.<string>,
|
|
18
|
-
* string
|
|
19
|
-
* ): void,
|
|
20
|
-
* registerEnum: function(string&any, !Object<string, string>): void,
|
|
21
|
-
* registerEvent: function(string&any, !Array<string>): void,
|
|
22
|
-
* registerType: function(
|
|
23
|
-
* string&any,
|
|
24
|
-
* !Array.<!{
|
|
25
|
-
* name: string,
|
|
26
|
-
* type: string,
|
|
27
|
-
* optional: boolean,
|
|
28
|
-
* description: string,
|
|
29
|
-
* typeRef: string | null
|
|
30
|
-
* }>
|
|
31
|
-
* ): void,
|
|
32
|
-
* }}
|
|
33
|
-
*/
|
|
34
|
-
// @ts-expect-error typedef
|
|
35
|
-
export let InspectorBackendAPI;
|
|
36
6
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
7
|
+
export interface CommandParameter {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
optional: boolean;
|
|
11
|
+
description: string;
|
|
12
|
+
typeRef: string|null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface InspectorBackendAPI {
|
|
16
|
+
registerCommand(command: string, parameters: CommandParameter[], replayArgs: string[], description: string): void;
|
|
17
|
+
registerEnum(type: string, values: Record<string, string>): void;
|
|
18
|
+
registerEvent(event: string, params: string[]): void;
|
|
19
|
+
registerType(type: string, parameters: CommandParameter[]): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function registerCommands(inspectorBackend: InspectorBackendAPI): void {
|
|
41
23
|
|
|
42
24
|
|
|
43
25
|
// Accessibility.
|
|
@@ -32,6 +32,7 @@ export interface TraceEventsForNetworkRequest {
|
|
|
32
32
|
resourceFinish?: Types.Events.ResourceFinish;
|
|
33
33
|
receivedData?: Types.Events.ResourceReceivedData[];
|
|
34
34
|
resourceMarkAsCached?: Types.Events.ResourceMarkAsCached;
|
|
35
|
+
preloadRenderBlockingStatusChange?: Types.Events.PreloadRenderBlockingStatusChangeEvent[];
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export interface WebSocketTraceDataForFrame {
|
|
@@ -164,6 +165,10 @@ export function handleEvent(event: Types.Events.Event): void {
|
|
|
164
165
|
return;
|
|
165
166
|
}
|
|
166
167
|
|
|
168
|
+
if (Types.Events.isPreloadRenderBlockingStatusChangeEvent(event)) {
|
|
169
|
+
storeTraceEventWithRequestId(event.args.data.requestId, 'preloadRenderBlockingStatusChange', [event]);
|
|
170
|
+
}
|
|
171
|
+
|
|
167
172
|
if (Types.Events.isWebSocketCreate(event) || Types.Events.isWebSocketInfo(event) ||
|
|
168
173
|
Types.Events.isWebSocketTransfer(event)) {
|
|
169
174
|
const identifier = event.args.data.identifier;
|
|
@@ -487,13 +492,24 @@ export async function finalize(): Promise<void> {
|
|
|
487
492
|
Types.Timing.Micro(0);
|
|
488
493
|
|
|
489
494
|
// Finally get some of the general data from the trace events.
|
|
490
|
-
const {frame, url, renderBlocking} = finalSendRequest.args.data;
|
|
495
|
+
const {frame, url, renderBlocking: sendRequestIsRenderBlocking} = finalSendRequest.args.data;
|
|
491
496
|
const {encodedDataLength, decodedBodyLength} =
|
|
492
497
|
request.resourceFinish ? request.resourceFinish.args.data : {encodedDataLength: 0, decodedBodyLength: 0};
|
|
493
498
|
const parsedUrl = new URL(url);
|
|
494
499
|
const isHttps = parsedUrl.protocol === 'https:';
|
|
495
500
|
const requestingFrameUrl =
|
|
496
501
|
Helpers.Trace.activeURLForFrameAtTime(frame, finalSendRequest.ts, rendererProcessesByFrame) || '';
|
|
502
|
+
|
|
503
|
+
// A resource that is preloaded (and not marked as render blocking) can
|
|
504
|
+
// become render blocked later via a PreloadRenderBlockingStatusChange. In
|
|
505
|
+
// this case, we take the render blocking value of the last
|
|
506
|
+
// PreloadRenderBlockingStatusChange for this request.
|
|
507
|
+
const preloadRenderBlockingStatusChange =
|
|
508
|
+
request.preloadRenderBlockingStatusChange?.at(-1)?.args.data.renderBlocking;
|
|
509
|
+
|
|
510
|
+
// In the event the property isn't set, assume non-blocking.
|
|
511
|
+
const isRenderBlocking = preloadRenderBlockingStatusChange ?? sendRequestIsRenderBlocking ?? 'non_blocking';
|
|
512
|
+
|
|
497
513
|
// Construct a synthetic trace event for this network request.
|
|
498
514
|
const networkEvent =
|
|
499
515
|
Helpers.SyntheticEvents.SyntheticEventsManager.registerSyntheticEvent<Types.Events.SyntheticNetworkRequest>({
|
|
@@ -535,8 +551,7 @@ export async function finalize(): Promise<void> {
|
|
|
535
551
|
initialPriority,
|
|
536
552
|
protocol: request.receiveResponse?.args.data.protocol ?? 'unknown',
|
|
537
553
|
redirects,
|
|
538
|
-
|
|
539
|
-
renderBlocking: renderBlocking ?? 'non_blocking',
|
|
554
|
+
renderBlocking: isRenderBlocking,
|
|
540
555
|
requestId,
|
|
541
556
|
requestingFrameUrl,
|
|
542
557
|
requestMethod: finalSendRequest.args.data.requestMethod,
|
|
@@ -3142,6 +3142,8 @@ export const enum Name {
|
|
|
3142
3142
|
USER_TIMING_MEASURE = 'UserTiming::Measure',
|
|
3143
3143
|
|
|
3144
3144
|
LINK_PRECONNECT = 'LinkPreconnect',
|
|
3145
|
+
|
|
3146
|
+
PRELOAD_RENDER_BLOCKING_STATUS_CHANGE = 'PreloadRenderBlockingStatusChange',
|
|
3145
3147
|
}
|
|
3146
3148
|
|
|
3147
3149
|
/**
|
|
@@ -3275,3 +3277,20 @@ export function isAnyScriptSourceEvent(event: Event): event is RundownScriptSour
|
|
|
3275
3277
|
RundownScriptStub {
|
|
3276
3278
|
return event.cat === 'disabled-by-default-devtools.v8-source-rundown-sources';
|
|
3277
3279
|
}
|
|
3280
|
+
|
|
3281
|
+
export interface PreloadRenderBlockingStatusChangeEvent extends Instant {
|
|
3282
|
+
name: Name.PRELOAD_RENDER_BLOCKING_STATUS_CHANGE;
|
|
3283
|
+
cat: 'devtools.timeline';
|
|
3284
|
+
args: Args&{
|
|
3285
|
+
data: {
|
|
3286
|
+
requestId: string,
|
|
3287
|
+
url: string,
|
|
3288
|
+
renderBlocking?: RenderBlocking,
|
|
3289
|
+
},
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3292
|
+
|
|
3293
|
+
export function isPreloadRenderBlockingStatusChangeEvent(event: Event):
|
|
3294
|
+
event is PreloadRenderBlockingStatusChangeEvent {
|
|
3295
|
+
return event.name === Name.PRELOAD_RENDER_BLOCKING_STATUS_CHANGE;
|
|
3296
|
+
}
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
type ImageInputData,
|
|
33
33
|
type ModelChatMessage,
|
|
34
34
|
type Props as ChatViewProps,
|
|
35
|
-
State as ChatViewState,
|
|
36
35
|
type Step
|
|
37
36
|
} from './components/ChatView.js';
|
|
37
|
+
import {DisabledWidget} from './components/DisabledWidget.js';
|
|
38
38
|
import {ExploreWidget} from './components/ExploreWidget.js';
|
|
39
39
|
import {MarkdownRendererWithCodeBlock} from './components/MarkdownRendererWithCodeBlock.js';
|
|
40
40
|
import {PerformanceAgentMarkdownRenderer} from './components/PerformanceAgentMarkdownRenderer.js';
|
|
@@ -296,7 +296,17 @@ interface ToolbarViewInput {
|
|
|
296
296
|
showActiveConversationActions: boolean;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
export
|
|
299
|
+
export const enum ViewState {
|
|
300
|
+
DISABLED_VIEW = 'disabled-view',
|
|
301
|
+
CHAT_VIEW = 'chat-view',
|
|
302
|
+
EXPLORE_VIEW = 'explore-view'
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
interface PanelViewProps {
|
|
306
|
+
state: ViewState;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export type ViewInput = ChatViewProps&ToolbarViewInput&PanelViewProps;
|
|
300
310
|
export interface PanelViewOutput {
|
|
301
311
|
chatView?: ChatView;
|
|
302
312
|
}
|
|
@@ -375,28 +385,41 @@ function toolbarView(input: ToolbarViewInput): Lit.LitTemplate {
|
|
|
375
385
|
|
|
376
386
|
function defaultView(input: ViewInput, output: PanelViewOutput, target: HTMLElement): void {
|
|
377
387
|
// clang-format off
|
|
388
|
+
function renderState(): Lit.TemplateResult {
|
|
389
|
+
switch (input.state) {
|
|
390
|
+
case ViewState.CHAT_VIEW:
|
|
391
|
+
return html`<devtools-ai-chat-view
|
|
392
|
+
.props=${input}
|
|
393
|
+
${Lit.Directives.ref((el: Element | undefined) => {
|
|
394
|
+
if (!el || !(el instanceof ChatView)) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
output.chatView = el;
|
|
399
|
+
})}
|
|
400
|
+
></devtools-ai-chat-view>`;
|
|
401
|
+
case ViewState.EXPLORE_VIEW:
|
|
402
|
+
return html`<devtools-widget
|
|
403
|
+
class="fill-panel"
|
|
404
|
+
.widgetConfig=${UI.Widget.widgetConfig(ExploreWidget)}
|
|
405
|
+
></devtools-widget>`;
|
|
406
|
+
|
|
407
|
+
case ViewState.DISABLED_VIEW:
|
|
408
|
+
return html`<devtools-widget
|
|
409
|
+
class="fill-panel"
|
|
410
|
+
.widgetConfig=${UI.Widget.widgetConfig(DisabledWidget, {
|
|
411
|
+
aidaAvailability: input.aidaAvailability,
|
|
412
|
+
})}
|
|
413
|
+
></devtools-widget>`;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
378
417
|
Lit.render(
|
|
379
418
|
html`
|
|
380
419
|
${toolbarView(input)}
|
|
381
|
-
<div class="ai-assistance-view-container">
|
|
382
|
-
${input.state !== ChatViewState.EXPLORE_VIEW
|
|
383
|
-
? html` <devtools-ai-chat-view
|
|
384
|
-
.props=${input}
|
|
385
|
-
${Lit.Directives.ref((el: Element | undefined) => {
|
|
386
|
-
if (!el || !(el instanceof ChatView)) {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
output.chatView = el;
|
|
391
|
-
})}
|
|
392
|
-
></devtools-ai-chat-view>`
|
|
393
|
-
: html`<devtools-widget
|
|
394
|
-
class="explore"
|
|
395
|
-
.widgetConfig=${UI.Widget.widgetConfig(ExploreWidget)}
|
|
396
|
-
></devtools-widget>`}
|
|
397
|
-
</div>
|
|
420
|
+
<div class="ai-assistance-view-container">${renderState()}</div>
|
|
398
421
|
`,
|
|
399
|
-
target
|
|
422
|
+
target
|
|
400
423
|
);
|
|
401
424
|
// clang-format on
|
|
402
425
|
}
|
|
@@ -528,19 +551,19 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
528
551
|
AiAssistanceModel.AiHistoryStorage.Events.HISTORY_DELETED, this.#onHistoryDeleted, this);
|
|
529
552
|
}
|
|
530
553
|
|
|
531
|
-
#getChatUiState():
|
|
554
|
+
#getChatUiState(): ViewState {
|
|
532
555
|
const blockedByAge = Root.Runtime.hostConfig.aidaAvailability?.blockedByAge === true;
|
|
533
556
|
|
|
534
557
|
if (this.#aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE ||
|
|
535
558
|
!this.#aiAssistanceEnabledSetting?.getIfNotDisabled() || blockedByAge) {
|
|
536
|
-
return
|
|
559
|
+
return ViewState.DISABLED_VIEW;
|
|
537
560
|
}
|
|
538
561
|
|
|
539
562
|
if (this.#conversation?.type) {
|
|
540
|
-
return
|
|
563
|
+
return ViewState.CHAT_VIEW;
|
|
541
564
|
}
|
|
542
565
|
|
|
543
|
-
return
|
|
566
|
+
return ViewState.EXPLORE_VIEW;
|
|
544
567
|
}
|
|
545
568
|
|
|
546
569
|
#getAiAssistanceEnabledSetting(): Common.Settings.Setting<boolean>|undefined {
|
|
@@ -982,7 +1005,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
982
1005
|
|
|
983
1006
|
#getChatInputPlaceholder(): Platform.UIString.LocalizedString {
|
|
984
1007
|
const state = this.#getChatUiState();
|
|
985
|
-
if (state ===
|
|
1008
|
+
if (state === ViewState.DISABLED_VIEW || !this.#conversation) {
|
|
986
1009
|
return i18nString(UIStrings.followTheSteps);
|
|
987
1010
|
}
|
|
988
1011
|
|
|
@@ -1015,7 +1038,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1015
1038
|
|
|
1016
1039
|
#getDisclaimerText(): Platform.UIString.LocalizedString {
|
|
1017
1040
|
const state = this.#getChatUiState();
|
|
1018
|
-
if (state ===
|
|
1041
|
+
if (state === ViewState.DISABLED_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
|
|
1019
1042
|
return i18nString(UIStrings.inputDisclaimerForEmptyState);
|
|
1020
1043
|
}
|
|
1021
1044
|
|
|
@@ -9,3 +9,4 @@ export * from './SelectWorkspaceDialog.js';
|
|
|
9
9
|
export * as UserActionRow from './components/UserActionRow.js';
|
|
10
10
|
export * as ExploreWidget from './components/ExploreWidget.js';
|
|
11
11
|
export * as PatchWidget from './PatchWidget.js';
|
|
12
|
+
export * as DisabledWidget from './components/DisabledWidget.js';
|