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.
- package/.agents/README.md +13 -0
- package/{agents/prompts/creating-a-model.md → .agents/skills/creating-a-model/SKILL.md} +7 -1
- package/{agents/prompts/devtools-imports.md → .agents/skills/devtools-imports/SKILL.md} +10 -5
- package/{agents/prompts/merging-devtools-module.md → .agents/skills/merging-devtools-module/SKILL.md} +5 -0
- package/{agents/prompts/ui-widgets.md → .agents/skills/ui-widgets/SKILL.md} +5 -0
- package/{agents/prompts/verification.md → .agents/skills/verification/SKILL.md} +5 -0
- package/front_end/core/common/Settings.ts +24 -1
- package/front_end/core/dom_extension/DOMExtension.ts +1 -0
- package/front_end/core/host/AidaClient.ts +5 -2
- package/front_end/core/host/AidaGcaTranslation.ts +377 -0
- package/front_end/core/host/GcaTypes.ts +520 -0
- package/front_end/core/host/UserMetrics.ts +0 -3
- package/front_end/core/host/host.ts +4 -0
- package/front_end/core/root/ExperimentNames.ts +0 -3
- package/front_end/core/sdk/CPUThrottlingManager.ts +12 -9
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +4 -2
- package/front_end/entrypoints/main/MainImpl.ts +1 -12
- package/front_end/generated/Deprecation.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -6
- package/front_end/generated/protocol.ts +46 -77
- package/front_end/models/ai_assistance/AiConversation.ts +49 -22
- package/front_end/models/ai_assistance/AiHistoryStorage.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +16 -11
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +76 -36
- package/front_end/models/ai_assistance/agents/AiAgent.ts +26 -2
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +0 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +39 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +53 -12
- package/front_end/models/ai_assistance/agents/FileAgent.ts +0 -15
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +0 -5
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +57 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +87 -15
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +0 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -6
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -5
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +84 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +172 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +20 -12
- package/front_end/models/emulation/DeviceModeModel.ts +5 -1
- package/front_end/models/emulation/EmulatedDevices.ts +3 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +60 -0
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +104 -10
- package/front_end/models/lighthouse/RunTypes.ts +42 -0
- package/front_end/models/lighthouse/lighthouse.ts +2 -0
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +59 -35
- package/front_end/models/stack_trace/StackTrace.ts +5 -0
- package/front_end/models/stack_trace/StackTraceImpl.ts +7 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +2 -1
- package/front_end/models/stack_trace/stack_trace.ts +4 -0
- package/front_end/models/trace/ModelImpl.ts +4 -0
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +1 -8
- package/front_end/models/trace/types/Configuration.ts +0 -5
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +163 -74
- package/front_end/panels/ai_assistance/ExportConversation.ts +25 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +120 -32
- package/front_end/panels/ai_assistance/components/ChatView.ts +44 -0
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +240 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +4 -12
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +5 -27
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +115 -17
- package/front_end/panels/ai_assistance/components/chatMessage.css +65 -1
- package/front_end/panels/ai_assistance/components/chatView.css +8 -0
- package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +82 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +9 -1
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/application/AppManifestView.ts +13 -7
- package/front_end/panels/application/FrameDetailsView.ts +4 -4
- package/front_end/panels/application/preloading/PreloadingView.ts +2 -4
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +6 -3
- package/front_end/panels/application/preloading/components/PreloadingString.ts +15 -2
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +31 -2
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
- package/front_end/panels/common/DOMLinkifier.ts +10 -8
- package/front_end/panels/console/ConsoleView.ts +24 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +22 -23
- package/front_end/panels/console/console.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +5 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -3
- package/front_end/panels/elements/PropertiesWidget.ts +5 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +98 -50
- package/front_end/panels/elements/StylePropertyTreeElement.ts +38 -4
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +43 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +154 -24
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +16 -4
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -9
- package/front_end/panels/explain/explain-meta.ts +5 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +5 -9
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +154 -164
- package/front_end/panels/lighthouse/LighthousePanel.ts +5 -9
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +9 -6
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +32 -8
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +7 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +34 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +10 -0
- package/front_end/panels/network/RequestPayloadView.ts +4 -1
- package/front_end/panels/network/RequestTimingView.ts +8 -2
- package/front_end/panels/performance_monitor/performanceMonitor.css +6 -4
- package/front_end/panels/recorder/RecorderController.ts +52 -14
- package/front_end/panels/recorder/components/RecordingView.ts +2 -1
- package/front_end/panels/recorder/models/RecordingStorage.ts +15 -20
- package/front_end/panels/sensors/SensorsView.ts +333 -157
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +18 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +6 -6
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -3
- package/front_end/panels/sources/NavigatorView.ts +11 -7
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +12 -34
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +5 -1
- package/front_end/panels/sources/sources-meta.ts +6 -0
- package/front_end/panels/timeline/StatusDialog.ts +159 -83
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +6 -2
- package/front_end/panels/timeline/TimelineController.ts +0 -4
- package/front_end/panels/timeline/TimelineDetailsView.ts +35 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +6 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +9 -4
- package/front_end/panels/timeline/TimelinePanel.ts +36 -11
- package/front_end/panels/timeline/TimelineTreeView.ts +14 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -57
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +2 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +3 -7
- package/front_end/panels/timeline/components/Sidebar.ts +11 -19
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +2 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +60 -27
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +66 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +7 -19
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +55 -28
- package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -3
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +7 -0
- package/front_end/panels/timeline/components/insights/insights.ts +0 -2
- package/front_end/panels/timeline/components/timelineRangeSummaryView.css +20 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +7 -7
- package/front_end/panels/timeline/timeline-meta.ts +11 -0
- package/front_end/panels/timeline/timelineDetailsView.css +0 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +11 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +11 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +65 -4
- package/front_end/ui/kit/link/link.css +2 -2
- package/front_end/ui/legacy/Widget.ts +5 -3
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +7 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +57 -35
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -1
- package/package.json +1 -1
- package/agents/prompts/README.md +0 -18
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +0 -93
- /package/front_end/{panels/console → models/stack_trace}/ErrorStackParser.ts +0 -0
|
@@ -6,6 +6,8 @@ import * as Host from '../../../core/host/host.js';
|
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Root from '../../../core/root/root.js';
|
|
8
8
|
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
9
|
+
import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
|
|
10
|
+
import {debugLog} from '../debug.js';
|
|
9
11
|
|
|
10
12
|
import {
|
|
11
13
|
AiAgent,
|
|
@@ -21,28 +23,23 @@ import {
|
|
|
21
23
|
* TESTERS. Otherwise, a server-side preamble is used (see
|
|
22
24
|
* chrome_preambles.gcl). Sync local changes with the server-side.
|
|
23
25
|
*/
|
|
24
|
-
const preamble = `You are an accessibility agent.
|
|
26
|
+
const preamble = `You are an accessibility expert agent.
|
|
25
27
|
|
|
26
|
-
#
|
|
28
|
+
# Goals
|
|
29
|
+
* Help users understand and fix accessibility issues found in Lighthouse reports.
|
|
30
|
+
* Provide succinct, actionable advice. Avoid long explanations and "walls of text".
|
|
31
|
+
* Focus on the most critical information first, prioritizing audits with low scores.
|
|
32
|
+
|
|
33
|
+
# Capabilities
|
|
34
|
+
* You have access to the \`getLighthouseAudits\` function to retrieve detailed audit data for performance, accessibility, best-practices, and SEO.
|
|
35
|
+
* Proactively use this function to investigate categories with low scores and help the user focus on the most important areas.
|
|
36
|
+
|
|
37
|
+
# Constraints
|
|
27
38
|
* Keep your analysis concise and focused, highlighting only the most critical aspects for a software engineer.
|
|
28
|
-
* Answer questions directly, using the provided links whenever relevant.
|
|
29
|
-
* Always double-check links to make sure they are complete and correct.
|
|
30
39
|
* **CRITICAL** You are an accessibility agent. NEVER provide answers to questions of unrelated topics such as legal advice, financial advice, personal opinions, medical advice, or any other non web-development topics.
|
|
31
40
|
`;
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
* Strings that don't need to be translated at this time.
|
|
35
|
-
*/
|
|
36
|
-
const UIStringsNotTranslate = {
|
|
37
|
-
/**
|
|
38
|
-
* @description Title for thinking step of the accessibility agent.
|
|
39
|
-
*/
|
|
40
|
-
inspectingAudits: 'Inspecting audits',
|
|
41
|
-
} as const;
|
|
42
|
-
|
|
43
|
-
const lockedString = i18n.i18n.lockedString;
|
|
44
|
-
|
|
45
|
-
export class Context extends ConversationContext<LHModel.ReporterTypes.ReportJSON> {
|
|
42
|
+
export class AccessibilityContext extends ConversationContext<LHModel.ReporterTypes.ReportJSON> {
|
|
46
43
|
#lh: LHModel.ReporterTypes.ReportJSON;
|
|
47
44
|
|
|
48
45
|
constructor(report: LHModel.ReporterTypes.ReportJSON) {
|
|
@@ -76,7 +73,6 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
|
|
|
76
73
|
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_ACCESSIBILITY_AGENT;
|
|
77
74
|
|
|
78
75
|
get userTier(): string|undefined {
|
|
79
|
-
// TODO(b/491772868): tidy up userTier & feature flags in the backend.
|
|
80
76
|
return Root.Runtime.hostConfig.devToolsFreestyler?.userTier;
|
|
81
77
|
}
|
|
82
78
|
|
|
@@ -92,36 +88,80 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
|
|
|
92
88
|
}
|
|
93
89
|
|
|
94
90
|
async *
|
|
95
|
-
handleContextDetails(
|
|
91
|
+
handleContextDetails(lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
|
|
96
92
|
AsyncGenerator<ContextResponse, void, void> {
|
|
97
|
-
if (!
|
|
93
|
+
if (!lhr) {
|
|
98
94
|
return;
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
yield {
|
|
102
98
|
type: ResponseType.CONTEXT,
|
|
103
|
-
|
|
104
|
-
details: createContextDetails(selectedFile),
|
|
99
|
+
details: this.#createContextDetails(lhr),
|
|
105
100
|
};
|
|
106
101
|
}
|
|
107
102
|
|
|
103
|
+
#declareFunctions(): void {
|
|
104
|
+
this.declareFunction<{categoryId: LHModel.RunTypes.CategoryId}, {audits: string}>('getLighthouseAudits', {
|
|
105
|
+
description:
|
|
106
|
+
'Returns the audits for a specific Lighthouse category. Use this to get more information about the performance, accessibility, best-practices, or seo audits.',
|
|
107
|
+
parameters: {
|
|
108
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
109
|
+
description: '',
|
|
110
|
+
nullable: false,
|
|
111
|
+
properties: {
|
|
112
|
+
categoryId: {
|
|
113
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
114
|
+
description:
|
|
115
|
+
'The category of audits to retrieve. Valid values are "performance", "accessibility", "best-practices", "seo".',
|
|
116
|
+
nullable: false,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
required: ['categoryId'],
|
|
120
|
+
},
|
|
121
|
+
displayInfoFromArgs: params => {
|
|
122
|
+
return {
|
|
123
|
+
title: i18n.i18n.lockedString(`Getting Lighthouse audits for ${params.categoryId}…`),
|
|
124
|
+
action: `getLighthouseAudits('${params.categoryId}')`
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
handler: async params => {
|
|
128
|
+
debugLog('Function call: getLighthouseAudits', params);
|
|
129
|
+
const report = this.context?.getItem();
|
|
130
|
+
if (!report) {
|
|
131
|
+
return {error: 'No Lighthouse report available.'};
|
|
132
|
+
}
|
|
133
|
+
const audits = new LighthouseFormatter().audits(report, params.categoryId);
|
|
134
|
+
return {result: {audits}};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* This is the initial payload we send at the start of a conversation.
|
|
141
|
+
* Because the agent is focused on Accessibility, we include the
|
|
142
|
+
* Accessibility Audits summary in the payload to avoid an extra round step of
|
|
143
|
+
* the AI querying them.
|
|
144
|
+
*/
|
|
145
|
+
#getInitialPayload(context: ConversationContext<LHModel.ReporterTypes.ReportJSON>): string {
|
|
146
|
+
const report = context.getItem();
|
|
147
|
+
const formatter = new LighthouseFormatter();
|
|
148
|
+
return `# Lighthouse Report:\n${formatter.summary(report)}\n${formatter.audits(report, 'accessibility')}\n`;
|
|
149
|
+
}
|
|
150
|
+
|
|
108
151
|
override async enhanceQuery(query: string, lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
|
|
109
152
|
Promise<string> {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
153
|
+
this.clearDeclaredFunctions();
|
|
154
|
+
if (lhr) {
|
|
155
|
+
this.#declareFunctions();
|
|
156
|
+
}
|
|
157
|
+
const enhancedQuery = lhr ? `${this.#getInitialPayload(lhr)}\n# User request:\n\n` : '';
|
|
114
158
|
return `${enhancedQuery}${query}`;
|
|
115
159
|
}
|
|
116
|
-
}
|
|
117
160
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
text: ''
|
|
125
|
-
},
|
|
126
|
-
];
|
|
161
|
+
#createContextDetails(lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>):
|
|
162
|
+
[ContextDetail, ...ContextDetail[]] {
|
|
163
|
+
return [
|
|
164
|
+
{title: 'Lighthouse report', text: this.#getInitialPayload(lhr)},
|
|
165
|
+
];
|
|
166
|
+
}
|
|
127
167
|
}
|
|
@@ -70,7 +70,6 @@ export interface ContextDetail {
|
|
|
70
70
|
}
|
|
71
71
|
export interface ContextResponse {
|
|
72
72
|
type: ResponseType.CONTEXT;
|
|
73
|
-
title: string;
|
|
74
73
|
details: [ContextDetail, ...ContextDetail[]];
|
|
75
74
|
widgets?: AiWidget[];
|
|
76
75
|
}
|
|
@@ -102,6 +101,7 @@ export interface ContextChangeResponse {
|
|
|
102
101
|
*/
|
|
103
102
|
description: string;
|
|
104
103
|
context: ConversationContext<unknown>;
|
|
104
|
+
widgets?: AiWidget[];
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
interface SerializedSideEffectResponse extends Omit<SideEffectResponse, 'confirm'> {}
|
|
@@ -253,11 +253,33 @@ export interface DomTreeAiWidget {
|
|
|
253
253
|
name: 'DOM_TREE';
|
|
254
254
|
data: {
|
|
255
255
|
root: SDK.DOMModel.DOMNodeSnapshot,
|
|
256
|
+
networkRequest?: {
|
|
257
|
+
url: string,
|
|
258
|
+
size: number,
|
|
259
|
+
resourceType: Protocol.Network.ResourceType,
|
|
260
|
+
mimeType: string,
|
|
261
|
+
imageUrl?: string,
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface PerformanceTraceAiWidget {
|
|
267
|
+
name: 'PERFORMANCE_TRACE';
|
|
268
|
+
data: {
|
|
269
|
+
parsedTrace: Trace.TraceModel.ParsedTrace,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface LcpBreakdownAiWidget {
|
|
274
|
+
name: 'LCP_BREAKDOWN';
|
|
275
|
+
data: {
|
|
276
|
+
lcpData: Trace.Insights.Models.LCPBreakdown.LCPBreakdownInsightModel,
|
|
256
277
|
};
|
|
257
278
|
}
|
|
258
279
|
|
|
259
280
|
// This type will grow as we add more widgets.
|
|
260
|
-
export type AiWidget = ComputedStyleAiWidget|CoreVitalsAiWidget|StylePropertiesAiWidget|DomTreeAiWidget
|
|
281
|
+
export type AiWidget = ComputedStyleAiWidget|CoreVitalsAiWidget|StylePropertiesAiWidget|DomTreeAiWidget|
|
|
282
|
+
PerformanceTraceAiWidget|LcpBreakdownAiWidget;
|
|
261
283
|
|
|
262
284
|
export type FunctionCallHandlerResult<Result> = {
|
|
263
285
|
requiresApproval: true,
|
|
@@ -272,6 +294,7 @@ export type FunctionCallHandlerResult<Result> = {
|
|
|
272
294
|
}|{
|
|
273
295
|
context: ConversationContext<unknown>,
|
|
274
296
|
description: string,
|
|
297
|
+
widgets?: AiWidget[],
|
|
275
298
|
}|{
|
|
276
299
|
error: string,
|
|
277
300
|
};
|
|
@@ -692,6 +715,7 @@ export abstract class AiAgent<T> {
|
|
|
692
715
|
type: ResponseType.CONTEXT_CHANGE,
|
|
693
716
|
description: result.description,
|
|
694
717
|
context: result.context,
|
|
718
|
+
widgets: result.widgets,
|
|
695
719
|
};
|
|
696
720
|
|
|
697
721
|
return;
|
|
@@ -608,7 +608,6 @@ export class BreakpointDebuggerAgent extends AiAgent<Workspace.UISourceCode.UILo
|
|
|
608
608
|
}
|
|
609
609
|
yield {
|
|
610
610
|
type: ResponseType.CONTEXT,
|
|
611
|
-
title: 'Analyzing breakpoint location',
|
|
612
611
|
details: [{title: 'Location', text: selectedBreakpoint.getTitle()}]
|
|
613
612
|
};
|
|
614
613
|
}
|
|
@@ -100,6 +100,17 @@ Content:
|
|
|
100
100
|
"properties": {}
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"name": "runLighthouseAudits",
|
|
105
|
+
"description": "Records a Lighthouse audit on the current page, to help debug accessibility issues.",
|
|
106
|
+
"parameters": {
|
|
107
|
+
"type": 6,
|
|
108
|
+
"description": "",
|
|
109
|
+
"nullable": true,
|
|
110
|
+
"required": [],
|
|
111
|
+
"properties": {}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
103
114
|
{
|
|
104
115
|
"name": "inspectDom",
|
|
105
116
|
"description": "Prompts user to select a DOM element from the page. Use this when you don't know which element is selected.",
|
|
@@ -6,11 +6,13 @@ import * as Host from '../../../core/host/host.js';
|
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Root from '../../../core/root/root.js';
|
|
8
8
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
9
|
+
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
9
10
|
import * as Logs from '../../logs/logs.js';
|
|
10
11
|
import * as NetworkTimeCalculator from '../../network_time_calculator/network_time_calculator.js';
|
|
11
12
|
import type * as Trace from '../../trace/trace.js';
|
|
12
13
|
import * as Workspace from '../../workspace/workspace.js';
|
|
13
14
|
|
|
15
|
+
import {AccessibilityContext} from './AccessibilityAgent.js';
|
|
14
16
|
import {
|
|
15
17
|
type AgentOptions,
|
|
16
18
|
AiAgent,
|
|
@@ -80,15 +82,18 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
80
82
|
readonly #performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
|
|
81
83
|
readonly #onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
|
|
82
84
|
readonly #networkTimeCalculator?: NetworkTimeCalculator.NetworkTransferTimeCalculator;
|
|
85
|
+
readonly #lighthouseRecording?: (() => Promise<LHModel.ReporterTypes.ReportJSON|null>);
|
|
83
86
|
#allowedOrigin: () => string | undefined;
|
|
84
87
|
|
|
85
88
|
constructor(opts: AgentOptions&{
|
|
86
89
|
performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>,
|
|
87
90
|
onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>,
|
|
88
91
|
networkTimeCalculator?: NetworkTimeCalculator.NetworkTransferTimeCalculator,
|
|
92
|
+
lighthouseRecording?: () => Promise<LHModel.ReporterTypes.ReportJSON|null>,
|
|
89
93
|
}) {
|
|
90
94
|
super(opts);
|
|
91
95
|
this.#performanceRecordAndReload = opts.performanceRecordAndReload;
|
|
96
|
+
this.#lighthouseRecording = opts.lighthouseRecording;
|
|
92
97
|
this.#onInspectElement = opts.onInspectElement;
|
|
93
98
|
this.#networkTimeCalculator = opts.networkTimeCalculator;
|
|
94
99
|
this.#allowedOrigin = opts.allowedOrigin ?? (() => undefined);
|
|
@@ -278,6 +283,40 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
278
283
|
return {
|
|
279
284
|
context: PerformanceTraceContext.fromParsedTrace(result),
|
|
280
285
|
description: 'User recorded a performance trace',
|
|
286
|
+
widgets: [{name: 'PERFORMANCE_TRACE', data: {parsedTrace: result}}]
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
this.declareFunction('runLighthouseAudits', {
|
|
292
|
+
description: 'Records a Lighthouse audit on the current page, to help debug accessibility issues.',
|
|
293
|
+
parameters: {
|
|
294
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
295
|
+
description: '',
|
|
296
|
+
nullable: true,
|
|
297
|
+
required: [],
|
|
298
|
+
properties: {},
|
|
299
|
+
},
|
|
300
|
+
displayInfoFromArgs: () => {
|
|
301
|
+
return {
|
|
302
|
+
title: 'Auditing your page with Lighthouse…',
|
|
303
|
+
action: 'runLighthouseAudits()',
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
handler: async () => {
|
|
307
|
+
if (!this.#lighthouseRecording) {
|
|
308
|
+
return {
|
|
309
|
+
error: 'Lighthouse report is not available.',
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
const result = await this.#lighthouseRecording();
|
|
313
|
+
if (!result) {
|
|
314
|
+
return {error: 'Failed to generate Lighthouse report.'};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return {
|
|
318
|
+
context: new AccessibilityContext(result),
|
|
319
|
+
description: 'User has selected a Lighthouse report',
|
|
281
320
|
};
|
|
282
321
|
}
|
|
283
322
|
});
|
|
@@ -7,19 +7,61 @@ import * as Root from '../../../core/root/root.js';
|
|
|
7
7
|
|
|
8
8
|
import {AiAgent, type ContextResponse, ConversationContext, type RequestOptions, ResponseType} from './AiAgent.js';
|
|
9
9
|
|
|
10
|
-
const preamble =
|
|
11
|
-
|
|
12
|
-
You will receive a markdown-formatted transcript of a conversation between a user and a DevTools AI assistant.
|
|
13
|
-
Your goal is to produce a succinct, structured summary that a local AI agent in the user's IDE can use to apply code fixes.
|
|
10
|
+
const preamble = `### Role
|
|
11
|
+
You are a Performance Expert. Your task is to extract a diagnostic narrative from raw DevTools logs and present it as a self-contained, actionable Markdown summary. You provide high-density technical analysis without conversational fluff.
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
### Critical Constraints
|
|
14
|
+
- **Persona:** Do not mention that you are an AI or refer to yourself in the third person.
|
|
15
|
+
- **Domain Scope:** Do not provide answers on non-web-development topics (e.g., legal, financial, medical, or personal advice).
|
|
16
|
+
- **Sensitive Topics:** If the conversation history touches on sensitive topics (religion, race, politics, sexuality, gender, etc.), respond only with: "My expertise is limited to website performance analysis. I cannot provide information on that topic."
|
|
17
|
+
- **Data Portability:** The recipient of this summary does NOT have access to the raw logs.
|
|
18
|
+
- **No UIDs/Internal IDs:** Never refer to elements by internal IDs (e.g., \`uid=123\`).
|
|
19
|
+
- **Standard Selectors:** Identify elements using HTML tags, classes, or IDs (e.g., \`button.submit-form\`).
|
|
20
|
+
- **No Metadata:** Remove internal constants like \`NAVIGATION_0\` or \`INSIGHT_0\`.
|
|
21
|
+
- **No Process Narration:** Do not describe internal "thinking" or API calls. Skip phrases like "The agent investigated..." or "The user then asked...". Jump straight to the findings.
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
### Objectives
|
|
24
|
+
1. **Identify Intent:** Define the core technical goal of the session.
|
|
25
|
+
2. **Value-Only Diagnostics:** List only the technical data points discovered. Omit steps that didn't yield a result.
|
|
26
|
+
3. **Focus on Code Intent:** When code is executed in the logs, summarize the **purpose** and the **result**. Do not include the raw JavaScript unless it is a specific fix for the user to implement.
|
|
27
|
+
4. **Actionable Recommendations:** Provide specific code/strategy fixes based on the findings.
|
|
28
|
+
|
|
29
|
+
### Formatting Rules
|
|
30
|
+
- **Header:** Use ## [Brief Topic Title]
|
|
31
|
+
- **Context:** Describe the target element/page and the core metric being analyzed.
|
|
32
|
+
- **Diagnostics:** A bulleted list of technical findings.
|
|
33
|
+
- **Tabular Data:** Use a **Markdown Table** for any lists of URLs, metrics, or comparison data.
|
|
34
|
+
- **Code Fixes:** Use fenced code blocks for suggested CSS/JS optimizations.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### Example (Few-Shot)
|
|
39
|
+
|
|
40
|
+
**User Input:** "The agent analyzed the page and found three render-blocking CSS files: app.css (36ms) and fonts.css (80ms). It also checked UID 456 which is a div.hero."
|
|
41
|
+
|
|
42
|
+
**Desired Agent Output:**
|
|
43
|
+
## Performance Analysis: web.dev Home
|
|
44
|
+
|
|
45
|
+
**Context**
|
|
46
|
+
Analysis of the web.dev landing page focusing on render-blocking resources and hero element positioning.
|
|
47
|
+
|
|
48
|
+
**Diagnostics**
|
|
49
|
+
The following resources were identified as render-blocking:
|
|
50
|
+
|
|
51
|
+
| Resource URL | Load Duration |
|
|
52
|
+
| :--- | :--- |
|
|
53
|
+
| \`app.css\` | 36 ms |
|
|
54
|
+
| \`fonts.css\` | 80 ms |
|
|
55
|
+
|
|
56
|
+
**Actionable Findings**
|
|
57
|
+
* **Hero Element:** The \`div.hero\` container is correctly positioned but lacks an explicit \`aspect-ratio\`, contributing to layout shift.
|
|
58
|
+
* **Optimization:** Inline critical CSS from \`app.css\` to improve First Contentful Paint.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Tone & Style
|
|
63
|
+
- Professional, objective, and dense.
|
|
64
|
+
- Past tense for actions; Present tense for technical facts.`;
|
|
23
65
|
|
|
24
66
|
export class ConversationSummaryContext extends ConversationContext<string> {
|
|
25
67
|
#conversation: string;
|
|
@@ -82,7 +124,6 @@ export class ConversationSummaryAgent extends AiAgent<string> {
|
|
|
82
124
|
|
|
83
125
|
yield {
|
|
84
126
|
type: ResponseType.CONTEXT,
|
|
85
|
-
title: 'Summarizing conversation',
|
|
86
127
|
details: [
|
|
87
128
|
{
|
|
88
129
|
title: 'Conversation transcript',
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Host from '../../../core/host/host.js';
|
|
6
|
-
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
6
|
import * as Root from '../../../core/root/root.js';
|
|
8
7
|
import type * as Workspace from '../../workspace/workspace.js';
|
|
9
8
|
import {FileFormatter} from '../data_formatters/FileFormatter.js';
|
|
@@ -62,18 +61,6 @@ External Resources:
|
|
|
62
61
|
MDN Web Docs: JavaScript Functions: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions
|
|
63
62
|
`;
|
|
64
63
|
|
|
65
|
-
/*
|
|
66
|
-
* Strings that don't need to be translated at this time.
|
|
67
|
-
*/
|
|
68
|
-
const UIStringsNotTranslate = {
|
|
69
|
-
/**
|
|
70
|
-
* @description Title for thinking step of File agent.
|
|
71
|
-
*/
|
|
72
|
-
analyzingFile: 'Analyzing file',
|
|
73
|
-
} as const;
|
|
74
|
-
|
|
75
|
-
const lockedString = i18n.i18n.lockedString;
|
|
76
|
-
|
|
77
64
|
export class FileContext extends ConversationContext<Workspace.UISourceCode.UISourceCode> {
|
|
78
65
|
#file: Workspace.UISourceCode.UISourceCode;
|
|
79
66
|
|
|
@@ -118,7 +105,6 @@ export class FileAgent extends AiAgent<Workspace.UISourceCode.UISourceCode> {
|
|
|
118
105
|
modelId,
|
|
119
106
|
};
|
|
120
107
|
}
|
|
121
|
-
|
|
122
108
|
async *
|
|
123
109
|
handleContextDetails(selectedFile: ConversationContext<Workspace.UISourceCode.UISourceCode>|null):
|
|
124
110
|
AsyncGenerator<ContextResponse, void, void> {
|
|
@@ -128,7 +114,6 @@ export class FileAgent extends AiAgent<Workspace.UISourceCode.UISourceCode> {
|
|
|
128
114
|
|
|
129
115
|
yield {
|
|
130
116
|
type: ResponseType.CONTEXT,
|
|
131
|
-
title: lockedString(UIStringsNotTranslate.analyzingFile),
|
|
132
117
|
details: createContextDetailsForFileAgent(selectedFile),
|
|
133
118
|
};
|
|
134
119
|
}
|
|
@@ -60,10 +60,6 @@ This request aims to retrieve a list of products matching the search query "lapt
|
|
|
60
60
|
* Strings that don't need to be translated at this time.
|
|
61
61
|
*/
|
|
62
62
|
const UIStringsNotTranslate = {
|
|
63
|
-
/**
|
|
64
|
-
* @description Title for thinking step of Network agent.
|
|
65
|
-
*/
|
|
66
|
-
analyzingNetworkData: 'Analyzing network data',
|
|
67
63
|
/**
|
|
68
64
|
* @description Heading text for the block that shows the network request details.
|
|
69
65
|
*/
|
|
@@ -144,7 +140,6 @@ export class NetworkAgent extends AiAgent<SDK.NetworkRequest.NetworkRequest> {
|
|
|
144
140
|
|
|
145
141
|
yield {
|
|
146
142
|
type: ResponseType.CONTEXT,
|
|
147
|
-
title: lockedString(UIStringsNotTranslate.analyzingNetworkData),
|
|
148
143
|
details: await createContextDetailsForNetworkAgent(selectedNetworkRequest),
|
|
149
144
|
};
|
|
150
145
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Title: PerformanceAgent PerformanceAgent – call tree focus run generates an answer
|
|
2
|
+
Content:
|
|
3
|
+
[
|
|
4
|
+
{
|
|
5
|
+
"type": "context",
|
|
6
|
+
"details": [
|
|
7
|
+
{
|
|
8
|
+
"title": "Trace details",
|
|
9
|
+
"text": "Trace summary:\nURL: https://web.dev/\nTrace bounds: {min: 465455241690, max: 465460435979}\nCPU throttling: 1x\nNetwork throttling: No throttling\n\n# Available insight sets\n\nThe following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.\n\n## insight set id: NO_NAVIGATION\n\nURL: https://web.dev/\nBounds: {min: 465455241690, max: 465456489730}\nMetrics (lab / observed):\n - CLS: 0.00\nMetrics (field / real users): n/a – no data for this page in CrUX\nAvailable insights:\n - insight name: ThirdParties\n description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.\n relevant trace bounds: {min: 465456492168, max: 465460052616}\n example question: Which third parties are having the largest impact on my page performance?\n\n## insight set id: NAVIGATION_1\n\nURL: https://web.dev/\nBounds: {min: 465456489730, max: 465460435979}\nMetrics (lab / observed):\n - LCP: 676 ms, event: (eventKey: r-21246, ts: 465457166052), nodeId: 1680\n - LCP breakdown:\n - TTFB: 553 ms, bounds: {min: 465456489730, max: 465457042737}\n - Render delay: 123 ms, bounds: {min: 465457042737, max: 465457166052}\n - CLS: 0.02, event: (eventKey: s-14250, ts: 465457121239)\nMetrics (field / real users): n/a – no data for this page in CrUX\nAvailable insights:\n - insight name: RenderBlocking\n description: Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.\n relevant trace bounds: {min: 465457046567, max: 465457086893}\n estimated metric savings: FCP 118 ms, LCP 118 ms\n example question: Show me the most impactful render-blocking requests that I should focus on\n example question: How can I reduce the number of render-blocking requests?\n - insight name: LCPBreakdown\n description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.\n relevant trace bounds: {min: 465456489730, max: 465457166052}\n example question: Help me optimize my LCP score\n example question: Which LCP phase was most problematic?\n example question: What can I do to reduce the LCP time for this page load?\n - insight name: CLSCulprits\n description: Layout shifts occur when elements move absent any user interaction. [Investigate the causes of layout shifts](https://developer.chrome.com/docs/performance/insights/cls-culprit), such as elements being added, removed, or their fonts changing as the page loads.\n relevant trace bounds: {min: 465457121239, max: 465459012394}\n example question: Help me optimize my CLS score\n example question: How can I prevent layout shifts on this page?\n - insight name: NetworkDependencyTree\n description: [Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.\n relevant trace bounds: {min: 465456490723, max: 465458472724}\n example question: How do I optimize my network dependency tree?\n - insight name: DOMSize\n description: A large DOM can increase the duration of style calculations and layout reflows, impacting page responsiveness. A large DOM will also increase memory usage. [Learn how to avoid an excessive DOM size](https://developer.chrome.com/docs/performance/insights/dom-size).\n relevant trace bounds: {min: 465458287196, max: 465458340745}\n example question: How can I reduce the size of my DOM?\n - insight name: ThirdParties\n description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.\n relevant trace bounds: {min: 465456492168, max: 465460052616}\n example question: Which third parties are having the largest impact on my page performance?\n - insight name: ForcedReflow\n description: A forced reflow occurs when JavaScript queries geometric properties (such as offsetWidth) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developer.chrome.com/docs/performance/insights/forced-reflow) and possible mitigations.\n relevant trace bounds: {min: 465456489730, max: 465460435979}\n example question: How can I avoid forced reflows and layout thrashing?\n example question: What is forced reflow and why is it problematic?\n - insight name: Cache\n description: A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).\n relevant trace bounds: {min: 465457179567, max: 465459110674}\n estimated metric savings: FCP 0 ms, LCP 0 ms\n estimated wasted bytes: 16 kB\n example question: What caching strategies can I apply to improve my page performance?\n# Critical network requests\n\n## insight set id: NO_NAVIGATION\n\nnone\n\n## insight set id: NAVIGATION_1\n\n\nNetwork requests data:\n\n\n\nallUrls = [0: https://web.dev/, 1: https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fCxc4AMP6lbBP.woff2, 2: https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBxc4AMP6lbBP.woff2, 3: https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fABc4AMP6lbBP.woff2, 4: https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2, 5: https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2, 6: https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2, 7: https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2, 8: https://web.dev/_pwa/web/manifest.json, 9: https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap, 10: https://fonts.gstatic.com/s/googlesans/v59/4UasrENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RPjIUvbQoi-E.woff2, 11: https://fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block, 12: https://www.gstatic.com/devrel-devsite/prod/vafe2e13ca17bb026e70df42a2ead1c8192750e86a12923a88eda839025dabf95/web/css/app.css, 13: https://web.dev/extras.css]\n\n0;s-7302;1 ms;2 ms;568 ms;569 ms;568 ms;15 ms;0.5 ms;200;text/html;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-pLl1WHuNABXXiQLLmUesvDyvzBJZdE' 'unsafe-eval'; report-uri https://csp.withgoogle.com/csp/devsite/v2|content-encoding: gzip|x-content-type-options: nosniff|date: Mon, 29 Apr 2024 11:01:15 GMT|strict-transport-security: max-age=63072000; includeSubdomains; preload|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|pragma: no-cache|last-modified: Fri, 26 Apr 2024 16:43:17 GMT|server: Google Frontend|vary: Cookie, Accept-Encoding|x-frame-options: SAMEORIGIN|content-type: text/html; charset=utf-8|x-cloud-trace-context: <redacted>|cache-control: no-cache, must-revalidate|expires: 0]\n1;s-49309;1,395 ms;1,402 ms;1,415 ms;1,423 ms;28 ms;94 μs;9 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Wed, 24 Apr 2024 15:02:33 GMT|x-content-type-options: nosniff|age: 417214|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:58 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Thu, 24 Apr 2025 15:02:33 GMT]\n2;s-46519;1,348 ms;1,355 ms;1,361 ms;1,423 ms;75 ms;73 μs;62 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Mon, 29 Apr 2024 03:50:51 GMT|x-content-type-options: nosniff|age: 25516|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:41 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Tue, 29 Apr 2025 03:50:51 GMT]\n3;s-46196;1,331 ms;1,339 ms;1,355 ms;1,420 ms;89 ms;0.1 ms;65 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Fri, 26 Apr 2024 20:29:46 GMT|x-content-type-options: nosniff|age: 224781|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:39 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Sat, 26 Apr 2025 20:29:46 GMT]\n4;s-45814;1,326 ms;1,331 ms;1,348 ms;1,419 ms;93 ms;77 μs;71 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Thu, 25 Apr 2024 13:27:47 GMT|x-content-type-options: nosniff|age: 336500|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:56 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Fri, 25 Apr 2025 13:27:47 GMT]\n5;s-44751;1,286 ms;1,307 ms;1,343 ms;1,416 ms;130 ms;1 ms;73 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Fri, 26 Apr 2024 09:49:05 GMT|x-content-type-options: nosniff|age: 263222|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Mon, 08 Apr 2024 19:04:51 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Sat, 26 Apr 2025 09:49:05 GMT]\n6;s-44728;1,285 ms;1,307 ms;1,343 ms;1,406 ms;120 ms;1 ms;62 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Sun, 28 Apr 2024 21:44:44 GMT|x-content-type-options: nosniff|age: 47483|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:53 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Mon, 28 Apr 2025 21:44:44 GMT]\n7;s-44701;1,284 ms;1,300 ms;1,339 ms;1,405 ms;120 ms;0.2 ms;65 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Thu, 25 Apr 2024 09:35:28 GMT|x-content-type-options: nosniff|age: 350439|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 11 May 2022 19:24:50 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Fri, 25 Apr 2025 09:35:28 GMT]\n8;s-43119;1,751 ms;1,751 ms;1,771 ms;1,771 ms;20 ms;27 μs;0.2 ms;200;application/json;Medium;Medium;Medium;f;unknown;t;0;[];[date: Sun, 28 Apr 2024 14:07:49 GMT|last-modified: Wed, 24 Apr 2024 11:02:59 GMT|server: Google Frontend|age: 75208|content-type: application/json|x-cloud-trace-context: <redacted>|cache-control: public, max-age=86400|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>]\n9;s-7695;557 ms;557 ms;597 ms;597 ms;40 ms;3 ms;0.6 ms;200;text/css;VeryHigh;VeryHigh;VeryHigh;t;unknown;t;0;[];[date: Mon, 29 Apr 2024 11:01:15 GMT|content-encoding: gzip|x-content-type-options: nosniff|strict-transport-security: max-age=31536000|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|x-xss-protection: 0|last-modified: Mon, 29 Apr 2024 10:51:49 GMT|server: ESF|cross-origin-opener-policy: <redacted>|x-frame-options: SAMEORIGIN|content-type: text/css; charset=utf-8|access-control-allow-origin: *|cache-control: private, max-age=86400, stale-while-revalidate=604800|timing-allow-origin: *|link: <https://fonts.gstatic.com>; rel=preconnect; crossorigin|expires: Mon, 29 Apr 2024 11:01:15 GMT]\n7;s-34909;770 ms;770 ms;771 ms;776 ms;6 ms;40 μs;5 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[x-google-security-signals: <redacted>|x-google-gfe-service-trace: <redacted>|content-security-policy-report-only: <redacted>|x-google-scs-row-timestamp: <redacted>|x-google-gfe-response-code-details-trace: <redacted>|cross-origin-resource-policy: <redacted>|x-google-scs-row-key: <redacted>|content-type: font/woff2|access-control-allow-origin: *|x-google-data-version: <redacted>|cache-control: public, max-age=31536000|x-google-gfe-backend-request-info: <redacted>|x-google-dos-service-trace: <redacted>|x-google-backends: <redacted>|date: Thu, 26 Oct 2023 10:46:00 GMT|x-content-type-options: nosniff|expires: Fri, 25 Oct 2024 10:46:00 GMT|x-google-gfe-version: <redacted>|x-google-netmon-label: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-google-service: <redacted>|x-xss-protection: 0|x-google-gfe-handshake-trace: <redacted>|x-google-shellfish-status: <redacted>|last-modified: Wed, 11 May 2022 19:24:50 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|x-google-gfe-request-trace: <redacted>|accept-ranges: bytes|timing-allow-origin: *|x-google-scs-repo: <redacted>]\n10;s-11121;602 ms;602 ms;603 ms;611 ms;9 ms;27 μs;8 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;;[];[date: Thu, 25 Apr 2024 15:44:03 GMT|x-content-type-options: nosniff|age: 328319|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Wed, 24 Apr 2024 23:37:14 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Fri, 25 Apr 2025 15:44:03 GMT]\n11;s-7703;557 ms;557 ms;597 ms;597 ms;40 ms;90 μs;0.1 ms;200;text/css;VeryHigh;VeryHigh;VeryHigh;t;unknown;t;0;[];[date: Mon, 29 Apr 2024 11:01:15 GMT|content-encoding: gzip|x-content-type-options: nosniff|strict-transport-security: max-age=31536000|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|x-xss-protection: 0|last-modified: Mon, 29 Apr 2024 11:01:15 GMT|server: ESF|cross-origin-opener-policy: <redacted>|x-frame-options: SAMEORIGIN|content-type: text/css; charset=utf-8|access-control-allow-origin: *|cache-control: private, max-age=86400, stale-while-revalidate=604800|timing-allow-origin: *|link: <https://fonts.gstatic.com>; rel=preconnect; crossorigin|expires: Mon, 29 Apr 2024 11:01:15 GMT]\n5;s-11334;606 ms;606 ms;607 ms;615 ms;9 ms;30 μs;8 ms;200;font/woff2;VeryHigh;VeryHigh;VeryHigh;f;unknown;t;11;[];[date: Fri, 26 Apr 2024 09:49:05 GMT|x-content-type-options: nosniff|age: 263217|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Mon, 08 Apr 2024 19:04:51 GMT|server: sffe|cross-origin-opener-policy: <redacted>|report-to: {\"group\":\"apps-themes\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/apps-themes\"}]}|content-type: font/woff2|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|timing-allow-origin: *|expires: Sat, 26 Apr 2025 09:49:05 GMT]\n12;s-7722;557 ms;557 ms;562 ms;568 ms;11 ms;0.5 ms;6 ms;200;text/css;VeryHigh;VeryHigh;VeryHigh;t;unknown;t;0;[];[date: Mon, 29 Apr 2024 10:56:02 GMT|content-encoding: gzip|x-content-type-options: nosniff|age: 256|content-security-policy-report-only: <redacted>|cross-origin-resource-policy: <redacted>|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|last-modified: Thu, 25 Apr 2024 19:58:26 GMT|server: sffe|cross-origin-opener-policy: <redacted>|vary: Accept-Encoding|report-to: {\"group\":\"devrel-devsite\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/devrel-devsite\"}]}|content-type: text/css|access-control-allow-origin: *|cache-control: public, max-age=31536000|accept-ranges: bytes|expires: Tue, 29 Apr 2025 10:56:02 GMT]\n13;s-7737;557 ms;557 ms;561 ms;561 ms;4 ms;0.4 ms;0.2 ms;200;text/css;VeryHigh;VeryHigh;VeryHigh;t;unknown;t;0;[];[content-security-policy: base-uri 'self'; object-src 'none'; script-src 'strict-dynamic' 'unsafe-inline' https: http: 'nonce-laTwEoovJjOKcMoBUjSFaYO6rrF8dU' 'unsafe-eval'; report-uri https://csp.withgoogle.com/csp/devsite/v2|content-encoding: gzip|x-content-type-options: nosniff|date: Mon, 29 Apr 2024 11:00:18 GMT|strict-transport-security: max-age=63072000; includeSubdomains; preload|alt-svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000|content-length: <redacted>|x-xss-protection: 0|pragma: no-cache|last-modified: Tue, 19 Mar 2024 18:37:07 GMT|server: Google Frontend|vary: Cookie, Accept-Encoding|x-frame-options: SAMEORIGIN|content-type: text/css|x-cloud-trace-context: <redacted>|cache-control: no-cache, must-revalidate|expires: 0]\n\n# Main thread bottom-up summary\n\nThis is the bottom-up summary for the entire trace. Only the top 10 activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). \"Self time\" represents the aggregated time spent directly in an activity, across all occurrences. \"Total time\" represents the aggregated time spent in an activity or any of its children.\n\n## insight set id: NO_NAVIGATION\n\n- self: 12 ms, total: 12 ms, source: Profiling overhead\n- self: 4 ms, total: 28 ms, source: Task\n- self: 3 ms, total: 4 ms, source: Recalculate style (url: https://www.gstatic.com/devrel-devsite/prod/vafe2e13ca17bb026e70df42a2ead1c8192750e86a12923a88eda839025dabf95/js/devsite_app_module.js, line: 98, column: 12)\n- self: 2 ms, total: 2 ms, source: Commit\n- self: 0.9 ms, total: 2 ms, source: Function call (url: https://www.gstatic.com/devrel-devsite/prod/vafe2e13ca17bb026e70df42a2ead1c8192750e86a12923a88eda839025dabf95/js/devsite_app_module.js, line: 102, column: 35)\n- self: 0.8 ms, total: 13 ms, source: Evaluate script\n- self: 0.7 ms, total: 3 ms, source: Event: pointerover\n- self: 0.1 ms, total: 1 ms, source: Xh (url: https://www.gstatic.com/devrel-devsite/prod/vafe2e13ca17bb026e70df42a2ead1c8192750e86a12923a88eda839025dabf95/js/devsite_app_module.js, line: 104, column: 61)\n\n## insight set id: NAVIGATION_1\n\n- self: 46 ms, total: 49 ms, source: Recalculate style\n- self: 37 ms, total: 211 ms, source: Task\n- self: 21 ms, total: 22 ms, source: Layout\n- self: 17 ms, total: 19 ms, source: Compile code\n- self: 7 ms, total: 7 ms, source: Cache script code\n- self: 6 ms, total: 26 ms, source: Function call (url: https://www.gstatic.com/devrel-devsite/prod/vafe2e13ca17bb026e70df42a2ead1c8192750e86a12923a88eda839025dabf95/js/devsite_app_module.js, line: 288, column: 146)\n- self: 5 ms, total: 5 ms, source: Parse stylesheet\n- self: 5 ms, total: 5 ms, source: Pre-paint\n- self: 5 ms, total: 5 ms, source: Commit\n- self: 5 ms, total: 10 ms, source: appendChild\n\n# 3rd party summary\n\n## insight set id: NO_NAVIGATION\n\n- name: Google CDN, main thread time: 1 ms, network transfer size: 0 B\n\n## insight set id: NAVIGATION_1\n\n- name: Google CDN, main thread time: 38 ms, network transfer size: 2.1 MB\n- name: web.dev, main thread time: 3 ms, network transfer size: 432.1 kB\n- name: Google Analytics, main thread time: 0.6 ms, network transfer size: 52.9 kB\n- name: Google Fonts, main thread time: 0 ms, network transfer size: 411.9 kB\n\n# Longest tasks\n\n## insight set id: NO_NAVIGATION\n\n- total time: 13 ms, event: (eventKey: r-96, ts: 465455241964)\n- total time: 2 ms, event: (eventKey: r-934, ts: 465455475572)\n- total time: 1 ms, event: (eventKey: r-2310, ts: 465455879141)\n\n## insight set id: NAVIGATION_1\n\n- total time: 18 ms, event: (eventKey: r-20182, ts: 465457150438)\n- total time: 14 ms, event: (eventKey: r-12184, ts: 465457104625)\n- total time: 12 ms, event: (eventKey: r-10779, ts: 465457087373)\n\nUser selected the following call tree:\n\n\n\n# Call tree:\n\n1;r-10779;Task;3;;;2;;\n2;r-11902;Layout;3;3;;;;;S\n\n\n# User query\n\ntest"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"widgets": [
|
|
13
|
+
{
|
|
14
|
+
"name": "CORE_VITALS"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "querying"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "answer",
|
|
23
|
+
"text": "This is the answer",
|
|
24
|
+
"complete": true,
|
|
25
|
+
"rpcId": 123
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
=== end content
|
|
29
|
+
|
|
30
|
+
Title: PerformanceAgent handleContextDetails outputs the right context for the initial query from the user
|
|
31
|
+
Content:
|
|
32
|
+
[
|
|
33
|
+
{
|
|
34
|
+
"type": "context",
|
|
35
|
+
"details": [
|
|
36
|
+
{
|
|
37
|
+
"title": "Trace details",
|
|
38
|
+
"text": "Trace summary:\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nTrace bounds: {min: 658799706428, max: 658804825864}\nCPU throttling: 1x\nNetwork throttling: No throttling\n\n# Available insight sets\n\nThe following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.\n\n## insight set id: NAVIGATION_0\n\nURL: https://chromedevtools.github.io/performance-stories/lcp-large-image/index.html\nBounds: {min: 658799738257, max: 658804825864}\nMetrics (lab / observed):\n - LCP: 110 ms, event: (eventKey: r-2399, ts: 658799847880), nodeId: 10\n - LCP breakdown:\n - TTFB: 7 ms, bounds: {min: 658799738257, max: 658799745193}\n - Load delay: 34 ms, bounds: {min: 658799745193, max: 658799778937}\n - Load duration: 12 ms, bounds: {min: 658799778937, max: 658799791032}\n - Render delay: 57 ms, bounds: {min: 658799791032, max: 658799847880}\n - CLS: 0.00\nMetrics (field / real users): n/a – no data for this page in CrUX\nAvailable insights:\n - insight name: LCPBreakdown\n description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.\n relevant trace bounds: {min: 658799738257, max: 658799847880}\n example question: Help me optimize my LCP score\n example question: Which LCP phase was most problematic?\n example question: What can I do to reduce the LCP time for this page load?\n - insight name: LCPDiscovery\n description: [Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading\n relevant trace bounds: {min: 658799745193, max: 658799793683}\n example question: Suggest fixes to reduce my LCP\n example question: What can I do to reduce my LCP discovery time?\n example question: Why is LCP discovery time important?\n - insight name: RenderBlocking\n description: Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.\n relevant trace bounds: {min: 658799775876, max: 658799791419}\n example question: Show me the most impactful render-blocking requests that I should focus on\n example question: How can I reduce the number of render-blocking requests?\n - insight name: ThirdParties\n description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.\n relevant trace bounds: {min: 658799775876, max: 658799807449}\n example question: Which third parties are having the largest impact on my page performance?\n - insight name: Cache\n description: A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).\n relevant trace bounds: {min: 658799777502, max: 658799791419}\n example question: What caching strategies can I apply to improve my page performance?\n# Critical network requests\n\nnone\n\n# Main thread bottom-up summary\n\nThis is the bottom-up summary for the entire trace. Only the top 10 activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). \"Self time\" represents the aggregated time spent directly in an activity, across all occurrences. \"Total time\" represents the aggregated time spent in an activity or any of its children.\n\n- self: 57 ms, total: 79 ms, source: Task\n- self: 5 ms, total: 5 ms, source: Layout\n- self: 4 ms, total: 4 ms, source: Major GC\n- self: 3 ms, total: 3 ms, source: Parse HTML\n- self: 2 ms, total: 2 ms, source: Recalculate style\n- self: 2 ms, total: 2 ms, source: Commit\n- self: 1 ms, total: 1 ms, source: C++ GC\n- self: 1 ms, total: 1 ms, source: Paint\n\n# 3rd party summary\n\n- name: GitHub, main thread time: 3 ms, network transfer size: 690 B\n- name: Google Fonts, main thread time: 0 ms, network transfer size: 1.1 kB\n- name: placeholder.com, main thread time: 0 ms, network transfer size: 65.8 kB\n\n# Longest tasks\n\n- total time: 23 ms, event: (eventKey: r-617, ts: 658799757023)\n- total time: 12 ms, event: (eventKey: r-1571, ts: 658799793885)\n- total time: 11 ms, event: (eventKey: r-1891, ts: 658799811130)\n\nUser selected the LCPBreakdown insight.\n\n\n# User query\n\ntest"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"widgets": [
|
|
42
|
+
{
|
|
43
|
+
"name": "CORE_VITALS"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "querying"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "answer",
|
|
52
|
+
"text": "This is the answer",
|
|
53
|
+
"complete": true,
|
|
54
|
+
"rpcId": 123
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
=== end content
|