Commit 7374af9
PerfAI: pick no_navigation Insight set if it's the only choice
I noticed this bug when wondering why the AI had no idea about the
interaction I was asking it to debug. The code to select the first
insight assumed we'd find one with a navigation, but often for
interactions that is not the case. This CL updates the logic to:
1. If there is only 1 InsightSet, use that.
2. If there are >1, prefer the first with a navigation attached, but
otherwise fallback to the first set otherwise.
This fixes the behaviour where for no-navigation traces the AI has no
idea about any insights.
(Long term we should still do the proper fixing where we tell the AI
about all of them).
[email protected]
Fixed: 449113697
Change-Id: I806ca7fa7770845c08b0d29afa3b8f484cb2793a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7003546
Auto-Submit: Jack Franklin <[email protected]>
Reviewed-by: Connor Clark <[email protected]>
Commit-Queue: Connor Clark <[email protected]>1 parent a8da482 commit 7374af9
File tree
3 files changed
+50
-4
lines changed- front_end/models/ai_assistance
- data_formatters
- performance
3 files changed
+50
-4
lines changedLines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
734 | 757 | | |
735 | 758 | | |
736 | 759 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
24 | 39 | | |
25 | 40 | | |
26 | 41 | | |
| |||
0 commit comments