chrome-devtools-frontend 1.0.1674545 → 1.0.1676824

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 (258) hide show
  1. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +26 -9
  2. package/WATCHLISTS +0 -4
  3. package/front_end/core/common/ParsedURL.ts +5 -1
  4. package/front_end/core/common/SettingRegistration.ts +29 -8
  5. package/front_end/core/common/Settings.ts +0 -77
  6. package/front_end/core/root/Runtime.ts +4 -5
  7. package/front_end/core/sdk/CSSMetadata.ts +5 -9
  8. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -28
  9. package/front_end/core/sdk/DebuggerModel.ts +50 -30
  10. package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
  11. package/front_end/core/sdk/Script.ts +9 -53
  12. package/front_end/core/sdk/TargetManager.ts +18 -0
  13. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
  14. package/front_end/entrypoints/main/MainImpl.ts +32 -0
  15. package/front_end/foundation/Universe.ts +44 -29
  16. package/front_end/generated/InspectorBackendCommands.ts +3 -1
  17. package/front_end/generated/SupportedCSSProperties.ts +21 -4
  18. package/front_end/generated/protocol-mapping.d.ts +14 -0
  19. package/front_end/generated/protocol-proxy-api.d.ts +10 -0
  20. package/front_end/generated/protocol.ts +35 -0
  21. package/front_end/models/ai_assistance/AiAgent2.ts +11 -0
  22. package/front_end/models/ai_assistance/AiConversation.ts +22 -5
  23. package/front_end/models/ai_assistance/README.md +52 -26
  24. package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
  25. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
  26. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -192
  27. package/front_end/models/ai_assistance/agents/StorageAgent.ts +8 -87
  28. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  29. package/front_end/models/ai_assistance/ai_assistance.ts +16 -0
  30. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
  31. package/front_end/models/ai_assistance/contexts/StorageContext.ts +111 -0
  32. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
  33. package/front_end/models/ai_assistance/skills/README.md +63 -1
  34. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  35. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
  36. package/front_end/models/ai_assistance/skills/performance.md +8 -0
  37. package/front_end/models/ai_assistance/skills/sources.md +16 -0
  38. package/front_end/models/ai_assistance/skills/storage.md +31 -0
  39. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
  40. package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
  41. package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
  42. package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
  43. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +81 -0
  44. package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
  45. package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
  46. package/front_end/models/ai_assistance/tools/Tool.ts +22 -1
  47. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +14 -0
  48. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
  49. package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
  50. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  51. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
  52. package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
  53. package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
  54. package/front_end/models/emulation/DeviceModeModel.ts +60 -71
  55. package/front_end/models/emulation/EmulatedDevices.ts +18 -66
  56. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
  57. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
  58. package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  59. package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  60. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  61. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  62. package/front_end/models/persistence/AutomaticFileSystemManager.ts +2 -2
  63. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
  64. package/front_end/models/persistence/IsolatedFileSystemManager.ts +22 -31
  65. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  66. package/front_end/models/persistence/persistence-meta.ts +9 -9
  67. package/front_end/models/trace/types/TraceEvents.ts +36 -0
  68. package/front_end/models/workspace/FileManager.ts +13 -6
  69. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
  70. package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
  71. package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
  72. package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
  73. package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
  74. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
  75. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
  76. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  77. package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -2
  78. package/front_end/panels/application/IndexedDBViews.ts +65 -63
  79. package/front_end/panels/application/WebMCPView.ts +29 -12
  80. package/front_end/panels/application/components/AdsView.ts +24 -1
  81. package/front_end/panels/application/components/adsView.css +27 -21
  82. package/front_end/panels/autofill/AutofillView.ts +12 -12
  83. package/front_end/panels/autofill/autofill-meta.ts +2 -2
  84. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
  85. package/front_end/panels/common/BadgeNotification.ts +8 -8
  86. package/front_end/panels/common/ExtensionServer.ts +21 -1
  87. package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
  88. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
  89. package/front_end/panels/common/PersistenceUtils.ts +2 -2
  90. package/front_end/panels/common/common.ts +0 -97
  91. package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
  92. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  93. package/front_end/panels/console/ConsoleView.ts +20 -19
  94. package/front_end/panels/elements/ElementsTreeElement.ts +550 -327
  95. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  96. package/front_end/panels/elements/LayoutPane.ts +2 -8
  97. package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
  98. package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
  99. package/front_end/panels/js_timeline/js_timeline-meta.ts +8 -8
  100. package/front_end/panels/layer_viewer/LayerDetailsView.ts +30 -30
  101. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +6 -6
  102. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  103. package/front_end/panels/layer_viewer/Layers3DView.ts +11 -11
  104. package/front_end/panels/layer_viewer/PaintProfilerView.ts +8 -8
  105. package/front_end/panels/layer_viewer/TransformController.ts +3 -3
  106. package/front_end/panels/layer_viewer/layer_viewer-meta.ts +11 -11
  107. package/front_end/panels/media/PlayerMessagesView.ts +149 -68
  108. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -58
  109. package/front_end/panels/mobile_throttling/mobile_throttling.ts +0 -10
  110. package/front_end/panels/network/NetworkPanel.ts +1 -1
  111. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  112. package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
  113. package/front_end/panels/profiler/heapProfiler.css +0 -9
  114. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +7 -0
  115. package/front_end/panels/recorder/RecorderPanel.ts +2 -3
  116. package/front_end/panels/screencast/ScreencastView.ts +148 -138
  117. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -2
  118. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
  119. package/front_end/panels/sources/DebuggerPlugin.ts +9 -58
  120. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  121. package/front_end/panels/sources/UISourceCodeFrame.ts +3 -8
  122. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
  123. package/front_end/panels/timeline/TimelineController.ts +36 -64
  124. package/front_end/panels/timeline/TimelinePanel.ts +11 -8
  125. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  126. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
  127. package/front_end/panels/timeline/timelinePanel.css +0 -10
  128. package/front_end/panels/utils/utils.ts +7 -7
  129. package/front_end/services/tracing/PerformanceTracing.ts +5 -17
  130. package/front_end/third_party/chromium/README.chromium +1 -1
  131. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  132. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  133. package/front_end/third_party/codemirror.next/package.json +2 -2
  134. package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
  135. package/front_end/ui/comments/CommentAnchorResolver.ts +558 -0
  136. package/front_end/ui/comments/CommentManager.ts +640 -0
  137. package/front_end/ui/comments/CommentsOverlayWidget.ts +121 -0
  138. package/front_end/ui/comments/comments.ts +13 -0
  139. package/front_end/ui/comments/commentsOverlay.css +49 -0
  140. package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
  141. package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
  142. package/front_end/ui/components/dialogs/dialogs.ts +4 -0
  143. package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
  144. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
  145. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
  146. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
  147. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
  148. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
  149. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
  150. package/front_end/ui/components/text_editor/text_editor.ts +4 -0
  151. package/front_end/ui/legacy/Toolbar.ts +1 -1
  152. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +40 -0
  153. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
  154. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +270 -162
  155. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
  156. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
  157. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
  158. package/front_end/ui/legacy/components/source_frame/JSONView.ts +8 -1
  159. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -2
  160. package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -0
  161. package/front_end/ui/settings/SettingUIRegistration.ts +59 -6
  162. package/front_end/ui/visual_logging/Debugging.ts +1 -5
  163. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  164. package/front_end/ui/visual_logging/LoggingConfig.ts +21 -0
  165. package/front_end/ui/visual_logging/visual_logging.ts +9 -0
  166. package/mcp/mcp.ts +6 -1
  167. package/package.json +1 -1
  168. package/front_end/Images/toolbarResizerVertical.png +0 -0
  169. package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
  170. package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
  171. package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
  172. package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
  173. package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
  174. package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
  175. package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
  176. package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
  177. package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
  178. package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
  179. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
  180. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
  181. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
  182. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
  183. package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
  184. package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
  185. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
  186. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
  187. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
  188. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
  189. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
  190. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
  191. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
  192. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
  193. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
  194. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
  195. package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
  196. package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
  197. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
  198. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
  199. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
  200. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
  201. package/front_end/emulated_devices/iPad-landscape.svg +0 -73
  202. package/front_end/emulated_devices/iPad-portrait.svg +0 -76
  203. package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
  204. package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
  205. package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
  206. package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
  207. package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
  208. package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
  209. package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  210. package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  211. package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  212. package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  213. package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  214. package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  215. package/front_end/emulated_devices/optimized/README.md +0 -9
  216. package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  217. package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  218. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  219. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  220. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  221. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  222. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  223. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  224. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  225. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  226. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  227. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  228. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  229. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  230. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  231. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  232. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  233. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  234. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  235. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  236. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  237. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  238. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  239. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  240. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  241. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  242. package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  243. package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  244. package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  245. package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  246. package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  247. package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  248. package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  249. package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  250. package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
  251. package/front_end/models/ai_assistance/agents/README.md +0 -136
  252. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +0 -92
  253. /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
  254. /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
  255. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
  256. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
  257. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
  258. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
