chrome-devtools-frontend 1.0.1578729 → 1.0.1581449
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.
- package/agents/prompts/creating-a-model.md +51 -0
- package/docs/cookbook/devtools_on_devtools.md +2 -2
- package/docs/feature-specs/elements-gutter-decorators.md +40 -0
- package/docs/feature-specs/elements-tree-edit-html.md +14 -0
- package/docs/feature-specs/elements-tree-node-title.md +46 -0
- package/docs/feature-specs/elements-tree-selection-and-hover.md +31 -0
- package/docs/feature-specs/images/elements-gutter-decorators-multiple.png +0 -0
- package/docs/get_the_code.md +3 -3
- package/front_end/core/host/UserMetrics.ts +3 -7
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +0 -35
- package/front_end/core/sdk/OverlayModel.ts +10 -0
- package/front_end/devtools_compatibility.js +4 -0
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +530 -0
- package/front_end/entrypoints/greendev_floaty/floaty.css +258 -0
- package/front_end/entrypoints/greendev_floaty/floaty.html +31 -0
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +422 -0
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +0 -38
- package/front_end/generated/ARIAProperties.js +0 -6
- package/front_end/generated/InspectorBackendCommands.ts +10 -4
- package/front_end/generated/SupportedCSSProperties.js +39 -31
- package/front_end/generated/protocol-mapping.d.ts +12 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +57 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +32 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +110 -6
- package/front_end/models/computed_style/computed_style.ts +9 -0
- package/front_end/models/issues_manager/CorsIssue.ts +11 -14
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +33 -4
- package/front_end/panels/ai_assistance/components/ChatInput.ts +52 -19
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -4
- package/front_end/panels/ai_assistance/components/ChatView.ts +4 -0
- package/front_end/panels/ai_assistance/components/chatInput.css +10 -3
- package/front_end/panels/application/DeviceBoundSessionsView.ts +51 -76
- package/front_end/panels/changes/changesSidebar.css +5 -0
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +2 -2
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +4 -4
- package/front_end/panels/common/ExtensionPanel.ts +4 -0
- package/front_end/panels/common/FreDialog.ts +4 -0
- package/front_end/panels/coverage/CoverageListView.ts +18 -3
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
- package/front_end/panels/elements/ComputedStyleWidget.ts +12 -8
- package/front_end/panels/elements/ElementsPanel.ts +4 -3
- package/front_end/panels/elements/ElementsSidebarPane.ts +11 -8
- package/front_end/panels/elements/ElementsTreeElement.ts +92 -121
- package/front_end/panels/elements/ElementsTreeOutline.ts +26 -15
- package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
- package/front_end/panels/elements/PlatformFontsWidget.ts +7 -5
- package/front_end/panels/elements/PropertiesWidget.ts +3 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -3
- package/front_end/panels/elements/elements.ts +4 -3
- package/front_end/panels/elements/elementsTreeOutline.css +16 -5
- package/front_end/panels/greendev/GreenDevPanel.css +241 -0
- package/front_end/panels/greendev/GreenDevPanel.ts +308 -0
- package/front_end/panels/greendev/GreenDevShared.ts +13 -0
- package/front_end/panels/greendev/greendev-meta.ts +52 -0
- package/front_end/panels/greendev/greendev.ts +9 -0
- package/front_end/panels/issues/CorsIssueDetailsView.ts +4 -4
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -5
- package/front_end/panels/security/SecurityPanel.ts +0 -4
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -42
- package/front_end/panels/security/security-meta.ts +2 -14
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -8
- package/front_end/panels/settings/SettingsScreen.ts +4 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +2 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +47 -26
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +121 -39
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +106 -101
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +56 -36
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +32 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +32 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +20 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +25 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +46 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +43 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js +34 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Cookie.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +129 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +233 -65
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +35 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +19 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +21 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +56 -36
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +32 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +20 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +25 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +10 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +46 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +19 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +7 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +43 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js +31 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/XPathQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +129 -3
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +21 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +23 -0
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +88 -56
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +33 -8
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +61 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +23 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +29 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +30 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +85 -8
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +36 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +23 -2
- package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +60 -8
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +36 -3
- package/front_end/third_party/puppeteer/package/src/common/Cookie.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/XPathQuerySelector.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +8 -6
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AutocompleteHistory.ts +2 -1
- package/front_end/ui/components/text_editor/TextEditorHistory.ts +1 -1
- package/front_end/ui/legacy/InplaceEditor.ts +1 -1
- package/front_end/ui/legacy/SearchableView.ts +5 -2
- package/front_end/ui/legacy/Widget.ts +15 -0
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +50 -1
- package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +59 -9
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +2 -1
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +28 -15
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +2 -2
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -3
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +0 -21
- package/front_end/panels/security/CookieControlsView.ts +0 -447
- package/front_end/panels/security/CookieReportTreeElement.ts +0 -21
- package/front_end/panels/security/CookieReportView.ts +0 -549
- package/front_end/panels/security/cookieControlsView.css +0 -139
- package/front_end/panels/security/cookieReportView.css +0 -90
- /package/front_end/{panels/elements → models/computed_style}/ComputedStyleModel.ts +0 -0
|
@@ -2,11 +2,14 @@
|
|
|
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 * as Workspace from '../../workspace/workspace.js';
|
|
10
13
|
|
|
11
14
|
import {
|
|
12
15
|
type AgentOptions,
|
|
@@ -72,7 +75,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
72
75
|
super(opts);
|
|
73
76
|
|
|
74
77
|
this.declareFunction<Record<string, never>>('listNetworkRequests', {
|
|
75
|
-
description: `Gives a list of network requests`,
|
|
78
|
+
description: `Gives a list of network requests including URL, status code, and duration in ms`,
|
|
76
79
|
parameters: {
|
|
77
80
|
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
78
81
|
description: '',
|
|
@@ -81,16 +84,30 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
81
84
|
properties: {},
|
|
82
85
|
},
|
|
83
86
|
displayInfoFromArgs: () => {
|
|
84
|
-
return {
|
|
87
|
+
return {
|
|
88
|
+
title: lockedString('Listing network requests…'),
|
|
89
|
+
action: 'listNetworkRequest()',
|
|
90
|
+
};
|
|
85
91
|
},
|
|
86
92
|
handler: async () => {
|
|
87
|
-
const
|
|
93
|
+
const requests = [];
|
|
94
|
+
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
95
|
+
const inspectedURL = target?.inspectedURL();
|
|
96
|
+
const mainSecurityOrigin = inspectedURL ? new Common.ParsedURL.ParsedURL(inspectedURL).securityOrigin() : null;
|
|
97
|
+
|
|
88
98
|
for (const request of Logs.NetworkLog.NetworkLog.instance().requests()) {
|
|
89
|
-
|
|
99
|
+
if (mainSecurityOrigin && request.securityOrigin() !== mainSecurityOrigin) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
requests.push({
|
|
103
|
+
url: request.url(),
|
|
104
|
+
statusCode: request.statusCode,
|
|
105
|
+
duration: request.duration,
|
|
106
|
+
});
|
|
90
107
|
}
|
|
91
108
|
|
|
92
109
|
return {
|
|
93
|
-
result:
|
|
110
|
+
result: requests,
|
|
94
111
|
};
|
|
95
112
|
},
|
|
96
113
|
});
|
|
@@ -111,7 +128,10 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
111
128
|
},
|
|
112
129
|
},
|
|
113
130
|
displayInfoFromArgs: args => {
|
|
114
|
-
return {
|
|
131
|
+
return {
|
|
132
|
+
title: lockedString('Getting network request…'),
|
|
133
|
+
action: `selectNetworkRequest(${args.url})`,
|
|
134
|
+
};
|
|
115
135
|
},
|
|
116
136
|
handler: async ({url}) => {
|
|
117
137
|
// TODO: Switch to using IDs to make is easier to link to as well.
|
|
@@ -132,8 +152,92 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
132
152
|
};
|
|
133
153
|
},
|
|
134
154
|
});
|
|
155
|
+
|
|
156
|
+
this.declareFunction<Record<string, never>>('listSourceFiles', {
|
|
157
|
+
description: `Returns a list of all files in the project.`,
|
|
158
|
+
parameters: {
|
|
159
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
160
|
+
description: '',
|
|
161
|
+
nullable: true,
|
|
162
|
+
required: [],
|
|
163
|
+
properties: {},
|
|
164
|
+
},
|
|
165
|
+
displayInfoFromArgs: () => {
|
|
166
|
+
return {
|
|
167
|
+
title: lockedString('Listing source requests…'),
|
|
168
|
+
action: 'listSourceFile()',
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
handler: async () => {
|
|
172
|
+
const files = [];
|
|
173
|
+
for (const file of this.#getUISourceCodes()) {
|
|
174
|
+
files.push(file.fullDisplayName());
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return {
|
|
178
|
+
result: files,
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
this.declareFunction<{name: string}>('selectSourceFile', {
|
|
184
|
+
description: `Returns a list of all files in the project.`,
|
|
185
|
+
parameters: {
|
|
186
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
187
|
+
description: '',
|
|
188
|
+
nullable: true,
|
|
189
|
+
required: ['name'],
|
|
190
|
+
properties: {
|
|
191
|
+
name: {
|
|
192
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
193
|
+
description: 'The name of the file',
|
|
194
|
+
nullable: false,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
displayInfoFromArgs: args => {
|
|
199
|
+
return {
|
|
200
|
+
title: lockedString('Getting source file'),
|
|
201
|
+
action: `selectSourceFile(${args.name})`,
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
handler: async params => {
|
|
205
|
+
for (const file of this.#getUISourceCodes()) {
|
|
206
|
+
if (file.fullDisplayName() === params.name) {
|
|
207
|
+
return {
|
|
208
|
+
context: file,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return {error: 'Unable to find file.'};
|
|
214
|
+
},
|
|
215
|
+
});
|
|
135
216
|
}
|
|
136
217
|
|
|
218
|
+
#getUISourceCodes = (): Iterable<Workspace.UISourceCode.UISourceCode> => {
|
|
219
|
+
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
220
|
+
const projects = workspace.projects().filter(project => {
|
|
221
|
+
switch (project.type()) {
|
|
222
|
+
case Workspace.Workspace.projectTypes.Network:
|
|
223
|
+
case Workspace.Workspace.projectTypes.FileSystem:
|
|
224
|
+
case Workspace.Workspace.projectTypes.ConnectableFileSystem:
|
|
225
|
+
return true;
|
|
226
|
+
|
|
227
|
+
default:
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const uiSourceCodes = [];
|
|
232
|
+
for (const project of projects) {
|
|
233
|
+
for (const uiSourceCode of project.uiSourceCodes()) {
|
|
234
|
+
uiSourceCodes.push(uiSourceCode);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return uiSourceCodes;
|
|
239
|
+
};
|
|
240
|
+
|
|
137
241
|
async * handleContextDetails(): AsyncGenerator<ContextResponse, void, void> {
|
|
138
242
|
}
|
|
139
243
|
|
|
@@ -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
|
+
};
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
89
|
-
return IssueCode.
|
|
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.
|
|
93
|
-
return IssueCode.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
226
|
+
this.details().corsErrorStatus.corsError === Protocol.Network.CorsError.InsecureLocalNetwork) {
|
|
230
227
|
return IssueKind.BREAKING_CHANGE;
|
|
231
228
|
}
|
|
232
229
|
return IssueKind.PAGE_ERROR;
|
|
@@ -6821,6 +6821,10 @@ export const NativeFunctions = [
|
|
|
6821
6821
|
name: "UIEvent",
|
|
6822
6822
|
signatures: [["type","?eventInitDict"]]
|
|
6823
6823
|
},
|
|
6824
|
+
{
|
|
6825
|
+
name: "WebMCPEvent",
|
|
6826
|
+
signatures: [["type","?eventInitDict"]]
|
|
6827
|
+
},
|
|
6824
6828
|
{
|
|
6825
6829
|
name: "WheelEvent",
|
|
6826
6830
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -164,6 +164,10 @@ const UIStringsNotTranslate = {
|
|
|
164
164
|
*@description Placeholder text for the chat UI input.
|
|
165
165
|
*/
|
|
166
166
|
inputPlaceholderForNoContext: 'Ask AI Assistance',
|
|
167
|
+
/**
|
|
168
|
+
* @description Placeholder text for the chat UI input with branding Gemini (do not translate)
|
|
169
|
+
*/
|
|
170
|
+
inputPlaceholderForNoContextBranded: 'Ask Gemini',
|
|
167
171
|
/**
|
|
168
172
|
* @description Disclaimer text right after the chat input.
|
|
169
173
|
*/
|
|
@@ -555,6 +559,13 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
555
559
|
if (this.#conversation) {
|
|
556
560
|
const emptyStateSuggestions = await getEmptyStateSuggestions(this.#conversation);
|
|
557
561
|
const markdownRenderer = getMarkdownRenderer(this.#conversation);
|
|
562
|
+
let onContextAdd: (() => void)|null = null;
|
|
563
|
+
if (isAiAssistanceContextSelectionAgentEnabled() &&
|
|
564
|
+
// Only add it the button if can have anything already selected
|
|
565
|
+
this.#getConversationContext(this.#getDefaultConversationType())) {
|
|
566
|
+
onContextAdd = this.#handleContextAdd.bind(this);
|
|
567
|
+
}
|
|
568
|
+
|
|
558
569
|
return {
|
|
559
570
|
state: ViewState.CHAT_VIEW,
|
|
560
571
|
props: {
|
|
@@ -591,6 +602,8 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
591
602
|
onContextClick: this.#handleContextClick.bind(this),
|
|
592
603
|
onNewConversation: this.#handleNewChatRequest.bind(this),
|
|
593
604
|
onCopyResponseClick: this.#onCopyResponseClick.bind(this),
|
|
605
|
+
onContextRemoved: isAiAssistanceContextSelectionAgentEnabled() ? this.#handleContextRemoved.bind(this) : null,
|
|
606
|
+
onContextAdd,
|
|
594
607
|
}
|
|
595
608
|
};
|
|
596
609
|
}
|
|
@@ -1011,6 +1024,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1011
1024
|
return lockedString(UIStringsNotTranslate.inputPlaceholderForPerformanceWithNoRecording);
|
|
1012
1025
|
}
|
|
1013
1026
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.NONE:
|
|
1027
|
+
if (AiAssistanceModel.AiUtils.isGeminiBranding()) {
|
|
1028
|
+
return lockedString(UIStringsNotTranslate.inputPlaceholderForNoContextBranded);
|
|
1029
|
+
}
|
|
1014
1030
|
return lockedString(UIStringsNotTranslate.inputPlaceholderForNoContext);
|
|
1015
1031
|
}
|
|
1016
1032
|
}
|
|
@@ -1098,6 +1114,16 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1098
1114
|
// Node picker is using linkifier.
|
|
1099
1115
|
}
|
|
1100
1116
|
|
|
1117
|
+
#handleContextRemoved(): void {
|
|
1118
|
+
this.#conversation?.setContext(null);
|
|
1119
|
+
this.requestUpdate();
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
#handleContextAdd(): void {
|
|
1123
|
+
this.#conversation?.setContext(this.#getConversationContext(this.#getDefaultConversationType()));
|
|
1124
|
+
this.requestUpdate();
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1101
1127
|
#canExecuteQuery(): boolean {
|
|
1102
1128
|
const isBrandedBuild = Boolean(Root.Runtime.hostConfig.aidaAvailability?.enabled);
|
|
1103
1129
|
const isBlockedByAge = Boolean(Root.Runtime.hostConfig.aidaAvailability?.blockedByAge);
|
|
@@ -1292,22 +1318,25 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1292
1318
|
if (data instanceof Workspace.UISourceCode.UISourceCode) {
|
|
1293
1319
|
const context = new AiAssistanceModel.FileAgent.FileContext(data);
|
|
1294
1320
|
this.#selectedFile = context;
|
|
1295
|
-
|
|
1321
|
+
this.#conversation?.setContext(context);
|
|
1296
1322
|
} else if (data instanceof SDK.DOMModel.DOMNode) {
|
|
1297
1323
|
const context = new AiAssistanceModel.StylingAgent.NodeContext(data);
|
|
1298
1324
|
this.#selectedElement = context;
|
|
1299
|
-
|
|
1325
|
+
this.#conversation?.setContext(context);
|
|
1300
1326
|
} else if (data instanceof SDK.NetworkRequest.NetworkRequest) {
|
|
1301
1327
|
const calculator = NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator();
|
|
1302
|
-
|
|
1303
1328
|
const context = new AiAssistanceModel.NetworkAgent.RequestContext(data, calculator);
|
|
1304
1329
|
this.#selectedRequest = context;
|
|
1330
|
+
this.#conversation?.setContext(context);
|
|
1305
1331
|
} else if (data instanceof AiAssistanceModel.AIContext.AgentFocus) {
|
|
1306
1332
|
const context = new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(data);
|
|
1307
1333
|
this.#selectedPerformanceTrace = context;
|
|
1334
|
+
this.#conversation?.setContext(context);
|
|
1308
1335
|
}
|
|
1309
1336
|
|
|
1310
|
-
|
|
1337
|
+
void VisualLogging.logFunctionCall(`context-change-${this.#conversation?.type}`);
|
|
1338
|
+
|
|
1339
|
+
this.requestUpdate();
|
|
1311
1340
|
};
|
|
1312
1341
|
|
|
1313
1342
|
async #startConversation(
|
|
@@ -39,6 +39,10 @@ const UIStrings = {
|
|
|
39
39
|
* @description The footer disclaimer that links to more information about the AI feature.
|
|
40
40
|
*/
|
|
41
41
|
learnAbout: 'Learn about AI in DevTools',
|
|
42
|
+
/**
|
|
43
|
+
* @description Label added to the button that remove the currently selected context in AI Assistance panel.
|
|
44
|
+
*/
|
|
45
|
+
removeContext: 'Remove selected context',
|
|
42
46
|
} as const;
|
|
43
47
|
|
|
44
48
|
/*
|
|
@@ -137,23 +141,28 @@ export interface ViewInput {
|
|
|
137
141
|
onImagePaste: (event: ClipboardEvent) => void;
|
|
138
142
|
onImageDragOver: (event: DragEvent) => void;
|
|
139
143
|
onImageDrop: (event: DragEvent) => void;
|
|
144
|
+
onContextRemoved: (() => void)|null;
|
|
145
|
+
onContextAdd: (() => void)|null;
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
export type ViewOutput = undefined;
|
|
143
149
|
|
|
144
|
-
export const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
export const
|
|
151
|
+
DEFAULT_VIEW =
|
|
152
|
+
(input: ViewInput, output: ViewOutput, target: HTMLElement):
|
|
153
|
+
void => {
|
|
154
|
+
const chatInputContainerCls = Lit.Directives.classMap({
|
|
155
|
+
'chat-input-container': true,
|
|
156
|
+
'single-line-layout': !input.selectedContext && !input.onContextAdd,
|
|
157
|
+
disabled: input.isTextInputDisabled,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const renderRelevantDataDisclaimer = (tooltipId: string): Lit.LitTemplate => {
|
|
161
|
+
const classes = Lit.Directives.classMap({
|
|
162
|
+
'chat-input-disclaimer': true,
|
|
163
|
+
'hide-divider': !input.isLoading && input.blockedByCrossOrigin,
|
|
164
|
+
});
|
|
165
|
+
// clang-format off
|
|
157
166
|
return html`
|
|
158
167
|
<div class=${classes}>
|
|
159
168
|
<button
|
|
@@ -185,10 +194,10 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
185
194
|
</div></devtools-tooltip>
|
|
186
195
|
</div>
|
|
187
196
|
`;
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
// clang-format on
|
|
198
|
+
};
|
|
190
199
|
|
|
191
|
-
|
|
200
|
+
// clang-format off
|
|
192
201
|
Lit.render(html`
|
|
193
202
|
<style>${Input.textInputStyles}</style>
|
|
194
203
|
<style>${chatInputStyles}</style>
|
|
@@ -363,9 +372,29 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
363
372
|
:
|
|
364
373
|
input.selectedContext.getTitle()}
|
|
365
374
|
</span>
|
|
375
|
+
${input.onContextRemoved ? html`
|
|
376
|
+
<devtools-button
|
|
377
|
+
title=${i18nString(UIStrings.removeContext)}
|
|
378
|
+
aria-label=${i18nString(UIStrings.removeContext)}
|
|
379
|
+
class="remove-context"
|
|
380
|
+
.iconName=${'cross'}
|
|
381
|
+
.size=${Buttons.Button.Size.MICRO}
|
|
382
|
+
.jslogContext=${'context-removed'}
|
|
383
|
+
.variant=${Buttons.Button.Variant.ICON}
|
|
384
|
+
@click=${input.onContextRemoved}></devtools-button>` : Lit.nothing}
|
|
366
385
|
</div>
|
|
367
386
|
</div>`
|
|
368
|
-
:
|
|
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-add'}
|
|
396
|
+
.variant=${Buttons.Button.Variant.ICON}
|
|
397
|
+
@click=${input.onContextAdd}></devtools-button>` : Lit.nothing}
|
|
369
398
|
</div>
|
|
370
399
|
<div class="chat-input-actions-right">
|
|
371
400
|
<div class="chat-input-disclaimer-container">
|
|
@@ -462,8 +491,8 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
462
491
|
${renderRelevantDataDisclaimer(RELEVANT_DATA_LINK_FOOTER_ID)}
|
|
463
492
|
</footer>
|
|
464
493
|
`, target);
|
|
465
|
-
|
|
466
|
-
};
|
|
494
|
+
// clang-format on
|
|
495
|
+
};
|
|
467
496
|
|
|
468
497
|
/**
|
|
469
498
|
* ChatInput is a presenter for the input area in the AI Assistance panel.
|
|
@@ -503,6 +532,8 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
|
|
|
503
532
|
onInspectElementClick = (): void => {};
|
|
504
533
|
onCancelClick = (): void => {};
|
|
505
534
|
onNewConversation = (): void => {};
|
|
535
|
+
onContextRemoved: (() => void)|null = null;
|
|
536
|
+
onContextAdd: (() => void)|null = null;
|
|
506
537
|
|
|
507
538
|
async #handleTakeScreenshot(): Promise<void> {
|
|
508
539
|
const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
@@ -685,6 +716,8 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
|
|
|
685
716
|
onImageUpload: this.onImageUpload,
|
|
686
717
|
onImageDragOver: this.#handleImageDragOver,
|
|
687
718
|
onImageDrop: this.#handleImageDrop,
|
|
719
|
+
onContextRemoved: this.onContextRemoved,
|
|
720
|
+
onContextAdd: this.onContextAdd,
|
|
688
721
|
},
|
|
689
722
|
undefined, this.contentElement);
|
|
690
723
|
}
|
|
@@ -323,6 +323,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
|
|
|
323
323
|
}
|
|
324
324
|
return renderStep({
|
|
325
325
|
step: part.step,
|
|
326
|
+
isLoading: input.isLoading,
|
|
326
327
|
markdownRenderer: input.markdownRenderer,
|
|
327
328
|
isLast: isLastPart,
|
|
328
329
|
});
|
|
@@ -450,11 +451,12 @@ function renderStepDetails({
|
|
|
450
451
|
// clang-format on
|
|
451
452
|
}
|
|
452
453
|
|
|
453
|
-
function renderStepBadge({step, isLast}: {
|
|
454
|
+
function renderStepBadge({step, isLoading, isLast}: {
|
|
454
455
|
step: Step,
|
|
456
|
+
isLoading: boolean,
|
|
455
457
|
isLast: boolean,
|
|
456
458
|
}): Lit.LitTemplate {
|
|
457
|
-
if (
|
|
459
|
+
if (isLoading && isLast && !step.sideEffect) {
|
|
458
460
|
return html`<devtools-spinner></devtools-spinner>`;
|
|
459
461
|
}
|
|
460
462
|
|
|
@@ -478,8 +480,9 @@ function renderStepBadge({step, isLast}: {
|
|
|
478
480
|
></devtools-icon>`;
|
|
479
481
|
}
|
|
480
482
|
|
|
481
|
-
function renderStep({step, markdownRenderer, isLast}: {
|
|
483
|
+
function renderStep({step, isLoading, markdownRenderer, isLast}: {
|
|
482
484
|
step: Step,
|
|
485
|
+
isLoading: boolean,
|
|
483
486
|
markdownRenderer: MarkdownLitRenderer,
|
|
484
487
|
isLast: boolean,
|
|
485
488
|
}): Lit.LitTemplate {
|
|
@@ -496,7 +499,7 @@ function renderStep({step, markdownRenderer, isLast}: {
|
|
|
496
499
|
.open=${Boolean(step.sideEffect)}>
|
|
497
500
|
<summary>
|
|
498
501
|
<div class="summary">
|
|
499
|
-
${renderStepBadge({ step, isLast })}
|
|
502
|
+
${renderStepBadge({ step, isLoading, isLast })}
|
|
500
503
|
${renderTitle(step)}
|
|
501
504
|
<devtools-icon
|
|
502
505
|
class="arrow"
|
|
@@ -56,6 +56,8 @@ export interface Props {
|
|
|
56
56
|
onContextClick: () => void;
|
|
57
57
|
onNewConversation: () => void;
|
|
58
58
|
onCopyResponseClick: (message: ModelChatMessage) => void;
|
|
59
|
+
onContextRemoved: (() => void)|null;
|
|
60
|
+
onContextAdd: (() => void)|null;
|
|
59
61
|
changeManager: AiAssistanceModel.ChangeManager.ChangeManager;
|
|
60
62
|
inspectElementToggled: boolean;
|
|
61
63
|
messages: Message[];
|
|
@@ -175,6 +177,8 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
175
177
|
onTextSubmit: input.onTextSubmit,
|
|
176
178
|
onCancelClick: input.onCancelClick,
|
|
177
179
|
onNewConversation: input.onNewConversation,
|
|
180
|
+
onContextRemoved: input.onContextRemoved,
|
|
181
|
+
onContextAdd: input.onContextAdd,
|
|
178
182
|
})} ${ref(element => { output.input = element as UI.Widget.WidgetElement<ChatInput>; } )}></devtools-widget>
|
|
179
183
|
</main>
|
|
180
184
|
</div>
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
max-width: var(--sys-size-36);
|
|
23
23
|
background-color: var(--sys-color-cdt-base-container);
|
|
24
24
|
width: 100%;
|
|
25
|
-
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
.chat-readonly-container {
|
|
@@ -221,6 +220,8 @@
|
|
|
221
220
|
|
|
222
221
|
.resource-link,
|
|
223
222
|
.resource-task {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
224
225
|
cursor: pointer;
|
|
225
226
|
padding: var(--sys-size-2) var(--sys-size-3);
|
|
226
227
|
font: var(--sys-typescale-body5-regular);
|
|
@@ -239,6 +240,12 @@
|
|
|
239
240
|
& .title {
|
|
240
241
|
vertical-align: middle;
|
|
241
242
|
font: var(--sys-typescale-body5-regular);
|
|
243
|
+
overflow: hidden;
|
|
244
|
+
text-overflow: ellipsis;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
& .remove-context {
|
|
248
|
+
vertical-align: middle;
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
&.has-picker-behavior {
|
|
@@ -253,8 +260,8 @@
|
|
|
253
260
|
devtools-file-source-icon {
|
|
254
261
|
display: inline-flex;
|
|
255
262
|
vertical-align: middle;
|
|
256
|
-
width: var(--sys-size-7);
|
|
257
|
-
height: var(--sys-size-7);
|
|
263
|
+
min-width: var(--sys-size-7);
|
|
264
|
+
min-height: var(--sys-size-7);
|
|
258
265
|
}
|
|
259
266
|
|
|
260
267
|
/*
|