chrome-devtools-frontend 1.0.1515446 → 1.0.1515796
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/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +64 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +78 -58
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/Processor.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -7
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +24 -11
- package/front_end/panels/common/gdpSignUpDialog.css +4 -0
- package/front_end/panels/search/SearchView.ts +195 -135
- package/front_end/panels/settings/components/SyncSection.ts +58 -9
- package/front_end/panels/settings/components/syncSection.css +6 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -4
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- 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/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- 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 +2 -2
- 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/bidi/Page.d.ts +5 -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 +30 -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/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- 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/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +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 +8 -2
- 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/cdp/Page.d.ts +5 -1
- 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 +8 -2
- 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/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +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 +5 -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/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- 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 +2 -2
- 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/bidi/Page.d.ts +5 -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 +30 -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/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- 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/cdp/NetworkManager.d.ts +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 +8 -2
- 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/cdp/Page.d.ts +5 -1
- 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 +8 -2
- 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/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +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 +5 -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/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/legacy/ProgressIndicator.ts +4 -5
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +3 -3
@@ -195,7 +195,7 @@ const UIStrings = {
|
|
195
195
|
* @description Label for a checkbox in the settings UI. Allows developers to opt-in/opt-out
|
196
196
|
* of receiving Google Developer Program (GDP) badges based on their activity in Chrome DevTools.
|
197
197
|
*/
|
198
|
-
|
198
|
+
earnBadges: 'Earn badges',
|
199
199
|
/**
|
200
200
|
* @description A command available in the command menu to perform searches, for example in the
|
201
201
|
* elements panel, as user types, rather than only when they press Enter.
|
@@ -799,7 +799,7 @@ Common.Settings.registerSettingExtension({
|
|
799
799
|
settingName: 'receive-gdp-badges',
|
800
800
|
settingType: Common.Settings.SettingType.BOOLEAN,
|
801
801
|
storageType: Common.Settings.SettingStorageType.SYNCED,
|
802
|
-
title: i18nLazyString(UIStrings.
|
802
|
+
title: i18nLazyString(UIStrings.earnBadges),
|
803
803
|
defaultValue: false,
|
804
804
|
reloadRequired: true,
|
805
805
|
});
|
@@ -653,7 +653,7 @@ inspectorBackend.registerCommand("IndexedDB.deleteDatabase", [{"name": "security
|
|
653
653
|
inspectorBackend.registerCommand("IndexedDB.deleteObjectStoreEntries", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}, {"name": "databaseName", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "objectStoreName", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "keyRange", "type": "object", "optional": false, "description": "Range of entry keys to delete", "typeRef": "IndexedDB.KeyRange"}], [], "Delete a range of entries from an object store");
|
654
654
|
inspectorBackend.registerCommand("IndexedDB.disable", [], [], "Disables events from backend.");
|
655
655
|
inspectorBackend.registerCommand("IndexedDB.enable", [], [], "Enables events from backend.");
|
656
|
-
inspectorBackend.registerCommand("IndexedDB.requestData", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}, {"name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null}, {"name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null}, {"name": "indexName", "type": "string", "optional": true, "description": "Index name. If not specified
|
656
|
+
inspectorBackend.registerCommand("IndexedDB.requestData", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}, {"name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null}, {"name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null}, {"name": "indexName", "type": "string", "optional": true, "description": "Index name. If not specified, it performs an object store data request.", "typeRef": null}, {"name": "skipCount", "type": "number", "optional": false, "description": "Number of records to skip.", "typeRef": null}, {"name": "pageSize", "type": "number", "optional": false, "description": "Number of records to fetch.", "typeRef": null}, {"name": "keyRange", "type": "object", "optional": true, "description": "Key range.", "typeRef": "IndexedDB.KeyRange"}], ["objectStoreDataEntries", "hasMore"], "Requests data from object store or index.");
|
657
657
|
inspectorBackend.registerCommand("IndexedDB.getMetadata", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}, {"name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null}, {"name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null}], ["entriesCount", "keyGeneratorValue"], "Gets metadata of an object store.");
|
658
658
|
inspectorBackend.registerCommand("IndexedDB.requestDatabase", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}, {"name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null}], ["databaseWithObjectStores"], "Requests database with given name in given frame.");
|
659
659
|
inspectorBackend.registerCommand("IndexedDB.requestDatabaseNames", [{"name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null}, {"name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null}, {"name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket"}], ["databaseNames"], "Requests database names for given security origin.");
|
@@ -897,7 +897,7 @@ inspectorBackend.registerType("Network.WebSocketFrame", [{"name": "opcode", "typ
|
|
897
897
|
inspectorBackend.registerType("Network.CachedResource", [{"name": "url", "type": "string", "optional": false, "description": "Resource URL. This is the url of the original network request.", "typeRef": null}, {"name": "type", "type": "string", "optional": false, "description": "Type of this resource.", "typeRef": "Network.ResourceType"}, {"name": "response", "type": "object", "optional": true, "description": "Cached response data.", "typeRef": "Network.Response"}, {"name": "bodySize", "type": "number", "optional": false, "description": "Cached response body size.", "typeRef": null}]);
|
898
898
|
inspectorBackend.registerType("Network.Initiator", [{"name": "type", "type": "string", "optional": false, "description": "Type of this initiator.", "typeRef": null}, {"name": "stack", "type": "object", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only. Requires the Debugger domain to be enabled.", "typeRef": "Runtime.StackTrace"}, {"name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.", "typeRef": null}, {"name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).", "typeRef": null}, {"name": "columnNumber", "type": "number", "optional": true, "description": "Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).", "typeRef": null}, {"name": "requestId", "type": "string", "optional": true, "description": "Set if another request triggered this request (e.g. preflight).", "typeRef": "Network.RequestId"}]);
|
899
899
|
inspectorBackend.registerType("Network.CookiePartitionKey", [{"name": "topLevelSite", "type": "string", "optional": false, "description": "The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.", "typeRef": null}, {"name": "hasCrossSiteAncestor", "type": "boolean", "optional": false, "description": "Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.", "typeRef": null}]);
|
900
|
-
inspectorBackend.registerType("Network.Cookie", [{"name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null}, {"name": "domain", "type": "string", "optional": false, "description": "Cookie domain.", "typeRef": null}, {"name": "path", "type": "string", "optional": false, "description": "Cookie path.", "typeRef": null}, {"name": "expires", "type": "number", "optional": false, "description": "Cookie expiration date as the number of seconds since the UNIX epoch.", "typeRef": null}, {"name": "size", "type": "number", "optional": false, "description": "Cookie size.", "typeRef": null}, {"name": "httpOnly", "type": "boolean", "optional": false, "description": "True if cookie is http-only.", "typeRef": null}, {"name": "secure", "type": "boolean", "optional": false, "description": "True if cookie is secure.", "typeRef": null}, {"name": "session", "type": "boolean", "optional": false, "description": "True in case of session cookie.", "typeRef": null}, {"name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite"}, {"name": "priority", "type": "string", "optional": false, "description": "Cookie Priority", "typeRef": "Network.CookiePriority"}, {"name": "sameParty", "type": "boolean", "optional": false, "description": "True if cookie is SameParty.", "typeRef": null}, {"name": "sourceScheme", "type": "string", "optional": false, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme"}, {"name": "sourcePort", "type": "number", "optional": false, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null}, {"name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key.", "typeRef": "Network.CookiePartitionKey"}, {"name": "partitionKeyOpaque", "type": "boolean", "optional": true, "description": "True if cookie partition key is opaque.", "typeRef": null}]);
|
900
|
+
inspectorBackend.registerType("Network.Cookie", [{"name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null}, {"name": "domain", "type": "string", "optional": false, "description": "Cookie domain.", "typeRef": null}, {"name": "path", "type": "string", "optional": false, "description": "Cookie path.", "typeRef": null}, {"name": "expires", "type": "number", "optional": false, "description": "Cookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (\u00b1Inf).", "typeRef": null}, {"name": "size", "type": "number", "optional": false, "description": "Cookie size.", "typeRef": null}, {"name": "httpOnly", "type": "boolean", "optional": false, "description": "True if cookie is http-only.", "typeRef": null}, {"name": "secure", "type": "boolean", "optional": false, "description": "True if cookie is secure.", "typeRef": null}, {"name": "session", "type": "boolean", "optional": false, "description": "True in case of session cookie.", "typeRef": null}, {"name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite"}, {"name": "priority", "type": "string", "optional": false, "description": "Cookie Priority", "typeRef": "Network.CookiePriority"}, {"name": "sameParty", "type": "boolean", "optional": false, "description": "True if cookie is SameParty.", "typeRef": null}, {"name": "sourceScheme", "type": "string", "optional": false, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme"}, {"name": "sourcePort", "type": "number", "optional": false, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null}, {"name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key.", "typeRef": "Network.CookiePartitionKey"}, {"name": "partitionKeyOpaque", "type": "boolean", "optional": true, "description": "True if cookie partition key is opaque.", "typeRef": null}]);
|
901
901
|
inspectorBackend.registerType("Network.BlockedSetCookieWithReason", [{"name": "blockedReasons", "type": "array", "optional": false, "description": "The reason(s) this cookie was blocked.", "typeRef": "Network.SetCookieBlockedReason"}, {"name": "cookieLine", "type": "string", "optional": false, "description": "The string representing this individual cookie as it would appear in the header. This is not the entire \\\"cookie\\\" or \\\"set-cookie\\\" header which could have multiple cookies.", "typeRef": null}, {"name": "cookie", "type": "object", "optional": true, "description": "The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors.", "typeRef": "Network.Cookie"}]);
|
902
902
|
inspectorBackend.registerType("Network.ExemptedSetCookieWithReason", [{"name": "exemptionReason", "type": "string", "optional": false, "description": "The reason the cookie was exempted.", "typeRef": "Network.CookieExemptionReason"}, {"name": "cookieLine", "type": "string", "optional": false, "description": "The string representing this individual cookie as it would appear in the header.", "typeRef": null}, {"name": "cookie", "type": "object", "optional": false, "description": "The cookie object representing the cookie.", "typeRef": "Network.Cookie"}]);
|
903
903
|
inspectorBackend.registerType("Network.AssociatedCookie", [{"name": "cookie", "type": "object", "optional": false, "description": "The cookie object representing the cookie which was not sent.", "typeRef": "Network.Cookie"}, {"name": "blockedReasons", "type": "array", "optional": false, "description": "The reason(s) the cookie was blocked. If empty means the cookie is included.", "typeRef": "Network.CookieBlockedReason"}, {"name": "exemptionReason", "type": "string", "optional": true, "description": "The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could only have at most one exemption reason.", "typeRef": "Network.CookieExemptionReason"}]);
|
@@ -1008,7 +1008,7 @@ inspectorBackend.registerEnum("Page.ClientNavigationReason", {AnchorClick: "anch
|
|
1008
1008
|
inspectorBackend.registerEnum("Page.ClientNavigationDisposition", {CurrentTab: "currentTab", NewTab: "newTab", NewWindow: "newWindow", Download: "download"});
|
1009
1009
|
inspectorBackend.registerEnum("Page.ReferrerPolicy", {NoReferrer: "noReferrer", NoReferrerWhenDowngrade: "noReferrerWhenDowngrade", Origin: "origin", OriginWhenCrossOrigin: "originWhenCrossOrigin", SameOrigin: "sameOrigin", StrictOrigin: "strictOrigin", StrictOriginWhenCrossOrigin: "strictOriginWhenCrossOrigin", UnsafeUrl: "unsafeUrl"});
|
1010
1010
|
inspectorBackend.registerEnum("Page.NavigationType", {Navigation: "Navigation", BackForwardCacheRestore: "BackForwardCacheRestore"});
|
1011
|
-
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReason", {NotPrimaryMainFrame: "NotPrimaryMainFrame", BackForwardCacheDisabled: "BackForwardCacheDisabled", RelatedActiveContentsExist: "RelatedActiveContentsExist", HTTPStatusNotOK: "HTTPStatusNotOK", SchemeNotHTTPOrHTTPS: "SchemeNotHTTPOrHTTPS", Loading: "Loading", WasGrantedMediaAccess: "WasGrantedMediaAccess", DisableForRenderFrameHostCalled: "DisableForRenderFrameHostCalled", DomainNotAllowed: "DomainNotAllowed", HTTPMethodNotGET: "HTTPMethodNotGET", SubframeIsNavigating: "SubframeIsNavigating", Timeout: "Timeout", CacheLimit: "CacheLimit", JavaScriptExecution: "JavaScriptExecution", RendererProcessKilled: "RendererProcessKilled", RendererProcessCrashed: "RendererProcessCrashed", SchedulerTrackedFeatureUsed: "SchedulerTrackedFeatureUsed", ConflictingBrowsingInstance: "ConflictingBrowsingInstance", CacheFlushed: "CacheFlushed", ServiceWorkerVersionActivation: "ServiceWorkerVersionActivation", SessionRestored: "SessionRestored", ServiceWorkerPostMessage: "ServiceWorkerPostMessage", EnteredBackForwardCacheBeforeServiceWorkerHostAdded: "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", RenderFrameHostReused_SameSite: "RenderFrameHostReused_SameSite", RenderFrameHostReused_CrossSite: "RenderFrameHostReused_CrossSite", ServiceWorkerClaim: "ServiceWorkerClaim", IgnoreEventAndEvict: "IgnoreEventAndEvict", HaveInnerContents: "HaveInnerContents", TimeoutPuttingInCache: "TimeoutPuttingInCache", BackForwardCacheDisabledByLowMemory: "BackForwardCacheDisabledByLowMemory", BackForwardCacheDisabledByCommandLine: "BackForwardCacheDisabledByCommandLine", NetworkRequestDatAPIpeDrainedAsBytesConsumer: "NetworkRequestDatapipeDrainedAsBytesConsumer", NetworkRequestRedirected: "NetworkRequestRedirected", NetworkRequestTimeout: "NetworkRequestTimeout", NetworkExceedsBufferLimit: "NetworkExceedsBufferLimit", NavigationCancelledWhileRestoring: "NavigationCancelledWhileRestoring", NotMostRecentNavigationEntry: "NotMostRecentNavigationEntry", BackForwardCacheDisabledForPrerender: "BackForwardCacheDisabledForPrerender", UserAgentOverrideDiffers: "UserAgentOverrideDiffers", ForegroundCacheLimit: "ForegroundCacheLimit", BrowsingInstanceNotSwapped: "BrowsingInstanceNotSwapped", BackForwardCacheDisabledForDelegate: "BackForwardCacheDisabledForDelegate", UnloadHandlerExistsInMainFrame: "UnloadHandlerExistsInMainFrame", UnloadHandlerExistsInSubFrame: "UnloadHandlerExistsInSubFrame", ServiceWorkerUnregistration: "ServiceWorkerUnregistration", CacheControlNoStore: "CacheControlNoStore", CacheControlNoStoreCookieModified: "CacheControlNoStoreCookieModified", CacheControlNoStoreHTTPOnlyCookieModified: "CacheControlNoStoreHTTPOnlyCookieModified", NoResponseHead: "NoResponseHead", Unknown: "Unknown", ActivationNavigationsDisallowedForBug1234857: "ActivationNavigationsDisallowedForBug1234857", ErrorDocument: "ErrorDocument", FencedFramesEmbedder: "FencedFramesEmbedder", CookieDisabled: "CookieDisabled", HTTPAuthRequired: "HTTPAuthRequired", CookieFlushed: "CookieFlushed", BroadcastChannelOnMessage: "BroadcastChannelOnMessage", WebViewSettingsChanged: "WebViewSettingsChanged", WebViewJavaScriptObjectChanged: "WebViewJavaScriptObjectChanged", WebViewMessageListenerInjected: "WebViewMessageListenerInjected", WebViewSafeBrowsingAllowlistChanged: "WebViewSafeBrowsingAllowlistChanged", WebViewDocumentStartJavascriptChanged: "WebViewDocumentStartJavascriptChanged", WebSocket: "WebSocket", WebTransport: "WebTransport", WebRTC: "WebRTC", MainResourceHasCacheControlNoStore: "MainResourceHasCacheControlNoStore", MainResourceHasCacheControlNoCache: "MainResourceHasCacheControlNoCache", SubresourceHasCacheControlNoStore: "SubresourceHasCacheControlNoStore", SubresourceHasCacheControlNoCache: "SubresourceHasCacheControlNoCache", ContainsPlugins: "ContainsPlugins", DocumentLoaded: "DocumentLoaded", OutstandingNetworkRequestOthers: "OutstandingNetworkRequestOthers", RequestedMIDIPermission: "RequestedMIDIPermission", RequestedAudioCapturePermission: "RequestedAudioCapturePermission", RequestedVideoCapturePermission: "RequestedVideoCapturePermission", RequestedBackForwardCacheBlockedSensors: "RequestedBackForwardCacheBlockedSensors", RequestedBackgroundWorkPermission: "RequestedBackgroundWorkPermission", BroadcastChannel: "BroadcastChannel", WebXR: "WebXR", SharedWorker: "SharedWorker", SharedWorkerMessage: "SharedWorkerMessage", WebLocks: "WebLocks", WebHID: "WebHID", WebShare: "WebShare", RequestedStorageAccessGrant: "RequestedStorageAccessGrant", WebNfc: "WebNfc", OutstandingNetworkRequestFetch: "OutstandingNetworkRequestFetch", OutstandingNetworkRequestXHR: "OutstandingNetworkRequestXHR", AppBanner: "AppBanner", Printing: "Printing", WebDatabase: "WebDatabase", PictureInPicture: "PictureInPicture", SpeechRecognizer: "SpeechRecognizer", IdleManager: "IdleManager", PaymentManager: "PaymentManager", SpeechSynthesis: "SpeechSynthesis", KeyboardLock: "KeyboardLock", WebOTPService: "WebOTPService", OutstandingNetworkRequestDirectSocket: "OutstandingNetworkRequestDirectSocket", InjectedJavascript: "InjectedJavascript", InjectedStyleSheet: "InjectedStyleSheet", KeepaliveRequest: "KeepaliveRequest", IndexedDBEvent: "IndexedDBEvent", Dummy: "Dummy", JsNetworkRequestReceivedCacheControlNoStoreResource: "JsNetworkRequestReceivedCacheControlNoStoreResource", WebRTCUsedWithCCNS: "WebRTCUsedWithCCNS", WebTransportUsedWithCCNS: "WebTransportUsedWithCCNS", WebSocketUsedWithCCNS: "WebSocketUsedWithCCNS", SmartCard: "SmartCard", LiveMediaStreamTrack: "LiveMediaStreamTrack", UnloadHandler: "UnloadHandler", ParserAborted: "ParserAborted", ContentSecurityHandler: "ContentSecurityHandler", ContentWebAuthenticationAPI: "ContentWebAuthenticationAPI", ContentFileChooser: "ContentFileChooser", ContentSerial: "ContentSerial", ContentFileSystemAccess: "ContentFileSystemAccess", ContentMediaDevicesDispatcherHost: "ContentMediaDevicesDispatcherHost", ContentWebBluetooth: "ContentWebBluetooth", ContentWebUSB: "ContentWebUSB", ContentMediaSessionService: "ContentMediaSessionService", ContentScreenReader: "ContentScreenReader", ContentDiscarded: "ContentDiscarded", EmbedderPopupBlockerTabHelper: "EmbedderPopupBlockerTabHelper", EmbedderSafeBrowsingTriggeredPopupBlocker: "EmbedderSafeBrowsingTriggeredPopupBlocker", EmbedderSafeBrowsingThreatDetails: "EmbedderSafeBrowsingThreatDetails", EmbedderAppBannerManager: "EmbedderAppBannerManager", EmbedderDomDistillerViewerSource: "EmbedderDomDistillerViewerSource", EmbedderDomDistillerSelfDeletingRequestDelegate: "EmbedderDomDistillerSelfDeletingRequestDelegate", EmbedderOomInterventionTabHelper: "EmbedderOomInterventionTabHelper", EmbedderOfflinePage: "EmbedderOfflinePage", EmbedderChromePasswordManagerClientBindCredentialManager: "EmbedderChromePasswordManagerClientBindCredentialManager", EmbedderPermissionRequestManager: "EmbedderPermissionRequestManager", EmbedderModalDialog: "EmbedderModalDialog", EmbedderExtensions: "EmbedderExtensions", EmbedderExtensionMessaging: "EmbedderExtensionMessaging", EmbedderExtensionMessagingForOpenPort: "EmbedderExtensionMessagingForOpenPort", EmbedderExtensionSentMessageToCachedFrame: "EmbedderExtensionSentMessageToCachedFrame", RequestedByWebViewClient: "RequestedByWebViewClient", PostMessageByWebViewClient: "PostMessageByWebViewClient", CacheControlNoStoreDeviceBoundSessionTerminated: "CacheControlNoStoreDeviceBoundSessionTerminated", CacheLimitPrunedOnModerateMemoryPressure: "CacheLimitPrunedOnModerateMemoryPressure", CacheLimitPrunedOnCriticalMemoryPressure: "CacheLimitPrunedOnCriticalMemoryPressure"});
|
1011
|
+
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReason", {NotPrimaryMainFrame: "NotPrimaryMainFrame", BackForwardCacheDisabled: "BackForwardCacheDisabled", RelatedActiveContentsExist: "RelatedActiveContentsExist", HTTPStatusNotOK: "HTTPStatusNotOK", SchemeNotHTTPOrHTTPS: "SchemeNotHTTPOrHTTPS", Loading: "Loading", WasGrantedMediaAccess: "WasGrantedMediaAccess", DisableForRenderFrameHostCalled: "DisableForRenderFrameHostCalled", DomainNotAllowed: "DomainNotAllowed", HTTPMethodNotGET: "HTTPMethodNotGET", SubframeIsNavigating: "SubframeIsNavigating", Timeout: "Timeout", CacheLimit: "CacheLimit", JavaScriptExecution: "JavaScriptExecution", RendererProcessKilled: "RendererProcessKilled", RendererProcessCrashed: "RendererProcessCrashed", SchedulerTrackedFeatureUsed: "SchedulerTrackedFeatureUsed", ConflictingBrowsingInstance: "ConflictingBrowsingInstance", CacheFlushed: "CacheFlushed", ServiceWorkerVersionActivation: "ServiceWorkerVersionActivation", SessionRestored: "SessionRestored", ServiceWorkerPostMessage: "ServiceWorkerPostMessage", EnteredBackForwardCacheBeforeServiceWorkerHostAdded: "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", RenderFrameHostReused_SameSite: "RenderFrameHostReused_SameSite", RenderFrameHostReused_CrossSite: "RenderFrameHostReused_CrossSite", ServiceWorkerClaim: "ServiceWorkerClaim", IgnoreEventAndEvict: "IgnoreEventAndEvict", HaveInnerContents: "HaveInnerContents", TimeoutPuttingInCache: "TimeoutPuttingInCache", BackForwardCacheDisabledByLowMemory: "BackForwardCacheDisabledByLowMemory", BackForwardCacheDisabledByCommandLine: "BackForwardCacheDisabledByCommandLine", NetworkRequestDatAPIpeDrainedAsBytesConsumer: "NetworkRequestDatapipeDrainedAsBytesConsumer", NetworkRequestRedirected: "NetworkRequestRedirected", NetworkRequestTimeout: "NetworkRequestTimeout", NetworkExceedsBufferLimit: "NetworkExceedsBufferLimit", NavigationCancelledWhileRestoring: "NavigationCancelledWhileRestoring", NotMostRecentNavigationEntry: "NotMostRecentNavigationEntry", BackForwardCacheDisabledForPrerender: "BackForwardCacheDisabledForPrerender", UserAgentOverrideDiffers: "UserAgentOverrideDiffers", ForegroundCacheLimit: "ForegroundCacheLimit", BrowsingInstanceNotSwapped: "BrowsingInstanceNotSwapped", BackForwardCacheDisabledForDelegate: "BackForwardCacheDisabledForDelegate", UnloadHandlerExistsInMainFrame: "UnloadHandlerExistsInMainFrame", UnloadHandlerExistsInSubFrame: "UnloadHandlerExistsInSubFrame", ServiceWorkerUnregistration: "ServiceWorkerUnregistration", CacheControlNoStore: "CacheControlNoStore", CacheControlNoStoreCookieModified: "CacheControlNoStoreCookieModified", CacheControlNoStoreHTTPOnlyCookieModified: "CacheControlNoStoreHTTPOnlyCookieModified", NoResponseHead: "NoResponseHead", Unknown: "Unknown", ActivationNavigationsDisallowedForBug1234857: "ActivationNavigationsDisallowedForBug1234857", ErrorDocument: "ErrorDocument", FencedFramesEmbedder: "FencedFramesEmbedder", CookieDisabled: "CookieDisabled", HTTPAuthRequired: "HTTPAuthRequired", CookieFlushed: "CookieFlushed", BroadcastChannelOnMessage: "BroadcastChannelOnMessage", WebViewSettingsChanged: "WebViewSettingsChanged", WebViewJavaScriptObjectChanged: "WebViewJavaScriptObjectChanged", WebViewMessageListenerInjected: "WebViewMessageListenerInjected", WebViewSafeBrowsingAllowlistChanged: "WebViewSafeBrowsingAllowlistChanged", WebViewDocumentStartJavascriptChanged: "WebViewDocumentStartJavascriptChanged", WebSocket: "WebSocket", WebTransport: "WebTransport", WebRTC: "WebRTC", MainResourceHasCacheControlNoStore: "MainResourceHasCacheControlNoStore", MainResourceHasCacheControlNoCache: "MainResourceHasCacheControlNoCache", SubresourceHasCacheControlNoStore: "SubresourceHasCacheControlNoStore", SubresourceHasCacheControlNoCache: "SubresourceHasCacheControlNoCache", ContainsPlugins: "ContainsPlugins", DocumentLoaded: "DocumentLoaded", OutstandingNetworkRequestOthers: "OutstandingNetworkRequestOthers", RequestedMIDIPermission: "RequestedMIDIPermission", RequestedAudioCapturePermission: "RequestedAudioCapturePermission", RequestedVideoCapturePermission: "RequestedVideoCapturePermission", RequestedBackForwardCacheBlockedSensors: "RequestedBackForwardCacheBlockedSensors", RequestedBackgroundWorkPermission: "RequestedBackgroundWorkPermission", BroadcastChannel: "BroadcastChannel", WebXR: "WebXR", SharedWorker: "SharedWorker", SharedWorkerMessage: "SharedWorkerMessage", SharedWorkerWithNoActiveClient: "SharedWorkerWithNoActiveClient", WebLocks: "WebLocks", WebHID: "WebHID", WebBluetooth: "WebBluetooth", WebShare: "WebShare", RequestedStorageAccessGrant: "RequestedStorageAccessGrant", WebNfc: "WebNfc", OutstandingNetworkRequestFetch: "OutstandingNetworkRequestFetch", OutstandingNetworkRequestXHR: "OutstandingNetworkRequestXHR", AppBanner: "AppBanner", Printing: "Printing", WebDatabase: "WebDatabase", PictureInPicture: "PictureInPicture", SpeechRecognizer: "SpeechRecognizer", IdleManager: "IdleManager", PaymentManager: "PaymentManager", SpeechSynthesis: "SpeechSynthesis", KeyboardLock: "KeyboardLock", WebOTPService: "WebOTPService", OutstandingNetworkRequestDirectSocket: "OutstandingNetworkRequestDirectSocket", InjectedJavascript: "InjectedJavascript", InjectedStyleSheet: "InjectedStyleSheet", KeepaliveRequest: "KeepaliveRequest", IndexedDBEvent: "IndexedDBEvent", Dummy: "Dummy", JsNetworkRequestReceivedCacheControlNoStoreResource: "JsNetworkRequestReceivedCacheControlNoStoreResource", WebRTCUsedWithCCNS: "WebRTCUsedWithCCNS", WebTransportUsedWithCCNS: "WebTransportUsedWithCCNS", WebSocketUsedWithCCNS: "WebSocketUsedWithCCNS", SmartCard: "SmartCard", LiveMediaStreamTrack: "LiveMediaStreamTrack", UnloadHandler: "UnloadHandler", ParserAborted: "ParserAborted", ContentSecurityHandler: "ContentSecurityHandler", ContentWebAuthenticationAPI: "ContentWebAuthenticationAPI", ContentFileChooser: "ContentFileChooser", ContentSerial: "ContentSerial", ContentFileSystemAccess: "ContentFileSystemAccess", ContentMediaDevicesDispatcherHost: "ContentMediaDevicesDispatcherHost", ContentWebBluetooth: "ContentWebBluetooth", ContentWebUSB: "ContentWebUSB", ContentMediaSessionService: "ContentMediaSessionService", ContentScreenReader: "ContentScreenReader", ContentDiscarded: "ContentDiscarded", EmbedderPopupBlockerTabHelper: "EmbedderPopupBlockerTabHelper", EmbedderSafeBrowsingTriggeredPopupBlocker: "EmbedderSafeBrowsingTriggeredPopupBlocker", EmbedderSafeBrowsingThreatDetails: "EmbedderSafeBrowsingThreatDetails", EmbedderAppBannerManager: "EmbedderAppBannerManager", EmbedderDomDistillerViewerSource: "EmbedderDomDistillerViewerSource", EmbedderDomDistillerSelfDeletingRequestDelegate: "EmbedderDomDistillerSelfDeletingRequestDelegate", EmbedderOomInterventionTabHelper: "EmbedderOomInterventionTabHelper", EmbedderOfflinePage: "EmbedderOfflinePage", EmbedderChromePasswordManagerClientBindCredentialManager: "EmbedderChromePasswordManagerClientBindCredentialManager", EmbedderPermissionRequestManager: "EmbedderPermissionRequestManager", EmbedderModalDialog: "EmbedderModalDialog", EmbedderExtensions: "EmbedderExtensions", EmbedderExtensionMessaging: "EmbedderExtensionMessaging", EmbedderExtensionMessagingForOpenPort: "EmbedderExtensionMessagingForOpenPort", EmbedderExtensionSentMessageToCachedFrame: "EmbedderExtensionSentMessageToCachedFrame", RequestedByWebViewClient: "RequestedByWebViewClient", PostMessageByWebViewClient: "PostMessageByWebViewClient", CacheControlNoStoreDeviceBoundSessionTerminated: "CacheControlNoStoreDeviceBoundSessionTerminated", CacheLimitPrunedOnModerateMemoryPressure: "CacheLimitPrunedOnModerateMemoryPressure", CacheLimitPrunedOnCriticalMemoryPressure: "CacheLimitPrunedOnCriticalMemoryPressure"});
|
1012
1012
|
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReasonType", {SupportPending: "SupportPending", PageSupportNeeded: "PageSupportNeeded", Circumstantial: "Circumstantial"});
|
1013
1013
|
inspectorBackend.registerEvent("Page.domContentEventFired", ["timestamp"]);
|
1014
1014
|
inspectorBackend.registerEnum("Page.FileChooserOpenedEventMode", {SelectSingle: "selectSingle", SelectMultiple: "selectMultiple"});
|
@@ -1520,7 +1520,7 @@ inspectorBackend.registerCommand("HeapProfiler.enable", [], [], "");
|
|
1520
1520
|
inspectorBackend.registerCommand("HeapProfiler.getHeapObjectId", [{"name": "objectId", "type": "string", "optional": false, "description": "Identifier of the object to get heap object id for.", "typeRef": "Runtime.RemoteObjectId"}], ["heapSnapshotObjectId"], "");
|
1521
1521
|
inspectorBackend.registerCommand("HeapProfiler.getObjectByHeapObjectId", [{"name": "objectId", "type": "string", "optional": false, "description": "", "typeRef": "HeapProfiler.HeapSnapshotObjectId"}, {"name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects.", "typeRef": null}], ["result"], "");
|
1522
1522
|
inspectorBackend.registerCommand("HeapProfiler.getSamplingProfile", [], ["profile"], "");
|
1523
|
-
inspectorBackend.registerCommand("HeapProfiler.startSampling", [{"name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.", "typeRef": null}, {"name": "includeObjectsCollectedByMajorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.", "typeRef": null}, {"name": "includeObjectsCollectedByMinorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.", "typeRef": null}], [], "");
|
1523
|
+
inspectorBackend.registerCommand("HeapProfiler.startSampling", [{"name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.", "typeRef": null}, {"name": "stackDepth", "type": "number", "optional": true, "description": "Maximum stack depth. The default value is 128.", "typeRef": null}, {"name": "includeObjectsCollectedByMajorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.", "typeRef": null}, {"name": "includeObjectsCollectedByMinorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.", "typeRef": null}], [], "");
|
1524
1524
|
inspectorBackend.registerCommand("HeapProfiler.startTrackingHeapObjects", [{"name": "trackAllocations", "type": "boolean", "optional": true, "description": "", "typeRef": null}], [], "");
|
1525
1525
|
inspectorBackend.registerCommand("HeapProfiler.stopSampling", [], ["profile"], "");
|
1526
1526
|
inspectorBackend.registerCommand("HeapProfiler.stopTrackingHeapObjects", [{"name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.", "typeRef": null}, {"name": "treatGlobalObjectsAsRoots", "type": "boolean", "optional": true, "description": "Deprecated in favor of `exposeInternals`.", "typeRef": null}, {"name": "captureNumericValue", "type": "boolean", "optional": true, "description": "If true, numerical values are included in the snapshot", "typeRef": null}, {"name": "exposeInternals", "type": "boolean", "optional": true, "description": "If true, exposes internals of the snapshot.", "typeRef": null}], [], "");
|
@@ -600,6 +600,7 @@ export const generatedProperties = [
|
|
600
600
|
"overscroll-behavior-inline",
|
601
601
|
"overscroll-behavior-x",
|
602
602
|
"overscroll-behavior-y",
|
603
|
+
"overscroll-position",
|
603
604
|
"pad",
|
604
605
|
"padding-block-end",
|
605
606
|
"padding-block-start",
|
@@ -3383,6 +3384,12 @@ export const generatedProperties = [
|
|
3383
3384
|
],
|
3384
3385
|
"name": "overscroll-behavior-y"
|
3385
3386
|
},
|
3387
|
+
{
|
3388
|
+
"keywords": [
|
3389
|
+
"none"
|
3390
|
+
],
|
3391
|
+
"name": "overscroll-position"
|
3392
|
+
},
|
3386
3393
|
{
|
3387
3394
|
"name": "pad"
|
3388
3395
|
},
|
@@ -6282,6 +6289,11 @@ export const generatedPropertyValues = {
|
|
6282
6289
|
"none"
|
6283
6290
|
]
|
6284
6291
|
},
|
6292
|
+
"overscroll-position": {
|
6293
|
+
"values": [
|
6294
|
+
"none"
|
6295
|
+
]
|
6296
|
+
},
|
6285
6297
|
"page": {
|
6286
6298
|
"values": [
|
6287
6299
|
"auto"
|
@@ -8332,7 +8332,7 @@ export namespace IndexedDB {
|
|
8332
8332
|
*/
|
8333
8333
|
objectStoreName: string;
|
8334
8334
|
/**
|
8335
|
-
* Index name. If not specified
|
8335
|
+
* Index name. If not specified, it performs an object store data request.
|
8336
8336
|
*/
|
8337
8337
|
indexName?: string;
|
8338
8338
|
/**
|
@@ -10530,6 +10530,9 @@ export namespace Network {
|
|
10530
10530
|
path: string;
|
10531
10531
|
/**
|
10532
10532
|
* Cookie expiration date as the number of seconds since the UNIX epoch.
|
10533
|
+
* The value is set to -1 if the expiry date is not set.
|
10534
|
+
* The value can be null for values that cannot be represented in
|
10535
|
+
* JSON (±Inf).
|
10533
10536
|
*/
|
10534
10537
|
expires: number;
|
10535
10538
|
/**
|
@@ -14440,8 +14443,10 @@ export namespace Page {
|
|
14440
14443
|
WebXR = 'WebXR',
|
14441
14444
|
SharedWorker = 'SharedWorker',
|
14442
14445
|
SharedWorkerMessage = 'SharedWorkerMessage',
|
14446
|
+
SharedWorkerWithNoActiveClient = 'SharedWorkerWithNoActiveClient',
|
14443
14447
|
WebLocks = 'WebLocks',
|
14444
14448
|
WebHID = 'WebHID',
|
14449
|
+
WebBluetooth = 'WebBluetooth',
|
14445
14450
|
WebShare = 'WebShare',
|
14446
14451
|
RequestedStorageAccessGrant = 'RequestedStorageAccessGrant',
|
14447
14452
|
WebNfc = 'WebNfc',
|
@@ -20426,6 +20431,10 @@ export namespace HeapProfiler {
|
|
20426
20431
|
* default value is 32768 bytes.
|
20427
20432
|
*/
|
20428
20433
|
samplingInterval?: number;
|
20434
|
+
/**
|
20435
|
+
* Maximum stack depth. The default value is 128.
|
20436
|
+
*/
|
20437
|
+
stackDepth?: number;
|
20429
20438
|
/**
|
20430
20439
|
* By default, the sampling heap profiler reports only objects which are
|
20431
20440
|
* still alive when the profile is returned via getSamplingProfile or
|
package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt
CHANGED
@@ -919,6 +919,70 @@ Available insights:
|
|
919
919
|
example question: How can I reduce the amount of legacy JavaScript on my page?
|
920
920
|
=== end content
|
921
921
|
|
922
|
+
Title: PerformanceTraceFormatter formatTraceSummary deals with CrUX manager errors
|
923
|
+
Content:
|
924
|
+
URL: http://localhost/image-delivery-cases.html
|
925
|
+
Bounds: {min: 59728641874, max: 59734400108}
|
926
|
+
CPU throttling: 1x
|
927
|
+
Network throttling: No throttling
|
928
|
+
Metrics (lab / observed):
|
929
|
+
- LCP: 663 ms, event: (eventKey: r-14753, ts: 59729312744)
|
930
|
+
- LCP breakdown:
|
931
|
+
- TTFB: 7 ms, bounds: {min: 59728649746, max: 59728656735}
|
932
|
+
- Load delay: 45.6 ms, bounds: {min: 59728656735, max: 59728702313}
|
933
|
+
- Load duration: 506.3 ms, bounds: {min: 59728702313, max: 59729208600}
|
934
|
+
- Render delay: 104.1 ms, bounds: {min: 59729208600, max: 59729312744}
|
935
|
+
- CLS: 0.31, event: (eventKey: s--1, ts: 59729100192)
|
936
|
+
Metrics (field / real users): n/a – no data for this page in CrUX
|
937
|
+
Available insights:
|
938
|
+
- insight name: Cache
|
939
|
+
description: A long cache lifetime can speed up repeat visits to your page. [Learn more](https://web.dev/uses-long-cache-ttl/).
|
940
|
+
relevant trace bounds: {min: 59728702014, max: 59728867430}
|
941
|
+
estimated metric savings: FCP 0 ms, LCP 150 ms
|
942
|
+
estimated wasted bytes: 971.5 kB
|
943
|
+
example question: What caching strategies can I apply to improve my page performance?
|
944
|
+
- insight name: ImageDelivery
|
945
|
+
description: Reducing the download time of images can improve the perceived load time of the page and LCP. [Learn more about optimizing image size](https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/)
|
946
|
+
relevant trace bounds: {min: 59728701403, max: 59729395208}
|
947
|
+
estimated metric savings: FCP 0 ms, LCP 100 ms
|
948
|
+
estimated wasted bytes: 2 MB
|
949
|
+
example question: What should I do to improve and optimize the time taken to fetch and display images on the page?
|
950
|
+
example question: Are all images on my site optimized?
|
951
|
+
- insight name: LCPBreakdown
|
952
|
+
description: Each [subpart has specific improvement strategies](https://web.dev/articles/optimize-lcp#lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.
|
953
|
+
relevant trace bounds: {min: 59728649746, max: 59729312744}
|
954
|
+
example question: Help me optimize my LCP score
|
955
|
+
example question: Which LCP phase was most problematic?
|
956
|
+
example question: What can I do to reduce the LCP time for this page load?
|
957
|
+
- insight name: LCPDiscovery
|
958
|
+
description: Optimize LCP by making the LCP image [discoverable](https://web.dev/articles/optimize-lcp#1_eliminate_resource_load_delay) from the HTML immediately, and [avoiding lazy-loading](https://web.dev/articles/lcp-lazy-loading)
|
959
|
+
relevant trace bounds: {min: 59728656735, max: 59729209036}
|
960
|
+
example question: Suggest fixes to reduce my LCP
|
961
|
+
example question: What can I do to reduce my LCP discovery time?
|
962
|
+
example question: Why is LCP discovery time important?
|
963
|
+
- insight name: CLSCulprits
|
964
|
+
description: Layout shifts occur when elements move absent any user interaction. [Investigate the causes of layout shifts](https://web.dev/articles/optimize-cls), such as elements being added, removed, or their fonts changing as the page loads.
|
965
|
+
relevant trace bounds: {min: 59729100192, max: 59730317334}
|
966
|
+
example question: Help me optimize my CLS score
|
967
|
+
example question: How can I prevent layout shifts on this page?
|
968
|
+
- insight name: DocumentLatency
|
969
|
+
description: Your first network request is the most important. Reduce its latency by avoiding redirects, ensuring a fast server response, and enabling text compression.
|
970
|
+
relevant trace bounds: {min: 59728651057, max: 59728790724}
|
971
|
+
estimated metric savings: FCP 0 ms, LCP 0 ms
|
972
|
+
estimated wasted bytes: 1.6 kB
|
973
|
+
example question: How do I decrease the initial loading time of my page?
|
974
|
+
example question: Did anything slow down the request for this document?
|
975
|
+
- insight name: Viewport
|
976
|
+
description: Tap interactions may be [delayed by up to 300 ms](https://developer.chrome.com/blog/300ms-tap-delay-gone-away/) if the viewport is not optimized for mobile.
|
977
|
+
relevant trace bounds: {min: 59728649746, max: 59734400108}
|
978
|
+
estimated metric savings: INP 0 ms
|
979
|
+
example question: How do I make sure my page is optimized for mobile viewing?
|
980
|
+
- insight name: ThirdParties
|
981
|
+
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/) to prioritize your page's content.
|
982
|
+
relevant trace bounds: {min: 59728701403, max: 59729465969}
|
983
|
+
example question: Which third parties are having the largest impact on my page performance?
|
984
|
+
=== end content
|
985
|
+
|
922
986
|
Title: PerformanceTraceFormatter formatTraceSummary image-delivery.json.gz
|
923
987
|
Content:
|
924
988
|
URL: http://localhost/image-delivery-cases.html
|
@@ -31,6 +31,81 @@ export class PerformanceTraceFormatter {
|
|
31
31
|
return `{min: ${bounds.min}, max: ${bounds.max}}`;
|
32
32
|
}
|
33
33
|
|
34
|
+
/**
|
35
|
+
* Fetching the Crux summary can error outside of DevTools, hence the
|
36
|
+
* try-catch around it here.
|
37
|
+
*/
|
38
|
+
#getCruxTraceSummary(insightSet: Trace.Insights.Types.InsightSet|null): string[] {
|
39
|
+
if (insightSet === null) {
|
40
|
+
return [];
|
41
|
+
}
|
42
|
+
try {
|
43
|
+
const cruxScope = CrUXManager.CrUXManager.instance().getSelectedScope();
|
44
|
+
const parts: string[] = [];
|
45
|
+
const fieldMetrics =
|
46
|
+
Trace.Insights.Common.getFieldMetricsForInsightSet(insightSet, this.#parsedTrace.metadata, cruxScope);
|
47
|
+
const fieldLcp = fieldMetrics?.lcp;
|
48
|
+
const fieldInp = fieldMetrics?.inp;
|
49
|
+
const fieldCls = fieldMetrics?.cls;
|
50
|
+
|
51
|
+
if (fieldLcp || fieldInp || fieldCls) {
|
52
|
+
parts.push('Metrics (field / real users):');
|
53
|
+
|
54
|
+
const serializeFieldMetricTimingResult =
|
55
|
+
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricTimingResult): string => {
|
56
|
+
return `${Math.round(fieldMetric.value / 1000)} ms (scope: ${fieldMetric.pageScope})`;
|
57
|
+
};
|
58
|
+
|
59
|
+
const serializeFieldMetricNumberResult =
|
60
|
+
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricNumberResult): string => {
|
61
|
+
return `${fieldMetric.value.toFixed(2)} (scope: ${fieldMetric.pageScope})`;
|
62
|
+
};
|
63
|
+
|
64
|
+
if (fieldLcp) {
|
65
|
+
parts.push(` - LCP: ${serializeFieldMetricTimingResult(fieldLcp)}`);
|
66
|
+
|
67
|
+
const fieldLcpBreakdown = fieldMetrics?.lcpBreakdown;
|
68
|
+
if (fieldLcpBreakdown &&
|
69
|
+
(fieldLcpBreakdown.ttfb || fieldLcpBreakdown.loadDelay || fieldLcpBreakdown.loadDuration ||
|
70
|
+
fieldLcpBreakdown.renderDelay)) {
|
71
|
+
parts.push(' - LCP breakdown:');
|
72
|
+
if (fieldLcpBreakdown.ttfb) {
|
73
|
+
parts.push(` - TTFB: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.ttfb)}`);
|
74
|
+
}
|
75
|
+
if (fieldLcpBreakdown.loadDelay) {
|
76
|
+
parts.push(` - Load delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDelay)}`);
|
77
|
+
}
|
78
|
+
if (fieldLcpBreakdown.loadDuration) {
|
79
|
+
parts.push(` - Load duration: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDuration)}`);
|
80
|
+
}
|
81
|
+
if (fieldLcpBreakdown.renderDelay) {
|
82
|
+
parts.push(` - Render delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.renderDelay)}`);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
if (fieldInp) {
|
87
|
+
parts.push(` - INP: ${serializeFieldMetricTimingResult(fieldInp)}`);
|
88
|
+
}
|
89
|
+
if (fieldCls) {
|
90
|
+
parts.push(` - CLS: ${serializeFieldMetricNumberResult(fieldCls)}`);
|
91
|
+
}
|
92
|
+
|
93
|
+
parts.push(
|
94
|
+
' - The above data is from CrUX–Chrome User Experience Report. It\'s how the page performs for real users.');
|
95
|
+
parts.push(' - The values shown above are the p75 measure of all real Chrome users');
|
96
|
+
parts.push(' - The scope indicates if the data came from the entire origin, or a specific url');
|
97
|
+
parts.push(
|
98
|
+
' - Lab metrics describe how this specific page load performed, while field metrics are an aggregation ' +
|
99
|
+
'of results from real-world users. Best practice is to prioritize metrics that are bad in field data. ' +
|
100
|
+
'Lab metrics may be better or worse than fields metrics depending on the developer\'s machine, network, or the ' +
|
101
|
+
'actions performed while tracing.');
|
102
|
+
}
|
103
|
+
return parts;
|
104
|
+
} catch {
|
105
|
+
return [];
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
34
109
|
formatTraceSummary(): string {
|
35
110
|
const parsedTrace = this.#parsedTrace;
|
36
111
|
const insightSet = this.#insightSet;
|
@@ -78,64 +153,9 @@ export class PerformanceTraceFormatter {
|
|
78
153
|
parts.push('Metrics (lab / observed): n/a');
|
79
154
|
}
|
80
155
|
|
81
|
-
const
|
82
|
-
|
83
|
-
|
84
|
-
const fieldLcp = fieldMetrics?.lcp;
|
85
|
-
const fieldInp = fieldMetrics?.inp;
|
86
|
-
const fieldCls = fieldMetrics?.cls;
|
87
|
-
|
88
|
-
if (fieldLcp || fieldInp || fieldCls) {
|
89
|
-
parts.push('Metrics (field / real users):');
|
90
|
-
|
91
|
-
const serializeFieldMetricTimingResult =
|
92
|
-
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricTimingResult): string => {
|
93
|
-
return `${Math.round(fieldMetric.value / 1000)} ms (scope: ${fieldMetric.pageScope})`;
|
94
|
-
};
|
95
|
-
|
96
|
-
const serializeFieldMetricNumberResult =
|
97
|
-
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricNumberResult): string => {
|
98
|
-
return `${fieldMetric.value.toFixed(2)} (scope: ${fieldMetric.pageScope})`;
|
99
|
-
};
|
100
|
-
|
101
|
-
if (fieldLcp) {
|
102
|
-
parts.push(` - LCP: ${serializeFieldMetricTimingResult(fieldLcp)}`);
|
103
|
-
|
104
|
-
const fieldLcpBreakdown = fieldMetrics?.lcpBreakdown;
|
105
|
-
if (fieldLcpBreakdown &&
|
106
|
-
(fieldLcpBreakdown.ttfb || fieldLcpBreakdown.loadDelay || fieldLcpBreakdown.loadDuration ||
|
107
|
-
fieldLcpBreakdown.renderDelay)) {
|
108
|
-
parts.push(' - LCP breakdown:');
|
109
|
-
if (fieldLcpBreakdown.ttfb) {
|
110
|
-
parts.push(` - TTFB: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.ttfb)}`);
|
111
|
-
}
|
112
|
-
if (fieldLcpBreakdown.loadDelay) {
|
113
|
-
parts.push(` - Load delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDelay)}`);
|
114
|
-
}
|
115
|
-
if (fieldLcpBreakdown.loadDuration) {
|
116
|
-
parts.push(` - Load duration: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDuration)}`);
|
117
|
-
}
|
118
|
-
if (fieldLcpBreakdown.renderDelay) {
|
119
|
-
parts.push(` - Render delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.renderDelay)}`);
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
if (fieldInp) {
|
124
|
-
parts.push(` - INP: ${serializeFieldMetricTimingResult(fieldInp)}`);
|
125
|
-
}
|
126
|
-
if (fieldCls) {
|
127
|
-
parts.push(` - CLS: ${serializeFieldMetricNumberResult(fieldCls)}`);
|
128
|
-
}
|
129
|
-
|
130
|
-
parts.push(
|
131
|
-
' - The above data is from CrUX–Chrome User Experience Report. It\'s how the page performs for real users.');
|
132
|
-
parts.push(' - The values shown above are the p75 measure of all real Chrome users');
|
133
|
-
parts.push(' - The scope indicates if the data came from the entire origin, or a specific url');
|
134
|
-
parts.push(
|
135
|
-
' - Lab metrics describe how this specific page load performed, while field metrics are an aggregation ' +
|
136
|
-
'of results from real-world users. Best practice is to prioritize metrics that are bad in field data. ' +
|
137
|
-
'Lab metrics may be better or worse than fields metrics depending on the developer\'s machine, network, or the ' +
|
138
|
-
'actions performed while tracing.');
|
156
|
+
const cruxParts = insightSet && this.#getCruxTraceSummary(insightSet);
|
157
|
+
if (cruxParts?.length) {
|
158
|
+
parts.push(...cruxParts);
|
139
159
|
} else {
|
140
160
|
parts.push('Metrics (field / real users): n/a – no data for this page in CrUX');
|
141
161
|
}
|
@@ -202,70 +202,133 @@ export class AiCodeCompletion extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
202
202
|
};
|
203
203
|
}
|
204
204
|
|
205
|
+
async #completeCodeCached(request: Host.AidaClient.CompletionRequest): Promise<{
|
206
|
+
response: Host.AidaClient.CompletionResponse | null,
|
207
|
+
fromCache: boolean,
|
208
|
+
}> {
|
209
|
+
const cachedResponse = this.#checkCachedRequestForResponse(request);
|
210
|
+
if (cachedResponse) {
|
211
|
+
return {response: cachedResponse, fromCache: true};
|
212
|
+
}
|
213
|
+
|
214
|
+
const response = await this.#aidaClient.completeCode(request);
|
215
|
+
if (!response) {
|
216
|
+
return {
|
217
|
+
response: null,
|
218
|
+
fromCache: false,
|
219
|
+
};
|
220
|
+
}
|
221
|
+
|
222
|
+
this.#updateCachedRequest(request, response);
|
223
|
+
return {
|
224
|
+
response,
|
225
|
+
fromCache: false,
|
226
|
+
};
|
227
|
+
}
|
228
|
+
|
229
|
+
#pickSampleFromResponse(response: Host.AidaClient.CompletionResponse): Host.AidaClient.GenerationSample|null {
|
230
|
+
if (!response.generatedSamples.length) {
|
231
|
+
return null;
|
232
|
+
}
|
233
|
+
|
234
|
+
// `currentHint` is the portion of a standard autocomplete suggestion that the user has not yet typed.
|
235
|
+
// For example, if the user types `document.queryS` and the autocomplete suggests `document.querySelector`,
|
236
|
+
// the `currentHint` is `elector`.
|
237
|
+
const currentHintInMenu = this.#editor.editor.plugin(TextEditor.Config.showCompletionHint)?.currentHint;
|
238
|
+
// TODO(ergunsh): We should not do this check here. Instead, the AI code suggestions should be provided
|
239
|
+
// as it is to the view plugin. The view plugin should choose which one to use based on the completion hint
|
240
|
+
// and selected completion.
|
241
|
+
if (!currentHintInMenu) {
|
242
|
+
return response.generatedSamples[0];
|
243
|
+
}
|
244
|
+
|
245
|
+
// TODO(ergunsh): This does not handle looking for `selectedCompletion`. The `currentHint` is `null`
|
246
|
+
// for the Sources panel case.
|
247
|
+
// Even though there is no match, we still return the first suggestion which will be displayed
|
248
|
+
// when the traditional autocomplete menu is closed.
|
249
|
+
return response.generatedSamples.find(sample => sample.generationString.startsWith(currentHintInMenu)) ??
|
250
|
+
response.generatedSamples[0];
|
251
|
+
}
|
252
|
+
|
253
|
+
async #generateSampleForRequest(request: Host.AidaClient.CompletionRequest, cursor: number): Promise<{
|
254
|
+
suggestionText: string,
|
255
|
+
sampleId: number,
|
256
|
+
fromCache: boolean,
|
257
|
+
citations: Host.AidaClient.Citation[],
|
258
|
+
rpcGlobalId?: Host.AidaClient.RpcGlobalId,
|
259
|
+
}|null> {
|
260
|
+
const {response, fromCache} = await this.#completeCodeCached(request);
|
261
|
+
debugLog('At cursor position', cursor, {request, response, fromCache});
|
262
|
+
if (!response) {
|
263
|
+
return null;
|
264
|
+
}
|
265
|
+
|
266
|
+
const suggestionSample = this.#pickSampleFromResponse(response);
|
267
|
+
if (!suggestionSample) {
|
268
|
+
return null;
|
269
|
+
}
|
270
|
+
|
271
|
+
const shouldBlock =
|
272
|
+
suggestionSample.attributionMetadata?.attributionAction === Host.AidaClient.RecitationAction.BLOCK;
|
273
|
+
if (shouldBlock) {
|
274
|
+
return null;
|
275
|
+
}
|
276
|
+
|
277
|
+
const suggestionText = this.#trimSuggestionOverlap(suggestionSample.generationString, request);
|
278
|
+
if (suggestionText.length === 0) {
|
279
|
+
return null;
|
280
|
+
}
|
281
|
+
|
282
|
+
return {
|
283
|
+
suggestionText,
|
284
|
+
sampleId: suggestionSample.sampleId,
|
285
|
+
fromCache,
|
286
|
+
citations: suggestionSample.attributionMetadata?.citations ?? [],
|
287
|
+
rpcGlobalId: response.metadata.rpcGlobalId,
|
288
|
+
};
|
289
|
+
}
|
290
|
+
|
205
291
|
async #requestAidaSuggestion(request: Host.AidaClient.CompletionRequest, cursor: number): Promise<void> {
|
206
292
|
const startTime = performance.now();
|
207
|
-
let servedFromCache = false;
|
208
293
|
this.dispatchEventToListeners(Events.REQUEST_TRIGGERED, {});
|
209
294
|
|
210
295
|
try {
|
211
|
-
|
212
|
-
if (!
|
213
|
-
|
214
|
-
|
215
|
-
this.#updateCachedRequest(request, response);
|
216
|
-
}
|
217
|
-
} else {
|
218
|
-
servedFromCache = true;
|
296
|
+
const sampleResponse = await this.#generateSampleForRequest(request, cursor);
|
297
|
+
if (!sampleResponse) {
|
298
|
+
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
299
|
+
return;
|
219
300
|
}
|
220
|
-
debugLog('At cursor position', cursor, {request, response});
|
221
|
-
if (response && response.generatedSamples.length > 0 && response.generatedSamples[0].generationString) {
|
222
|
-
if (response.generatedSamples[0].attributionMetadata?.attributionAction ===
|
223
|
-
Host.AidaClient.RecitationAction.BLOCK) {
|
224
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
225
|
-
return;
|
226
|
-
}
|
227
301
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
302
|
+
const {
|
303
|
+
suggestionText,
|
304
|
+
sampleId,
|
305
|
+
fromCache,
|
306
|
+
citations,
|
307
|
+
rpcGlobalId,
|
308
|
+
} = sampleResponse;
|
309
|
+
const remainingDelay = Math.max(DELAY_BEFORE_SHOWING_RESPONSE_MS - (performance.now() - startTime), 0);
|
310
|
+
this.#renderingTimeout = window.setTimeout(() => {
|
311
|
+
this.#editor.dispatch({
|
312
|
+
effects: TextEditor.Config.setAiAutoCompleteSuggestion.of({
|
313
|
+
text: suggestionText,
|
314
|
+
from: cursor,
|
315
|
+
rpcGlobalId,
|
316
|
+
sampleId,
|
317
|
+
})
|
318
|
+
});
|
319
|
+
|
320
|
+
if (fromCache) {
|
321
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionResponseServedFromCache);
|
232
322
|
}
|
233
|
-
|
234
|
-
|
235
|
-
|
323
|
+
|
324
|
+
if (rpcGlobalId) {
|
325
|
+
const latency = performance.now() - startTime;
|
326
|
+
this.#registerUserImpression(rpcGlobalId, sampleId, latency);
|
236
327
|
}
|
237
328
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
// We are not cancelling the previous responses even when there are more recent responses
|
242
|
-
// from the LLM as:
|
243
|
-
// In case the user kept typing characters that are prefix of the previous suggestion, it
|
244
|
-
// is a valid suggestion and we should display it to the user.
|
245
|
-
// In case the user typed a different character, the config for AI auto complete suggestion
|
246
|
-
// will set the suggestion to null.
|
247
|
-
this.#editor.dispatch({
|
248
|
-
effects: TextEditor.Config.setAiAutoCompleteSuggestion.of({
|
249
|
-
text: suggestionText,
|
250
|
-
from: cursor,
|
251
|
-
rpcGlobalId: response.metadata.rpcGlobalId,
|
252
|
-
sampleId: response.generatedSamples[0].sampleId,
|
253
|
-
})
|
254
|
-
});
|
255
|
-
if (servedFromCache) {
|
256
|
-
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionResponseServedFromCache);
|
257
|
-
}
|
258
|
-
debugLog('Suggestion dispatched to the editor', response.generatedSamples[0], 'at cursor position', cursor);
|
259
|
-
if (response.metadata.rpcGlobalId) {
|
260
|
-
const latency = performance.now() - startTime;
|
261
|
-
this.#registerUserImpression(response.metadata.rpcGlobalId, response.generatedSamples[0].sampleId, latency);
|
262
|
-
}
|
263
|
-
const citations = response.generatedSamples[0].attributionMetadata?.citations;
|
264
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {citations});
|
265
|
-
}, remainderDelay);
|
266
|
-
} else {
|
267
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
268
|
-
}
|
329
|
+
debugLog('Suggestion dispatched to the editor', suggestionText, 'at cursor position', cursor);
|
330
|
+
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {citations});
|
331
|
+
}, remainingDelay);
|
269
332
|
} catch (e) {
|
270
333
|
debugLog('Error while fetching code completion suggestions from AIDA', e);
|
271
334
|
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
@@ -289,7 +352,12 @@ export class AiCodeCompletion extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
289
352
|
/**
|
290
353
|
* Removes the end of a suggestion if it overlaps with the start of the suffix.
|
291
354
|
*/
|
292
|
-
#trimSuggestionOverlap(generationString: string,
|
355
|
+
#trimSuggestionOverlap(generationString: string, request: Host.AidaClient.CompletionRequest): string {
|
356
|
+
const suffix = request.suffix;
|
357
|
+
if (!suffix) {
|
358
|
+
return generationString;
|
359
|
+
}
|
360
|
+
|
293
361
|
// Iterate from the longest possible overlap down to the shortest
|
294
362
|
for (let i = Math.min(generationString.length, suffix.length); i > 0; i--) {
|
295
363
|
const overlapCandidate = suffix.substring(0, i);
|