@@ -14,21 +14,21 @@ import {AccessibilitySubPane} from './AccessibilitySubPane.js';
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- * @description Name of a tool which allows the developer to view the contents of the page in the
18
- * 'source order' (the order in which the HTML elements show up in the source code). In the
19
- * Accessibility panel.
17
+ * @description Name of a feature that allows the developer to view the contents of the page in the
18
+ * 'source order' (the order in which the HTML elements show up in the source code) under the
19
+ * Accessibility tab in the Elements panel.
20
20
  */
21
- sourceOrderViewer: 'Source Order Viewer',
21
+ sourceOrderViewer: 'Source order viewer',
22
22
  /**
23
- * @description Text in Source Order Viewer of the Accessibility panel shown when the selected node has no child elements
23
+ * @description Text in the source order viewer under the Accessibility tab of the Elements panel shown when the selected node has no child elements.
24
24
  */
25
25
  noSourceOrderInformation: 'No source order information available',
26
26
  /**
27
- * @description Text in Source Order Viewer of the Accessibility panel shown when the selected node has many child elements
27
+ * @description Text in the source order viewer under the Accessibility tab of the Elements panel shown when the selected node has many child elements.
28
28
  */
29
29
  thereMayBeADelayInDisplaying: 'There may be a delay in displaying source order for elements with many children',
