chrome-devtools-frontend 1.0.1603822 → 1.0.1605219
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/AUTHORS +1 -0
- package/front_end/Tests.js +23 -7
- package/front_end/core/host/AidaClient.ts +153 -525
- package/front_end/core/host/AidaClientTypes.ts +470 -0
- package/front_end/core/host/AidaGcaTranslation.ts +231 -122
- package/front_end/core/host/GcaClient.ts +112 -0
- package/front_end/core/host/GcaTypes.ts +107 -155
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +1 -1
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/AutofillModel.ts +3 -2
- package/front_end/core/sdk/CSSModel.ts +3 -4
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +15 -13
- package/front_end/core/sdk/CookieModel.ts +5 -4
- package/front_end/core/sdk/DOMDebuggerModel.ts +20 -14
- package/front_end/core/sdk/DOMModel.ts +24 -22
- package/front_end/core/sdk/DebuggerModel.ts +21 -36
- package/front_end/core/sdk/EmulationModel.ts +21 -23
- package/front_end/core/sdk/EventBreakpointsModel.ts +16 -6
- package/front_end/core/sdk/HeapProfilerModel.ts +4 -7
- package/front_end/core/sdk/IsolateManager.ts +12 -7
- package/front_end/core/sdk/NetworkManager.ts +35 -28
- package/front_end/core/sdk/OverlayModel.ts +10 -10
- package/front_end/core/sdk/PreloadingModel.ts +3 -4
- package/front_end/core/sdk/ServiceWorkerManager.ts +2 -3
- package/front_end/core/sdk/SourceMapScopesInfo.ts +93 -63
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -3
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +22 -48
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/generated/InspectorBackendCommands.ts +4 -0
- package/front_end/generated/SupportedCSSProperties.js +68 -2
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +14 -0
- package/front_end/generated/protocol.ts +22 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +31 -17
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
- package/front_end/models/bindings/TempFile.ts +1 -4
- package/front_end/models/emulation/DeviceModeModel.ts +21 -26
- package/front_end/models/extensions/ExtensionAPI.ts +1 -1
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +34 -47
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/models/trace/insights/LCPDiscovery.ts +14 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +85 -31
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +50 -40
- package/front_end/panels/ai_assistance/components/ChatView.ts +3 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +35 -7
- package/front_end/panels/ai_assistance/components/chatMessage.css +5 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +6 -0
- package/front_end/panels/application/IndexedDBViews.ts +0 -9
- package/front_end/panels/application/WebMCPTreeElement.ts +35 -0
- package/front_end/panels/application/WebMCPView.ts +118 -0
- package/front_end/panels/application/application.ts +4 -0
- package/front_end/panels/application/webMCPView.css +65 -0
- package/front_end/panels/common/aiCodeCompletionSummaryToolbar.css +1 -1
- package/front_end/panels/console/consoleView.css +4 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +91 -13
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +23 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +85 -20
- package/front_end/panels/elements/elementsPanel.css +14 -0
- package/front_end/panels/elements/elementsTreeOutline.css +18 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +15 -19
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +4 -2
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +12 -16
- package/front_end/panels/profiler/HeapSnapshotView.ts +3 -10
- package/front_end/panels/profiler/ProfilesPanel.ts +5 -7
- package/front_end/panels/recorder/components/recordingView.css +0 -6
- package/front_end/panels/sensors/SensorsView.ts +28 -61
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +2 -2
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +35 -36
- package/front_end/panels/timeline/TimelineDetailsView.ts +47 -41
- package/front_end/panels/timeline/TimelinePanel.ts +1 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +13 -13
- package/front_end/panels/timeline/components/LiveMetricsView.ts +852 -824
- package/front_end/panels/timeline/components/liveMetricsView.css +4 -0
- package/front_end/panels/timeline/thirdPartyTreeView.css +2 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +0 -11
- package/front_end/ui/legacy/InspectorDrawerView.ts +206 -0
- package/front_end/ui/legacy/InspectorView.ts +41 -91
- package/front_end/ui/legacy/ViewManager.ts +14 -5
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +5 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -1
- package/package.json +1 -1
|
@@ -168,40 +168,40 @@ export enum Mode {
|
|
|
168
168
|
NONE = 3,
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
172
171
|
export interface GenerateContentRequest {
|
|
173
172
|
model?: string;
|
|
174
|
-
aicode
|
|
173
|
+
aicode: AiCodeConfig;
|
|
175
174
|
contents: Content[];
|
|
176
|
-
|
|
175
|
+
systemInstruction?: Content;
|
|
177
176
|
tools?: Tool[];
|
|
178
|
-
|
|
177
|
+
toolConfig?: ToolConfig;
|
|
179
178
|
labels?: Record<string, string>;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
safetySettings?: SafetySetting[];
|
|
180
|
+
generationConfig?: GenerationConfig;
|
|
181
|
+
sessionId?: string;
|
|
183
182
|
}
|
|
184
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
185
183
|
|
|
186
184
|
export interface AiCodeConfig {
|
|
187
185
|
experience: string;
|
|
188
186
|
files?: SourceFile[];
|
|
189
187
|
}
|
|
190
188
|
|
|
191
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
192
189
|
export interface SourceFile {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
inclusionReason?: InclusionReason[];
|
|
191
|
+
fileUri: string;
|
|
192
|
+
programmingLanguage?: string;
|
|
193
|
+
segments?: FileSegment[];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface FileSegment {
|
|
197
|
+
content: string;
|
|
198
|
+
isSelected: boolean;
|
|
196
199
|
}
|
|
197
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
198
200
|
|
|
199
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
200
201
|
export interface FileEdit {
|
|
201
|
-
|
|
202
|
+
fileUri: string;
|
|
202
203
|
content: string;
|
|
203
204
|
}
|
|
204
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
205
205
|
|
|
206
206
|
export type Role = 'user'|'model';
|
|
207
207
|
|
|
@@ -210,34 +210,28 @@ export interface Content {
|
|
|
210
210
|
role: Role;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
214
213
|
export interface Part {
|
|
215
214
|
text?: string;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
215
|
+
inlineData?: Blob;
|
|
216
|
+
fileData?: FileData;
|
|
217
|
+
functionCall?: FunctionCall;
|
|
218
|
+
functionResponse?: FunctionResponse;
|
|
219
|
+
executableCode?: ExecutableCode;
|
|
220
|
+
codeExecutionResult?: CodeExecutionResult;
|
|
221
|
+
videoMetadata?: VideoMetadata;
|
|
223
222
|
thought?: boolean;
|
|
224
|
-
|
|
223
|
+
thoughtSignature?: string; // bytes as base64 string
|
|
225
224
|
}
|
|
226
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
227
225
|
|
|
228
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
229
226
|
export interface Blob {
|
|
230
|
-
|
|
227
|
+
mimeType: string;
|
|
231
228
|
data: string; // bytes as base64 string
|
|
232
229
|
}
|
|
233
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
234
230
|
|
|
235
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
236
231
|
export interface FileData {
|
|
237
|
-
|
|
238
|
-
|
|
232
|
+
mimeType: string;
|
|
233
|
+
fileUri: string;
|
|
239
234
|
}
|
|
240
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
241
235
|
|
|
242
236
|
export interface FunctionCall {
|
|
243
237
|
name: string;
|
|
@@ -261,30 +255,25 @@ export interface CodeExecutionResult {
|
|
|
261
255
|
output: string;
|
|
262
256
|
}
|
|
263
257
|
|
|
264
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
265
258
|
export interface Tool {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
259
|
+
functionDeclarations?: FunctionDeclaration[];
|
|
260
|
+
googleSearch?: {
|
|
261
|
+
timeRangeFilter?: {
|
|
262
|
+
startTime?: string, // Timestamp
|
|
263
|
+
endTime?: string, // Timestamp
|
|
271
264
|
},
|
|
272
265
|
};
|
|
273
266
|
}
|
|
274
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
275
267
|
|
|
276
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
277
268
|
export interface FunctionDeclaration {
|
|
278
269
|
name: string;
|
|
279
270
|
description: string;
|
|
280
271
|
parameters?: Schema;
|
|
281
|
-
|
|
272
|
+
parametersJsonSchema?: unknown; // google.protobuf.Value
|
|
282
273
|
response?: Schema;
|
|
283
|
-
|
|
274
|
+
responseJsonSchema?: unknown; // google.protobuf.Value
|
|
284
275
|
}
|
|
285
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
286
276
|
|
|
287
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
288
277
|
export interface Schema {
|
|
289
278
|
type?: Type;
|
|
290
279
|
format?: string;
|
|
@@ -296,25 +285,20 @@ export interface Schema {
|
|
|
296
285
|
required?: string[];
|
|
297
286
|
minimum?: number;
|
|
298
287
|
maximum?: number;
|
|
299
|
-
|
|
300
|
-
|
|
288
|
+
minLength?: number;
|
|
289
|
+
maxLength?: number;
|
|
301
290
|
pattern?: string;
|
|
302
291
|
example?: unknown; // google.protobuf.Value
|
|
303
292
|
}
|
|
304
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
305
293
|
|
|
306
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
307
294
|
export interface ToolConfig {
|
|
308
|
-
|
|
295
|
+
functionCallingConfig?: FunctionCallingConfig;
|
|
309
296
|
}
|
|
310
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
311
297
|
|
|
312
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
313
298
|
export interface FunctionCallingConfig {
|
|
314
299
|
mode: Mode;
|
|
315
|
-
|
|
300
|
+
allowedFunctionNames?: string[];
|
|
316
301
|
}
|
|
317
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
318
302
|
|
|
319
303
|
export interface SafetySetting {
|
|
320
304
|
category: HarmCategory;
|
|
@@ -322,52 +306,44 @@ export interface SafetySetting {
|
|
|
322
306
|
method?: HarmBlockMethod;
|
|
323
307
|
}
|
|
324
308
|
|
|
325
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
326
309
|
export interface GenerationConfig {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
310
|
+
candidateCount?: number;
|
|
311
|
+
stopSequences?: string[];
|
|
312
|
+
maxOutputTokens?: number;
|
|
330
313
|
temperature?: number;
|
|
331
|
-
|
|
332
|
-
|
|
314
|
+
topP?: number;
|
|
315
|
+
topK?: number;
|
|
333
316
|
seed?: number;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
317
|
+
responseMimeType?: string;
|
|
318
|
+
responseSchema?: Schema;
|
|
319
|
+
responseJsonSchema?: unknown; // google.protobuf.Value
|
|
320
|
+
presencePenalty?: number;
|
|
321
|
+
frequencyPenalty?: number;
|
|
322
|
+
thinkingConfig?: ThinkingConfig;
|
|
340
323
|
}
|
|
341
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
342
324
|
|
|
343
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
344
325
|
export interface ThinkingConfig {
|
|
345
|
-
|
|
346
|
-
|
|
326
|
+
includeThoughts?: boolean;
|
|
327
|
+
thinkingBudget?: number;
|
|
347
328
|
}
|
|
348
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
349
329
|
|
|
350
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
351
330
|
export interface GenerateContentResponse {
|
|
352
331
|
candidates: Candidate[];
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
332
|
+
promptFeedback: PromptFeedback;
|
|
333
|
+
usageMetadata: UsageMetadata;
|
|
334
|
+
modelVersion: string;
|
|
335
|
+
responseId: string;
|
|
357
336
|
}
|
|
358
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
359
337
|
|
|
360
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
361
338
|
export interface Candidate {
|
|
362
339
|
index: number;
|
|
363
340
|
content: Content;
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
341
|
+
finishReason: FinishReason;
|
|
342
|
+
safetyRatings: SafetyRating[];
|
|
343
|
+
citationMetadata: CitationMetadata;
|
|
344
|
+
groundingMetadata: GroundingMetadata;
|
|
345
|
+
aicodeOutput: AiCodeOutput;
|
|
369
346
|
}
|
|
370
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
371
347
|
|
|
372
348
|
export interface SafetyRating {
|
|
373
349
|
category: HarmCategory;
|
|
@@ -379,142 +355,118 @@ export interface CitationMetadata {
|
|
|
379
355
|
citations: Citation[];
|
|
380
356
|
}
|
|
381
357
|
|
|
382
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
383
358
|
export interface Citation {
|
|
384
|
-
|
|
385
|
-
|
|
359
|
+
startIndex: number;
|
|
360
|
+
endIndex: number;
|
|
386
361
|
uri: string;
|
|
387
362
|
license: string;
|
|
388
363
|
}
|
|
389
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
390
364
|
|
|
391
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
392
365
|
export interface GroundingMetadata {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
366
|
+
webSearchQueries?: string[];
|
|
367
|
+
searchEntryPoint?: {
|
|
368
|
+
renderedContent?: string,
|
|
369
|
+
sdkBlob?: string, // bytes as base64 string
|
|
397
370
|
};
|
|
398
|
-
|
|
371
|
+
groundingChunks?: Array<{
|
|
399
372
|
web?: {
|
|
400
373
|
uri?: string,
|
|
401
374
|
title?: string,
|
|
402
375
|
},
|
|
403
376
|
}>;
|
|
404
|
-
|
|
377
|
+
groundingSupports?: Array<{
|
|
405
378
|
segment?: {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
379
|
+
partIndex?: number,
|
|
380
|
+
startIndex?: number,
|
|
381
|
+
endIndex?: number,
|
|
409
382
|
text?: string,
|
|
410
383
|
},
|
|
411
|
-
|
|
412
|
-
|
|
384
|
+
groundingChunkIndices?: number[],
|
|
385
|
+
confidenceScores?: number[],
|
|
413
386
|
}>;
|
|
414
|
-
|
|
415
|
-
|
|
387
|
+
retrievalMetadata?: {
|
|
388
|
+
googleSearchDynamicRetrievalScore?: number,
|
|
416
389
|
};
|
|
417
390
|
}
|
|
418
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
419
391
|
|
|
420
392
|
export interface AiCodeOutput {
|
|
421
393
|
contents: DerivedContent[];
|
|
422
394
|
}
|
|
423
395
|
|
|
424
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
425
396
|
export interface DerivedContent {
|
|
426
|
-
|
|
427
|
-
|
|
397
|
+
startIndex?: number;
|
|
398
|
+
endIndex?: number;
|
|
428
399
|
file?: OutputSourceFile;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
400
|
+
codeBlock?: CodeBlock;
|
|
401
|
+
textBlock?: TextBlock;
|
|
402
|
+
predictionMetadata?: PredictionMetadata;
|
|
432
403
|
}
|
|
433
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
434
404
|
|
|
435
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
436
405
|
export interface OutputSourceFile {
|
|
437
|
-
|
|
406
|
+
fileUri: string;
|
|
438
407
|
content: string;
|
|
439
408
|
}
|
|
440
409
|
|
|
441
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
442
410
|
export interface CodeBlock {
|
|
443
411
|
content: string;
|
|
444
|
-
|
|
412
|
+
programmingLanguage: string;
|
|
445
413
|
}
|
|
446
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
447
414
|
|
|
448
415
|
export interface TextBlock {
|
|
449
416
|
content: string;
|
|
450
417
|
}
|
|
451
418
|
|
|
452
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
453
419
|
export interface PredictionMetadata {
|
|
454
420
|
score: number;
|
|
455
|
-
|
|
421
|
+
classifierScore: number;
|
|
456
422
|
}
|
|
457
423
|
|
|
458
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
459
424
|
export interface PromptFeedback {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
425
|
+
blockReason: BlockReason;
|
|
426
|
+
safetyRatings: SafetyRating[];
|
|
427
|
+
blockReasonMessage: string;
|
|
463
428
|
}
|
|
464
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
465
429
|
|
|
466
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
467
430
|
export interface UsageMetadata {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
431
|
+
promptTokenCount: number;
|
|
432
|
+
candidatesTokenCount: number;
|
|
433
|
+
totalTokenCount: number;
|
|
434
|
+
thoughtsTokenCount: number;
|
|
435
|
+
cachedContentTokenCount: number;
|
|
473
436
|
}
|
|
474
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
475
437
|
|
|
476
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
477
438
|
export interface VideoMetadata {
|
|
478
|
-
|
|
479
|
-
|
|
439
|
+
startOffset?: string; // Duration
|
|
440
|
+
endOffset?: string; // Duration
|
|
480
441
|
fps?: number;
|
|
481
442
|
}
|
|
482
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
483
443
|
|
|
484
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
485
444
|
export interface SendTelemetryRequest {
|
|
486
|
-
|
|
445
|
+
feedbackMetrics: FeedbackMetric[];
|
|
487
446
|
}
|
|
488
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
489
447
|
|
|
490
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
491
448
|
export interface FeedbackMetric {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
449
|
+
eventTime: string; // Timestamp
|
|
450
|
+
responseId: string;
|
|
451
|
+
suggestionOffered?: SuggestionOffered;
|
|
452
|
+
suggestionInteraction?: SuggestionInteraction;
|
|
496
453
|
}
|
|
497
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
498
454
|
|
|
499
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
500
455
|
export interface SuggestionOffered {
|
|
501
456
|
method?: Method;
|
|
502
457
|
status?: SuggestionStatus;
|
|
503
|
-
|
|
504
|
-
|
|
458
|
+
firstMessageLatency?: string; // Duration
|
|
459
|
+
responseLatency?: string; // Duration
|
|
505
460
|
displayed?: boolean;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
461
|
+
e2eLatency?: string; // Duration
|
|
462
|
+
displayDuration?: string; // Duration
|
|
463
|
+
programmingLanguage?: string;
|
|
509
464
|
}
|
|
510
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
511
465
|
|
|
512
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
513
466
|
export interface SuggestionInteraction {
|
|
514
467
|
interaction?: InteractionType;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
468
|
+
acceptedLines?: number;
|
|
469
|
+
acceptedCharacters?: number;
|
|
470
|
+
acceptedCommentLines?: number;
|
|
471
|
+
candidateIndex?: number;
|
|
519
472
|
}
|
|
520
|
-
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -821,7 +821,6 @@ export enum DevtoolsExperiments {
|
|
|
821
821
|
apca = 39,
|
|
822
822
|
'font-editor' = 41,
|
|
823
823
|
'full-accessibility-tree' = 42,
|
|
824
|
-
'experimental-cookie-features' = 45,
|
|
825
824
|
'instrumentation-breakpoints' = 61,
|
|
826
825
|
'use-source-map-scopes' = 76,
|
|
827
826
|
'timeline-debug-mode' = 93,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as AidaClient from './AidaClient.js';
|
|
6
6
|
import * as AidaGcaTranslation from './AidaGcaTranslation.js';
|
|
7
7
|
import * as DispatchHttpRequestClient from './DispatchHttpRequestClient.js';
|
|
8
|
+
import * as GcaClient from './GcaClient.js';
|
|
8
9
|
import * as GcaTypes from './GcaTypes.js';
|
|
9
10
|
import * as GdpClient from './GdpClient.js';
|
|
10
11
|
import * as InspectorFrontendHost from './InspectorFrontendHost.js';
|
|
@@ -17,6 +18,7 @@ export {
|
|
|
17
18
|
AidaClient,
|
|
18
19
|
AidaGcaTranslation,
|
|
19
20
|
DispatchHttpRequestClient,
|
|
21
|
+
GcaClient,
|
|
20
22
|
GcaTypes,
|
|
21
23
|
GdpClient,
|
|
22
24
|
InspectorFrontendHost,
|
|
@@ -112,7 +112,7 @@ export class DevToolsCDPConnection implements CDPConnection {
|
|
|
112
112
|
if ('error' in response && response.error) {
|
|
113
113
|
callback?.(response.error, null);
|
|
114
114
|
} else if ('result' in response) {
|
|
115
|
-
callback?.(null, response.result
|
|
115
|
+
callback?.(null, response.result);
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
}
|
|
@@ -14,7 +14,6 @@ export enum ExperimentName {
|
|
|
14
14
|
APCA = 'apca',
|
|
15
15
|
FONT_EDITOR = 'font-editor',
|
|
16
16
|
FULL_ACCESSIBILITY_TREE = 'full-accessibility-tree',
|
|
17
|
-
EXPERIMENTAL_COOKIE_FEATURES = 'experimental-cookie-features',
|
|
18
17
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
19
18
|
USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
|
|
20
19
|
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
@@ -602,6 +602,10 @@ interface ConsoleInsightsTeasers {
|
|
|
602
602
|
allowWithoutGpu: boolean;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
+
interface UseGcaApi {
|
|
606
|
+
enabled: boolean;
|
|
607
|
+
}
|
|
608
|
+
|
|
605
609
|
interface DevToolsProtocolMonitor {
|
|
606
610
|
enabled: boolean;
|
|
607
611
|
}
|
|
@@ -662,6 +666,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
662
666
|
devToolsGeminiRebranding: HostConfigGeminiRebranding,
|
|
663
667
|
devToolsProtocolMonitor: DevToolsProtocolMonitor,
|
|
664
668
|
devToolsWebMCPSupport: DevToolsWebMCPSupport,
|
|
669
|
+
devToolsUseGcaApi: UseGcaApi,
|
|
665
670
|
}>;
|
|
666
671
|
|
|
667
672
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
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
4
|
|
|
5
|
-
import * as Common from '../../core/common/common.js';
|
|
5
|
+
import type * as Common from '../../core/common/common.js';
|
|
6
6
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
7
7
|
import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
import * as Host from '../host/host.js';
|
|
@@ -19,8 +19,9 @@ export class AutofillModel extends SDKModel<EventTypes> implements ProtocolProxy
|
|
|
19
19
|
super(target);
|
|
20
20
|
|
|
21
21
|
this.agent = target.autofillAgent();
|
|
22
|
+
const settings = this.target().targetManager().settings;
|
|
22
23
|
this.#showTestAddressesInAutofillMenu =
|
|
23
|
-
|
|
24
|
+
settings.createSetting('show-test-addresses-in-autofill-menu-on-event', false);
|
|
24
25
|
this.#showTestAddressesInAutofillMenu.addChangeListener(this.#setTestAddresses, this);
|
|
25
26
|
target.registerAutofillDispatcher(this);
|
|
26
27
|
this.enable();
|
|
@@ -79,10 +79,9 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
79
79
|
void this.enable();
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
this
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.moduleSetting<boolean>('css-source-maps-enabled')
|
|
82
|
+
const settings = this.target().targetManager().settings;
|
|
83
|
+
this.#sourceMapManager.setEnabled(settings.moduleSetting<boolean>('css-source-maps-enabled').get());
|
|
84
|
+
settings.moduleSetting<boolean>('css-source-maps-enabled')
|
|
86
85
|
.addChangeListener(event => this.#sourceMapManager.setEnabled(event.data));
|
|
87
86
|
}
|
|
88
87
|
|
|
@@ -225,7 +225,7 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
225
225
|
const range = this.range.relativeTo(this.ownerStyle.range.startLine, this.ownerStyle.range.startColumn);
|
|
226
226
|
const indentation = this.ownerStyle.cssText ?
|
|
227
227
|
this.detectIndentation(this.ownerStyle.cssText) :
|
|
228
|
-
|
|
228
|
+
this.ownerStyle.cssModel().target().targetManager().settings.moduleSetting('text-editor-indent').get();
|
|
229
229
|
const endIndentation = this.ownerStyle.cssText ? indentation.substring(0, this.ownerStyle.range.endColumn) : '';
|
|
230
230
|
const text = new TextUtils.Text.Text(this.ownerStyle.cssText || '');
|
|
231
231
|
const newStyleText = text.replaceRange(range, Platform.StringUtilities.sprintf(';%s;', propertyText));
|
|
@@ -153,7 +153,7 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
153
153
|
replMode: true,
|
|
154
154
|
allowUnsafeEvalBlockedByCSP: false,
|
|
155
155
|
},
|
|
156
|
-
|
|
156
|
+
this.target().targetManager().settings.moduleSetting('console-user-activation-eval').get(),
|
|
157
157
|
/* awaitPromise */ false);
|
|
158
158
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConsoleEvaluated);
|
|
159
159
|
if ('error' in result) {
|
|
@@ -284,7 +284,8 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
private clearIfNecessary(): void {
|
|
287
|
-
|
|
287
|
+
const settings = this.target().targetManager().settings;
|
|
288
|
+
if (!settings.moduleSetting('preserve-console-log').get()) {
|
|
288
289
|
this.clear();
|
|
289
290
|
}
|
|
290
291
|
++this.#pageLoadSequenceNumber;
|
|
@@ -292,7 +293,8 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
292
293
|
|
|
293
294
|
private primaryPageChanged(
|
|
294
295
|
event: Common.EventTarget.EventTargetEvent<{frame: ResourceTreeFrame, type: PrimaryPageChangeType}>): void {
|
|
295
|
-
|
|
296
|
+
const settings = this.target().targetManager().settings;
|
|
297
|
+
if (settings.moduleSetting('preserve-console-log').get()) {
|
|
296
298
|
const {frame} = event.data;
|
|
297
299
|
if (frame.backForwardCacheDetails.restoredFromCache) {
|
|
298
300
|
Common.Console.Console.instance().log(i18nString(UIStrings.bfcacheNavigation, {PH1: frame.url}));
|
|
@@ -353,25 +355,25 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
353
355
|
}
|
|
354
356
|
|
|
355
357
|
// messages[] are not ordered by timestamp.
|
|
356
|
-
static allMessagesUnordered(): ConsoleMessage[] {
|
|
358
|
+
static allMessagesUnordered(targetManager: TargetManager = TargetManager.instance()): ConsoleMessage[] {
|
|
357
359
|
const messages = [];
|
|
358
|
-
for (const target of
|
|
360
|
+
for (const target of targetManager.targets()) {
|
|
359
361
|
const targetMessages = target.model(ConsoleModel)?.messages() || [];
|
|
360
362
|
messages.push(...targetMessages);
|
|
361
363
|
}
|
|
362
364
|
return messages;
|
|
363
365
|
}
|
|
364
366
|
|
|
365
|
-
static requestClearMessages(): void {
|
|
366
|
-
for (const logModel of
|
|
367
|
+
static requestClearMessages(targetManager: TargetManager = TargetManager.instance()): void {
|
|
368
|
+
for (const logModel of targetManager.models(LogModel)) {
|
|
367
369
|
logModel.requestClear();
|
|
368
370
|
}
|
|
369
|
-
for (const runtimeModel of
|
|
371
|
+
for (const runtimeModel of targetManager.models(RuntimeModel)) {
|
|
370
372
|
runtimeModel.discardConsoleEntries();
|
|
371
373
|
// Runtime.discardConsoleEntries implies Runtime.releaseObjectGroup('console').
|
|
372
374
|
runtimeModel.releaseObjectGroup('live-expression');
|
|
373
375
|
}
|
|
374
|
-
for (const target of
|
|
376
|
+
for (const target of targetManager.targets()) {
|
|
375
377
|
target.model(ConsoleModel)?.clear();
|
|
376
378
|
}
|
|
377
379
|
}
|
|
@@ -390,9 +392,9 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
390
392
|
return this.#errors;
|
|
391
393
|
}
|
|
392
394
|
|
|
393
|
-
static allErrors(): number {
|
|
395
|
+
static allErrors(targetManager: TargetManager = TargetManager.instance()): number {
|
|
394
396
|
let errors = 0;
|
|
395
|
-
for (const target of
|
|
397
|
+
for (const target of targetManager.targets()) {
|
|
396
398
|
errors += target.model(ConsoleModel)?.errors() || 0;
|
|
397
399
|
}
|
|
398
400
|
return errors;
|
|
@@ -402,9 +404,9 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
402
404
|
return this.#warnings;
|
|
403
405
|
}
|
|
404
406
|
|
|
405
|
-
static allWarnings(): number {
|
|
407
|
+
static allWarnings(targetManager: TargetManager = TargetManager.instance()): number {
|
|
406
408
|
let warnings = 0;
|
|
407
|
-
for (const target of
|
|
409
|
+
for (const target of targetManager.targets()) {
|
|
408
410
|
warnings += target.model(ConsoleModel)?.warnings() || 0;
|
|
409
411
|
}
|
|
410
412
|
return warnings;
|
|
@@ -99,8 +99,9 @@ export class CookieModel extends SDKModel<EventTypes> {
|
|
|
99
99
|
if (cookie.expires()) {
|
|
100
100
|
expires = Math.floor(Date.parse(`${cookie.expires()}`) / 1000);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
Root.Runtime.
|
|
102
|
+
const schemeBindingEnabled =
|
|
103
|
+
Boolean(Root.Runtime.hostConfig.devToolsEnableOriginBoundCookies?.schemeBindingEnabled);
|
|
104
|
+
const portBindingEnabled = Boolean(Root.Runtime.hostConfig.devToolsEnableOriginBoundCookies?.portBindingEnabled);
|
|
104
105
|
const preserveUnset = (scheme: Protocol.Network.CookieSourceScheme): Protocol.Network.CookieSourceScheme.Unset|
|
|
105
106
|
undefined => scheme === Protocol.Network.CookieSourceScheme.Unset ? scheme : undefined;
|
|
106
107
|
const protocolCookie = {
|
|
@@ -115,8 +116,8 @@ export class CookieModel extends SDKModel<EventTypes> {
|
|
|
115
116
|
expires,
|
|
116
117
|
priority: cookie.priority(),
|
|
117
118
|
partitionKey: cookie.partitionKey(),
|
|
118
|
-
sourceScheme:
|
|
119
|
-
sourcePort:
|
|
119
|
+
sourceScheme: schemeBindingEnabled ? cookie.sourceScheme() : preserveUnset(cookie.sourceScheme()),
|
|
120
|
+
sourcePort: portBindingEnabled ? cookie.sourcePort() : undefined,
|
|
120
121
|
};
|
|
121
122
|
const response = await this.target().networkAgent().invoke_setCookie(protocolCookie);
|
|
122
123
|
const error = response.getError();
|