chrome-devtools-frontend 1.0.1579812 → 1.0.1581708

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 (351) hide show
  1. package/agents/prompts/creating-a-model.md +51 -0
  2. package/agents/prompts/merging-devtools-module.md +144 -0
  3. package/agents/prompts/ui-widgets.md +351 -0
  4. package/agents/prompts/verification.md +2 -1
  5. package/docs/contributing/README.md +5 -6
  6. package/docs/contributing/changes.md +1 -2
  7. package/docs/feature-specs/elements-tree-edit-html.md +14 -0
  8. package/docs/feature-specs/elements-tree-node-title.md +46 -0
  9. package/docs/styleguide/ux/README.md +1 -1
  10. package/front_end/core/host/UserMetrics.ts +3 -7
  11. package/front_end/core/root/Runtime.ts +0 -1
  12. package/front_end/core/sdk/NetworkManager.ts +0 -35
  13. package/front_end/core/sdk/OverlayModel.ts +12 -0
  14. package/front_end/core/sdk/StorageKeyManager.ts +6 -1
  15. package/front_end/core/sdk/Target.ts +4 -2
  16. package/front_end/devtools_compatibility.js +4 -0
  17. package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
  18. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +536 -0
  19. package/front_end/entrypoints/greendev_floaty/floaty.css +298 -0
  20. package/front_end/entrypoints/greendev_floaty/floaty.html +38 -0
  21. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +422 -0
  22. package/front_end/entrypoints/inspector_main/InspectorMain.ts +0 -38
  23. package/front_end/entrypoints/node_app/app/NodeMain.ts +19 -1
  24. package/front_end/entrypoints/node_app/node_app.ts +34 -0
  25. package/front_end/generated/InspectorBackendCommands.ts +9 -3
  26. package/front_end/generated/SupportedCSSProperties.js +39 -31
  27. package/front_end/generated/protocol-mapping.d.ts +12 -0
  28. package/front_end/generated/protocol-proxy-api.d.ts +12 -0
  29. package/front_end/generated/protocol.ts +56 -2
  30. package/front_end/models/ai_assistance/AiConversation.ts +10 -0
  31. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
  32. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +24 -2
  33. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +104 -9
  34. package/front_end/{panels/elements → models/computed_style}/ComputedStyleModel.ts +26 -0
  35. package/front_end/models/computed_style/computed_style.ts +9 -0
  36. package/front_end/models/issues_manager/CookieIssue.ts +0 -28
  37. package/front_end/models/issues_manager/CorsIssue.ts +11 -14
  38. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +3 -5
  39. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +102 -6
  40. package/front_end/panels/ai_assistance/components/ChatInput.ts +15 -2
  41. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -0
  42. package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
  43. package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -11
  44. package/front_end/panels/application/DOMStorageModel.ts +1 -1
  45. package/front_end/panels/application/ResourcesPanel.ts +10 -5
  46. package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +0 -1
  47. package/front_end/panels/application/components/BackForwardCacheView.ts +2 -4
  48. package/front_end/panels/autofill/AutofillView.ts +1 -1
  49. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +0 -1
  50. package/front_end/panels/changes/changesSidebar.css +5 -0
  51. package/front_end/panels/common/AiCodeCompletionTeaser.ts +13 -3
  52. package/front_end/panels/common/ExtensionPanel.ts +4 -0
  53. package/front_end/panels/common/FreDialog.ts +4 -0
  54. package/front_end/panels/common/aiCodeCompletionTeaser.css +6 -0
  55. package/front_end/panels/console/ConsoleViewMessage.ts +0 -1
  56. package/front_end/panels/console_counters/WarningErrorCounter.ts +16 -10
  57. package/front_end/panels/coverage/CoverageListView.ts +18 -3
  58. package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +11 -0
  59. package/front_end/panels/elements/ComputedStyleWidget.ts +67 -45
  60. package/front_end/panels/elements/ElementsPanel.ts +4 -3
  61. package/front_end/panels/elements/ElementsSidebarPane.ts +11 -8
  62. package/front_end/panels/elements/ElementsTreeElement.ts +0 -1
  63. package/front_end/panels/elements/ElementsTreeOutline.ts +25 -15
  64. package/front_end/panels/elements/LayoutPane.ts +7 -8
  65. package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
  66. package/front_end/panels/elements/PlatformFontsWidget.ts +24 -9
  67. package/front_end/panels/elements/PropertiesWidget.ts +3 -6
  68. package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
  69. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  70. package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -2
  71. package/front_end/panels/elements/elements.ts +1 -3
  72. package/front_end/panels/greendev/GreenDevPanel.css +282 -0
  73. package/front_end/panels/greendev/GreenDevPanel.ts +337 -0
  74. package/front_end/panels/greendev/GreenDevShared.ts +13 -0
  75. package/front_end/panels/greendev/greendev-meta.ts +52 -0
  76. package/front_end/panels/greendev/greendev.ts +9 -0
  77. package/front_end/panels/issues/CorsIssueDetailsView.ts +4 -4
  78. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
  79. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
  80. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
  81. package/front_end/panels/media/PlayerListView.ts +1 -1
  82. package/front_end/panels/network/NetworkLogViewColumns.ts +1 -2
  83. package/front_end/panels/network/RequestInitiatorView.ts +8 -11
  84. package/front_end/panels/network/RequestTimingView.ts +1 -1
  85. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
  86. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  87. package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
  88. package/front_end/panels/recorder/components/StepEditor.ts +3 -3
  89. package/front_end/panels/security/SecurityPanel.ts +0 -4
  90. package/front_end/panels/security/SecurityPanelSidebar.ts +2 -42
  91. package/front_end/panels/security/security-meta.ts +2 -14
  92. package/front_end/panels/security/security.ts +0 -4
  93. package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -5
  94. package/front_end/panels/sources/OutlineQuickOpen.ts +19 -0
  95. package/front_end/panels/sources/SourcesSearchScope.ts +2 -1
  96. package/front_end/panels/sources/components/HeadersView.ts +2 -2
  97. package/front_end/panels/timeline/TimelinePanel.ts +25 -0
  98. package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
  99. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
  100. package/front_end/third_party/chromium/README.chromium +1 -1
  101. package/front_end/third_party/lighthouse/README.chromium +2 -2
  102. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +145 -144
  103. package/front_end/third_party/lighthouse/report/bundle.js +12 -5
  104. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +2 -2
  105. package/front_end/third_party/puppeteer/README.chromium +2 -2
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +35 -0
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +19 -0
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +16 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +21 -0
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +6 -0
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +13 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +56 -36
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +2 -2
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +32 -8
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +5 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +32 -2
  130. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -2
  132. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
  133. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +20 -0
  134. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -1
  136. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +25 -8
  138. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts +2 -0
  140. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +23 -0
  142. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
  144. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +10 -6
  146. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +29 -0
  151. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +46 -6
  153. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +5 -1
  155. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +18 -0
  157. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +2 -2
  159. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +13 -1
  162. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js +2 -2
  164. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +7 -2
  166. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +43 -7
  168. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts +10 -1
  170. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js +34 -4
  172. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js.map +1 -1
  173. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts.map +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
  178. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +1 -1
  180. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  182. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +1 -0
  184. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  186. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -0
  187. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
  188. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +4 -0
  189. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  190. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  191. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +2 -2
  192. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  194. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  195. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  196. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  197. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +129 -3
  199. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +233 -65
  200. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +35 -0
  201. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
  202. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +19 -0
  203. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
  204. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +16 -1
  205. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
  206. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
  207. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  208. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +1 -1
  209. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +21 -0
  210. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  211. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +6 -0
  212. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  213. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +13 -1
  214. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
  215. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +56 -36
  216. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
  217. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +2 -2
  218. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
  219. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +30 -6
  220. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
  221. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +5 -1
  222. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
  223. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +32 -2
  224. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
  225. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -2
  226. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
  227. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +20 -0
  228. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
  229. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -1
  230. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  231. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +25 -8
  232. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  233. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts +2 -0
  234. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
  235. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +23 -0
  236. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
  237. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
  238. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  239. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +10 -6
  240. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  241. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
  242. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js +1 -1
  243. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
  244. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +29 -0
  245. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  246. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +46 -6
  247. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
  248. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +5 -1
  249. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
  250. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +19 -1
  251. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
  252. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +3 -3
  253. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
  254. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
  255. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +14 -2
  256. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
  257. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js +3 -3
  258. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
  259. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +7 -2
  260. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  261. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +43 -8
  262. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  263. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts +10 -1
  264. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
  265. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js +31 -3
  266. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js.map +1 -1
  267. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +1 -1
  268. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts.map +1 -1
  269. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
  270. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
  271. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
  272. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
  273. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +1 -1
  274. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -1
  275. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  276. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +1 -0
  277. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
  278. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  279. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -0
  280. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
  281. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +4 -0
  282. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  283. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
  284. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +2 -2
  285. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
  286. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  287. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  288. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  289. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  290. package/front_end/third_party/puppeteer/package/lib/types.d.ts +129 -3
  291. package/front_end/third_party/puppeteer/package/package.json +4 -4
  292. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +46 -0
  293. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +21 -0
  294. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  295. package/front_end/third_party/puppeteer/package/src/api/Page.ts +23 -0
  296. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +88 -56
  297. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +33 -8
  298. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +61 -3
  299. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +23 -2
  300. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +29 -8
  301. package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +30 -0
  302. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -2
  303. package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -0
  304. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +85 -8
  305. package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +36 -1
  306. package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +5 -5
  307. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +23 -2
  308. package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +3 -3
  309. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +60 -8
  310. package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +36 -3
  311. package/front_end/third_party/puppeteer/package/src/common/Cookie.ts +1 -1
  312. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  313. package/front_end/third_party/puppeteer/package/src/injected/XPathQuerySelector.ts +1 -1
  314. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +1 -0
  315. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
  316. package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +4 -0
  317. package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +8 -6
  318. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  319. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  320. package/front_end/ui/components/suggestion_input/SuggestionInput.ts +12 -7
  321. package/front_end/ui/components/text_editor/AutocompleteHistory.ts +2 -1
  322. package/front_end/ui/components/text_editor/TextEditorHistory.ts +1 -1
  323. package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
  324. package/front_end/ui/legacy/ListControl.ts +27 -1
  325. package/front_end/ui/legacy/ListWidget.ts +1 -1
  326. package/front_end/ui/legacy/SearchableView.ts +5 -2
  327. package/front_end/ui/legacy/SoftContextMenu.ts +1 -2
  328. package/front_end/ui/legacy/Treeoutline.ts +1 -2
  329. package/front_end/ui/legacy/UIUtils.ts +17 -7
  330. package/front_end/ui/legacy/Widget.ts +15 -0
  331. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +8 -4
  332. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -1
  333. package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +2 -1
  334. package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
  335. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
  336. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -2
  337. package/front_end/ui/visual_logging/KnownContextValues.ts +15 -0
  338. package/inspector_overlay/main.ts +18 -3
  339. package/inspector_overlay/tool_green_dev_anchors.css +54 -0
  340. package/inspector_overlay/tool_green_dev_anchors.ts +164 -0
  341. package/inspector_overlay/tool_persistent.ts +14 -0
  342. package/mcp/mcp.ts +1 -0
  343. package/package.json +1 -1
  344. package/docs/contributing/design.md +0 -166
  345. package/docs/design_guidelines.md +0 -1
  346. package/front_end/panels/security/CookieControlsTreeElement.ts +0 -21
  347. package/front_end/panels/security/CookieControlsView.ts +0 -447
  348. package/front_end/panels/security/CookieReportTreeElement.ts +0 -21
  349. package/front_end/panels/security/CookieReportView.ts +0 -549
  350. package/front_end/panels/security/cookieControlsView.css +0 -139
  351. package/front_end/panels/security/cookieReportView.css +0 -90