30
30
  /**
31
- * @description Checkbox label in Source Order Viewer of the Accessibility panel. Source order
31
+ * @description Checkbox label in the source order viewer under the Accessibility tab of the Elements panel. Source order
32
32
  * means the order in which the HTML elements show up in the source code.
33
33
  */
34
34
  showSourceOrder: 'Show source order',
@@ -11,11 +11,11 @@ let loadedAccessibilityModule: (typeof Accessibility|undefined);
11
11
 
12
12
  const UIStrings = {
13
13
  /**
14
- * @description Text for accessibility of the web page
14
+ * @description Title of the Accessibility tab in the Elements panel.
15
15
  */
16
16
  accessibility: 'Accessibility',
17
17
  /**
18
- * @description Command for showing the 'Accessibility' tool
18
+ * @description Command for showing the Accessibility tab in the Elements panel.
19
19
  */
20
20
  shoAccessibility: 'Show Accessibility',
21
21
  } as const;
@@ -543,12 +543,12 @@ function createPerformanceTraceContext(focus: AiAssistanceModel.AIContext.AgentF
543
543
  return new AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext(focus);
544
544
  }
545
545
 
546
- function createStorageContext(item: AiAssistanceModel.StorageItem.StorageItem|null):
547
- AiAssistanceModel.StorageAgent.StorageContext|null {
546
+ function createStorageContext(item: AiAssistanceModel.StorageItem.StorageItem|
547
+ null): AiAssistanceModel.StorageContext.StorageContext|null {
548
548
  if (!item) {
549
549
  return null;
550
550
  }
551
- return new AiAssistanceModel.StorageAgent.StorageContext(item);
551
+ return new AiAssistanceModel.StorageContext.StorageContext(item);
552
552
  }
553
553
 
554
554
  /**
@@ -606,7 +606,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
606
606
  #selectedRequest: AiAssistanceModel.RequestContext.RequestContext|null = null;
607
607
 
608
608
  #selectedAccessibility: AiAssistanceModel.AccessibilityContext.AccessibilityContext|null = null;
609
- #selectedStorage: AiAssistanceModel.StorageAgent.StorageContext|null = null;
609
+ #selectedStorage: AiAssistanceModel.StorageContext.StorageContext|null = null;
610
610
 
611
611
  // Messages displayed in the `ChatView` component.
612
612
 
@@ -1640,7 +1640,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1640
1640
 
1641
1641
  } else if (data instanceof AiAssistanceModel.AccessibilityContext.AccessibilityContext) {
1642
1642
  this.#selectedAccessibility = data;
1643
- } else if (data instanceof AiAssistanceModel.StorageAgent.StorageContext) {
1643
+ } else if (data instanceof AiAssistanceModel.StorageContext.StorageContext) {
1644
1644
  this.#selectedStorage = data;
1645
1645
  }
1646
1646
 
@@ -110,9 +110,8 @@ export class AIv2MarkdownRenderer extends MarkdownView.MarkdownView.MarkdownInsi
110
110
  return html`${fallbackText}`;
111
111
  }
112
112
  if (href.startsWith('#file-')) {
113
- const file = AiAssistanceModel.ContextSelectionAgent.ContextSelectionAgent.getUISourceCodes().find(
114
- file => AiAssistanceModel.ContextSelectionAgent.ContextSelectionAgent.uiSourceCodeId.get(file) ===
115
- Number(href.substring(6)));
113
+ const file = AiAssistanceModel.ListSources.ListSourcesTool.getUISourceCodes().find(
114
+ file => AiAssistanceModel.ListSources.ListSourcesTool.uiSourceCodeId.get(file) === Number(href.substring(6)));
116
115
 
117
116
  if (file) {
118
117
  return this.#revealableLink(file, file.name());
@@ -194,7 +194,7 @@ function getContextRemoveLabel(context: AiAssistanceModel.AiAgent.ConversationCo
194
194
  if (context instanceof AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext) {
195
195
  return lockedString(UIStringsNotTranslate.removeContextPerfInsight);
196
196
  }
197
- if (context instanceof AiAssistanceModel.StorageAgent.StorageContext) {
197
+ if (context instanceof AiAssistanceModel.StorageContext.StorageContext) {
198
198
  return lockedString(UIStringsNotTranslate.removeContextStorage);
199
199
  }
200
200
  return lockedString(UIStringsNotTranslate.removeContext);
@@ -371,7 +371,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
371
371
  html`<devtools-icon class="icon" name="performance" title="Lighthouse"></devtools-icon>` :
372
372
  input.context instanceof AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext ?
373
373
  html`<devtools-icon class="icon" name="performance" title="Performance"></devtools-icon>` :
374
- input.context instanceof AiAssistanceModel.StorageAgent.StorageContext ?
374
+ input.context instanceof AiAssistanceModel.StorageContext.StorageContext ?
375
375
  html`<devtools-icon class="icon" name="table" title="Storage"></devtools-icon>` :
376
376
  Lit.nothing}
377
377
  <span
@@ -15,8 +15,9 @@ import type * as Protocol from '../../../generated/protocol.js';
15
15
  import type {
16
16
  AiWidget, BottomUpTreeAiWidget, ComputedStyleAiWidget, CoreVitalsAiWidget, DomTreeAiWidget, LighthouseReportAiWidget,
17
17
  NetworkRequestGeneralHeadersAiWidget, NetworkRequestsListAiWidget, NetworkTrackAiWidget, PerfInsightAiWidget,
18
- PerformanceTraceAiWidget, SourceCodeAiWidget, SourceFileAiWidget, SourceFilesListAiWidget, StylePropertiesAiWidget,
19
- TimelineEventSummaryAiWidget, TimelineRangeSummaryAiWidget} from '../../../models/ai_assistance/agents/AiAgent.js';
18
+ PerformanceTraceAiWidget, SourceCodeAiWidget, SourceFileAiWidget, SourceFilesListAiWidget, StorageBreakdownAiWidget,
19
+ StylePropertiesAiWidget, TimelineEventSummaryAiWidget,
20
+ TimelineRangeSummaryAiWidget} from '../../../models/ai_assistance/agents/AiAgent.js';
20
21
  import * as AiAssistanceModel from '../../../models/ai_assistance/ai_assistance.js';
21
22
  import * as ComputedStyle from '../../../models/computed_style/computed_style.js';
22
23
  import * as Formatter from '../../../models/formatter/formatter.js';
@@ -421,6 +422,14 @@ const UIStringsNotTranslate = {
421
422
  * @description Title for the source files list widget.
422
423
  */
423
424
  inspectedFileNames: 'Inspected file names',
425
+ /**
426
+ * @description Title for the storage breakdown widget.
427
+ */
428
+ storageBreakdown: 'Storage breakdown',
429
+ /**
430
+ * @description Accessible label for the reveal button in the storage breakdown widget.
431
+ */
432
+ revealStorageBreakdown: 'Reveal storage breakdown in Application panel',
424
433
  } as const;
