chrome-devtools-frontend 1.0.1538523 → 1.0.1539972

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.
Files changed (347) hide show
  1. package/eslint.config.mjs +1 -1
  2. package/front_end/core/common/Debouncer.ts +2 -2
  3. package/front_end/core/common/Gzip.ts +1 -1
  4. package/front_end/core/common/Throttler.ts +3 -3
  5. package/front_end/core/host/GdpClient.ts +4 -0
  6. package/front_end/core/protocol_client/CDPConnection.ts +12 -10
  7. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +181 -0
  8. package/front_end/core/protocol_client/InspectorBackend.ts +55 -249
  9. package/front_end/core/protocol_client/protocol_client.ts +2 -2
  10. package/front_end/core/sdk/ChildTargetManager.ts +5 -41
  11. package/front_end/core/sdk/Connections.ts +9 -58
  12. package/front_end/core/sdk/DOMModel.ts +1 -0
  13. package/front_end/core/sdk/DebuggerModel.ts +3 -16
  14. package/front_end/core/sdk/RehydratingConnection.ts +1 -1
  15. package/front_end/core/sdk/RemoteObject.ts +4 -0
  16. package/front_end/core/sdk/Target.ts +3 -6
  17. package/front_end/core/sdk/TargetManager.ts +1 -2
  18. package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +13 -26
  19. package/front_end/entrypoints/node_app/{NodeConnectionsPanel.ts → app/NodeConnectionsPanel.ts} +8 -8
  20. package/front_end/entrypoints/node_app/{NodeMain.ts → app/NodeMain.ts} +12 -11
  21. package/front_end/entrypoints/node_app/app/app.ts +6 -0
  22. package/front_end/entrypoints/node_app/node_app.ts +4 -2
  23. package/front_end/generated/Deprecation.ts +8 -0
  24. package/front_end/generated/{InspectorBackendCommands.js → InspectorBackendCommands.ts} +18 -36
  25. package/front_end/generated/SupportedCSSProperties.js +50 -9
  26. package/front_end/generated/protocol.ts +2 -2
  27. package/front_end/models/ai_assistance/EvaluateAction.ts +88 -5
  28. package/front_end/models/ai_assistance/injected.ts +15 -2
  29. package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
  30. package/front_end/models/trace/Styles.ts +1 -1
  31. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +18 -3
  32. package/front_end/models/trace/types/TraceEvents.ts +19 -0
  33. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +49 -26
  34. package/front_end/panels/ai_assistance/PatchWidget.ts +22 -12
  35. package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -1
  36. package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
  37. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -135
  38. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +170 -0
  39. package/front_end/panels/ai_assistance/components/ExploreWidget.ts +4 -4
  40. package/front_end/panels/ai_assistance/components/chatView.css +0 -31
  41. package/front_end/panels/ai_assistance/components/disabledWidget.css +45 -0
  42. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  43. package/front_end/panels/application/components/FrameDetailsView.ts +1 -1
  44. package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +4 -4
  45. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +2 -2
  46. package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
  47. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +3 -3
  48. package/front_end/panels/elements/ElementsTreeElement.ts +123 -95
  49. package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
  50. package/front_end/panels/elements/NodeStackTraceWidget.ts +8 -2
  51. package/front_end/panels/elements/PropertiesWidget.ts +3 -2
  52. package/front_end/panels/event_listeners/EventListenersView.ts +9 -5
  53. package/front_end/panels/explain/components/ConsoleInsight.ts +2 -3
  54. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +57 -33
  55. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
  56. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +1 -1
  57. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +12 -5
  58. package/front_end/panels/network/RequestInitiatorView.ts +1 -1
  59. package/front_end/panels/network/RequestPayloadView.ts +2 -1
  60. package/front_end/panels/network/RequestTimingView.ts +4 -2
  61. package/front_end/panels/network/components/EditableSpan.ts +1 -1
  62. package/front_end/panels/network/components/RequestHeadersView.ts +24 -17
  63. package/front_end/panels/protocol_monitor/JSONEditor.ts +2 -2
  64. package/front_end/panels/recorder/RecorderController.ts +6 -7
  65. package/front_end/panels/recorder/components/StepView.ts +1 -1
  66. package/front_end/panels/recorder/models/RecordingPlayer.ts +7 -6
  67. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  68. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +4 -4
  69. package/front_end/panels/sources/BreakpointsView.ts +3 -3
  70. package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
  71. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
  72. package/front_end/panels/timeline/TimelineFlameChartView.ts +10 -10
  73. package/front_end/panels/timeline/TimelinePanel.ts +3 -3
  74. package/front_end/panels/timeline/TimelineUIUtils.ts +21 -24
  75. package/front_end/panels/timeline/components/FieldSettingsDialog.ts +9 -5
  76. package/front_end/panels/timeline/components/LiveMetricsView.ts +20 -9
  77. package/front_end/panels/timeline/components/MetricCard.ts +4 -2
  78. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +3 -2
  79. package/front_end/panels/utils/utils.ts +4 -2
  80. package/front_end/services/puppeteer/PuppeteerConnection.ts +57 -53
  81. package/front_end/third_party/chromium/README.chromium +1 -1
  82. package/front_end/third_party/puppeteer/README.chromium +2 -2
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +3 -1
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +4 -2
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +3 -1
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js +4 -3
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserConnector.js.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts +2 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.d.ts.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js +3 -2
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Connection.js.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +29 -9
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +11 -0
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +9 -2
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +1 -0
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +21 -0
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +4 -2
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js +2 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts +6 -1
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.d.ts.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js +11 -2
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Connection.js.map +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
  140. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +6 -0
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts +2 -0
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js +4 -3
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/CallbackRegistry.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -0
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts +4 -0
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +10 -4
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +14 -3
  162. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +97 -43
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +3 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +4 -2
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +3 -1
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js +4 -3
  178. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserConnector.js.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts +2 -1
  184. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js +3 -2
  186. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
  188. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  189. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +29 -9
  190. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  192. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +11 -0
  194. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  196. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +9 -2
  197. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +1 -0
  199. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +21 -0
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +4 -2
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js +2 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.js.map +1 -1
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts +6 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.d.ts.map +1 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js +11 -2
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js.map +1 -1
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +6 -0
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts +2 -0
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js +4 -3
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/CallbackRegistry.js.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts +4 -0
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +10 -4
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/types.d.ts +14 -3
  240. package/front_end/third_party/puppeteer/package/package.json +3 -3
  241. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +4 -2
  242. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +3 -1
  243. package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
  244. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +1 -0
  245. package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +8 -1
  246. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +1 -1
  247. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +4 -1
  248. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +38 -10
  249. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -0
  250. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -2
  251. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +32 -0
  252. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -0
  253. package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +2 -2
  254. package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +2 -1
  255. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +15 -1
  256. package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +5 -1
  257. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +8 -0
  258. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +36 -43
  259. package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +7 -5
  260. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +8 -0
  261. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +22 -1
  262. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  263. package/front_end/ui/components/dialogs/ButtonDialog.ts +15 -5
  264. package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
  265. package/front_end/ui/components/helpers/helpers.ts +0 -2
  266. package/front_end/ui/components/menus/Menu.ts +5 -3
  267. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  268. package/front_end/ui/components/survey_link/SurveyLink.docs.ts +22 -0
  269. package/front_end/ui/components/switch/Switch.docs.ts +38 -0
  270. package/front_end/ui/components/tooltips/Tooltip.ts +69 -45
  271. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -2
  272. package/front_end/ui/legacy/SelectMenu.docs.ts +14 -0
  273. package/front_end/ui/legacy/Slider.docs.ts +49 -0
  274. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -1
  275. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +453 -347
  276. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +77 -5
  277. package/front_end/ui/legacy/components/utils/Linkifier.ts +62 -3
  278. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  279. package/package.json +1 -1
  280. package/front_end/core/protocol_client/NodeURL.ts +0 -42
  281. package/front_end/third_party/puppeteer/package/src/templates/version.ts.tmpl +0 -4
  282. package/front_end/ui/components/docs/color_swatch/basic.html +0 -32
  283. package/front_end/ui/components/docs/color_swatch/basic.ts +0 -38
  284. package/front_end/ui/components/docs/color_swatch/change-color.html +0 -24
  285. package/front_end/ui/components/docs/color_swatch/change-color.ts +0 -28
  286. package/front_end/ui/components/docs/combo_box/basic.html +0 -20
  287. package/front_end/ui/components/docs/combo_box/basic.ts +0 -49
  288. package/front_end/ui/components/docs/computed_style_property/basic.html +0 -25
  289. package/front_end/ui/components/docs/computed_style_property/basic.ts +0 -19
  290. package/front_end/ui/components/docs/computed_style_property/traceable.html +0 -25
  291. package/front_end/ui/components/docs/computed_style_property/traceable.ts +0 -16
  292. package/front_end/ui/components/docs/computed_style_trace/basic.html +0 -25
  293. package/front_end/ui/components/docs/computed_style_trace/basic.ts +0 -24
  294. package/front_end/ui/components/docs/console_insight/basic.html +0 -28
  295. package/front_end/ui/components/docs/console_insight/basic.ts +0 -103
  296. package/front_end/ui/components/docs/console_insight/error.html +0 -28
  297. package/front_end/ui/components/docs/console_insight/error.ts +0 -33
  298. package/front_end/ui/components/docs/console_insight/loading.html +0 -28
  299. package/front_end/ui/components/docs/console_insight/loading.ts +0 -47
  300. package/front_end/ui/components/docs/elements_breadcrumbs/basic.html +0 -43
  301. package/front_end/ui/components/docs/elements_breadcrumbs/basic.ts +0 -54
  302. package/front_end/ui/components/docs/elements_breadcrumbs/helpers.ts +0 -29
  303. package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.html +0 -38
  304. package/front_end/ui/components/docs/elements_breadcrumbs/scroll-to-active-element.ts +0 -90
  305. package/front_end/ui/components/docs/elements_breadcrumbs/scroll.html +0 -29
  306. package/front_end/ui/components/docs/elements_breadcrumbs/scroll.ts +0 -62
  307. package/front_end/ui/components/docs/icon_button/basic.html +0 -34
  308. package/front_end/ui/components/docs/icon_button/basic.ts +0 -67
  309. package/front_end/ui/components/docs/issue_counter/basic.html +0 -35
  310. package/front_end/ui/components/docs/issue_counter/basic.ts +0 -34
  311. package/front_end/ui/components/docs/issue_link_icon/basic.html +0 -31
  312. package/front_end/ui/components/docs/issue_link_icon/basic.ts +0 -26
  313. package/front_end/ui/components/docs/legacy_color_invert/basic.html +0 -77
  314. package/front_end/ui/components/docs/legacy_color_invert/basic.ts +0 -98
  315. package/front_end/ui/components/docs/linear_memory_inspector/basic.html +0 -26
  316. package/front_end/ui/components/docs/linear_memory_inspector/basic.ts +0 -44
  317. package/front_end/ui/components/docs/menu/basic.html +0 -28
  318. package/front_end/ui/components/docs/menu/basic.ts +0 -66
  319. package/front_end/ui/components/docs/recorder_control_button/basic.html +0 -20
  320. package/front_end/ui/components/docs/recorder_control_button/basic.ts +0 -15
  321. package/front_end/ui/components/docs/recorder_recording_list_view/basic.html +0 -20
  322. package/front_end/ui/components/docs/recorder_recording_list_view/basic.ts +0 -26
  323. package/front_end/ui/components/docs/recorder_select_button/basic.html +0 -20
  324. package/front_end/ui/components/docs/recorder_select_button/basic.ts +0 -81
  325. package/front_end/ui/components/docs/recorder_split_view/basic.html +0 -17
  326. package/front_end/ui/components/docs/recorder_split_view/basic.ts +0 -22
  327. package/front_end/ui/components/docs/request_link_icon/basic.html +0 -31
  328. package/front_end/ui/components/docs/request_link_icon/basic.ts +0 -21
  329. package/front_end/ui/components/docs/slider/basic.ts +0 -62
  330. package/front_end/ui/components/docs/style_property_editor/flex.html +0 -21
  331. package/front_end/ui/components/docs/style_property_editor/flex.ts +0 -52
  332. package/front_end/ui/components/docs/style_property_editor/grid.html +0 -22
  333. package/front_end/ui/components/docs/style_property_editor/grid.ts +0 -50
  334. package/front_end/ui/components/docs/style_property_editor/masonry.html +0 -21
  335. package/front_end/ui/components/docs/style_property_editor/masonry.ts +0 -50
  336. package/front_end/ui/components/docs/survey_link/basic.html +0 -20
  337. package/front_end/ui/components/docs/survey_link/basic.ts +0 -28
  338. package/front_end/ui/components/docs/switch/basic.ts +0 -51
  339. package/front_end/ui/components/docs/tree_outline/basic.html +0 -33
  340. package/front_end/ui/components/docs/tree_outline/basic.ts +0 -38
  341. package/front_end/ui/components/docs/tree_outline/custom-renderers.html +0 -32
  342. package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +0 -61
  343. package/front_end/ui/components/docs/tree_outline/lazy-children.html +0 -32
  344. package/front_end/ui/components/docs/tree_outline/lazy-children.ts +0 -91
  345. package/front_end/ui/components/docs/tree_outline/sample-data.ts +0 -67
  346. package/front_end/ui/components/helpers/directives.ts +0 -38
  347. /package/front_end/entrypoints/node_app/{nodeConnectionsPanel.css → app/nodeConnectionsPanel.css} +0 -0
