chrome-devtools-frontend 1.0.1587905 → 1.0.1589336

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/docs/ui_engineering.md +2 -2
  2. package/front_end/core/common/AppProvider.ts +1 -2
  3. package/front_end/core/common/Color.ts +19 -20
  4. package/front_end/core/common/ParsedURL.ts +3 -3
  5. package/front_end/core/common/Progress.ts +5 -5
  6. package/front_end/core/common/Settings.ts +2 -2
  7. package/front_end/core/dom_extension/DOMExtension.ts +1 -1
  8. package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
  9. package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
  10. package/front_end/core/host/UserMetrics.ts +1 -1
  11. package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
  12. package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
  13. package/front_end/core/sdk/CSSProperty.ts +38 -0
  14. package/front_end/core/sdk/CSSRule.ts +4 -9
  15. package/front_end/core/sdk/ChildTargetManager.ts +1 -1
  16. package/front_end/core/sdk/CookieModel.ts +0 -1
  17. package/front_end/core/sdk/DOMModel.ts +42 -6
  18. package/front_end/core/sdk/EmulationModel.ts +3 -3
  19. package/front_end/core/sdk/NetworkRequest.ts +1 -1
  20. package/front_end/core/sdk/PageResourceLoader.ts +11 -6
  21. package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
  22. package/front_end/core/sdk/PreloadingModel.ts +15 -6
  23. package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
  24. package/front_end/core/sdk/SourceMap.ts +2 -3
  25. package/front_end/core/sdk/SourceMapManager.ts +1 -2
  26. package/front_end/entrypoint_template.html +1 -1
  27. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
  28. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
  29. package/front_end/entrypoints/main/main-meta.ts +0 -3
  30. package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
  31. package/front_end/generated/InspectorBackendCommands.ts +6 -4
  32. package/front_end/generated/SupportedCSSProperties.js +46 -0
  33. package/front_end/generated/protocol-mapping.d.ts +4 -0
  34. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  35. package/front_end/generated/protocol.ts +50 -0
  36. package/front_end/models/ai_assistance/AiConversation.ts +20 -0
  37. package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
  38. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
  39. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
  40. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
  41. package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
  42. package/front_end/models/emulation/DeviceModeModel.ts +0 -3
  43. package/front_end/models/emulation/EmulatedDevices.ts +0 -2
  44. package/front_end/models/extensions/ExtensionAPI.ts +2 -2
  45. package/front_end/models/har/Importer.ts +0 -1
  46. package/front_end/models/har/Log.ts +2 -11
  47. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -21
  48. package/front_end/models/logs/NetworkLog.ts +0 -2
  49. package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
  50. package/front_end/models/text_utils/TextUtils.ts +0 -9
  51. package/front_end/models/trace/LanternComputationData.ts +1 -6
  52. package/front_end/models/trace/helpers/Trace.ts +1 -4
  53. package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
  54. package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
  55. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -26
  56. package/front_end/panels/application/BackgroundServiceView.ts +0 -2
  57. package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
  58. package/front_end/panels/application/IndexedDBViews.ts +19 -23
  59. package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
  60. package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
  61. package/front_end/panels/application/preloading/PreloadingView.ts +18 -0
  62. package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +12 -0
  63. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +3 -3
  64. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +3 -4
  65. package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
  66. package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
  67. package/front_end/panels/console/ConsoleSidebar.ts +1 -1
  68. package/front_end/panels/console/ConsoleView.ts +4 -0
  69. package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
  70. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
  71. package/front_end/panels/elements/ComputedStyleWidget.ts +32 -32
  72. package/front_end/panels/elements/ElementsPanel.ts +12 -4
  73. package/front_end/panels/elements/ElementsTreeElement.ts +9 -1
  74. package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
  75. package/front_end/panels/elements/MarkerDecorator.ts +0 -2
  76. package/front_end/panels/elements/PropertiesWidget.ts +62 -61
  77. package/front_end/panels/elements/StylePropertiesSection.ts +32 -3
  78. package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -20
  79. package/front_end/panels/elements/StylesSidebarPane.ts +25 -90
  80. package/front_end/panels/elements/elementsPanel.css +6 -2
  81. package/front_end/panels/emulation/emulation-meta.ts +0 -2
  82. package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
  83. package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
  84. package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
  85. package/front_end/panels/media/EventDisplayTable.ts +0 -2
  86. package/front_end/panels/media/PlayerMessagesView.ts +4 -6
  87. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
  88. package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
  89. package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
  90. package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
  91. package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
  92. package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
  93. package/front_end/panels/network/RequestHeadersView.ts +113 -128
  94. package/front_end/panels/network/RequestInitiatorView.ts +74 -69
  95. package/front_end/panels/network/RequestPayloadView.ts +6 -3
  96. package/front_end/panels/network/ResourceChunkView.ts +0 -2
  97. package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
  98. package/front_end/panels/network/network-meta.ts +0 -2
  99. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
  100. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
  101. package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
  102. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
  103. package/front_end/panels/profiler/ProfileView.ts +0 -35
  104. package/front_end/panels/profiler/profiler-meta.ts +0 -1
  105. package/front_end/panels/recorder/components/StepView.ts +0 -1
  106. package/front_end/panels/screencast/ScreencastView.ts +2 -2
  107. package/front_end/panels/search/SearchResultsPane.ts +3 -2
  108. package/front_end/panels/security/SecurityPanel.ts +0 -1
  109. package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
  110. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
  111. package/front_end/panels/settings/SettingsScreen.ts +1 -2
  112. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
  113. package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
  114. package/front_end/panels/settings/settings-meta.ts +0 -3
  115. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
  116. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  117. package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
  118. package/front_end/panels/sources/sources-meta.ts +0 -9
  119. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
  120. package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
  121. package/front_end/panels/timeline/TimelinePanel.ts +0 -7
  122. package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
  123. package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
  124. package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
  125. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
  126. package/front_end/panels/timeline/utils/Treemap.ts +0 -4
  127. package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
  128. package/front_end/third_party/chromium/README.chromium +1 -1
  129. package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
  130. package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
  131. package/front_end/ui/components/icon_button/IconButton.ts +2 -2
  132. package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
  133. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
  134. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
  135. package/front_end/ui/legacy/ContextMenu.ts +1 -17
  136. package/front_end/ui/legacy/EmptyWidget.ts +4 -4
  137. package/front_end/ui/legacy/Fragment.ts +2 -4
  138. package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
  139. package/front_end/ui/legacy/TabbedPane.ts +2 -2
  140. package/front_end/ui/legacy/Treeoutline.ts +16 -9
  141. package/front_end/ui/legacy/UIUtils.ts +1 -4
  142. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
  143. package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +32 -28
  144. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -6
  145. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +0 -2
  146. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
  147. package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
  148. package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
  149. package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
  150. package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
  151. package/package.json +1 -1
