chrome-devtools-frontend 1.0.1526630 → 1.0.1529186

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 (339) hide show
  1. package/docs/ui_engineering.md +159 -0
  2. package/eslint.config.mjs +6 -1
  3. package/front_end/core/host/UserMetrics.ts +2 -1
  4. package/front_end/core/i18n/i18nImpl.ts +6 -1
  5. package/front_end/core/protocol_client/protocol_client.ts +1 -1
  6. package/front_end/core/root/Runtime.ts +38 -4
  7. package/front_end/core/sdk/CSSMatchedStyles.ts +50 -7
  8. package/front_end/core/sdk/CSSRule.ts +35 -6
  9. package/front_end/core/sdk/Connections.ts +2 -1
  10. package/front_end/core/sdk/DOMModel.ts +4 -0
  11. package/front_end/core/sdk/DebuggerModel.ts +5 -1
  12. package/front_end/core/sdk/NetworkManager.ts +267 -34
  13. package/front_end/core/sdk/PreloadingModel.ts +82 -17
  14. package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1 -1
  15. package/front_end/core/sdk/RehydratingConnection.ts +29 -4
  16. package/front_end/core/sdk/ScopeTreeCache.ts +8 -3
  17. package/front_end/core/sdk/SourceMap.ts +41 -11
  18. package/front_end/core/sdk/SourceMapManager.ts +13 -2
  19. package/front_end/core/sdk/SourceMapScopesInfo.ts +49 -2
  20. package/front_end/core/sdk/TargetManager.ts +0 -22
  21. package/front_end/core/sdk/TraceObject.ts +8 -7
  22. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +81 -0
  23. package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
  24. package/front_end/entrypoints/main/GlobalAiButton.ts +1 -0
  25. package/front_end/entrypoints/main/MainImpl.ts +42 -28
  26. package/front_end/generated/InspectorBackendCommands.js +3 -2
  27. package/front_end/generated/SupportedCSSProperties.js +2 -0
  28. package/front_end/generated/protocol.ts +17 -3
  29. package/front_end/models/ai_assistance/BuiltInAi.ts +111 -0
  30. package/front_end/models/ai_assistance/ConversationHandler.ts +15 -14
  31. package/front_end/models/ai_assistance/ai_assistance.ts +53 -24
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +105 -0
  33. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +6 -1
  34. package/front_end/models/extensions/ExtensionView.ts +3 -0
  35. package/front_end/models/javascript_metadata/NativeFunctions.js +31 -27
  36. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +31 -29
  37. package/front_end/models/persistence/NetworkPersistenceManager.ts +3 -5
  38. package/front_end/models/persistence/PersistenceImpl.ts +0 -5
  39. package/front_end/models/persistence/persistence-meta.ts +0 -31
  40. package/front_end/models/persistence/persistence.ts +0 -6
  41. package/front_end/models/source_map_scopes/NamesResolver.ts +5 -11
  42. package/front_end/models/stack_trace/Trie.ts +9 -0
  43. package/front_end/models/trace/lantern/types/Lantern.ts +1 -1
  44. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -0
  45. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +1 -0
  46. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +120 -113
  47. package/front_end/panels/ai_assistance/PatchWidget.ts +9 -8
  48. package/front_end/panels/ai_assistance/SelectWorkspaceDialog.ts +2 -0
  49. package/front_end/panels/ai_assistance/components/ChatView.ts +29 -29
  50. package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -0
  51. package/front_end/panels/animation/AnimationTimeline.ts +1 -0
  52. package/front_end/panels/application/CookieItemsView.ts +1 -0
  53. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  54. package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -0
  55. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +11 -5
  56. package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +2 -2
  57. package/front_end/panels/application/preloading/components/PreloadingString.ts +7 -5
  58. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +22 -10
  59. package/front_end/panels/changes/CombinedDiffView.ts +1 -0
  60. package/front_end/{models/persistence → panels/common}/PersistenceUtils.ts +15 -17
  61. package/front_end/panels/common/common.ts +1 -0
  62. package/front_end/panels/console/ConsoleInsightTeaser.ts +369 -0
  63. package/front_end/panels/console/ConsolePanel.ts +2 -0
  64. package/front_end/panels/console/ConsolePrompt.ts +12 -2
  65. package/front_end/panels/console/ConsoleSidebar.ts +1 -1
  66. package/front_end/panels/console/ConsoleView.ts +12 -0
  67. package/front_end/panels/console/ConsoleViewMessage.ts +44 -0
  68. package/front_end/panels/{explain → console}/PromptBuilder.ts +12 -7
  69. package/front_end/panels/console/console-meta.ts +14 -0
  70. package/front_end/panels/console/console.ts +6 -0
  71. package/front_end/panels/console/consoleInsightTeaser.css +83 -0
  72. package/front_end/panels/coverage/CoverageListView.ts +29 -11
  73. package/front_end/panels/coverage/CoverageView.ts +292 -284
  74. package/front_end/panels/coverage/coverageView.css +17 -0
  75. package/front_end/panels/elements/ComputedStyleWidget.ts +1 -0
  76. package/front_end/panels/elements/LayoutPane.ts +1 -0
  77. package/front_end/panels/elements/NodeStackTraceWidget.ts +1 -0
  78. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -1
  79. package/front_end/panels/elements/stylePropertiesTreeOutline.css +17 -0
  80. package/front_end/panels/emulation/DeviceModeView.ts +2 -0
  81. package/front_end/panels/explain/ActionDelegate.ts +4 -2
  82. package/front_end/panels/explain/components/ConsoleInsight.ts +14 -12
  83. package/front_end/panels/explain/explain-meta.ts +7 -0
  84. package/front_end/panels/explain/explain.ts +0 -1
  85. package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -1
  86. package/front_end/panels/layer_viewer/Layers3DView.ts +2 -0
  87. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +1 -0
  88. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -0
  89. package/front_end/panels/media/MainView.ts +1 -0
  90. package/front_end/panels/media/TickingFlameChart.ts +2 -0
  91. package/front_end/panels/network/BlockedURLsPane.ts +237 -108
  92. package/front_end/panels/network/EventSourceMessagesView.ts +1 -0
  93. package/front_end/panels/network/NetworkItemView.ts +1 -0
  94. package/front_end/panels/network/NetworkLogView.ts +9 -7
  95. package/front_end/panels/network/NetworkOverview.ts +1 -0
  96. package/front_end/panels/network/RequestCookiesView.ts +1 -0
  97. package/front_end/panels/network/RequestHTMLView.ts +1 -0
  98. package/front_end/panels/network/RequestInitiatorView.ts +1 -0
  99. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  100. package/front_end/panels/network/RequestPreviewView.ts +1 -0
  101. package/front_end/panels/network/RequestResponseView.ts +1 -0
  102. package/front_end/panels/network/RequestTimingView.ts +2 -0
  103. package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -0
  104. package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -0
  105. package/front_end/panels/network/components/RequestHeadersView.ts +2 -0
  106. package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -0
  107. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -0
  108. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +2 -0
  109. package/front_end/panels/profiler/HeapSnapshotView.ts +7 -0
  110. package/front_end/panels/profiler/IsolateSelector.ts +1 -0
  111. package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -0
  112. package/front_end/panels/profiler/ProfileView.ts +1 -0
  113. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
  114. package/front_end/panels/recorder/RecorderPanel.ts +2 -0
  115. package/front_end/panels/screencast/ScreencastView.ts +1 -0
  116. package/front_end/panels/search/SearchView.ts +1 -0
  117. package/front_end/panels/settings/AISettingsTab.ts +3 -3
  118. package/front_end/{models/persistence → panels/settings}/EditFileSystemView.ts +3 -6
  119. package/front_end/panels/settings/WorkspaceSettingsTab.ts +4 -1
  120. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  121. package/front_end/panels/settings/settings.ts +2 -0
  122. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +12 -0
  123. package/front_end/panels/sources/BreakpointsView.ts +1 -0
  124. package/front_end/panels/sources/DebuggerPlugin.ts +1 -0
  125. package/front_end/{models/persistence → panels/sources}/PersistenceActions.ts +8 -12
  126. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -1
  127. package/front_end/panels/sources/UISourceCodeFrame.ts +17 -2
  128. package/front_end/panels/sources/sources-meta.ts +15 -0
  129. package/front_end/panels/sources/sources.ts +2 -0
  130. package/front_end/panels/timeline/README.md +2 -2
  131. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
  132. package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -3
  133. package/front_end/panels/timeline/TimelineLayersView.ts +1 -0
  134. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +114 -37
  135. package/front_end/panels/timeline/TimelinePanel.ts +43 -62
  136. package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
  137. package/front_end/panels/timeline/components/LiveMetricsView.ts +4 -8
  138. package/front_end/panels/timeline/components/Sidebar.ts +2 -0
  139. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
  140. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +7 -7
  141. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
  142. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +4 -4
  143. package/front_end/panels/utils/utils.ts +2 -1
  144. package/front_end/panels/web_audio/WebAudioView.ts +1 -0
  145. package/front_end/third_party/chromium/README.chromium +1 -1
  146. package/front_end/third_party/diff/diff_match_patch.js +1 -1
  147. package/front_end/third_party/lighthouse/README.chromium +2 -2
  148. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1530 -2426
  149. package/front_end/third_party/lighthouse/locales/ar-XB.json +107 -455
  150. package/front_end/third_party/lighthouse/locales/ar.json +107 -455
  151. package/front_end/third_party/lighthouse/locales/bg.json +96 -444
  152. package/front_end/third_party/lighthouse/locales/ca.json +96 -444
  153. package/front_end/third_party/lighthouse/locales/cs.json +96 -444
  154. package/front_end/third_party/lighthouse/locales/da.json +96 -444
  155. package/front_end/third_party/lighthouse/locales/de.json +96 -444
  156. package/front_end/third_party/lighthouse/locales/el.json +96 -444
  157. package/front_end/third_party/lighthouse/locales/en-GB.json +96 -444
  158. package/front_end/third_party/lighthouse/locales/en-US.json +116 -467
  159. package/front_end/third_party/lighthouse/locales/en-XA.json +93 -441
  160. package/front_end/third_party/lighthouse/locales/en-XL.json +116 -467
  161. package/front_end/third_party/lighthouse/locales/es-419.json +96 -444
  162. package/front_end/third_party/lighthouse/locales/es.json +96 -444
  163. package/front_end/third_party/lighthouse/locales/fi.json +96 -444
  164. package/front_end/third_party/lighthouse/locales/fil.json +96 -444
  165. package/front_end/third_party/lighthouse/locales/fr.json +96 -444
  166. package/front_end/third_party/lighthouse/locales/he.json +118 -466
  167. package/front_end/third_party/lighthouse/locales/hi.json +96 -444
  168. package/front_end/third_party/lighthouse/locales/hr.json +100 -448
  169. package/front_end/third_party/lighthouse/locales/hu.json +96 -444
  170. package/front_end/third_party/lighthouse/locales/id.json +96 -444
  171. package/front_end/third_party/lighthouse/locales/it.json +96 -444
  172. package/front_end/third_party/lighthouse/locales/ja.json +96 -444
  173. package/front_end/third_party/lighthouse/locales/ko.json +97 -445
  174. package/front_end/third_party/lighthouse/locales/lt.json +96 -444
  175. package/front_end/third_party/lighthouse/locales/lv.json +97 -445
  176. package/front_end/third_party/lighthouse/locales/nl.json +96 -444
  177. package/front_end/third_party/lighthouse/locales/no.json +96 -444
  178. package/front_end/third_party/lighthouse/locales/pl.json +96 -444
  179. package/front_end/third_party/lighthouse/locales/pt-PT.json +96 -444
  180. package/front_end/third_party/lighthouse/locales/pt.json +97 -445
  181. package/front_end/third_party/lighthouse/locales/ro.json +97 -445
  182. package/front_end/third_party/lighthouse/locales/ru.json +96 -444
  183. package/front_end/third_party/lighthouse/locales/sk.json +96 -444
  184. package/front_end/third_party/lighthouse/locales/sl.json +96 -444
  185. package/front_end/third_party/lighthouse/locales/sr-Latn.json +96 -444
  186. package/front_end/third_party/lighthouse/locales/sr.json +96 -444
  187. package/front_end/third_party/lighthouse/locales/sv.json +96 -444
  188. package/front_end/third_party/lighthouse/locales/ta.json +96 -444
  189. package/front_end/third_party/lighthouse/locales/te.json +97 -445
  190. package/front_end/third_party/lighthouse/locales/th.json +96 -444
  191. package/front_end/third_party/lighthouse/locales/tr.json +96 -444
  192. package/front_end/third_party/lighthouse/locales/uk.json +96 -444
  193. package/front_end/third_party/lighthouse/locales/vi.json +96 -444
  194. package/front_end/third_party/lighthouse/locales/zh-HK.json +96 -444
  195. package/front_end/third_party/lighthouse/locales/zh-TW.json +97 -445
  196. package/front_end/third_party/lighthouse/locales/zh.json +96 -444
  197. package/front_end/third_party/lighthouse/report/bundle.d.ts +8 -14
  198. package/front_end/third_party/lighthouse/report/bundle.js +10 -49
  199. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  200. package/front_end/third_party/web-vitals/README.chromium +5 -8
  201. package/front_end/third_party/web-vitals/package/README.md +191 -152
  202. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.d.ts +0 -1
  203. package/front_end/third_party/web-vitals/package/dist/modules/attribution/index.js +0 -1
  204. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +2 -2
  205. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +45 -26
  206. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.d.ts +2 -2
  207. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +3 -3
  208. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +10 -10
  209. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +307 -206
  210. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.d.ts +2 -2
  211. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +69 -49
  212. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.d.ts +2 -2
  213. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +2 -2
  214. package/front_end/third_party/web-vitals/package/dist/modules/index.d.ts +0 -1
  215. package/front_end/third_party/web-vitals/package/dist/modules/index.js +0 -1
  216. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.d.ts +33 -0
  217. package/front_end/third_party/web-vitals/package/dist/modules/lib/InteractionManager.js +111 -0
  218. package/front_end/third_party/web-vitals/package/dist/modules/lib/LCPEntryManager.d.ts +4 -0
  219. package/front_end/third_party/web-vitals/package/dist/modules/{attribution/deprecated.js → lib/LCPEntryManager.js} +6 -7
  220. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.d.ts +6 -0
  221. package/front_end/third_party/web-vitals/package/dist/modules/lib/LayoutShiftManager.js +44 -0
  222. package/front_end/third_party/web-vitals/package/dist/modules/lib/bindReporter.js +1 -1
  223. package/front_end/third_party/web-vitals/package/dist/modules/lib/generateUniqueID.js +1 -1
  224. package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -1
  225. package/front_end/third_party/web-vitals/package/dist/modules/lib/getNavigationEntry.js +5 -7
  226. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.d.ts +1 -1
  227. package/front_end/third_party/web-vitals/package/dist/modules/lib/getSelector.js +9 -12
  228. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.d.ts +1 -0
  229. package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +52 -33
  230. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +0 -2
  231. package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.js +2 -2
  232. package/front_end/third_party/web-vitals/package/dist/modules/lib/initUnique.d.ts +6 -0
  233. package/front_end/third_party/web-vitals/package/dist/modules/{deprecated.js → lib/initUnique.js} +11 -4
  234. package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +3 -6
  235. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +6 -6
  236. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.d.ts → whenIdleOrHidden.d.ts} +1 -1
  237. package/front_end/third_party/web-vitals/package/dist/modules/lib/{whenIdle.js → whenIdleOrHidden.js} +10 -8
  238. package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +17 -35
  239. package/front_end/third_party/web-vitals/package/dist/modules/onFCP.js +3 -5
  240. package/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +9 -7
  241. package/front_end/third_party/web-vitals/package/dist/modules/onINP.js +27 -19
  242. package/front_end/third_party/web-vitals/package/dist/modules/onLCP.js +33 -26
  243. package/front_end/third_party/web-vitals/package/dist/modules/onTTFB.js +2 -4
  244. package/front_end/third_party/web-vitals/package/dist/modules/types/base.d.ts +6 -5
  245. package/front_end/third_party/web-vitals/package/dist/modules/types/cls.d.ts +5 -3
  246. package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +80 -33
  247. package/front_end/third_party/web-vitals/package/dist/modules/types/lcp.d.ts +6 -2
  248. package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +28 -4
  249. package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
  250. package/front_end/third_party/web-vitals/package/package.json +4 -10
  251. package/front_end/third_party/web-vitals/package/src/attribution/index.ts +0 -1
  252. package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +58 -33
  253. package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +4 -4
  254. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +382 -258
  255. package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +96 -69
  256. package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +3 -3
  257. package/front_end/third_party/web-vitals/package/src/index.ts +0 -1
  258. package/front_end/third_party/web-vitals/package/src/lib/InteractionManager.ts +146 -0
  259. package/front_end/third_party/web-vitals/package/src/{attribution/deprecated.ts → lib/LCPEntryManager.ts} +6 -9
  260. package/front_end/third_party/web-vitals/package/src/lib/LayoutShiftManager.ts +50 -0
  261. package/front_end/third_party/web-vitals/package/src/lib/bindReporter.ts +1 -1
  262. package/front_end/third_party/web-vitals/package/src/lib/generateUniqueID.ts +1 -1
  263. package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -1
  264. package/front_end/third_party/web-vitals/package/src/lib/getNavigationEntry.ts +5 -8
  265. package/front_end/third_party/web-vitals/package/src/lib/getSelector.ts +12 -12
  266. package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +57 -35
  267. package/front_end/third_party/web-vitals/package/src/lib/initMetric.ts +2 -2
  268. package/front_end/third_party/web-vitals/package/src/{deprecated.ts → lib/initUnique.ts} +14 -8
  269. package/front_end/third_party/web-vitals/package/src/lib/observe.ts +3 -11
  270. package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +12 -6
  271. package/front_end/third_party/web-vitals/package/src/lib/{whenIdle.ts → whenIdleOrHidden.ts} +10 -8
  272. package/front_end/third_party/web-vitals/package/src/onCLS.ts +17 -38
  273. package/front_end/third_party/web-vitals/package/src/onFCP.ts +3 -6
  274. package/front_end/third_party/web-vitals/package/src/onINP.ts +33 -28
  275. package/front_end/third_party/web-vitals/package/src/onLCP.ts +36 -29
  276. package/front_end/third_party/web-vitals/package/src/onTTFB.ts +2 -5
  277. package/front_end/third_party/web-vitals/package/src/types/base.ts +5 -5
  278. package/front_end/third_party/web-vitals/package/src/types/cls.ts +5 -3
  279. package/front_end/third_party/web-vitals/package/src/types/inp.ts +88 -33
  280. package/front_end/third_party/web-vitals/package/src/types/lcp.ts +6 -2
  281. package/front_end/third_party/web-vitals/package/src/types.ts +47 -4
  282. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +75 -0
  283. package/front_end/third_party/web-vitals/rebuild.sh +32 -18
  284. package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +5 -10
  285. package/front_end/third_party/web-vitals/web-vitals.ts +0 -2
  286. package/front_end/ui/components/docs/console_insight/basic.ts +3 -2
  287. package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +2 -0
  288. package/front_end/ui/components/text_editor/TextEditor.ts +0 -2
  289. package/front_end/ui/legacy/InspectorView.ts +2 -0
  290. package/front_end/ui/legacy/ListWidget.ts +2 -2
  291. package/front_end/ui/legacy/SplitWidget.ts +2 -0
  292. package/front_end/ui/legacy/TabbedPane.ts +1 -0
  293. package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -0
  294. package/front_end/ui/legacy/UIUtils.ts +8 -19
  295. package/front_end/ui/legacy/ViewManager.ts +1 -0
  296. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +7 -20
  297. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -0
  298. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -0
  299. package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +1 -0
  300. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +1 -0
  301. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -0
  302. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  303. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  304. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  305. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -0
  306. package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +2 -0
  307. package/front_end/ui/visual_logging/KnownContextValues.ts +25 -0
  308. package/mcp/README.md +7 -0
  309. package/mcp/mcp.ts +8 -0
  310. package/package.json +1 -1
  311. package/front_end/models/live-metrics/web-vitals-injected/OnEachInteraction.ts +0 -34
  312. package/front_end/third_party/web-vitals/package/attribution.d.ts +0 -16
  313. package/front_end/third_party/web-vitals/package/attribution.js +0 -18
  314. package/front_end/third_party/web-vitals/package/dist/modules/attribution/deprecated.d.ts +0 -7
  315. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.d.ts +0 -11
  316. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFID.js +0 -46
  317. package/front_end/third_party/web-vitals/package/dist/modules/deprecated.d.ts +0 -5
  318. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.d.ts +0 -31
  319. package/front_end/third_party/web-vitals/package/dist/modules/lib/interactions.js +0 -107
  320. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.d.ts +0 -1
  321. package/front_end/third_party/web-vitals/package/dist/modules/lib/onHidden.js +0 -22
  322. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.d.ts +0 -7
  323. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/firstInputPolyfill.js +0 -147
  324. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.d.ts +0 -1
  325. package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/getFirstHiddenTimePolyfill.js +0 -25
  326. package/front_end/third_party/web-vitals/package/dist/modules/onFID.d.ts +0 -13
  327. package/front_end/third_party/web-vitals/package/dist/modules/onFID.js +0 -70
  328. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.d.ts +0 -46
  329. package/front_end/third_party/web-vitals/package/dist/modules/types/fid.js +0 -16
  330. package/front_end/third_party/web-vitals/package/src/attribution/onFID.ts +0 -62
  331. package/front_end/third_party/web-vitals/package/src/lib/interactions.ts +0 -139
  332. package/front_end/third_party/web-vitals/package/src/lib/onHidden.ts +0 -23
  333. package/front_end/third_party/web-vitals/package/src/lib/polyfills/firstInputPolyfill.ts +0 -174
  334. package/front_end/third_party/web-vitals/package/src/onFID.ts +0 -105
  335. package/front_end/third_party/web-vitals/package/src/types/fid.ts +0 -65
  336. package/front_end/ui/components/text_editor/textEditor.css +0 -18
  337. package/front_end/ui/legacy/inlineButton.css +0 -22
  338. /package/front_end/entrypoints/{rehydrated_devtools_app/rehydrated_devtools_app.ts → trace_app/trace_app.ts} +0 -0
  339. /package/front_end/{models/persistence → panels/settings}/editFileSystemView.css +0 -0
