chrome-devtools-frontend 1.0.1598808 → 1.0.1601661

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/.agents/README.md +13 -0
  2. package/{agents/prompts/creating-a-model.md → .agents/skills/creating-a-model/SKILL.md} +7 -1
  3. package/{agents/prompts/devtools-imports.md → .agents/skills/devtools-imports/SKILL.md} +10 -5
  4. package/{agents/prompts/merging-devtools-module.md → .agents/skills/merging-devtools-module/SKILL.md} +5 -0
  5. package/{agents/prompts/ui-widgets.md → .agents/skills/ui-widgets/SKILL.md} +5 -0
  6. package/{agents/prompts/verification.md → .agents/skills/verification/SKILL.md} +5 -0
  7. package/front_end/core/common/Settings.ts +24 -1
  8. package/front_end/core/dom_extension/DOMExtension.ts +1 -0
  9. package/front_end/core/host/AidaClient.ts +5 -2
  10. package/front_end/core/host/AidaGcaTranslation.ts +377 -0
  11. package/front_end/core/host/GcaTypes.ts +520 -0
  12. package/front_end/core/host/UserMetrics.ts +0 -3
  13. package/front_end/core/host/host.ts +4 -0
  14. package/front_end/core/root/ExperimentNames.ts +0 -3
  15. package/front_end/core/sdk/CPUThrottlingManager.ts +12 -9
  16. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  17. package/front_end/core/sdk/SourceMap.ts +4 -2
  18. package/front_end/entrypoints/main/MainImpl.ts +1 -12
  19. package/front_end/generated/Deprecation.ts +16 -0
  20. package/front_end/generated/InspectorBackendCommands.ts +4 -6
  21. package/front_end/generated/protocol.ts +46 -77
  22. package/front_end/models/ai_assistance/AiConversation.ts +49 -22
  23. package/front_end/models/ai_assistance/AiHistoryStorage.snapshot.txt +1 -1
  24. package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -0
  25. package/front_end/models/ai_assistance/ConversationHandler.ts +16 -11
  26. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +76 -36
  27. package/front_end/models/ai_assistance/agents/AiAgent.ts +26 -2
  28. package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +0 -1
  29. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
  30. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +39 -0
  31. package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +53 -12
  32. package/front_end/models/ai_assistance/agents/FileAgent.ts +0 -15
  33. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +0 -5
  34. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +57 -0
  35. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +87 -15
  36. package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +0 -10
  37. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -6
  38. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -5
  39. package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
  40. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +84 -0
  41. package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +172 -0
  42. package/front_end/models/breakpoints/BreakpointManager.ts +20 -12
  43. package/front_end/models/emulation/DeviceModeModel.ts +5 -1
  44. package/front_end/models/emulation/EmulatedDevices.ts +3 -2
  45. package/front_end/models/javascript_metadata/NativeFunctions.js +60 -0
  46. package/front_end/models/lighthouse/LighthouseReporterTypes.ts +104 -10
  47. package/front_end/models/lighthouse/RunTypes.ts +42 -0
  48. package/front_end/models/lighthouse/lighthouse.ts +2 -0
  49. package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +59 -35
  50. package/front_end/models/stack_trace/StackTrace.ts +5 -0
  51. package/front_end/models/stack_trace/StackTraceImpl.ts +7 -1
  52. package/front_end/models/stack_trace/StackTraceModel.ts +2 -1
  53. package/front_end/models/stack_trace/stack_trace.ts +4 -0
  54. package/front_end/models/trace/ModelImpl.ts +4 -0
  55. package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -8
  56. package/front_end/models/trace/types/Configuration.ts +0 -5
  57. package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -3
  58. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +163 -74
  59. package/front_end/panels/ai_assistance/ExportConversation.ts +25 -0
  60. package/front_end/panels/ai_assistance/ai_assistance.ts +2 -0
  61. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -0
  62. package/front_end/panels/ai_assistance/components/ChatMessage.ts +120 -32
  63. package/front_end/panels/ai_assistance/components/ChatView.ts +44 -0
  64. package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +240 -0
  65. package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +4 -12
  66. package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +5 -27
  67. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +115 -17
  68. package/front_end/panels/ai_assistance/components/chatMessage.css +65 -1
  69. package/front_end/panels/ai_assistance/components/chatView.css +8 -0
  70. package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +82 -0
  71. package/front_end/panels/ai_assistance/components/walkthroughView.css +9 -1
  72. package/front_end/panels/animation/AnimationTimeline.ts +5 -5
  73. package/front_end/panels/application/AppManifestView.ts +13 -7
  74. package/front_end/panels/application/FrameDetailsView.ts +4 -4
  75. package/front_end/panels/application/preloading/PreloadingView.ts +2 -4
  76. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +6 -3
  77. package/front_end/panels/application/preloading/components/PreloadingString.ts +15 -2
  78. package/front_end/panels/application/preloading/helper/PreloadingForward.ts +31 -2
  79. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
  80. package/front_end/panels/common/DOMLinkifier.ts +10 -8
  81. package/front_end/panels/console/ConsoleView.ts +24 -2
  82. package/front_end/panels/console/ConsoleViewMessage.ts +22 -23
  83. package/front_end/panels/console/console.ts +0 -2
  84. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +5 -5
  85. package/front_end/panels/elements/ElementsTreeElement.ts +2 -3
  86. package/front_end/panels/elements/PropertiesWidget.ts +5 -3
  87. package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -9
  88. package/front_end/panels/elements/StylePropertiesSection.ts +98 -50
  89. package/front_end/panels/elements/StylePropertyTreeElement.ts +38 -4
  90. package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +43 -35
  91. package/front_end/panels/elements/StylesSidebarPane.ts +154 -24
  92. package/front_end/panels/elements/components/ComputedStyleTrace.ts +3 -2
  93. package/front_end/panels/event_listeners/EventListenersView.ts +16 -4
  94. package/front_end/panels/explain/components/ConsoleInsight.ts +6 -9
  95. package/front_end/panels/explain/explain-meta.ts +5 -0
  96. package/front_end/panels/issues/AffectedResourcesView.ts +5 -9
  97. package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +1 -1
  98. package/front_end/panels/lighthouse/LighthouseController.ts +154 -164
  99. package/front_end/panels/lighthouse/LighthousePanel.ts +5 -9
  100. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -0
  101. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +9 -6
  102. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -6
  103. package/front_end/panels/lighthouse/LighthouseStatusView.ts +32 -8
  104. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +7 -3
  105. package/front_end/panels/network/NetworkDataGridNode.ts +34 -0
  106. package/front_end/panels/network/NetworkLogViewColumns.ts +10 -0
  107. package/front_end/panels/network/RequestPayloadView.ts +4 -1
  108. package/front_end/panels/network/RequestTimingView.ts +8 -2
  109. package/front_end/panels/performance_monitor/performanceMonitor.css +6 -4
  110. package/front_end/panels/recorder/RecorderController.ts +52 -14
  111. package/front_end/panels/recorder/components/RecordingView.ts +2 -1
  112. package/front_end/panels/recorder/models/RecordingStorage.ts +15 -20
  113. package/front_end/panels/sensors/SensorsView.ts +333 -157
  114. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +18 -4
  115. package/front_end/panels/sources/DebuggerPausedMessage.ts +6 -6
  116. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -3
  117. package/front_end/panels/sources/NavigatorView.ts +11 -7
  118. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  119. package/front_end/panels/sources/SourcesPanel.ts +12 -34
  120. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +5 -1
  121. package/front_end/panels/sources/sources-meta.ts +6 -0
  122. package/front_end/panels/timeline/StatusDialog.ts +159 -83
  123. package/front_end/panels/timeline/ThirdPartyTreeView.ts +6 -2
  124. package/front_end/panels/timeline/TimelineController.ts +0 -4
  125. package/front_end/panels/timeline/TimelineDetailsView.ts +35 -3
  126. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +6 -1
  127. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +9 -4
  128. package/front_end/panels/timeline/TimelinePanel.ts +36 -11
  129. package/front_end/panels/timeline/TimelineTreeView.ts +14 -3
  130. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -57
  131. package/front_end/panels/timeline/components/InteractionBreakdown.ts +2 -1
  132. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
  133. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +3 -7
  134. package/front_end/panels/timeline/components/Sidebar.ts +11 -19
  135. package/front_end/panels/timeline/components/SidebarInsightsTab.ts +2 -1
  136. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +60 -27
  137. package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +66 -0
  138. package/front_end/panels/timeline/components/TimelineSummary.ts +7 -19
  139. package/front_end/panels/timeline/components/components.ts +2 -0
  140. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +55 -28
  141. package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -3
  142. package/front_end/panels/timeline/components/insights/baseInsightComponent.css +7 -0
  143. package/front_end/panels/timeline/components/insights/insights.ts +0 -2
  144. package/front_end/panels/timeline/components/timelineRangeSummaryView.css +20 -0
  145. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +7 -7
  146. package/front_end/panels/timeline/timeline-meta.ts +11 -0
  147. package/front_end/panels/timeline/timelineDetailsView.css +0 -9
  148. package/front_end/third_party/chromium/README.chromium +1 -1
  149. package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +11 -2
  150. package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +11 -2
  151. package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +65 -4
  152. package/front_end/ui/kit/link/link.css +2 -2
  153. package/front_end/ui/legacy/Widget.ts +5 -3
  154. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +7 -2
  155. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +57 -35
  156. package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -0
  157. package/front_end/ui/visual_logging/KnownContextValues.ts +6 -1
  158. package/package.json +1 -1
  159. package/agents/prompts/README.md +0 -18
  160. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +0 -93
  161. /package/front_end/{panels/console → models/stack_trace}/ErrorStackParser.ts +0 -0