425
434
 
426
435
  /**
@@ -1006,6 +1015,16 @@ async function resolveNode(backendNodeId: Protocol.DOM.BackendNodeId): Promise<S
1006
1015
  return resolved;
1007
1016
  }
1008
1017
 
1018
+ async function makeStorageBreakdownWidget(_widgetData: StorageBreakdownAiWidget): Promise<WidgetMakerResponse|null> {
1019
+ return {
1020
+ renderedWidget: html`<div>Storage Breakdown Stub</div>`,
1021
+ title: lockedString(UIStringsNotTranslate.storageBreakdown),
1022
+ revealable: null,
1023
+ accessibleRevealLabel: lockedString(UIStringsNotTranslate.revealStorageBreakdown),
1024
+ jslogContext: 'storage-breakdown-widget',
1025
+ };
1026
+ }
1027
+
1009
1028
  async function makeComputedStyleWidget(widgetData: ComputedStyleAiWidget): Promise<WidgetMakerResponse|null> {
1010
1029
  const domNodeForId = await resolveNode(widgetData.data.backendNodeId);
1011
1030
  if (!domNodeForId) {
@@ -1678,6 +1697,9 @@ export function getWidgetSignature(widget: AiWidget): string {
1678
1697
  return `${widget.name}:${widget.data.url}:${widget.data.line ?? ''}:${widget.data.column ?? ''}`;
1679
1698
  case 'NETWORK_REQUESTS_LIST':
1680
1699
  return `${widget.name}:${widget.data.requests.map(r => r.requestId()).join(',')}`;
1700
+ case 'STORAGE_BREAKDOWN':
1701
+ return `${widget.name}:${widget.data.totalUsageBytes}:${
1702
+ widget.data.usageBreakdown.map(e => `${e.storageType}_${e.bytes}`).join(',')}`;
1681
1703
  default:
1682
1704
  Platform.assertNever(widget, 'Unknown AiWidget name');
1683
1705
  }
@@ -1785,6 +1807,9 @@ async function renderWidgets(
1785
1807
  case 'SOURCE_CODE':
1786
1808
  response = await makeSourceCodeWidget(widgetData);
1787
1809
  break;
1810
+ case 'STORAGE_BREAKDOWN':
1811
+ response = await makeStorageBreakdownWidget(widgetData);
1812
+ break;
1788
1813
  default:
1789
1814
  Platform.assertNever(widgetData, 'Unknown AiWidget name');
1790
1815
  }
@@ -254,7 +254,6 @@ export interface IndexedDBDataViewInput {
254
254
  onKeyFilterChange: (value: string) => void;
255
255
  onRowSelected: (rowNumber: number) => void;
256
256
  deleteEntry: (entry: Entry) => Promise<void>;
257
- populateContextMenu: (e: CustomEvent<UI.ContextMenu.ContextMenu>, entry: Entry) => void;
258
257
  }
259
258
 
260
259
  const renderKeyPathString = (keyPathString: string): LitTemplate => {
@@ -272,6 +271,21 @@ const renderKeyColumnHeader = (prefix: string, keyPath: string|string[]|null|und
272
271
  renderKeyPathString(keyPath)})`;
273
272
  };
274
273
 
274
+ const populateContextMenu = (e: CustomEvent<UI.ContextMenu.ContextMenu>): void => {
275
+ const row = e.currentTarget as HTMLElement;
276
+ const widgetElement = row.querySelector('.value-column devtools-widget');
277
+ const widget = widgetElement ? UI.Widget.Widget.get(widgetElement) as ObjectPropertiesSectionWidget : null;
278
+ if (widget?.objectTree) {
279
+ const contextMenu = e.detail;
280
+ contextMenu.revealSection().appendItem(i18nString(UIStrings.expandRecursively), () => {
281
+ void widget.expandRecursively();
282
+ }, {jslogContext: 'expand-recursively'});
283
+ contextMenu.revealSection().appendItem(i18nString(UIStrings.collapse), () => {
284
+ widget.expanded = false;
285
+ }, {jslogContext: 'collapse'});
286
+ }
287
+ };
288
+
275
289
  const renderDataGrid = (input: IndexedDBDataViewInput): LitTemplate => {
276
290
  const keyPath = input.isIndex && input.index ? input.index.keyPath : input.objectStore.keyPath;
277
291
  // clang-format off
@@ -284,17 +298,20 @@ const renderDataGrid = (input: IndexedDBDataViewInput): LitTemplate => {
284
298
  ${input.isIndex ? html`<th id="primary-key">${renderKeyColumnHeader(i18nString(UIStrings.primaryKey), input.objectStore.keyPath)}</th>` : nothing}
285
299
  <th id="value">${i18nString(UIStrings.valueString)}</th>
286
300
  </tr>
287
- ${repeat(input.entries, (_entry, index) => index, (entry, index) => html`
288
- <tr ?selected=${index + input.skipCount === input.selectedRowNumber}
289
- @select=${() => input.onRowSelected(index + input.skipCount)}
290
- @delete=${() => input.deleteEntry(entry)}
291
- @contextmenu=${(e: CustomEvent<UI.ContextMenu.ContextMenu>) => input.populateContextMenu(e, entry)}>
292
- <td>${index + input.skipCount}</td>
293
- <td>${widget(ObjectPropertiesSectionWidget, {value: entry.key})}</td>
294
- ${input.isIndex ? html`<td>${widget(ObjectPropertiesSectionWidget, {value: entry.primaryKey})}</td>` : nothing}
295
- <td class="value-column">${widget(ObjectPropertiesSectionWidget, {value: entry.value})}</td>
296
- </tr>`,
297
- )}
301
+ ${repeat(input.entries, (_entry, index) => index, (entry, index) => {
302
+ return html`
303
+ <tr ?selected=${index + input.skipCount === input.selectedRowNumber}
304
+ class="data-grid-data-row"
305
+ @select=${() => input.onRowSelected(index + input.skipCount)}
306
+ @delete=${() => input.deleteEntry(entry)}
307
+ @contextmenu=${populateContextMenu}>
308
+ <td>${index + input.skipCount}</td>
309
+ <td>${widget(ObjectPropertiesSectionWidget, {value: entry.key})}</td>
310
+ ${input.isIndex ? html`<td>${widget(ObjectPropertiesSectionWidget, {value: entry.primaryKey})}</td>`
311
+ : nothing}
312
+ <td class="value-column">${widget(ObjectPropertiesSectionWidget, {value: entry.value})}</td>
313
+ </tr>`;
314
+ })}
298
315
  </table>`}>
299
316
  </devtools-data-grid>`;
300
317
  // clang-format on
@@ -467,31 +484,6 @@ export class IDBDataView extends UI.View.SimpleView {
467
484
  this.updateData(false);
468
485
  }
469
486
 
470
- private populateContextMenu(e: CustomEvent<UI.ContextMenu.ContextMenu>, {value}: Entry): void {
471
- const contextMenu = e.detail;
472
- if (value && value.hasChildren) {
473
- const tr = e.currentTarget as HTMLElement;
474
- const valueTd = tr.querySelector('.value-column');
475
- if (valueTd) {
476
- const widgetEl = valueTd.querySelector('devtools-widget');
477
- if (widgetEl) {
478
- const widget = UI.Widget.Widget.get(widgetEl);
479
- if (widget instanceof ObjectPropertiesSectionWidget) {
480
- const objectUi = widget.objectPropertiesSection;
481
- if (objectUi) {
482
- contextMenu.revealSection().appendItem(i18nString(UIStrings.expandRecursively), () => {
483
- void objectUi.objectTreeElement().expandRecursively();
484
- }, {jslogContext: 'expand-recursively'});
485
- contextMenu.revealSection().appendItem(i18nString(UIStrings.collapse), () => {
486
- objectUi.objectTreeElement().collapse();
487
- }, {jslogContext: 'collapse'});
488
- }
489
- }
490
- }
491
- }
492
- }
493
- }
494
-
495
487
  refreshData(): void {
496
488
  this.updateData(true);
497
489
  }
@@ -683,43 +675,33 @@ export class IDBDataView extends UI.View.SimpleView {
683
675
  },
684
676
  onRowSelected: this.onRowSelected.bind(this),
685
677
  deleteEntry: this.deleteEntry.bind(this),
686
- populateContextMenu: this.populateContextMenu.bind(this),
687
678
  },
688
679
  undefined, this.element);
689
680
  }
690
681
  }
691
682
 
692
683
  interface ObjectPropertiesSectionWidgetInput {
693
- value: SDK.RemoteObject.RemoteObject|null;
694
- }
695
-
696
- interface ObjectPropertiesSectionWidgetOutput {
697
- objectPropSection: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection|null;
684
+ objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null;
698
685
  }
699
686
 
700
687
  type ObjectPropertiesSectionWidgetView = (
701
688
  input: ObjectPropertiesSectionWidgetInput,
702
- output: ObjectPropertiesSectionWidgetOutput,
689
+ output: void,
703
690
  target: HTMLElement,
704
691
  ) => void;
705
692
 
706
693
  const OBJECT_PROPERTIES_SECTION_WIDGET_DEFAULT_VIEW: ObjectPropertiesSectionWidgetView = (input, output, target) => {
707
- if (!input.value) {
708
- output.objectPropSection = null;
694
+ if (!input.objectTree) {
709
695
  render(nothing, target);
710
696
  return;
711
697
  }
712
- const objectPropSection = ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection.defaultObjectPropertiesSection(
713
- input.value, undefined /* linkifier */, true /* skipProto */, true /* readOnly */);
714
- output.objectPropSection = objectPropSection;
715
-
716
- const element = input.value.hasChildren ? objectPropSection.element : objectPropSection.titleElement;
717
- render(html`${element}`, target);
698
+ render(ObjectUI.ObjectPropertiesSection.defaultObjectPresentation(input.objectTree, undefined /* linkifier */,
699
+ true /* skipProto */, true /* readOnly */),
700
+ target);
718
701
  };