@@ -112,11 +112,13 @@ export class RequestTrustTokensView extends LegacyWrapper.LegacyWrapper.Wrappabl
112
112
  }
113
113
 
114
114
  override wasShown(): void {
115
+ super.wasShown();
115
116
  this.#request.addEventListener(SDK.NetworkRequest.Events.TRUST_TOKEN_RESULT_ADDED, this.render, this);
116
117
  void this.render();
117
118
  }
118
119
 
119
120
  override willHide(): void {
121
+ super.willHide();
120
122
  this.#request.removeEventListener(SDK.NetworkRequest.Events.TRUST_TOKEN_RESULT_ADDED, this.render, this);
121
123
  }
122
124
 
@@ -157,6 +157,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
157
157
  }
158
158
 
159
159
  override wasShown(): void {
160
+ super.wasShown();
160
161
  if (!this.model) {
161
162
  return;
162
163
  }
@@ -176,6 +177,7 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox implements
176
177
  }
177
178
 
178
179
  override willHide(): void {
180
+ super.willHide();
179
181
  if (!this.model) {
180
182
  return;
181
183
  }
@@ -212,6 +212,7 @@ export class HeapSnapshotSortableDataGrid extends Common.ObjectWrapper
212
212
  }
213
213
 
214
214
  override wasShown(): void {
215
+ super.wasShown();
215
216
  if (this.nameFilter) {
216
217
  this.nameFilter.addEventListener(UI.Toolbar.ToolbarInput.Event.TEXT_CHANGED, this.onNameFilterChanged, this);
217
218
  this.updateVisibleNodes(true);
@@ -228,6 +229,7 @@ export class HeapSnapshotSortableDataGrid extends Common.ObjectWrapper
228
229
  }
229
230
 
230
231
  override willHide(): void {
232
+ super.willHide();
231
233
  if (this.nameFilter) {
232
234
  this.nameFilter.removeEventListener(UI.Toolbar.ToolbarInput.Event.TEXT_CHANGED, this.onNameFilterChanged, this);
233
235
  }
@@ -143,6 +143,11 @@ const UIStrings = {
143
143
  * objects kept alive by the DevTools console
144
144
  */
145
145
  objectsRetainedByConsole: 'Objects retained by DevTools Console',
146
+ /**
147
+ * @description An option which will filter the heap snapshot to show only
148
+ * objects retained by event handlers
149
+ */
150
+ objectsRetainedByEventHandlers: 'Objects retained by Event Handlers',
146
151
  /**
147
152
  * @description Text for the summary view
148
153
  */
@@ -624,6 +629,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
624
629
  }
625
630
 
626
631
  override willHide(): void {
632
+ super.willHide();
627
633
  this.currentSearchResultIndex = -1;
628
634
  this.popoverHelper.hidePopover();
629
635
  }
@@ -771,6 +777,7 @@ export class HeapSnapshotView extends UI.View.SimpleView implements DataDisplayD
771
777
  {uiName: i18nString(UIStrings.duplicatedStrings), filterName: 'duplicatedStrings'},
772
778
  {uiName: i18nString(UIStrings.objectsRetainedByDetachedDomNodes), filterName: 'objectsRetainedByDetachedDomNodes'},
773
779
  {uiName: i18nString(UIStrings.objectsRetainedByConsole), filterName: 'objectsRetainedByConsole'},
780
+ {uiName: i18nString(UIStrings.objectsRetainedByEventHandlers), filterName: 'objectsRetainedByEventHandlers'},
774
781
  ];
775
782
 
776
783
  changeFilter(): void {
@@ -102,6 +102,7 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
102
102
  }
103
103
 
104
104
  override willHide(): void {
105
+ super.willHide();
105
106
  SDK.IsolateManager.IsolateManager.instance().removeEventListener(
106
107
  SDK.IsolateManager.Events.MEMORY_CHANGED, this.heapStatsChanged, this);
107
108
  }
@@ -178,6 +178,7 @@ export class LiveHeapProfileView extends UI.Widget.VBox {
178
178
  }
179
179
 
180
180
  override willHide(): void {
181
+ super.willHide();
181
182
  ++this.currentPollId;
182
183
  this.setting.removeChangeListener(this.settingChanged, this);
183
184
  }
@@ -325,6 +325,7 @@ export class ProfileView extends UI.View.SimpleView implements UI.SearchableView
325
325
  }
