chrome-devtools-frontend 1.0.1657110 → 1.0.1660788

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 (317) hide show
  1. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +125 -0
  2. package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
  3. package/.agents/skills/repro-flaky-tests/SKILL.md +53 -0
  4. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
  5. package/.agents/skills/version-control/SKILL.md +8 -1
  6. package/AUTHORS +1 -0
  7. package/SECURITY.md +3 -0
  8. package/docs/get_the_code.md +6 -0
  9. package/front_end/Images/src/ads.svg +1 -0
  10. package/front_end/Tests.js +6 -6
  11. package/front_end/core/common/Gzip.ts +12 -5
  12. package/front_end/core/common/ResourceType.ts +19 -19
  13. package/front_end/core/common/Revealer.ts +15 -15
  14. package/front_end/core/common/SettingRegistration.ts +19 -19
  15. package/front_end/core/host/AidaClient.ts +35 -9
  16. package/front_end/core/host/GdpClient.ts +10 -7
  17. package/front_end/core/platform/StringUtilities.ts +35 -0
  18. package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
  19. package/front_end/core/sdk/AccessibilityModel.ts +132 -2
  20. package/front_end/core/sdk/CPUThrottlingManager.ts +8 -5
  21. package/front_end/core/sdk/CSSMetadata.ts +110 -16
  22. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
  23. package/front_end/core/sdk/ConsoleModel.ts +5 -5
  24. package/front_end/core/sdk/DOMDebuggerModel.ts +5 -1
  25. package/front_end/core/sdk/DOMModel.ts +32 -18
  26. package/front_end/core/sdk/NetworkManager.ts +58 -14
  27. package/front_end/core/sdk/NetworkRequest.ts +37 -1
  28. package/front_end/core/sdk/OverlayModel.ts +45 -6
  29. package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
  30. package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
  31. package/front_end/core/sdk/ServerTiming.ts +17 -13
  32. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
  33. package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
  34. package/front_end/core/sdk/TargetManager.ts +10 -1
  35. package/front_end/core/sdk/TraceObject.ts +4 -2
  36. package/front_end/core/sdk/sdk-meta.ts +170 -0
  37. package/front_end/design_system_tokens.css +0 -5
  38. package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -1
  39. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +13 -4
  40. package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
  41. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +23 -4
  42. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +33 -10
  43. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
  44. package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
  45. package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
  46. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
  47. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
  48. package/front_end/entrypoints/js_app/js_app.ts +6 -5
  49. package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
  50. package/front_end/entrypoints/main/MainImpl.ts +25 -55
  51. package/front_end/entrypoints/main/main-meta.ts +50 -50
  52. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +5 -5
  53. package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -3
  54. package/front_end/entrypoints/node_app/node_app.ts +10 -9
  55. package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
  56. package/front_end/foundation/Universe.ts +76 -6
  57. package/front_end/generated/InspectorBackendCommands.ts +3 -3
  58. package/front_end/generated/SupportedCSSProperties.js +19 -12
  59. package/front_end/generated/protocol.ts +7 -1
  60. package/front_end/models/ai_assistance/AiConversation.ts +19 -17
  61. package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
  62. package/front_end/models/ai_assistance/AiUtils.ts +38 -42
  63. package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
  64. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
  65. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
  66. package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
  67. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
  68. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
  69. package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
  70. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
  71. package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
  72. package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -5
  73. package/front_end/models/bindings/CompilerScriptMapping.ts +2 -1
  74. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +15 -16
  75. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +6 -4
  76. package/front_end/models/bindings/FileUtils.ts +11 -12
  77. package/front_end/models/bindings/NetworkProject.ts +4 -0
  78. package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
  79. package/front_end/models/bindings/ResourceUtils.ts +1 -1
  80. package/front_end/models/bindings/SASSSourceMapping.ts +8 -5
  81. package/front_end/models/emulation/DeviceModeModel.ts +14 -14
  82. package/front_end/models/emulation/EmulatedDevices.ts +392 -11
  83. package/front_end/models/extensions/ExtensionAPI.ts +6 -6
  84. package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
  85. package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
  86. package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
  87. package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +1 -1
  88. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
  89. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
  90. package/front_end/models/issues_manager/CookieIssue.ts +6 -7
  91. package/front_end/models/issues_manager/CorsIssue.ts +3 -3
  92. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
  93. package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
  94. package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
  95. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
  96. package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
  97. package/front_end/models/issues_manager/GenericIssue.ts +7 -7
  98. package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
  99. package/front_end/models/issues_manager/Issue.ts +8 -8
  100. package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
  101. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
  102. package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
  103. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
  104. package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
  105. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
  106. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
  107. package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
  108. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  109. package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
  110. package/front_end/models/text_utils/ContentData.ts +27 -0
  111. package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
  112. package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
  113. package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
  114. package/front_end/models/workspace/IgnoreListManager.ts +6 -6
  115. package/front_end/models/workspace/UISourceCode.ts +3 -3
  116. package/front_end/models/workspace_diff/WorkspaceDiff.ts +23 -12
  117. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
  118. package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
  119. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
  120. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  121. package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -0
  122. package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
  123. package/front_end/panels/animation/AnimationTimeline.ts +17 -19
  124. package/front_end/panels/animation/AnimationUI.ts +5 -5
  125. package/front_end/panels/animation/animation-meta.ts +2 -2
  126. package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -4
  127. package/front_end/panels/application/BackgroundServiceView.ts +2 -1
  128. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
  129. package/front_end/panels/application/IndexedDBViews.ts +245 -262
  130. package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
  131. package/front_end/panels/application/ResourcesPanel.ts +9 -2
  132. package/front_end/panels/application/ServiceWorkersView.ts +252 -211
  133. package/front_end/panels/application/StorageView.ts +97 -33
  134. package/front_end/panels/application/WebMCPView.ts +15 -1
  135. package/front_end/panels/application/components/AdsView.ts +1 -1
  136. package/front_end/panels/application/indexedDBViews.css +38 -9
  137. package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
  138. package/front_end/panels/application/resourcesSidebar.css +5 -0
  139. package/front_end/panels/application/storageView.css +26 -9
  140. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
  141. package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
  142. package/front_end/panels/common/DOMLinkifier.ts +1 -1
  143. package/front_end/panels/common/ExtensionServer.ts +119 -14
  144. package/front_end/panels/console/ConsoleContextSelector.ts +4 -4
  145. package/front_end/panels/console/ConsolePinPane.ts +12 -12
  146. package/front_end/panels/console/ConsolePrompt.ts +6 -6
  147. package/front_end/panels/console/ConsoleSidebar.ts +7 -7
  148. package/front_end/panels/console/ConsoleView.ts +45 -44
  149. package/front_end/panels/console/ConsoleViewMessage.ts +40 -40
  150. package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
  151. package/front_end/panels/console/console-meta.ts +34 -34
  152. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
  153. package/front_end/panels/coverage/CoverageListView.ts +28 -28
  154. package/front_end/panels/coverage/CoverageModel.ts +2 -1
  155. package/front_end/panels/coverage/CoverageView.ts +23 -23
  156. package/front_end/panels/coverage/coverage-meta.ts +5 -5
  157. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
  158. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
  159. package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
  160. package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
  161. package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
  162. package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
  163. package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +20 -21
  164. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -8
  165. package/front_end/panels/developer_resources/developer_resources-meta.ts +2 -2
  166. package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
  167. package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
  168. package/front_end/panels/elements/ElementsPanel.ts +17 -11
  169. package/front_end/panels/elements/ElementsTreeElement.ts +49 -2
  170. package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
  171. package/front_end/panels/elements/LayoutPane.ts +1 -1
  172. package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
  173. package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
  174. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
  175. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  176. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
  177. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
  178. package/front_end/panels/elements/components/QueryContainer.ts +1 -1
  179. package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
  180. package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
  181. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  182. package/front_end/panels/media/EventDisplayTable.ts +2 -2
  183. package/front_end/panels/media/EventTimelineView.ts +4 -4
  184. package/front_end/panels/media/MainView.ts +4 -4
  185. package/front_end/panels/media/PlayerDetailView.ts +5 -5
  186. package/front_end/panels/media/PlayerListView.ts +1 -1
  187. package/front_end/panels/media/PlayerMessagesView.ts +12 -12
  188. package/front_end/panels/media/PlayerPropertiesView.ts +17 -17
  189. package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
  190. package/front_end/panels/network/NetworkLogView.ts +11 -2
  191. package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
  192. package/front_end/panels/network/NetworkPanel.ts +2 -1
  193. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -3
  194. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  195. package/front_end/panels/network/RequestPayloadView.ts +53 -7
  196. package/front_end/panels/network/RequestPreviewView.ts +7 -1
  197. package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
  198. package/front_end/panels/network/forward/UIFilter.ts +1 -0
  199. package/front_end/panels/network/networkPanel.css +1 -0
  200. package/front_end/panels/network/networkTimingTable.css +1 -1
  201. package/front_end/panels/network/requestPayloadView.css +10 -0
  202. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
  203. package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
  204. package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
  205. package/front_end/panels/profiler/HeapProfileView.ts +563 -51
  206. package/front_end/panels/profiler/HeapSnapshotView.ts +15 -9
  207. package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
  208. package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
  209. package/front_end/panels/profiler/profiler.ts +2 -2
  210. package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -10
  211. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +28 -32
  212. package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
  213. package/front_end/panels/recorder/RecorderController.ts +15 -15
  214. package/front_end/panels/recorder/RecorderEvents.ts +8 -0
  215. package/front_end/panels/recorder/components/CreateRecordingView.ts +11 -11
  216. package/front_end/panels/recorder/components/ExtensionView.ts +74 -83
  217. package/front_end/panels/recorder/components/RecordingListView.ts +3 -3
  218. package/front_end/panels/recorder/components/RecordingView.ts +13 -10
  219. package/front_end/panels/recorder/components/ReplaySection.ts +9 -9
  220. package/front_end/panels/recorder/components/StepEditor.ts +352 -321
  221. package/front_end/panels/recorder/components/StepView.ts +36 -37
  222. package/front_end/panels/recorder/components/recordingView.css +1 -1
  223. package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
  224. package/front_end/panels/recorder/recorder-meta.ts +7 -7
  225. package/front_end/panels/screencast/ScreencastApp.ts +1 -1
  226. package/front_end/panels/screencast/ScreencastView.ts +12 -12
  227. package/front_end/panels/search/SearchResultsPane.ts +4 -4
  228. package/front_end/panels/search/SearchView.ts +20 -20
  229. package/front_end/panels/security/SecurityModel.ts +7 -7
  230. package/front_end/panels/security/SecurityPanel.ts +99 -107
  231. package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
  232. package/front_end/panels/security/security-meta.ts +2 -2
  233. package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
  234. package/front_end/panels/sensors/SensorsView.ts +27 -27
  235. package/front_end/panels/sensors/sensors-meta.ts +13 -167
  236. package/front_end/panels/settings/AISettingsTab.ts +98 -56
  237. package/front_end/panels/settings/EditFileSystemView.ts +2 -2
  238. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
  239. package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
  240. package/front_end/panels/settings/SettingsScreen.ts +11 -11
  241. package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
  242. package/front_end/panels/settings/components/SyncSection.ts +12 -12
  243. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
  244. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
  245. package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
  246. package/front_end/panels/settings/settings-meta.ts +14 -14
  247. package/front_end/panels/sources/NavigatorView.ts +7 -6
  248. package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
  249. package/front_end/panels/sources/SourcesNavigator.ts +20 -18
  250. package/front_end/panels/sources/SourcesView.ts +10 -1
  251. package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
  252. package/front_end/panels/sources/sources-meta.ts +4 -4
  253. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
  254. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
  255. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
  256. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  257. package/front_end/panels/timeline/TimelinePanel.ts +2 -1
  258. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  259. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
  260. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
  261. package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
  262. package/front_end/panels/utils/utils.ts +7 -3
  263. package/front_end/panels/web_audio/WebAudioView.ts +17 -18
  264. package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
  265. package/front_end/panels/webauthn/WebauthnPane.ts +10 -10
  266. package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
  267. package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
  268. package/front_end/third_party/chromium/README.chromium +1 -1
  269. package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
  270. package/front_end/third_party/lit/lib/async-directive.js +1 -1
  271. package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
  272. package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
  273. package/front_end/third_party/lit/lib/decorators.js.map +1 -1
  274. package/front_end/third_party/lit/lib/directive.d.ts +2 -1
  275. package/front_end/third_party/lit/lib/directive.js.map +1 -1
  276. package/front_end/third_party/lit/lib/directives.d.ts +2 -1
  277. package/front_end/third_party/lit/lib/directives.js +8 -8
  278. package/front_end/third_party/lit/lib/directives.js.map +1 -1
  279. package/front_end/third_party/lit/lib/lit.d.ts +2 -1
  280. package/front_end/third_party/lit/lib/lit.js +1 -1
  281. package/front_end/third_party/lit/lib/lit.js.map +1 -1
  282. package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
  283. package/front_end/third_party/lit/lib/static-html.js +1 -1
  284. package/front_end/third_party/lit/lib/static-html.js.map +1 -1
  285. package/front_end/third_party/lit/package.json +2 -2
  286. package/front_end/third_party/lit/rebuild.sh +1 -1
  287. package/front_end/third_party/lit/src/async-directive.ts +5 -0
  288. package/front_end/ui/components/dialogs/Dialog.ts +1 -1
  289. package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
  290. package/front_end/ui/components/dialogs/shortcutDialog.css +15 -12
  291. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  292. package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
  293. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
  294. package/front_end/ui/components/lists/List.ts +2 -2
  295. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  296. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
  297. package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
  298. package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
  299. package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
  300. package/front_end/ui/components/text_editor/config.ts +2 -2
  301. package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
  302. package/front_end/ui/legacy/ReportView.ts +5 -0
  303. package/front_end/ui/legacy/Treeoutline.ts +18 -0
  304. package/front_end/ui/legacy/View.ts +1 -1
  305. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
  306. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
  307. package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
  308. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  309. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +100 -36
  310. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
  311. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -0
  312. package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
  313. package/front_end/ui/legacy/inspectorCommon.css +5 -0
  314. package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
  315. package/mcp/mcp.ts +2 -0
  316. package/package.json +4 -4
  317. package/front_end/panels/profiler/ProfileView.ts +0 -610
