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
@@ -222,8 +222,9 @@ function selectedElementFilter(maybeNode: SDK.DOMModel.DOMNode|null): SDK.DOMMod
222
222
  }
223
223
 
224
224
  async function getEmptyStateSuggestions(
225
- context: AiAssistanceModel.ConversationContext<unknown>|null,
226
- conversation?: AiAssistanceModel.Conversation): Promise<AiAssistanceModel.ConversationSuggestion[]> {
225
+ context: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null,
226
+ conversation?: AiAssistanceModel.AiHistoryStorage.Conversation):
227
+ Promise<AiAssistanceModel.AiAgent.ConversationSuggestion[]> {
227
228
  if (context) {
228
229
  const specialSuggestions = await context.getSuggestions();
229
230
 
@@ -237,25 +238,25 @@ async function getEmptyStateSuggestions(
237
238
  }
238
239
 
239
240
  switch (conversation.type) {
240
- case AiAssistanceModel.ConversationType.STYLING:
241
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING:
241
242
  return [
242
243
  {title: 'What can you help me with?', jslogContext: 'styling-default'},
243
244
  {title: 'Why isn’t this element visible?', jslogContext: 'styling-default'},
244
245
  {title: 'How do I center this element?', jslogContext: 'styling-default'},
245
246
  ];
246
- case AiAssistanceModel.ConversationType.FILE:
247
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.FILE:
247
248
  return [
248
249
  {title: 'What does this script do?', jslogContext: 'file-default'},
249
250
  {title: 'Is the script optimized for performance?', jslogContext: 'file-default'},
250
251
  {title: 'Does the script handle user input safely?', jslogContext: 'file-default'},
251
252
  ];
252
- case AiAssistanceModel.ConversationType.NETWORK:
253
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK:
253
254
  return [
254
255
  {title: 'Why is this network request taking so long?', jslogContext: 'network-default'},
255
256
  {title: 'Are there any security headers present?', jslogContext: 'network-default'},
256
257
  {title: 'Why is the request failing?', jslogContext: 'network-default'},
257
258
  ];
258
- case AiAssistanceModel.ConversationType.PERFORMANCE: {
259
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE: {
259
260
  return [
260
261
  {title: 'What performance issues exist with my page?', jslogContext: 'performance-default'},
261
262
  ];
@@ -267,15 +268,15 @@ async function getEmptyStateSuggestions(
267
268
  }
268
269
 
269
270
  function getMarkdownRenderer(
270
- context: AiAssistanceModel.ConversationContext<unknown>|null,
271
- conversation?: AiAssistanceModel.Conversation): MarkdownRendererWithCodeBlock {
272
- if (context instanceof AiAssistanceModel.PerformanceTraceContext) {
271
+ context: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null,
272
+ conversation?: AiAssistanceModel.AiHistoryStorage.Conversation): MarkdownRendererWithCodeBlock {
273
+ if (context instanceof AiAssistanceModel.PerformanceAgent.PerformanceTraceContext) {
273
274
  if (!context.external) {
274
275
  const focus = context.getItem();
275
276
  return new PerformanceAgentMarkdownRenderer(
276
277
  focus.parsedTrace.data.Meta.mainFrameId, focus.lookupEvent.bind(focus));
277
278
  }
278
- } else if (conversation?.type === AiAssistanceModel.ConversationType.PERFORMANCE) {
279
+ } else if (conversation?.type === AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE) {
279
280
  // Handle historical conversations (can't linkify anything).
280
281
  return new PerformanceAgentMarkdownRenderer();
281
282
  }
@@ -400,49 +401,52 @@ function defaultView(input: ViewInput, output: PanelViewOutput, target: HTMLElem
400
401
  // clang-format on
401
402
  }
402
403
 
403
- function createNodeContext(node: SDK.DOMModel.DOMNode|null): AiAssistanceModel.NodeContext|null {
404
+ function createNodeContext(node: SDK.DOMModel.DOMNode|null): AiAssistanceModel.StylingAgent.NodeContext|null {
404
405
  if (!node) {
405
406
  return null;
406
407
  }
407
- return new AiAssistanceModel.NodeContext(node);
408
+ return new AiAssistanceModel.StylingAgent.NodeContext(node);
408
409
  }
409
410
 
410
- function createFileContext(file: Workspace.UISourceCode.UISourceCode|null): AiAssistanceModel.FileContext|null {
411
+ function createFileContext(file: Workspace.UISourceCode.UISourceCode|null): AiAssistanceModel.FileAgent.FileContext|
412
+ null {
411
413
  if (!file) {
412
414
  return null;
413
415
  }
414
- return new AiAssistanceModel.FileContext(file);
416
+ return new AiAssistanceModel.FileAgent.FileContext(file);
415
417
  }
416
418
 
417
- function createRequestContext(request: SDK.NetworkRequest.NetworkRequest|null): AiAssistanceModel.RequestContext|null {
419
+ function createRequestContext(request: SDK.NetworkRequest.NetworkRequest|null):
420
+ AiAssistanceModel.NetworkAgent.RequestContext|null {
418
421
  if (!request) {
419
422
  return null;
420
423
  }
421
424
  const calculator = NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator();
422
- return new AiAssistanceModel.RequestContext(request, calculator);
425
+ return new AiAssistanceModel.NetworkAgent.RequestContext(request, calculator);
423
426
  }
424
427
 
425
- function createPerformanceTraceContext(focus: AiAssistanceModel.AgentFocus|null):
426
- AiAssistanceModel.PerformanceTraceContext|null {
428
+ function createPerformanceTraceContext(focus: AiAssistanceModel.AIContext.AgentFocus|null):
429
+ AiAssistanceModel.PerformanceAgent.PerformanceTraceContext|null {
427
430
  if (!focus) {
428
431
  return null;
429
432
  }
430
- return new AiAssistanceModel.PerformanceTraceContext(focus);
433
+ return new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(focus);
431
434
  }
432
435
 
433
- function agentToConversationType(agent: AiAssistanceModel.AiAgent<unknown>): AiAssistanceModel.ConversationType {
434
- if (agent instanceof AiAssistanceModel.StylingAgent) {
435
- return AiAssistanceModel.ConversationType.STYLING;
436
+ function agentToConversationType(agent: AiAssistanceModel.AiAgent.AiAgent<unknown>):
437
+ AiAssistanceModel.AiHistoryStorage.ConversationType {
438
+ if (agent instanceof AiAssistanceModel.StylingAgent.StylingAgent) {
439
+ return AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING;
436
440
  }
437
441
 
438
- if (agent instanceof AiAssistanceModel.NetworkAgent) {
439
- return AiAssistanceModel.ConversationType.NETWORK;
442
+ if (agent instanceof AiAssistanceModel.NetworkAgent.NetworkAgent) {
443
+ return AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK;
440
444
  }
441
- if (agent instanceof AiAssistanceModel.FileAgent) {
442
- return AiAssistanceModel.ConversationType.FILE;
445
+ if (agent instanceof AiAssistanceModel.FileAgent.FileAgent) {
446
+ return AiAssistanceModel.AiHistoryStorage.ConversationType.FILE;
443
447
  }
444
448
 
445
- if (agent instanceof AiAssistanceModel.PerformanceAgent) {
449
+ if (agent instanceof AiAssistanceModel.PerformanceAgent.PerformanceAgent) {
446
450
  return agent.getConversationType();
447
451
  }
448
452
 
@@ -459,16 +463,16 @@ export class AiAssistancePanel extends UI.Panel.Panel {
459
463
  #viewOutput: PanelViewOutput = {};
460
464
  #serverSideLoggingEnabled = isAiAssistanceServerSideLoggingEnabled();
461
465
  #aiAssistanceEnabledSetting: Common.Settings.Setting<boolean>|undefined;
462
- #changeManager = new AiAssistanceModel.ChangeManager();
466
+ #changeManager = new AiAssistanceModel.ChangeManager.ChangeManager();
463
467
  #mutex = new Common.Mutex.Mutex();
464
468
 
465
- #conversationAgent?: AiAssistanceModel.AiAgent<unknown>;
466
- #conversation?: AiAssistanceModel.Conversation;
469
+ #conversationAgent?: AiAssistanceModel.AiAgent.AiAgent<unknown>;
470
+ #conversation?: AiAssistanceModel.AiHistoryStorage.Conversation;
467
471
 
468
- #selectedFile: AiAssistanceModel.FileContext|null = null;
469
- #selectedElement: AiAssistanceModel.NodeContext|null = null;
470
- #selectedPerformanceTrace: AiAssistanceModel.PerformanceTraceContext|null = null;
471
- #selectedRequest: AiAssistanceModel.RequestContext|null = null;
472
+ #selectedFile: AiAssistanceModel.FileAgent.FileContext|null = null;
473
+ #selectedElement: AiAssistanceModel.StylingAgent.NodeContext|null = null;
474
+ #selectedPerformanceTrace: AiAssistanceModel.PerformanceAgent.PerformanceTraceContext|null = null;
475
+ #selectedRequest: AiAssistanceModel.NetworkAgent.RequestContext|null = null;
472
476
 
473
477
  // Messages displayed in the `ChatView` component.
474
478
  #messages: ChatMessage[] = [];
@@ -483,7 +487,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
483
487
  // there is a case where the context differs from the selectedElement (or other selected context type).
484
488
  // Specifically, it allows restoring the previous context when a new selection is cross-origin.
485
489
  // See `#onContextSelectionChanged` for details.
486
- #selectedContext: AiAssistanceModel.ConversationContext<unknown>|null = null;
490
+ #selectedContext: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null = null;
487
491
  // Stores the availability status of the `AidaClient` and the reason for unavailability, if any.
488
492
  #aidaAvailability: Host.AidaClient.AidaAccessPreconditions;
489
493
  // Info of the currently logged in user.
@@ -495,7 +499,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
495
499
  // Used to disable send button when there is not text input.
496
500
  #isTextInputEmpty = true;
497
501
  #timelinePanelInstance: TimelinePanel.TimelinePanel.TimelinePanel|null = null;
498
- #conversationHandler: AiAssistanceModel.ConversationHandler;
502
+ #conversationHandler: AiAssistanceModel.ConversationHandler.ConversationHandler;
499
503
  #runAbortController = new AbortController();
500
504
 
501
505
  constructor(private view: View = defaultView, {aidaClient, aidaAvailability, syncInfo}: {
@@ -513,15 +517,15 @@ export class AiAssistancePanel extends UI.Panel.Panel {
513
517
  accountImage: syncInfo.accountImage,
514
518
  accountFullName: syncInfo.accountFullName,
515
519
  };
516
- this.#conversationHandler =
517
- AiAssistanceModel.ConversationHandler.instance({aidaClient: this.#aidaClient, aidaAvailability});
520
+ this.#conversationHandler = AiAssistanceModel.ConversationHandler.ConversationHandler.instance(
521
+ {aidaClient: this.#aidaClient, aidaAvailability});
518
522
 
519
523
  if (UI.ActionRegistry.ActionRegistry.instance().hasAction('elements.toggle-element-search')) {
520
524
  this.#toggleSearchElementAction =
521
525
  UI.ActionRegistry.ActionRegistry.instance().getAction('elements.toggle-element-search');
522
526
  }
523
- AiAssistanceModel.AiHistoryStorage.instance().addEventListener(
524
- AiAssistanceModel.Events.HISTORY_DELETED, this.#onHistoryDeleted, this);
527
+ AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().addEventListener(
528
+ AiAssistanceModel.AiHistoryStorage.Events.HISTORY_DELETED, this.#onHistoryDeleted, this);
525
529
  }
526
530
 
527
531
  #getChatUiState(): ChatViewState {
@@ -609,15 +613,15 @@ export class AiAssistancePanel extends UI.Panel.Panel {
609
613
  const isSourcesPanelVisible = viewManager.isViewVisible('sources');
610
614
  const isPerformancePanelVisible = viewManager.isViewVisible('timeline');
611
615
 
612
- let targetConversationType: AiAssistanceModel.ConversationType|undefined = undefined;
616
+ let targetConversationType: AiAssistanceModel.AiHistoryStorage.ConversationType|undefined = undefined;
613
617
  if (isElementsPanelVisible && hostConfig.devToolsFreestyler?.enabled) {
614
- targetConversationType = AiAssistanceModel.ConversationType.STYLING;
618
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING;
615
619
  } else if (isNetworkPanelVisible && hostConfig.devToolsAiAssistanceNetworkAgent?.enabled) {
616
- targetConversationType = AiAssistanceModel.ConversationType.NETWORK;
620
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK;
617
621
  } else if (isSourcesPanelVisible && hostConfig.devToolsAiAssistanceFileAgent?.enabled) {
618
- targetConversationType = AiAssistanceModel.ConversationType.FILE;
622
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.FILE;
619
623
  } else if (isPerformancePanelVisible && hostConfig.devToolsAiAssistancePerformanceAgent?.enabled) {
620
- targetConversationType = AiAssistanceModel.ConversationType.PERFORMANCE;
624
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE;
621
625
  }
622
626
 
623
627
  if (this.#conversation?.type === targetConversationType) {
@@ -633,8 +637,8 @@ export class AiAssistancePanel extends UI.Panel.Panel {
633
637
  }
634
638
 
635
639
  #updateConversationState(opts?: {
636
- agent?: AiAssistanceModel.AiAgent<unknown>,
637
- conversation?: AiAssistanceModel.Conversation,
640
+ agent?: AiAssistanceModel.AiAgent.AiAgent<unknown>,
641
+ conversation?: AiAssistanceModel.AiHistoryStorage.Conversation,
638
642
  }): void {
639
643
  if (this.#conversationAgent !== opts?.agent) {
640
644
  // Cancel any previous conversation
@@ -647,7 +651,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
647
651
  // If we get a new agent we need to
648
652
  // create a new conversation along side it
649
653
  if (opts?.agent) {
650
- this.#conversation = new AiAssistanceModel.Conversation(
654
+ this.#conversation = new AiAssistanceModel.AiHistoryStorage.Conversation(
651
655
  agentToConversationType(opts?.agent),
652
656
  [],
653
657
  opts?.agent.id,
@@ -686,7 +690,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
686
690
  this.#selectedRequest =
687
691
  createRequestContext(UI.Context.Context.instance().flavor(SDK.NetworkRequest.NetworkRequest));
688
692
  this.#selectedPerformanceTrace =
689
- createPerformanceTraceContext(UI.Context.Context.instance().flavor(AiAssistanceModel.AgentFocus));
693
+ createPerformanceTraceContext(UI.Context.Context.instance().flavor(AiAssistanceModel.AIContext.AgentFocus));
690
694
  this.#selectedFile = createFileContext(UI.Context.Context.instance().flavor(Workspace.UISourceCode.UISourceCode));
691
695
  this.#updateConversationState({agent: this.#conversationAgent});
692
696
 
@@ -699,7 +703,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
699
703
  UI.Context.Context.instance().addFlavorChangeListener(
700
704
  SDK.NetworkRequest.NetworkRequest, this.#handleNetworkRequestFlavorChange);
701
705
  UI.Context.Context.instance().addFlavorChangeListener(
702
- AiAssistanceModel.AgentFocus, this.#handlePerformanceTraceFlavorChange);
706
+ AiAssistanceModel.AIContext.AgentFocus, this.#handlePerformanceTraceFlavorChange);
703
707
  UI.Context.Context.instance().addFlavorChangeListener(
704
708
  Workspace.UISourceCode.UISourceCode, this.#handleUISourceCodeFlavorChange);
705
709
 
@@ -727,6 +731,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
727
731
  }
728
732
 
729
733
  override willHide(): void {
734
+ super.willHide();
730
735
  this.#aiAssistanceEnabledSetting?.removeChangeListener(this.requestUpdate, this);
731
736
  Host.AidaClient.HostConfigTracker.instance().removeEventListener(
732
737
  Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED, this.#handleAidaAvailabilityChange);
@@ -736,7 +741,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
736
741
  UI.Context.Context.instance().removeFlavorChangeListener(
737
742
  SDK.NetworkRequest.NetworkRequest, this.#handleNetworkRequestFlavorChange);
738
743
  UI.Context.Context.instance().removeFlavorChangeListener(
739
- AiAssistanceModel.AgentFocus, this.#handlePerformanceTraceFlavorChange);
744
+ AiAssistanceModel.AIContext.AgentFocus, this.#handlePerformanceTraceFlavorChange);
740
745
  UI.Context.Context.instance().removeFlavorChangeListener(
741
746
  Workspace.UISourceCode.UISourceCode, this.#handleUISourceCodeFlavorChange);
742
747
  UI.ViewManager.ViewManager.instance().removeEventListener(
@@ -806,7 +811,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
806
811
 
807
812
  if (Boolean(ev.data)) {
808
813
  const calculator = NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator();
809
- this.#selectedRequest = new AiAssistanceModel.RequestContext(ev.data, calculator);
814
+ this.#selectedRequest = new AiAssistanceModel.NetworkAgent.RequestContext(ev.data, calculator);
810
815
  } else {
811
816
  this.#selectedRequest = null;
812
817
  }
@@ -814,13 +819,13 @@ export class AiAssistancePanel extends UI.Panel.Panel {
814
819
  };
815
820
 
816
821
  #handlePerformanceTraceFlavorChange =
817
- (ev: Common.EventTarget.EventTargetEvent<AiAssistanceModel.AgentFocus>): void => {
822
+ (ev: Common.EventTarget.EventTargetEvent<AiAssistanceModel.AIContext.AgentFocus>): void => {
818
823
  if (this.#selectedPerformanceTrace?.getItem() === ev.data) {
819
824
  return;
820
825
  }
821
826
 
822
827
  this.#selectedPerformanceTrace =
823
- Boolean(ev.data) ? new AiAssistanceModel.PerformanceTraceContext(ev.data) : null;
828
+ Boolean(ev.data) ? new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(ev.data) : null;
824
829
 
825
830
  this.#updateConversationState({agent: this.#conversationAgent});
826
831
  };
@@ -834,7 +839,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
834
839
  if (this.#selectedFile?.getItem() === newFile) {
835
840
  return;
836
841
  }
837
- this.#selectedFile = new AiAssistanceModel.FileContext(ev.data);
842
+ this.#selectedFile = new AiAssistanceModel.FileAgent.FileContext(ev.data);
838
843
  this.#updateConversationState({agent: this.#conversationAgent});
839
844
  };
840
845
 
@@ -874,7 +879,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
874
879
  userInfo: this.#userInfo,
875
880
  canShowFeedbackForm: this.#serverSideLoggingEnabled,
876
881
  multimodalInputEnabled: isAiAssistanceMultimodalInputEnabled() &&
877
- this.#conversation?.type === AiAssistanceModel.ConversationType.STYLING,
882
+ this.#conversation?.type === AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING,
878
883
  imageInput: this.#imageInput,
879
884
  showChatActions: this.#shouldShowChatActions(),
880
885
  showActiveConversationActions: Boolean(this.#conversation && !this.#conversation.isEmpty),
@@ -885,7 +890,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
885
890
  isTextInputEmpty: this.#isTextInputEmpty,
886
891
  changeManager: this.#changeManager,
887
892
  uploadImageInputEnabled: isAiAssistanceMultimodalUploadInputEnabled() &&
888
- this.#conversation?.type === AiAssistanceModel.ConversationType.STYLING,
893
+ this.#conversation?.type === AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING,
889
894
  markdownRenderer,
890
895
  onNewChatClick: this.#handleNewChatRequest.bind(this),
891
896
  populateHistoryMenu: this.#populateHistoryMenu.bind(this),
@@ -899,7 +904,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
899
904
  },
900
905
  onTextSubmit: async (
901
906
  text: string, imageInput?: Host.AidaClient.Part,
902
- multimodalInputType?: AiAssistanceModel.MultimodalInputType) => {
907
+ multimodalInputType?: AiAssistanceModel.AiAgent.MultimodalInputType) => {
903
908
  this.#imageInput = undefined;
904
909
  this.#isTextInputEmpty = true;
905
910
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceQuerySubmitted);
@@ -990,16 +995,16 @@ export class AiAssistancePanel extends UI.Panel.Panel {
990
995
  }
991
996
 
992
997
  switch (this.#conversation.type) {
993
- case AiAssistanceModel.ConversationType.STYLING:
998
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING:
994
999
  return this.#selectedContext ? lockedString(UIStringsNotTranslate.inputPlaceholderForStyling) :
995
1000
  lockedString(UIStringsNotTranslate.inputPlaceholderForStylingNoContext);
996
- case AiAssistanceModel.ConversationType.FILE:
1001
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.FILE:
997
1002
  return this.#selectedContext ? lockedString(UIStringsNotTranslate.inputPlaceholderForFile) :
998
1003
  lockedString(UIStringsNotTranslate.inputPlaceholderForFileNoContext);
999
- case AiAssistanceModel.ConversationType.NETWORK:
1004
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK:
1000
1005
  return this.#selectedContext ? lockedString(UIStringsNotTranslate.inputPlaceholderForNetwork) :
1001
1006
  lockedString(UIStringsNotTranslate.inputPlaceholderForNetworkNoContext);
1002
- case AiAssistanceModel.ConversationType.PERFORMANCE: {
1007
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE: {
1003
1008
  const perfPanel = UI.Context.Context.instance().flavor(TimelinePanel.TimelinePanel.TimelinePanel);
1004
1009
  if (perfPanel?.hasActiveTrace()) {
1005
1010
  return this.#selectedContext ?
@@ -1021,17 +1026,17 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1021
1026
  const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
1022
1027
  Root.Runtime.GenAiEnterprisePolicyValue.ALLOW_WITHOUT_LOGGING;
1023
1028
  switch (this.#conversation.type) {
1024
- case AiAssistanceModel.ConversationType.STYLING:
1029
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING:
1025
1030
  if (noLogging) {
1026
1031
  return lockedString(UIStringsNotTranslate.inputDisclaimerForStylingEnterpriseNoLogging);
1027
1032
  }
1028
1033
  return lockedString(UIStringsNotTranslate.inputDisclaimerForStyling);
1029
- case AiAssistanceModel.ConversationType.FILE:
1034
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.FILE:
1030
1035
  if (noLogging) {
1031
1036
  return lockedString(UIStringsNotTranslate.inputDisclaimerForFileEnterpriseNoLogging);
1032
1037
  }
1033
1038
  return lockedString(UIStringsNotTranslate.inputDisclaimerForFile);
1034
- case AiAssistanceModel.ConversationType.NETWORK:
1039
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK:
1035
1040
  if (noLogging) {
1036
1041
  return lockedString(UIStringsNotTranslate.inputDisclaimerForNetworkEnterpriseNoLogging);
1037
1042
  }
@@ -1039,7 +1044,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1039
1044
 
1040
1045
  // It is deliberate that both Performance agents use the same disclaimer
1041
1046
  // text and this has been approved by Privacy.
1042
- case AiAssistanceModel.ConversationType.PERFORMANCE:
1047
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE:
1043
1048
  if (noLogging) {
1044
1049
  return lockedString(UIStringsNotTranslate.inputDisclaimerForPerformanceEnterpriseNoLogging);
1045
1050
  }
@@ -1064,15 +1069,15 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1064
1069
 
1065
1070
  #handleContextClick(): void|Promise<void> {
1066
1071
  const context = this.#selectedContext;
1067
- if (context instanceof AiAssistanceModel.RequestContext) {
1072
+ if (context instanceof AiAssistanceModel.NetworkAgent.RequestContext) {
1068
1073
  const requestLocation = NetworkForward.UIRequestLocation.UIRequestLocation.tab(
1069
1074
  context.getItem(), NetworkForward.UIRequestLocation.UIRequestTabs.HEADERS_COMPONENT);
1070
1075
  return Common.Revealer.reveal(requestLocation);
1071
1076
  }
1072
- if (context instanceof AiAssistanceModel.FileContext) {
1077
+ if (context instanceof AiAssistanceModel.FileAgent.FileContext) {
1073
1078
  return Common.Revealer.reveal(context.getItem().uiLocation(0, 0));
1074
1079
  }
1075
- if (context instanceof AiAssistanceModel.PerformanceTraceContext) {
1080
+ if (context instanceof AiAssistanceModel.PerformanceAgent.PerformanceTraceContext) {
1076
1081
  const focus = context.getItem();
1077
1082
  if (focus.callTree) {
1078
1083
  const event = focus.callTree.selectedNode?.event ?? focus.callTree.rootNode.event;
@@ -1094,51 +1099,51 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1094
1099
  return;
1095
1100
  }
1096
1101
 
1097
- let targetConversationType: AiAssistanceModel.ConversationType|undefined;
1102
+ let targetConversationType: AiAssistanceModel.AiHistoryStorage.ConversationType|undefined;
1098
1103
  switch (actionId) {
1099
1104
  case 'freestyler.elements-floating-button': {
1100
1105
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromElementsPanelFloatingButton);
1101
- targetConversationType = AiAssistanceModel.ConversationType.STYLING;
1106
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING;
1102
1107
  break;
1103
1108
  }
1104
1109
  case 'freestyler.element-panel-context': {
1105
1110
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromElementsPanel);
1106
- targetConversationType = AiAssistanceModel.ConversationType.STYLING;
1111
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING;
1107
1112
  break;
1108
1113
  }
1109
1114
  case 'drjones.network-floating-button': {
1110
1115
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromNetworkPanelFloatingButton);
1111
- targetConversationType = AiAssistanceModel.ConversationType.NETWORK;
1116
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK;
1112
1117
  break;
1113
1118
  }
1114
1119
  case 'drjones.network-panel-context': {
1115
1120
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromNetworkPanel);
1116
- targetConversationType = AiAssistanceModel.ConversationType.NETWORK;
1121
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK;
1117
1122
  break;
1118
1123
  }
1119
1124
  case 'drjones.performance-panel-context': {
1120
1125
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromPerformancePanelCallTree);
1121
- targetConversationType = AiAssistanceModel.ConversationType.PERFORMANCE;
1126
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE;
1122
1127
  break;
1123
1128
  }
1124
1129
  case 'drjones.performance-insight-context': {
1125
1130
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromPerformanceInsight);
1126
- targetConversationType = AiAssistanceModel.ConversationType.PERFORMANCE;
1131
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE;
1127
1132
  break;
1128
1133
  }
1129
1134
  case 'drjones.performance-panel-full-context': {
1130
1135
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromPerformanceFullButton);
1131
- targetConversationType = AiAssistanceModel.ConversationType.PERFORMANCE;
1136
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE;
1132
1137
  break;
1133
1138
  }
1134
1139
  case 'drjones.sources-floating-button': {
1135
1140
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromSourcesPanelFloatingButton);
1136
- targetConversationType = AiAssistanceModel.ConversationType.FILE;
1141
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.FILE;
1137
1142
  break;
1138
1143
  }
1139
1144
  case 'drjones.sources-panel-context': {
1140
1145
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiAssistanceOpenedFromSourcesPanel);
1141
- targetConversationType = AiAssistanceModel.ConversationType.FILE;
1146
+ targetConversationType = AiAssistanceModel.AiHistoryStorage.ConversationType.FILE;
1142
1147
  break;
1143
1148
  }
1144
1149
  }
@@ -1168,8 +1173,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1168
1173
  }
1169
1174
 
1170
1175
  #populateHistoryMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
1171
- const historicalConversations = AiAssistanceModel.AiHistoryStorage.instance().getHistory().map(
1172
- serializedConversation => AiAssistanceModel.Conversation.fromSerializedConversation(serializedConversation));
1176
+ const historicalConversations = AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().getHistory().map(
1177
+ serializedConversation =>
1178
+ AiAssistanceModel.AiHistoryStorage.Conversation.fromSerializedConversation(serializedConversation));
1173
1179
  for (const conversation of historicalConversations.reverse()) {
1174
1180
  if (conversation.isEmpty) {
1175
1181
  continue;
@@ -1194,7 +1200,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1194
1200
  contextMenu.footerSection().appendItem(
1195
1201
  i18nString(UIStrings.clearChatHistory),
1196
1202
  () => {
1197
- void AiAssistanceModel.AiHistoryStorage.instance().deleteAll();
1203
+ void AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().deleteAll();
1198
1204
  },
1199
1205
  {
1200
1206
  disabled: historyEmpty,
@@ -1211,7 +1217,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1211
1217
  return;
1212
1218
  }
1213
1219
 
1214
- void AiAssistanceModel.AiHistoryStorage.instance().deleteHistoryEntry(this.#conversation.id);
1220
+ void AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().deleteHistoryEntry(this.#conversation.id);
1215
1221
  this.#updateConversationState();
1216
1222
  UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.chatDeleted));
1217
1223
  }
@@ -1238,7 +1244,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1238
1244
  Workspace.FileManager.FileManager.instance().close(filename);
1239
1245
  }
1240
1246
 
1241
- async #openHistoricConversation(conversation: AiAssistanceModel.Conversation): Promise<void> {
1247
+ async #openHistoricConversation(conversation: AiAssistanceModel.AiHistoryStorage.Conversation): Promise<void> {
1242
1248
  if (this.#conversation === conversation) {
1243
1249
  return;
1244
1250
  }
@@ -1276,7 +1282,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1276
1282
  isLoading: false,
1277
1283
  data: bytes,
1278
1284
  mimeType: JPEG_MIME_TYPE,
1279
- inputType: AiAssistanceModel.MultimodalInputType.SCREENSHOT
1285
+ inputType: AiAssistanceModel.AiAgent.MultimodalInputType.SCREENSHOT
1280
1286
  };
1281
1287
  this.requestUpdate();
1282
1288
  void this.updateComplete.then(() => {
@@ -1348,7 +1354,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1348
1354
  isLoading: false,
1349
1355
  data: bytes,
1350
1356
  mimeType: file.type,
1351
- inputType: AiAssistanceModel.MultimodalInputType.UPLOADED_IMAGE
1357
+ inputType: AiAssistanceModel.AiAgent.MultimodalInputType.UPLOADED_IMAGE
1352
1358
  };
1353
1359
  this.requestUpdate();
1354
1360
  void this.updateComplete.then(() => {
@@ -1378,23 +1384,23 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1378
1384
  this.#blockedByCrossOrigin = !this.#selectedContext.isOriginAllowed(this.#conversationAgent.origin);
1379
1385
  }
1380
1386
 
1381
- #getConversationContext(conversation?: AiAssistanceModel.Conversation):
1382
- AiAssistanceModel.ConversationContext<unknown>|null {
1387
+ #getConversationContext(conversation?: AiAssistanceModel.AiHistoryStorage.Conversation):
1388
+ AiAssistanceModel.AiAgent.ConversationContext<unknown>|null {
1383
1389
  if (!conversation) {
1384
1390
  return null;
1385
1391
  }
1386
- let context: AiAssistanceModel.ConversationContext<unknown>|null;
1392
+ let context: AiAssistanceModel.AiAgent.ConversationContext<unknown>|null;
1387
1393
  switch (conversation.type) {
1388
- case AiAssistanceModel.ConversationType.STYLING:
1394
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING:
1389
1395
  context = this.#selectedElement;
1390
1396
  break;
1391
- case AiAssistanceModel.ConversationType.FILE:
1397
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.FILE:
1392
1398
  context = this.#selectedFile;
1393
1399
  break;
1394
- case AiAssistanceModel.ConversationType.NETWORK:
1400
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.NETWORK:
1395
1401
  context = this.#selectedRequest;
1396
1402
  break;
1397
- case AiAssistanceModel.ConversationType.PERFORMANCE:
1403
+ case AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE:
1398
1404
  context = this.#selectedPerformanceTrace;
1399
1405
  break;
1400
1406
  }
@@ -1403,7 +1409,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1403
1409
 
1404
1410
  async #startConversation(
1405
1411
  text: string, imageInput?: Host.AidaClient.Part,
1406
- multimodalInputType?: AiAssistanceModel.MultimodalInputType): Promise<void> {
1412
+ multimodalInputType?: AiAssistanceModel.AiAgent.MultimodalInputType): Promise<void> {
1407
1413
  if (!this.#conversationAgent) {
1408
1414
  return;
1409
1415
  }
@@ -1443,8 +1449,8 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1443
1449
  }
1444
1450
 
1445
1451
  async #doConversation(
1446
- items: Iterable<AiAssistanceModel.ResponseData, void, void>|
1447
- AsyncIterable<AiAssistanceModel.ResponseData, void, void>): Promise<void> {
1452
+ items: Iterable<AiAssistanceModel.AiAgent.ResponseData, void, void>|
1453
+ AsyncIterable<AiAssistanceModel.AiAgent.ResponseData, void, void>): Promise<void> {
1448
1454
  const release = await this.#mutex.acquire();
1449
1455
  try {
1450
1456
  let systemMessage: ModelChatMessage = {
@@ -1468,7 +1474,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1468
1474
  for await (const data of items) {
1469
1475
  step.sideEffect = undefined;
1470
1476
  switch (data.type) {
1471
- case AiAssistanceModel.ResponseType.USER_QUERY: {
1477
+ case AiAssistanceModel.AiAgent.ResponseType.USER_QUERY: {
1472
1478
  this.#messages.push({
1473
1479
  entity: ChatMessageEntity.USER,
1474
1480
  text: data.query,
@@ -1481,7 +1487,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1481
1487
  this.#messages.push(systemMessage);
1482
1488
  break;
1483
1489
  }
1484
- case AiAssistanceModel.ResponseType.QUERYING: {
1490
+ case AiAssistanceModel.AiAgent.ResponseType.QUERYING: {
1485
1491
  step = {isLoading: true};
1486
1492
  if (!systemMessage.steps.length) {
1487
1493
  systemMessage.steps.push(step);
@@ -1489,29 +1495,29 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1489
1495
 
1490
1496
  break;
1491
1497
  }
1492
- case AiAssistanceModel.ResponseType.CONTEXT: {
1498
+ case AiAssistanceModel.AiAgent.ResponseType.CONTEXT: {
1493
1499
  step.title = data.title;
1494
1500
  step.contextDetails = data.details;
1495
1501
  step.isLoading = false;
1496
1502
  commitStep();
1497
1503
  break;
1498
1504
  }
1499
- case AiAssistanceModel.ResponseType.TITLE: {
1505
+ case AiAssistanceModel.AiAgent.ResponseType.TITLE: {
1500
1506
  step.title = data.title;
1501
1507
  commitStep();
1502
1508
  break;
1503
1509
  }
1504
- case AiAssistanceModel.ResponseType.THOUGHT: {
1510
+ case AiAssistanceModel.AiAgent.ResponseType.THOUGHT: {
1505
1511
  step.isLoading = false;
1506
1512
  step.thought = data.thought;
1507
1513
  commitStep();
1508
1514
  break;
1509
1515
  }
1510
- case AiAssistanceModel.ResponseType.SUGGESTIONS: {
1516
+ case AiAssistanceModel.AiAgent.ResponseType.SUGGESTIONS: {
1511
1517
  systemMessage.suggestions = data.suggestions;
1512
1518
  break;
1513
1519
  }
1514
- case AiAssistanceModel.ResponseType.SIDE_EFFECT: {
1520
+ case AiAssistanceModel.AiAgent.ResponseType.SIDE_EFFECT: {
1515
1521
  step.isLoading = false;
1516
1522
  step.code ??= data.code;
1517
1523
  step.sideEffect = {
@@ -1524,7 +1530,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1524
1530
  commitStep();
1525
1531
  break;
1526
1532
  }
1527
- case AiAssistanceModel.ResponseType.ACTION: {
1533
+ case AiAssistanceModel.AiAgent.ResponseType.ACTION: {
1528
1534
  step.isLoading = false;
1529
1535
  step.code ??= data.code;
1530
1536
  step.output ??= data.output;
@@ -1532,7 +1538,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1532
1538
  commitStep();
1533
1539
  break;
1534
1540
  }
1535
- case AiAssistanceModel.ResponseType.ANSWER: {
1541
+ case AiAssistanceModel.AiAgent.ResponseType.ANSWER: {
1536
1542
  systemMessage.suggestions ??= data.suggestions;
1537
1543
  systemMessage.answer = data.text;
1538
1544
  systemMessage.rpcId = data.rpcId;
@@ -1543,20 +1549,20 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1543
1549
  step.isLoading = false;
1544
1550
  break;
1545
1551
  }
1546
- case AiAssistanceModel.ResponseType.ERROR: {
1552
+ case AiAssistanceModel.AiAgent.ResponseType.ERROR: {
1547
1553
  systemMessage.error = data.error;
1548
1554
  systemMessage.rpcId = undefined;
1549
1555
  const lastStep = systemMessage.steps.at(-1);
1550
1556
  if (lastStep) {
1551
1557
  // Mark the last step as cancelled to make the UI feel better.
1552
- if (data.error === AiAssistanceModel.ErrorType.ABORT) {
1558
+ if (data.error === AiAssistanceModel.AiAgent.ErrorType.ABORT) {
1553
1559
  lastStep.canceled = true;
1554
1560
  // If error happens while the step is still loading remove it.
1555
1561
  } else if (lastStep.isLoading) {
1556
1562
  systemMessage.steps.pop();
1557
1563
  }
1558
1564
  }
1559
- if (data.error === AiAssistanceModel.ErrorType.BLOCK) {
1565
+ if (data.error === AiAssistanceModel.AiAgent.ErrorType.BLOCK) {
1560
1566
  systemMessage.answer = undefined;
1561
1567
  }
1562
1568
  }
@@ -1570,8 +1576,8 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1570
1576
  // This handles scrolling to the bottom for live conversations when:
1571
1577
  // * User submits the query & the context step is shown.
1572
1578
  // * There is a side effect dialog shown.
1573
- if (data.type === AiAssistanceModel.ResponseType.CONTEXT ||
1574
- data.type === AiAssistanceModel.ResponseType.SIDE_EFFECT) {
1579
+ if (data.type === AiAssistanceModel.AiAgent.ResponseType.CONTEXT ||
1580
+ data.type === AiAssistanceModel.AiAgent.ResponseType.SIDE_EFFECT) {
1575
1581
  this.#viewOutput.chatView?.scrollToBottom();
1576
1582
  }
1577
1583
 
@@ -1580,10 +1586,10 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1580
1586
  // * Answer started streaming
1581
1587
  // * Answer finished streaming
1582
1588
  switch (data.type) {
1583
- case AiAssistanceModel.ResponseType.CONTEXT:
1589
+ case AiAssistanceModel.AiAgent.ResponseType.CONTEXT:
1584
1590
  UI.ARIAUtils.LiveAnnouncer.status(data.title);
1585
1591
  break;
1586
- case AiAssistanceModel.ResponseType.ANSWER: {
1592
+ case AiAssistanceModel.AiAgent.ResponseType.ANSWER: {
1587
1593
  if (!data.complete && !announcedAnswerLoading) {
1588
1594
  announcedAnswerLoading = true;
1589
1595
  UI.ARIAUtils.LiveAnnouncer.status(lockedString(UIStringsNotTranslate.answerLoading));
@@ -1612,7 +1618,8 @@ export function getResponseMarkdown(message: ModelChatMessage): string {
1612
1618
  contentParts.push(`### ${step.title}`);
1613
1619
  }
1614
1620
  if (step.contextDetails) {
1615
- contentParts.push(AiAssistanceModel.Conversation.generateContextDetailsMarkdown(step.contextDetails));
1621
+ contentParts.push(
1622
+ AiAssistanceModel.AiHistoryStorage.Conversation.generateContextDetailsMarkdown(step.contextDetails));
1616
1623
  }
1617
1624
  if (step.thought) {
1618
1625
  contentParts.push(step.thought);