chrome-devtools-frontend 1.0.1536371 → 1.0.1537860

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 (231) hide show
  1. package/.env.template +9 -0
  2. package/docs/get_the_code.md +27 -0
  3. package/front_end/core/common/SettingRegistration.ts +10 -7
  4. package/front_end/core/common/Settings.ts +3 -0
  5. package/front_end/core/host/AidaClient.ts +64 -5
  6. package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
  7. package/front_end/core/host/GdpClient.ts +8 -57
  8. package/front_end/core/host/host.ts +2 -0
  9. package/front_end/core/protocol_client/CDPConnection.ts +10 -8
  10. package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
  11. package/front_end/core/sdk/EnhancedTracesParser.ts +20 -5
  12. package/front_end/core/sdk/RehydratingConnection.ts +112 -4
  13. package/front_end/core/sdk/RehydratingObject.ts +8 -0
  14. package/front_end/core/sdk/TraceObject.ts +5 -1
  15. package/front_end/core/sdk/sdk-meta.ts +8 -2
  16. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +4 -3
  17. package/front_end/generated/SupportedCSSProperties.js +1 -0
  18. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +23 -7
  19. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +110 -5
  20. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +50 -45
  21. package/front_end/models/cpu_profile/ProfileTreeModel.ts +7 -7
  22. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  23. package/front_end/models/trace/types/File.ts +9 -0
  24. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +1 -1
  25. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
  26. package/front_end/panels/ai_assistance/components/ChatView.ts +58 -70
  27. package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
  28. package/front_end/panels/application/StorageView.ts +3 -2
  29. package/front_end/panels/application/components/BackForwardCacheView.ts +96 -108
  30. package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
  31. package/front_end/panels/application/components/OriginTrialTreeView.ts +136 -137
  32. package/front_end/panels/application/components/backForwardCacheView.css +8 -0
  33. package/front_end/panels/application/components/badge.css +9 -1
  34. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +2 -2
  35. package/front_end/panels/application/preloading/components/PreloadingString.ts +27 -0
  36. package/front_end/panels/autofill/AutofillView.ts +1 -1
  37. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
  38. package/front_end/panels/console/ConsoleView.ts +11 -9
  39. package/front_end/panels/coverage/CoverageView.ts +1 -2
  40. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +1 -1
  41. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
  42. package/front_end/panels/elements/ElementStatePaneWidget.ts +1 -1
  43. package/front_end/panels/elements/EventListenersWidget.ts +1 -2
  44. package/front_end/panels/elements/PropertiesWidget.ts +1 -1
  45. package/front_end/panels/network/NetworkConfigView.ts +2 -1
  46. package/front_end/panels/network/NetworkPanel.ts +5 -4
  47. package/front_end/panels/network/RequestCookiesView.ts +2 -1
  48. package/front_end/panels/profiler/HeapSnapshotView.ts +3 -2
  49. package/front_end/panels/recorder/RecorderController.ts +1 -2
  50. package/front_end/panels/recorder/components/CreateRecordingView.ts +153 -129
  51. package/front_end/panels/sensors/SensorsView.ts +4 -3
  52. package/front_end/panels/settings/AISettingsTab.ts +162 -171
  53. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +8 -6
  54. package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -2
  55. package/front_end/panels/settings/SettingsScreen.ts +5 -8
  56. package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
  57. package/front_end/panels/settings/aiSettingsTab.css +151 -148
  58. package/front_end/panels/settings/settings-meta.ts +1 -2
  59. package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
  60. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -1
  61. package/front_end/panels/sources/SourcesPanel.ts +2 -1
  62. package/front_end/panels/sources/sources-meta.ts +8 -1
  63. package/front_end/panels/timeline/TimelinePanel.ts +64 -14
  64. package/front_end/panels/timeline/TimelineUIUtils.ts +4 -20
  65. package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
  66. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -0
  67. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +2 -0
  68. package/front_end/third_party/chromium/README.chromium +2 -2
  69. package/front_end/third_party/puppeteer/README.chromium +2 -2
  70. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
  71. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  72. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  73. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +2 -2
  74. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  75. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  76. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +13 -1
  77. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  79. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +2 -2
  80. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  81. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -1
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +6 -1
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -1
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -1
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +28 -3
  121. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
  122. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
  123. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +2 -2
  126. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -1
  131. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +2 -2
  134. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
  136. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
  138. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -1
  140. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
  142. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
  144. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
  146. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
  148. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +6 -1
  150. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -1
  152. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
  154. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -1
  158. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  160. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  161. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/types.d.ts +28 -3
  173. package/front_end/third_party/puppeteer/package/package.json +2 -2
  174. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
  175. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
  176. package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
  177. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
  178. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
  179. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
  180. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
  181. package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
  182. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
  183. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  184. package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
  185. package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
  186. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  187. package/front_end/ui/components/adorners/Adorner.ts +2 -1
  188. package/front_end/ui/components/buttons/Button.docs.ts +195 -0
  189. package/front_end/ui/components/settings/SettingCheckbox.ts +49 -14
  190. package/front_end/ui/components/settings/settingCheckbox.css +6 -1
  191. package/front_end/ui/components/spinners/Spinners.docs.ts +13 -0
  192. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +280 -0
  193. package/front_end/ui/components/text_editor/text_editor.ts +1 -0
  194. package/front_end/ui/components/tooltips/Tooltip.docs.ts +76 -0
  195. package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
  196. package/front_end/ui/legacy/Dialog.ts +0 -1
  197. package/front_end/ui/legacy/FilterBar.ts +1 -2
  198. package/front_end/ui/legacy/RadioButton.docs.ts +41 -0
  199. package/front_end/ui/legacy/SelectMenu.docs.ts +98 -0
  200. package/front_end/ui/legacy/Toolbar.ts +4 -6
  201. package/front_end/ui/legacy/UIUtils.ts +114 -1
  202. package/front_end/ui/legacy/Widget.ts +62 -34
  203. package/front_end/ui/legacy/XLink.ts +0 -3
  204. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
  205. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +125 -0
  206. package/front_end/ui/legacy/components/settings_ui/settings_ui.ts +8 -0
  207. package/front_end/ui/legacy/components/utils/Linkifier.ts +9 -3
  208. package/front_end/ui/legacy/legacy.ts +0 -2
  209. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
  210. package/mcp/mcp.ts +5 -0
  211. package/package.json +1 -1
  212. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
  213. package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +0 -62
  214. package/front_end/models/trace/lantern/testing/testing.ts +0 -5
  215. package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
  216. package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
  217. package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
  218. package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
  219. package/front_end/ui/components/docs/button/basic.html +0 -44
  220. package/front_end/ui/components/docs/button/basic.ts +0 -175
  221. package/front_end/ui/components/docs/radio_button/basic.html +0 -23
  222. package/front_end/ui/components/docs/radio_button/basic.ts +0 -50
  223. package/front_end/ui/components/docs/select_menu/basic.html +0 -19
  224. package/front_end/ui/components/docs/select_menu/basic.ts +0 -95
  225. package/front_end/ui/components/docs/select_menu/wide-option.html +0 -38
  226. package/front_end/ui/components/docs/select_menu/wide-option.ts +0 -43
  227. package/front_end/ui/components/docs/spinners/basic.html +0 -17
  228. package/front_end/ui/components/docs/spinners/basic.ts +0 -22
  229. package/front_end/ui/components/docs/tooltip/basic.html +0 -20
  230. package/front_end/ui/components/docs/tooltip/basic.ts +0 -82
  231. package/front_end/ui/legacy/SettingsUI.ts +0 -254