@@ -8,7 +8,7 @@ import type * as Protocol from '../../generated/protocol.js';
8
8
  import * as Bindings from '../bindings/bindings.js';
9
9
  import * as SourceMapScopes from '../source_map_scopes/source_map_scopes.js';
10
10
  import * as Trace from '../trace/trace.js';
11
- import * as Workspace from '../workspace/workspace.js';
11
+ import type * as Workspace from '../workspace/workspace.js';
12
12
 
13
13
  interface ResolvedCodeLocationData {
14
14
  name: string|null;
@@ -26,6 +26,9 @@ export class SourceMappingsUpdated extends Event {
26
26
  export const resolvedCodeLocationDataNames = new Map<string, ResolvedCodeLocationData|null>();
27
27
 
28
28
  export class SourceMapsResolver extends EventTarget {
29
+ readonly #debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
30
+ readonly #targetManager: SDK.TargetManager.TargetManager;
31
+
29
32
  private executionContextNamesByOrigin = new Map<Platform.DevToolsPath.UrlString, string>();
30
33
  #parsedTrace: Trace.TraceModel.ParsedTrace;
31
34
  #entityMapper: Trace.EntityMapper.EntityMapper|null = null;
@@ -39,10 +42,18 @@ export class SourceMapsResolver extends EventTarget {
39
42
  // those workers too.
40
43
  #debuggerModelsToListen = new Set<SDK.DebuggerModel.DebuggerModel>();
41
44
 
42
- constructor(parsedTrace: Trace.TraceModel.ParsedTrace, entityMapper?: Trace.EntityMapper.EntityMapper) {
45
+ constructor(
46
+ parsedTrace: Trace.TraceModel.ParsedTrace,
47
+ entityMapper?: Trace.EntityMapper.EntityMapper,
48
+ debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding =
49
+ Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
50
+ targetManager: SDK.TargetManager.TargetManager = SDK.TargetManager.TargetManager.instance(),
51
+ ) {
43
52
  super();
44
53
  this.#parsedTrace = parsedTrace;
45
54
  this.#entityMapper = entityMapper ?? null;
55
+ this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
56
+ this.#targetManager = targetManager;
46
57
  }
47
58
 
48
59
  static clearResolvedNodeNames(): void {
@@ -85,8 +96,11 @@ export class SourceMapsResolver extends EventTarget {
85
96
  return SourceMapsResolver.resolvedCodeLocationForCallFrame(callFrame as Protocol.Runtime.CallFrame);
86
97
  }
87
98
 
88
- static resolvedURLForEntry(parsedTrace: Trace.TraceModel.ParsedTrace, entry: Trace.Types.Events.Event):
89
- Platform.DevToolsPath.UrlString|null {
99
+ static resolvedURLForEntry(
100
+ parsedTrace: Trace.TraceModel.ParsedTrace,
101
+ entry: Trace.Types.Events.Event,
102
+ workspace: Workspace.Workspace.WorkspaceImpl,
103
+ ): Platform.DevToolsPath.UrlString|null {
90
104
  const resolvedCallFrameURL =
91
105
  SourceMapsResolver.resolvedCodeLocationForEntry(entry)?.devtoolsLocation?.uiSourceCode.url();
92
106
  if (resolvedCallFrameURL) {
@@ -97,13 +111,16 @@ export class SourceMapsResolver extends EventTarget {
97
111
  // to the URL value contained in the event itself, if any.
98
112
  const url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
99
113
  if (url) {
100
- return Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url)?.url() ?? url;
114
+ return workspace.uiSourceCodeForURL(url)?.url() ?? url;
101
115
  }
102
116
  return null;
103
117
  }
104
118
 
105
- static codeLocationForEntry(parsedTrace: Trace.TraceModel.ParsedTrace, entry: Trace.Types.Events.Event):
106
- {url: Platform.DevToolsPath.UrlString, line?: number, column?: number}|null {
119
+ static codeLocationForEntry(
120
+ parsedTrace: Trace.TraceModel.ParsedTrace,
121
+ entry: Trace.Types.Events.Event,
122
+ workspace: Workspace.Workspace.WorkspaceImpl,
123
+ ): {url: Platform.DevToolsPath.UrlString, line?: number, column?: number}|null {
107
124
  const uiLocation = SourceMapsResolver.resolvedCodeLocationForEntry(entry)?.devtoolsLocation;
108
125
  if (uiLocation) {
109
126
  return {url: uiLocation.uiSourceCode.url(), line: uiLocation.lineNumber, column: uiLocation.columnNumber};
@@ -121,7 +138,7 @@ export class SourceMapsResolver extends EventTarget {
121
138
  // Lastly, look for just a url.
122
139
  let url = Trace.Handlers.Helpers.getNonResolvedURL(entry, parsedTrace.data);
123
140
  if (url) {
124
- url = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url)?.url() ?? url;
141
+ url = workspace.uiSourceCodeForURL(url)?.url() ?? url;
125
142
  }
126
143
  if (url) {
127
144
  return {url};
@@ -209,9 +226,7 @@ export class SourceMapsResolver extends EventTarget {
209
226
  const location = debuggerModel &&
210
227
  new SDK.DebuggerModel.Location(
211
228
  debuggerModel, node.callFrame.scriptId, node.callFrame.lineNumber, node.callFrame.columnNumber);
212
- const uiLocation = location &&
213
- await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(
214
- location);
229
+ const uiLocation = location && await this.#debuggerWorkspaceBinding.rawLocationToUILocation(location);
215
230
  updatedMappings ||= Boolean(uiLocation);
216
231
  if (uiLocation?.uiSourceCode.url() && this.#entityMapper) {
217
232
  // Update mappings for the related events of the entity.
@@ -253,13 +268,13 @@ export class SourceMapsResolver extends EventTarget {
253
268
  #targetForThread(tid: Trace.Types.Events.ThreadID): SDK.Target.Target|null {
254
269
  const maybeWorkerId = this.#parsedTrace.data.Workers.workerIdByThread.get(tid);
255
270
  if (maybeWorkerId) {
256
- return SDK.TargetManager.TargetManager.instance().targetById(maybeWorkerId);
271
+ return this.#targetManager.targetById(maybeWorkerId);
257
272
  }
258
- return SDK.TargetManager.TargetManager.instance().primaryPageTarget();
273
+ return this.#targetManager.primaryPageTarget();
259
274
  }
260
275
 
261
276
  #updateExtensionNames(): void {
262
- for (const runtimeModel of SDK.TargetManager.TargetManager.instance().models(SDK.RuntimeModel.RuntimeModel)) {
277
+ for (const runtimeModel of this.#targetManager.models(SDK.RuntimeModel.RuntimeModel)) {
263
278
  for (const context of runtimeModel.executionContexts()) {
264
279
  this.executionContextNamesByOrigin.set(context.origin, context.name);
265
280
  }
@@ -37,9 +37,14 @@ export class Result {
37
37
 
38
38
  get symbolizedError(): Promise<Bindings.SymbolizedError.SymbolizedError|null>|undefined {
39
39
  if (!this.#symbolizedError) {
40
- this.#symbolizedError = this.#exception ?
41
- Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createSymbolizedError(this.#exception) :
42
- Promise.resolve(null);
40
+ if (this.#exception) {
41
+ const target = this.#exception.runtimeModel().target();
42
+ const debuggerWorkspaceBinding =
43
+ target.targetManager().context.get(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding);
44
+ this.#symbolizedError = debuggerWorkspaceBinding.createSymbolizedError(this.#exception);
45
+ } else {
46
+ this.#symbolizedError = Promise.resolve(null);
47
+ }
43
48
  }
44
49
  return this.#symbolizedError;
45
50
  }
@@ -61,9 +66,11 @@ export class Tool {
61
66
  constructor(tool: Protocol.WebMCP.Tool, target: SDK.Target.Target) {
62
67
  this.#target = new WeakRef(target);
63
68
  this.#protocolTool = tool;
64
- this.#stackTrace = tool.stackTrace &&
65
- Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createStackTraceFromProtocolRuntime(
66
- tool.stackTrace, target);
69
+ if (tool.stackTrace) {
70
+ const debuggerWorkspaceBinding =
71
+ target.targetManager().context.get(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding);
72
+ this.#stackTrace = debuggerWorkspaceBinding.createStackTraceFromProtocolRuntime(tool.stackTrace, target);
73
+ }
67
74
  }
68
75
 
69
76
  get stackTrace(): Promise<StackTrace.StackTrace.StackTrace>|undefined {
@@ -90,6 +97,17 @@ export class Tool {
90
97
  return (typeof rawSchema === 'object' && rawSchema !== null) ? rawSchema as JSONSchema7 : {};
91
98
  }
92
99
 
100
+ get flags(): Array<keyof Protocol.WebMCP.Annotation> {
101
+ const annotations = this.#protocolTool.annotations;
102
+ if (!annotations) {
103
+ return [];
104
+ }
105
+
106
+ return (Object.keys(annotations) as Array<keyof Protocol.WebMCP.Annotation>)
107
+ .filter(key => annotations[key] === true)
108
+ .sort();
109
+ }
110
+
93
111
  get frame(): SDK.ResourceTreeModel.ResourceTreeFrame|undefined {
94
112
  return this.#target.deref()
95
113
  ?.model(SDK.ResourceTreeModel.ResourceTreeModel)
@@ -13,27 +13,27 @@ import {projectTypes} from './WorkspaceImpl.js';
13
13
 
14
14
  const UIStrings = {
15
15
  /**
16
- * @description Text to stop preventing the debugger from stepping into library code
16
+ * @description Text to stop preventing the debugger from stepping into library code.
17
17
  */
18
18
  removeFromIgnoreList: 'Remove from ignore list',
19
19
  /**
20
- * @description Text for scripts that should not be stepped into when debugging
20
+ * @description Text for scripts that should not be stepped into when debugging.
21
21
  */
22
22
  addScriptToIgnoreList: 'Add script to ignore list',
23
23
  /**
24
- * @description Text for directories whose scripts should not be stepped into when debugging
24
+ * @description Text for directories whose scripts should not be stepped into when debugging.
25
25
  */
26
26
  addDirectoryToIgnoreList: 'Add directory to ignore list',
27
27
  /**
28
- * @description A context menu item in the Call Stack Sidebar Pane of the Sources panel
28
+ * @description A context menu item in the Call Stack sidebar of the Sources panel.
29
29
  */
30
30
  addAllContentScriptsToIgnoreList: 'Add all extension scripts to ignore list',
31
31
  /**
32
- * @description A context menu item in the Call Stack Sidebar Pane of the Sources panel
32
+ * @description A context menu item in the Call Stack sidebar of the Sources panel.
33
33
  */
34
34
  addAllThirdPartyScriptsToIgnoreList: 'Add all third-party scripts to ignore list',
35
35
  /**
36
- * @description A context menu item in the Call Stack Sidebar Pane of the Sources panel
36
+ * @description A context menu item in the Call Stack sidebar of the Sources panel.
37
37
  */
38
38
  addAllAnonymousScriptsToIgnoreList: 'Add all anonymous scripts to ignore list',
39
39
  } as const;
@@ -14,13 +14,13 @@ import {Events as WorkspaceImplEvents, type Project} from './WorkspaceImpl.js';
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- * @description Text for the index of something
17
+ * @description Text for the index of something.
18
18
  */
19
19
  index: '(index)',
20
20
  /**
21
- * @description Text in UISource Code of the DevTools local workspace
21
+ * @description Text in UISourceCode of the DevTools local workspace.
22
22
  */
23
- thisFileWasChangedExternally: 'This file was changed externally. Would you like to reload it?',
23
+ thisFileWasChangedExternally: 'This file was changed externally. Reload?',
24
24
  } as const;
25
25
  const str_ = i18n.i18n.registerUIStrings('models/workspace/UISourceCode.ts', UIStrings);
26
26
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -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 Root from '../../core/root/root.js';
7
8
  import * as Diff from '../../third_party/diff/diff.js';
8
9
  import * as FormatterModule from '../formatter/formatter.js';
9
10
  import * as Persistence from '../persistence/persistence.js';
@@ -16,15 +17,23 @@ interface DiffResponse {
16
17
  }
17
18
 
18
19
  export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
19
- readonly #persistence = Persistence.Persistence.PersistenceImpl.instance();
20
+ readonly #persistence: Persistence.Persistence.PersistenceImpl;
21
+ readonly #networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager;
20
22
  readonly #diffs = new WeakMap<Workspace.UISourceCode.UISourceCode, UISourceCodeDiff>();
21
23
  /** used in web tests */
22
24
  private readonly loadingUISourceCodes =
23
25
  new Map<Workspace.UISourceCode.UISourceCode, Promise<[string | null, string|null]>>();
24
26
  readonly #modified = new Set<Workspace.UISourceCode.UISourceCode>();
25
27
 
26
- constructor(workspace: Workspace.Workspace.WorkspaceImpl) {
28
+ constructor(
29
+ workspace: Workspace.Workspace.WorkspaceImpl,
30
+ persistence: Persistence.Persistence.PersistenceImpl = Persistence.Persistence.PersistenceImpl.instance(),
31
+ networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager =
32
+ Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance(),
33
+ ) {
27
34
  super();
35
+ this.#persistence = persistence;
36
+ this.#networkPersistenceManager = networkPersistenceManager;
28
37
  workspace.addEventListener(Workspace.Workspace.Events.WorkingCopyChanged, this.#uiSourceCodeChanged, this);
29
38
  workspace.addEventListener(Workspace.Workspace.Events.WorkingCopyCommitted, this.#uiSourceCodeChanged, this);
30
39
  workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, this.#uiSourceCodeAdded, this);
@@ -54,7 +63,7 @@ export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventT
54
63
  #uiSourceCodeDiff(uiSourceCode: Workspace.UISourceCode.UISourceCode): UISourceCodeDiff {
55
64
  let diff = this.#diffs.get(uiSourceCode);
56
65
  if (!diff) {
57
- diff = new UISourceCodeDiff(uiSourceCode);
66
+ diff = new UISourceCodeDiff(uiSourceCode, this.#networkPersistenceManager);
58
67
  this.#diffs.set(uiSourceCode, diff);
59
68
  }
60
69
  return diff;
@@ -195,12 +204,17 @@ export interface EventTypes {
195
204
 
196
205
  export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourceCodeDiffEventTypes> {
197
206
  #uiSourceCode: Workspace.UISourceCode.UISourceCode;
207
+ readonly #networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager;
198
208
  #requestDiffPromise: Promise<DiffResponse|null>|null = null;
199
209
  #pendingChanges: number|null = null;
200
210
  dispose = false;
201
- constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
211
+ constructor(
212
+ uiSourceCode: Workspace.UISourceCode.UISourceCode,
213
+ networkPersistenceManager: Persistence.NetworkPersistenceManager.NetworkPersistenceManager,
214
+ ) {
202
215
  super();
203
216
  this.#uiSourceCode = uiSourceCode;
217
+ this.#networkPersistenceManager = networkPersistenceManager;
204
218
  uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyChanged, this.#uiSourceCodeChanged, this);
205
219
  uiSourceCode.addEventListener(Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#uiSourceCodeChanged, this);
206
220
  }
@@ -233,9 +247,7 @@ export class UISourceCodeDiff extends Common.ObjectWrapper.ObjectWrapper<UISourc
233
247
  }
234
248
 
235
249
  async originalContent(): Promise<string|null> {
236
- const originalNetworkContent =
237
- Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().originalContentForUISourceCode(
238
- this.#uiSourceCode);
250
+ const originalNetworkContent = this.#networkPersistenceManager.originalContentForUISourceCode(this.#uiSourceCode);
239
251
  if (originalNetworkContent) {
240
252
  return await originalNetworkContent;
241
253
  }
@@ -305,11 +317,10 @@ export interface UISourceCodeDiffEventTypes {
305
317
  [UISourceCodeDiffEvents.DIFF_CHANGED]: void;
306
318
  }
307
319
 
308
- let workspaceDiffImplInstance: WorkspaceDiffImpl|null = null;
309
-
310
320
  export function workspaceDiff({forceNew}: {forceNew?: boolean} = {}): WorkspaceDiffImpl {
311
- if (!workspaceDiffImplInstance || forceNew) {
312
- workspaceDiffImplInstance = new WorkspaceDiffImpl(Workspace.Workspace.WorkspaceImpl.instance());
321
+ if (!Root.DevToolsContext.globalInstance().has(WorkspaceDiffImpl) || forceNew) {
322
+ Root.DevToolsContext.globalInstance().set(WorkspaceDiffImpl,
323
+ new WorkspaceDiffImpl(Workspace.Workspace.WorkspaceImpl.instance()));
313
324
  }
314
- return workspaceDiffImplInstance;
325
+ return Root.DevToolsContext.globalInstance().get(WorkspaceDiffImpl);
315
326
  }
@@ -66,7 +66,7 @@ const WALKTHROUGH_SIDEBAR_INITIAL_WIDTH = 400;
66
66
 
67
67
  const UIStrings = {
68
68
  /**
69
- * @description AI assistance UI text creating a new chat.
69
+ * @description AI assistance UI text for creating a new chat.
70
70
  */
71
71
  newChat: 'New chat',
72
72
  /**
@@ -74,11 +74,11 @@ const UIStrings = {
74
74
  */
75
75
  help: 'Help',
76
76
  /**
77
- * @description AI assistant UI tooltip text for the settings button (gear icon).
77
+ * @description AI assistance UI tooltip text for the settings button (gear icon).
78
78
  */
79
79
  settings: 'Settings',
80
80
  /**
81
- * @description AI assistant UI tooltip sending feedback.
81
+ * @description AI assistance UI tooltip for sending feedback.
82
82
  */
83
83
  sendFeedback: 'Send feedback',
84
84
  /**
@@ -90,33 +90,33 @@ const UIStrings = {
90
90
  */
91
91
  chatDeleted: 'Chat deleted',
92
92
  /**
93
- * @description AI assistance UI text creating selecting a history entry.
93
+ * @description AI assistance UI text for selecting a history entry.
94
94
  */
95
95
  history: 'History',
96
96
  /**
97
- * @description AI assistance UI text deleting the current chat session from local history.
97
+ * @description AI assistance UI text for deleting the current chat session from local history.
98
98
  */
99
99
  deleteChat: 'Delete local chat',
100
100
  /**
101
- * @description AI assistance UI text that deletes all local history entries.
101
+ * @description AI assistance UI text for deleting all local history entries.
102
102
  */
103
103
  clearChatHistory: 'Clear local chats',
104
104
  /**
105
- *@description AI assistance UI text for the export conversation button.
105
+ * @description AI assistance UI text for the export conversation button.
106
106
  */
107
107
  exportConversation: 'Export conversation',
108
108
  /**
109
- * @description AI assistance UI text explains that he user had no pas conversations.
109
+ * @description AI assistance UI text explaining that the user has no past conversations.
110
110
  */
111
111
  noPastConversations: 'No past conversations',
112
112
  /**
113
- * @description Placeholder text for an inactive text field. When active, it's used for the user's input to the GenAI assistance.
113
+ * @description Placeholder text for an inactive text field. When active, its used for the users input to AI assistance.
114
114
  */
115
115
  followTheSteps: 'Follow the steps above to ask a question',
116
116
  /**
117
117
  * @description Disclaimer text right after the chat input.
118
118
  */
119
- inputDisclaimerForEmptyState: 'This is an experimental AI feature and won\'t always get it right.',
119
+ inputDisclaimerForEmptyState: 'This is an experimental AI feature and wont always get it right.',
120
120
  /**
121
121
  * @description The message shown in a toast when the response is copied to the clipboard.
122
122
  */
@@ -215,7 +215,7 @@ const UIStringsNotTranslate = {
215
215
  * @description Disclaimer text right after the chat input.
216
216
  */
217
217
  inputDisclaimerForFile:
218
- 'Chat messages and the selected file are sent to Google and may be seen by human reviewers to improve this feature. This is an experimental AI feature and won\'t always get it right.',
218
+ 'Chat messages and the selected file are sent to Google and may be seen by human reviewers to improve this feature. This is an experimental AI feature and wont always get it right.',
219
219
  /**
220
220
  * @description Disclaimer text right after the chat input.
221
221
  */
@@ -225,7 +225,7 @@ const UIStringsNotTranslate = {
225
225
  * @description Disclaimer text right after the chat input.
226
226
  */
227
227
  inputDisclaimerForPerformance:
228
- 'Chat messages and trace data from your performance trace are sent to Google and may be seen by human reviewers to improve this feature. This is an experimental AI feature and won\'t always get it right.',
228
+ 'Chat messages and trace data from your performance trace are sent to Google and may be seen by human reviewers to improve this feature. This is an experimental AI feature and wont always get it right.',
229
229
  /**
230
230
  * @description Disclaimer text right after the chat input.
231
231
  */
@@ -1070,7 +1070,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1070
1070
  isReadOnly: false,
1071
1071
  aidaClient: this.#aidaClient,
1072
1072
  changeManager: this.#changeManager,
1073
- isExternal: false,
1074
1073
  performanceRecordAndReload: this.#handlePerformanceRecordAndReload.bind(this),
1075
1074
  onInspectElement: this.#handleInspectElement.bind(this),
1076
1075
  networkTimeCalculator: NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator(),
@@ -1100,7 +1099,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1100
1099
  isReadOnly: false,
1101
1100
  aidaClient: this.#aidaClient,
1102
1101
  changeManager: this.#changeManager,
1103
- isExternal: false,
1104
1102
  performanceRecordAndReload: this.#handlePerformanceRecordAndReload.bind(this),
1105
1103
  onInspectElement: this.#handleInspectElement.bind(this),
1106
1104
  networkTimeCalculator: NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator(),
@@ -1619,7 +1617,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1619
1617
  isReadOnly: false,
1620
1618
  aidaClient: this.#aidaClient,
1621
1619
  changeManager: this.#changeManager,
1622
- isExternal: false,
1623
1620
  performanceRecordAndReload: this.#handlePerformanceRecordAndReload.bind(this),
1624
1621
  onInspectElement: this.#handleInspectElement.bind(this),
1625
1622
  networkTimeCalculator: NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator(),
@@ -1644,17 +1641,23 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1644
1641
  }
1645
1642
 
1646
1643
  #populateHistoryMenu(contextMenu: UI.ContextMenu.ContextMenu): void {
1647
- const historicalConversations = AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().getHistory().map(
1648
- serializedConversation =>
1649
- AiAssistanceModel.AiConversation.AiConversation.fromSerializedConversation(serializedConversation));
1650
- for (const conversation of historicalConversations.reverse()) {
1651
- if (conversation.isEmpty || !conversation.title) {
1644
+ const history = AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().getHistory();
1645
+ const activeId = this.#conversation?.id;
1646
+
1647
+ for (const serialized of [...history].reverse()) {
1648
+ const isConversationEmpty = serialized.history.length === 0;
1649
+ if (isConversationEmpty) {
1650
+ continue;
1651
+ }
1652
+ const title = AiAssistanceModel.AiConversation.AiConversation.titleForSerialized(serialized);
1653
+ if (!title) {
1652
1654
  continue;
1653
1655
  }
1654
1656
 
1655
- contextMenu.defaultSection().appendCheckboxItem(conversation.title, () => {
1657
+ contextMenu.defaultSection().appendCheckboxItem(title, () => {
1658
+ const conversation = AiAssistanceModel.AiConversation.AiConversation.fromSerializedConversation(serialized);
1656
1659
  void this.#openHistoricConversation(conversation);
1657
- }, {checked: (this.#conversation?.id === conversation.id), jslogContext: 'freestyler.history-item'});
1660
+ }, {checked: activeId === serialized.id, jslogContext: 'freestyler.history-item'});
1658
1661
  }
1659
1662
 
1660
1663
  const historyEmpty = contextMenu.defaultSection().items.length === 0;
@@ -17,10 +17,9 @@ export async function saveToDisk(conversation: AiAssistanceModel.AiConversation.
17
17
  // to 63 characters (due to a 64-byte null-terminated buffer).
18
18
  // Capping the total filename length at 63 avoids truncation of the extension.
19
19
  const maxTitleLength = 63 - prefix.length - suffix.length;
20
- let finalTitle = titleFormatted || 'conversation';
21
- if (finalTitle.length > maxTitleLength) {
22
- finalTitle = finalTitle.substring(0, maxTitleLength);
23
- }
20
+ const truncatedTitle =
21
+ titleFormatted ? Platform.StringUtilities.truncateToCodeUnitLength(titleFormatted, maxTitleLength) : '';
22
+ const finalTitle = truncatedTitle || 'conversation';
24
23
  const filename = `${prefix}${finalTitle}${suffix}` as Platform.DevToolsPath.RawPathString;
25
24
 
26
25
  await Workspace.FileManager.FileManager.instance().save(filename, contentData, true);
@@ -31,7 +31,7 @@ const UIStrings = {
31
31
  enableAiAssistance: 'Enable AI assistance',
32
32
  /**
33
33
  * @description Text of a context menu item to redirect to the AI assistance panel with
34
- * the current context
34
+ * the current context.
35
35
  */
36
36
  debugWithAi: 'Debug with AI',
37
37
  /**
@@ -47,7 +47,7 @@ const UIStrings = {
47
47
  */
48
48
  enableGemini: 'Enable Gemini',
49
49
  /**
50
- * @description Text of a context menu item to redirect to the Gemini panel with the current context
50
+ * @description Text of a context menu item to redirect to the Gemini panel with the current context.
51
51
  */
52
52
  debugWithGemini: 'Debug with Gemini',
53
53
  /**
@@ -56,7 +56,7 @@ const UIStrings = {
56
56
  */
57
57
  wrongLocale: 'To use this feature, set your language preference to English in DevTools settings.',
58
58
  /**
59
- * @description Message shown to the user if the user's region is not
59
+ * @description Message shown to the user if the users region is not
60
60
  * supported.
61
61
  */
62
62
  geoRestricted: 'This feature is unavailable in your region.',
@@ -30,7 +30,7 @@ const UIStrings = {
30
30
  */
31
31
  inputTextAriaDescription: 'You can also use one of the suggested prompts above to start your conversation',
32
32
  /**
33
- * @description Label added to the button that reveals the selected context item in DevTools
33
+ * @description Label added to the button that reveals the selected context item in DevTools.
34
34
  */
35
35
  revealContextDescription: 'Reveal the selected context item in DevTools',
36
36
  /**
@@ -74,7 +74,7 @@ const UIStringsNotTranslate = {
74
74
  /**
75
75
  * @description Text displayed when the chat input is disabled due to reading past conversation.
76
76
  */
77
- pastConversation: 'You\'re viewing a past conversation.',
77
+ pastConversation: 'Youre viewing a past conversation.',
78
78
  /**
79
79
  * @description Message displayed in toast in case of any failures while taking a screenshot of the page.
80
80
  */
@@ -115,6 +115,10 @@ const UIStringsNotTranslate = {
115
115
  */
116
116
  systemError:
117
117
  'Something unforeseen happened and I can no longer continue. Try your request again and see if that resolves the issue. If this keeps happening, update Chrome to the latest version.',
118
+ /**
119
+ * @description The error message when the user is out of quota or rate limited.
120
+ */
121
+ quotaError: 'You reached your limit for AI assistance requests. Try again later.',
118
122
  /**
119
123
  * @description The error message when the LLM gets stuck in a loop (max steps reached).
120
124
  */
@@ -1842,6 +1846,9 @@ function renderError(message: ModelChatMessage): Lit.LitTemplate {
1842
1846
  case AiAssistanceModel.AiAgent.ErrorType.BLOCK:
1843
1847
  errorMessage = UIStringsNotTranslate.systemError;
1844
1848
  break;
1849
+ case AiAssistanceModel.AiAgent.ErrorType.QUOTA:
1850
+ errorMessage = UIStringsNotTranslate.quotaError;
1851
+ break;
1845
1852
  case AiAssistanceModel.AiAgent.ErrorType.MAX_STEPS:
1846
1853
  errorMessage = UIStringsNotTranslate.maxStepsError;
1847
1854
  break;
@@ -15,9 +15,9 @@ import disabledWidgetStyles from './disabledWidget.css.js';
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description The error message when the user is not logged in into Chrome.
18
+ * @description The error message when the user is not signed in to Chrome.
19
19
  */
20
- notLoggedIn: 'This feature is only available when you are signed into Chrome with your Google account',
20
+ notLoggedIn: 'This feature is only available when you are signed in to Chrome with your Google account',
21
21
  /**
22
22
  * @description Message shown when the user is offline.
23
23
  */
@@ -26,76 +26,74 @@ import {AnimationUI} from './AnimationUI.js';
26
26
 
27
27
  const UIStrings = {
28
28
  /**
29
- * @description Timeline hint text content in Animation Timeline of the Animation Inspector if no effect
30
- * is shown.
29
+ * @description Timeline hint text content in the animation timeline of the Animations panel if no effect is shown.
31
30
  * Animation effects are the visual effects of an animation on the page.
32
31
  */
33
32
  noEffectSelected: 'No animation effect selected',
34
33
  /**
35
- * @description Timeline hint text content in Animation Timeline of the Animation Inspector that instructs
36
- * users to select an effect.
34
+ * @description Timeline hint text content in the animation timeline of the Animations panel that instructs users to select an effect.
37
35
  * Animation effects are the visual effects of an animation on the page.
38
36
  */
39
37
  selectAnEffectAboveToInspectAnd: 'Select an effect above to inspect and modify',
40
38
  /**
41
- * @description Text to clear everything
39
+ * @description Text to clear everything.
42
40
  */
43
41
  clearAll: 'Clear all',
44
42
  /**
45
- * @description Tooltip text that appears when hovering over largeicon pause button in Animation Timeline of the Animation Inspector
43
+ * @description Tooltip text that appears when hovering over largeicon pause button in the animation timeline of the Animations panel.
46
44
  */
47
45
  pauseAll: 'Pause all',
48
46
  /**
49
- * @description Title of the playback rate button listbox
47
+ * @description Title of the playback rate button listbox.
50
48
  */
51
49
  playbackRates: 'Playback rates',
52
50
  /**
53
- * @description Text in Animation Timeline of the Animation Inspector
51
+ * @description Text in the animation timeline of the Animations panel.
54
52
  * @example {50} PH1
55
53
  */
56
54
  playbackRatePlaceholder: '{PH1}%',
57
55
  /**
58
- * @description Text of an item that pause the running task
56
+ * @description Text of an item that pauses the running task.
59
57
  */
60
58
  pause: 'Pause',
61
59
  /**
62
- * @description Button title in Animation Timeline of the Animation Inspector
60
+ * @description Button title in the animation timeline of the Animations panel.
63
61
  * @example {50%} PH1
64
62
  */
65
63
  setSpeedToS: 'Set speed to {PH1}',
66
64
  /**
67
- * @description Title of Animation Previews listbox
65
+ * @description Title of Animation previews listbox.
68
66
  */
69
67
  animationPreviews: 'Animation previews',
70
68
  /**
71
- * @description Empty buffer hint text content in Animation Timeline of the Animation Inspector.
69
+ * @description Empty buffer hint text content in the animation timeline of the Animations panel.
72
70
  */
73
71
  waitingForAnimations: 'Currently waiting for animations',
74
72
  /**
75
- * @description Empty buffer hint text content in Animation Timeline of the Animation Inspector that explains the panel.
73
+ * @description Empty buffer hint text content in the animation timeline of the Animations panel that explains the panel.
76
74
  */
77
75
  animationDescription: 'On this page you can inspect and modify animations.',
78
76
  /**
79
- * @description Tooltip text that appears when hovering over largeicon replay animation button in Animation Timeline of the Animation Inspector
77
+ * @description Tooltip text that appears when hovering over largeicon replay animation button in the animation timeline of the Animations panel.
80
78
  */
81
79
  replayTimeline: 'Replay timeline',
82
80
  /**
83
- * @description Text in Animation Timeline of the Animation Inspector
81
+ * @description Text in the animation timeline of the Animations panel.
84
82
  */
85
83
  resumeAll: 'Resume all',
86
84
  /**
87
- * @description Title of control button in animation timeline of the animation inspector
85
+ * @description Title of control button in the animation timeline of the Animations panel.
88
86
  */
89
87
  playTimeline: 'Play timeline',
90
88
  /**
91
- * @description Title of control button in animation timeline of the animation inspector
89
+ * @description Title of control button in the animation timeline of the Animations panel.
92
90
  */
93
91
  pauseTimeline: 'Pause timeline',
94
92
  /**
95
- * @description Title of a specific Animation Preview
93
+ * @description Title of a specific animation preview.
96
94
  * @example {1} PH1
97
95
  */
98
- animationPreviewS: 'Animation Preview {PH1}',
96
+ animationPreviewS: 'Animation preview {PH1}',
99
97
  } as const;
100
98
  const str_ = i18n.i18n.registerUIStrings('panels/animation/AnimationTimeline.ts', UIStrings);
101
99
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -15,15 +15,15 @@ import {type AnimationTimeline, StepTimingFunction} from './AnimationTimeline.js
15
15
 
16
16
  const UIStrings = {
17
17
  /**
18
- * @description Title of the first and last points of an animation
18
+ * @description Title of the first and last points of an animation.
19
19
  */
20
- animationEndpointSlider: 'Animation Endpoint slider',
20
+ animationEndpointSlider: 'Animation endpoint slider',
21
21
  /**
22
- * @description Title of an Animation Keyframe point
22
+ * @description Title of an animation keyframe point.
23
23
  */
24
- animationKeyframeSlider: 'Animation Keyframe slider',
24
+ animationKeyframeSlider: 'Animation keyframe slider',
25
25
  /**
26
- * @description Title of an animation keyframe group
26
+ * @description Title of an animation keyframe group.
27
27
  * @example {anilogo} PH1
28
28
  */
29
29
  sSlider: '{PH1} slider',