719
702
 
720
- class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
721
- #value: SDK.RemoteObject.RemoteObject|null = null;
722
- #objectPropSection: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection|null = null;
703
+ export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
704
+ #objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null = null;
723
705
  readonly #view: ObjectPropertiesSectionWidgetView;
724
706
 
725
707
  constructor(element?: HTMLElement, view = OBJECT_PROPERTIES_SECTION_WIDGET_DEFAULT_VIEW) {
@@ -728,20 +710,40 @@ class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
728
710
  }
729
711
 
730
712
  set value(value: SDK.RemoteObject.RemoteObject|null) {
731
- if (this.#value === value) {
732
- return;
713
+ if (value) {
714
+ this.#objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(value, {
715
+ readOnly: true,
716
+ propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
717
+ });
718
+ } else {
719
+ this.#objectTree = null;
733
720
  }
734
- this.#value = value;
735
721
  this.requestUpdate();
736
722
  }
737
723
 
738
- get objectPropertiesSection(): ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection|null {
739
- return this.#objectPropSection;
724
+ get objectTree(): ObjectUI.ObjectPropertiesSection.ObjectTree|null {
725
+ return this.#objectTree;
726
+ }
727
+
728
+ get expanded(): boolean {
729
+ return this.#objectTree?.expanded ?? false;
730
+ }
731
+
732
+ set expanded(expanded: boolean) {
733
+ if (this.#objectTree) {
734
+ this.#objectTree.expanded = expanded;
735
+ this.requestUpdate();
736
+ }
737
+ }
738
+
739
+ async expandRecursively(): Promise<void> {
740
+ if (this.#objectTree) {
741
+ await this.#objectTree.expandRecursively(ObjectUI.ObjectPropertiesSection.EXPANDABLE_MAX_DEPTH);
742
+ this.requestUpdate();
743
+ }
740
744
  }
741
745
 
742
746
  override performUpdate(): void {
743
- const output: ObjectPropertiesSectionWidgetOutput = {objectPropSection: null};
744
- this.#view({value: this.#value}, output, this.contentElement);
745
- this.#objectPropSection = output.objectPropSection;
747
+ this.#view({objectTree: this.#objectTree}, undefined, this.contentElement);
746
748
  }
747
749
  }