@@ -7971,7 +7971,7 @@ export const NativeFunctions = [
7971
7971
  },
7972
7972
  {
7973
7973
  name: "createContext",
7974
- signatures: [["?options"],["gpuDevice"]]
7974
+ signatures: [["?options"]]
7975
7975
  },
7976
7976
  {
7977
7977
  name: "MLGraphBuilder",
@@ -219,6 +219,8 @@ export interface MetaData {
219
219
  cruxFieldData?: CrUXManager.PageResult[];
220
220
  /** Currently only stores JS maps, not CSS. This never stores data url source maps. */
221
221
  sourceMaps?: MetadataSourceMap[];
222
+ /** Currently only stores HTML and CSS resources. */
223
+ resources?: MetadataResource[];
222
224
  visualTrackConfig?: PersistedTraceVisualConfig;
223
225
  hostDPR?: number;
224
226
  }
@@ -230,6 +232,13 @@ export interface MetadataSourceMap {
230
232
  sourceMap: SDK.SourceMap.SourceMapV3;
231
233
  }
232
234
 
235
+ export interface MetadataResource {
236
+ url: string;
237
+ frame: string;
238
+ content: string;
239
+ mimeType: string;
240
+ }
241
+
233
242
  export type Contents = TraceFile|Event[];
234
243
 
235
244
  export function traceEventKeyToValues(key: SerializableKey): SerializableKeyValues {
@@ -173,7 +173,7 @@ export class SourceMapsResolver extends EventTarget {
173
173
  const resolvedFunctionName =
174
174
  await SourceMapScopes.NamesResolver.resolveProfileFrameFunctionName(node.callFrame, target);
175
175
  updatedMappings ||= Boolean(resolvedFunctionName);
176
- node.setFunctionName(resolvedFunctionName);
176
+ node.setOriginalFunctionName(resolvedFunctionName);
177
177
 
178
178
  const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);
179
179
  const script = debuggerModel?.scriptForId(node.scriptId) || null;
@@ -531,13 +531,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
531
531
  #getChatUiState(): ChatViewState {
532
532
  const blockedByAge = Root.Runtime.hostConfig.aidaAvailability?.blockedByAge === true;
533
533
 
534
- // Special case due to the way its handled downstream quirks
535
- if (this.#aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
536
- return ChatViewState.CHAT_VIEW;
537
- }
538
-
539
- if (!this.#aiAssistanceEnabledSetting?.getIfNotDisabled() || blockedByAge) {
540
- return ChatViewState.CONSENT_VIEW;
534
+ if (this.#aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE ||
535
+ !this.#aiAssistanceEnabledSetting?.getIfNotDisabled() || blockedByAge) {
536
+ return ChatViewState.DISABLED_VIEW;
541
537
  }
542
538
 
543
539
  if (this.#conversation?.type) {
@@ -986,7 +982,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
986
982
 
987
983
  #getChatInputPlaceholder(): Platform.UIString.LocalizedString {
988
984
  const state = this.#getChatUiState();
989
- if (state === ChatViewState.CONSENT_VIEW || !this.#conversation) {
985
+ if (state === ChatViewState.DISABLED_VIEW || !this.#conversation) {
990
986
  return i18nString(UIStrings.followTheSteps);
991
987
  }
992
988
 
@@ -1019,7 +1015,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1019
1015
 
1020
1016
  #getDisclaimerText(): Platform.UIString.LocalizedString {
1021
1017
  const state = this.#getChatUiState();
1022
- if (state === ChatViewState.CONSENT_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
1018
+ if (state === ChatViewState.DISABLED_VIEW || !this.#conversation || this.#conversation.isReadOnly) {
1023
1019
  return i18nString(UIStrings.inputDisclaimerForEmptyState);
1024
1020
  }
1025
1021
 
@@ -204,10 +204,6 @@ const UIStringsNotTranslate = {
204
204
  * @description Title for the add image button.
205
205
  */
206
206
  addImageButtonTitle: 'Add image',
207
- /**
208
- * @description Disclaimer text right after the chat input.
209
- */
210
- inputDisclaimerForEmptyState: 'This is an experimental AI feature and won\'t always get it right.',
211
207
  } as const;
212
208
 
213
209
  const str_ = i18n.i18n.registerUIStrings('panels/ai_assistance/components/ChatView.ts', UIStrings);
@@ -264,7 +260,7 @@ export interface ModelChatMessage {
264
260
  export type ChatMessage = UserChatMessage|ModelChatMessage;
265
261
 
266
262
  export const enum State {
267
- CONSENT_VIEW = 'consent-view',
263
+ DISABLED_VIEW = 'disabled-view',
268
264
  CHAT_VIEW = 'chat-view',
269
265
  EXPLORE_VIEW = 'explore-view'
270
266
  }
@@ -517,6 +513,10 @@ export class ChatView extends HTMLElement {
517
513
 
518
514
  #render(): void {
519
515
  const renderFooter = (): Lit.LitTemplate => {
516
+ if (this.#props.state !== State.CHAT_VIEW) {
517
+ return Lit.nothing;
518
+ }
519
+
520
520
  const classes = Lit.Directives.classMap({
521
521
  'chat-view-footer': true,
522
522
  'has-conversation': !!this.#props.conversationType,
@@ -524,35 +524,58 @@ export class ChatView extends HTMLElement {
524
524
  });
525
525
 
526
526
  // clang-format off
527
- const footerContents = this.#props.conversationType
528
- ? renderRelevantDataDisclaimer({
529
- isLoading: this.#props.isLoading,
530
- blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
531
- tooltipId: RELEVANT_DATA_LINK_FOOTER_ID,
532
- disclaimerText: this.#props.disclaimerText,
533
- })
534
- : html`<p>
535
- ${lockedString(UIStringsNotTranslate.inputDisclaimerForEmptyState)}
536
- <button
537
- class="link"
538
- role="link"
539
- jslog=${VisualLogging.link('open-ai-settings').track({
540
- click: true,
541
- })}
542
- @click=${() => {
543
- void UI.ViewManager.ViewManager.instance().showView(
544
- 'chrome-ai',
545
- );
546
- }}
547
- >${i18nString(UIStrings.learnAbout)}</button>
548
- </p>`;
549
-
550
527
  return html`
551
528
  <footer class=${classes} jslog=${VisualLogging.section('footer')}>
552
- ${footerContents}
529
+ ${renderRelevantDataDisclaimer({
530
+ isLoading: this.#props.isLoading,
531
+ blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
532
+ tooltipId: RELEVANT_DATA_LINK_FOOTER_ID,
533
+ disclaimerText: this.#props.disclaimerText
534
+ })}
553
535
  </footer>
554
536
  `;
537
+ // clang-format on
555
538
  };
539
+
540
+ const renderInputOrReadOnlySection = (): Lit.LitTemplate => {
541
+ if (this.#props.state !== State.CHAT_VIEW) {
542
+ return Lit.nothing;
543
+ }
544
+
545
+ if (this.#props.conversationType && this.#props.isReadOnly) {
546
+ return renderReadOnlySection({
547
+ conversationType: this.#props.conversationType,
548
+ onNewConversation: this.#props.onNewConversation,
549
+ });
550
+ }
551
+
552
+ return renderChatInput({
553
+ isLoading: this.#props.isLoading,
554
+ blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
555
+ isTextInputDisabled: this.#props.isTextInputDisabled,
556
+ inputPlaceholder: this.#props.inputPlaceholder,
557
+ disclaimerText: this.#props.disclaimerText,
558
+ selectedContext: this.#props.selectedContext,
559
+ inspectElementToggled: this.#props.inspectElementToggled,
560
+ multimodalInputEnabled: this.#props.multimodalInputEnabled,
561
+ conversationType: this.#props.conversationType,
562
+ imageInput: this.#props.imageInput,
563
+ aidaAvailability: this.#props.aidaAvailability,
564
+ isTextInputEmpty: this.#props.isTextInputEmpty,
565
+ uploadImageInputEnabled: this.#props.uploadImageInputEnabled,
566
+ onContextClick: this.#props.onContextClick,
567
+ onInspectElementClick: this.#props.onInspectElementClick,
568
+ onSubmit: this.#handleSubmit,
569
+ onTextAreaKeyDown: this.#handleTextAreaKeyDown,
570
+ onCancel: this.#handleCancel,
571
+ onNewConversation: this.#props.onNewConversation,
572
+ onTakeScreenshot: this.#props.onTakeScreenshot,
573
+ onRemoveImageInput: this.#props.onRemoveImageInput,
574
+ onTextInputChange: this.#props.onTextInputChange,
575
+ onImageUpload: this.#handleImageUpload
576
+ });
577
+ };
578
+
556
579
  // clang-format off
557
580
  Lit.render(html`
558
581
  <style>${chatViewStyles}</style>
@@ -577,38 +600,7 @@ export class ChatView extends HTMLElement {
577
600
  onMessageContainerRef: this.#handleMessageContainerRef,
578
601
  onCopyResponseClick: this.#props.onCopyResponseClick,
579
602
  })}
580
- ${this.#props.isReadOnly
581
- ? renderReadOnlySection({
582
- conversationType: this.#props.conversationType,
583
- onNewConversation: this.#props.onNewConversation,
584
- })
585
- : renderChatInput({
586
- isLoading: this.#props.isLoading,
587
- blockedByCrossOrigin: this.#props.blockedByCrossOrigin,
588
- isTextInputDisabled: this.#props.isTextInputDisabled,
589
- inputPlaceholder: this.#props.inputPlaceholder,
590
- state: this.#props.state,
591
- disclaimerText: this.#props.disclaimerText,
592
- selectedContext: this.#props.selectedContext,
593
- inspectElementToggled: this.#props.inspectElementToggled,
594
- multimodalInputEnabled: this.#props.multimodalInputEnabled,
595
- conversationType: this.#props.conversationType,
596
- imageInput: this.#props.imageInput,
597
- isTextInputEmpty: this.#props.isTextInputEmpty,
598
- aidaAvailability: this.#props.aidaAvailability,
599
- uploadImageInputEnabled: this.#props.uploadImageInputEnabled,
600
- onContextClick: this.#props.onContextClick,
601
- onInspectElementClick: this.#props.onInspectElementClick,
602
- onSubmit: this.#handleSubmit,
603
- onTextAreaKeyDown: this.#handleTextAreaKeyDown,
604
- onCancel: this.#handleCancel,
605
- onNewConversation: this.#props.onNewConversation,
606
- onTakeScreenshot: this.#props.onTakeScreenshot,
607
- onRemoveImageInput: this.#props.onRemoveImageInput,
608
- onTextInputChange: this.#props.onTextInputChange,
609
- onImageUpload: this.#handleImageUpload,
610
- })
611
- }
603
+ ${renderInputOrReadOnlySection()}
612
604
  </main>
613
605
  ${renderFooter()}
614
606
  </div>
@@ -1412,7 +1404,6 @@ function renderChatInput({
1412
1404
  blockedByCrossOrigin,
1413
1405
  isTextInputDisabled,
1414
1406
  inputPlaceholder,
1415
- state,
1416
1407
  selectedContext,
1417
1408
  inspectElementToggled,
1418
1409
  multimodalInputEnabled,
@@ -1437,7 +1428,6 @@ function renderChatInput({
1437
1428
  blockedByCrossOrigin: boolean,
1438
1429
  isTextInputDisabled: boolean,
1439
1430
  inputPlaceholder: Platform.UIString.LocalizedString,
1440
- state: State,
1441
1431
  selectedContext: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null,
1442
1432
  inspectElementToggled: boolean,
1443
1433
  isTextInputEmpty: boolean,
@@ -1462,8 +1452,7 @@ function renderChatInput({
1462
1452
  return Lit.nothing;
1463
1453
  }
1464
1454
 
1465
- const shouldShowMultiLine = state !== State.CONSENT_VIEW &&
1466
- aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE && selectedContext;
1455
+ const shouldShowMultiLine = aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE && selectedContext;
1467
1456
  const chatInputContainerCls = Lit.Directives.classMap({
1468
1457
  'chat-input-container': true,
1469
1458
  'single-line-layout': !shouldShowMultiLine,
@@ -1618,11 +1607,10 @@ function renderMainContents({
1618
1607
  conversationType?: AiAssistanceModel.AiHistoryStorage.ConversationType,
1619
1608
  changeSummary?: string,
1620
1609
  }): Lit.LitTemplate {
1621
- if (state === State.CONSENT_VIEW) {
1622
- return renderDisabledState(renderConsentViewContents());
1623
- }
1624
-
1625
- if (aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
1610
+ if (state === State.DISABLED_VIEW) {
1611
+ if (aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
1612
+ return renderDisabledState(renderConsentViewContents());
1613
+ }
1626
1614
  return renderDisabledState(renderAidaUnavailableContents(aidaAvailability));
1627
1615
  }
1628
1616
 
@@ -6,8 +6,6 @@ import * as Host from '../../core/host/host.js';
6
6
  import * as i18n from '../../core/i18n/i18n.js';
7
7
  import type * as Platform from '../../core/platform/platform.js';
8
8
  import * as IconButton from '../../ui/components/icon_button/icon_button.js';
9
- import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
10
- import * as UI from '../../ui/legacy/legacy.js';
11
9
 
12
10
  import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
13
11
  import * as ApplicationComponents from './components/components.js';
@@ -23,8 +21,7 @@ const str_ = i18n.i18n.registerUIStrings('panels/application/BackForwardCacheTre
23
21
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
24
22
 
25
23
  export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
26
- private view?: LegacyWrapper.LegacyWrapper
27
- .LegacyWrapper<UI.Widget.Widget, ApplicationComponents.BackForwardCacheView.BackForwardCacheView>;
24
+ private view?: ApplicationComponents.BackForwardCacheView.BackForwardCacheView;
28
25
 
29
26
  constructor(resourcesPanel: ResourcesPanel) {
30
27
  super(resourcesPanel, i18nString(UIStrings.backForwardCache), false, 'bfcache');
@@ -39,8 +36,7 @@ export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
39
36
  override onselect(selectedByUser?: boolean): boolean {
40
37
  super.onselect(selectedByUser);
41
38
  if (!this.view) {
42
- this.view = LegacyWrapper.LegacyWrapper.legacyWrapper(
43
- UI.Widget.Widget, new ApplicationComponents.BackForwardCacheView.BackForwardCacheView());
39
+ this.view = new ApplicationComponents.BackForwardCacheView.BackForwardCacheView();
44
40
  }
45
41
  this.showView(this.view);
46
42
  Host.userMetrics.panelShown('back-forward-cache');
@@ -12,6 +12,7 @@ import type * as Buttons from '../../ui/components/buttons/buttons.js';
12
12
  import * as IconButton from '../../ui/components/icon_button/icon_button.js';
13
13
  import * as uiI18n from '../../ui/i18n/i18n.js';
14
14
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
15
+ import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
15
16
  import * as UI from '../../ui/legacy/legacy.js';
16
17
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
17
18
 
@@ -207,7 +208,7 @@ export class StorageView extends UI.Widget.VBox {
207
208
  this.clearButton.id = 'storage-view-clear-button';
208
209
  clearButtonSection.appendChild(this.clearButton);
209
210
 
210
- const includeThirdPartyCookiesCheckbox = UI.SettingsUI.createSettingCheckbox(
211
+ const includeThirdPartyCookiesCheckbox = SettingsUI.SettingsUI.createSettingCheckbox(
211
212
  i18nString(UIStrings.includingThirdPartyCookies), this.includeThirdPartyCookiesSetting);
212
213
  includeThirdPartyCookiesCheckbox.classList.add('include-third-party-cookies');
213
214
  clearButtonSection.appendChild(includeThirdPartyCookiesCheckbox);
@@ -280,7 +281,7 @@ export class StorageView extends UI.Widget.VBox {
280
281
  const row = section.appendRow();
281
282
  const setting = this.settings.get(settingName);
282
283
  if (setting) {
283
- row.appendChild(UI.SettingsUI.createSettingCheckbox(title, setting));
284
+ row.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(title, setting));
284
285
  }
285
286
  }
286
287