@@ -0,0 +1,520 @@
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
+ // Reference proto definition
6
+ // google3/google/gca/aicode/v1main/prediction_service.proto
7
+ // revision 45 2026-03-06
8
+
9
+ /**
10
+ * Type contains the list of OpenAPI data types.
11
+ */
12
+ export enum Type {
13
+ TYPE_UNSPECIFIED = 0,
14
+ STRING = 1,
15
+ NUMBER = 2,
16
+ INTEGER = 3,
17
+ BOOLEAN = 4,
18
+ ARRAY = 5,
19
+ OBJECT = 6,
20
+ NULL = 7,
21
+ }
22
+
23
+ /**
24
+ * The category of a rating.
25
+ */
26
+ export enum HarmCategory {
27
+ HARM_CATEGORY_UNSPECIFIED = 0,
28
+ HARM_CATEGORY_HARASSMENT = 7,
29
+ HARM_CATEGORY_HATE_SPEECH = 8,
30
+ HARM_CATEGORY_SEXUALLY_EXPLICIT = 9,
31
+ HARM_CATEGORY_DANGEROUS_CONTENT = 10,
32
+ }
33
+
34
+ /**
35
+ * The probability that a piece of content is harmful.
36
+ */
37
+ export enum HarmProbability {
38
+ HARM_PROBABILITY_UNSPECIFIED = 0,
39
+ NEGLIGIBLE = 1,
40
+ LOW = 2,
41
+ MEDIUM = 3,
42
+ HIGH = 4,
43
+ }
44
+
45
+ /**
46
+ * Block at and beyond a specified harm probability.
47
+ */
48
+ export enum HarmBlockThreshold {
49
+ HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0,
50
+ BLOCK_LOW_AND_ABOVE = 1,
51
+ BLOCK_MEDIUM_AND_ABOVE = 2,
52
+ BLOCK_ONLY_HIGH = 3,
53
+ BLOCK_NONE = 4,
54
+ OFF = 5,
55
+ }
56
+
57
+ export enum HarmBlockMethod {
58
+ HARM_BLOCK_METHOD_UNSPECIFIED = 0,
59
+ SEVERITY = 1,
60
+ PROBABILITY = 2,
61
+ }
62
+
63
+ /**
64
+ * Defines the reason why the model stopped generating tokens.
65
+ */
66
+ export enum FinishReason {
67
+ FINISH_REASON_UNSPECIFIED = 0,
68
+ STOP = 1,
69
+ MAX_TOKENS = 2,
70
+ SAFETY = 3,
71
+ RECITATION = 4,
72
+ OTHER = 5,
73
+ BLOCKLIST = 6,
74
+ PROHIBITED_CONTENT = 7,
75
+ SPII = 8,
76
+ MALFORMED_FUNCTION_CALL = 9,
77
+ IMAGE_SAFETY = 10,
78
+ IMAGE_PROHIBITED_CONTENT = 11,
79
+ IMAGE_RECITATION = 12,
80
+ IMAGE_OTHER = 13,
81
+ UNEXPECTED_TOOL_CALL = 14,
82
+ NO_IMAGE = 15,
83
+ }
84
+
85
+ /**
86
+ * The suggestion method used.
87
+ */
88
+ export enum Method {
89
+ METHOD_UNSPECIFIED = 0,
90
+ GENERATE_CODE = 1,
91
+ COMPLETE_CODE = 2,
92
+ TRANSFORM_CODE = 3,
93
+ CHAT = 4,
94
+ }
95
+
96
+ /**
97
+ * The status of the suggestion received.
98
+ */
99
+ export enum SuggestionStatus {
100
+ STATUS_UNSPECIFIED = 0,
101
+ NO_ERROR = 1,
102
+ ERROR = 2,
103
+ CANCELLED = 3,
104
+ EMPTY = 4,
105
+ }
106
+
107
+ /**
108
+ * The type of interaction.
109
+ */
110
+ export enum InteractionType {
111
+ INTERACTION_TYPE_UNSPECIFIED = 0,
112
+ THUMBS_UP = 1,
113
+ THUMBS_DOWN = 2,
114
+ ACCEPT = 3,
115
+ ACCEPT_PARTIALLY = 4,
116
+ REJECT = 5,
117
+ COPY = 6,
118
+ }
119
+
120
+ export enum InclusionReason {
121
+ INCLUSION_REASON_UNSPECIFIED = 0,
122
+ ACTIVE = 1,
123
+ OPEN = 2,
124
+ RECENTLY_CLOSED = 3,
125
+ RECENTLY_EDITED = 4,
126
+ COLOCATED = 5,
127
+ RELATED = 6,
128
+ USER_SELECTED = 7,
129
+ }
130
+
131
+ /**
132
+ * A list of reasons why content may have been blocked.
133
+ */
134
+ export enum BlockReason {
135
+ BLOCKED_REASON_UNSPECIFIED = 0,
136
+ SAFETY = 1,
137
+ OTHER = 2,
138
+ BLOCKLIST = 3,
139
+ PROHIBITED_CONTENT = 4,
140
+ IMAGE_SAFETY = 5,
141
+ }
142
+
143
+ /**
144
+ * Supported programming languages for the generated code.
145
+ */
146
+ export enum Language {
147
+ LANGUAGE_UNSPECIFIED = 0,
148
+ PYTHON = 1,
149
+ }
150
+
151
+ /**
152
+ * Enumeration of possible outcomes of the code execution.
153
+ */
154
+ export enum Outcome {
155
+ OUTCOME_UNSPECIFIED = 0,
156
+ OUTCOME_OK = 1,
157
+ OUTCOME_FAILED = 2,
158
+ OUTCOME_DEADLINE_EXCEEDED = 3,
159
+ }
160
+
161
+ /**
162
+ * Defines the execution behavior for function calling.
163
+ */
164
+ export enum Mode {
165
+ MODE_UNSPECIFIED = 0,
166
+ AUTO = 1,
167
+ ANY = 2,
168
+ NONE = 3,
169
+ }
170
+
171
+ /* eslint-disable @typescript-eslint/naming-convention */
172
+ export interface GenerateContentRequest {
173
+ model?: string;
174
+ aicode?: AiCodeConfig;
175
+ contents: Content[];
176
+ system_instruction?: Content;
177
+ tools?: Tool[];
178
+ tool_config?: ToolConfig;
179
+ labels?: Record<string, string>;
180
+ safety_settings?: SafetySetting[];
181
+ generation_config?: GenerationConfig;
182
+ session_id?: string;
183
+ }
184
+ /* eslint-enable @typescript-eslint/naming-convention */
185
+
186
+ export interface AiCodeConfig {
187
+ experience: string;
188
+ files?: SourceFile[];
189
+ }
190
+
191
+ /* eslint-disable @typescript-eslint/naming-convention */
192
+ export interface SourceFile {
193
+ inclusion_reason?: InclusionReason[];
194
+ file_uri: string;
195
+ programming_language?: string;
196
+ }
197
+ /* eslint-enable @typescript-eslint/naming-convention */
198
+
199
+ /* eslint-disable @typescript-eslint/naming-convention */
200
+ export interface FileEdit {
201
+ file_uri: string;
202
+ content: string;
203
+ }
204
+ /* eslint-enable @typescript-eslint/naming-convention */
205
+
206
+ export type Role = 'user'|'model';
207
+
208
+ export interface Content {
209
+ parts?: Part[];
210
+ role: Role;
211
+ }
212
+
213
+ /* eslint-disable @typescript-eslint/naming-convention */
214
+ export interface Part {
215
+ text?: string;
216
+ inline_data?: Blob;
217
+ file_data?: FileData;
218
+ function_call?: FunctionCall;
219
+ function_response?: FunctionResponse;
220
+ executable_code?: ExecutableCode;
221
+ code_execution_result?: CodeExecutionResult;
222
+ video_metadata?: VideoMetadata;
223
+ thought?: boolean;
224
+ thought_signature?: string; // bytes as base64 string
225
+ }
226
+ /* eslint-enable @typescript-eslint/naming-convention */
227
+
228
+ /* eslint-disable @typescript-eslint/naming-convention */
229
+ export interface Blob {
230
+ mime_type: string;
231
+ data: string; // bytes as base64 string
232
+ }
233
+ /* eslint-enable @typescript-eslint/naming-convention */
234
+
235
+ /* eslint-disable @typescript-eslint/naming-convention */
236
+ export interface FileData {
237
+ mime_type: string;
238
+ file_uri: string;
239
+ }
240
+ /* eslint-enable @typescript-eslint/naming-convention */
241
+
242
+ export interface FunctionCall {
243
+ name: string;
244
+ args?: Record<string, unknown>;
245
+ id?: string;
246
+ }
247
+
248
+ export interface FunctionResponse {
249
+ name: string;
250
+ response: Record<string, unknown>;
251
+ id?: string;
252
+ }
253
+
254
+ export interface ExecutableCode {
255
+ language: Language;
256
+ code: string;
257
+ }
258
+
259
+ export interface CodeExecutionResult {
260
+ outcome: Outcome;
261
+ output: string;
262
+ }
263
+
264
+ /* eslint-disable @typescript-eslint/naming-convention */
265
+ export interface Tool {
266
+ function_declarations?: FunctionDeclaration[];
267
+ google_search?: {
268
+ time_range_filter?: {
269
+ start_time?: string, // Timestamp
270
+ end_time?: string, // Timestamp
271
+ },
272
+ };
273
+ }
274
+ /* eslint-enable @typescript-eslint/naming-convention */
275
+
276
+ /* eslint-disable @typescript-eslint/naming-convention */
277
+ export interface FunctionDeclaration {
278
+ name: string;
279
+ description: string;
280
+ parameters?: Schema;
281
+ parameters_json_schema?: unknown; // google.protobuf.Value
282
+ response?: Schema;
283
+ response_json_schema?: unknown; // google.protobuf.Value
284
+ }
285
+ /* eslint-enable @typescript-eslint/naming-convention */
286
+
287
+ /* eslint-disable @typescript-eslint/naming-convention */
288
+ export interface Schema {
289
+ type?: Type;
290
+ format?: string;
291
+ description?: string;
292
+ nullable?: boolean;
293
+ enum?: string[];
294
+ items?: Schema;
295
+ properties?: Record<string, Schema>;
296
+ required?: string[];
297
+ minimum?: number;
298
+ maximum?: number;
299
+ min_length?: number;
300
+ max_length?: number;
301
+ pattern?: string;
302
+ example?: unknown; // google.protobuf.Value
303
+ }
304
+ /* eslint-enable @typescript-eslint/naming-convention */
305
+
306
+ /* eslint-disable @typescript-eslint/naming-convention */
307
+ export interface ToolConfig {
308
+ function_calling_config?: FunctionCallingConfig;
309
+ }
310
+ /* eslint-enable @typescript-eslint/naming-convention */
311
+
312
+ /* eslint-disable @typescript-eslint/naming-convention */
313
+ export interface FunctionCallingConfig {
314
+ mode: Mode;
315
+ allowed_function_names?: string[];
316
+ }
317
+ /* eslint-enable @typescript-eslint/naming-convention */
318
+
319
+ export interface SafetySetting {
320
+ category: HarmCategory;
321
+ threshold: HarmBlockThreshold;
322
+ method?: HarmBlockMethod;
323
+ }
324
+
325
+ /* eslint-disable @typescript-eslint/naming-convention */
326
+ export interface GenerationConfig {
327
+ candidate_count?: number;
328
+ stop_sequences?: string[];
329
+ max_output_tokens?: number;
330
+ temperature?: number;
331
+ top_p?: number;
332
+ top_k?: number;
333
+ seed?: number;
334
+ response_mime_type?: string;
335
+ response_schema?: Schema;
336
+ response_json_schema?: unknown; // google.protobuf.Value
337
+ presence_penalty?: number;
338
+ frequency_penalty?: number;
339
+ thinking_config?: ThinkingConfig;
340
+ }
341
+ /* eslint-enable @typescript-eslint/naming-convention */
342
+
343
+ /* eslint-disable @typescript-eslint/naming-convention */
344
+ export interface ThinkingConfig {
345
+ include_thoughts?: boolean;
346
+ thinking_budget?: number;
347
+ }
348
+ /* eslint-enable @typescript-eslint/naming-convention */
349
+
350
+ /* eslint-disable @typescript-eslint/naming-convention */
351
+ export interface GenerateContentResponse {
352
+ candidates: Candidate[];
353
+ prompt_feedback: PromptFeedback;
354
+ usage_metadata: UsageMetadata;
355
+ model_version: string;
356
+ response_id: string;
357
+ }
358
+ /* eslint-enable @typescript-eslint/naming-convention */
359
+
360
+ /* eslint-disable @typescript-eslint/naming-convention */
361
+ export interface Candidate {
362
+ index: number;
363
+ content: Content;
364
+ finish_reason: FinishReason;
365
+ safety_ratings: SafetyRating[];
366
+ citation_metadata: CitationMetadata;
367
+ grounding_metadata: GroundingMetadata;
368
+ aicode_output: AiCodeOutput;
369
+ }
370
+ /* eslint-enable @typescript-eslint/naming-convention */
371
+
372
+ export interface SafetyRating {
373
+ category: HarmCategory;
374
+ probability: HarmProbability;
375
+ blocked: boolean;
376
+ }
377
+
378
+ export interface CitationMetadata {
379
+ citations: Citation[];
380
+ }
381
+
382
+ /* eslint-disable @typescript-eslint/naming-convention */
383
+ export interface Citation {
384
+ start_index: number;
385
+ end_index: number;
386
+ uri: string;
387
+ license: string;
388
+ }
389
+ /* eslint-enable @typescript-eslint/naming-convention */
390
+
391
+ /* eslint-disable @typescript-eslint/naming-convention */
392
+ export interface GroundingMetadata {
393
+ web_search_queries?: string[];
394
+ search_entry_point?: {
395
+ rendered_content?: string,
396
+ sdk_blob?: string, // bytes as base64 string
397
+ };
398
+ grounding_chunks?: Array<{
399
+ web?: {
400
+ uri?: string,
401
+ title?: string,
402
+ },
403
+ }>;
404
+ grounding_supports?: Array<{
405
+ segment?: {
406
+ part_index?: number,
407
+ start_index?: number,
408
+ end_index?: number,
409
+ text?: string,
410
+ },
411
+ grounding_chunk_indices?: number[],
412
+ confidence_scores?: number[],
413
+ }>;
414
+ retrieval_metadata?: {
415
+ google_search_dynamic_retrieval_score?: number,
416
+ };
417
+ }
418
+ /* eslint-enable @typescript-eslint/naming-convention */
419
+
420
+ export interface AiCodeOutput {
421
+ contents: DerivedContent[];
422
+ }
423
+
424
+ /* eslint-disable @typescript-eslint/naming-convention */
425
+ export interface DerivedContent {
426
+ start_index?: number;
427
+ end_index?: number;
428
+ file?: OutputSourceFile;
429
+ code_block?: CodeBlock;
430
+ text_block?: TextBlock;
431
+ prediction_metadata?: PredictionMetadata;
432
+ }
433
+ /* eslint-enable @typescript-eslint/naming-convention */
434
+
435
+ /* eslint-disable @typescript-eslint/naming-convention */
436
+ export interface OutputSourceFile {
437
+ file_uri: string;
438
+ content: string;
439
+ }
440
+
441
+ /* eslint-disable @typescript-eslint/naming-convention */
442
+ export interface CodeBlock {
443
+ content: string;
444
+ programming_language: string;
445
+ }
446
+ /* eslint-enable @typescript-eslint/naming-convention */
447
+
448
+ export interface TextBlock {
449
+ content: string;
450
+ }
451
+
452
+ /* eslint-disable @typescript-eslint/naming-convention */
453
+ export interface PredictionMetadata {
454
+ score: number;
455
+ classifier_score: number;
456
+ }
457
+
458
+ /* eslint-disable @typescript-eslint/naming-convention */
459
+ export interface PromptFeedback {
460
+ block_reason: BlockReason;
461
+ safety_ratings: SafetyRating[];
462
+ block_reason_message: string;
463
+ }
464
+ /* eslint-enable @typescript-eslint/naming-convention */
465
+
466
+ /* eslint-disable @typescript-eslint/naming-convention */
467
+ export interface UsageMetadata {
468
+ prompt_token_count: number;
469
+ candidates_token_count: number;
470
+ total_token_count: number;
471
+ thoughts_token_count: number;
472
+ cached_content_token_count: number;
473
+ }
474
+ /* eslint-enable @typescript-eslint/naming-convention */
475
+
476
+ /* eslint-disable @typescript-eslint/naming-convention */
477
+ export interface VideoMetadata {
478
+ start_offset?: string; // Duration
479
+ end_offset?: string; // Duration
480
+ fps?: number;
481
+ }
482
+ /* eslint-enable @typescript-eslint/naming-convention */
483
+
484
+ /* eslint-disable @typescript-eslint/naming-convention */
485
+ export interface SendTelemetryRequest {
486
+ feedback_metrics: FeedbackMetric[];
487
+ }
488
+ /* eslint-enable @typescript-eslint/naming-convention */
489
+
490
+ /* eslint-disable @typescript-eslint/naming-convention */
491
+ export interface FeedbackMetric {
492
+ event_time: string; // Timestamp
493
+ response_id: string;
494
+ suggestion_offered?: SuggestionOffered;
495
+ suggestion_interaction?: SuggestionInteraction;
496
+ }
497
+ /* eslint-enable @typescript-eslint/naming-convention */
498
+
499
+ /* eslint-disable @typescript-eslint/naming-convention */
500
+ export interface SuggestionOffered {
501
+ method?: Method;
502
+ status?: SuggestionStatus;
503
+ first_message_latency?: string; // Duration
504
+ response_latency?: string; // Duration
505
+ displayed?: boolean;
506
+ e2e_latency?: string; // Duration
507
+ display_duration?: string; // Duration
508
+ programming_language?: string;
509
+ }
510
+ /* eslint-enable @typescript-eslint/naming-convention */
511
+
512
+ /* eslint-disable @typescript-eslint/naming-convention */
513
+ export interface SuggestionInteraction {
514
+ interaction?: InteractionType;
515
+ accepted_lines?: number;
516
+ accepted_characters?: number;
517
+ accepted_comment_lines?: number;
518
+ candidate_index?: number;
519
+ }
520
+ /* eslint-enable @typescript-eslint/naming-convention */
@@ -818,14 +818,11 @@ export enum DevtoolsExperiments {
818
818
  'show-option-to-expose-internals-in-heap-snapshot' = 18,
819
819
  'timeline-invalidation-tracking' = 26,
820
820
  'timeline-show-all-events' = 27,
821
- 'timeline-v8-runtime-call-stats' = 28,
822
821
  apca = 39,
823
822
  'font-editor' = 41,
824
823
  'full-accessibility-tree' = 42,
825
824
  'experimental-cookie-features' = 45,
826
825
  'instrumentation-breakpoints' = 61,
827
- 'authored-deployed-grouping' = 63,
828
- 'just-my-code' = 65,
829
826
  'use-source-map-scopes' = 76,
830
827
  'timeline-debug-mode' = 93,
831
828
  'durable-messages' = 110,
@@ -3,7 +3,9 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as AidaClient from './AidaClient.js';
6
+ import * as AidaGcaTranslation from './AidaGcaTranslation.js';
6
7
  import * as DispatchHttpRequestClient from './DispatchHttpRequestClient.js';
8
+ import * as GcaTypes from './GcaTypes.js';
7
9
  import * as GdpClient from './GdpClient.js';
8
10
  import * as InspectorFrontendHost from './InspectorFrontendHost.js';
9
11
  import * as InspectorFrontendHostAPI from './InspectorFrontendHostAPI.js';
@@ -13,7 +15,9 @@ import * as UserMetrics from './UserMetrics.js';
13
15
 
14
16
  export {
15
17
  AidaClient,
18
+ AidaGcaTranslation,
16
19
  DispatchHttpRequestClient,
20
+ GcaTypes,
17
21
  GdpClient,
18
22
  InspectorFrontendHost,
19
23
  InspectorFrontendHostAPI,
@@ -11,14 +11,11 @@ export enum ExperimentName {
11
11
  SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT = 'show-option-to-expose-internals-in-heap-snapshot',
12
12
  TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
13
13
  TIMELINE_SHOW_ALL_EVENTS = 'timeline-show-all-events',
14
- TIMELINE_V8_RUNTIME_CALL_STATS = 'timeline-v8-runtime-call-stats',
15
14
  APCA = 'apca',
16
15
  FONT_EDITOR = 'font-editor',
17
16
  FULL_ACCESSIBILITY_TREE = 'full-accessibility-tree',
18
17
  EXPERIMENTAL_COOKIE_FEATURES = 'experimental-cookie-features',
19
18
  INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
20
- AUTHORED_DEPLOYED_GROUPING = 'authored-deployed-grouping',
21
- JUST_MY_CODE = 'just-my-code',
22
19
  USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
23
20
  TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
24
21
  DURABLE_MESSAGES = 'durable-messages',
@@ -39,24 +39,27 @@ let throttlingManagerInstance: CPUThrottlingManager|undefined;
39
39
 
40
40
  export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
41
41
  SDKModelObserver<EmulationModel> {
42
+ readonly #targetManager: TargetManager;
42
43
  #cpuThrottlingOption: CPUThrottlingOption;
43
44
  #calibratedThrottlingSetting: Common.Settings.Setting<CalibratedCPUThrottling>;
44
45
  #hardwareConcurrency?: number;
45
46
  #pendingMainTargetPromise?: (r: number) => void;
46
47
 
47
- private constructor() {
48
+ private constructor(settings: Common.Settings.Settings, targetManager: TargetManager) {
48
49
  super();
50
+ this.#targetManager = targetManager;
49
51
  this.#cpuThrottlingOption = NoThrottlingOption;
50
- this.#calibratedThrottlingSetting = Common.Settings.Settings.instance().createSetting<CalibratedCPUThrottling>(
52
+ this.#calibratedThrottlingSetting = settings.createSetting<CalibratedCPUThrottling>(
51
53
  'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
52
54
  this.#calibratedThrottlingSetting.addChangeListener(this.#onCalibratedSettingChanged, this);
53
- TargetManager.instance().observeModels(EmulationModel, this);
55
+ targetManager.observeModels(EmulationModel, this);
54
56
  }
55
57
 
56
58
  static instance(opts: {forceNew: boolean|null} = {forceNew: null}): CPUThrottlingManager {
57
59
  const {forceNew} = opts;
58
60
  if (!throttlingManagerInstance || forceNew) {
59
- throttlingManagerInstance = new CPUThrottlingManager();
61
+ throttlingManagerInstance =
62
+ new CPUThrottlingManager(Common.Settings.Settings.instance(), TargetManager.instance());
60
63
  }
61
64
 
62
65
  return throttlingManagerInstance;
@@ -88,7 +91,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
88
91
  return;
89
92
  }
90
93
 
91
- for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
94
+ for (const emulationModel of this.#targetManager.models(EmulationModel)) {
92
95
  void emulationModel.setCPUThrottlingRate(rate);
93
96
  }
94
97
  this.dispatchEventToListeners(Events.RATE_CHANGED, rate);
@@ -100,7 +103,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
100
103
  }
101
104
 
102
105
  this.#cpuThrottlingOption = option;
103
- for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
106
+ for (const emulationModel of this.#targetManager.models(EmulationModel)) {
104
107
  void emulationModel.setCPUThrottlingRate(this.#cpuThrottlingOption.rate());
105
108
  }
106
109
  this.dispatchEventToListeners(Events.RATE_CHANGED, this.#cpuThrottlingOption.rate());
@@ -108,7 +111,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
108
111
 
109
112
  setHardwareConcurrency(concurrency: number): void {
110
113
  this.#hardwareConcurrency = concurrency;
111
- for (const emulationModel of TargetManager.instance().models(EmulationModel)) {
114
+ for (const emulationModel of this.#targetManager.models(EmulationModel)) {
112
115
  void emulationModel.setHardwareConcurrency(concurrency);
113
116
  }
114
117
  this.dispatchEventToListeners(Events.HARDWARE_CONCURRENCY_CHANGED, this.#hardwareConcurrency);
@@ -119,14 +122,14 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
119
122
  // target may error. So if we get any errors here at all, assume that we do
120
123
  // not have a target.
121
124
  try {
122
- return TargetManager.instance().primaryPageTarget() !== null;
125
+ return this.#targetManager.primaryPageTarget() !== null;
123
126
  } catch {
124
127
  return false;
125
128
  }
126
129
  }
127
130
 
128
131
  async getHardwareConcurrency(): Promise<number> {
129
- const target = TargetManager.instance().primaryPageTarget();
132
+ const target = this.#targetManager.primaryPageTarget();
130
133
  const existingCallback = this.#pendingMainTargetPromise;
131
134
 
132
135
  // If the main target hasn't attached yet, block callers until it appears.
@@ -754,7 +754,7 @@ export class ResourceTreeFrame {
754
754
  return this.#domainAndRegistry;
755
755
  }
756
756
 
757
- async getAdScriptAncestry(frameId: Protocol.Page.FrameId): Promise<Protocol.Page.AdScriptAncestry|null> {
757
+ async getAdScriptAncestry(frameId: Protocol.Page.FrameId): Promise<Protocol.Network.AdAncestry|null> {
758
758
  const res = await this.#model.agent.invoke_getAdScriptAncestry({frameId});
759
759
  return res.adScriptAncestry || null;
760
760
  }
@@ -175,9 +175,11 @@ export class SourceMap {
175
175
  // Ensure scriptUrl is associated with sourceMap sources
176
176
  const sourceIdx = this.#sourceIndex(scriptUrl);
177
177
  if (sourceIdx >= 0) {
178
- if (!this.#scopesInfo) {
179
- // First time seeing this sourcemap, create an new empty scopesInfo object
178
+ if (!this.#scopesInfo || this.#scopesFallbackPromise !== undefined) {
179
+ // First time seeing this sourcemap, create an new empty scopesInfo object.
180
+ // Also reset the fallback scope info since the extension will provide it.
180
181
  this.#scopesInfo = new SourceMapScopesInfo(this, {scopes: [], ranges: []});
182
+ this.#scopesFallbackPromise = undefined;
181
183
  }
182
184
  if (!this.#scopesInfo.hasOriginalScopes(sourceIdx)) {
183
185
  const originalScopes = buildOriginalScopes(ranges);
@@ -369,8 +369,6 @@ export class MainImpl {
369
369
  Root.ExperimentNames.ExperimentName.TIMELINE_INVALIDATION_TRACKING, 'Performance panel: invalidation tracking');
370
370
  Root.Runtime.experiments.register(
371
371
  Root.ExperimentNames.ExperimentName.TIMELINE_SHOW_ALL_EVENTS, 'Performance panel: show all events');
372
- Root.Runtime.experiments.register(
373
- Root.ExperimentNames.ExperimentName.TIMELINE_V8_RUNTIME_CALL_STATS, 'Performance panel: V8 runtime call stats');
374
372
  Root.Runtime.experiments.register(
375
373
  Root.ExperimentNames.ExperimentName.TIMELINE_DEBUG_MODE,
376
374
  'Performance panel: debug mode (trace event details, etc)');
@@ -403,16 +401,6 @@ export class MainImpl {
403
401
  Root.Runtime.experiments.register(
404
402
  Root.ExperimentNames.ExperimentName.EXPERIMENTAL_COOKIE_FEATURES, 'Experimental cookie features');
405
403
 
406
- // Change grouping of sources panel to use Authored/Deployed trees
407
- Root.Runtime.experiments.register(
408
- Root.ExperimentNames.ExperimentName.AUTHORED_DEPLOYED_GROUPING,
409
- 'Group sources into authored and deployed trees', 'https://goo.gle/authored-deployed',
410
- 'https://goo.gle/authored-deployed-feedback');
411
-
412
- // Hide third party code (as determined by ignore lists or source maps)
413
- Root.Runtime.experiments.register(
414
- Root.ExperimentNames.ExperimentName.JUST_MY_CODE, 'Hide ignore-listed code in Sources tree view');
415
-
416
404
  Root.Runtime.experiments.registerHostExperiment({
417
405
  name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
418
406
  title: 'Durable Messages',
@@ -516,6 +504,7 @@ export class MainImpl {
516
504
  workspace: Workspace.Workspace.WorkspaceImpl.instance(),
517
505
  targetManager,
518
506
  debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),
507
+ settings: Common.Settings.Settings.instance(),
519
508
  });
520
509
  // @ts-expect-error e2e test global
521
510
  self.Extensions.extensionServer = PanelCommon.ExtensionServer.ExtensionServer.instance({forceNew: true});