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.
- package/docs/ui_engineering.md +2 -2
- package/front_end/core/common/AppProvider.ts +1 -2
- package/front_end/core/common/Color.ts +19 -20
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/Progress.ts +5 -5
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +38 -0
- package/front_end/core/sdk/CSSRule.ts +4 -9
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/CookieModel.ts +0 -1
- package/front_end/core/sdk/DOMModel.ts +42 -6
- package/front_end/core/sdk/EmulationModel.ts +3 -3
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +11 -6
- package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
- package/front_end/core/sdk/PreloadingModel.ts +15 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/SourceMapManager.ts +1 -2
- package/front_end/entrypoint_template.html +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
- package/front_end/entrypoints/main/main-meta.ts +0 -3
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- package/front_end/generated/SupportedCSSProperties.js +46 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +50 -0
- package/front_end/models/ai_assistance/AiConversation.ts +20 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
- package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -3
- package/front_end/models/emulation/EmulatedDevices.ts +0 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/har/Log.ts +2 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -21
- package/front_end/models/logs/NetworkLog.ts +0 -2
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
- package/front_end/models/text_utils/TextUtils.ts +0 -9
- package/front_end/models/trace/LanternComputationData.ts +1 -6
- package/front_end/models/trace/helpers/Trace.ts +1 -4
- package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -26
- package/front_end/panels/application/BackgroundServiceView.ts +0 -2
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
- package/front_end/panels/application/IndexedDBViews.ts +19 -23
- package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +3 -3
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +3 -4
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
- package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +4 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +32 -32
- package/front_end/panels/elements/ElementsPanel.ts +12 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -1
- package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
- package/front_end/panels/elements/MarkerDecorator.ts +0 -2
- package/front_end/panels/elements/PropertiesWidget.ts +62 -61
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -20
- package/front_end/panels/elements/StylesSidebarPane.ts +25 -90
- package/front_end/panels/elements/elementsPanel.css +6 -2
- package/front_end/panels/emulation/emulation-meta.ts +0 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
- package/front_end/panels/media/EventDisplayTable.ts +0 -2
- package/front_end/panels/media/PlayerMessagesView.ts +4 -6
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
- package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +113 -128
- package/front_end/panels/network/RequestInitiatorView.ts +74 -69
- package/front_end/panels/network/RequestPayloadView.ts +6 -3
- package/front_end/panels/network/ResourceChunkView.ts +0 -2
- package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
- package/front_end/panels/network/network-meta.ts +0 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
- package/front_end/panels/profiler/ProfileView.ts +0 -35
- package/front_end/panels/profiler/profiler-meta.ts +0 -1
- package/front_end/panels/recorder/components/StepView.ts +0 -1
- package/front_end/panels/screencast/ScreencastView.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +3 -2
- package/front_end/panels/security/SecurityPanel.ts +0 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -2
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
- package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +0 -3
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
- package/front_end/panels/sources/sources-meta.ts +0 -9
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
- package/front_end/panels/timeline/TimelinePanel.ts +0 -7
- package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
- package/front_end/panels/timeline/utils/Treemap.ts +0 -4
- package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
- package/front_end/ui/legacy/ContextMenu.ts +1 -17
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/Fragment.ts +2 -4
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +16 -9
- package/front_end/ui/legacy/UIUtils.ts +1 -4
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +32 -28
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -6
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +0 -2
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -191,23 +191,27 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
191
191
|
displayInfoFromArgs: () => {
|
|
192
192
|
return {
|
|
193
193
|
title: lockedString('Listing source requests…'),
|
|
194
|
-
action: '
|
|
194
|
+
action: 'listSourceFiles()',
|
|
195
195
|
};
|
|
196
196
|
},
|
|
197
197
|
handler: async () => {
|
|
198
|
-
|
|
198
|
+
// We get multiple of the same file name
|
|
199
|
+
// so we create a set and the pick based
|
|
200
|
+
// on heuristics in the select function
|
|
201
|
+
const files = new Set();
|
|
199
202
|
for (const file of this.#getUISourceCodes()) {
|
|
200
|
-
files.
|
|
203
|
+
files.add(file.fullDisplayName());
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
return {
|
|
204
|
-
result: files,
|
|
207
|
+
result: [...files],
|
|
205
208
|
};
|
|
206
209
|
},
|
|
207
210
|
});
|
|
208
211
|
|
|
209
212
|
this.declareFunction<{name: string}>('selectSourceFile', {
|
|
210
|
-
description:
|
|
213
|
+
description:
|
|
214
|
+
`Selects a source file. Use this when asked about files on the page. Use listSourceFiles if you don't know the full path name.`,
|
|
211
215
|
parameters: {
|
|
212
216
|
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
213
217
|
description: '',
|
|
@@ -216,7 +220,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
216
220
|
properties: {
|
|
217
221
|
name: {
|
|
218
222
|
type: Host.AidaClient.ParametersTypes.STRING,
|
|
219
|
-
description: 'The name of the file you want to select.',
|
|
223
|
+
description: 'The full path name of the file you want to select.',
|
|
220
224
|
nullable: false,
|
|
221
225
|
},
|
|
222
226
|
},
|
|
@@ -228,17 +232,21 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
228
232
|
};
|
|
229
233
|
},
|
|
230
234
|
handler: async params => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
// In some cases we get multiple files
|
|
236
|
+
// use the heuristics bellow to pick the better one
|
|
237
|
+
const files = this.#getUISourceCodes().filter(file => file.fullDisplayName() === params.name);
|
|
238
|
+
|
|
239
|
+
if (files.length === 0) {
|
|
240
|
+
return {
|
|
241
|
+
error: 'Unable to find file.',
|
|
242
|
+
};
|
|
238
243
|
}
|
|
239
244
|
|
|
245
|
+
// This help us pick the file that is resolved source map.
|
|
246
|
+
const file = files.find(f => f.contentType().isFromSourceMap()) ?? files[0];
|
|
240
247
|
return {
|
|
241
|
-
|
|
248
|
+
context: new FileContext(file),
|
|
249
|
+
description: 'User selected a source file',
|
|
242
250
|
};
|
|
243
251
|
},
|
|
244
252
|
});
|
|
@@ -307,22 +315,16 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
307
315
|
});
|
|
308
316
|
}
|
|
309
317
|
|
|
310
|
-
#getUISourceCodes = ():
|
|
318
|
+
#getUISourceCodes = (): Workspace.UISourceCode.UISourceCode[] => {
|
|
311
319
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
312
|
-
const projects =
|
|
313
|
-
|
|
314
|
-
case Workspace.Workspace.projectTypes.Network:
|
|
315
|
-
case Workspace.Workspace.projectTypes.FileSystem:
|
|
316
|
-
case Workspace.Workspace.projectTypes.ConnectableFileSystem:
|
|
317
|
-
return true;
|
|
318
|
-
|
|
319
|
-
default:
|
|
320
|
-
return false;
|
|
321
|
-
}
|
|
322
|
-
});
|
|
320
|
+
const projects =
|
|
321
|
+
workspace.projects().filter(project => project.type() === Workspace.Workspace.projectTypes.Network);
|
|
323
322
|
const uiSourceCodes = [];
|
|
324
323
|
for (const project of projects) {
|
|
325
324
|
for (const uiSourceCode of project.uiSourceCodes()) {
|
|
325
|
+
if (uiSourceCode.isIgnoreListed()) {
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
326
328
|
uiSourceCodes.push(uiSourceCode);
|
|
327
329
|
}
|
|
328
330
|
}
|
|
@@ -434,7 +434,7 @@ export class DebuggerLanguagePluginManager implements
|
|
|
434
434
|
private async evaluateOnCallFrame(
|
|
435
435
|
callFrame: SDK.DebuggerModel.CallFrame, options: SDK.RuntimeModel.EvaluationOptions): Promise<{
|
|
436
436
|
object: SDK.RemoteObject.RemoteObject,
|
|
437
|
-
exceptionDetails
|
|
437
|
+
exceptionDetails?: Protocol.Runtime.ExceptionDetails,
|
|
438
438
|
}|{
|
|
439
439
|
error: string,
|
|
440
440
|
}|null> {
|
|
@@ -460,9 +460,9 @@ export class DebuggerLanguagePluginManager implements
|
|
|
460
460
|
try {
|
|
461
461
|
const object = await plugin.evaluate(expression, location, this.stopIdForCallFrame(callFrame));
|
|
462
462
|
if (object) {
|
|
463
|
-
return {object: await wrapRemoteObject(callFrame, object, plugin)
|
|
463
|
+
return {object: await wrapRemoteObject(callFrame, object, plugin)};
|
|
464
464
|
}
|
|
465
|
-
return {object: new SDK.RemoteObject.LocalJSONObject(undefined)
|
|
465
|
+
return {object: new SDK.RemoteObject.LocalJSONObject(undefined)};
|
|
466
466
|
} catch (error) {
|
|
467
467
|
if (error instanceof FormattingError) {
|
|
468
468
|
const {exception: object, exceptionDetails} = error;
|
|
@@ -794,14 +794,12 @@ export class DebuggerLanguagePluginManager implements
|
|
|
794
794
|
if (uiLocation) {
|
|
795
795
|
return {
|
|
796
796
|
uiSourceCode: uiLocation.uiSourceCode,
|
|
797
|
-
url: undefined,
|
|
798
797
|
name,
|
|
799
798
|
line: uiLocation.lineNumber,
|
|
800
799
|
column: uiLocation.columnNumber ?? -1,
|
|
801
800
|
};
|
|
802
801
|
}
|
|
803
802
|
return {
|
|
804
|
-
uiSourceCode: undefined,
|
|
805
803
|
url: fallback.url,
|
|
806
804
|
name: fallback.functionName,
|
|
807
805
|
line: fallback.lineNumber,
|
|
@@ -176,7 +176,8 @@ export const enum Events {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
export type CSSModelChangedEvent = SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|SDK.CSSModel.StyleSheetChangedEvent|
|
|
179
|
-
SDK.CSSModel.PseudoStateForcedEvent|SDK.DOMModel.DOMNode|
|
|
179
|
+
SDK.CSSModel.PseudoStateForcedEvent|SDK.DOMModel.DOMNode|
|
|
180
|
+
SDK.CSSModel.ComputedStyleUpdatedEvent|null|void;
|
|
180
181
|
|
|
181
182
|
export interface EventTypes {
|
|
182
183
|
[Events.CSS_MODEL_CHANGED]: CSSModelChangedEvent;
|
|
@@ -700,9 +700,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
700
700
|
positionX,
|
|
701
701
|
positionY,
|
|
702
702
|
dontSetVisibleSize: true,
|
|
703
|
-
displayFeature: undefined,
|
|
704
|
-
devicePosture: undefined,
|
|
705
|
-
screenOrientation: undefined,
|
|
706
703
|
};
|
|
707
704
|
if (displayFeature) {
|
|
708
705
|
metrics.displayFeature = displayFeature;
|
|
@@ -385,7 +385,7 @@ declare global {
|
|
|
385
385
|
injectedScriptId: number, targetWindow?: Window) => void;
|
|
386
386
|
buildExtensionAPIInjectedScript(
|
|
387
387
|
extensionInfo: ExtensionDescriptor, inspectedTabId: string, themeName: string, keysToForward: number[],
|
|
388
|
-
testHook
|
|
388
|
+
testHook?: (extensionServer: unknown, extensionAPI: unknown) => unknown): string;
|
|
389
389
|
chrome: PublicAPI.Chrome.DevTools.Chrome;
|
|
390
390
|
webInspector?: APIImpl.InspectorExtensionAPI;
|
|
391
391
|
}
|
|
@@ -432,7 +432,7 @@ namespace APIImpl {
|
|
|
432
432
|
export interface EventSink<ListenerT extends Callable> extends PublicAPI.Chrome.DevTools.EventSink<ListenerT> {
|
|
433
433
|
_type: string;
|
|
434
434
|
_listeners: ListenerT[];
|
|
435
|
-
_customDispatch
|
|
435
|
+
_customDispatch?: (this: EventSink<ListenerT>, request: {arguments: unknown[]}) => unknown;
|
|
436
436
|
|
|
437
437
|
_fire(..._vararg: Parameters<ListenerT>): void;
|
|
438
438
|
_dispatch(request: {arguments: unknown[]}): void;
|
|
@@ -162,7 +162,6 @@ export class Importer {
|
|
|
162
162
|
const includedRequestCookies = entry.request.cookies.map(
|
|
163
163
|
cookie => ({
|
|
164
164
|
cookie: this.fillCookieFromHARCookie(SDK.Cookie.Type.REQUEST, cookie),
|
|
165
|
-
exemptionReason: undefined,
|
|
166
165
|
}),
|
|
167
166
|
);
|
|
168
167
|
request.setIncludedRequestCookies(includedRequestCookies);
|
|
@@ -120,15 +120,11 @@ export class Entry {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const entry: EntryDTO = {
|
|
123
|
-
_connectionId: undefined,
|
|
124
|
-
_fromCache: undefined,
|
|
125
123
|
_initiator: exportedInitiator,
|
|
126
124
|
_priority: harEntry.request.priority(),
|
|
127
125
|
_resourceType: harEntry.request.resourceType().name(),
|
|
128
|
-
_webSocketMessages: undefined,
|
|
129
126
|
cache: {},
|
|
130
127
|
connection,
|
|
131
|
-
pageref: undefined,
|
|
132
128
|
request: await harEntry.buildRequest(),
|
|
133
129
|
response: harEntry.buildResponse(),
|
|
134
130
|
// IPv6 address should not have square brackets per (https://tools.ietf.org/html/rfc2373#section-2.2).
|
|
@@ -195,7 +191,6 @@ export class Entry {
|
|
|
195
191
|
this.request.includedRequestCookies().map(includedRequestCookie => includedRequestCookie.cookie)),
|
|
196
192
|
headersSize: headersText ? headersText.length : -1,
|
|
197
193
|
bodySize: await this.requestBodySize(),
|
|
198
|
-
postData: undefined,
|
|
199
194
|
};
|
|
200
195
|
const postData = await this.buildPostData();
|
|
201
196
|
if (postData) {
|
|
@@ -232,11 +227,10 @@ export class Entry {
|
|
|
232
227
|
}
|
|
233
228
|
|
|
234
229
|
private buildContent(): Content {
|
|
235
|
-
const content =
|
|
230
|
+
const content: Content = {
|
|
236
231
|
size: this.request.resourceSize,
|
|
237
232
|
mimeType: this.request.mimeType || 'x-unknown',
|
|
238
|
-
|
|
239
|
-
} as Content);
|
|
233
|
+
};
|
|
240
234
|
const compression = this.responseCompression;
|
|
241
235
|
if (typeof compression === 'number') {
|
|
242
236
|
content.compression = compression;
|
|
@@ -261,7 +255,6 @@ export class Entry {
|
|
|
261
255
|
wait: 0,
|
|
262
256
|
receive: 0,
|
|
263
257
|
_blocked_queueing: -1,
|
|
264
|
-
_blocked_proxy: undefined,
|
|
265
258
|
};
|
|
266
259
|
|
|
267
260
|
const queuedTime = (issueTime < startTime) ? startTime - issueTime : -1;
|
|
@@ -373,8 +366,6 @@ export class Entry {
|
|
|
373
366
|
expires: cookie.expiresDate(Log.pseudoWallTime(this.request, this.request.startTime)),
|
|
374
367
|
httpOnly: cookie.httpOnly(),
|
|
375
368
|
secure: cookie.secure(),
|
|
376
|
-
sameSite: undefined,
|
|
377
|
-
partitionKey: undefined,
|
|
378
369
|
};
|
|
379
370
|
if (cookie.sameSite()) {
|
|
380
371
|
c.sameSite = cookie.sameSite();
|
|
@@ -6551,14 +6551,6 @@ export const NativeFunctions = [
|
|
|
6551
6551
|
name: "timeout",
|
|
6552
6552
|
signatures: [["milliseconds"]]
|
|
6553
6553
|
},
|
|
6554
|
-
{
|
|
6555
|
-
name: "AttributePart",
|
|
6556
|
-
signatures: [["root","element","localName","?init"]]
|
|
6557
|
-
},
|
|
6558
|
-
{
|
|
6559
|
-
name: "ChildNodePart",
|
|
6560
|
-
signatures: [["root","previousSibling","nextSibling","?init"]]
|
|
6561
|
-
},
|
|
6562
6554
|
{
|
|
6563
6555
|
name: "Comment",
|
|
6564
6556
|
signatures: [["?data"]]
|
|
@@ -6623,10 +6615,6 @@ export const NativeFunctions = [
|
|
|
6623
6615
|
name: "Event",
|
|
6624
6616
|
signatures: [["type","?eventInitDict"]]
|
|
6625
6617
|
},
|
|
6626
|
-
{
|
|
6627
|
-
name: "getValueRange",
|
|
6628
|
-
signatures: [["start","end"]]
|
|
6629
|
-
},
|
|
6630
6618
|
{
|
|
6631
6619
|
name: "getBoxQuads",
|
|
6632
6620
|
signatures: [["?options"]]
|
|
@@ -6647,10 +6635,6 @@ export const NativeFunctions = [
|
|
|
6647
6635
|
name: "MutationObserver",
|
|
6648
6636
|
signatures: [["callback"]]
|
|
6649
6637
|
},
|
|
6650
|
-
{
|
|
6651
|
-
name: "NodePart",
|
|
6652
|
-
signatures: [["root","node","?init"]]
|
|
6653
|
-
},
|
|
6654
6638
|
{
|
|
6655
6639
|
name: "Observable",
|
|
6656
6640
|
signatures: [["callback"]]
|
|
@@ -6683,6 +6667,10 @@ export const NativeFunctions = [
|
|
|
6683
6667
|
name: "last",
|
|
6684
6668
|
signatures: [["?options"]]
|
|
6685
6669
|
},
|
|
6670
|
+
{
|
|
6671
|
+
name: "getValueRange",
|
|
6672
|
+
signatures: [["start","end"]]
|
|
6673
|
+
},
|
|
6686
6674
|
{
|
|
6687
6675
|
name: "moveBefore",
|
|
6688
6676
|
signatures: [["node","child"]]
|
|
@@ -6801,10 +6789,6 @@ export const NativeFunctions = [
|
|
|
6801
6789
|
name: "MouseEvent",
|
|
6802
6790
|
signatures: [["type","?eventInitDict"]]
|
|
6803
6791
|
},
|
|
6804
|
-
{
|
|
6805
|
-
name: "OverscrollEvent",
|
|
6806
|
-
signatures: [["type","bubbles","?eventInitDict"]]
|
|
6807
|
-
},
|
|
6808
6792
|
{
|
|
6809
6793
|
name: "PageTransitionEvent",
|
|
6810
6794
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -8948,7 +8932,7 @@ export const NativeFunctions = [
|
|
|
8948
8932
|
},
|
|
8949
8933
|
{
|
|
8950
8934
|
name: "framebufferTexturePixelLocalStorageWEBGL",
|
|
8951
|
-
signatures: [["plane","texture","level","layer"]]
|
|
8935
|
+
signatures: [["plane","texture","level","layer","usage"]]
|
|
8952
8936
|
},
|
|
8953
8937
|
{
|
|
8954
8938
|
name: "framebufferPixelLocalClearValuefvWEBGL",
|
|
@@ -159,7 +159,6 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
159
159
|
initiatorInfo = {
|
|
160
160
|
info: null,
|
|
161
161
|
chain: null,
|
|
162
|
-
request: undefined,
|
|
163
162
|
};
|
|
164
163
|
this.#initiatorData.set(request, initiatorInfo);
|
|
165
164
|
return initiatorInfo;
|
|
@@ -170,7 +169,6 @@ export class NetworkLog extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
|
|
|
170
169
|
const initiatorInfo: InitiatorData = existingInitiatorData || {
|
|
171
170
|
info: null,
|
|
172
171
|
chain: null,
|
|
173
|
-
request: undefined,
|
|
174
172
|
};
|
|
175
173
|
|
|
176
174
|
let type = SDK.NetworkRequest.InitiatorType.OTHER;
|
|
@@ -212,7 +212,10 @@ export class NetworkTimeCalculator extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
212
212
|
const leftLabel = hasLatency ? i18n.TimeUtilities.secondsToString(request.latency) : rightLabel;
|
|
213
213
|
|
|
214
214
|
if (request.timing) {
|
|
215
|
-
return {
|
|
215
|
+
return {
|
|
216
|
+
left: leftLabel,
|
|
217
|
+
right: rightLabel,
|
|
218
|
+
};
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
let tooltip;
|
|
@@ -107,14 +107,11 @@ export class FilterParser {
|
|
|
107
107
|
if (this.keys.indexOf((parsedKey as string)) !== -1) {
|
|
108
108
|
parsedFilters.push({
|
|
109
109
|
key: parsedKey,
|
|
110
|
-
regex: undefined,
|
|
111
110
|
text: parsedValue,
|
|
112
111
|
negative: Boolean(startsWithMinus),
|
|
113
112
|
});
|
|
114
113
|
} else {
|
|
115
114
|
parsedFilters.push({
|
|
116
|
-
key: undefined,
|
|
117
|
-
regex: undefined,
|
|
118
115
|
text: `${parsedKey}:${parsedValue}`,
|
|
119
116
|
negative: Boolean(startsWithMinus),
|
|
120
117
|
});
|
|
@@ -124,15 +121,11 @@ export class FilterParser {
|
|
|
124
121
|
const parsedRegex = captureGroups[1];
|
|
125
122
|
try {
|
|
126
123
|
parsedFilters.push({
|
|
127
|
-
key: undefined,
|
|
128
124
|
regex: new RegExp((parsedRegex as string), 'im'),
|
|
129
|
-
text: undefined,
|
|
130
125
|
negative: Boolean(startsWithMinus),
|
|
131
126
|
});
|
|
132
127
|
} catch {
|
|
133
128
|
parsedFilters.push({
|
|
134
|
-
key: undefined,
|
|
135
|
-
regex: undefined,
|
|
136
129
|
text: `/${parsedRegex}/`,
|
|
137
130
|
negative: Boolean(startsWithMinus),
|
|
138
131
|
});
|
|
@@ -141,8 +134,6 @@ export class FilterParser {
|
|
|
141
134
|
const startsWithMinus = captureGroups[0];
|
|
142
135
|
const parsedText = captureGroups[1];
|
|
143
136
|
parsedFilters.push({
|
|
144
|
-
key: undefined,
|
|
145
|
-
regex: undefined,
|
|
146
137
|
text: parsedText,
|
|
147
138
|
negative: Boolean(startsWithMinus),
|
|
148
139
|
});
|
|
@@ -193,12 +193,7 @@ function createLanternRequest(
|
|
|
193
193
|
priority: request.args.data.priority,
|
|
194
194
|
frameId: request.args.data.frame,
|
|
195
195
|
fromWorker,
|
|
196
|
-
serverResponseTime: request.args.data.lrServerResponseTime
|
|
197
|
-
// Set later.
|
|
198
|
-
redirects: undefined,
|
|
199
|
-
redirectSource: undefined,
|
|
200
|
-
redirectDestination: undefined,
|
|
201
|
-
initiatorRequest: undefined,
|
|
196
|
+
serverResponseTime: request.args.data.lrServerResponseTime,
|
|
202
197
|
};
|
|
203
198
|
}
|
|
204
199
|
|
|
@@ -615,10 +615,7 @@ function getRawLineAndColumnNumbersForEvent(event: Types.Events.Event): {
|
|
|
615
615
|
columnNumber?: number,
|
|
616
616
|
} {
|
|
617
617
|
if (!event.args?.data) {
|
|
618
|
-
return {
|
|
619
|
-
lineNumber: undefined,
|
|
620
|
-
columnNumber: undefined,
|
|
621
|
-
};
|
|
618
|
+
return {};
|
|
622
619
|
}
|
|
623
620
|
let lineNumber: number|undefined = undefined;
|
|
624
621
|
let columnNumber: number|undefined = undefined;
|
|
@@ -115,20 +115,20 @@ export interface NetworkRequest<T = AnyNetworkObject> {
|
|
|
115
115
|
failed: boolean;
|
|
116
116
|
statusCode: number;
|
|
117
117
|
/** The network request that redirected to this one */
|
|
118
|
-
redirectSource
|
|
118
|
+
redirectSource?: NetworkRequest<T>;
|
|
119
119
|
/** The network request that this one redirected to */
|
|
120
|
-
redirectDestination
|
|
120
|
+
redirectDestination?: NetworkRequest<T>;
|
|
121
121
|
// TODO: can't use Protocol.Network.Initiator because of type mismatch in Lighthouse initiator.
|
|
122
122
|
initiator: {
|
|
123
123
|
type: InitiatorType,
|
|
124
124
|
url?: string,
|
|
125
125
|
stack?: CallStack,
|
|
126
126
|
};
|
|
127
|
-
initiatorRequest
|
|
127
|
+
initiatorRequest?: NetworkRequest<T>;
|
|
128
128
|
/** The chain of network requests that redirected to this one */
|
|
129
|
-
redirects
|
|
130
|
-
timing
|
|
131
|
-
resourceType
|
|
129
|
+
redirects?: NetworkRequest[]|undefined;
|
|
130
|
+
timing?: Protocol.Network.ResourceTiming;
|
|
131
|
+
resourceType?: ResourceType;
|
|
132
132
|
mimeType: string;
|
|
133
133
|
priority: ResourcePriority;
|
|
134
134
|
frameId: string|undefined;
|
|
@@ -315,14 +315,14 @@ export class AXNodePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
315
315
|
appendRelatedNode(relatedNode: Protocol.Accessibility.AXRelatedNode, _index: number): void {
|
|
316
316
|
const deferredNode =
|
|
317
317
|
new SDK.DOMModel.DeferredDOMNode(this.axNode.accessibilityModel().target(), relatedNode.backendDOMNodeId);
|
|
318
|
-
const nodeTreeElement = new AXRelatedNodeSourceTreeElement({deferredNode
|
|
318
|
+
const nodeTreeElement = new AXRelatedNodeSourceTreeElement({deferredNode}, relatedNode);
|
|
319
319
|
this.appendChild(nodeTreeElement);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
appendRelatedNodeInline(relatedNode: Protocol.Accessibility.AXRelatedNode): void {
|
|
323
323
|
const deferredNode =
|
|
324
324
|
new SDK.DOMModel.DeferredDOMNode(this.axNode.accessibilityModel().target(), relatedNode.backendDOMNodeId);
|
|
325
|
-
const linkedNode = new AXRelatedNodeElement({deferredNode
|
|
325
|
+
const linkedNode = new AXRelatedNodeElement({deferredNode});
|
|
326
326
|
this.listItemElement.appendChild(linkedNode.render());
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -440,9 +440,9 @@ export class AXValueSourceTreeElement extends AXNodePropertyTreeElement {
|
|
|
440
440
|
if (matchingNode) {
|
|
441
441
|
this.appendRelatedNodeWithIdref(matchingNode, idref);
|
|
442
442
|
} else if (idrefs.length === 1) {
|
|
443
|
-
this.listItemElement.appendChild(new AXRelatedNodeElement({
|
|
443
|
+
this.listItemElement.appendChild(new AXRelatedNodeElement({idref}).render());
|
|
444
444
|
} else {
|
|
445
|
-
this.appendChild(new AXRelatedNodeSourceTreeElement({
|
|
445
|
+
this.appendChild(new AXRelatedNodeSourceTreeElement({idref}));
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
@@ -591,8 +591,9 @@ export class AXRelatedNodeElement {
|
|
|
591
591
|
if (!node) {
|
|
592
592
|
return;
|
|
593
593
|
}
|
|
594
|
-
valueElement.appendChild(PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(
|
|
595
|
-
|
|
594
|
+
valueElement.appendChild(PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(node, {
|
|
595
|
+
preventKeyboardFocus: true,
|
|
596
|
+
}));
|
|
596
597
|
});
|
|
597
598
|
} else if (this.idref) {
|
|
598
599
|
element.classList.add('invalid');
|
|
@@ -275,9 +275,9 @@ async function getEmptyStateSuggestions(conversation?: AiAssistanceModel.AiConve
|
|
|
275
275
|
|
|
276
276
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.NONE: {
|
|
277
277
|
return [
|
|
278
|
-
{title: '
|
|
279
|
-
{title: 'What performance issues exist
|
|
280
|
-
{title: 'What are the slowest requests on this page?', jslogContext: 'empty'},
|
|
278
|
+
{title: 'What can you help me with?', jslogContext: 'empty'},
|
|
279
|
+
{title: 'What performance issues exist on the page?', jslogContext: 'empty'},
|
|
280
|
+
{title: 'What are the slowest network requests on this page?', jslogContext: 'empty'},
|
|
281
281
|
];
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -503,7 +503,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
503
503
|
#selectedRequest: AiAssistanceModel.NetworkAgent.RequestContext|null = null;
|
|
504
504
|
// Messages displayed in the `ChatView` component.
|
|
505
505
|
#messages: Message[] = [];
|
|
506
|
-
#isContextAutoSelectionSuspended = false;
|
|
507
506
|
|
|
508
507
|
// Whether the UI should show loading or not.
|
|
509
508
|
#isLoading = false;
|
|
@@ -703,13 +702,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
703
702
|
// If there already is an agent and if it is not empty,
|
|
704
703
|
// we don't automatically change the agent.
|
|
705
704
|
if (this.#conversation && !this.#conversation.isEmpty) {
|
|
706
|
-
// If the context selection agent is enabled,
|
|
707
|
-
// we update the context of the current agent.
|
|
708
|
-
const context = this.#getConversationContext(this.#getDefaultConversationType());
|
|
709
|
-
if (context && isAiAssistanceContextSelectionAgentEnabled()) {
|
|
710
|
-
this.#conversation?.setContext(context);
|
|
711
|
-
this.requestUpdate();
|
|
712
|
-
}
|
|
713
705
|
return;
|
|
714
706
|
}
|
|
715
707
|
|
|
@@ -758,13 +750,20 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
758
750
|
}
|
|
759
751
|
|
|
760
752
|
this.#conversation = conversation;
|
|
761
|
-
this.#isContextAutoSelectionSuspended = false;
|
|
762
753
|
}
|
|
763
754
|
|
|
764
|
-
if (
|
|
765
|
-
this.#conversation
|
|
766
|
-
|
|
767
|
-
|
|
755
|
+
if (this.#conversation) {
|
|
756
|
+
if (this.#conversation.isEmpty && isAiAssistanceContextSelectionAgentEnabled()) {
|
|
757
|
+
this.#conversation.setContext(this.#getConversationContext(this.#getDefaultConversationType()));
|
|
758
|
+
} else {
|
|
759
|
+
const context = this.#getConversationContext(this.#conversation.type);
|
|
760
|
+
// Don't reset to the context selection agent if
|
|
761
|
+
// we remove context automatically.
|
|
762
|
+
// Require explicit user action.
|
|
763
|
+
if (context || !isAiAssistanceContextSelectionAgentEnabled()) {
|
|
764
|
+
this.#conversation.setContext(context);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
768
767
|
}
|
|
769
768
|
|
|
770
769
|
this.requestUpdate();
|
|
@@ -1132,12 +1131,10 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1132
1131
|
|
|
1133
1132
|
#handleContextRemoved(): void {
|
|
1134
1133
|
this.#conversation?.setContext(null);
|
|
1135
|
-
this.#isContextAutoSelectionSuspended = true;
|
|
1136
1134
|
this.requestUpdate();
|
|
1137
1135
|
}
|
|
1138
1136
|
|
|
1139
1137
|
#handleContextAdd(): void {
|
|
1140
|
-
this.#isContextAutoSelectionSuspended = false;
|
|
1141
1138
|
this.#conversation?.setContext(this.#getConversationContext(this.#getDefaultConversationType()));
|
|
1142
1139
|
this.requestUpdate();
|
|
1143
1140
|
}
|
|
@@ -1159,7 +1156,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1159
1156
|
return;
|
|
1160
1157
|
}
|
|
1161
1158
|
|
|
1162
|
-
this.#isContextAutoSelectionSuspended = false;
|
|
1163
1159
|
let targetConversationType: AiAssistanceModel.AiHistoryStorage.ConversationType|undefined;
|
|
1164
1160
|
switch (actionId) {
|
|
1165
1161
|
case 'freestyler.elements-floating-button': {
|
|
@@ -1354,8 +1350,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1354
1350
|
this.#selectedPerformanceTrace = data;
|
|
1355
1351
|
}
|
|
1356
1352
|
|
|
1357
|
-
this.#isContextAutoSelectionSuspended = false;
|
|
1358
|
-
|
|
1359
1353
|
void VisualLogging.logFunctionCall(`context-change-${this.#conversation?.type}`);
|
|
1360
1354
|
|
|
1361
1355
|
this.requestUpdate();
|
|
@@ -1428,11 +1422,6 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1428
1422
|
const signal = this.#runAbortController.signal;
|
|
1429
1423
|
|
|
1430
1424
|
// If a different context is provided, it must be from the same origin.
|
|
1431
|
-
if (this.#conversation.isBlockedByOrigin) {
|
|
1432
|
-
// This error should not be reached. If it happens, some
|
|
1433
|
-
// invariants do not hold anymore.
|
|
1434
|
-
throw new Error('cross-origin context data should not be included');
|
|
1435
|
-
}
|
|
1436
1425
|
if (this.#conversation.isEmpty) {
|
|
1437
1426
|
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.STARTED_AI_CONVERSATION);
|
|
1438
1427
|
}
|
|
@@ -396,8 +396,6 @@ export class BackgroundServiceView extends UI.Widget.VBox {
|
|
|
396
396
|
const dataGrid = new DataGrid.DataGrid.DataGridImpl({
|
|
397
397
|
displayName: i18nString(UIStrings.backgroundServices),
|
|
398
398
|
columns,
|
|
399
|
-
refreshCallback: undefined,
|
|
400
|
-
deleteCallback: undefined,
|
|
401
399
|
});
|
|
402
400
|
dataGrid.setStriped(true);
|
|
403
401
|
|
|
@@ -146,7 +146,6 @@ export class DeviceBoundSessionsModel extends Common.ObjectWrapper.ObjectWrapper
|
|
|
146
146
|
let sessionAndEvent = sessionIdToSessionMap.get(sessionId);
|
|
147
147
|
if (!sessionAndEvent) {
|
|
148
148
|
sessionAndEvent = {
|
|
149
|
-
session: undefined,
|
|
150
149
|
isSessionTerminated: false,
|
|
151
150
|
hasErrors: false,
|
|
152
151
|
eventsById: new Map<string, EventWithTimestamp>()
|