@@ -2,12 +2,16 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import * as Common from '../../../core/common/common.js';
5
6
  import * as Host from '../../../core/host/host.js';
6
7
  import * as i18n from '../../../core/i18n/i18n.js';
7
8
  import * as Platform from '../../../core/platform/platform.js';
8
9
  import * as Root from '../../../core/root/root.js';
10
+ import * as SDK from '../../../core/sdk/sdk.js';
9
11
  import * as Logs from '../../logs/logs.js';
12
+ import type * as Trace from '../../trace/trace.js';
10
13
  import * as Workspace from '../../workspace/workspace.js';
14
+ import {AgentFocus} from '../performance/AIContext.js';
11
15
 
12
16
  import {
13
17
  type AgentOptions,
@@ -69,11 +73,19 @@ export class ContextSelectionAgent extends AiAgent<never> {
69
73
  };
70
74
  }
71
75
 
72
- constructor(opts: AgentOptions) {
76
+ readonly #performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
77
+ readonly #onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
78
+
79
+ constructor(opts: AgentOptions&{
80
+ performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>,
81
+ onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>,
82
+ }) {
73
83
  super(opts);
84
+ this.#performanceRecordAndReload = opts.performanceRecordAndReload;
85
+ this.#onInspectElement = opts.onInspectElement;
74
86
 
75
87
  this.declareFunction<Record<string, never>>('listNetworkRequests', {
76
- description: `Gives a list of network requests`,
88
+ description: `Gives a list of network requests including URL, status code, and duration in ms`,
77
89
  parameters: {
78
90
  type: Host.AidaClient.ParametersTypes.OBJECT,
79
91
  description: '',
@@ -82,16 +94,30 @@ export class ContextSelectionAgent extends AiAgent<never> {
82
94
  properties: {},
83
95
  },
84
96
  displayInfoFromArgs: () => {
85
- return {title: lockedString('Listing network requests…')};
97
+ return {
98
+ title: lockedString('Listing network requests…'),
99
+ action: 'listNetworkRequest()',
100
+ };
86
101
  },
87
102
  handler: async () => {
88
- const requestURls = [];
103
+ const requests = [];
104
+ const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
105
+ const inspectedURL = target?.inspectedURL();
106
+ const mainSecurityOrigin = inspectedURL ? new Common.ParsedURL.ParsedURL(inspectedURL).securityOrigin() : null;
107
+
89
108
  for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {
90
- requestURls.push(request.url());
109
+ if (mainSecurityOrigin && request.securityOrigin() !== mainSecurityOrigin) {
110
+ continue;
111
+ }
112
+ requests.push({
113
+ url: request.url(),
114
+ statusCode: request.statusCode,
115
+ duration: request.duration,
116
+ });
91
117
  }
92
118
 
93
119
  return {
94
- result: requestURls,
120
+ result: requests,
95
121
  };
96
122
  },
97
123
  });
@@ -112,7 +138,10 @@ export class ContextSelectionAgent extends AiAgent<never> {
112
138
  },
113
139
  },
114
140
  displayInfoFromArgs: args => {
115
- return {title: lockedString('Getting network request…'), action: `selectNetworkRequest(${args.url})`};
141
+ return {
142
+ title: lockedString('Getting network request…'),
143
+ action: `selectNetworkRequest(${args.url})`,
144
+ };
116
145
  },
117
146
  handler: async ({url}) => {
118
147
  // TODO: Switch to using IDs to make is easier to link to as well.
@@ -144,7 +173,10 @@ export class ContextSelectionAgent extends AiAgent<never> {
144
173
  properties: {},
145
174
  },
146
175
  displayInfoFromArgs: () => {
147
- return {title: lockedString('Listing source requests…')};
176
+ return {
177
+ title: lockedString('Listing source requests…'),
178
+ action: 'listSourceFile()',
179
+ };
148
180
  },
149
181
  handler: async () => {
150
182
  const files = [];
@@ -174,7 +206,10 @@ export class ContextSelectionAgent extends AiAgent<never> {
174
206
  },
175
207
  },
176
208
  displayInfoFromArgs: args => {
177
- return {title: lockedString('Getting source file'), action: `selectSourceFile(${args.name})`};
209
+ return {
210
+ title: lockedString('Getting source file'),
211
+ action: `selectSourceFile(${args.name})`,
212
+ };
178
213
  },
179
214
  handler: async params => {
180
215
  for (const file of this.#getUISourceCodes()) {
@@ -188,6 +223,66 @@ export class ContextSelectionAgent extends AiAgent<never> {
188
223
  return {error: 'Unable to find file.'};
189
224
  },
190
225
  });
226
+
227
+ this.declareFunction('performanceRecordAndReload', {
228
+ description: 'Start a new performance recording and reload the page.',
229
+ parameters: {
230
+ type: Host.AidaClient.ParametersTypes.OBJECT,
231
+ description: '',
232
+ nullable: true,
233
+ required: [],
234
+ properties: {},
235
+ },
236
+ displayInfoFromArgs: () => {
237
+ return {
238
+ title: 'Recording a performance trace…',
239
+ action: 'performanceRecordAndReload()',
240
+ };
241
+ },
242
+ handler: async () => {
243
+ if (!this.#performanceRecordAndReload) {
244
+ return {
245
+ error: 'Performance recording is not available.',
246
+ };
247
+ }
248
+ const result = await this.#performanceRecordAndReload();
249
+
250
+ return {
251
+ context: AgentFocus.fromParsedTrace(result),
252
+ };
253
+ }
254
+ });
255
+
256
+ this.declareFunction<Record<string, never>>('inspectDom', {
257
+ description: `Prompts user to select a DOM element from the page.`,
258
+ parameters: {
259
+ type: Host.AidaClient.ParametersTypes.OBJECT,
260
+ description: '',
261
+ nullable: true,
262
+ required: [],
263
+ properties: {},
264
+ },
265
+ displayInfoFromArgs: () => {
266
+ return {
267
+ title: lockedString('Please select an element on the page...'),
268
+ action: 'selectElement()',
269
+ };
270
+ },
271
+ handler: async () => {
272
+ if (!this.#onInspectElement) {
273
+ return {error: 'The inspect element action is not available.'};
274
+ }
275
+ const node = await this.#onInspectElement();
276
+ if (node) {
277
+ return {
278
+ context: node,
279
+ };
280
+ }
281
+ return {
282
+ error: 'Unable to select element.',
283
+ };
284
+ },
285
+ });
191
286
  }
192
287
 
193
288
  #getUISourceCodes = (): Iterable<Workspace.UISourceCode.UISourceCode> => {
@@ -137,6 +137,32 @@ export class ComputedStyleModel extends Common.ObjectWrapper.ObjectWrapper<Event
137
137
  null as ComputedStyle | null;
138
138
  }
139
139
  }