@@ -19,8 +19,8 @@ export class PerformanceMetricsModel extends SDKModel<void> {
19
19
  ['RecalcStyleCount', MetricMode.CUMULATIVE_COUNT],
20
20
  ]);
21
21
  readonly #metricData = new Map<string, {
22
- lastValue: (number | undefined),
23
- lastTimestamp: (number|undefined),
22
+ lastValue?: number,
23
+ lastTimestamp?: number,
24
24
  }>();
25
25
 
26
26
  constructor(target: Target) {
@@ -64,6 +64,20 @@ export class PreloadingModel extends SDKModel<EventTypes> {
64
64
  void this.agent.invoke_disable();
65
65
  }
66
66
 
67
+ reset(): void {
68
+ this.documents.clear();
69
+ this.loaderIds = [];
70
+ this.targetJustAttached = true;
71
+ this.dispatchEventToListeners(Events.MODEL_UPDATED);
72
+ }
73
+
74
+ private maybeInferLoaderId(loaderId: Protocol.Network.LoaderId): void {
75
+ if (this.currentLoaderId() === null) {
76
+ this.loaderIds = [loaderId];
77
+ this.targetJustAttached = false;
78
+ }
79
+ }
80
+
67
81
  private ensureDocumentPreloadingData(loaderId: Protocol.Network.LoaderId): void {
68
82
  if (this.documents.get(loaderId) === undefined) {
69
83
  this.documents.set(loaderId, new DocumentPreloadingData());
@@ -241,12 +255,7 @@ export class PreloadingModel extends SDKModel<EventTypes> {
241
255
 
242
256
  const loaderId = ruleSet.loaderId;
243
257
 
244
- // Infer current loaderId if DevTools is opned at the current page.
245
- if (this.currentLoaderId() === null) {
246
- this.loaderIds = [loaderId];
247
- this.targetJustAttached = false;
248
- }
249
-
258
+ this.maybeInferLoaderId(loaderId);
250
259
  this.ensureDocumentPreloadingData(loaderId);
251
260
  this.documents.get(loaderId)?.ruleSets.upsert(ruleSet);
252
261
  this.dispatchEventToListeners(Events.MODEL_UPDATED);
@@ -646,13 +646,11 @@ export class ResourceTreeFrame {
646
646
  #childFrames = new Set<ResourceTreeFrame>();
647
647
  resourcesMap = new Map<Platform.DevToolsPath.UrlString, Resource>();
648
648
  backForwardCacheDetails: {
649
- restoredFromCache: boolean|undefined,
650
649
  explanations: Protocol.Page.BackForwardCacheNotRestoredExplanation[],
651
- explanationsTree: Protocol.Page.BackForwardCacheNotRestoredExplanationTree|undefined,
650
+ restoredFromCache?: boolean,
651
+ explanationsTree?: Protocol.Page.BackForwardCacheNotRestoredExplanationTree,
652
652
  } = {
653
- restoredFromCache: undefined,
654
653
  explanations: [],
655
- explanationsTree: undefined,
656
654
  };
657
655
 
658
656
  constructor(
@@ -725,9 +723,7 @@ export class ResourceTreeFrame {
725
723
  this.#crossOriginIsolatedContextType = framePayload.crossOriginIsolatedContextType;
726
724
  this.#gatedAPIFeatures = framePayload.gatedAPIFeatures;
727
725
  this.backForwardCacheDetails = {
728
- restoredFromCache: undefined,
729
726
  explanations: [],
730
- explanationsTree: undefined,
731
727
  };
732
728
 
733
729
  const mainResource = this.resourcesMap.get(this.#url);
@@ -89,10 +89,10 @@ export class SourceMapEntry {
89
89
  readonly lineNumber: number;
90
90
  readonly columnNumber: number;
91
91
  readonly sourceIndex?: number;
92
- readonly sourceURL: Platform.DevToolsPath.UrlString|undefined;
92
+ readonly sourceURL?: Platform.DevToolsPath.UrlString;
93
93
  readonly sourceLineNumber: number;
94
94
  readonly sourceColumnNumber: number;
95
- readonly name: string|undefined;
95
+ readonly name?: string;
96
96
 
97
97
  constructor(
98
98
  lineNumber: number, columnNumber: number, sourceIndex?: number, sourceURL?: Platform.DevToolsPath.UrlString,
@@ -248,7 +248,6 @@ export class SourceMap {
248
248
  sourceURL: this.sourceURLs()[callsite.sourceIndex],
249
249
  sourceLineNumber: callsite.line,
250
250
  sourceColumnNumber: callsite.column,
251
- name: undefined,
252
251
  };
253
252
  }
254
253
  const mappings = this.mappings();
@@ -93,7 +93,6 @@ export class SourceMapManager<T extends FrameAssociated> extends Common.ObjectWr
93
93
  let clientData: ClientData|null = {
94
94
  relativeSourceURL,
95
95
  relativeSourceMapURL,
96
- sourceMap: undefined,
97
96
  sourceMapPromise: Promise.resolve(undefined),
98
97
  };
99
98
  if (this.#isEnabled) {
@@ -225,7 +224,7 @@ interface ClientData {
225
224
  // Stores the raw sourceMappingURL as provided by V8. These are not guaranteed to
226
225
  // be valid URLs and will be checked and resolved once `attachSourceMap` is called.
227
226
  relativeSourceMapURL: string;
228
- sourceMap: SourceMap|undefined;
227
+ sourceMap?: SourceMap;
229
228
  sourceMapPromise: Promise<SourceMap|undefined>;
230
229
  }
231
230
 
@@ -18,7 +18,7 @@
18
18
  http-equiv="Content-Security-Policy"
19
19
  content="default-src 'self' devtools: data:; style-src 'self' 'unsafe-inline' devtools:; object-src 'none'; script-src
20
20
  'self' https://chrome-devtools-frontend.appspot.com; img-src 'self' data:; frame-src * data:; connect-src data:
21
- https://chromeuxreport.googleapis.com 'self' devtools:;">
21
+ https://chromeuxreport.googleapis.com 'self' devtools: ws://127.0.0.1:*;">
22
22
  <meta name="referrer" content="no-referrer">
23
23
  <script type="module" src="./entrypoints/%ENTRYPOINT_NAME%/%ENTRYPOINT_NAME%.js"></script>
24
24
  <link href="./application_tokens.css" rel="stylesheet">
@@ -20,32 +20,22 @@ export class CSSFormatter {
20
20
  #lineEndings!: number[];
21
21
  #lastLine: number;
22
22
  #state: {
23
- eatWhitespace: (boolean|undefined),
24
- seenProperty: (boolean|undefined),
25
- inPropertyValue: (boolean|undefined),
26
- afterClosingBrace: (boolean|undefined),
23
+ eatWhitespace?: boolean,
24
+ seenProperty?: boolean,
25
+ inPropertyValue?: boolean,
26
+ afterClosingBrace?: boolean,
27
27
  };
28
28
  constructor(builder: FormattedContentBuilder) {
29
29
  this.#builder = builder;
30
30
  this.#lastLine = -1;
31
- this.#state = {
32
- eatWhitespace: undefined,
33
- seenProperty: undefined,
34
- inPropertyValue: undefined,
35
- afterClosingBrace: undefined,
36
- };
31
+ this.#state = {};
37
32
  }
38
33
 
39
34
  format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
40
35
  this.#lineEndings = lineEndings;
41
36
  this.#fromOffset = fromOffset;
42
37
  this.#toOffset = toOffset;
43
- this.#state = {
44
- eatWhitespace: undefined,
45
- seenProperty: undefined,
46
- inPropertyValue: undefined,
47
- afterClosingBrace: undefined,
48
- };
38
+ this.#state = {};
49
39
  this.#lastLine = -1;
50
40
  const tokenize = createTokenizer('text/css');
51
41
  const oldEnforce = this.#builder.setEnforceSpaceBetweenWords(false);
@@ -36,8 +36,10 @@ export class HeapSnapshotWorkerDispatcher {
36
36
  async dispatchMessage({data, ports}:
37
37
  {data: HeapSnapshotModel.HeapSnapshotModel.WorkerCommand, ports: readonly MessagePort[]}):
38
38
  Promise<void> {
39
- const response: DispatcherResponse =
40
- {callId: data.callId, result: null, error: undefined, errorCallStack: undefined, errorMethodName: undefined};
39
+ const response: DispatcherResponse = {
40
+ callId: data.callId,
41
+ result: null,
42
+ };
41
43
  try {
42
44
  switch (data.disposition) {
43
45
  case 'createLoader':
@@ -867,7 +867,6 @@ UI.ContextMenu.registerProvider({
867
867
  async loadProvider() {
868
868
  return new Components.Linkifier.ContentProviderContextMenuProvider();
869
869
  },
870
- experiment: undefined,
871
870
  });
872
871
 
873
872
  UI.ContextMenu.registerProvider({
@@ -879,7 +878,6 @@ UI.ContextMenu.registerProvider({
879
878
  async loadProvider() {
880
879
  return new UI.LinkContextMenuProvider.LinkContextMenuProvider();
881
880
  },
882
- experiment: undefined,
883
881
  });
884
882
 
885
883
  UI.ContextMenu.registerProvider({
@@ -891,7 +889,6 @@ UI.ContextMenu.registerProvider({
891
889
  async loadProvider() {
892
890
  return new Components.Linkifier.LinkContextMenuProvider();
893
891
  },
894
- experiment: undefined,
895
892
  });
896
893
 
897
894
  UI.Toolbar.registerToolbarItem({
@@ -187,13 +187,11 @@ export class NodeConnectionsView extends UI.Widget.VBox implements UI.ListWidget
187
187
  if (!match) {
188
188
  return {
189
189
  valid: false,
190
- errorMessage: undefined,
191
190
  };
192
191
  }
193
192
  const port = parseInt(match[2], 10);
194
193
  return {
195
194
  valid: port <= 65535,
196
- errorMessage: undefined,
197
195
  };
198
196
  }
199
197
  }
@@ -363,6 +363,7 @@ inspectorBackend.registerEvent("DOM.inlineStyleInvalidated", ["nodeIds"]);
363
363
  inspectorBackend.registerEvent("DOM.pseudoElementAdded", ["parentId", "pseudoElement"]);
364
364
  inspectorBackend.registerEvent("DOM.topLayerElementsUpdated", []);
365
365
  inspectorBackend.registerEvent("DOM.scrollableFlagUpdated", ["nodeId", "isScrollable"]);
366
+ inspectorBackend.registerEvent("DOM.adRelatedStateUpdated", ["nodeId", "isAdRelated"]);
366
367
  inspectorBackend.registerEvent("DOM.affectedByStartingStylesFlagUpdated", ["nodeId", "affectedByStartingStyles"]);
367
368
  inspectorBackend.registerEvent("DOM.pseudoElementRemoved", ["parentId", "pseudoElementId"]);
368
369
  inspectorBackend.registerEvent("DOM.setChildNodes", ["parentId", "nodes"]);
@@ -424,7 +425,7 @@ inspectorBackend.registerCommand("DOM.getQueryingDescendantsForContainer", [{"na
424
425
  inspectorBackend.registerCommand("DOM.getAnchorElement", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the positioned element from which to find the anchor.", "typeRef": "DOM.NodeId"}, {"name": "anchorSpecifier", "type": "string", "optional": true, "description": "An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.", "typeRef": null}], ["nodeId"], "Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.");
425
426
  inspectorBackend.registerCommand("DOM.forceShowPopover", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement", "typeRef": "DOM.NodeId"}, {"name": "enable", "type": "boolean", "optional": false, "description": "If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.", "typeRef": null}], ["nodeIds"], "When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.");
426
427
  inspectorBackend.registerType("DOM.BackendNode", [{"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId"}]);
427
- inspectorBackend.registerType("DOM.Node", [{"name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId"}, {"name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId"}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId"}, {"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null}, {"name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null}, {"name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null}, {"name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node"}, {"name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string"}, {"name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null}, {"name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null}, {"name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null}, {"name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null}, {"name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null}, {"name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null}, {"name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null}, {"name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null}, {"name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType"}, {"name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId"}, {"name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node"}, {"name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node"}, {"name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node"}, {"name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node"}, {"name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node"}, {"name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode"}, {"name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null}, {"name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode"}, {"name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode"}, {"name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId"}]);
428
+ inspectorBackend.registerType("DOM.Node", [{"name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId"}, {"name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId"}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId"}, {"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null}, {"name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null}, {"name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null}, {"name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node"}, {"name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string"}, {"name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null}, {"name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null}, {"name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null}, {"name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null}, {"name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null}, {"name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null}, {"name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null}, {"name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null}, {"name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType"}, {"name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId"}, {"name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node"}, {"name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node"}, {"name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node"}, {"name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node"}, {"name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node"}, {"name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode"}, {"name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null}, {"name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode"}, {"name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode"}, {"name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "isAdRelated", "type": "boolean", "optional": true, "description": "", "typeRef": null}]);
428
429
  inspectorBackend.registerType("DOM.DetachedElementInfo", [{"name": "treeNode", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Node"}, {"name": "retainedNodeIds", "type": "array", "optional": false, "description": "", "typeRef": "DOM.NodeId"}]);
429
430
  inspectorBackend.registerType("DOM.RGBA", [{"name": "r", "type": "number", "optional": false, "description": "The red component, in the [0-255] range.", "typeRef": null}, {"name": "g", "type": "number", "optional": false, "description": "The green component, in the [0-255] range.", "typeRef": null}, {"name": "b", "type": "number", "optional": false, "description": "The blue component, in the [0-255] range.", "typeRef": null}, {"name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1).", "typeRef": null}]);
430
431
  inspectorBackend.registerType("DOM.Quad", [{"name": "Quad", "type": "array", "optional": false, "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", "typeRef": "number"}]);
@@ -502,7 +503,7 @@ inspectorBackend.registerEnum("Emulation.VirtualTimePolicy", {Advance: "advance"
502
503
  inspectorBackend.registerEnum("Emulation.SensorType", {AbsoluteOrientation: "absolute-orientation", Accelerometer: "accelerometer", AmbientLight: "ambient-light", Gravity: "gravity", Gyroscope: "gyroscope", LinearAcceleration: "linear-acceleration", Magnetometer: "magnetometer", RelativeOrientation: "relative-orientation"});
503
504
  inspectorBackend.registerEnum("Emulation.PressureSource", {Cpu: "cpu"});
504
505
  inspectorBackend.registerEnum("Emulation.PressureState", {Nominal: "nominal", Fair: "fair", Serious: "serious", Critical: "critical"});
505
- inspectorBackend.registerEnum("Emulation.DisabledImageType", {Avif: "avif", Webp: "webp"});
506
+ inspectorBackend.registerEnum("Emulation.DisabledImageType", {Avif: "avif", Jxl: "jxl", Webp: "webp"});
506
507
  inspectorBackend.registerEvent("Emulation.virtualTimeBudgetExpired", []);
507
508
  inspectorBackend.registerCommand("Emulation.canEmulate", [], ["result"], "Tells whether emulation is supported.");
508
509
  inspectorBackend.registerCommand("Emulation.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
@@ -930,8 +931,9 @@ inspectorBackend.registerType("Network.DeviceBoundSessionCookieCraving", [{"name
930
931
  inspectorBackend.registerType("Network.DeviceBoundSessionUrlRule", [{"name": "ruleType", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.", "typeRef": null}, {"name": "hostPattern", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.", "typeRef": null}, {"name": "pathPrefix", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.", "typeRef": null}]);
931
932
  inspectorBackend.registerType("Network.DeviceBoundSessionInclusionRules", [{"name": "origin", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.", "typeRef": null}, {"name": "includeSite", "type": "boolean", "optional": false, "description": "Whether the whole site is included. See comments on `net::device_bound_sessions::SessionInclusionRules::include_site_` for more details; this boolean is true if that value is populated.", "typeRef": null}, {"name": "urlRules", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.", "typeRef": "Network.DeviceBoundSessionUrlRule"}]);
932
933
  inspectorBackend.registerType("Network.DeviceBoundSession", [{"name": "key", "type": "object", "optional": false, "description": "The site and session ID of the session.", "typeRef": "Network.DeviceBoundSessionKey"}, {"name": "refreshUrl", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::refresh_url_`.", "typeRef": null}, {"name": "inclusionRules", "type": "object", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::inclusion_rules_`.", "typeRef": "Network.DeviceBoundSessionInclusionRules"}, {"name": "cookieCravings", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::cookie_cravings_`.", "typeRef": "Network.DeviceBoundSessionCookieCraving"}, {"name": "expiryDate", "type": "number", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::expiry_date_`.", "typeRef": "Network.TimeSinceEpoch"}, {"name": "cachedChallenge", "type": "string", "optional": true, "description": "See comments on `net::device_bound_sessions::Session::cached_challenge__`.", "typeRef": null}, {"name": "allowedRefreshInitiators", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.", "typeRef": "string"}]);
933
- inspectorBackend.registerType("Network.CreationEventDetails", [{"name": "fetchResult", "type": "string", "optional": false, "description": "The result of the fetch attempt.", "typeRef": "Network.DeviceBoundSessionFetchResult"}, {"name": "newSession", "type": "object", "optional": true, "description": "The session if there was a newly created session. This is populated for all successful creation events.", "typeRef": "Network.DeviceBoundSession"}]);
934
- inspectorBackend.registerType("Network.RefreshEventDetails", [{"name": "refreshResult", "type": "string", "optional": false, "description": "The result of a refresh.", "typeRef": null}, {"name": "fetchResult", "type": "string", "optional": true, "description": "If there was a fetch attempt, the result of that.", "typeRef": "Network.DeviceBoundSessionFetchResult"}, {"name": "newSession", "type": "object", "optional": true, "description": "The session display if there was a newly created session. This is populated for any refresh event that modifies the session config.", "typeRef": "Network.DeviceBoundSession"}, {"name": "wasFullyProactiveRefresh", "type": "boolean", "optional": false, "description": "See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.", "typeRef": null}]);
934
+ inspectorBackend.registerType("Network.DeviceBoundSessionFailedRequest", [{"name": "requestUrl", "type": "string", "optional": false, "description": "The failed request URL.", "typeRef": null}, {"name": "netError", "type": "string", "optional": true, "description": "The net error of the response if it was not OK.", "typeRef": null}, {"name": "responseError", "type": "number", "optional": true, "description": "The response code if the net error was OK and the response code was not 200.", "typeRef": null}, {"name": "responseErrorBody", "type": "string", "optional": true, "description": "The body of the response if the net error was OK, the response code was not 200, and the response body was not empty.", "typeRef": null}]);
935
+ inspectorBackend.registerType("Network.CreationEventDetails", [{"name": "fetchResult", "type": "string", "optional": false, "description": "The result of the fetch attempt.", "typeRef": "Network.DeviceBoundSessionFetchResult"}, {"name": "newSession", "type": "object", "optional": true, "description": "The session if there was a newly created session. This is populated for all successful creation events.", "typeRef": "Network.DeviceBoundSession"}, {"name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest"}]);
936
+ inspectorBackend.registerType("Network.RefreshEventDetails", [{"name": "refreshResult", "type": "string", "optional": false, "description": "The result of a refresh.", "typeRef": null}, {"name": "fetchResult", "type": "string", "optional": true, "description": "If there was a fetch attempt, the result of that.", "typeRef": "Network.DeviceBoundSessionFetchResult"}, {"name": "newSession", "type": "object", "optional": true, "description": "The session display if there was a newly created session. This is populated for any refresh event that modifies the session config.", "typeRef": "Network.DeviceBoundSession"}, {"name": "wasFullyProactiveRefresh", "type": "boolean", "optional": false, "description": "See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.", "typeRef": null}, {"name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest"}]);
935
937
  inspectorBackend.registerType("Network.TerminationEventDetails", [{"name": "deletionReason", "type": "string", "optional": false, "description": "The reason for a session being deleted.", "typeRef": null}]);
936
938
  inspectorBackend.registerType("Network.ChallengeEventDetails", [{"name": "challengeResult", "type": "string", "optional": false, "description": "The result of a challenge.", "typeRef": null}, {"name": "challenge", "type": "string", "optional": false, "description": "The challenge set.", "typeRef": null}]);
937
939
  inspectorBackend.registerType("Network.LoadNetworkResourcePageResult", [{"name": "success", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "netError", "type": "number", "optional": true, "description": "Optional values used for error reporting.", "typeRef": null}, {"name": "netErrorName", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "httpStatusCode", "type": "number", "optional": true, "description": "", "typeRef": null}, {"name": "stream", "type": "string", "optional": true, "description": "If successful, one of the following two fields holds the result.", "typeRef": "IO.StreamHandle"}, {"name": "headers", "type": "object", "optional": true, "description": "Response headers.", "typeRef": "Network.Headers"}]);
@@ -1761,6 +1761,20 @@ export const generatedProperties = [
1761
1761
  ],
1762
1762
  "name": "column-rule-inset"
1763
1763
  },
1764
+ {
1765
+ "longhands": [
1766
+ "column-rule-edge-inset-end",
1767
+ "column-rule-interior-inset-end"
1768
+ ],
1769
+ "name": "column-rule-inset-end"
1770
+ },
1771
+ {
1772
+ "longhands": [
1773
+ "column-rule-edge-inset-start",
1774
+ "column-rule-interior-inset-start"
1775
+ ],
1776
+ "name": "column-rule-inset-start"
1777
+ },
1764
1778
  {
1765
1779
  "longhands": [
1766
1780
  "column-rule-interior-inset-start",
@@ -3808,6 +3822,20 @@ export const generatedProperties = [
3808
3822
  ],
3809
3823
  "name": "row-rule-inset"
3810
3824
  },
3825
+ {
3826
+ "longhands": [
3827
+ "row-rule-edge-inset-end",
3828
+ "row-rule-interior-inset-end"
3829
+ ],
3830
+ "name": "row-rule-inset-end"
3831
+ },
3832
+ {
3833
+ "longhands": [
3834
+ "row-rule-edge-inset-start",
3835
+ "row-rule-interior-inset-start"
3836
+ ],
3837
+ "name": "row-rule-inset-start"
3838
+ },
3811
3839
  {
3812
3840
  "longhands": [
3813
3841
  "row-rule-interior-inset-start",
@@ -3929,6 +3957,24 @@ export const generatedProperties = [
3929
3957
  ],
3930
3958
  "name": "rule-inset"
3931
3959
  },
3960
+ {
3961
+ "longhands": [
3962
+ "column-rule-edge-inset-end",
3963
+ "column-rule-interior-inset-end",
3964
+ "row-rule-edge-inset-end",
3965
+ "row-rule-interior-inset-end"
3966
+ ],
3967
+ "name": "rule-inset-end"
3968
+ },
3969
+ {
3970
+ "longhands": [
3971
+ "column-rule-edge-inset-start",
3972
+ "column-rule-interior-inset-start",
3973
+ "row-rule-edge-inset-start",
3974
+ "row-rule-interior-inset-start"
3975
+ ],
3976
+ "name": "rule-inset-start"
3977
+ },
3932
3978
  {
3933
3979
  "longhands": [
3934
3980
  "row-rule-interior-inset-start",
@@ -164,6 +164,10 @@ export namespace ProtocolMapping {
164
164
  * Fired when a node's scrollability state changes.
165
165
  */
166
166
  'DOM.scrollableFlagUpdated': [Protocol.DOM.ScrollableFlagUpdatedEvent];
167
+ /**
168
+ * Fired when a node's ad related state changes.
169
+ */
170
+ 'DOM.adRelatedStateUpdated': [Protocol.DOM.AdRelatedStateUpdatedEvent];
167
171
  /**
168
172
  * Fired when a node's starting styles changes.
169
173
  */
@@ -1405,6 +1405,11 @@ declare namespace ProtocolProxyApi {
1405
1405
  */
1406
1406
  scrollableFlagUpdated(params: Protocol.DOM.ScrollableFlagUpdatedEvent): void;
1407
1407
 
1408
+ /**
1409
+ * Fired when a node's ad related state changes.
1410
+ */
1411
+ adRelatedStateUpdated(params: Protocol.DOM.AdRelatedStateUpdatedEvent): void;
1412
+
1408
1413
  /**
1409
1414
  * Fired when a node's starting styles changes.
1410
1415
  */
@@ -4736,6 +4736,7 @@ export namespace DOM {
4736
4736
  isScrollable?: boolean;
4737
4737
  affectedByStartingStyles?: boolean;
4738
4738
  adoptedStyleSheets?: StyleSheetId[];
4739
+ isAdRelated?: boolean;
4739
4740
  }
4740
4741
 
4741
4742
  /**
@@ -5793,6 +5794,20 @@ export namespace DOM {
5793
5794
  isScrollable: boolean;
5794
5795
  }
5795
5796
 
5797
+ /**
5798
+ * Fired when a node's ad related state changes.
5799
+ */
5800
+ export interface AdRelatedStateUpdatedEvent {
5801
+ /**
5802
+ * The id of the node.
5803
+ */
5804
+ nodeId: DOM.NodeId;
5805
+ /**
5806
+ * If the node is ad related.
5807
+ */
5808
+ isAdRelated: boolean;
5809
+ }
5810
+
5796
5811
  /**
5797
5812
  * Fired when a node's starting styles changes.
5798
5813
  */
@@ -7012,6 +7027,7 @@ export namespace Emulation {
7012
7027
  */
7013
7028
  export const enum DisabledImageType {
7014
7029
  Avif = 'avif',
7030
+ Jxl = 'jxl',
7015
7031
  Webp = 'webp',
7016
7032
  }
7017
7033
 
@@ -11603,6 +11619,30 @@ export namespace Network {
11603
11619
  SessionDeletedDuringRefresh = 'SessionDeletedDuringRefresh',
11604
11620
  }
11605
11621
 
11622
+ /**
11623
+ * Details about a failed device bound session network request.
11624
+ */
11625
+ export interface DeviceBoundSessionFailedRequest {
11626
+ /**
11627
+ * The failed request URL.
11628
+ */
11629
+ requestUrl: string;
11630
+ /**
11631
+ * The net error of the response if it was not OK.
11632
+ */
11633
+ netError?: string;
11634
+ /**
11635
+ * The response code if the net error was OK and the response code was not
11636
+ * 200.
11637
+ */
11638
+ responseError?: integer;
11639
+ /**
11640
+ * The body of the response if the net error was OK, the response code was
11641
+ * not 200, and the response body was not empty.
11642
+ */
11643
+ responseErrorBody?: string;
11644
+ }
11645
+
11606
11646
  /**
11607
11647
  * Session event details specific to creation.
11608
11648
  */
@@ -11616,6 +11656,11 @@ export namespace Network {
11616
11656
  * all successful creation events.
11617
11657
  */
11618
11658
  newSession?: DeviceBoundSession;
11659
+ /**
11660
+ * Details about a failed device bound session network request if there was
11661
+ * one.
11662
+ */
11663
+ failedRequest?: DeviceBoundSessionFailedRequest;
11619
11664
  }
11620
11665
 
11621
11666
  export const enum RefreshEventDetailsRefreshResult {
@@ -11649,6 +11694,11 @@ export namespace Network {
11649
11694
  * See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.
11650
11695
  */
11651
11696
  wasFullyProactiveRefresh: boolean;
11697
+ /**
11698
+ * Details about a failed device bound session network request if there was
11699
+ * one.
11700
+ */
11701
+ failedRequest?: DeviceBoundSessionFailedRequest;
11652
11702
  }
11653
11703
 
11654
11704
  export const enum TerminationEventDetailsDeletionReason {
@@ -286,6 +286,19 @@ export class AiConversation {
286
286
  }
287
287
 
288
288
  this.#type = type;
289
+
290
+ // We need to filter out the function calls
291
+ // as the LLM tries to call the existing ones.
292
+ const history =
293
+ this.#agent?.history
294
+ .map(content => {
295
+ return {
296
+ ...content,
297
+ parts: content.parts.filter(part => !('functionCall' in part) && !('functionResponse' in part)),
298
+ };
299
+ })
300
+ .filter(content => content.parts.length > 0);
301
+
289
302
  const options = {
290
303
  aidaClient: this.#aidaClient,
291
304
  serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
@@ -294,6 +307,7 @@ export class AiConversation {
294
307
  performanceRecordAndReload: this.#performanceRecordAndReload,
295
308
  onInspectElement: this.#onInspectElement,
296
309
  networkTimeCalculator: this.#networkTimeCalculator,
310
+ history,
297
311
  };
298
312
  switch (type) {
299
313
  case ConversationType.STYLING: {
@@ -404,6 +418,12 @@ Time: ${micros(time)}`;
404
418
  multimodalInput?: MultimodalInput,
405
419
  } = {},
406
420
  ): AsyncGenerator<ResponseData, void, void> {
421
+ if (this.isBlockedByOrigin) {
422
+ // This error should not be reached. If it happens, some
423
+ // invariants do not hold anymore.
424
+ throw new Error('cross-origin context data should not be included');
425
+ }
426
+
407
427
  const userQuery: UserQuery = {
408
428
  type: ResponseType.USER_QUERY,
409
429
  query: initialQuery,
@@ -141,6 +141,7 @@ export interface AgentOptions {
141
141
  sessionId?: string;
142
142
  confirmSideEffectForTest?: typeof Promise.withResolvers;
143
143
  onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
144
+ history?: Host.AidaClient.Content[];
144
145
  }
145
146
 
146
147
  export interface ParsedAnswer {
@@ -311,7 +312,7 @@ export abstract class AiAgent<T> {
311
312
  */
312
313
  protected context?: ConversationContext<T>;
313
314
 
314
- #history: Host.AidaClient.Content[] = [];
315
+ #history: Host.AidaClient.Content[];
315
316
 
316
317
  #facts: Set<Host.AidaClient.RequestFact> = new Set<Host.AidaClient.RequestFact>();
317
318
 
@@ -326,6 +327,7 @@ export abstract class AiAgent<T> {
326
327
  }
327
328
  this.#sessionId = opts.sessionId ?? crypto.randomUUID();
328
329
  this.confirmSideEffect = opts.confirmSideEffectForTest ?? (() => Promise.withResolvers());
330
+ this.#history = opts.history ?? [];
329
331
  }
330
332
 
331
333
  async enhanceQuery(query: string, selected: ConversationContext<T>|null, multimodalInputType?: MultimodalInputType):
@@ -338,6 +340,10 @@ export abstract class AiAgent<T> {
338
340
  return this.#facts;
339
341
  }
340
342
 
343
+ get history(): Host.AidaClient.Content[] {
344
+ return [...this.#history];
345
+ }
346
+
341
347
  /**
342
348
  * Add a fact which will be sent for any subsequent requests.
343
349
  * Returns the new list of all facts.
@@ -72,7 +72,7 @@ Content:
72
72
  },
73
73
  {
74
74
  "name": "selectSourceFile",
75
- "description": "Selects a source file. Use this when asked about files on the page.",
75
+ "description": "Selects a source file. Use this when asked about files on the page. Use listSourceFiles if you don't know the full path name.",
76
76
  "parameters": {
77
77
  "type": 6,
78
78
  "description": "",
@@ -83,7 +83,7 @@ Content:
83
83
  "properties": {
84
84
  "name": {
85
85
  "type": 1,
86
- "description": "The name of the file you want to select.",
86
+ "description": "The full path name of the file you want to select.",
87
87
  "nullable": false
88
88
  }
89
89
  }