Skip to content

Commit 3a4877a

Browse files
AlinaVarkkidevtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
[AI] Remove SUPPORTED_INSIGHT_WIDGETS map
We now have widgets for all insights Bug: 503296282 Change-Id: Ic4224f177f169f700c1052af779f92640dde566d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7807266 Auto-Submit: Alina Varkki <alinavarkki@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
1 parent b0960bd commit 3a4877a

1 file changed

Lines changed: 2 additions & 24 deletions

File tree

front_end/models/ai_assistance/agents/PerformanceAgent.ts

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -222,28 +222,6 @@ enum ScorePriority {
222222
DEFAULT = 1,
223223
}
224224

225-
const SUPPORTED_INSIGHT_WIDGETS = new Set<Trace.Insights.Types.InsightKeys>([
226-
Trace.Insights.Types.InsightKeys.LCP_BREAKDOWN,
227-
Trace.Insights.Types.InsightKeys.RENDER_BLOCKING,
228-
Trace.Insights.Types.InsightKeys.LCP_DISCOVERY,
229-
Trace.Insights.Types.InsightKeys.CLS_CULPRITS,
230-
Trace.Insights.Types.InsightKeys.NETWORK_DEPENDENCY_TREE,
231-
Trace.Insights.Types.InsightKeys.THIRD_PARTIES,
232-
Trace.Insights.Types.InsightKeys.FORCED_REFLOW,
233-
Trace.Insights.Types.InsightKeys.CACHE,
234-
Trace.Insights.Types.InsightKeys.INP_BREAKDOWN,
235-
Trace.Insights.Types.InsightKeys.DOCUMENT_LATENCY,
236-
Trace.Insights.Types.InsightKeys.DOM_SIZE,
237-
Trace.Insights.Types.InsightKeys.DUPLICATE_JAVASCRIPT,
238-
Trace.Insights.Types.InsightKeys.IMAGE_DELIVERY,
239-
Trace.Insights.Types.InsightKeys.FONT_DISPLAY,
240-
Trace.Insights.Types.InsightKeys.SLOW_CSS_SELECTOR,
241-
Trace.Insights.Types.InsightKeys.LEGACY_JAVASCRIPT,
242-
Trace.Insights.Types.InsightKeys.VIEWPORT,
243-
Trace.Insights.Types.InsightKeys.MODERN_HTTP,
244-
Trace.Insights.Types.InsightKeys.CHARACTER_SET,
245-
]);
246-
247225
export class PerformanceTraceContext extends ConversationContext<AgentFocus> {
248226
static fromParsedTrace(parsedTrace: Trace.TraceModel.ParsedTrace): PerformanceTraceContext {
249227
return new PerformanceTraceContext(AgentFocus.fromParsedTrace(parsedTrace));
@@ -561,7 +539,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
561539
// Case 2: Insight -> PERF_INSIGHT widget
562540
if (focus.insight) {
563541
const insightKey = focus.insight.insightKey;
564-
if (Trace.Insights.Common.isInsightKey(insightKey) && SUPPORTED_INSIGHT_WIDGETS.has(insightKey)) {
542+
if (Trace.Insights.Common.isInsightKey(insightKey)) {
565543
widgets.push({
566544
name: 'PERF_INSIGHT',
567545
data: {
@@ -1034,7 +1012,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
10341012
}
10351013

10361014
const insightKey = params.insightName;
1037-
if (Trace.Insights.Common.isInsightKey(insightKey) && SUPPORTED_INSIGHT_WIDGETS.has(insightKey)) {
1015+
if (Trace.Insights.Common.isInsightKey(insightKey)) {
10381016
widgets.push({
10391017
name: 'PERF_INSIGHT',
10401018
data: {

0 commit comments

Comments
 (0)