326
326
 
327
327
  override willHide(): void {
328
+ super.willHide();
328
329
  this.currentSearchResultIndex = -1;
329
330
  }
330
331
 
@@ -530,6 +530,7 @@ export class ProtocolMonitorImpl extends UI.Panel.Panel {
530
530
  }
531
531
 
532
532
  override wasShown(): void {
533
+ super.wasShown();
533
534
  if (this.started) {
534
535
  return;
535
536
  }
@@ -36,12 +36,14 @@ export class RecorderPanel extends UI.Panel.Panel {
36
36
  }
37
37
 
38
38
  override wasShown(): void {
39
+ super.wasShown();
39
40
  UI.Context.Context.instance().setFlavor(RecorderPanel, this);
40
41
  // Focus controller so shortcuts become active
41
42
  this.#controller.focus();
42
43
  }
43
44
 
44
45
  override willHide(): void {
46
+ super.willHide();
45
47
  UI.Context.Context.instance().setFlavor(RecorderPanel, null);
46
48
  }
47
49
 
@@ -175,6 +175,7 @@ export class ScreencastView extends UI.Widget.VBox implements SDK.OverlayModel.H
175
175
  }
176
176
 
177
177
  override willHide(): void {
178
+ super.willHide();
178
179
  this.stopCasting();
179
180
  }