140
+
141
+ private async fetchMatchedCascade(): Promise<SDK.CSSMatchedStyles.CSSMatchedStyles|null> {
142
+ const node = this.node;
143
+ if (!node || !this.cssModel()) {
144
+ return null;
145
+ }
146
+
147
+ const cssModel = this.cssModel();
148
+ if (!cssModel) {
149
+ return null;
150
+ }
151
+
152
+ const matchedStyles = await cssModel.cachedMatchedCascadeForNode(node);
153
+ if (!matchedStyles) {
154
+ return null;
155
+ }
156
+ return matchedStyles.node() === this.node ? matchedStyles : null;
157
+ }
158
+
159
+ async fetchAllComputedStyleInfo(): Promise<{
160
+ computedStyle: ComputedStyle | null,
161
+ matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles|null,
162
+ }> {
163
+ const [computedStyle, matchedStyles] = await Promise.all([this.fetchComputedStyle(), this.fetchMatchedCascade()]);
164
+ return {computedStyle, matchedStyles};
165
+ }
140
166
  }
141
167
 
142
168
  export const enum Events {
@@ -0,0 +1,9 @@
1
+ // Copyright 2026 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as ComputedStyleModel from './ComputedStyleModel.js';
6
+
7
+ export {
8
+ ComputedStyleModel,
9
+ };
@@ -8,7 +8,6 @@ import * as i18n from '../../core/i18n/i18n.js';
8
8
  import type * as Platform from '../../core/platform/platform.js';
9
9
  import * as SDK from '../../core/sdk/sdk.js';
10
10
  import * as Protocol from '../../generated/protocol.js';
11
- import * as ThirdPartyWeb from '../../third_party/third-party-web/third-party-web.js';
12
11
 
13
12
  import {Issue, IssueCategory, IssueKind} from './Issue.js';
14
13
  import {
@@ -55,15 +54,6 @@ export const enum CookieStatus {
55
54
  ALLOWED_BY_HEURISTICS = 3,
56
55
  }
57
56
 
58
- export interface CookieReportInfo {
59
- name: string;
60
- domain: string;
61
- type?: string;
62
- platform?: string;
63
- status: CookieStatus;
64
- insight?: Protocol.Audits.CookieIssueInsight;
65
- }
66
-
67
57
  export class CookieIssue extends Issue<Protocol.Audits.CookieIssueDetails> {
68
58
  cookieId(): string {
69
59
  const details = this.details();
@@ -246,24 +236,6 @@ export class CookieIssue extends Issue<Protocol.Audits.CookieIssueDetails> {
246
236
  return IssueKind.BREAKING_CHANGE;
247
237
  }
248
238
 
249
- makeCookieReportEntry(): CookieReportInfo|undefined {
250
- const status = CookieIssue.getCookieStatus(this.details());
251
- const details = this.details();
252
- if (details.cookie && details.cookieUrl && status !== undefined) {
253
- const entity = ThirdPartyWeb.ThirdPartyWeb.getEntity(details.cookieUrl);
254
- return {
255
- name: details.cookie.name,
256
- domain: details.cookie.domain,
257
- type: entity?.category,
258
- platform: entity?.name,
259
- status,
260
- insight: this.details().insight,
261
- };
262
- }
263
-
264
- return;
265
- }
266
-
267
239
  static getCookieStatus(cookieIssueDetails: Protocol.Audits.CookieIssueDetails): CookieStatus|undefined {
268
240
  if (cookieIssueDetails.cookieExclusionReasons.includes(
269
241
  Protocol.Audits.CookieExclusionReason.ExcludeThirdPartyPhaseout)) {
@@ -14,10 +14,6 @@ const UIStrings = {
14
14
  * @description Label for the link for CORS Local Network Access issues
15
15
  */
16
16
  corsLocalNetworkAccess: 'Local Network Access',
17
- /**
18
- * @description Label for the link for CORS private network issues
19
- */
20
- corsPrivateNetworkAccess: 'Private Network Access',
21
17
  /**
22
18
  * @description Label for the link for CORS network issues
23
19
  */
@@ -27,7 +23,7 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CorsIssue.ts', U
27
23
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
28
24
 
29
25
  export const enum IssueCode {
30
- INSECURE_PRIVATE_NETWORK = 'CorsIssue::InsecurePrivateNetwork',
26
+ INSECURE_LOCAL_NETWORK = 'CorsIssue::InsecureLocalNetwork',
31
27
  INVALID_HEADER_VALUES = 'CorsIssue::InvalidHeaders',
32
28
  WILDCARD_ORIGN_NOT_ALLOWED = 'CorsIssue::WildcardOriginWithCredentials',
33
29
  PREFLIGHT_RESPONSE_INVALID = 'CorsIssue::PreflightResponseInvalid',
@@ -43,7 +39,8 @@ export const enum IssueCode {
43
39
  // TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
44
40
  PREFLIGHT_INVALID_ALLOW_EXTERNAL = 'CorsIssue::PreflightInvalidAllowExternal',
45
41
  NO_CORS_REDIRECT_MODE_NOT_FOLLOW = 'CorsIssue::NoCorsRedirectModeNotFollow',
46
- INVALID_PRIVATE_NETWORK_ACCESS = 'CorsIssue::InvalidPrivateNetworkAccess',
42
+
43
+ INVALID_LOCAL_NETWORK_ACCESS = 'CorsIssue::InvalidLocalNetworkAccess',
47
44
  LOCAL_NETWORK_ACCESS_PERMISSION_DENIED = 'CorsIssue::LocalNetworkAccessPermissionDenied',
48
45
  }
49
46
 
@@ -85,12 +82,12 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
85
82
  return IssueCode.PREFLIGHT_MISSING_ALLOW_EXTERNAL;
86
83
  case Protocol.Network.CorsError.PreflightInvalidAllowExternal:
87
84
  return IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL;
88
- case Protocol.Network.CorsError.InsecurePrivateNetwork:
89
- return IssueCode.INSECURE_PRIVATE_NETWORK;
85
+ case Protocol.Network.CorsError.InsecureLocalNetwork:
86
+ return IssueCode.INSECURE_LOCAL_NETWORK;
90
87
  case Protocol.Network.CorsError.NoCorsRedirectModeNotFollow:
91
88
  return IssueCode.NO_CORS_REDIRECT_MODE_NOT_FOLLOW;
92
- case Protocol.Network.CorsError.InvalidPrivateNetworkAccess:
93
- return IssueCode.INVALID_PRIVATE_NETWORK_ACCESS;
89
+ case Protocol.Network.CorsError.InvalidLocalNetworkAccess:
90
+ return IssueCode.INVALID_LOCAL_NETWORK_ACCESS;
94
91
  case Protocol.Network.CorsError.LocalNetworkAccessPermissionDenied:
95
92
  return IssueCode.LOCAL_NETWORK_ACCESS_PERMISSION_DENIED;
96
93
  }
@@ -109,12 +106,12 @@ export class CorsIssue extends Issue<Protocol.Audits.CorsIssueDetails, IssueCode
109
106
 
110
107
  getDescription(): MarkdownIssueDescription|null {
111
108
  switch (getIssueCode(this.details())) {
112
- case IssueCode.INSECURE_PRIVATE_NETWORK:
109
+ case IssueCode.INSECURE_LOCAL_NETWORK:
113
110
  return {
114
111
  file: 'corsInsecurePrivateNetwork.md',
115
112
  links: [{
116
113
  link: 'https://developer.chrome.com/blog/private-network-access-update',
117
- linkTitle: i18nString(UIStrings.corsPrivateNetworkAccess),
114
+ linkTitle: i18nString(UIStrings.corsLocalNetworkAccess),
118
115
  }],
119
116
  };
120
117
  case IssueCode.INVALID_HEADER_VALUES:
@@ -215,7 +212,7 @@ export class CorsIssue extends Issue<Protocol.Audits.CorsIssueDetails, IssueCode
215
212
  };
216
213
  case IssueCode.PREFLIGHT_MISSING_ALLOW_EXTERNAL:
217
214
  case IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL:
218
- case IssueCode.INVALID_PRIVATE_NETWORK_ACCESS:
215
+ case IssueCode.INVALID_LOCAL_NETWORK_ACCESS:
219
216
  return null;
220
217
  }
221
218
  }
@@ -226,7 +223,7 @@ export class CorsIssue extends Issue<Protocol.Audits.CorsIssueDetails, IssueCode
226
223
 
227
224
  getKind(): IssueKind {
228
225
  if (this.details().isWarning &&
229
- this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork) {
226
+ this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.InsecureLocalNetwork) {
230
227
  return IssueKind.BREAKING_CHANGE;
231
228
  }
232
229
  return IssueKind.PAGE_ERROR;
@@ -452,11 +452,9 @@ export class AXBreadcrumb {
452
452
 
453
453
  this.#element = document.createElement('div');
454
454
  this.#element.classList.add('ax-breadcrumb');
455
- this.#element.setAttribute('jslog', `${VisualLogging.treeItem().track({
456
- click: true,
457
- resize: true,
458
- keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'
459
- })}`);
455
+ this.#element.setAttribute(
456
+ 'jslog',
457
+ `${VisualLogging.treeItem().track({click: true, keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'})}`);
460
458
  elementsToAXBreadcrumb.set(this.#element, this);
461
459
 
462
460
  this.#nodeElement = document.createElement('div');
@@ -15,6 +15,7 @@ import * as Annotations from '../../models/annotations/annotations.js';
15
15
  import * as Badges from '../../models/badges/badges.js';
16
16
  import * as GreenDev from '../../models/greendev/greendev.js';
17
17
  import * as TextUtils from '../../models/text_utils/text_utils.js';
18
+ import type * as Trace from '../../models/trace/trace.js';
18
19
  import * as Workspace from '../../models/workspace/workspace.js';
19
20
  import * as Buttons from '../../ui/components/buttons/buttons.js';
20
21
  import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
@@ -503,6 +504,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
503
504
  #selectedRequest: AiAssistanceModel.NetworkAgent.RequestContext|null = null;
504
505
  // Messages displayed in the `ChatView` component.
505
506
  #messages: Message[] = [];
507
+ #isContextAutoSelectionSuspended = false;
506
508
 
507
509
  // Whether the UI should show loading or not.
508
510
  #isLoading = false;
@@ -559,6 +561,13 @@ export class AiAssistancePanel extends UI.Panel.Panel {
559
561
  if (this.#conversation) {
560
562
  const emptyStateSuggestions = await getEmptyStateSuggestions(this.#conversation);
561
563
  const markdownRenderer = getMarkdownRenderer(this.#conversation);
564
+ let onContextAdd: (() => void)|null = null;
565
+ if (isAiAssistanceContextSelectionAgentEnabled() &&
566
+ // Only add it the button if can have anything already selected
567
+ this.#getConversationContext(this.#getDefaultConversationType())) {
568
+ onContextAdd = this.#handleContextAdd.bind(this);
569
+ }
570
+
562
571
  return {
563
572
  state: ViewState.CHAT_VIEW,
564
573
  props: {
@@ -596,6 +605,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
596
605
  onNewConversation: this.#handleNewChatRequest.bind(this),
597
606
  onCopyResponseClick: this.#onCopyResponseClick.bind(this),
598
607
  onContextRemoved: isAiAssistanceContextSelectionAgentEnabled() ? this.#handleContextRemoved.bind(this) : null,
608
+ onContextAdd,
599
609
  }
600
610
  };
601
611
  }
@@ -664,6 +674,10 @@ export class AiAssistancePanel extends UI.Panel.Panel {
664
674
  this.requestUpdate();
665
675
  }
666
676
 
677
+ async #handlePerformanceRecordAndReload(): Promise<Trace.TraceModel.ParsedTrace> {
678
+ return await TimelinePanel.TimelinePanel.TimelinePanel.executeRecordAndReload();
679
+ }
680
+
667
681
  #getDefaultConversationType(): AiAssistanceModel.AiHistoryStorage.ConversationType|undefined {
668
682
  const {hostConfig} = Root.Runtime;
669
683
  const viewManager = UI.ViewManager.ViewManager.instance();
@@ -707,7 +721,8 @@ export class AiAssistancePanel extends UI.Panel.Panel {
707
721
  }
708
722
  const conversation = targetConversationType ?
709
723
  new AiAssistanceModel.AiConversation.AiConversation(
710
- targetConversationType, [], undefined, false, this.#aidaClient, this.#changeManager) :
724
+ targetConversationType, [], undefined, false, this.#aidaClient, this.#changeManager, false,
725
+ this.#handlePerformanceRecordAndReload.bind(this), this.#handleInspectElement.bind(this)) :
711
726
  undefined;
712
727
 
713
728
  this.#updateConversationState(conversation);
@@ -727,16 +742,28 @@ export class AiAssistancePanel extends UI.Panel.Panel {
727
742
  const conversationType = this.#getDefaultConversationType();
728
743
  if (conversationType) {
729
744
  conversation = new AiAssistanceModel.AiConversation.AiConversation(
730
- conversationType, [], undefined, false, this.#aidaClient, this.#changeManager);
745
+ conversationType,
746
+ [],
747
+ undefined,
748
+ false,
749
+ this.#aidaClient,
750
+ this.#changeManager,
751
+ false,
752
+ this.#handlePerformanceRecordAndReload.bind(this),
753
+ this.#handleInspectElement.bind(this),
754
+ );
731
755
  }
732
756
  }
733
757
 
734
758
  this.#conversation = conversation;
759
+ this.#isContextAutoSelectionSuspended = false;
735
760
  }
736
761
 
737
- this.#conversation?.setContext(this.#getConversationContext(
738
- isAiAssistanceContextSelectionAgentEnabled() ? this.#getDefaultConversationType() :
739
- (this.#conversation?.type ?? null)));
762
+ if (!this.#isContextAutoSelectionSuspended) {
763
+ this.#conversation?.setContext(this.#getConversationContext(
764
+ isAiAssistanceContextSelectionAgentEnabled() ? this.#getDefaultConversationType() :
765
+ (this.#conversation?.type ?? null)));
766
+ }
740
767
 
741
768
  this.requestUpdate();
742
769
  }
@@ -1108,6 +1135,13 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1108
1135
 
1109
1136
  #handleContextRemoved(): void {
1110
1137
  this.#conversation?.setContext(null);
1138
+ this.#isContextAutoSelectionSuspended = true;
1139
+ this.requestUpdate();
1140
+ }
1141
+
1142
+ #handleContextAdd(): void {
1143
+ this.#isContextAutoSelectionSuspended = false;
1144
+ this.#conversation?.setContext(this.#getConversationContext(this.#getDefaultConversationType()));
1111
1145
  this.requestUpdate();
1112
1146
  }
1113
1147
 
@@ -1128,6 +1162,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1128
1162
  return;
1129
1163
  }
1130
1164
 
1165
+ this.#isContextAutoSelectionSuspended = false;
1131
1166
  let targetConversationType: AiAssistanceModel.AiHistoryStorage.ConversationType|undefined;
1132
1167
  switch (actionId) {
1133
1168
  case 'freestyler.elements-floating-button': {
@@ -1174,7 +1209,16 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1174
1209
  let conversation = this.#conversation;
1175
1210
  if (!this.#conversation || this.#conversation.type !== targetConversationType || this.#conversation.isEmpty) {
1176
1211
  conversation = new AiAssistanceModel.AiConversation.AiConversation(
1177
- targetConversationType, [], undefined, false, this.#aidaClient, this.#changeManager);
1212
+ targetConversationType,
1213
+ [],
1214
+ undefined,
1215
+ false,
1216
+ this.#aidaClient,
1217
+ this.#changeManager,
1218
+ false,
1219
+ this.#handlePerformanceRecordAndReload.bind(this),
1220
+ this.#handleInspectElement.bind(this),
1221
+ );
1178
1222
  }
1179
1223
  this.#updateConversationState(conversation);
1180
1224
  const predefinedPrompt = opts?.['prompt'];
@@ -1321,9 +1365,61 @@ export class AiAssistancePanel extends UI.Panel.Panel {
1321
1365
  this.#conversation?.setContext(context);
1322
1366
  }
1323
1367
 
1368
+ this.#isContextAutoSelectionSuspended = false;
1369
+
1370
+ void VisualLogging.logFunctionCall(`context-change-${this.#conversation?.type}`);
1371
+
1324
1372
  this.requestUpdate();
1325
1373
  };
1326
1374
 
1375
+ async #handleInspectElement(): Promise<SDK.DOMModel.DOMNode|null> {
1376
+ if (!this.#toggleSearchElementAction) {
1377
+ return null;
1378
+ }
1379
+
1380
+ const result = new Promise<SDK.DOMModel.DOMNode|null>(resolve => {
1381
+ // Track the new flavor change for dom node.
1382
+ const handleDOMNodeFlavorChange = (ev: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMNode>): void => {
1383
+ if (!ev.data) {
1384
+ return;
1385
+ }
1386
+ resolve(selectedElementFilter(ev.data));
1387
+ removeListeners();
1388
+ };
1389
+
1390
+ // If the inspect mode is toggled, we want to resolve null.
1391
+ const handleInspectModeToggled = (ev: Common.EventTarget.EventTargetEvent<boolean>): void => {
1392
+ if (!ev.data) {
1393
+ // The inspect element is toggled off
1394
+ // before the flavor change event fires
1395
+ // so we need to wait a bit to see if the flavor changed.
1396
+ window.setTimeout(() => {
1397
+ resolve((selectedElementFilter(UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode))));
1398
+ removeListeners();
1399
+ }, 50);
1400
+ }
1401
+ };
1402
+
1403
+ const removeListeners = (): void => {
1404
+ UI.Context.Context.instance().removeFlavorChangeListener(SDK.DOMModel.DOMNode, handleDOMNodeFlavorChange);
1405
+ this.#toggleSearchElementAction?.removeEventListener(
1406
+ UI.ActionRegistration.Events.TOGGLED, handleInspectModeToggled);
1407
+ };
1408
+
1409
+ UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, handleDOMNodeFlavorChange);
1410
+ this.#toggleSearchElementAction?.addEventListener(UI.ActionRegistration.Events.TOGGLED, handleInspectModeToggled);
1411
+
1412
+ // Clean-up listeners in case of abort.
1413
+ this.#runAbortController.signal.addEventListener('abort', () => {
1414
+ resolve(null);
1415
+ removeListeners();
1416
+ }, {once: true});
1417
+ });
1418
+
1419
+ void this.#toggleSearchElementAction.execute();
1420
+ return await result;
1421
+ }
1422
+
1327
1423
  async #startConversation(
1328
1424
  text: string,
1329
1425
  imageInput?: Host.AidaClient.Part,
@@ -142,6 +142,7 @@ export interface ViewInput {
142
142
  onImageDragOver: (event: DragEvent) => void;
143
143
  onImageDrop: (event: DragEvent) => void;
144
144
  onContextRemoved: (() => void)|null;
145
+ onContextAdd: (() => void)|null;
145
146
  }
146
147
 
147
148
  export type ViewOutput = undefined;
@@ -152,7 +153,7 @@ export const
152
153
  void => {
153
154
  const chatInputContainerCls = Lit.Directives.classMap({
154
155
  'chat-input-container': true,
155
- 'single-line-layout': !input.selectedContext,
156
+ 'single-line-layout': !input.selectedContext && !input.onContextAdd,
156
157
  disabled: input.isTextInputDisabled,
157
158
  });
158
159
 
@@ -383,7 +384,17 @@ export const
383
384
  @click=${input.onContextRemoved}></devtools-button>` : Lit.nothing}
384
385
  </div>
385
386
  </div>`
386
- : Lit.nothing}
387
+ :
388
+ input.onContextAdd ? html`
389
+ <devtools-button
390
+ title=${i18nString(UIStrings.removeContext)}
391
+ aria-label=${i18nString(UIStrings.removeContext)}
392
+ class="add-context"
393
+ .iconName=${'plus'}
394
+ .size=${Buttons.Button.Size.SMALL}
395
+ .jslogContext=${'context-added'}
396
+ .variant=${Buttons.Button.Variant.ICON}
397
+ @click=${input.onContextAdd}></devtools-button>` : Lit.nothing}
387
398
  </div>
388
399
  <div class="chat-input-actions-right">
389
400
  <div class="chat-input-disclaimer-container">
@@ -522,6 +533,7 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
522
533
  onCancelClick = (): void => {};
523
534
  onNewConversation = (): void => {};
524
535
  onContextRemoved: (() => void)|null = null;
536
+ onContextAdd: (() => void)|null = null;
525
537
 
526
538
  async #handleTakeScreenshot(): Promise<void> {
527
539
  const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
@@ -705,6 +717,7 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
705
717
  onImageDragOver: this.#handleImageDragOver,
706
718
  onImageDrop: this.#handleImageDrop,
707
719
  onContextRemoved: this.onContextRemoved,
720
+ onContextAdd: this.onContextAdd,
708
721
  },
709
722
  undefined, this.contentElement);
710
723
  }
