chrome-devtools-frontend 1.0.1706026 → 1.0.1709383
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/code-review/SKILL.md +121 -0
- package/AUTHORS +2 -0
- package/front_end/core/common/Color.ts +6 -0
- package/front_end/core/common/VersionController.ts +0 -53
- package/front_end/core/root/Runtime.ts +0 -41
- package/front_end/core/sdk/CSSModel.ts +57 -0
- package/front_end/core/sdk/CSSPropertyParser.ts +10 -17
- package/front_end/core/sdk/DOMModel.ts +13 -6
- package/front_end/core/sdk/DebuggerModel.ts +90 -56
- package/front_end/core/sdk/NetworkRequest.ts +70 -12
- package/front_end/core/sdk/OverlayModel.ts +47 -0
- package/front_end/core/sdk/PageResourceLoader.ts +26 -6
- package/front_end/core/sdk/SourceMap.ts +37 -9
- package/front_end/core/sdk/SourceMapScopesInfo.ts +223 -86
- package/front_end/core/text_utils/ContentData.ts +18 -1
- package/front_end/core/text_utils/TextUtils.ts +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
- package/front_end/entrypoints/heap_snapshot_worker/ContextAnalyzer.ts +102 -4
- package/front_end/entrypoints/main/MainImpl.ts +2 -21
- package/front_end/generated/InspectorBackendCommands.ts +9 -2
- package/front_end/generated/SupportedCSSProperties.ts +12 -3
- package/front_end/generated/protocol-mapping.d.ts +31 -0
- package/front_end/generated/protocol-proxy-api.d.ts +32 -0
- package/front_end/generated/protocol.ts +19 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +127 -2
- package/front_end/models/ai_assistance/AiConversation.ts +2 -2
- package/front_end/models/ai_assistance/AiUtils.ts +4 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +64 -13
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +257 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -2
- package/front_end/models/ai_assistance/contexts/{AccessibilityContext.snapshot.txt → LighthouseContext.snapshot.txt} +23 -2
- package/front_end/models/ai_assistance/contexts/{AccessibilityContext.ts → LighthouseContext.ts} +24 -5
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +26 -3
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +15 -16
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -18
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +81 -103
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +202 -15
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -2
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +33 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +6 -0
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +8 -7
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetStyles.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +3 -1
- package/front_end/models/ai_assistance/tools/GetTraceFunctionCode.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceResourceContent.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListCookies.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +2 -0
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +2 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +2 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +20 -12
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +2 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +53 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +102 -45
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +25 -33
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +70 -49
- package/front_end/models/bindings/SourceMapStepping.ts +50 -0
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -0
- package/front_end/models/bindings/bindings.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +85 -62
- package/front_end/models/extensions/ExtensionEndpoint.ts +27 -6
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +106 -21
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +4 -2
- package/front_end/models/har/Importer.ts +2 -3
- package/front_end/models/javascript_metadata/NativeFunctions.ts +6 -2
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +5 -1
- package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -3
- package/front_end/models/source_map_scopes/NamesResolver.ts +30 -13
- package/front_end/models/stack_trace/StackTraceImpl.ts +138 -47
- package/front_end/models/stack_trace/StackTraceModel.ts +117 -84
- package/front_end/models/stack_trace/Trie.ts +27 -0
- package/front_end/models/trace/LanternComputationData.ts +8 -0
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +7 -2
- package/front_end/models/trace/lantern/graph/NetworkNode.ts +14 -0
- package/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +1 -1
- package/front_end/models/trace/lantern/simulation/ConnectionPool.ts +4 -4
- package/front_end/models/trace/lantern/simulation/Simulator.ts +6 -2
- package/front_end/models/trace/lantern/simulation/TCPConnection.ts +12 -12
- package/front_end/models/trace/lantern/types/Lantern.ts +8 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +6 -6
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +6 -9
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +83 -69
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +24 -9
- package/front_end/panels/accessibility/SourceOrderView.ts +7 -3
- package/front_end/panels/accessibility/accessibilitySidebarView.css +5 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -12
- package/front_end/panels/ai_assistance/components/ChatInput.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +121 -13
- package/front_end/panels/ai_assistance/components/chatMessage.css +47 -0
- package/front_end/panels/application/BackgroundServiceView.ts +31 -33
- package/front_end/panels/application/IndexedDBModel.ts +8 -20
- package/front_end/panels/application/IndexedDBViews.ts +2 -6
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +44 -52
- package/front_end/panels/application/WebMCPView.ts +50 -50
- package/front_end/panels/application/serviceWorkersView.css +1 -1
- package/front_end/panels/comments/CommentsPane.ts +266 -0
- package/front_end/panels/comments/comments-meta.ts +47 -0
- package/front_end/panels/comments/comments.ts +9 -0
- package/front_end/panels/comments/commentsPane.css +206 -0
- package/front_end/panels/common/CommentThreadWidget.ts +30 -1
- package/front_end/panels/common/CommentsOverlayWidget.ts +42 -38
- package/front_end/panels/common/CommentsStatusBarPill.ts +3 -1
- package/front_end/panels/common/common-meta.ts +21 -9
- package/front_end/panels/console/ConsoleInsightTeaser.ts +25 -19
- package/front_end/panels/console/ConsoleViewMessage.ts +52 -23
- package/front_end/panels/console/ConsoleViewport.ts +1 -1
- package/front_end/panels/console/SymbolizedErrorWidget.ts +18 -9
- package/front_end/panels/console/console-meta.ts +1 -5
- package/front_end/panels/elements/CSSValueTraceView.ts +4 -4
- package/front_end/panels/elements/ComputedStyleWidget.ts +46 -42
- package/front_end/panels/elements/DOMPath.ts +11 -1
- package/front_end/panels/elements/DOMTreeContextMenu.ts +15 -0
- package/front_end/panels/elements/DOMTreeWidget.ts +237 -606
- package/front_end/panels/elements/ElementsPanel.ts +15 -16
- package/front_end/panels/elements/ElementsTreeElement.ts +24 -18
- package/front_end/panels/elements/EventListenersWidget.ts +5 -3
- package/front_end/panels/elements/InspectElementModeController.ts +6 -3
- package/front_end/panels/elements/LayoutPane.ts +3 -3
- package/front_end/panels/elements/PropertyRenderer.ts +132 -87
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +49 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +139 -36
- package/front_end/panels/elements/StylesContainer.ts +2 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +75 -16
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +2 -1
- package/front_end/panels/elements/elements-meta.ts +24 -75
- package/front_end/panels/emulation/DeviceModeToolbar.ts +5 -2
- package/front_end/panels/emulation/DeviceModeView.ts +5 -2
- package/front_end/panels/emulation/emulation-meta.ts +3 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +8 -3
- package/front_end/panels/layer_viewer/layer_viewer-meta.ts +2 -5
- package/front_end/panels/lighthouse/LighthouseController.ts +9 -4
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +13 -3
- package/front_end/panels/network/NetworkConfigView.ts +261 -190
- package/front_end/panels/network/NetworkLogView.ts +7 -5
- package/front_end/panels/network/NetworkPanel.ts +4 -3
- package/front_end/panels/network/NetworkWaterfallColumn.ts +7 -4
- package/front_end/panels/network/RequestPayloadView.ts +22 -14
- package/front_end/panels/network/network-meta.ts +23 -34
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
- package/front_end/panels/profiler/HeapProfileView.ts +20 -24
- package/front_end/panels/profiler/ProfilesPanel.ts +8 -3
- package/front_end/panels/recorder/RecordingView.ts +42 -47
- package/front_end/panels/recorder/StepEditor.ts +1 -0
- package/front_end/panels/recorder/recordingView.css +4 -4
- package/front_end/panels/screencast/ScreencastView.ts +6 -4
- package/front_end/panels/sources/CSSPlugin.ts +11 -0
- package/front_end/panels/sources/CoveragePlugin.ts +34 -23
- package/front_end/panels/sources/NavigatorView.ts +97 -52
- package/front_end/panels/sources/Plugin.ts +15 -1
- package/front_end/panels/sources/SourcesView.ts +47 -80
- package/front_end/panels/sources/TabbedEditorContainer.ts +63 -34
- package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
- package/front_end/panels/sources/navigatorTree.css +2 -2
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -4
- package/front_end/panels/timeline/components/LiveMetricsView.ts +7 -20
- package/front_end/panels/timeline/components/MetricCard.ts +262 -315
- package/front_end/panels/timeline/components/liveMetricsView.css +4 -0
- package/front_end/panels/timeline/components/metricCard.css +2 -24
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +33 -17
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +182 -130
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +76 -74
- package/front_end/panels/whats_new/WhatsNewImpl.ts +2 -1
- package/front_end/panels/whats_new/whats_new-meta.ts +2 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +5 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +8 -5
- package/front_end/third_party/web-vitals/package/package.json +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +9 -5
- package/front_end/third_party/web-vitals/rebuild.sh +2 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +17 -0
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +10 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationTeaser.ts +2 -2
- package/front_end/ui/components/text_editor/aiCodeCompletionTeaser.css +0 -11
- package/front_end/ui/components/text_editor/aiCodeGenerationTeaser.css +0 -11
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/legacy/SoftDropDown.ts +17 -4
- package/front_end/ui/legacy/StackPane.ts +141 -0
- package/front_end/ui/legacy/TabbedPane.ts +67 -12
- package/front_end/ui/legacy/TextPrompt.ts +37 -7
- package/front_end/ui/legacy/Toolbar.ts +36 -14
- package/front_end/ui/legacy/Widget.ts +3 -3
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +85 -0
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +61 -0
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +93 -31
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +15 -7
- package/front_end/ui/legacy/components/utils/Linkifier.ts +25 -45
- package/front_end/ui/legacy/inspectorCommon.css +11 -0
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/softContextMenu.css +2 -0
- package/front_end/ui/legacy/tabbedPane.css +12 -8
- package/front_end/ui/settings/ConsoleSettings.ts +7 -0
- package/front_end/ui/settings/ElementsSettings.ts +93 -0
- package/front_end/ui/settings/EmulationSettings.ts +17 -0
- package/front_end/ui/settings/LayerViewerSettings.ts +12 -0
- package/front_end/ui/settings/NetworkSettings.ts +26 -0
- package/front_end/ui/settings/WhatsNewSettings.ts +11 -0
- package/front_end/ui/settings/settings.ts +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +17 -0
- package/inspector_overlay/highlight_anchor.ts +1 -1
- package/package.json +1 -1
|
@@ -223,8 +223,6 @@ export class MainImpl {
|
|
|
223
223
|
this.#universe.settings.resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor).setRequiresUserAction(true);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
Root.Runtime.experiments.removeAllExperimentsFromLocalStorage();
|
|
227
|
-
|
|
228
226
|
await this.requestAndRegisterLocaleData();
|
|
229
227
|
|
|
230
228
|
Host.userMetrics.syncSetting(
|
|
@@ -352,23 +350,10 @@ export class MainImpl {
|
|
|
352
350
|
return {syncedStorage, globalStorage, localStorage};
|
|
353
351
|
}
|
|
354
352
|
|
|
355
|
-
// TODO(crbug.com/464173054) remove after M156
|
|
356
|
-
#migrateValueFromLegacyExperiment(legacyExperimentName: Root.ExperimentNames.ExperimentName,
|
|
357
|
-
experiment: Root.Runtime.Experiment): void {
|
|
358
|
-
const value = Root.Runtime.experiments.getValueFromStorage(legacyExperimentName);
|
|
359
|
-
if (value !== undefined && experiment.aboutFlag) {
|
|
360
|
-
// Set the experiment to the same value as the legacy experiment.
|
|
361
|
-
experiment.setEnabled(value);
|
|
362
|
-
// Set the chrome flag to the same value as the legacy experiment.
|
|
363
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setChromeFlag(experiment.aboutFlag, value);
|
|
364
|
-
// The legacy experiment will be cleaned up by `removeAllExperimentsFromLocalStorage`.
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
353
|
#initializeExperiments(): void {
|
|
369
354
|
const enableProtocolMonitor = (Root.Runtime.hostConfig.devToolsProtocolMonitor?.enabled ?? false) ||
|
|
370
355
|
Boolean(Root.Runtime.Runtime.queryParam('isChromeForTesting'));
|
|
371
|
-
|
|
356
|
+
Root.Runtime.experiments.register({
|
|
372
357
|
name: Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR,
|
|
373
358
|
title: 'Protocol Monitor',
|
|
374
359
|
aboutFlag: 'devtools-protocol-monitor',
|
|
@@ -377,19 +362,15 @@ export class MainImpl {
|
|
|
377
362
|
docLink: 'https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor' as
|
|
378
363
|
Platform.DevToolsPath.UrlString,
|
|
379
364
|
});
|
|
380
|
-
this.#migrateValueFromLegacyExperiment(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR,
|
|
381
|
-
protocolMonitorExperiment);
|
|
382
365
|
|
|
383
366
|
// Debugging
|
|
384
|
-
|
|
367
|
+
Root.Runtime.experiments.register({
|
|
385
368
|
name: Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
386
369
|
title: 'Instrumentation breakpoints',
|
|
387
370
|
aboutFlag: 'devtools-instrumentation-breakpoints',
|
|
388
371
|
isEnabled: Root.Runtime.hostConfig.devToolsInstrumentationBreakpoints?.enabled ?? false,
|
|
389
372
|
requiresChromeRestart: false,
|
|
390
373
|
});
|
|
391
|
-
this.#migrateValueFromLegacyExperiment(Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
392
|
-
instrumentationBreakpointsExperiment);
|
|
393
374
|
|
|
394
375
|
Root.Runtime.experiments.register({
|
|
395
376
|
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
@@ -663,6 +663,12 @@ inspectorBackend.registerType("FileSystem.File", [{"name": "name", "type": "stri
|
|
|
663
663
|
inspectorBackend.registerType("FileSystem.Directory", [{"name": "name", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "nestedDirectories", "type": "array", "optional": false, "description": "", "typeRef": "string"}, {"name": "nestedFiles", "type": "array", "optional": false, "description": "Files that are directly nested under this directory.", "typeRef": "FileSystem.File"}]);
|
|
664
664
|
inspectorBackend.registerType("FileSystem.BucketFileSystemLocator", [{"name": "storageKey", "type": "string", "optional": false, "description": "Storage key", "typeRef": "Storage.SerializedStorageKey"}, {"name": "bucketName", "type": "string", "optional": true, "description": "Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)", "typeRef": null}, {"name": "pathComponents", "type": "array", "optional": false, "description": "Path to the directory using each path component as an array item.", "typeRef": "string"}]);
|
|
665
665
|
|
|
666
|
+
// FindInPage.
|
|
667
|
+
inspectorBackend.registerCommand("FindInPage.findFirst", [{"name": "query", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "Forwards `query` to the find-in-page facility, starting a new find session. Where exactly the search starts from is implementation-specific.");
|
|
668
|
+
inspectorBackend.registerCommand("FindInPage.findNext", [], [], "Moves to the next match for the query passed to the most recent findFirst() call.");
|
|
669
|
+
inspectorBackend.registerCommand("FindInPage.findPrev", [], [], "Moves to the previous match for the query passed to the most recent findFirst() call.");
|
|
670
|
+
inspectorBackend.registerCommand("FindInPage.stop", [], [], "Ends the current find session, if any, and clears its highlighting.");
|
|
671
|
+
|
|
666
672
|
// HeadlessExperimental.
|
|
667
673
|
inspectorBackend.registerEnum("HeadlessExperimental.ScreenshotParamsFormat", {Jpeg: "jpeg", Png: "png", Webp: "webp"});
|
|
668
674
|
inspectorBackend.registerCommand("HeadlessExperimental.beginFrame", [{"name": "frameTimeTicks", "type": "number", "optional": true, "description": "Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.", "typeRef": null}, {"name": "interval", "type": "number", "optional": true, "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.", "typeRef": null}, {"name": "noDisplayUpdates", "type": "boolean", "optional": true, "description": "Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.", "typeRef": null}, {"name": "screenshot", "type": "object", "optional": true, "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.", "typeRef": "HeadlessExperimental.ScreenshotParams"}], ["hasDamage", "screenshotData"], "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background.");
|
|
@@ -1052,7 +1058,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
|
|
|
1052
1058
|
inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
|
|
1053
1059
|
inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
|
|
1054
1060
|
inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
|
|
1055
|
-
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1061
|
+
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", PublickeyCredentialsRemoteClientDataJson: "publickey-credentials-remote-client-data-json", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1056
1062
|
inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
|
|
1057
1063
|
inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
|
|
1058
1064
|
inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
|
|
@@ -1514,6 +1520,7 @@ inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "name", "type": "s
|
|
|
1514
1520
|
|
|
1515
1521
|
// Debugger.
|
|
1516
1522
|
inspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack"});
|
|
1523
|
+
inspectorBackend.registerEnum("Debugger.ScopeEmptyReason", {NoVariables: "no-variables", AllUnavailable: "all-unavailable"});
|
|
1517
1524
|
inspectorBackend.registerEnum("Debugger.BreakLocationType", {DebuggerStatement: "debuggerStatement", Call: "call", Return: "return"});
|
|
1518
1525
|
inspectorBackend.registerEnum("Debugger.ScriptLanguage", {JavaScript: "JavaScript", WebAssembly: "WebAssembly"});
|
|
1519
1526
|
inspectorBackend.registerEnum("Debugger.DebugSymbolsType", {SourceMap: "SourceMap", EmbeddedDWARF: "EmbeddedDWARF", ExternalDWARF: "ExternalDWARF"});
|
|
@@ -1564,7 +1571,7 @@ inspectorBackend.registerType("Debugger.Location", [{"name": "scriptId", "type":
|
|
|
1564
1571
|
inspectorBackend.registerType("Debugger.ScriptPosition", [{"name": "lineNumber", "type": "number", "optional": false, "description": "", "typeRef": null}, {"name": "columnNumber", "type": "number", "optional": false, "description": "", "typeRef": null}]);
|
|
1565
1572
|
inspectorBackend.registerType("Debugger.LocationRange", [{"name": "scriptId", "type": "string", "optional": false, "description": "", "typeRef": "Runtime.ScriptId"}, {"name": "start", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition"}, {"name": "end", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition"}]);
|
|
1566
1573
|
inspectorBackend.registerType("Debugger.CallFrame", [{"name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.", "typeRef": "Debugger.CallFrameId"}, {"name": "functionName", "type": "string", "optional": false, "description": "Name of the JavaScript function called on this call frame.", "typeRef": null}, {"name": "functionLocation", "type": "object", "optional": true, "description": "Location in the source code.", "typeRef": "Debugger.Location"}, {"name": "location", "type": "object", "optional": false, "description": "Location in the source code.", "typeRef": "Debugger.Location"}, {"name": "url", "type": "string", "optional": false, "description": "JavaScript script name or url. Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously sent `Debugger.scriptParsed` event.", "typeRef": null}, {"name": "scopeChain", "type": "array", "optional": false, "description": "Scope chain for this call frame.", "typeRef": "Debugger.Scope"}, {"name": "this", "type": "object", "optional": false, "description": "`this` object for this call frame.", "typeRef": "Runtime.RemoteObject"}, {"name": "returnValue", "type": "object", "optional": true, "description": "The value being returned, if the function is at return point.", "typeRef": "Runtime.RemoteObject"}, {"name": "canBeRestarted", "type": "boolean", "optional": true, "description": "Valid only while the VM is paused and indicates whether this frame can be restarted or not. Note that a `true` value here does not guarantee that Debugger#restartFrame with this CallFrameId will be successful, but it is very likely.", "typeRef": null}]);
|
|
1567
|
-
inspectorBackend.registerType("Debugger.Scope", [{"name": "type", "type": "string", "optional": false, "description": "Scope type.", "typeRef": null}, {"name": "object", "type": "object", "optional": false, "description": "Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.", "typeRef": "Runtime.RemoteObject"}, {"name": "name", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "startLocation", "type": "object", "optional": true, "description": "Location in the source code where scope starts", "typeRef": "Debugger.Location"}, {"name": "endLocation", "type": "object", "optional": true, "description": "Location in the source code where scope ends", "typeRef": "Debugger.Location"}, {"name": "
|
|
1574
|
+
inspectorBackend.registerType("Debugger.Scope", [{"name": "type", "type": "string", "optional": false, "description": "Scope type.", "typeRef": null}, {"name": "object", "type": "object", "optional": false, "description": "Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.", "typeRef": "Runtime.RemoteObject"}, {"name": "name", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "startLocation", "type": "object", "optional": true, "description": "Location in the source code where scope starts", "typeRef": "Debugger.Location"}, {"name": "endLocation", "type": "object", "optional": true, "description": "Location in the source code where scope ends", "typeRef": "Debugger.Location"}, {"name": "emptyReason", "type": "string", "optional": true, "description": "Present if the scope has no variable values to show. Absent means that the scope declares at least one variable with an available value. Empty scopes are retained in the scope chain because they can be targeted via `evaluateOnCallFrame` (using `scopeNumber`) or matched against scopes in source maps.", "typeRef": null}]);
|
|
1568
1575
|
inspectorBackend.registerType("Debugger.SearchMatch", [{"name": "lineNumber", "type": "number", "optional": false, "description": "Line number in resource content.", "typeRef": null}, {"name": "lineContent", "type": "string", "optional": false, "description": "Line with match content.", "typeRef": null}]);
|
|
1569
1576
|
inspectorBackend.registerType("Debugger.BreakLocation", [{"name": "scriptId", "type": "string", "optional": false, "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "typeRef": "Runtime.ScriptId"}, {"name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null}, {"name": "columnNumber", "type": "number", "optional": true, "description": "Column number in the script (0-based).", "typeRef": null}, {"name": "type", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
1570
1577
|
inspectorBackend.registerType("Debugger.WasmDisassemblyChunk", [{"name": "lines", "type": "array", "optional": false, "description": "The next chunk of disassembled lines.", "typeRef": "string"}, {"name": "bytecodeOffsets", "type": "array", "optional": false, "description": "The bytecode offsets describing the start of each line.", "typeRef": "integer"}]);
|
|
@@ -4313,7 +4313,7 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4313
4313
|
"overlay"
|
|
4314
4314
|
],
|
|
4315
4315
|
"name": "overscroll-container-type",
|
|
4316
|
-
"runtime_flag": "
|
|
4316
|
+
"runtime_flag": "OverscrollAreas",
|
|
4317
4317
|
"runtime_flag_status": "experimental"
|
|
4318
4318
|
},
|
|
4319
4319
|
{
|
|
@@ -4603,8 +4603,16 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4603
4603
|
"name": "position-try-order"
|
|
4604
4604
|
},
|
|
4605
4605
|
{
|
|
4606
|
+
"devtools_keywords": [
|
|
4607
|
+
"always",
|
|
4608
|
+
"anchor-valid",
|
|
4609
|
+
"anchor-visible",
|
|
4610
|
+
"no-overflow"
|
|
4611
|
+
],
|
|
4606
4612
|
"keywords": [
|
|
4607
4613
|
"always",
|
|
4614
|
+
"anchor-valid",
|
|
4615
|
+
"anchor-visible",
|
|
4608
4616
|
"anchors-visible",
|
|
4609
4617
|
"no-overflow"
|
|
4610
4618
|
],
|
|
@@ -5482,7 +5490,7 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
5482
5490
|
],
|
|
5483
5491
|
"name": "text-decoration-inset",
|
|
5484
5492
|
"runtime_flag": "CSSTextDecorationInset",
|
|
5485
|
-
"runtime_flag_status": "
|
|
5493
|
+
"runtime_flag_status": "stable"
|
|
5486
5494
|
},
|
|
5487
5495
|
{
|
|
5488
5496
|
"keywords": [
|
|
@@ -8484,7 +8492,8 @@ export const generatedPropertyValues: Record<string, CSSPropertyValue> = {
|
|
|
8484
8492
|
"position-visibility": {
|
|
8485
8493
|
"values": [
|
|
8486
8494
|
"always",
|
|
8487
|
-
"
|
|
8495
|
+
"anchor-valid",
|
|
8496
|
+
"anchor-visible",
|
|
8488
8497
|
"no-overflow"
|
|
8489
8498
|
]
|
|
8490
8499
|
},
|
|
@@ -3082,6 +3082,37 @@ export namespace ProtocolMapping {
|
|
|
3082
3082
|
paramsType: [Protocol.FileSystem.GetDirectoryRequest];
|
|
3083
3083
|
returnType: Protocol.FileSystem.GetDirectoryResponse;
|
|
3084
3084
|
};
|
|
3085
|
+
/**
|
|
3086
|
+
* Forwards `query` to the find-in-page facility, starting a new find session.
|
|
3087
|
+
* Where exactly the search starts from is implementation-specific.
|
|
3088
|
+
*/
|
|
3089
|
+
'FindInPage.findFirst': {
|
|
3090
|
+
paramsType: [Protocol.FindInPage.FindFirstRequest];
|
|
3091
|
+
returnType: void;
|
|
3092
|
+
};
|
|
3093
|
+
/**
|
|
3094
|
+
* Moves to the next match for the query passed to the most recent
|
|
3095
|
+
* findFirst() call.
|
|
3096
|
+
*/
|
|
3097
|
+
'FindInPage.findNext': {
|
|
3098
|
+
paramsType: [];
|
|
3099
|
+
returnType: void;
|
|
3100
|
+
};
|
|
3101
|
+
/**
|
|
3102
|
+
* Moves to the previous match for the query passed to the most recent
|
|
3103
|
+
* findFirst() call.
|
|
3104
|
+
*/
|
|
3105
|
+
'FindInPage.findPrev': {
|
|
3106
|
+
paramsType: [];
|
|
3107
|
+
returnType: void;
|
|
3108
|
+
};
|
|
3109
|
+
/**
|
|
3110
|
+
* Ends the current find session, if any, and clears its highlighting.
|
|
3111
|
+
*/
|
|
3112
|
+
'FindInPage.stop': {
|
|
3113
|
+
paramsType: [];
|
|
3114
|
+
returnType: void;
|
|
3115
|
+
};
|
|
3085
3116
|
/**
|
|
3086
3117
|
* Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
|
|
3087
3118
|
* screenshot from the resulting frame. Requires that the target was created with enabled
|
|
@@ -68,6 +68,8 @@ declare namespace ProtocolProxyApi {
|
|
|
68
68
|
|
|
69
69
|
FileSystem: FileSystemApi;
|
|
70
70
|
|
|
71
|
+
FindInPage: FindInPageApi;
|
|
72
|
+
|
|
71
73
|
HeadlessExperimental: HeadlessExperimentalApi;
|
|
72
74
|
|
|
73
75
|
IO: IOApi;
|
|
@@ -185,6 +187,8 @@ declare namespace ProtocolProxyApi {
|
|
|
185
187
|
|
|
186
188
|
FileSystem: FileSystemDispatcher;
|
|
187
189
|
|
|
190
|
+
FindInPage: FindInPageDispatcher;
|
|
191
|
+
|
|
188
192
|
HeadlessExperimental: HeadlessExperimentalDispatcher;
|
|
189
193
|
|
|
190
194
|
IO: IODispatcher;
|
|
@@ -2181,6 +2185,34 @@ declare namespace ProtocolProxyApi {
|
|
|
2181
2185
|
export interface FileSystemDispatcher {
|
|
2182
2186
|
}
|
|
2183
2187
|
|
|
2188
|
+
export interface FindInPageApi {
|
|
2189
|
+
/**
|
|
2190
|
+
* Forwards `query` to the find-in-page facility, starting a new find session.
|
|
2191
|
+
* Where exactly the search starts from is implementation-specific.
|
|
2192
|
+
*/
|
|
2193
|
+
invoke_findFirst(params: Protocol.FindInPage.FindFirstRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Moves to the next match for the query passed to the most recent
|
|
2197
|
+
* findFirst() call.
|
|
2198
|
+
*/
|
|
2199
|
+
invoke_findNext(): Promise<Protocol.ProtocolResponseWithError>;
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Moves to the previous match for the query passed to the most recent
|
|
2203
|
+
* findFirst() call.
|
|
2204
|
+
*/
|
|
2205
|
+
invoke_findPrev(): Promise<Protocol.ProtocolResponseWithError>;
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Ends the current find session, if any, and clears its highlighting.
|
|
2209
|
+
*/
|
|
2210
|
+
invoke_stop(): Promise<Protocol.ProtocolResponseWithError>;
|
|
2211
|
+
|
|
2212
|
+
}
|
|
2213
|
+
export interface FindInPageDispatcher {
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2184
2216
|
export interface HeadlessExperimentalApi {
|
|
2185
2217
|
/**
|
|
2186
2218
|
* Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
|
|
@@ -8702,6 +8702,16 @@ export namespace FileSystem {
|
|
|
8702
8702
|
}
|
|
8703
8703
|
}
|
|
8704
8704
|
|
|
8705
|
+
/**
|
|
8706
|
+
* This domain provides commands to trigger the "Find in page" feature.
|
|
8707
|
+
*/
|
|
8708
|
+
export namespace FindInPage {
|
|
8709
|
+
|
|
8710
|
+
export interface FindFirstRequest {
|
|
8711
|
+
query: string;
|
|
8712
|
+
}
|
|
8713
|
+
}
|
|
8714
|
+
|
|
8705
8715
|
/**
|
|
8706
8716
|
* This domain provides experimental commands only supported in headless mode.
|
|
8707
8717
|
*/
|
|
@@ -14808,6 +14818,7 @@ export namespace Page {
|
|
|
14808
14818
|
PrivateStateTokenRedemption = 'private-state-token-redemption',
|
|
14809
14819
|
PublickeyCredentialsCreate = 'publickey-credentials-create',
|
|
14810
14820
|
PublickeyCredentialsGet = 'publickey-credentials-get',
|
|
14821
|
+
PublickeyCredentialsRemoteClientDataJson = 'publickey-credentials-remote-client-data-json',
|
|
14811
14822
|
Rewriter = 'rewriter',
|
|
14812
14823
|
ScreenWakeLock = 'screen-wake-lock',
|
|
14813
14824
|
Serial = 'serial',
|
|
@@ -20720,6 +20731,11 @@ export namespace Debugger {
|
|
|
20720
20731
|
WasmExpressionStack = 'wasm-expression-stack',
|
|
20721
20732
|
}
|
|
20722
20733
|
|
|
20734
|
+
export const enum ScopeEmptyReason {
|
|
20735
|
+
NoVariables = 'no-variables',
|
|
20736
|
+
AllUnavailable = 'all-unavailable',
|
|
20737
|
+
}
|
|
20738
|
+
|
|
20723
20739
|
/**
|
|
20724
20740
|
* Scope description.
|
|
20725
20741
|
*/
|
|
@@ -20744,13 +20760,13 @@ export namespace Debugger {
|
|
|
20744
20760
|
*/
|
|
20745
20761
|
endLocation?: Location;
|
|
20746
20762
|
/**
|
|
20747
|
-
*
|
|
20748
|
-
*
|
|
20763
|
+
* Present if the scope has no variable values to show. Absent means that
|
|
20764
|
+
* the scope declares at least one variable with an available value.
|
|
20749
20765
|
* Empty scopes are retained in the scope chain because
|
|
20750
20766
|
* they can be targeted via `evaluateOnCallFrame` (using `scopeNumber`) or
|
|
20751
20767
|
* matched against scopes in source maps.
|
|
20752
20768
|
*/
|
|
20753
|
-
|
|
20769
|
+
emptyReason?: ScopeEmptyReason;
|
|
20754
20770
|
}
|
|
20755
20771
|
|
|
20756
20772
|
/**
|
|
@@ -13,13 +13,15 @@ import {
|
|
|
13
13
|
type ContextResponse,
|
|
14
14
|
type ConversationContext,
|
|
15
15
|
type MultimodalInputType,
|
|
16
|
+
type ParsedResponse,
|
|
16
17
|
type RequestOptions,
|
|
17
18
|
ResponseType,
|
|
19
|
+
sanitizeSuggestions,
|
|
18
20
|
} from './agents/AiAgent.js';
|
|
19
21
|
import {type ExecuteJsAgentOptions, executeJsCode} from './agents/ExecuteJavascript.js';
|
|
20
22
|
import {ChangeManager} from './ChangeManager.js';
|
|
21
|
-
import {AccessibilityContext} from './contexts/AccessibilityContext.js';
|
|
22
23
|
import {DOMNodeContext} from './contexts/DOMNodeContext.js';
|
|
24
|
+
import {LighthouseContext} from './contexts/LighthouseContext.js';
|
|
23
25
|
import {PerformanceTraceContext} from './contexts/PerformanceTraceContext.js';
|
|
24
26
|
import {debugLog} from './debug.js';
|
|
25
27
|
import {ExtensionScope} from './ExtensionScope.js';
|
|
@@ -41,6 +43,7 @@ const SKILL_DISPLAY_NAMES: Record<SkillName, string> = {
|
|
|
41
43
|
performance: 'Performance',
|
|
42
44
|
storage: 'Storage',
|
|
43
45
|
sources: 'Sources',
|
|
46
|
+
lighthouse: 'Lighthouse',
|
|
44
47
|
};
|
|
45
48
|
|
|
46
49
|
const preamble = `You are the most advanced unified AI assistant integrated into Chrome DevTools.
|
|
@@ -84,6 +87,110 @@ export interface AiAgent2Options extends ExecuteJsAgentOptions {
|
|
|
84
87
|
performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
|
|
85
88
|
}
|
|
86
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Matches the follow-up suggestions directive in plain uppercase, at the start
|
|
92
|
+
* of the line or after whitespace: `SUGGESTIONS: ["a"]`, `Done. SUGGESTIONS: ["a"]`.
|
|
93
|
+
* It is case-sensitive, so `Suggestions:` and `DEFAULT_SUGGESTIONS:` do not match.
|
|
94
|
+
* - Group 1: the text before the directive.
|
|
95
|
+
*/
|
|
96
|
+
const PLAIN_SUGGESTIONS_REGEX = /^(.*?)(?:^|\s)SUGGESTIONS:/;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Matches any spelling of the follow-up suggestions directive that is followed
|
|
100
|
+
* by an array ending the line, for example `**Suggestions**: ["a"]`,
|
|
101
|
+
* `- suggestions: ["a"]` or `` `SUGGESTIONS`: ["a"] ``. The keyword is
|
|
102
|
+
* case-insensitive, must be at the start of the line or after whitespace, and
|
|
103
|
+
* can have up to three markdown characters (`*`, `_` or `` ` ``) on each side
|
|
104
|
+
* of it and of the colon. Only markdown characters or whitespace can follow the
|
|
105
|
+
* closing `]`, so `A few suggestions: [see docs](url)` does not match.
|
|
106
|
+
* - Group 1: the text before the directive. It is greedy, so the last keyword
|
|
107
|
+
* on the line is used: `**Suggestions**: [1] Fix. SUGGESTIONS: ["a"]` keeps
|
|
108
|
+
* `**Suggestions**: [1] Fix.` as answer text.
|
|
109
|
+
* - Group 2: the array, from the first `[` after the keyword to the last `]`.
|
|
110
|
+
*/
|
|
111
|
+
const FORMATTED_SUGGESTIONS_REGEX = /^(.*)(?:^|\s)[*_`]{0,3}suggestions[*_`]{0,3}:[*_`]{0,3}\s*`?(\[.*\])[*_`\s]*$/i;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Matches the start of any spelling of the follow-up suggestions directive
|
|
115
|
+
* while it is streaming: the keyword in any case, at the start of the line or
|
|
116
|
+
* after whitespace, with optional markdown characters, followed by `:`. Nothing
|
|
117
|
+
* after the colon is checked, because the array may still be arriving.
|
|
118
|
+
* - Group 1: the text before the directive.
|
|
119
|
+
*/
|
|
120
|
+
const STREAMING_SUGGESTIONS_REGEX = /^(.*?)(?:^|\s)[*_`]{0,3}suggestions[*_`]{0,3}:/i;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Matches a markdown list or heading marker on its own, such as `-`, `1.` or
|
|
124
|
+
* `###`. The marker is dropped when the directive was the only thing after it.
|
|
125
|
+
*/
|
|
126
|
+
const LIST_OR_HEADING_MARKER_REGEX = /^(?:[-*+]|\d+\.|#{1,6})$/;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Returns the answer text with the directive removed from the last line.
|
|
130
|
+
* `textBeforeDirective` is what the last line contained before the directive.
|
|
131
|
+
*/
|
|
132
|
+
function removeDirectiveFromLastLine(lines: string[], textBeforeDirective: string): string {
|
|
133
|
+
const keptText = textBeforeDirective.trimEnd();
|
|
134
|
+
const lastLine = LIST_OR_HEADING_MARKER_REGEX.test(keptText.trim()) ? '' : keptText;
|
|
135
|
+
return [...lines.slice(0, -1), lastLine].join('\n').trimEnd();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Parses the JSON array of a suggestions directive. Returns `null` if `array`
|
|
140
|
+
* is not valid JSON, and `{suggestions: undefined}` if it is valid but holds no
|
|
141
|
+
* usable suggestions.
|
|
142
|
+
*/
|
|
143
|
+
function parseSuggestionsArray(array: string): {suggestions: [string, ...string[]]|undefined}|null {
|
|
144
|
+
try {
|
|
145
|
+
return {suggestions: sanitizeSuggestions(array)};
|
|
146
|
+
} catch {
|
|
147
|
+
// Invalid JSON: the caller decides whether the line is still a directive.
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Parses a completed response. Only the last line can be the follow-up
|
|
154
|
+
* suggestions directive; every other line is always kept as answer text.
|
|
155
|
+
* 1. If any spelling of the directive is followed by a valid JSON array that
|
|
156
|
+
* ends the line, it is removed and the array becomes the suggestions.
|
|
157
|
+
* 2. Otherwise, if the line contains `SUGGESTIONS:` in plain uppercase, it is
|
|
158
|
+
* removed from the keyword onward even though the array is missing or not
|
|
159
|
+
* valid JSON, and no suggestions are returned.
|
|
160
|
+
* 3. Otherwise, the line is kept unchanged.
|
|
161
|
+
* Text before the directive on the same line is kept.
|
|
162
|
+
*/
|
|
163
|
+
function parseCompletedSuggestions(text: string): ParsedResponse {
|
|
164
|
+
const lines = text.split('\n');
|
|
165
|
+
const lastLine = lines[lines.length - 1];
|
|
166
|
+
|
|
167
|
+
const formatted = lastLine.match(FORMATTED_SUGGESTIONS_REGEX);
|
|
168
|
+
const parsedArray = formatted ? parseSuggestionsArray(formatted[2]) : null;
|
|
169
|
+
if (formatted && parsedArray) {
|
|
170
|
+
const answer = removeDirectiveFromLastLine(lines, formatted[1]);
|
|
171
|
+
return parsedArray.suggestions ? {answer, suggestions: parsedArray.suggestions} : {answer};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const plain = lastLine.match(PLAIN_SUGGESTIONS_REGEX);
|
|
175
|
+
if (plain) {
|
|
176
|
+
return {answer: removeDirectiveFromLastLine(lines, plain[1])};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return {answer: text};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Hides a follow-up suggestions directive that is still streaming on the last
|
|
184
|
+
* line, from the keyword onward, without looking at its array. Hiding text by
|
|
185
|
+
* mistake is temporary: the completed response is parsed again by
|
|
186
|
+
* `parseCompletedSuggestions()`.
|
|
187
|
+
*/
|
|
188
|
+
function hideStreamingSuggestions(text: string): string {
|
|
189
|
+
const lines = text.split('\n');
|
|
190
|
+
const match = lines[lines.length - 1].match(STREAMING_SUGGESTIONS_REGEX);
|
|
191
|
+
return match ? removeDirectiveFromLastLine(lines, match[1]) : text;
|
|
192
|
+
}
|
|
193
|
+
|
|
87
194
|
export class AiAgent2 extends AiAgent<unknown> {
|
|
88
195
|
// TODO: The static preamble is a placeholder and will eventually live server-side.
|
|
89
196
|
readonly preamble: string = preamble;
|
|
@@ -235,6 +342,22 @@ Do NOT call \`learnSkills\` for skills that are already loaded.
|
|
|
235
342
|
User query: ${enhancedQuery}`;
|
|
236
343
|
}
|
|
237
344
|
|
|
345
|
+
/**
|
|
346
|
+
* Parses a completed response. Only the last line can be the follow-up
|
|
347
|
+
* suggestions directive. See `parseCompletedSuggestions()`.
|
|
348
|
+
*/
|
|
349
|
+
override parseTextResponse(response: string): ParsedResponse {
|
|
350
|
+
return parseCompletedSuggestions(response.trim());
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Parses a response that is still streaming, hiding a suggestions directive
|
|
355
|
+
* on the last line. See `hideStreamingSuggestions()`.
|
|
356
|
+
*/
|
|
357
|
+
protected override parsePartialTextResponse(response: string): ParsedResponse {
|
|
358
|
+
return {answer: hideStreamingSuggestions(response.trim())};
|
|
359
|
+
}
|
|
360
|
+
|
|
238
361
|
override async *
|
|
239
362
|
handleContextDetails(selected: ConversationContext<unknown>|null): AsyncGenerator<ContextResponse, void, void> {
|
|
240
363
|
if (selected) {
|
|
@@ -310,6 +433,8 @@ User query: ${enhancedQuery}`;
|
|
|
310
433
|
description: tool.description,
|
|
311
434
|
parameters: tool.parameters,
|
|
312
435
|
displayInfoFromArgs: tool.displayInfoFromArgs,
|
|
436
|
+
permissionPrompt: tool.permissionPrompt,
|
|
437
|
+
permissionTitle: tool.permissionTitle,
|
|
313
438
|
handler: (args, options) => {
|
|
314
439
|
const context: AllToolsCapabilities = {
|
|
315
440
|
changeManager: this.#changes,
|
|
@@ -318,7 +443,7 @@ User query: ${enhancedQuery}`;
|
|
|
318
443
|
getExecutionContextNode: () => this.#getExecutionContextNode(),
|
|
319
444
|
getTarget: () => this.#getTarget(),
|
|
320
445
|
getOriginLock: () => this.#originLock(),
|
|
321
|
-
getLighthouseReport: () => (this.context instanceof
|
|
446
|
+
getLighthouseReport: () => (this.context instanceof LighthouseContext ? this.context.getItem() : null),
|
|
322
447
|
runLighthouse: async overrides => await (this.#lighthouseRecording?.(overrides) ?? null),
|
|
323
448
|
getPerformanceTraceContext: () => (this.context instanceof PerformanceTraceContext ? this.context : null),
|
|
324
449
|
performanceRecordAndReload: this.#performanceRecordAndReload,
|
|
@@ -33,9 +33,9 @@ import {AiAgent2} from './AiAgent2.js';
|
|
|
33
33
|
import {AiHistoryStorage, ConversationType, type SerializedConversation} from './AiHistoryStorage.js';
|
|
34
34
|
import {isContextSelectionEnabled} from './AiUtils.js';
|
|
35
35
|
import type {ChangeManager} from './ChangeManager.js';
|
|
36
|
-
import {AccessibilityContext} from './contexts/AccessibilityContext.js';
|
|
37
36
|
import {DOMNodeContext} from './contexts/DOMNodeContext.js';
|
|
38
37
|
import {FileContext} from './contexts/FileContext.js';
|
|
38
|
+
import {LighthouseContext} from './contexts/LighthouseContext.js';
|
|
39
39
|
import {PerformanceTraceContext} from './contexts/PerformanceTraceContext.js';
|
|
40
40
|
import {RequestContext} from './contexts/RequestContext.js';
|
|
41
41
|
import {StorageContext} from './contexts/StorageContext.js';
|
|
@@ -207,7 +207,7 @@ export class AiConversation {
|
|
|
207
207
|
this.#updateAgent(ConversationType.NETWORK);
|
|
208
208
|
} else if (updateContext instanceof PerformanceTraceContext) {
|
|
209
209
|
this.#updateAgent(ConversationType.PERFORMANCE);
|
|
210
|
-
} else if (updateContext instanceof
|
|
210
|
+
} else if (updateContext instanceof LighthouseContext) {
|
|
211
211
|
this.#updateAgent(ConversationType.ACCESSIBILITY);
|
|
212
212
|
} else if (updateContext instanceof StorageContext) {
|
|
213
213
|
this.#updateAgent(ConversationType.STORAGE);
|
|
@@ -122,6 +122,10 @@ export function isGeminiBranding(): boolean {
|
|
|
122
122
|
return !!Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
export function isNaturalLanguageInterfaceEnabled(): boolean {
|
|
126
|
+
return Boolean(Root.Runtime.hostConfig.devToolsAiNaturalLanguageInterface?.enabled);
|
|
127
|
+
}
|
|
128
|
+
|
|
125
129
|
/**
|
|
126
130
|
* Returns true if context selection / dynamic context switching is enabled.
|
|
127
131
|
*
|