@@ -198,6 +198,14 @@ const UIStrings = {
198
198
  * @description Label for a list of tool flags or attributes
199
199
  */
200
200
  flags: 'Flags',
201
+ /**
202
+ * @description Text for the label of the tool description
203
+ */
204
+ description: 'Description',
205
+ /**
206
+ * @description Text for the label of the tool origin
207
+ */
208
+ origin: 'Origin',
201
209
  } as const;
202
210
  const str_ = i18n.i18n.registerUIStrings('panels/application/WebMCPView.ts', UIStrings);
203
211
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -243,6 +251,7 @@ export interface ViewInput {
243
251
  selectedCall: WebMCP.WebMCPModel.Call|null;
244
252
  selectedTab?: TabId;
245
253
  onCallSelect: (call: WebMCP.WebMCPModel.Call|null, tabId?: TabId) => void;
254
+ onTabSelect: (tabId: TabId) => void;
246
255
  filters: FilterState;
247
256
  filterButtons: FilterMenuButtons;
248
257
  onClearLogClick: () => void;
@@ -294,7 +303,7 @@ export function filterToolCalls(toolCalls: WebMCP.WebMCPModel.Call[],
294
303
  const regex = Platform.StringUtilities.createPlainTextSearchRegex(filterState.text, 'i');
295
304
  filtered = filtered.filter(call => {
296
305
  return regex.test(call.tool.name) || regex.test(call.input) ||
297
- (call.result?.output && regex.test(JSON.stringify(call.result.output))) ||
306
+ (call.result?.output !== undefined && regex.test(JSON.stringify(call.result.output))) ||
298
307
  (call.result?.errorText && regex.test(call.result.errorText));
299
308
  });
300
309
  }
@@ -560,7 +569,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
560
569
  <td @click=${(e: Event) => {
561
570
  e.stopPropagation();
562
571
  input.onCallSelect(call, TabId.OUTPUT);
563
- }}>${call.result?.output ? JSON.stringify(call.result.output)
572
+ }}>${call.result?.output !== undefined ? JSON.stringify(call.result.output)
564
573
  : call.result?.errorText ?? ''}</td>
