chrome-devtools-frontend 1.0.1543472 → 1.0.1545096
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/AUTHORS +1 -0
- package/config/typescript/tsconfig.eslint.json +1 -0
- package/front_end/core/common/ParsedURL.ts +1 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/host/AidaClient.ts +10 -7
- package/front_end/core/host/DispatchHttpRequestClient.ts +18 -3
- package/front_end/core/protocol_client/CDPConnection.ts +3 -3
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -1
- package/front_end/core/root/Runtime.ts +8 -7
- package/front_end/core/sdk/CPUThrottlingManager.ts +0 -4
- package/front_end/core/sdk/CSSMatchedStyles.ts +7 -9
- package/front_end/core/sdk/CSSMetadata.ts +17 -5
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +18 -6
- package/front_end/core/sdk/ChildTargetManager.ts +2 -2
- package/front_end/core/sdk/NetworkManager.ts +6 -8
- package/front_end/core/sdk/NetworkRequest.ts +4 -0
- package/front_end/core/sdk/SDKModel.ts +4 -2
- package/front_end/core/sdk/TargetManager.ts +14 -15
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +0 -16
- package/front_end/foundation/Universe.ts +12 -1
- package/front_end/generated/Deprecation.ts +4 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -5
- package/front_end/generated/SupportedCSSProperties.js +0 -23
- package/front_end/generated/protocol-mapping.d.ts +0 -15
- package/front_end/generated/protocol-proxy-api.d.ts +0 -11
- package/front_end/generated/protocol.ts +2 -34
- package/front_end/models/ai_assistance/agents/AiAgent.ts +10 -8
- package/front_end/models/ai_assistance/agents/PatchAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +4 -8
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +1 -1
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -3
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -7
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +9 -8
- package/front_end/models/bindings/ResourceMapping.ts +57 -15
- package/front_end/models/live-metrics/LiveMetrics.ts +12 -20
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +6 -2
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +3 -2
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -4
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +2 -1
- package/front_end/panels/ai_assistance/components/UserActionRow.ts +2 -1
- package/front_end/panels/animation/AnimationTimeline.ts +6 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +6 -7
- package/front_end/panels/application/{components/FrameDetailsView.ts → FrameDetailsView.ts} +134 -165
- package/front_end/panels/application/{components/OriginTrialTreeView.ts → OriginTrialTreeView.ts} +9 -9
- package/front_end/panels/application/application.ts +4 -0
- package/front_end/panels/application/components/ReportsGrid.ts +7 -2
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +5 -3
- package/front_end/panels/application/components/StackTrace.ts +5 -3
- package/front_end/panels/application/components/TrustTokensView.ts +7 -1
- package/front_end/panels/application/components/components.ts +2 -4
- package/front_end/panels/application/{components/frameDetailsReportView.css → frameDetailsReportView.css} +5 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +10 -4
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +7 -11
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +15 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +12 -13
- package/front_end/panels/common/BadgeNotification.ts +2 -1
- package/front_end/panels/{elements → common}/DOMLinkifier.ts +13 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +3 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +52 -15
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -3
- package/front_end/panels/elements/StylesSidebarPane.ts +24 -14
- package/front_end/panels/elements/elements-meta.ts +0 -13
- package/front_end/panels/elements/elements.ts +0 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +31 -20
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +3 -6
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -1
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/recorder/RecorderController.ts +7 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +2 -1
- package/front_end/panels/settings/SettingsScreen.ts +3 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +42 -294
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +5 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
- package/front_end/panels/timeline/components/LiveMetricsView.ts +18 -6
- package/front_end/panels/timeline/components/MetricCard.ts +2 -2
- package/front_end/panels/timeline/components/insights/NodeLink.ts +4 -4
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -1
- package/front_end/panels/timeline/timeline-meta.ts +0 -10
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/whats_new/ReleaseNoteView.ts +2 -1
- package/front_end/panels/whats_new/WhatsNewImpl.ts +3 -2
- 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/cdp/HTTPRequest.d.ts +1 -0
- 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 +4 -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/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.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/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/revisions.js.map +1 -1
- 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.js +34 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/HTTPRequest.d.ts +1 -0
- 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 +4 -1
- 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/NetworkEventManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkEventManager.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.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/revisions.js.map +1 -1
- 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/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +16 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +28 -0
- 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/tsconfig.json +1 -0
- package/front_end/ui/components/buttons/Button.docs.ts +6 -5
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.docs.ts +2 -1
- package/front_end/ui/components/switch/Switch.docs.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +8 -5
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +3 -3
- package/front_end/ui/helpers/OpenInNewTab.ts +87 -0
- package/front_end/ui/helpers/helpers.ts +5 -0
- package/front_end/ui/i18n/i18n.ts +16 -0
- package/front_end/ui/legacy/ContextMenu.docs.ts +12 -11
- package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
- package/front_end/ui/legacy/Slider.docs.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -34
- package/front_end/ui/legacy/Widget.ts +56 -25
- package/front_end/ui/legacy/XLink.ts +4 -6
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +294 -336
- package/front_end/ui/legacy/components/utils/Linkifier.ts +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +0 -4
- package/mcp/mcp.ts +1 -0
- package/mcp/tsconfig.json +16 -0
- package/package.json +2 -2
- package/front_end/core/common/Linkifier.ts +0 -55
- package/front_end/panels/timeline/CLSLinkifier.ts +0 -58
- package/front_end/ui/components/expandable_list/ExpandableList.docs.ts +0 -30
- /package/front_end/panels/application/{components/originTrialTokenRows.css → originTrialTokenRows.css} +0 -0
- /package/front_end/panels/application/{components/originTrialTreeView.css → originTrialTreeView.css} +0 -0
- /package/front_end/panels/{elements → common}/domLinkifier.css +0 -0
|
@@ -763,7 +763,6 @@ inspectorBackend.registerEnum("Network.ResourcePriority", {VeryLow: "VeryLow", L
|
|
|
763
763
|
inspectorBackend.registerEnum("Network.RequestReferrerPolicy", {UnsafeUrl: "unsafe-url", NoReferrerWhenDowngrade: "no-referrer-when-downgrade", NoReferrer: "no-referrer", Origin: "origin", OriginWhenCrossOrigin: "origin-when-cross-origin", SameOrigin: "same-origin", StrictOrigin: "strict-origin", StrictOriginWhenCrossOrigin: "strict-origin-when-cross-origin"});
|
|
764
764
|
inspectorBackend.registerEnum("Network.CertificateTransparencyCompliance", {Unknown: "unknown", NotCompliant: "not-compliant", Compliant: "compliant"});
|
|
765
765
|
inspectorBackend.registerEnum("Network.BlockedReason", {Other: "other", Csp: "csp", MixedContent: "mixed-content", Origin: "origin", Inspector: "inspector", Integrity: "integrity", SubresourceFilter: "subresource-filter", ContentType: "content-type", CoepFrameResourceNeedsCoepHeader: "coep-frame-resource-needs-coep-header", CoopSandboxedIframeCannotNavigateToCoopPage: "coop-sandboxed-iframe-cannot-navigate-to-coop-page", CorpNotSameOrigin: "corp-not-same-origin", CorpNotSameOriginAfterDefaultedToSameOriginByCoep: "corp-not-same-origin-after-defaulted-to-same-origin-by-coep", CorpNotSameOriginAfterDefaultedToSameOriginByDip: "corp-not-same-origin-after-defaulted-to-same-origin-by-dip", CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip: "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip", CorpNotSameSite: "corp-not-same-site", SriMessageSignatureMismatch: "sri-message-signature-mismatch"});
|
|
766
|
-
inspectorBackend.registerEnum("Network.IpProxyStatus", {Available: "Available", FeatureNotEnabled: "FeatureNotEnabled", MaskedDomainListNotEnabled: "MaskedDomainListNotEnabled", MaskedDomainListNotPopulated: "MaskedDomainListNotPopulated", AuthTokensUnavailable: "AuthTokensUnavailable", Unavailable: "Unavailable", BypassedByDevTools: "BypassedByDevTools"});
|
|
767
766
|
inspectorBackend.registerEnum("Network.CorsError", {DisallowedByMode: "DisallowedByMode", InvalidResponse: "InvalidResponse", WildcardOriginNotAllowed: "WildcardOriginNotAllowed", MissingAllowOriginHeader: "MissingAllowOriginHeader", MultipleAllowOriginValues: "MultipleAllowOriginValues", InvalidAllowOriginValue: "InvalidAllowOriginValue", AllowOriginMismatch: "AllowOriginMismatch", InvalidAllowCredentials: "InvalidAllowCredentials", CorsDisabledScheme: "CorsDisabledScheme", PreflightInvalidStatus: "PreflightInvalidStatus", PreflightDisallowedRedirect: "PreflightDisallowedRedirect", PreflightWildcardOriginNotAllowed: "PreflightWildcardOriginNotAllowed", PreflightMissingAllowOriginHeader: "PreflightMissingAllowOriginHeader", PreflightMultipleAllowOriginValues: "PreflightMultipleAllowOriginValues", PreflightInvalidAllowOriginValue: "PreflightInvalidAllowOriginValue", PreflightAllowOriginMismatch: "PreflightAllowOriginMismatch", PreflightInvalidAllowCredentials: "PreflightInvalidAllowCredentials", PreflightMissingAllowExternal: "PreflightMissingAllowExternal", PreflightInvalidAllowExternal: "PreflightInvalidAllowExternal", PreflightMissingAllowPrivateNetwork: "PreflightMissingAllowPrivateNetwork", PreflightInvalidAllowPrivateNetwork: "PreflightInvalidAllowPrivateNetwork", InvalidAllowMethodsPreflightResponse: "InvalidAllowMethodsPreflightResponse", InvalidAllowHeadersPreflightResponse: "InvalidAllowHeadersPreflightResponse", MethodDisallowedByPreflightResponse: "MethodDisallowedByPreflightResponse", HeaderDisallowedByPreflightResponse: "HeaderDisallowedByPreflightResponse", RedirectContainsCredentials: "RedirectContainsCredentials", InsecurePrivateNetwork: "InsecurePrivateNetwork", InvalidPrivateNetworkAccess: "InvalidPrivateNetworkAccess", UnexpectedPrivateNetworkAccess: "UnexpectedPrivateNetworkAccess", NoCorsRedirectModeNotFollow: "NoCorsRedirectModeNotFollow", PreflightMissingPrivateNetworkAccessId: "PreflightMissingPrivateNetworkAccessId", PreflightMissingPrivateNetworkAccessName: "PreflightMissingPrivateNetworkAccessName", PrivateNetworkAccessPermissionUnavailable: "PrivateNetworkAccessPermissionUnavailable", PrivateNetworkAccessPermissionDenied: "PrivateNetworkAccessPermissionDenied", LocalNetworkAccessPermissionDenied: "LocalNetworkAccessPermissionDenied"});
|
|
768
767
|
inspectorBackend.registerEnum("Network.ServiceWorkerResponseSource", {CacheStorage: "cache-storage", HttpCache: "http-cache", FallbackCode: "fallback-code", Network: "network"});
|
|
769
768
|
inspectorBackend.registerEnum("Network.TrustTokenParamsRefreshPolicy", {UseCached: "UseCached", Refresh: "Refresh"});
|
|
@@ -827,8 +826,6 @@ inspectorBackend.registerEvent("Network.policyUpdated", []);
|
|
|
827
826
|
inspectorBackend.registerEvent("Network.reportingApiReportAdded", ["report"]);
|
|
828
827
|
inspectorBackend.registerEvent("Network.reportingApiReportUpdated", ["report"]);
|
|
829
828
|
inspectorBackend.registerEvent("Network.reportingApiEndpointsChangedForOrigin", ["origin", "endpoints"]);
|
|
830
|
-
inspectorBackend.registerCommand("Network.getIPProtectionProxyStatus", [], ["status"], "Returns enum representing if IP Proxy of requests is available or reason it is not active.");
|
|
831
|
-
inspectorBackend.registerCommand("Network.setIPProtectionProxyBypassEnabled", [{"name": "enabled", "type": "boolean", "optional": false, "description": "Whether IP Proxy is being bypassed by devtools; false by default.", "typeRef": null}], [], "Sets bypass IP Protection Proxy boolean.");
|
|
832
829
|
inspectorBackend.registerCommand("Network.setAcceptedEncodings", [{"name": "encodings", "type": "array", "optional": false, "description": "List of accepted content encodings.", "typeRef": "Network.ContentEncoding"}], [], "Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.");
|
|
833
830
|
inspectorBackend.registerCommand("Network.clearAcceptedEncodingsOverride", [], [], "Clears accepted encodings set by setAcceptedEncodings");
|
|
834
831
|
inspectorBackend.registerCommand("Network.canClearBrowserCache", [], ["result"], "Tells whether clearing browser cache is supported.");
|
|
@@ -874,7 +871,7 @@ inspectorBackend.registerType("Network.SecurityDetails", [{"name": "protocol", "
|
|
|
874
871
|
inspectorBackend.registerType("Network.CorsErrorStatus", [{"name": "corsError", "type": "string", "optional": false, "description": "", "typeRef": "Network.CorsError"}, {"name": "failedParameter", "type": "string", "optional": false, "description": "", "typeRef": null}]);
|
|
875
872
|
inspectorBackend.registerType("Network.TrustTokenParams", [{"name": "operation", "type": "string", "optional": false, "description": "", "typeRef": "Network.TrustTokenOperationType"}, {"name": "refreshPolicy", "type": "string", "optional": false, "description": "Only set for \\\"token-redemption\\\" operation and determine whether to request a fresh SRR or use a still valid cached SRR.", "typeRef": null}, {"name": "issuers", "type": "array", "optional": true, "description": "Origins of issuers from whom to request tokens or redemption records.", "typeRef": "string"}]);
|
|
876
873
|
inspectorBackend.registerType("Network.ServiceWorkerRouterInfo", [{"name": "ruleIdMatched", "type": "number", "optional": true, "description": "ID of the rule matched. If there is a matched rule, this field will be set, otherwiser no value will be set.", "typeRef": null}, {"name": "matchedSourceType", "type": "string", "optional": true, "description": "The router source of the matched rule. If there is a matched rule, this field will be set, otherwise no value will be set.", "typeRef": "Network.ServiceWorkerRouterSource"}, {"name": "actualSourceType", "type": "string", "optional": true, "description": "The actual router source used.", "typeRef": "Network.ServiceWorkerRouterSource"}]);
|
|
877
|
-
inspectorBackend.registerType("Network.Response", [{"name": "url", "type": "string", "optional": false, "description": "Response URL. This URL can be different from CachedResource.url in case of redirect.", "typeRef": null}, {"name": "status", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null}, {"name": "statusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null}, {"name": "headers", "type": "object", "optional": false, "description": "HTTP response headers.", "typeRef": "Network.Headers"}, {"name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.", "typeRef": null}, {"name": "mimeType", "type": "string", "optional": false, "description": "Resource mimeType as determined by the browser.", "typeRef": null}, {"name": "charset", "type": "string", "optional": false, "description": "Resource charset as determined by the browser (if applicable).", "typeRef": null}, {"name": "requestHeaders", "type": "object", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network.", "typeRef": "Network.Headers"}, {"name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.", "typeRef": null}, {"name": "connectionReused", "type": "boolean", "optional": false, "description": "Specifies whether physical connection was actually reused for this request.", "typeRef": null}, {"name": "connectionId", "type": "number", "optional": false, "description": "Physical connection id that was actually used for this request.", "typeRef": null}, {"name": "remoteIPAddress", "type": "string", "optional": true, "description": "Remote IP address.", "typeRef": null}, {"name": "remotePort", "type": "number", "optional": true, "description": "Remote port.", "typeRef": null}, {"name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache.", "typeRef": null}, {"name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker.", "typeRef": null}, {"name": "fromPrefetchCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null}, {"name": "fromEarlyHints", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null}, {"name": "serviceWorkerRouterInfo", "type": "object", "optional": true, "description": "Information about how ServiceWorker Static Router API was used. If this field is set with `matchedSourceType` field, a matching rule is found. If this field is set without `matchedSource`, no matching rule is found. Otherwise, the API is not used.", "typeRef": "Network.ServiceWorkerRouterInfo"}, {"name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far.", "typeRef": null}, {"name": "timing", "type": "object", "optional": true, "description": "Timing information for the given request.", "typeRef": "Network.ResourceTiming"}, {"name": "serviceWorkerResponseSource", "type": "string", "optional": true, "description": "Response source of response from ServiceWorker.", "typeRef": "Network.ServiceWorkerResponseSource"}, {"name": "responseTime", "type": "number", "optional": true, "description": "The time at which the returned response was generated.", "typeRef": "Network.TimeSinceEpoch"}, {"name": "cacheStorageCacheName", "type": "string", "optional": true, "description": "Cache Storage Cache Name.", "typeRef": null}, {"name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request.", "typeRef": null}, {"name": "alternateProtocolUsage", "type": "string", "optional": true, "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.", "typeRef": "Network.AlternateProtocolUsage"}, {"name": "securityState", "type": "string", "optional": false, "description": "Security state of the request resource.", "typeRef": "Security.SecurityState"}, {"name": "securityDetails", "type": "object", "optional": true, "description": "Security details for the request.", "typeRef": "Network.SecurityDetails"}
|
|
874
|
+
inspectorBackend.registerType("Network.Response", [{"name": "url", "type": "string", "optional": false, "description": "Response URL. This URL can be different from CachedResource.url in case of redirect.", "typeRef": null}, {"name": "status", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null}, {"name": "statusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null}, {"name": "headers", "type": "object", "optional": false, "description": "HTTP response headers.", "typeRef": "Network.Headers"}, {"name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.", "typeRef": null}, {"name": "mimeType", "type": "string", "optional": false, "description": "Resource mimeType as determined by the browser.", "typeRef": null}, {"name": "charset", "type": "string", "optional": false, "description": "Resource charset as determined by the browser (if applicable).", "typeRef": null}, {"name": "requestHeaders", "type": "object", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network.", "typeRef": "Network.Headers"}, {"name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.", "typeRef": null}, {"name": "connectionReused", "type": "boolean", "optional": false, "description": "Specifies whether physical connection was actually reused for this request.", "typeRef": null}, {"name": "connectionId", "type": "number", "optional": false, "description": "Physical connection id that was actually used for this request.", "typeRef": null}, {"name": "remoteIPAddress", "type": "string", "optional": true, "description": "Remote IP address.", "typeRef": null}, {"name": "remotePort", "type": "number", "optional": true, "description": "Remote port.", "typeRef": null}, {"name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache.", "typeRef": null}, {"name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker.", "typeRef": null}, {"name": "fromPrefetchCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null}, {"name": "fromEarlyHints", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null}, {"name": "serviceWorkerRouterInfo", "type": "object", "optional": true, "description": "Information about how ServiceWorker Static Router API was used. If this field is set with `matchedSourceType` field, a matching rule is found. If this field is set without `matchedSource`, no matching rule is found. Otherwise, the API is not used.", "typeRef": "Network.ServiceWorkerRouterInfo"}, {"name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far.", "typeRef": null}, {"name": "timing", "type": "object", "optional": true, "description": "Timing information for the given request.", "typeRef": "Network.ResourceTiming"}, {"name": "serviceWorkerResponseSource", "type": "string", "optional": true, "description": "Response source of response from ServiceWorker.", "typeRef": "Network.ServiceWorkerResponseSource"}, {"name": "responseTime", "type": "number", "optional": true, "description": "The time at which the returned response was generated.", "typeRef": "Network.TimeSinceEpoch"}, {"name": "cacheStorageCacheName", "type": "string", "optional": true, "description": "Cache Storage Cache Name.", "typeRef": null}, {"name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request.", "typeRef": null}, {"name": "alternateProtocolUsage", "type": "string", "optional": true, "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.", "typeRef": "Network.AlternateProtocolUsage"}, {"name": "securityState", "type": "string", "optional": false, "description": "Security state of the request resource.", "typeRef": "Security.SecurityState"}, {"name": "securityDetails", "type": "object", "optional": true, "description": "Security details for the request.", "typeRef": "Network.SecurityDetails"}]);
|
|
878
875
|
inspectorBackend.registerType("Network.WebSocketRequest", [{"name": "headers", "type": "object", "optional": false, "description": "HTTP request headers.", "typeRef": "Network.Headers"}]);
|
|
879
876
|
inspectorBackend.registerType("Network.WebSocketResponse", [{"name": "status", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null}, {"name": "statusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null}, {"name": "headers", "type": "object", "optional": false, "description": "HTTP response headers.", "typeRef": "Network.Headers"}, {"name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text.", "typeRef": null}, {"name": "requestHeaders", "type": "object", "optional": true, "description": "HTTP request headers.", "typeRef": "Network.Headers"}, {"name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text.", "typeRef": null}]);
|
|
880
877
|
inspectorBackend.registerType("Network.WebSocketFrame", [{"name": "opcode", "type": "number", "optional": false, "description": "WebSocket message opcode.", "typeRef": null}, {"name": "mask", "type": "boolean", "optional": false, "description": "WebSocket message mask.", "typeRef": null}, {"name": "payloadData", "type": "string", "optional": false, "description": "WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.", "typeRef": null}]);
|
|
@@ -1354,7 +1351,7 @@ inspectorBackend.registerCommand("Target.setAutoAttach", [{"name": "autoAttach",
|
|
|
1354
1351
|
inspectorBackend.registerCommand("Target.autoAttachRelated", [{"name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID"}, {"name": "waitForDebuggerOnStart", "type": "boolean", "optional": false, "description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.", "typeRef": null}, {"name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be attached.", "typeRef": "Target.TargetFilter"}], [], "Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.");
|
|
1355
1352
|
inspectorBackend.registerCommand("Target.setDiscoverTargets", [{"name": "discover", "type": "boolean", "optional": false, "description": "Whether to discover available targets.", "typeRef": null}, {"name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be attached. If `discover` is false, `filter` must be omitted or empty.", "typeRef": "Target.TargetFilter"}], [], "Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.");
|
|
1356
1353
|
inspectorBackend.registerCommand("Target.setRemoteLocations", [{"name": "locations", "type": "array", "optional": false, "description": "List of remote locations.", "typeRef": "Target.RemoteLocation"}], [], "Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.");
|
|
1357
|
-
inspectorBackend.registerCommand("Target.openDevTools", [{"name": "targetId", "type": "string", "optional": false, "description": "This can be the page or tab target ID.", "typeRef": "Target.TargetID"}, {"name": "panelId", "type": "string", "optional": true, "description": "The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources and
|
|
1354
|
+
inspectorBackend.registerCommand("Target.openDevTools", [{"name": "targetId", "type": "string", "optional": false, "description": "This can be the page or tab target ID.", "typeRef": "Target.TargetID"}, {"name": "panelId", "type": "string", "optional": true, "description": "The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance.", "typeRef": null}], ["targetId"], "Opens a DevTools window for the target.");
|
|
1358
1355
|
inspectorBackend.registerType("Target.TargetInfo", [{"name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID"}, {"name": "type", "type": "string", "optional": false, "description": "List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22", "typeRef": null}, {"name": "title", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "attached", "type": "boolean", "optional": false, "description": "Whether the target has an attached client.", "typeRef": null}, {"name": "openerId", "type": "string", "optional": true, "description": "Opener target Id", "typeRef": "Target.TargetID"}, {"name": "canAccessOpener", "type": "boolean", "optional": false, "description": "Whether the target has access to the originating window.", "typeRef": null}, {"name": "openerFrameId", "type": "string", "optional": true, "description": "Frame id of originating window (is only set if target has an opener).", "typeRef": "Page.FrameId"}, {"name": "parentFrameId", "type": "string", "optional": true, "description": "Id of the parent frame, only present for the \\\"iframe\\\" targets.", "typeRef": "Page.FrameId"}, {"name": "browserContextId", "type": "string", "optional": true, "description": "", "typeRef": "Browser.BrowserContextID"}, {"name": "subtype", "type": "string", "optional": true, "description": "Provides additional details for specific target types. For example, for the type of \\\"page\\\", this may be set to \\\"prerender\\\".", "typeRef": null}]);
|
|
1359
1356
|
inspectorBackend.registerType("Target.FilterEntry", [{"name": "exclude", "type": "boolean", "optional": true, "description": "If set, causes exclusion of matching targets from the list.", "typeRef": null}, {"name": "type", "type": "string", "optional": true, "description": "If not present, matches any type.", "typeRef": null}]);
|
|
1360
1357
|
inspectorBackend.registerType("Target.TargetFilter", [{"name": "TargetFilter", "type": "array", "optional": false, "description": "The entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of `exclude` field in the entry. If filter is not specified, the one assumed is [{type: \\\"browser\\\", exclude: true}, {type: \\\"tab\\\", exclude: true}, {}] (i.e. include everything but `browser` and `tab`).", "typeRef": "Target.FilterEntry"}]);
|
|
@@ -677,10 +677,6 @@ export const generatedProperties = [
|
|
|
677
677
|
"scroll-snap-align",
|
|
678
678
|
"scroll-snap-stop",
|
|
679
679
|
"scroll-snap-type",
|
|
680
|
-
"scroll-start-block",
|
|
681
|
-
"scroll-start-inline",
|
|
682
|
-
"scroll-start-x",
|
|
683
|
-
"scroll-start-y",
|
|
684
680
|
"scroll-target-group",
|
|
685
681
|
"scroll-timeline-axis",
|
|
686
682
|
"scroll-timeline-name",
|
|
@@ -4051,25 +4047,6 @@ export const generatedProperties = [
|
|
|
4051
4047
|
],
|
|
4052
4048
|
"name": "scroll-snap-type"
|
|
4053
4049
|
},
|
|
4054
|
-
{
|
|
4055
|
-
"longhands": [
|
|
4056
|
-
"scroll-start-block",
|
|
4057
|
-
"scroll-start-inline"
|
|
4058
|
-
],
|
|
4059
|
-
"name": "scroll-start"
|
|
4060
|
-
},
|
|
4061
|
-
{
|
|
4062
|
-
"name": "scroll-start-block"
|
|
4063
|
-
},
|
|
4064
|
-
{
|
|
4065
|
-
"name": "scroll-start-inline"
|
|
4066
|
-
},
|
|
4067
|
-
{
|
|
4068
|
-
"name": "scroll-start-x"
|
|
4069
|
-
},
|
|
4070
|
-
{
|
|
4071
|
-
"name": "scroll-start-y"
|
|
4072
|
-
},
|
|
4073
4050
|
{
|
|
4074
4051
|
"keywords": [
|
|
4075
4052
|
"none",
|
|
@@ -3240,21 +3240,6 @@ export namespace ProtocolMapping {
|
|
|
3240
3240
|
paramsType: [];
|
|
3241
3241
|
returnType: Protocol.Memory.GetSamplingProfileResponse;
|
|
3242
3242
|
};
|
|
3243
|
-
/**
|
|
3244
|
-
* Returns enum representing if IP Proxy of requests is available
|
|
3245
|
-
* or reason it is not active.
|
|
3246
|
-
*/
|
|
3247
|
-
'Network.getIPProtectionProxyStatus': {
|
|
3248
|
-
paramsType: [];
|
|
3249
|
-
returnType: Protocol.Network.GetIPProtectionProxyStatusResponse;
|
|
3250
|
-
};
|
|
3251
|
-
/**
|
|
3252
|
-
* Sets bypass IP Protection Proxy boolean.
|
|
3253
|
-
*/
|
|
3254
|
-
'Network.setIPProtectionProxyBypassEnabled': {
|
|
3255
|
-
paramsType: [Protocol.Network.SetIPProtectionProxyBypassEnabledRequest];
|
|
3256
|
-
returnType: void;
|
|
3257
|
-
};
|
|
3258
3243
|
/**
|
|
3259
3244
|
* Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
|
|
3260
3245
|
*/
|
|
@@ -2451,17 +2451,6 @@ declare namespace ProtocolProxyApi {
|
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
2453
|
export interface NetworkApi {
|
|
2454
|
-
/**
|
|
2455
|
-
* Returns enum representing if IP Proxy of requests is available
|
|
2456
|
-
* or reason it is not active.
|
|
2457
|
-
*/
|
|
2458
|
-
invoke_getIPProtectionProxyStatus(): Promise<Protocol.Network.GetIPProtectionProxyStatusResponse>;
|
|
2459
|
-
|
|
2460
|
-
/**
|
|
2461
|
-
* Sets bypass IP Protection Proxy boolean.
|
|
2462
|
-
*/
|
|
2463
|
-
invoke_setIPProtectionProxyBypassEnabled(params: Protocol.Network.SetIPProtectionProxyBypassEnabledRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
2464
|
-
|
|
2465
2454
|
/**
|
|
2466
2455
|
* Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.
|
|
2467
2456
|
*/
|
|
@@ -10165,20 +10165,6 @@ export namespace Network {
|
|
|
10165
10165
|
SriMessageSignatureMismatch = 'sri-message-signature-mismatch',
|
|
10166
10166
|
}
|
|
10167
10167
|
|
|
10168
|
-
/**
|
|
10169
|
-
* Sets Controls for IP Proxy of requests.
|
|
10170
|
-
* Page reload is required before the new behavior will be observed.
|
|
10171
|
-
*/
|
|
10172
|
-
export const enum IpProxyStatus {
|
|
10173
|
-
Available = 'Available',
|
|
10174
|
-
FeatureNotEnabled = 'FeatureNotEnabled',
|
|
10175
|
-
MaskedDomainListNotEnabled = 'MaskedDomainListNotEnabled',
|
|
10176
|
-
MaskedDomainListNotPopulated = 'MaskedDomainListNotPopulated',
|
|
10177
|
-
AuthTokensUnavailable = 'AuthTokensUnavailable',
|
|
10178
|
-
Unavailable = 'Unavailable',
|
|
10179
|
-
BypassedByDevTools = 'BypassedByDevTools',
|
|
10180
|
-
}
|
|
10181
|
-
|
|
10182
10168
|
/**
|
|
10183
10169
|
* The reason why request was blocked.
|
|
10184
10170
|
*/
|
|
@@ -10424,11 +10410,6 @@ export namespace Network {
|
|
|
10424
10410
|
* Security details for the request.
|
|
10425
10411
|
*/
|
|
10426
10412
|
securityDetails?: SecurityDetails;
|
|
10427
|
-
/**
|
|
10428
|
-
* Indicates whether the request was sent through IP Protection proxies. If
|
|
10429
|
-
* set to true, the request used the IP Protection privacy feature.
|
|
10430
|
-
*/
|
|
10431
|
-
isIpProtectionUsed?: boolean;
|
|
10432
10413
|
}
|
|
10433
10414
|
|
|
10434
10415
|
/**
|
|
@@ -11336,20 +11317,6 @@ export namespace Network {
|
|
|
11336
11317
|
includeCredentials: boolean;
|
|
11337
11318
|
}
|
|
11338
11319
|
|
|
11339
|
-
export interface GetIPProtectionProxyStatusResponse extends ProtocolResponseWithError {
|
|
11340
|
-
/**
|
|
11341
|
-
* Whether IP proxy is available
|
|
11342
|
-
*/
|
|
11343
|
-
status: IpProxyStatus;
|
|
11344
|
-
}
|
|
11345
|
-
|
|
11346
|
-
export interface SetIPProtectionProxyBypassEnabledRequest {
|
|
11347
|
-
/**
|
|
11348
|
-
* Whether IP Proxy is being bypassed by devtools; false by default.
|
|
11349
|
-
*/
|
|
11350
|
-
enabled: boolean;
|
|
11351
|
-
}
|
|
11352
|
-
|
|
11353
11320
|
export interface SetAcceptedEncodingsRequest {
|
|
11354
11321
|
/**
|
|
11355
11322
|
* List of accepted content encodings.
|
|
@@ -18516,7 +18483,8 @@ export namespace Target {
|
|
|
18516
18483
|
targetId: TargetID;
|
|
18517
18484
|
/**
|
|
18518
18485
|
* The id of the panel we want DevTools to open initially. Currently
|
|
18519
|
-
* supported panels are elements, console, network, sources
|
|
18486
|
+
* supported panels are elements, console, network, sources, resources
|
|
18487
|
+
* and performance.
|
|
18520
18488
|
*/
|
|
18521
18489
|
panelId?: string;
|
|
18522
18490
|
}
|
|
@@ -204,6 +204,15 @@ export type FunctionCallHandlerResult<Result> = {
|
|
|
204
204
|
requiresApproval: true,
|
|
205
205
|
}|{error: string};
|
|
206
206
|
|
|
207
|
+
export interface FunctionHandlerOptions {
|
|
208
|
+
/**
|
|
209
|
+
* Shows that the user approved
|
|
210
|
+
* the execution if it was required
|
|
211
|
+
*/
|
|
212
|
+
approved?: boolean;
|
|
213
|
+
signal?: AbortSignal;
|
|
214
|
+
}
|
|
215
|
+
|
|
207
216
|
export interface FunctionDeclaration<Args extends Record<string, unknown>, ReturnType> {
|
|
208
217
|
/**
|
|
209
218
|
* Description of function, this is send to the LLM
|
|
@@ -228,14 +237,7 @@ export interface FunctionDeclaration<Args extends Record<string, unknown>, Retur
|
|
|
228
237
|
/**
|
|
229
238
|
* Function implementation that the LLM will try to execute,
|
|
230
239
|
*/
|
|
231
|
-
handler: (args: Args, options?:
|
|
232
|
-
/**
|
|
233
|
-
* Shows that the user approved
|
|
234
|
-
* the execution if it was required
|
|
235
|
-
*/
|
|
236
|
-
approved?: boolean,
|
|
237
|
-
signal?: AbortSignal,
|
|
238
|
-
}) => Promise<FunctionCallHandlerResult<ReturnType>>;
|
|
240
|
+
handler: (args: Args, options?: FunctionHandlerOptions) => Promise<FunctionCallHandlerResult<ReturnType>>;
|
|
239
241
|
}
|
|
240
242
|
|
|
241
243
|
interface AidaFetchResult {
|
|
@@ -151,7 +151,13 @@ export class PatchAgent extends AiAgent<Workspace.Workspace.Project> {
|
|
|
151
151
|
return {
|
|
152
152
|
result: {
|
|
153
153
|
matches: await this.#project.searchFiles(
|
|
154
|
-
args.query,
|
|
154
|
+
args.query,
|
|
155
|
+
args.caseSensitive,
|
|
156
|
+
args.isRegex,
|
|
157
|
+
{
|
|
158
|
+
signal: options?.signal,
|
|
159
|
+
},
|
|
160
|
+
),
|
|
155
161
|
}
|
|
156
162
|
};
|
|
157
163
|
},
|
|
@@ -10,7 +10,6 @@ import * as Root from '../../../core/root/root.js';
|
|
|
10
10
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
11
11
|
import * as Tracing from '../../../services/tracing/tracing.js';
|
|
12
12
|
import * as Trace from '../../trace/trace.js';
|
|
13
|
-
import {ConversationType} from '../AiHistoryStorage.js';
|
|
14
13
|
import {
|
|
15
14
|
PerformanceInsightFormatter,
|
|
16
15
|
} from '../data_formatters/PerformanceInsightFormatter.js';
|
|
@@ -323,10 +322,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
324
|
|
|
326
|
-
getConversationType(): ConversationType {
|
|
327
|
-
return ConversationType.PERFORMANCE;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
325
|
async *
|
|
331
326
|
handleContextDetails(context: ConversationContext<AgentFocus>|null): AsyncGenerator<ContextResponse, void, void> {
|
|
332
327
|
if (!context) {
|
|
@@ -21,9 +21,10 @@ import {
|
|
|
21
21
|
ConversationContext,
|
|
22
22
|
type ConversationSuggestions,
|
|
23
23
|
type FunctionCallHandlerResult,
|
|
24
|
+
type FunctionHandlerOptions,
|
|
24
25
|
MultimodalInputType,
|
|
25
26
|
type RequestOptions,
|
|
26
|
-
ResponseType
|
|
27
|
+
ResponseType
|
|
27
28
|
} from './AiAgent.js';
|
|
28
29
|
|
|
29
30
|
/*
|
|
@@ -268,11 +269,7 @@ export class StylingAgent extends AiAgent<SDK.DOMModel.DOMNode> {
|
|
|
268
269
|
#createExtensionScope: CreateExtensionScopeFunction;
|
|
269
270
|
|
|
270
271
|
constructor(opts: AgentOptions) {
|
|
271
|
-
super(
|
|
272
|
-
aidaClient: opts.aidaClient,
|
|
273
|
-
serverSideLoggingEnabled: opts.serverSideLoggingEnabled,
|
|
274
|
-
confirmSideEffectForTest: opts.confirmSideEffectForTest,
|
|
275
|
-
});
|
|
272
|
+
super(opts);
|
|
276
273
|
|
|
277
274
|
this.#changes = opts.changeManager || new ChangeManager();
|
|
278
275
|
this.#execJs = opts.execJs ?? executeJsCode;
|
|
@@ -633,8 +630,7 @@ const data = {
|
|
|
633
630
|
};
|
|
634
631
|
}
|
|
635
632
|
|
|
636
|
-
async executeAction(action: string, options?:
|
|
637
|
-
Promise<FunctionCallHandlerResult<unknown>> {
|
|
633
|
+
async executeAction(action: string, options?: FunctionHandlerOptions): Promise<FunctionCallHandlerResult<unknown>> {
|
|
638
634
|
debugLog(`Action to execute: ${action}`);
|
|
639
635
|
|
|
640
636
|
if (options?.approved === false) {
|
|
@@ -46,7 +46,7 @@ export interface Callbacks {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/* clang-format off */
|
|
49
|
-
const consoleAdditionalContextFileContent = `/**
|
|
49
|
+
export const consoleAdditionalContextFileContent = `/**
|
|
50
50
|
* This file describes the execution environment of the Chrome DevTools Console.
|
|
51
51
|
* The code is JavaScript, but with special global functions and variables.
|
|
52
52
|
* Top-level await is available.
|
|
@@ -73,6 +73,7 @@ export class AiCodeGeneration {
|
|
|
73
73
|
inference_language: inferenceLanguage,
|
|
74
74
|
temperature: validTemperature(this.#options.temperature),
|
|
75
75
|
model_id: this.#options.modelId || undefined,
|
|
76
|
+
expect_code_output: true,
|
|
76
77
|
},
|
|
77
78
|
metadata: {
|
|
78
79
|
disable_user_content_logging: !(this.#serverSideLoggingEnabled ?? false),
|
|
@@ -139,10 +140,11 @@ export class AiCodeGeneration {
|
|
|
139
140
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeGenerationSuggestionAccepted);
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
async generateCode(
|
|
143
|
-
|
|
143
|
+
async generateCode(
|
|
144
|
+
prompt: string, preamble: string, inferenceLanguage?: Host.AidaClient.AidaInferenceLanguage,
|
|
145
|
+
options?: {signal?: AbortSignal}): Promise<Host.AidaClient.GenerateCodeResponse|null> {
|
|
144
146
|
const request = this.#buildRequest(prompt, preamble, inferenceLanguage);
|
|
145
|
-
const response = await this.#aidaClient.generateCode(request);
|
|
147
|
+
const response = await this.#aidaClient.generateCode(request, options);
|
|
146
148
|
|
|
147
149
|
debugLog({request, response});
|
|
148
150
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
|
+
import * as Root from '../../core/root/root.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import type * as Workspace from '../workspace/workspace.js';
|
|
9
10
|
|
|
@@ -16,15 +17,14 @@ import type {ResourceMapping} from './ResourceMapping.js';
|
|
|
16
17
|
import {SASSSourceMapping} from './SASSSourceMapping.js';
|
|
17
18
|
import {StylesSourceMapping} from './StylesSourceMapping.js';
|
|
18
19
|
|
|
19
|
-
let cssWorkspaceBindingInstance: CSSWorkspaceBinding|undefined;
|
|
20
|
-
|
|
21
20
|
export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<SDK.CSSModel.CSSModel> {
|
|
22
21
|
readonly #resourceMapping: ResourceMapping;
|
|
23
22
|
readonly #modelToInfo: Map<SDK.CSSModel.CSSModel, ModelInfo>;
|
|
24
23
|
readonly #liveLocationPromises: Set<Promise<unknown>>;
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
constructor(resourceMapping: ResourceMapping, targetManager: SDK.TargetManager.TargetManager) {
|
|
27
26
|
this.#resourceMapping = resourceMapping;
|
|
27
|
+
this.#resourceMapping.cssWorkspaceBinding = this;
|
|
28
28
|
this.#modelToInfo = new Map();
|
|
29
29
|
targetManager.observeModels(SDK.CSSModel.CSSModel, this);
|
|
30
30
|
|
|
@@ -37,20 +37,21 @@ export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<S
|
|
|
37
37
|
targetManager: SDK.TargetManager.TargetManager|null,
|
|
38
38
|
} = {forceNew: null, resourceMapping: null, targetManager: null}): CSSWorkspaceBinding {
|
|
39
39
|
const {forceNew, resourceMapping, targetManager} = opts;
|
|
40
|
-
if (
|
|
40
|
+
if (forceNew) {
|
|
41
41
|
if (!resourceMapping || !targetManager) {
|
|
42
42
|
throw new Error(`Unable to create CSSWorkspaceBinding: resourceMapping and targetManager must be provided: ${
|
|
43
43
|
new Error().stack}`);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Root.DevToolsContext.globalInstance().set(
|
|
47
|
+
CSSWorkspaceBinding, new CSSWorkspaceBinding(resourceMapping, targetManager));
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
return
|
|
50
|
+
return Root.DevToolsContext.globalInstance().get(CSSWorkspaceBinding);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
static removeInstance(): void {
|
|
53
|
-
|
|
54
|
+
Root.DevToolsContext.globalInstance().delete(CSSWorkspaceBinding);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
get modelToInfo(): Map<SDK.CSSModel.CSSModel, ModelInfo> {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
|
+
import * as Root from '../../core/root/root.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
10
|
import type * as StackTrace from '../stack_trace/stack_trace.js';
|
|
@@ -20,8 +21,6 @@ import {NetworkProject} from './NetworkProject.js';
|
|
|
20
21
|
import type {ResourceMapping} from './ResourceMapping.js';
|
|
21
22
|
import {type ResourceScriptFile, ResourceScriptMapping} from './ResourceScriptMapping.js';
|
|
22
23
|
|
|
23
|
-
let debuggerWorkspaceBindingInstance: DebuggerWorkspaceBinding|undefined;
|
|
24
|
-
|
|
25
24
|
export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
|
26
25
|
readonly resourceMapping: ResourceMapping;
|
|
27
26
|
readonly #debuggerModelToData: Map<SDK.DebuggerModel.DebuggerModel, ModelData>;
|
|
@@ -30,10 +29,11 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
30
29
|
readonly ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager;
|
|
31
30
|
readonly workspace: Workspace.Workspace.WorkspaceImpl;
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
constructor(
|
|
34
33
|
resourceMapping: ResourceMapping, targetManager: SDK.TargetManager.TargetManager,
|
|
35
34
|
ignoreListManager: Workspace.IgnoreListManager.IgnoreListManager, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
36
35
|
this.resourceMapping = resourceMapping;
|
|
36
|
+
this.resourceMapping.debuggerWorkspaceBinding = this;
|
|
37
37
|
this.ignoreListManager = ignoreListManager;
|
|
38
38
|
this.workspace = workspace;
|
|
39
39
|
|
|
@@ -68,22 +68,23 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
68
68
|
} = {forceNew: null, resourceMapping: null, targetManager: null, ignoreListManager: null, workspace: null}):
|
|
69
69
|
DebuggerWorkspaceBinding {
|
|
70
70
|
const {forceNew, resourceMapping, targetManager, ignoreListManager, workspace} = opts;
|
|
71
|
-
if (
|
|
71
|
+
if (forceNew) {
|
|
72
72
|
if (!resourceMapping || !targetManager || !ignoreListManager || !workspace) {
|
|
73
73
|
throw new Error(
|
|
74
74
|
`Unable to create DebuggerWorkspaceBinding: resourceMapping, targetManager and IgnoreLIstManager must be provided: ${
|
|
75
75
|
new Error().stack}`);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
Root.DevToolsContext.globalInstance().set(
|
|
79
|
+
DebuggerWorkspaceBinding,
|
|
80
|
+
new DebuggerWorkspaceBinding(resourceMapping, targetManager, ignoreListManager, workspace));
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
return
|
|
83
|
+
return Root.DevToolsContext.globalInstance().get(DebuggerWorkspaceBinding);
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
static removeInstance(): void {
|
|
86
|
-
|
|
87
|
+
Root.DevToolsContext.globalInstance().delete(DebuggerWorkspaceBinding);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
private async computeAutoStepRanges(mode: SDK.DebuggerModel.StepMode, callFrame: SDK.DebuggerModel.CallFrame):
|
|
@@ -9,8 +9,8 @@ import * as TextUtils from '../text_utils/text_utils.js';
|
|
|
9
9
|
import * as Workspace from '../workspace/workspace.js';
|
|
10
10
|
|
|
11
11
|
import {ContentProviderBasedProject} from './ContentProviderBasedProject.js';
|
|
12
|
-
import {CSSWorkspaceBinding} from './CSSWorkspaceBinding.js';
|
|
13
|
-
import {DebuggerWorkspaceBinding} from './DebuggerWorkspaceBinding.js';
|
|
12
|
+
import type {CSSWorkspaceBinding} from './CSSWorkspaceBinding.js';
|
|
13
|
+
import type {DebuggerWorkspaceBinding} from './DebuggerWorkspaceBinding.js';
|
|
14
14
|
import {NetworkProject} from './NetworkProject.js';
|
|
15
15
|
import {resourceMetadata} from './ResourceUtils.js';
|
|
16
16
|
|
|
@@ -30,13 +30,46 @@ export class ResourceMapping implements SDK.TargetManager.SDKModelObserver<SDK.R
|
|
|
30
30
|
readonly workspace: Workspace.Workspace.WorkspaceImpl;
|
|
31
31
|
readonly #modelToInfo = new Map<SDK.ResourceTreeModel.ResourceTreeModel, ModelInfo>();
|
|
32
32
|
|
|
33
|
+
#debuggerWorkspaceBinding: DebuggerWorkspaceBinding|null = null;
|
|
34
|
+
#cssWorkspaceBinding: CSSWorkspaceBinding|null = null;
|
|
35
|
+
|
|
33
36
|
constructor(targetManager: SDK.TargetManager.TargetManager, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
34
37
|
this.workspace = workspace;
|
|
35
38
|
targetManager.observeModels(SDK.ResourceTreeModel.ResourceTreeModel, this);
|
|
36
39
|
}
|
|
37
40
|
|
|
41
|
+
get debuggerWorkspaceBinding(): DebuggerWorkspaceBinding|null {
|
|
42
|
+
// TODO(crbug.com/458180550): Throw when this.#debuggerWorkspaceBinding is null and never return null.
|
|
43
|
+
// The only reason we don't throw and return an instance unconditionally
|
|
44
|
+
// is that unit tests often don't set-up both the *WorkspaceBindings.
|
|
45
|
+
return this.#debuggerWorkspaceBinding;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* {@link DebuggerWorkspaceBinding} and ResourceMapping form a cycle so we can't wire it up at ctor time. */
|
|
49
|
+
set debuggerWorkspaceBinding(debuggerWorkspaceBinding: DebuggerWorkspaceBinding) {
|
|
50
|
+
if (this.#debuggerWorkspaceBinding) {
|
|
51
|
+
throw new Error('DebuggerWorkspaceBinding already set');
|
|
52
|
+
}
|
|
53
|
+
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get cssWorkspaceBinding(): CSSWorkspaceBinding|null {
|
|
57
|
+
// TODO(crbug.com/458180550): Throw when this.#cssWorkspaceBinding is null and never return null.
|
|
58
|
+
// The only reason we don't throw and return an instance unconditionally
|
|
59
|
+
// is that unit tests often don't set-up both the *WorkspaceBindings.
|
|
60
|
+
return this.#cssWorkspaceBinding;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* {@link CSSWorkspaceBinding} and ResourceMapping form a cycle so we can't wire it up at ctor time. */
|
|
64
|
+
set cssWorkspaceBinding(cssWorkspaceBinding: CSSWorkspaceBinding) {
|
|
65
|
+
if (this.#cssWorkspaceBinding) {
|
|
66
|
+
throw new Error('CSSWorkspaceBinding already set');
|
|
67
|
+
}
|
|
68
|
+
this.#cssWorkspaceBinding = cssWorkspaceBinding;
|
|
69
|
+
}
|
|
70
|
+
|
|
38
71
|
modelAdded(resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel): void {
|
|
39
|
-
const info = new ModelInfo(this
|
|
72
|
+
const info = new ModelInfo(this, resourceTreeModel);
|
|
40
73
|
this.#modelToInfo.set(resourceTreeModel, info);
|
|
41
74
|
}
|
|
42
75
|
|
|
@@ -250,11 +283,13 @@ class ModelInfo {
|
|
|
250
283
|
readonly #bindings = new Map<string, Binding>();
|
|
251
284
|
readonly #cssModel: SDK.CSSModel.CSSModel;
|
|
252
285
|
readonly #eventListeners: Common.EventTarget.EventDescriptor[];
|
|
253
|
-
|
|
254
|
-
|
|
286
|
+
readonly resourceMapping: ResourceMapping;
|
|
287
|
+
|
|
288
|
+
constructor(resourceMapping: ResourceMapping, resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel) {
|
|
255
289
|
const target = resourceTreeModel.target();
|
|
290
|
+
this.resourceMapping = resourceMapping;
|
|
256
291
|
this.project = new ContentProviderBasedProject(
|
|
257
|
-
workspace, 'resources:' + target.id(), Workspace.Workspace.projectTypes.Network, '',
|
|
292
|
+
resourceMapping.workspace, 'resources:' + target.id(), Workspace.Workspace.projectTypes.Network, '',
|
|
258
293
|
false /* isServiceProject */);
|
|
259
294
|
NetworkProject.setTargetForProject(this.project, target);
|
|
260
295
|
|
|
@@ -332,7 +367,7 @@ class ModelInfo {
|
|
|
332
367
|
|
|
333
368
|
let binding = this.#bindings.get(resource.url);
|
|
334
369
|
if (!binding) {
|
|
335
|
-
binding = new Binding(this
|
|
370
|
+
binding = new Binding(this, resource);
|
|
336
371
|
this.#bindings.set(resource.url, binding);
|
|
337
372
|
} else {
|
|
338
373
|
binding.addResource(resource);
|
|
@@ -396,9 +431,16 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
|
396
431
|
stylesheet: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader,
|
|
397
432
|
edit: SDK.CSSModel.Edit|null,
|
|
398
433
|
}> = [];
|
|
399
|
-
|
|
434
|
+
|
|
435
|
+
readonly #debuggerWorkspaceBinding: DebuggerWorkspaceBinding|null;
|
|
436
|
+
readonly #cssWorkspaceBinding: CSSWorkspaceBinding|null;
|
|
437
|
+
|
|
438
|
+
constructor(modelInfo: ModelInfo, resource: SDK.Resource.Resource) {
|
|
400
439
|
this.resources = new Set([resource]);
|
|
401
|
-
this.#project = project;
|
|
440
|
+
this.#project = modelInfo.project;
|
|
441
|
+
this.#debuggerWorkspaceBinding = modelInfo.resourceMapping.debuggerWorkspaceBinding;
|
|
442
|
+
this.#cssWorkspaceBinding = modelInfo.resourceMapping.cssWorkspaceBinding;
|
|
443
|
+
|
|
402
444
|
this.#uiSourceCode = this.#project.createUISourceCode(resource.url, resource.contentType());
|
|
403
445
|
boundUISourceCodes.add(this.#uiSourceCode);
|
|
404
446
|
if (resource.frameId) {
|
|
@@ -407,8 +449,8 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
|
407
449
|
this.#project.addUISourceCodeWithProvider(this.#uiSourceCode, this, resourceMetadata(resource), resource.mimeType);
|
|
408
450
|
|
|
409
451
|
void Promise.all([
|
|
410
|
-
...this.inlineScripts().map(script =>
|
|
411
|
-
...this.inlineStyles().map(style =>
|
|
452
|
+
...this.inlineScripts().map(script => this.#debuggerWorkspaceBinding?.updateLocations(script)),
|
|
453
|
+
...this.inlineStyles().map(style => this.#cssWorkspaceBinding?.updateLocations(style)),
|
|
412
454
|
]);
|
|
413
455
|
}
|
|
414
456
|
|
|
@@ -478,7 +520,7 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
|
478
520
|
continue;
|
|
479
521
|
}
|
|
480
522
|
scriptRangeMap.set(script, range.rebaseAfterTextEdit(oldRange, newRange));
|
|
481
|
-
updatePromises.push(
|
|
523
|
+
updatePromises.push(this.#debuggerWorkspaceBinding?.updateLocations(script));
|
|
482
524
|
}
|
|
483
525
|
for (const style of styles) {
|
|
484
526
|
const range = styleSheetRangeMap.get(style) ?? computeStyleSheetRange(style);
|
|
@@ -486,7 +528,7 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
|
486
528
|
continue;
|
|
487
529
|
}
|
|
488
530
|
styleSheetRangeMap.set(style, range.rebaseAfterTextEdit(oldRange, newRange));
|
|
489
|
-
updatePromises.push(
|
|
531
|
+
updatePromises.push(this.#cssWorkspaceBinding?.updateLocations(style));
|
|
490
532
|
}
|
|
491
533
|
await Promise.all(updatePromises);
|
|
492
534
|
}
|
|
@@ -510,8 +552,8 @@ class Binding implements TextUtils.ContentProvider.ContentProvider {
|
|
|
510
552
|
dispose(): void {
|
|
511
553
|
this.#project.removeUISourceCode(this.#uiSourceCode.url());
|
|
512
554
|
void Promise.all([
|
|
513
|
-
...this.inlineScripts().map(script =>
|
|
514
|
-
...this.inlineStyles().map(style =>
|
|
555
|
+
...this.inlineScripts().map(script => this.#debuggerWorkspaceBinding?.updateLocations(script)),
|
|
556
|
+
...this.inlineStyles().map(style => this.#cssWorkspaceBinding?.updateLocations(style)),
|
|
515
557
|
]);
|
|
516
558
|
}
|
|
517
559
|
|