180
181
 
@@ -542,6 +542,7 @@ export class SearchView extends UI.Widget.VBox {
542
542
  }
543
543
 
544
544
  override willHide(): void {
545
+ super.willHide();
545
546
  this.#stopSearch();
546
547
  }
547
548
 
@@ -474,7 +474,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
474
474
  }
475
475
  } else if (setting.name === 'ai-assistance-enabled' && !setting.get()) {
476
476
  // If the "AI Assistance" is toggled off, we remove all the history entries related to the feature.
477
- void AiAssistanceModel.AiHistoryStorage.instance().deleteAll();
477
+ void AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().deleteAll();
478
478
  }
479
479
  void this.render();
480
480
  }
@@ -551,7 +551,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
551
551
  if (!settingData) {
552
552
  return Lit.nothing;
553
553
  }
554
- const disabledReasons = AiAssistanceModel.getDisabledReasons(this.#aidaAvailability);
554
+ const disabledReasons = AiAssistanceModel.AiUtils.getDisabledReasons(this.#aidaAvailability);
555
555
  const isDisabled = disabledReasons.length > 0;
556
556
  const disabledReasonsJoined = disabledReasons.join('\n') || undefined;
557
557
  const detailsClasses = {
@@ -639,7 +639,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
639
639
  }
640
640
 
641
641
  override async render(): Promise<void> {
642
- const disabledReasons = AiAssistanceModel.getDisabledReasons(this.#aidaAvailability);
642
+ const disabledReasons = AiAssistanceModel.AiUtils.getDisabledReasons(this.#aidaAvailability);
643
643
 
644
644
  // Disabled until https://crbug.com/1079231 is fixed.
645
645
  // clang-format off
@@ -6,15 +6,11 @@ import '../../ui/legacy/components/data_grid/data_grid.js';
6
6
 
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Platform from '../../core/platform/platform.js';
9
- // TODO(crbug.com/442509324): remove UI dependency
10
- // eslint-disable-next-line rulesdir/no-imports-in-directory
9
+ import type {PlatformFileSystem} from '../../models/persistence/PlatformFileSystem.js';
11
10
  import * as UI from '../../ui/legacy/legacy.js';
12
- // TODO(crbug.com/442509324): remove UI dependency
13
- // eslint-disable-next-line rulesdir/no-imports-in-directory
14
11
  import {Directives, html, render} from '../../ui/lit/lit.js';
15
12
 
16
13
  import editFileSystemViewStyles from './editFileSystemView.css.js';
17
- import type {PlatformFileSystem} from './PlatformFileSystem.js';
18
14
 
19
15
  const {styleMap} = Directives;
20
16
 
@@ -36,7 +32,7 @@ const UIStrings = {
36
32
  */
37
33
  enterAUniquePath: 'Enter a unique path',
38
34
  } as const;
39
- const str_ = i18n.i18n.registerUIStrings('models/persistence/EditFileSystemView.ts', UIStrings);
35
+ const str_ = i18n.i18n.registerUIStrings('panels/settings/EditFileSystemView.ts', UIStrings);
40
36
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
41
37
 
42
38
  export const enum ExcludedFolderStatus {
@@ -125,6 +121,7 @@ export class EditFileSystemView extends UI.Widget.VBox {
125
121
  }
126
122
 
127
123
  override wasShown(): void {
124
+ super.wasShown();
128
125
  this.#resyncExcludedFolderPaths();
129
126
  this.requestUpdate();
130
127
  }
@@ -14,6 +14,7 @@ import * as UI from '../../ui/legacy/legacy.js';
14
14
  import {html, render} from '../../ui/lit/lit.js';
15
15
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
16
16
 
17
+ import {EditFileSystemView} from './EditFileSystemView.js';
17
18
  import workspaceSettingsTabStyles from './workspaceSettingsTab.css.js';
18
19
 
19
20
  const UIStrings = {
@@ -71,7 +72,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
71
72
  <div class="mapping-view-container">
72
73
  <devtools-widget .widgetConfig=${
73
74
  UI.Widget.widgetConfig(
74
- Persistence.EditFileSystemView.EditFileSystemView,
75
+ EditFileSystemView,
75
76
  {fileSystem: fileSystem.fileSystem})}>
76
77
  </devtools-widget>
77
78
  </div>
@@ -106,6 +107,7 @@ export class WorkspaceSettingsTab extends UI.Widget.VBox {
106
107
  }
107
108
 
108
109
  override wasShown(): void {
110
+ super.wasShown();
109
111
  this.#eventListeners = [
110
112
  Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addEventListener(
111
113
  Persistence.IsolatedFileSystemManager.Events.FileSystemAdded, this.requestUpdate.bind(this)),
@@ -117,6 +119,7 @@ export class WorkspaceSettingsTab extends UI.Widget.VBox {
117
119
  }
118
120
 
119
121
  override willHide(): void {
122
+ super.willHide();
120
123
  Common.EventTarget.removeEventListeners(this.#eventListeners);
121
124
  this.#eventListeners = [];
122
125
  }
@@ -868,14 +868,14 @@ export class UserAgentClientHintsForm extends HTMLElement {
868
868
  <devtools-icon name=triangle-down></devtools-icon>
869
869
  ${i18nString(UIStrings.title)}
870
870
  </div>
871
- <devtools-icon class=info-icon name=info title=${i18nString(UIStrings.userAgentClientHintsInfo)}></devtools-icon>
871
+ <devtools-icon tabindex=${this.#isFormDisabled ? '-1' : '0'} class=info-icon name=info aria-label=${i18nString(UIStrings.userAgentClientHintsInfo)} title=${i18nString(UIStrings.userAgentClientHintsInfo)}></devtools-icon>
872
872
  <x-link
873
873
  tabindex=${this.#isFormDisabled ? '-1' : '0'}
874
874
  href="https://web.dev/user-agent-client-hints/"
875
875
  target="_blank"
876
876
  class="link"
877
877
  @keypress=${this.#handleLinkPress}
878
- aria-label=${i18nString(UIStrings.userAgentClientHintsInfo)}
878
+ aria-label=${i18nString(UIStrings.learnMore)}
879
879
  jslog=${VisualLogging.link('learn-more').track({click: true})}
880
880
  >
881
881
  ${i18nString(UIStrings.learnMore)}
@@ -5,6 +5,7 @@
5
5
  import './SettingsScreen.js';
6
6
 
7
7
  import * as AISettingsTab from './AISettingsTab.js';
8
+ import * as EditFileSystemView from './EditFileSystemView.js';
8
9
  import * as FrameworkIgnoreListSettingsTab from './FrameworkIgnoreListSettingsTab.js';
9
10
  import * as KeybindsSettingsTab from './KeybindsSettingsTab.js';
10
11
  import * as SettingsScreen from './SettingsScreen.js';
@@ -12,6 +13,7 @@ import * as WorkspaceSettingsTab from './WorkspaceSettingsTab.js';
12
13
 
13
14
  export {
14
15
  AISettingsTab,
16
+ EditFileSystemView,
15
17
  FrameworkIgnoreListSettingsTab,
16
18
  KeybindsSettingsTab,
17
19
  SettingsScreen,
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import * as Host from '../../core/host/host.js';
7
+ import * as i18n from '../../core/i18n/i18n.js';
7
8
  import * as Root from '../../core/root/root.js';
8
9
  import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
9
10
  import type * as Workspace from '../../models/workspace/workspace.js';
@@ -334,6 +335,17 @@ export class AiCodeCompletionPlugin extends Plugin {
334
335
  }
335
336
 
336
337
  #isAiCodeCompletionEnabled(): boolean {
338
+ const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
339
+ const aidaAvailability = Root.Runtime.hostConfig.aidaAvailability;
340
+ if (!devtoolsLocale.locale.startsWith('en-')) {
341
+ return false;
342
+ }
343
+ if (aidaAvailability?.blockedByGeo) {
344
+ return false;
345
+ }
346
+ if (aidaAvailability?.blockedByAge) {
347
+ return false;
348
+ }
337
349
  return Boolean(Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled);
338
350
  }
339
351
 
@@ -720,6 +720,7 @@ export class BreakpointsView extends UI.Widget.VBox {
720
720
  }
721
721
 
722
722
  override wasShown(): void {
723
+ super.wasShown();
723
724
  this.requestUpdate();
724
725
  }
725
726
 
@@ -449,6 +449,7 @@ export class DebuggerPlugin extends Plugin {
449
449
  }
450
450
 
451
451
  override willHide(): void {
452
+ super.willHide();
452
453
  this.popoverHelper?.hidePopover();
453
454
  }
454
455
 
@@ -7,15 +7,11 @@ import * as Host from '../../core/host/host.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import type * as Platform from '../../core/platform/platform.js';
9
9
  import * as SDK from '../../core/sdk/sdk.js';
10
- // TODO(crbug.com/442509324): remove UI dependency
11
- // eslint-disable-next-line rulesdir/no-imports-in-directory
10
+ import * as Bindings from '../../models/bindings/bindings.js';
11
+ import * as Persistence from '../../models/persistence/persistence.js';
12
+ import * as TextUtils from '../../models/text_utils/text_utils.js';
13
+ import * as Workspace from '../../models/workspace/workspace.js';
12
14
  import * as UI from '../../ui/legacy/legacy.js';
13
- import * as Bindings from '../bindings/bindings.js';
14
- import * as TextUtils from '../text_utils/text_utils.js';
15
- import * as Workspace from '../workspace/workspace.js';
16
-
17
- import {NetworkPersistenceManager} from './NetworkPersistenceManager.js';
18
- import {PersistenceImpl} from './PersistenceImpl.js';
19
15
 
20
16
  const UIStrings = {
21
17
  /**
@@ -59,7 +55,7 @@ const UIStrings = {
59
55
  */
60
56
  saveWasmFailed: 'Unable to save WASM module to disk. Most likely the module is too large.',
61
57
  } as const;
62
- const str_ = i18n.i18n.registerUIStrings('models/persistence/PersistenceActions.ts', UIStrings);
58
+ const str_ = i18n.i18n.registerUIStrings('panels/sources/PersistenceActions.ts', UIStrings);
63
59
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
64
60
 
65
61
  export class ContextMenuProvider implements
@@ -116,9 +112,9 @@ export class ContextMenuProvider implements
116
112
 
117
113
  // Retrieve uiSourceCode by URL to pick network resources everywhere.
118
114
  const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(contentProvider.contentURL());
119
- const networkPersistenceManager = NetworkPersistenceManager.instance();
115
+ const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
120
116
 
121
- const binding = uiSourceCode && PersistenceImpl.instance().binding(uiSourceCode);
117
+ const binding = uiSourceCode && Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
122
118
  const fileURL = binding ? binding.fileSystem.contentURL() : contentProvider.contentURL();
123
119
 
124
120
  if (Common.ParsedURL.schemeIs(fileURL, 'file:')) {
@@ -164,7 +160,7 @@ export class ContextMenuProvider implements
164
160
  private async handleOverrideContent(
165
161
  uiSourceCode: Workspace.UISourceCode.UISourceCode,
166
162
  contentProvider: TextUtils.ContentProvider.ContentProvider): Promise<void> {
167
- const networkPersistenceManager = NetworkPersistenceManager.instance();
163
+ const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
168
164
  const isSuccess = await networkPersistenceManager.setupAndStartLocalOverrides(uiSourceCode);
169
165
  if (isSuccess) {
170
166
  await Common.Revealer.reveal(uiSourceCode);
@@ -16,6 +16,7 @@ import * as Tooltips from '../../ui/components/tooltips/tooltips.js';
16
16
  import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
17
17
  import * as UI from '../../ui/legacy/legacy.js';
18
18
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
19
+ import * as PanelCommon from '../common/common.js';
19
20
  import * as Snippets from '../snippets/snippets.js';
20
21
 
21
22
  import {SourcesView} from './SourcesView.js';
@@ -644,7 +645,7 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper<Ev
644
645
  /* eslint-enable rulesdir/no-imperative-dom-api */
645
646
  this.tabbedPane.setSuffixElement(tabId, suffixElement);
646
647
  } else {
647
- const icon = Persistence.PersistenceUtils.PersistenceUtils.iconForUISourceCode(uiSourceCode);
648
+ const icon = PanelCommon.PersistenceUtils.PersistenceUtils.iconForUISourceCode(uiSourceCode);
648
649
  this.tabbedPane.setTrailingTabIcon(tabId, icon);
649
650
  }
650
651
  }
@@ -6,6 +6,7 @@
6
6
 
7
7
  import * as Common from '../../core/common/common.js';
8
8
  import * as Host from '../../core/host/host.js';
9
+ import * as i18n from '../../core/i18n/i18n.js';
9
10
  import * as Root from '../../core/root/root.js';
10
11
  import * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js'; // eslint-disable-line rulesdir/es-modules-import
11
12
  import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
@@ -320,8 +321,7 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
320
321
  AiWarningInfobarPlugin,
321
322
  ];
322
323
 
323
- if (Root.Runtime.hostConfig.aidaAvailability?.enabled &&
324
- Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled) {
324
+ if (this.#isAiCodeCompletionEnabled()) {
325
325
  sourceFramePluginsList.push(AiCodeCompletionPlugin);
326
326
  }
327
327
  return sourceFramePluginsList;
@@ -511,6 +511,21 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
511
511
  this.#uiSourceCode.url().startsWith('debugger://'));
512
512
  Host.userMetrics.sourcesPanelFileOpened(mediaType);
513
513
  }
514
+
515
+ static #isAiCodeCompletionEnabled(): boolean {
516
+ const devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance();
517
+ const aidaAvailability = Root.Runtime.hostConfig.aidaAvailability;
518
+ if (!devtoolsLocale.locale.startsWith('en-')) {
519
+ return false;
520
+ }
521
+ if (aidaAvailability?.blockedByGeo) {
522
+ return false;
523
+ }
524
+ if (aidaAvailability?.blockedByAge) {
525
+ return false;
526
+ }
527
+ return Boolean(aidaAvailability?.enabled && Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled);
528
+ }
514
529
  }
515
530
 
516
531
  function getIconDataForLevel(level: Workspace.UISourceCode.Message.Level): IconButton.Icon.IconWithName {
@@ -2092,3 +2092,18 @@ QuickOpen.FilteredListWidget.registerProvider({
2092
2092
  titlePrefix: i18nLazyString(UIStrings.open),
2093
2093
  titleSuggestion: i18nLazyString(UIStrings.file),
2094
2094
  });
2095
+
2096
+ UI.ContextMenu.registerProvider({
2097
+ contextTypes() {
2098
+ return [
2099
+ Workspace.UISourceCode.UISourceCode,
2100
+ SDK.Resource.Resource,
2101
+ SDK.NetworkRequest.NetworkRequest,
2102
+ ];
2103
+ },
2104
+ async loadProvider() {
2105
+ const Sources = await loadSourcesModule();
2106
+ return new Sources.PersistenceActions.ContextMenuProvider();
2107
+ },
2108
+ experiment: undefined,
2109
+ });
@@ -22,6 +22,7 @@ import * as InplaceFormatterEditorAction from './InplaceFormatterEditorAction.js
22
22
  import * as NavigatorView from './NavigatorView.js';
23
23
  import * as OpenFileQuickOpen from './OpenFileQuickOpen.js';
24
24
  import * as OutlineQuickOpen from './OutlineQuickOpen.js';
25
+ import * as PersistenceActions from './PersistenceActions.js';
25
26
  import * as Plugin from './Plugin.js';
26
27
  import * as ResourceOriginPlugin from './ResourceOriginPlugin.js';
27
28
  import * as ScopeChainSidebarPane from './ScopeChainSidebarPane.js';
@@ -57,6 +58,7 @@ export {
57
58
  NavigatorView,
58
59
  OpenFileQuickOpen,
59
60
  OutlineQuickOpen,
61
+ PersistenceActions,
60
62
  Plugin,
61
63
  ResourceOriginPlugin,
62
64
  ScopeChainSidebarPane,
@@ -28,8 +28,8 @@ This option loads the DevTools frontend in a browser tab in Chrome, but requires
28
28
 
29
29
  1. Head to `devtools-frontend/test/unittests/fixtures/traces` and run `npx statikk --cors`. [This is a tool built by @paulirish to serve local files on a server](https://github.com/paulirish/statikk).
30
30
  2. Build and run the Chrome for Testing binary from devtools-frontend.
31
- 3. Visit `devtools://devtools/bundled/devtools_app.html` and let it load (you only need to do this the first time you load up the Chrome for Testing binary).
32
- 4. Update the URL by appending `?loadTimelineFromURL=http://localhost:1234/name-of-trace-file.json`. **Swap the port to the one `statikk` is using on your machine**.
31
+ 3. Visit `devtools://devtools/bundled/trace_app.html` and let it load (you only need to do this the first time you load up the Chrome for Testing binary).
32
+ 4. Update the URL by appending `?traceURL=http://localhost:1234/name-of-trace-file.json`. **Swap the port to the one `statikk` is using on your machine**.
33
33
  5. When you make changes and rebuild DevTools, simply refresh the URL! **Make sure you disable network caching in your DevTools on DevTools instance.**
34
34
 
35
35
  Each one has its pros and cons, but typically **this option is preferred** for quick iteration because you don't have to manually record or import a trace every time you reload.
@@ -252,7 +252,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
252
252
 
253
253
  const contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent);
254
254
  if (perfAIEntryPointEnabled && this.parsedTrace) {
255
- const callTree = AIAssistance.AICallTree.fromEvent(entry, this.parsedTrace);
255
+ const callTree = AIAssistance.AICallTree.AICallTree.fromEvent(entry, this.parsedTrace);
256
256
  if (callTree) {
257
257
  const action = UI.ActionRegistry.ActionRegistry.instance().getAction(PERF_AI_ACTION_ID);
258
258
 
@@ -1408,6 +1408,7 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
1408
1408
  }
1409
1409
 
1410
1410
  override willHide(): void {
1411
+ super.willHide();
1411
1412
  this.#networkPersistedGroupConfigSetting.removeChangeListener(this.resizeToPreferredHeights, this);
1412
1413
  Workspace.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.#boundRefreshAfterIgnoreList);
1413
1414
  }
@@ -1535,16 +1536,16 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
1535
1536
 
1536
1537
  const event = selectionIsEvent(selection) ? selection.event : null;
1537
1538
 
1538
- let focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
1539
+ let focus = UI.Context.Context.instance().flavor(AIAssistance.AIContext.AgentFocus);
1539
1540
  if (focus) {
1540
1541
  focus = focus.withEvent(event);
1541
1542
  } else if (event) {
1542
- focus = AIAssistance.AgentFocus.fromEvent(this.#parsedTrace, event);
1543
+ focus = AIAssistance.AIContext.AgentFocus.fromEvent(this.#parsedTrace, event);
1543
1544
  } else {
1544
1545
  focus = null;
1545
1546
  }
1546
1547
 
1547
- UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, focus);
1548
+ UI.Context.Context.instance().setFlavor(AIAssistance.AIContext.AgentFocus, focus);
1548
1549
  });
1549
1550
  }
1550
1551
 
@@ -55,6 +55,7 @@ export class TimelineLayersView extends UI.SplitWidget.SplitWidget {
55
55
  }
56
56
 
57
57
  override wasShown(): void {
58
+ super.wasShown();
58
59
  if (this.updateWhenVisible) {
59
60
  this.updateWhenVisible = false;
60
61
  this.update();