565
574
  ` : nothing}
566
575
  </tr>
@@ -569,7 +578,9 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
569
578
  </devtools-data-grid>
570
579
  </div>
571
580
  <div slot="sidebar" style="height: 100%; display: flex; flex-direction: column; overflow: hidden;">
572
- <devtools-tabbed-pane class="call-details-tabbed-pane">
581
+ <devtools-tabbed-pane
582
+ class="call-details-tabbed-pane"
583
+ @select=${(e: Event) => input.onTabSelect((e as CustomEvent<{tabId: TabId}>).detail.tabId)}>
573
584
  <devtools-button
574
585
  slot="left"
575
586
  .iconName=${'cross'}
@@ -580,19 +591,19 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
580
591
  ></devtools-button>
581
592
  <devtools-widget
582
593
  id=${TabId.DETAILS}
583
- ?selected=${input.selectedTab === TabId.DETAILS}
594
+ ?selected=${Directives.live(input.selectedTab === TabId.DETAILS)}
584
595
  title=${i18nString(UIStrings.toolDetails)}
585
596
  ${widget(ToolDetailsWidget, {tool: input.selectedCall?.tool, isUnregistered: input.selectedCall ? !input.tools.includes(input.selectedCall.tool) : false})}>
586
597
  </devtools-widget>
587
598
  <devtools-widget
588
599
  id=${TabId.INPUT}
589
- ?selected=${input.selectedTab === TabId.INPUT}
600
+ ?selected=${Directives.live(input.selectedTab === TabId.INPUT)}
590
601
  title=${i18nString(UIStrings.input)}
591
602
  ${widget(PayloadWidget, parsePayload(input.selectedCall?.input))}>
592
603
  </devtools-widget>
593
604
  <devtools-widget
594
605
  id=${TabId.OUTPUT}
595
- ?selected=${input.selectedTab === TabId.OUTPUT}
606
+ ?selected=${Directives.live(input.selectedTab === TabId.OUTPUT)}
596
607
  title=${i18nString(UIStrings.output)}
597
608
  ${widget(PayloadWidget, {
598
609
  valueObject: input.selectedCall?.result?.output,
@@ -714,7 +725,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
714
725
  } as ProtocolMonitor.JSONEditor.Command,
715
726
  });
716
727
  }
717
- }}>Run tool</devtools-button>
728
+ }}>${i18nString(UIStrings.runTool)}</devtools-button>
718
729
  ` : nothing}
719
730
  </div>
720
731
  </devtools-split-view>
@@ -908,9 +919,13 @@ export class WebMCPView extends UI.Widget.VBox {
908
919
  this.#selectedTab = tabId;
909
920
  } else {
910
921
  this.#selectedCall = call;
922
+ this.#selectedTab = undefined;
911
923
  }
912
924
  this.requestUpdate();
913
925
  },
926
+ onTabSelect: tabId => {
927
+ this.#selectedTab = tabId;
928
+ },
914
929
  toolCalls: filteredCalls,
915
930
  filters: this.#filterState,
916
931
  filterButtons: this.#filterButtons,
@@ -959,7 +974,8 @@ export interface PayloadViewInput {
959
974
  }
960
975
 
961
976
  export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, target: HTMLElement): void => {
962
- if (!input.valueObject && !input.valueString && !input.errorText && !input.symbolizedError) {
977
+ if (input.valueObject === undefined && input.valueString === undefined && !input.errorText &&
978
+ !input.symbolizedError) {
963
979
  render(nothing, target);
964
980
  return;
965
981
  }
@@ -971,6 +987,7 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
971
987
  readOnly: true,
972
988
  propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
973
989
  });
990
+ objectTree.expanded = true;
974
991
  return html`<devtools-tree .template=${html`
975
992
  <style>${ObjectUI.ObjectPropertiesSection.objectValueStyles}</style>