@@ -57,6 +57,7 @@ export interface Props {
57
57
  onNewConversation: () => void;
58
58
  onCopyResponseClick: (message: ModelChatMessage) => void;
59
59
  onContextRemoved: (() => void)|null;
60
+ onContextAdd: (() => void)|null;
60
61
  changeManager: AiAssistanceModel.ChangeManager.ChangeManager;
61
62
  inspectElementToggled: boolean;
62
63
  messages: Message[];
@@ -177,6 +178,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
177
178
  onCancelClick: input.onCancelClick,
178
179
  onNewConversation: input.onNewConversation,
179
180
  onContextRemoved: input.onContextRemoved,
181
+ onContextAdd: input.onContextAdd,
180
182
  })} ${ref(element => { output.input = element as UI.Widget.WidgetElement<ChatInput>; } )}></devtools-widget>
181
183
  </main>
182
184
  </div>
@@ -98,7 +98,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
98
98
  render(html`
99
99
  <div class="animation-group-preview-ui">
100
100
  <button
101
- jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true, resize: true})}
101
+ jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true})}
102
102
  class=${classes}
103
103
  role="option"
104
104
  aria-label=${input.label}
@@ -1916,17 +1916,19 @@ export class ResourcesSection implements SDK.TargetManager.Observer {
1916
1916
  frameManager.addEventListener(
1917
1917
  SDK.FrameManager.Events.RESOURCE_ADDED, event => this.resourceAdded(event.data.resource), this);
1918
1918
 
1919
- SDK.TargetManager.TargetManager.instance().addModelListener(
1920
- SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_CREATED, this.windowOpened,
1921
- this, {scoped: true});
1922
- SDK.TargetManager.TargetManager.instance().addModelListener(
1923
- SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_INFO_CHANGED,
1924
- this.windowChanged, this, {scoped: true});
1925
- SDK.TargetManager.TargetManager.instance().addModelListener(
1926
- SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_DESTROYED, this.windowDestroyed,
1927
- this, {scoped: true});
1928
-
1929
- SDK.TargetManager.TargetManager.instance().observeTargets(this, {scoped: true});
1919
+ if (this.panel.mode !== 'node') {
1920
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1921
+ SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_CREATED, this.windowOpened,
1922
+ this, {scoped: true});
1923
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1924
+ SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_INFO_CHANGED,
1925
+ this.windowChanged, this, {scoped: true});
1926
+ SDK.TargetManager.TargetManager.instance().addModelListener(
1927
+ SDK.ChildTargetManager.ChildTargetManager, SDK.ChildTargetManager.Events.TARGET_DESTROYED,
1928
+ this.windowDestroyed, this, {scoped: true});
1929
+
1930
+ SDK.TargetManager.TargetManager.instance().observeTargets(this, {scoped: true});
1931
+ }
1930
1932
  }
1931
1933
 
1932
1934
  private initialize(): void {
@@ -250,7 +250,7 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
250
250
  }
251
251
  }
252
252
 
253
- SDK.SDKModel.SDKModel.register(DOMStorageModel, {capabilities: SDK.Target.Capability.DOM, autostart: false});
253
+ SDK.SDKModel.SDKModel.register(DOMStorageModel, {capabilities: SDK.Target.Capability.DOM_STORAGE, autostart: false});
254
254
 
255
255
  export const enum Events {
256
256
  DOM_STORAGE_ADDED = 'DOMStorageAdded',