chrome-devtools-frontend 1.0.1575635 → 1.0.1576287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/host/AidaClient.ts +21 -0
- package/front_end/core/sdk/NetworkManager.ts +3 -1
- package/front_end/core/sdk/NetworkRequest.ts +7 -0
- package/front_end/core/sdk/SourceMapScopesInfo.ts +2 -1
- package/front_end/generated/SupportedCSSProperties.js +7 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +6 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +6 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/source_map_scopes/NamesResolver.ts +5 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -2
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +22 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +44 -33
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +12 -4
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -5
- package/front_end/panels/network/NetworkItemView.ts +32 -3
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +160 -0
- package/front_end/panels/network/RequestPayloadView.ts +72 -97
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
- package/front_end/panels/network/network.ts +3 -0
- package/front_end/panels/network/requestDeviceBoundSessionsView.css +14 -0
- package/front_end/panels/settings/AISettingsTab.ts +2 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +7 -0
- package/front_end/panels/whats_new/resources/WNDT.md +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +9 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +8 -1
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +20 -7
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +29 -9
- package/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +1 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +12 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +37 -5
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
+
|
|
7
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import * as Protocol from '../../generated/protocol.js';
|
|
10
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
|
+
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
12
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
|
+
|
|
14
|
+
import requestDeviceBoundSessionsViewStyles from './requestDeviceBoundSessionsView.css.js';
|
|
15
|
+
|
|
16
|
+
const UIStrings = {
|
|
17
|
+
/**
|
|
18
|
+
* @description Heading for the ID of a session.
|
|
19
|
+
*/
|
|
20
|
+
sessionId: 'Session ID',
|
|
21
|
+
/**
|
|
22
|
+
* @description Heading for the decision on whether an HTTP request was deferred. (i.e. paused and
|
|
23
|
+
* later unpaused).
|
|
24
|
+
*/
|
|
25
|
+
deferralDecision: 'Deferral decision',
|
|
26
|
+
/**
|
|
27
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
28
|
+
* request was deferred (i.e. paused and later unpaused). The reasoning for the deferral
|
|
29
|
+
* is that there was a refresh.
|
|
30
|
+
*/
|
|
31
|
+
deferred: 'Deferred (Refresh)',
|
|
32
|
+
/**
|
|
33
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
34
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
35
|
+
* not being deferred is that there was a refresh attempted proactively.
|
|
36
|
+
*/
|
|
37
|
+
proactiveRefreshAttempted: 'Not deferred (Proactive refresh attempted)',
|
|
38
|
+
/**
|
|
39
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
40
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
41
|
+
* not being deferred is that while the HTTP request is in scope of a session, it was
|
|
42
|
+
* not possible to trigger a refresh proactively.
|
|
43
|
+
*/
|
|
44
|
+
proactiveRefreshNotPossible: 'Not deferred (Request is in scope of session but proactive refresh is not possible)',
|
|
45
|
+
/**
|
|
46
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
47
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
48
|
+
* not being deferred is that while the HTTP request is in scope of a session, the HTTP
|
|
49
|
+
* request's initiator is not allowed to trigger a refresh.
|
|
50
|
+
*/
|
|
51
|
+
inScopeRefreshNotAllowed:
|
|
52
|
+
'Not deferred (Request is in scope of session but initiator is not allowed to trigger refresh)',
|
|
53
|
+
/**
|
|
54
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
55
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
56
|
+
* not being deferred is that while the HTTP request is in scope of a session, the
|
|
57
|
+
* session's cookies are still present, so there is no need to trigger a refresh yet.
|
|
58
|
+
*/
|
|
59
|
+
inScopeRefreshNotYetNeeded: 'Not deferred (Request is in scope of session but cookies are still present)',
|
|
60
|
+
/**
|
|
61
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
62
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
63
|
+
* not being deferred is that the HTTP request is not in scope of a session.
|
|
64
|
+
*/
|
|
65
|
+
notInScope: 'Not deferred (Request is not in scope of session)',
|
|
66
|
+
} as const;
|
|
67
|
+
|
|
68
|
+
const str_ = i18n.i18n.registerUIStrings('panels/network/RequestDeviceBoundSessionsView.ts', UIStrings);
|
|
69
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
70
|
+
|
|
71
|
+
interface ViewInput {
|
|
72
|
+
deviceBoundSessionUsages: Protocol.Network.DeviceBoundSessionWithUsage[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type ViewOutput = object;
|
|
76
|
+
|
|
77
|
+
export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTMLElement): void => {
|
|
78
|
+
const {deviceBoundSessionUsages} = input;
|
|
79
|
+
|
|
80
|
+
render(
|
|
81
|
+
html`
|
|
82
|
+
<style>${UI.inspectorCommonStyles}</style>
|
|
83
|
+
<style>${requestDeviceBoundSessionsViewStyles}</style>
|
|
84
|
+
<div class="request-device-bound-sessions-view">
|
|
85
|
+
${
|
|
86
|
+
deviceBoundSessionUsages.length > 0 ? html`
|
|
87
|
+
<div class="device-bound-session-grid-wrapper">
|
|
88
|
+
<devtools-data-grid striped inline>
|
|
89
|
+
<table>
|
|
90
|
+
<thead>
|
|
91
|
+
<tr>
|
|
92
|
+
<th id="session-id" sortable>${i18nString(UIStrings.sessionId)}</th>
|
|
93
|
+
<th id="deferral-decision" sortable>${i18nString(UIStrings.deferralDecision)}</th>
|
|
94
|
+
</tr>
|
|
95
|
+
</thead>
|
|
96
|
+
<tbody>
|
|
97
|
+
${deviceBoundSessionUsages.map(session => html`
|
|
98
|
+
<tr>
|
|
99
|
+
<td>${session.sessionKey.id}</td>
|
|
100
|
+
<td>${getDeferralDecision(session.usage)}</td>
|
|
101
|
+
</tr>
|
|
102
|
+
`)}
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
105
|
+
</devtools-data-grid>
|
|
106
|
+
</div>
|
|
107
|
+
` :
|
|
108
|
+
nothing}
|
|
109
|
+
</div>
|
|
110
|
+
`,
|
|
111
|
+
target);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export class RequestDeviceBoundSessionsView extends UI.Widget.VBox {
|
|
115
|
+
#request: SDK.NetworkRequest.NetworkRequest;
|
|
116
|
+
#view: typeof DEFAULT_VIEW;
|
|
117
|
+
|
|
118
|
+
constructor(request: SDK.NetworkRequest.NetworkRequest, view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
|
|
119
|
+
super({jslog: `${VisualLogging.pane('device-bound-sessions-request')}`});
|
|
120
|
+
this.#request = request;
|
|
121
|
+
this.#view = view;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
override wasShown(): void {
|
|
125
|
+
super.wasShown();
|
|
126
|
+
this.#request.addEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.performUpdate, this);
|
|
127
|
+
this.performUpdate();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
override willHide(): void {
|
|
131
|
+
super.willHide();
|
|
132
|
+
this.#request.removeEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.performUpdate, this);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
override performUpdate(): void {
|
|
136
|
+
if (!this.isShowing()) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.#view({deviceBoundSessionUsages: this.#request.getDeviceBoundSessionUsages()}, {}, this.contentElement);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function getDeferralDecision(usage: Protocol.Network.DeviceBoundSessionWithUsageUsage): string {
|
|
144
|
+
switch (usage) {
|
|
145
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.NotInScope:
|
|
146
|
+
return i18nString(UIStrings.notInScope);
|
|
147
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.InScopeRefreshNotYetNeeded:
|
|
148
|
+
return i18nString(UIStrings.inScopeRefreshNotYetNeeded);
|
|
149
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.InScopeRefreshNotAllowed:
|
|
150
|
+
return i18nString(UIStrings.inScopeRefreshNotAllowed);
|
|
151
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.ProactiveRefreshNotPossible:
|
|
152
|
+
return i18nString(UIStrings.proactiveRefreshNotPossible);
|
|
153
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.ProactiveRefreshAttempted:
|
|
154
|
+
return i18nString(UIStrings.proactiveRefreshAttempted);
|
|
155
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.Deferred:
|
|
156
|
+
return i18nString(UIStrings.deferred);
|
|
157
|
+
default:
|
|
158
|
+
return usage;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2021 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
4
|
+
/* eslint-disable @devtools/no-imperative-dom-api,@devtools/no-lit-render-outside-of-view */
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
|
|
@@ -44,11 +44,13 @@ import objectPropertiesSectionStyles from '../../ui/legacy/components/object_ui/
|
|
|
44
44
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
45
45
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
46
46
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
47
|
+
import {Directives, html, type LitTemplate, render} from '../../ui/lit/lit.js';
|
|
47
48
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
48
49
|
|
|
49
50
|
import requestPayloadTreeStyles from './requestPayloadTree.css.js';
|
|
50
51
|
import requestPayloadViewStyles from './requestPayloadView.css.js';
|
|
51
52
|
|
|
53
|
+
const {classMap} = Directives;
|
|
52
54
|
const UIStrings = {
|
|
53
55
|
/**
|
|
54
56
|
* @description A context menu item Payload View of the Network panel to copy a parsed value.
|
|
@@ -163,34 +165,6 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
163
165
|
});
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
static formatParameter(value: string, className: string, decodeParameters: boolean): Element {
|
|
167
|
-
let errorDecoding = false;
|
|
168
|
-
|
|
169
|
-
if (decodeParameters) {
|
|
170
|
-
value = value.replace(/\+/g, ' ');
|
|
171
|
-
if (value.indexOf('%') >= 0) {
|
|
172
|
-
try {
|
|
173
|
-
value = decodeURIComponent(value);
|
|
174
|
-
} catch {
|
|
175
|
-
errorDecoding = true;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
const div = document.createElement('div');
|
|
180
|
-
if (className) {
|
|
181
|
-
div.className = className;
|
|
182
|
-
}
|
|
183
|
-
if (value === '') {
|
|
184
|
-
div.classList.add('empty-value');
|
|
185
|
-
}
|
|
186
|
-
if (errorDecoding) {
|
|
187
|
-
div.createChild('span', 'payload-decode-error').textContent = i18nString(UIStrings.unableToDecodeValue);
|
|
188
|
-
} else {
|
|
189
|
-
div.textContent = value;
|
|
190
|
-
}
|
|
191
|
-
return div;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
168
|
private refreshQueryString(): void {
|
|
195
169
|
const queryString = this.request.queryString();
|
|
196
170
|
const queryParameters = this.request.queryParameters;
|
|
@@ -270,35 +244,8 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
270
244
|
private refreshParams(
|
|
271
245
|
title: string, params: SDK.NetworkRequest.NameValue[]|null, sourceText: string|null,
|
|
272
246
|
paramsTreeElement: UI.TreeOutline.TreeElement): void {
|
|
273
|
-
paramsTreeElement.removeChildren();
|
|
274
|
-
|
|
275
|
-
paramsTreeElement.listItemElement.removeChildren();
|
|
276
|
-
paramsTreeElement.listItemElement.createChild('div', 'selection fill');
|
|
277
|
-
UI.UIUtils.createTextChild(paramsTreeElement.listItemElement, title);
|
|
278
|
-
|
|
279
|
-
const payloadCount = document.createElement('span');
|
|
280
|
-
payloadCount.classList.add('payload-count');
|
|
281
|
-
const numberOfParams = params ? params.length : 0;
|
|
282
|
-
payloadCount.textContent = `\xA0(${numberOfParams})`;
|
|
283
|
-
paramsTreeElement.listItemElement.appendChild(payloadCount);
|
|
284
|
-
|
|
285
|
-
const shouldViewSource = viewSourceForItems.has(paramsTreeElement);
|
|
286
|
-
if (shouldViewSource) {
|
|
287
|
-
this.appendParamsSource(title, params, sourceText, paramsTreeElement);
|
|
288
|
-
} else {
|
|
289
|
-
this.appendParamsParsed(title, params, sourceText, paramsTreeElement);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
private appendParamsSource(
|
|
294
|
-
title: string, params: SDK.NetworkRequest.NameValue[]|null, sourceText: string|null,
|
|
295
|
-
paramsTreeElement: UI.TreeOutline.TreeElement): void {
|
|
296
|
-
this.populateTreeElementWithSourceText(paramsTreeElement, sourceText);
|
|
297
|
-
|
|
298
|
-
const listItemElement = paramsTreeElement.listItemElement;
|
|
299
|
-
|
|
300
247
|
const viewParsed = function(this: RequestPayloadView, event: Event): void {
|
|
301
|
-
listItemElement.removeEventListener('contextmenu', viewParsedContextMenu);
|
|
248
|
+
paramsTreeElement.listItemElement.removeEventListener('contextmenu', viewParsedContextMenu);
|
|
302
249
|
|
|
303
250
|
viewSourceForItems.delete(paramsTreeElement);
|
|
304
251
|
this.refreshParams(title, params, sourceText, paramsTreeElement);
|
|
@@ -315,38 +262,8 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
315
262
|
void contextMenu.show();
|
|
316
263
|
};
|
|
317
264
|
|
|
318
|
-
const viewParsedButton = this.createViewSourceToggle(/* viewSource */ true, viewParsed.bind(this));
|
|
319
|
-
listItemElement.appendChild(viewParsedButton);
|
|
320
|
-
|
|
321
|
-
listItemElement.addEventListener('contextmenu', viewParsedContextMenu);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
private appendParamsParsed(
|
|
325
|
-
title: string, params: SDK.NetworkRequest.NameValue[]|null, sourceText: string|null,
|
|
326
|
-
paramsTreeElement: UI.TreeOutline.TreeElement): void {
|
|
327
|
-
for (const param of params || []) {
|
|
328
|
-
const paramNameValue = document.createDocumentFragment();
|
|
329
|
-
if (param.name !== '') {
|
|
330
|
-
const name = RequestPayloadView.formatParameter(param.name, 'payload-name', this.decodeRequestParameters);
|
|
331
|
-
const value =
|
|
332
|
-
RequestPayloadView.formatParameter(param.value, 'payload-value source-code', this.decodeRequestParameters);
|
|
333
|
-
paramNameValue.appendChild(name);
|
|
334
|
-
paramNameValue.appendChild(value);
|
|
335
|
-
} else {
|
|
336
|
-
paramNameValue.appendChild(RequestPayloadView.formatParameter(
|
|
337
|
-
i18nString(UIStrings.empty), 'empty-request-payload', this.decodeRequestParameters));
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
const paramTreeElement = new UI.TreeOutline.TreeElement(paramNameValue);
|
|
341
|
-
this.addEntryContextMenuHandler(
|
|
342
|
-
paramTreeElement, i18nString(UIStrings.copyValue), 'copy-value', () => decodeURIComponent(param.value));
|
|
343
|
-
paramsTreeElement.appendChild(paramTreeElement);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
const listItemElement = paramsTreeElement.listItemElement;
|
|
347
|
-
|
|
348
265
|
const viewSource = function(this: RequestPayloadView, event: Event): void {
|
|
349
|
-
listItemElement.removeEventListener('contextmenu', viewSourceContextMenu);
|
|
266
|
+
paramsTreeElement.listItemElement.removeEventListener('contextmenu', viewSourceContextMenu);
|
|
350
267
|
|
|
351
268
|
viewSourceForItems.add(paramsTreeElement);
|
|
352
269
|
this.refreshParams(title, params, sourceText, paramsTreeElement);
|
|
@@ -354,7 +271,7 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
354
271
|
};
|
|
355
272
|
|
|
356
273
|
const toggleURLDecoding = function(this: RequestPayloadView, event: Event): void {
|
|
357
|
-
listItemElement.removeEventListener('contextmenu', viewSourceContextMenu);
|
|
274
|
+
paramsTreeElement.listItemElement.removeEventListener('contextmenu', viewSourceContextMenu);
|
|
358
275
|
this.toggleURLDecoding(event);
|
|
359
276
|
};
|
|
360
277
|
|
|
@@ -372,16 +289,74 @@ export class RequestPayloadView extends UI.Widget.VBox {
|
|
|
372
289
|
void contextMenu.show();
|
|
373
290
|
};
|
|
374
291
|
|
|
375
|
-
const
|
|
376
|
-
|
|
292
|
+
const count = `\xA0(${params?.length ?? 0})`;
|
|
293
|
+
const shouldViewSource = viewSourceForItems.has(paramsTreeElement);
|
|
294
|
+
render(
|
|
295
|
+
html`<div class="selection fill"></div>${title}<span class=payload-count>${count}</span>${
|
|
296
|
+
shouldViewSource ? this.createViewSourceToggle(/* viewSource */ true, viewParsed.bind(this)) :
|
|
297
|
+
html`${this.createViewSourceToggle(/* viewSource */ false, viewSource.bind(this))}
|
|
298
|
+
<devtools-button
|
|
299
|
+
class=payload-toggle
|
|
300
|
+
jslogi=${VisualLogging.action().track({click: true}).context('decode-encode')}
|
|
301
|
+
.variant=${Buttons.Button.Variant.OUTLINED}
|
|
302
|
+
@click=${toggleURLDecoding.bind(this)}>
|
|
303
|
+
${this.decodeRequestParameters ? i18nString(UIStrings.viewUrlEncoded) : i18nString(UIStrings.viewDecoded)}
|
|
304
|
+
</devtools-button>`}`,
|
|
305
|
+
paramsTreeElement.listItemElement);
|
|
377
306
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
307
|
+
paramsTreeElement.removeChildren();
|
|
308
|
+
if (shouldViewSource) {
|
|
309
|
+
this.populateTreeElementWithSourceText(paramsTreeElement, sourceText);
|
|
310
|
+
paramsTreeElement.listItemElement.addEventListener('contextmenu', viewParsedContextMenu);
|
|
311
|
+
} else {
|
|
312
|
+
this.populateTreeElementWithParsedParameters(paramsTreeElement, params);
|
|
313
|
+
paramsTreeElement.listItemElement.addEventListener('contextmenu', viewSourceContextMenu);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
383
316
|
|
|
384
|
-
|
|
317
|
+
static formatParameter(value: string, className: string, decodeParameters: boolean): LitTemplate {
|
|
318
|
+
let errorDecoding = false;
|
|
319
|
+
|
|
320
|
+
if (decodeParameters) {
|
|
321
|
+
value = value.replace(/\+/g, ' ');
|
|
322
|
+
if (value.indexOf('%') >= 0) {
|
|
323
|
+
try {
|
|
324
|
+
value = decodeURIComponent(value);
|
|
325
|
+
} catch {
|
|
326
|
+
errorDecoding = true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
const classes = classMap({[className]: !!className, 'empty-value': value === ''});
|
|
331
|
+
return html`<div class=${classes}>
|
|
332
|
+
${
|
|
333
|
+
errorDecoding ? html`<span class=payload-decode-error>${i18nString(UIStrings.unableToDecodeValue)}</span>` :
|
|
334
|
+
value}
|
|
335
|
+
</div>`;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
private populateTreeElementWithParsedParameters(
|
|
339
|
+
paramsTreeElement: UI.TreeOutline.TreeElement, params: SDK.NetworkRequest.NameValue[]|null): void {
|
|
340
|
+
for (const param of params || []) {
|
|
341
|
+
const paramNameValue = document.createDocumentFragment();
|
|
342
|
+
if (param.name !== '') {
|
|
343
|
+
render(
|
|
344
|
+
html`${RequestPayloadView.formatParameter(param.name, 'payload-name', this.decodeRequestParameters)}${
|
|
345
|
+
RequestPayloadView.formatParameter(
|
|
346
|
+
param.value, 'payload-value source-code', this.decodeRequestParameters)}`,
|
|
347
|
+
paramNameValue);
|
|
348
|
+
} else {
|
|
349
|
+
render(
|
|
350
|
+
RequestPayloadView.formatParameter(
|
|
351
|
+
i18nString(UIStrings.empty), 'empty-request-payload', this.decodeRequestParameters),
|
|
352
|
+
paramNameValue);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const paramTreeElement = new UI.TreeOutline.TreeElement(paramNameValue);
|
|
356
|
+
this.addEntryContextMenuHandler(
|
|
357
|
+
paramTreeElement, i18nString(UIStrings.copyValue), 'copy-value', () => decodeURIComponent(param.value));
|
|
358
|
+
paramsTreeElement.appendChild(paramTreeElement);
|
|
359
|
+
}
|
|
385
360
|
}
|
|
386
361
|
|
|
387
362
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import './BinaryResourceView.js';
|
|
6
6
|
import './RequestConditionsDrawer.js';
|
|
7
|
+
import './RequestDeviceBoundSessionsView.js';
|
|
7
8
|
import './EventSourceMessagesView.js';
|
|
8
9
|
import './NetworkConfigView.js';
|
|
9
10
|
import './NetworkDataGridNode.js';
|
|
@@ -42,6 +43,7 @@ import * as NetworkSearchScope from './NetworkSearchScope.js';
|
|
|
42
43
|
import * as NetworkWaterfallColumn from './NetworkWaterfallColumn.js';
|
|
43
44
|
import * as RequestConditionsDrawer from './RequestConditionsDrawer.js';
|
|
44
45
|
import * as RequestCookiesView from './RequestCookiesView.js';
|
|
46
|
+
import * as RequestDeviceBoundSessionsView from './RequestDeviceBoundSessionsView.js';
|
|
45
47
|
import * as RequestHTMLView from './RequestHTMLView.js';
|
|
46
48
|
import * as RequestInitiatorView from './RequestInitiatorView.js';
|
|
47
49
|
import * as RequestPayloadView from './RequestPayloadView.js';
|
|
@@ -68,6 +70,7 @@ export {
|
|
|
68
70
|
NetworkWaterfallColumn,
|
|
69
71
|
RequestConditionsDrawer,
|
|
70
72
|
RequestCookiesView,
|
|
73
|
+
RequestDeviceBoundSessionsView,
|
|
71
74
|
RequestHTMLView,
|
|
72
75
|
RequestInitiatorView,
|
|
73
76
|
RequestPayloadView,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
.request-device-bound-sessions-view {
|
|
7
|
+
margin: 20px;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
scroll-behavior: smooth;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.device-bound-session-grid-wrapper devtools-data-grid {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
@@ -154,12 +154,12 @@ const UIStrings = {
|
|
|
154
154
|
* @description Explainer for which data is being sent by the AI assistance feature
|
|
155
155
|
*/
|
|
156
156
|
freestylerSendsData:
|
|
157
|
-
'To generate explanations,
|
|
157
|
+
'To generate explanations, your chat messages, any data the inspected page can see using Web APIs, and the items you select such as files, network requests, and performance traces are sent to Google. This data may be seen by human reviewers to improve this feature. Don’t use on pages with personal or sensitive information.',
|
|
158
158
|
/**
|
|
159
159
|
* @description Explainer for which data is being sent by the AI assistance feature
|
|
160
160
|
*/
|
|
161
161
|
freestylerSendsDataNoLogging:
|
|
162
|
-
'To generate explanations,
|
|
162
|
+
'To generate explanations, your chat messages, any data the inspected page can see using Web APIs, and the items you select such as files, network requests, and performance traces are sent to Google. This data will not be used to improve Google’s AI models. Your organization may change these settings at any time.',
|
|
163
163
|
/**
|
|
164
164
|
* @description Explainer for which data is being sent by the AI generated annotations feature
|
|
165
165
|
*/
|
|
@@ -124,6 +124,13 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
124
124
|
const lockedString = i18n.i18n.lockedString;
|
|
125
125
|
|
|
126
126
|
function isAiAssistanceServerSideLoggingEnabled(): boolean {
|
|
127
|
+
// Disable logging for now.
|
|
128
|
+
// For context, see b/454563259#comment35.
|
|
129
|
+
// We should be able to remove this ~end of April.
|
|
130
|
+
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
|
|
127
134
|
return !Root.Runtime.hostConfig.aidaAvailability?.disallowLogging;
|
|
128
135
|
}
|
|
129
136
|
|
|
@@ -8,4 +8,4 @@ Enable the Render blocking column in the Network panel to spot scripts or styles
|
|
|
8
8
|
|
|
9
9
|
### [MCP server](mcp-server)
|
|
10
10
|
|
|
11
|
-
Simulate device viewports and user agents,
|
|
11
|
+
Simulate device viewports and user agents, open pages in the background, and a new SKILL.md for more efficient use.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 7eaa8f009169b74314bda2e7a51b51bd9948cb8d
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Name: source-map-scopes-codec
|
|
2
2
|
Short Name: source-map-scopes-codec
|
|
3
3
|
URL: https://github.com/ChromeDevTools/source-map-scopes-codec
|
|
4
|
-
Version: 0.
|
|
5
|
-
Revision:
|
|
4
|
+
Version: 0.7.0
|
|
5
|
+
Revision: 3a84349a869ea8136056e8ce1c37cb148d36165e
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
8
8
|
Security Critical: no
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DecodedScopeInfo, Position, SourceMap } from "../scopes.js";
|
|
2
2
|
/**
|
|
3
3
|
* The mode decides how well-formed the encoded scopes have to be, to be accepted by the decoder.
|
|
4
4
|
*
|
|
@@ -25,5 +25,5 @@ export interface DecodeOptions {
|
|
|
25
25
|
* Has no effect when passing a {@link IndexSourceMapJson} directly to {@link decode}.
|
|
26
26
|
*/ generatedOffset: Position;
|
|
27
27
|
}
|
|
28
|
-
export declare function decode(sourceMap: SourceMap, options?: Partial<DecodeOptions>):
|
|
28
|
+
export declare function decode(sourceMap: SourceMap, options?: Partial<DecodeOptions>): DecodedScopeInfo;
|
|
29
29
|
//# sourceMappingURL=decode.d.ts.map
|
package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sources":["../../../src/decode/decode.ts"],"names":[],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sources":["../../../src/decode/decode.ts"],"names":[],"mappings":"AAWA,cACE,gBAAgB,EAIhB,QAAQ,EACR,SAAS,uBAGW;AAGtB;;;;;;;;;;;;;CAaC,GACD,0BAAkB;EAChB,SAAS;EACT,MAAM;;AAGR,iBAAiB;EACf,MAAM;EAEN;;;;;GAKC,GACD,iBAAiB;;AAQnB,OAAO,iBAAS,OACd,WAAW,SAAS,EACpB,UAAS,QAAQ,cAAuC,GACvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Binding, GeneratedRange, OriginalPosition, OriginalScope, Position, ScopeInfo, SourceMapJson, SubRangeBinding } from "./scopes.js";
|
|
1
|
+
export type { Binding, DecodedScopeInfo, GeneratedRange, OriginalPosition, OriginalScope, Position, ScopeInfo, SourceMapJson, SubRangeBinding } from "./scopes.js";
|
|
2
2
|
export { encode } from "./encode/encode.js";
|
|
3
3
|
export { decode, DecodeMode } from "./decode/decode.js";
|
|
4
4
|
export { ScopeInfoBuilder } from "./builder/builder.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sources":["../../src/mod.ts"],"names":[],"mappings":"AAIA,cACE,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,aAAa,EACb,eAAe,sBACI;AAErB,SAAS,MAAM,6BAA6B;AAC5C,SAAS,MAAM,EAAE,UAAU,6BAA6B;AAExD,SAAS,gBAAgB,+BAA+B;AACxD,SAAS,oBAAoB,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sources":["../../src/mod.ts"],"names":[],"mappings":"AAIA,cACE,OAAO,EACP,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,aAAa,EACb,eAAe,sBACI;AAErB,SAAS,MAAM,6BAA6B;AAC5C,SAAS,MAAM,EAAE,UAAU,6BAA6B;AAExD,SAAS,gBAAgB,+BAA+B;AACxD,SAAS,oBAAoB,oCAAoC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The scopes information found in a source map.
|
|
3
3
|
*/ export interface ScopeInfo {
|
|
4
4
|
/**
|
|
5
5
|
* The length of {@linkcode scopes} must match the length of "sources" in the source map JSON. Each entry describes the scope tree of the corresponding source file.
|
|
@@ -8,6 +8,14 @@
|
|
|
8
8
|
* The range tree of the generated bundle. Multiple top-level ranges are allowed but must not overlap source position wise.
|
|
9
9
|
*/ ranges: GeneratedRange[];
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The scopes information produced by the decoder.
|
|
13
|
+
*/ export interface DecodedScopeInfo extends ScopeInfo {
|
|
14
|
+
/**
|
|
15
|
+
* When the encoded scopes contained variable and binding expression items.
|
|
16
|
+
* Note that a value of `true` also indicates "partial" info and does not guarantee comprehensiveness.
|
|
17
|
+
*/ hasVariableAndBindingInfo: boolean;
|
|
18
|
+
}
|
|
11
19
|
/**
|
|
12
20
|
* A scope in the authored source.
|
|
13
21
|
*/ export interface OriginalScope {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sources":["../../src/scopes.ts"],"names":[],"mappings":"AAIA;;CAEC,GACD,iBAAiB;EACf;;GAEC,GACD,SAAS,gBAAgB,IAAI;EAE7B;;GAEC,GACD,QAAQ;;AAGV;;CAEC,GACD,iBAAiB;EACf,6CAA6C,GAC7C,OAAO;EAEP,sCAAsC,GACtC,KAAK;EAEL;;;;GAIC,GACD,OAAO,MAAM;EAEb;;;;;GAKC,GACD,OAAO,MAAM;EAEb;;GAEC,GACD,cAAc,OAAO;EAErB;;GAEC,GACD,WAAW,MAAM;EAEjB;;;GAGC,GACD,UAAU;EAEV,0DAA0D,GAC1D,SAAS;;AAGX;;;;;;CAMC,GACD,iBAAiB;EACf,4CAA4C,GAC5C,OAAO;EAEP,sCAAsC,GACtC,KAAK;EAEL;;GAEC,GACD,gBAAgB;EAEhB;;GAEC,GACD,cAAc,OAAO;EAErB;;;GAGC,GACD,UAAU,OAAO;EAEjB;;;;;GAKC,GACD,WAAW;EAEX;;;GAGC,GACD,QAAQ;EAER;;;GAGC,GACD,UAAU;EAEV,0DAA0D,GAC1D,SAAS;;AAGX;;;;;;;;;;;;;;;CAeC,GACD,YAAY,UAAU,MAAM,GAAG,IAAI,GAAG;AAEtC,iBAAiB;EACf,QAAQ,MAAM;EACd,MAAM;EACN,IAAI;;AAGN;;;;;CAKC,GACD,iBAAiB;EACf,MAAM,MAAM;EACZ,QAAQ,MAAM;;AAGhB;;CAEC,GACD,iBAAiB,yBAAyB;EACxC,8FAA8F,GAC9F,aAAa,MAAM;;AAGrB;;CAEC,GACD,YAAY,YAAY,gBAAgB;AAExC;;CAEC,GACD,iBAAiB;EACf,SAAS;EACT,UAAU;IAAQ,QAAQ;IAAU,KAAK;;;AAG3C;;CAEC,GACD,iBAAiB;EACf,SAAS;EACT,UAAU,MAAM,GAAG,IAAI;EACvB,UAAU,MAAM;EAChB,QAAQ,MAAM;EACd,SAAS,MAAM"}
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sources":["../../src/scopes.ts"],"names":[],"mappings":"AAIA;;CAEC,GACD,iBAAiB;EACf;;GAEC,GACD,SAAS,gBAAgB,IAAI;EAE7B;;GAEC,GACD,QAAQ;;AAGV;;CAEC,GACD,iBAAiB,yBAAyB;EACxC;;;GAGC,GACD,2BAA2B,OAAO;;AAGpC;;CAEC,GACD,iBAAiB;EACf,6CAA6C,GAC7C,OAAO;EAEP,sCAAsC,GACtC,KAAK;EAEL;;;;GAIC,GACD,OAAO,MAAM;EAEb;;;;;GAKC,GACD,OAAO,MAAM;EAEb;;GAEC,GACD,cAAc,OAAO;EAErB;;GAEC,GACD,WAAW,MAAM;EAEjB;;;GAGC,GACD,UAAU;EAEV,0DAA0D,GAC1D,SAAS;;AAGX;;;;;;CAMC,GACD,iBAAiB;EACf,4CAA4C,GAC5C,OAAO;EAEP,sCAAsC,GACtC,KAAK;EAEL;;GAEC,GACD,gBAAgB;EAEhB;;GAEC,GACD,cAAc,OAAO;EAErB;;;GAGC,GACD,UAAU,OAAO;EAEjB;;;;;GAKC,GACD,WAAW;EAEX;;;GAGC,GACD,QAAQ;EAER;;;GAGC,GACD,UAAU;EAEV,0DAA0D,GAC1D,SAAS;;AAGX;;;;;;;;;;;;;;;CAeC,GACD,YAAY,UAAU,MAAM,GAAG,IAAI,GAAG;AAEtC,iBAAiB;EACf,QAAQ,MAAM;EACd,MAAM;EACN,IAAI;;AAGN;;;;;CAKC,GACD,iBAAiB;EACf,MAAM,MAAM;EACZ,QAAQ,MAAM;;AAGhB;;CAEC,GACD,iBAAiB,yBAAyB;EACxC,8FAA8F,GAC9F,aAAa,MAAM;;AAGrB;;CAEC,GACD,YAAY,YAAY,gBAAgB;AAExC;;CAEC,GACD,iBAAiB;EACf,SAAS;EACT,UAAU;IAAQ,QAAQ;IAAU,KAAK;;;AAG3C;;CAEC,GACD,iBAAiB;EACf,SAAS;EACT,UAAU,MAAM,GAAG,IAAI;EACvB,UAAU,MAAM;EAChB,QAAQ,MAAM;EACd,SAAS,MAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrome-devtools/source-map-scopes-codec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"exports": "./src/mod.ts",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"fmt": {
|
|
@@ -17,5 +17,12 @@
|
|
|
17
17
|
"bench",
|
|
18
18
|
"src/**/*.test.ts"
|
|
19
19
|
]
|
|
20
|
+
},
|
|
21
|
+
"imports": {
|
|
22
|
+
"@std/assert": "jsr:@std/assert@^1.0.17",
|
|
23
|
+
"@std/cli": "jsr:@std/cli@^1.0.26",
|
|
24
|
+
"@std/fmt": "jsr:@std/fmt@^1.0.9",
|
|
25
|
+
"@std/fs": "jsr:@std/fs@^1.0.22",
|
|
26
|
+
"@std/testing": "jsr:@std/testing@^1.0.17"
|
|
20
27
|
}
|
|
21
28
|
}
|