@@ -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
- // In the event the property isn't set, assume non-blocking.
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 type ViewInput = ChatViewProps&ToolbarViewInput;
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(): ChatViewState {
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 ChatViewState.DISABLED_VIEW;
559
+ return ViewState.DISABLED_VIEW;
537
560
  }
538
561
 
539
562
  if (this.#conversation?.type) {
540
- return ChatViewState.CHAT_VIEW;
563
+ return ViewState.CHAT_VIEW;
541
564
  }
542
565
 
543
- return ChatViewState.EXPLORE_VIEW;
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 === ChatViewState.DISABLED_VIEW || !this.#conversation) {
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 === ChatViewState.DISABLED_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
1041
+ if (state === ViewState.DISABLED_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
1019
1042
  return i18nString(UIStrings.inputDisclaimerForEmptyState);
1020
1043
  }
1021
1044
 
@@ -310,11 +310,13 @@ const DEFAULT_VIEW: View =
310
310
  const iconName = input.projectType === SelectedProjectType.AUTOMATIC_DISCONNECTED ? 'folder-off' : input.projectType === SelectedProjectType.AUTOMATIC_CONNECTED ? 'folder-asterisk' : 'folder';
311
311
  return html`
312
312
  <div class="footer">
313
- ${input.projectName ? html`
313
+ ${
314
+ input.projectName ? html`
314
315
  <div class="change-workspace" jslog=${VisualLogging.section('patch-widget.workspace')}>
315
316
  <devtools-icon .name=${iconName}></devtools-icon>
316
317
  <span class="folder-name" title=${input.projectPath}>${input.projectName}</span>
317
- ${input.onChangeWorkspaceClick ? html`
318
+ ${
319
+ input.onChangeWorkspaceClick ? html`
318
320
  <devtools-button
319
321
  @click=${input.onChangeWorkspaceClick}
320
322
  .jslogContext=${'change-workspace'}
@@ -323,18 +325,24 @@ const DEFAULT_VIEW: View =
323
325
  .disabled=${input.patchSuggestionState === PatchSuggestionState.LOADING}
324
326
  ${Directives.ref(output.changeRef)}
325
327
  >${lockedString(UIStringsNotTranslate.change)}</devtools-button>
326
- ` : nothing}
328
+ ` :
329
+ nothing}
327
330
  </div>
328
- ` : nothing}
331
+ ` :
332
+ nothing}
329
333
  <div class="apply-to-workspace-container" aria-live="polite">
330
- ${input.patchSuggestionState === PatchSuggestionState.LOADING ? html`
331
- <div class="loading-text-container" jslog=${VisualLogging.section('patch-widget.apply-to-workspace-loading')}>
334
+ ${
335
+ input.patchSuggestionState === PatchSuggestionState.LOADING ?
336
+ html`
337
+ <div class="loading-text-container" jslog=${
338
+ VisualLogging.section('patch-widget.apply-to-workspace-loading')}>
332
339
  <devtools-spinner></devtools-spinner>
333
340
  <span>
334
341
  ${lockedString(UIStringsNotTranslate.applyingToWorkspace)}
335
342
  </span>
336
343
  </div>
337
- ` : html`
344
+ ` :
345
+ html`
338
346
  <devtools-button
339
347
  @click=${input.onApplyToWorkspace}
340
348
  .jslogContext=${'patch-widget.apply-to-workspace'}
@@ -342,12 +350,14 @@ const DEFAULT_VIEW: View =
342
350
  ${lockedString(UIStringsNotTranslate.applyToWorkspace)}
343
351
  </devtools-button>
344
352
  `}