976
993
  <style>${ObjectUI.ObjectPropertiesSection.objectPropertiesSectionStyles}</style>
@@ -1124,9 +1141,9 @@ const TOOL_DETAILS_VIEW = (input: ToolDetailsViewInput, output: undefined, targe
1124
1141
  render(html`
1125
1142
  <style>${webMCPViewStyles}</style>
1126
1143
  <div class="tool-details-grid">
1127
- <div class="label">Name</div>
1144
+ <div class="label">${i18nString(UIStrings.name)}</div>
1128
1145
  <div class="value source-code">${tool.name}</div>
1129
- <div class="label">Description</div>
1146
+ <div class="label">${i18nString(UIStrings.description)}</div>
1130
1147
  <div class="value">${tool.description}</div>
1131
1148
  ${flags.length > 0 ? html`
1132
1149
  <div class="label">${i18nString(UIStrings.flags)}</div>
@@ -1137,7 +1154,7 @@ const TOOL_DETAILS_VIEW = (input: ToolDetailsViewInput, output: undefined, targe
1137
1154
  <div class="value">${Components.Linkifier.Linkifier.linkifyRevealable(tool.frame, tool.frame.displayName())}</div>
1138
1155
  ` : nothing}
1139
1156
  ${origin instanceof SDK.DOMModel.DOMNode ? html`
1140
- <div class="label">Origin</div>
1157
+ <div class="label">${i18nString(UIStrings.origin)}</div>
1141
1158
  <div class="value tool-origin-container">
1142
1159
  <span
1143
1160
  class="node-text-container source-code tool-origin-node"
@@ -1161,7 +1178,7 @@ const TOOL_DETAILS_VIEW = (input: ToolDetailsViewInput, output: undefined, targe
1161
1178
  @click=${() => input.revealNode(origin)}
1162
1179
  ></devtools-button>
1163
1180
  </div>` : origin ? html`
1164
- <div class="label">Origin</div>
1181
+ <div class="label">${i18nString(UIStrings.origin)}</div>
1165
1182
  <div class="value stack-trace">
1166
1183
  ${widget(Components.JSPresentationUtils.StackTracePreviewContent,
1167
1184
  {stackTrace: origin, options: { expandable: true}})}
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import '../../../ui/legacy/components/data_grid/data_grid.js';
6
+ import '../../../ui/kit/kit.js';
6
7
 
7
8
  import * as Common from '../../../core/common/common.js';
8
9
  import * as i18n from '../../../core/i18n/i18n.js';
@@ -89,6 +90,14 @@ const UIStrings = {
89
90
  * @description Explanation text for the 'Highlight ads' setting.
90
91
  */
91
92
  highlightsElementsRedDetectedToBe: 'Highlights elements (red) detected to be ads.',
93
+ /**
94
+ * @description Text explaining that ad detection is not perfect.
95
+ */
96
+ adDetectionMistakes: 'Chrome’s ad detection can make mistakes.',
97
+ /**
98
+ * @description Link text for learning more about ad detection in Chrome.
99
+ */
100
+ learnMore: 'Learn more',
92
101
  } as const;
93
102
 
94
103
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/AdsView.ts', UIStrings);
@@ -203,6 +212,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
203
212
  </dd>
204
213
  </div>
205
214
  </dl>
215
+ <hr class="divider">
206
216
  <div class="ad-frames-title">${i18nString(UIStrings.adIframesTitle, {PH1: input.adFrames.length})}</div>
207
217
  <div class="ad-frames-container">
208
218
  <devtools-data-grid striped resize="last" class="ad-frames-data-grid" name=${i18nString(UIStrings.adIframes)}>
@@ -232,14 +242,27 @@ const DEFAULT_VIEW: View = (input, output, target) => {
232
242
  </table>
233
243
  </devtools-data-grid>
234
244
  </div>
245
+ <hr class="divider">
235
246
  <div class="settings-title">${i18nString(UIStrings.settings)}</div>
236
- <devtools-checkbox class="setting-container"
247
+ <devtools-checkbox class="setting-container small"
237
248
  ${bindToSetting(Common.Settings.Settings.instance().moduleSetting('show-ad-highlights'))}>
238
249
  <div class="setting-text-container">
239
250
  <div class="setting-label">${i18nString(UIStrings.highlightAds)}</div>
240
251
  <div class="setting-explanation">${i18nString(UIStrings.highlightsElementsRedDetectedToBe)}</div>
241
252
  </div>
242
253
  </devtools-checkbox>
254
+ <hr class="divider">
255
+ <div class="footer-text">
256
+ <devtools-icon class="inline-icon" name="info"></devtools-icon>
257
+ &#32;
258
+ <span>
259
+ ${i18nString(UIStrings.adDetectionMistakes)}
260
+ &#32;
261
+ <devtools-link class="link devtools-link" href="https://chromium.googlesource.com/chromium/src/+/main/docs/ad_tagging.md" jslogcontext="learn-more">
262
+ ${i18nString(UIStrings.learnMore)}
263
+ </devtools-link>
264
+ </span>
265
+ </div>
243
266
  </div>
244
267
  `, target);
245
268
  // clang-format on