345
- ${input.patchSuggestionState === PatchSuggestionState.LOADING ? html`<devtools-button
353
+ ${
354
+ input.patchSuggestionState === PatchSuggestionState.LOADING ? html`<devtools-button
346
355
  @click=${input.onCancel}
347
356
  .jslogContext=${'cancel'}
348
357
  .variant=${Buttons.Button.Variant.OUTLINED}>
349
358
  ${lockedString(UIStringsNotTranslate.cancel)}
350
- </devtools-button>` : nothing}
359
+ </devtools-button>` :
360
+ nothing}
351
361
  <devtools-button
352
362
  aria-details="info-tooltip"
353
363
  .jslogContext=${'patch-widget.info-tooltip-trigger'}
@@ -356,7 +366,7 @@ const DEFAULT_VIEW: View =
356
366
  ></devtools-button>
357
367
  <devtools-tooltip
358
368
  id="info-tooltip"
359
- variant=${'rich'}
369
+ variant="rich"
360
370
  >
361
371
  <div class="info-tooltip-container">
362
372
  ${input.applyToWorkspaceTooltipText}
@@ -364,8 +374,8 @@ const DEFAULT_VIEW: View =
364
374
  class="link tooltip-link"
365
375
  role="link"
366
376
  jslog=${VisualLogging.link('open-ai-settings').track({
367
- click: true,
368
- })}
377
+ click: true,
378
+ })}
369
379
  @click=${input.onLearnMoreTooltipClick}
370
380
  >${lockedString(UIStringsNotTranslate.learnMore)}</button>
371
381
  </div>
@@ -20,7 +20,7 @@
20
20
  align-items: center;
21
21
  overflow: hidden;
22
22
 
23
- & .explore {
23
+ & .fill-panel {
24
24
  width: 100%;
25
25
  height: 100%;
26
26
  display: flex;
@@ -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';
@@ -1,7 +1,7 @@
1
1
  // Copyright 2024 The Chromium Authors
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
- /* eslint-disable @devtools/no-imperative-dom-api */
4
+
5
5
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
6
6
 
7
7
  import '../../../ui/components/spinners/spinners.js';
@@ -9,7 +9,6 @@ import '../../../ui/components/spinners/spinners.js';
9
9
  import * as Host from '../../../core/host/host.js';
10
10
  import * as i18n from '../../../core/i18n/i18n.js';
11
11
  import type * as Platform from '../../../core/platform/platform.js';
12
- import * as Root from '../../../core/root/root.js';
13
12
  import * as SDK from '../../../core/sdk/sdk.js';
14
13
  import * as AiAssistanceModel from '../../../models/ai_assistance/ai_assistance.js';
15
14
  import * as Workspace from '../../../models/workspace/workspace.js';
@@ -19,7 +18,6 @@ import * as Marked from '../../../third_party/marked/marked.js';
19
18
  import * as Buttons from '../../../ui/components/buttons/buttons.js';
20
19
  import type * as MarkdownView from '../../../ui/components/markdown_view/markdown_view.js';
21
20
  import type {MarkdownLitRenderer} from '../../../ui/components/markdown_view/MarkdownView.js';
22
- import * as uiI18n from '../../../ui/i18n/i18n.js';
23
21
  import * as UI from '../../../ui/legacy/legacy.js';
24
22
  import * as Lit from '../../../ui/lit/lit.js';
25
23
  import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
@@ -31,47 +29,10 @@ import {UserActionRow} from './UserActionRow.js';
31
29
  const {html, Directives: {ifDefined, ref}} = Lit;
32
30
 
33
31
  const UIStrings = {
34
- /**
35
- * @description The error message when the user is not logged in into Chrome.
36
- */
37
- notLoggedIn: 'This feature is only available when you are signed into Chrome with your Google account',
38
- /**
39
- * @description Message shown when the user is offline.
40
- */
41
- offline: 'Check your internet connection and try again',
42
- /**
43
- * @description Text for a link to Chrome DevTools Settings.
44
- */
45
- settingsLink: 'AI assistance in Settings',
46
- /**
47
- * @description Text for asking the user to turn the AI assistance feature in settings first before they are able to use it.
48
- * @example {AI assistance in Settings} PH1
49
- */
50
- turnOnForStyles: 'Turn on {PH1} to get help with understanding CSS styles',
51
- /**
52
- * @description Text for asking the user to turn the AI assistance feature in settings first before they are able to use it.
53
- * @example {AI assistance in Settings} PH1
54
- */
55
- turnOnForStylesAndRequests: 'Turn on {PH1} to get help with styles and network requests',
56
- /**
57
- * @description Text for asking the user to turn the AI assistance feature in settings first before they are able to use it.
58
- * @example {AI assistance in Settings} PH1
59
- */
60
- turnOnForStylesRequestsAndFiles: 'Turn on {PH1} to get help with styles, network requests, and files',
61
- /**
62
- * @description Text for asking the user to turn the AI assistance feature in settings first before they are able to use it.
63
- * @example {AI assistance in Settings} PH1
64
- */
65
- turnOnForStylesRequestsPerformanceAndFiles:
66
- 'Turn on {PH1} to get help with styles, network requests, performance, and files',
67
32
  /**
68
33
  * @description The footer disclaimer that links to more information about the AI feature.
69
34
  */
70
35
  learnAbout: 'Learn about AI in DevTools',
71
- /**
72
- * @description Text informing the user that AI assistance is not available in Incognito mode or Guest mode.
73
- */
74
- notAvailableInIncognitoMode: 'AI assistance is not available in Incognito mode or Guest mode',
75
36
 
76
37
  /**
77
38
  * @description Label added to the text input to describe the context for screen readers. Not shown visibly on screen.
@@ -259,12 +220,6 @@ export interface ModelChatMessage {
259
220
 
260
221
  export type ChatMessage = UserChatMessage|ModelChatMessage;
261
222
 
262
- export const enum State {
263
- DISABLED_VIEW = 'disabled-view',
264
- CHAT_VIEW = 'chat-view',
265
- EXPLORE_VIEW = 'explore-view'
266
- }
267
-
268
223
  export interface Props {
269
224
  onTextSubmit:
270
225
  (text: string, imageInput?: Host.AidaClient.Part,
@@ -281,7 +236,6 @@ export interface Props {
281
236
  onLoadImage?: (file: File) => Promise<void>;
282
237
  changeManager: AiAssistanceModel.ChangeManager.ChangeManager;
283
238
  inspectElementToggled: boolean;
284
- state: State;
285
239
  aidaAvailability: Host.AidaClient.AidaAccessPreconditions;
286
240
  messages: ChatMessage[];
287
241
  selectedContext: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null;
@@ -513,10 +467,6 @@ export class ChatView extends HTMLElement {
513
467
 
514
468
  #render(): void {
515
469
  const renderFooter = (): Lit.LitTemplate => {
516
- if (this.#props.state !== State.CHAT_VIEW) {
517
- return Lit.nothing;
518
- }
519
-
520
470
  const classes = Lit.Directives.classMap({
521
471
  'chat-view-footer': true,
522
472
  'has-conversation': !!this.#props.conversationType,
@@ -538,10 +488,6 @@ export class ChatView extends HTMLElement {
538
488
  };
539
489
 
540
490
  const renderInputOrReadOnlySection = (): Lit.LitTemplate => {
541
- if (this.#props.state !== State.CHAT_VIEW) {
542
- return Lit.nothing;
543
- }
544
-
545
491
  if (this.#props.conversationType && this.#props.isReadOnly) {
546
492
  return renderReadOnlySection({
547
493
  conversationType: this.#props.conversationType,
@@ -582,8 +528,6 @@ export class ChatView extends HTMLElement {
582
528
  <div class="chat-ui">
583
529
  <main @scroll=${this.#handleScroll} ${ref(this.#mainElementRef)}>
584
530
  ${renderMainContents({
585
- state: this.#props.state,
586
- aidaAvailability: this.#props.aidaAvailability,
587
531
  messages: this.#props.messages,
588
532
  isLoading: this.#props.isLoading,
589
533
  isReadOnly: this.#props.isReadOnly,
@@ -1504,75 +1448,7 @@ function renderChatInput({
1504
1448
  // clang-format on
1505
1449
  }
1506
1450
 
1507
- function renderAidaUnavailableContents(
1508
- aidaAvailability:
1509
- Exclude<Host.AidaClient.AidaAccessPreconditions, Host.AidaClient.AidaAccessPreconditions.AVAILABLE>):
1510
- Lit.TemplateResult {
1511
- switch (aidaAvailability) {
1512
- case Host.AidaClient.AidaAccessPreconditions.NO_ACCOUNT_EMAIL:
1513
- case Host.AidaClient.AidaAccessPreconditions.SYNC_IS_PAUSED: {
1514
- return html`${i18nString(UIStrings.notLoggedIn)}`;
1515
- }
1516
- case Host.AidaClient.AidaAccessPreconditions.NO_INTERNET: {
1517
- return html`${i18nString(UIStrings.offline)}`;
1518
- }
1519
- }
1520
- }
1521
-
1522
- function renderConsentViewContents(): Lit.TemplateResult {
1523
- const settingsLink = document.createElement('span');
1524
- settingsLink.textContent = i18nString(UIStrings.settingsLink);
1525
- settingsLink.classList.add('link');
1526
- UI.ARIAUtils.markAsLink(settingsLink);
1527
- settingsLink.addEventListener('click', () => {
1528
- void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
1529
- });
1530
- settingsLink.setAttribute('jslog', `${VisualLogging.action('open-ai-settings').track({click: true})}`);
1531
-
1532
- let consentViewContents: HTMLSpanElement;
1533
- // TODO(ergunsh): Should this `view` access `hostConfig` at all?
1534
- const config = Root.Runtime.hostConfig;
1535
- if (config.isOffTheRecord) {
1536
- return html`${i18nString(UIStrings.notAvailableInIncognitoMode)}`;
1537
- }
1538
- if (config.devToolsAiAssistancePerformanceAgent?.enabled) {
1539
- consentViewContents = uiI18n.getFormatLocalizedString(
1540
- str_, UIStrings.turnOnForStylesRequestsPerformanceAndFiles, {PH1: settingsLink});
1541
- } else if (config.devToolsAiAssistanceFileAgent?.enabled) {
1542
- consentViewContents =
1543
- uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStylesRequestsAndFiles, {PH1: settingsLink});
1544
- } else if (config.devToolsAiAssistanceNetworkAgent?.enabled) {
1545
- consentViewContents =
1546
- uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStylesAndRequests, {PH1: settingsLink});
1547
- } else {
1548
- consentViewContents = uiI18n.getFormatLocalizedString(str_, UIStrings.turnOnForStyles, {PH1: settingsLink});
1549
- }
1550
-
1551
- return html`${consentViewContents}`;
1552
- }
1553
-
1554
- function renderDisabledState(contents: Lit.TemplateResult): Lit.TemplateResult {
1555
- // clang-format off
1556
- return html`
1557
- <div class="empty-state-container">
1558
- <div class="disabled-view">
1559
- <div class="disabled-view-icon-container">
1560
- <devtools-icon
1561
- name="smart-assistant"
1562
- ></devtools-icon>
1563
- </div>
1564
- <div>
1565
- ${contents}
1566
- </div>
1567
- </div>
1568
- </div>
1569
- `;
1570
- // clang-format on
1571
- }
1572
-
1573
1451
  function renderMainContents({
1574
- state,
1575
- aidaAvailability,
1576
1452
  messages,
1577
1453
  isLoading,
1578
1454
  isReadOnly,
@@ -1589,8 +1465,6 @@ function renderMainContents({
1589
1465
  onCopyResponseClick,
1590
1466
  onMessageContainerRef,
1591
1467
  }: {
1592
- state: State,
1593
- aidaAvailability: Host.AidaClient.AidaAccessPreconditions,
1594
1468
  messages: ChatMessage[],
1595
1469
  isLoading: boolean,
1596
1470
  isReadOnly: boolean,
@@ -1607,13 +1481,6 @@ function renderMainContents({
1607
1481
  conversationType?: AiAssistanceModel.AiHistoryStorage.ConversationType,
1608
1482
  changeSummary?: string,
1609
1483
  }): Lit.LitTemplate {
1610
- if (state === State.DISABLED_VIEW) {
1611
- if (aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
1612
- return renderDisabledState(renderConsentViewContents());
1613
- }
1614
- return renderDisabledState(renderAidaUnavailableContents(aidaAvailability));
1615
- }
1616
-
1617
1484
  if (!conversationType) {
1618
1485
  return Lit.nothing;
1619
1486
  }
@@ -1643,7 +1510,7 @@ function renderDisclamerTooltip(id: string, disclaimerText: string): Lit.Templat
1643
1510
  return html`
1644
1511
  <devtools-tooltip
1645
1512
  id=${id}
1646
- variant=${'rich'}
1513
+ variant="rich"
1647
1514
  >
1648
1515
  <div class="info-tooltip-container">
1649
1516
  ${disclaimerText}