chrome-devtools-frontend 1.0.1510848 → 1.0.1512349

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 (45) hide show
  1. package/front_end/Images/src/ai-explorer-badge.svg +114 -0
  2. package/front_end/Images/src/code-whisperer-badge.svg +166 -0
  3. package/front_end/Images/src/devtools-user-badge.svg +129 -0
  4. package/front_end/Images/src/dom-detective-badge.svg +136 -0
  5. package/front_end/Images/src/speedster-badge.svg +166 -0
  6. package/front_end/core/host/AidaClient.ts +2 -0
  7. package/front_end/core/host/GdpClient.ts +38 -2
  8. package/front_end/core/i18n/NumberFormatter.ts +7 -0
  9. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -19
  10. package/front_end/models/ai_assistance/ai_assistance.ts +1 -1
  11. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +7 -6
  12. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +119 -119
  13. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +43 -52
  14. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
  15. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +12 -18
  16. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +151 -0
  17. package/front_end/models/ai_code_completion/AiCodeCompletion.ts +3 -0
  18. package/front_end/models/badges/Badge.ts +7 -4
  19. package/front_end/models/badges/DOMDetectiveBadge.ts +20 -0
  20. package/front_end/models/badges/SpeedsterBadge.ts +4 -1
  21. package/front_end/models/badges/StarterBadge.ts +5 -1
  22. package/front_end/models/badges/UserBadges.ts +33 -7
  23. package/front_end/models/trace/ModelImpl.ts +0 -13
  24. package/front_end/models/trace/insights/Common.ts +19 -0
  25. package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +36 -9
  26. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +32 -0
  27. package/front_end/panels/common/AiCodeCompletionTeaser.ts +14 -2
  28. package/front_end/panels/common/BadgeNotification.ts +119 -9
  29. package/front_end/panels/common/badgeNotification.css +4 -0
  30. package/front_end/panels/console/ConsolePrompt.ts +26 -0
  31. package/front_end/panels/elements/ElementsTreeElement.ts +12 -0
  32. package/front_end/panels/elements/ElementsTreeOutline.ts +3 -0
  33. package/front_end/panels/elements/StylePropertiesSection.ts +3 -0
  34. package/front_end/panels/elements/StylePropertyTreeElement.ts +5 -0
  35. package/front_end/panels/settings/SettingsScreen.ts +3 -9
  36. package/front_end/panels/settings/components/SyncSection.ts +6 -2
  37. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +35 -6
  38. package/front_end/panels/timeline/TimelinePanel.ts +22 -10
  39. package/front_end/panels/timeline/TimelineUIUtils.ts +4 -3
  40. package/front_end/panels/timeline/utils/InsightAIContext.ts +0 -19
  41. package/front_end/ui/legacy/filter.css +1 -1
  42. package/front_end/ui/legacy/inspectorCommon.css +1 -1
  43. package/front_end/ui/legacy/softDropDownButton.css +1 -1
  44. package/package.json +1 -1
  45. package/front_end/models/ai_assistance/data_formatters/Types.ts +0 -9
@@ -0,0 +1,166 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 600 600">
3
+ <defs>
4
+ <style>
5
+ .cls-1, .cls-2 {
6
+ fill: none;
7
+ }
8
+
9
+ .cls-3 {
10
+ fill: #4285f4;
11
+ }
12
+
13
+ .cls-4 {
14
+ fill: #f28b82;
15
+ }
16
+
17
+ .cls-5 {
18
+ fill: #669df6;
19
+ }
20
+
21
+ .cls-6 {
22
+ fill: #81c995;
23
+ }
24
+
25
+ .cls-7 {
26
+ fill: #d2e3fc;
27
+ }
28
+
29
+ .cls-2 {
30
+ stroke: #fff;
31
+ stroke-width: 16px;
32
+ }
33
+
34
+ .cls-8 {
35
+ clip-path: url(#clippath-1);
36
+ }
37
+
38
+ .cls-9 {
39
+ clip-path: url(#clippath-2);
40
+ }
41
+
42
+ .cls-10 {
43
+ fill: #1a73e8;
44
+ }
45
+
46
+ .cls-11 {
47
+ fill: #8ab4f8;
48
+ }
49
+
50
+ .cls-12, .cls-13 {
51
+ fill: #fff;
52
+ }
53
+
54
+ .cls-14 {
55
+ fill: #f8f9fa;
56
+ }
57
+
58
+ .cls-15 {
59
+ opacity: .05;
60
+ }
61
+
62
+ .cls-13 {
63
+ stroke: #dadce0;
64
+ stroke-miterlimit: 10;
65
+ stroke-width: 2.05px;
66
+ }
67
+
68
+ .cls-16 {
69
+ fill: #aecbfa;
70
+ }
71
+
72
+ .cls-17 {
73
+ fill: #f29900;
74
+ }
75
+
76
+ .cls-18 {
77
+ fill: #202124;
78
+ }
79
+
80
+ .cls-19 {
81
+ clip-path: url(#clippath);
82
+ }
83
+ </style>
84
+ <clipPath id="clippath">
85
+ <path class="cls-1" d="M300,74c-16.12,0-31.84,1.7-47,4.91V31h-94v92.39c-51.8,41.41-85,105.13-85,176.61,0,124.82,101.18,226,226,226s226-101.18,226-226-101.18-226-226-226Z"/>
86
+ </clipPath>
87
+ <clipPath id="clippath-1">
88
+ <polygon class="cls-1" points="176.4 68.87 172.39 66.56 172.39 113.48 176.4 110.83 176.4 68.87"/>
89
+ </clipPath>
90
+ <clipPath id="clippath-2">
91
+ <path class="cls-1" d="M503.39,257.66l-154.96-89.46-11.72-6.77c-4.51-2.6-88-50.8-92.51-53.41l-7.5-4.33-64.32-37.13v257.56c0,7.81,5.48,17.31,12.25,21.21l306.5,176.96c6.76,3.91,12.25.74,12.25-7.07v-257.56Z"/>
92
+ </clipPath>
93
+ <filter id="filter0_d_8437_5135" x="40" y="44" width="520" height="520" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
94
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
95
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
96
+ <feMorphology radius="6" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_8437_5135"/>
97
+ <feOffset dy="4"/>
98
+ <feGaussianBlur stdDeviation="6"/>
99
+ <feColorMatrix type="matrix" values="0 0 0 0 0.235294 0 0 0 0 0.25098 0 0 0 0 0.262745 0 0 0 0.15 0"/>
100
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_8437_5135"/>
101
+ <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_8437_5135" result="shape"/>
102
+ </filter>
103
+ </defs>
104
+ <circle id="baseplate" class="cls-11" cx="300" cy="300" r="242" filter="url(#filter0_d_8437_5135)"/>
105
+ <circle id="border" class="cls-2" cx="300" cy="300" r="234"/>
106
+ <g id="illustration">
107
+ <g class="cls-19">
108
+ <g>
109
+ <path class="cls-3" d="M491.99,522.78l-308.2-177.94c-6.3-3.63-11.4-13.38-11.4-21.78V49.82c0-8.39,5.1-12.25,11.4-8.62l308.2,177.94c6.3,3.63,11.4,13.38,11.4,21.78v273.24c0,8.39-5.1,12.25-11.4,8.62Z"/>
110
+ <path class="cls-14" d="M503.39,257.66l-154.96-89.46-11.72-6.77c-4.51-2.6-88-50.8-92.51-53.41l-7.5-4.33-64.32-37.13v257.56c0,7.81,5.48,17.31,12.25,21.21l306.5,176.96c6.76,3.91,12.25.74,12.25-7.07v-257.56Z"/>
111
+ <g>
112
+ <path class="cls-14" d="M196.55,64.54c0,3.59-2.52,5.04-5.62,3.25-3.11-1.79-5.62-6.15-5.62-9.74s2.52-5.04,5.62-3.25c3.11,1.79,5.62,6.15,5.62,9.74Z"/>
113
+ <path class="cls-14" d="M216.63,76.13c0,3.59-2.52,5.04-5.62,3.25-3.11-1.79-5.62-6.15-5.62-9.74s2.52-5.04,5.62-3.25c3.11,1.79,5.62,6.15,5.62,9.74Z"/>
114
+ <path class="cls-14" d="M236.71,87.73c0,3.59-2.52,5.04-5.62,3.25-3.11-1.79-5.62-6.15-5.62-9.74,0-3.59,2.52-5.04,5.62-3.25,3.11,1.79,5.62,6.15,5.62,9.74Z"/>
115
+ </g>
116
+ <g>
117
+ <path class="cls-10" d="M187.05,107.17v-10.08c0-2.14,1.3-3.12,2.9-2.2l136.67,78.91c1.6.93,2.9,3.41,2.9,5.55v10.08c0,2.14-1.3,3.12-2.9,2.2l-136.67-78.91c-1.6-.93-2.9-3.41-2.9-5.55Z"/>
118
+ <g>
119
+ <path class="cls-5" d="M187.05,137.72v-13.81c0-1.11.67-1.62,1.5-1.14l35.22,20.34c.83.48,1.5,1.77,1.5,2.88v13.81c0,1.11-.67,1.62-1.5,1.14l-35.22-20.34c-.83-.48-1.5-1.77-1.5-2.88Z"/>
120
+ <path class="cls-5" d="M231.24,162.03v-11.39c0-1.78,1.08-2.59,2.41-1.82l93.46,53.96c1.33.77,2.41,2.83,2.41,4.61v11.39c0,1.78-1.08,2.59-2.41,1.82l-93.46-53.96c-1.33-.77-2.41-2.83-2.41-4.61Z"/>
121
+ </g>
122
+ <path class="cls-5" d="M231.24,191.1v-12.15c0-1.57.95-2.29,2.13-1.61l94.03,54.29c1.18.68,2.13,2.5,2.13,4.07v12.15c0,1.57-.95,2.29-2.13,1.61l-94.03-54.29c-1.18-.68-2.13-2.5-2.13-4.07Z"/>
123
+ <g>
124
+ <path class="cls-5" d="M252.93,233.53v-14.58c0-.9.54-1.31,1.22-.92l19.46,11.23c.67.39,1.22,1.43,1.22,2.33v14.58c0,.9-.54,1.31-1.22.92l-19.46-11.23c-.67-.39-1.22-1.43-1.22-2.33Z"/>
125
+ <path class="cls-5" d="M280.38,248.73v-13.28c0-1.26.76-1.83,1.71-1.29l45.73,26.4c.94.54,1.71,2,1.71,3.26v13.28c0,1.26-.76,1.83-1.71,1.29l-45.73-26.4c-.94-.54-1.71-2-1.71-3.26Z"/>
126
+ </g>
127
+ <path class="cls-5" d="M299.86,288.67v-13.28c0-1.26.76-1.83,1.71-1.29l26.25,15.16c.94.54,1.71,2,1.71,3.26v13.28c0,1.26-.76,1.83-1.71,1.29l-26.25-15.16c-.94-.54-1.71-2-1.71-3.26Z"/>
128
+ </g>
129
+ <g>
130
+ <path class="cls-10" d="M344.23,197.92v-10.08c0-2.14,1.3-3.12,2.9-2.2l136.67,78.91c1.6.93,2.9,3.41,2.9,5.55v10.08c0,2.14-1.3,3.12-2.9,2.2l-136.67-78.91c-1.6-.93-2.9-3.41-2.9-5.55Z"/>
131
+ <path class="cls-5" d="M388.43,252.78v-11.39c0-1.78,1.08-2.59,2.41-1.82l93.46,53.96c1.33.77,2.41,2.83,2.41,4.61v11.39c0,1.78-1.08,2.59-2.41,1.82l-93.46-53.96c-1.33-.77-2.41-2.83-2.41-4.61Z"/>
132
+ <path class="cls-5" d="M415.47,298.03v-13.28c0-1.26.76-1.83,1.71-1.29l67.83,39.16c.94.54,1.71,2,1.71,3.26v13.28c0,1.26-.76,1.83-1.71,1.29l-67.83-39.16c-.94-.54-1.71-2-1.71-3.26Z"/>
133
+ <path class="cls-5" d="M437.57,339.48v-13.28c0-1.26.76-1.83,1.71-1.29l45.73,26.4c.94.54,1.71,2,1.71,3.26v13.28c0,1.26-.76,1.83-1.71,1.29l-45.73-26.4c-.94-.54-1.71-2-1.71-3.26Z"/>
134
+ </g>
135
+ <g>
136
+ <polygon class="cls-4" points="354.91 342.61 331.39 376.07 378.44 403.23 354.91 342.61 331.39 376.07 378.44 403.23 354.91 342.61"/>
137
+ <polygon class="cls-17" points="435.14 435.23 395.03 412.08 395.03 365.76 435.14 388.92 435.14 435.23"/>
138
+ <path class="cls-6" d="M495.11,446.69c0,13.19-9.26,18.54-20.69,11.94-11.43-6.6-20.69-22.64-20.69-35.83,0-13.19,9.26-18.54,20.69-11.94,11.43,6.6,20.69,22.64,20.69,35.83Z"/>
139
+ </g>
140
+ </g>
141
+ <g class="cls-8">
142
+ <line class="cls-13" x1="173.35" y1="66.37" x2="173.35" y2="114"/>
143
+ </g>
144
+ </g>
145
+ <g class="cls-9">
146
+ <g class="cls-15">
147
+ <path class="cls-18" d="M322.25,381.82c.13,10.12-.9,19.14-3.07,27.06-2.17,7.91-5.34,14.81-9.49,20.7-1.69,2.19-4,3.33-6.92,3.41-2.91.08-5.99-.82-9.2-2.67l-126.83-73.22c-3.22-1.86-6.28-4.5-9.19-7.94-2.9-3.44-5.19-7.23-6.87-11.37-3.96-10.22-7-20.4-9.12-30.52-2.12-10.13-3.16-20.12-3.14-29.98.04-14.61,2.49-26.9,7.35-36.88,4.86-9.97,11.48-17.35,19.86-22.12,8.38-4.77,18.17-6.7,29.36-5.79,11.2.91,23.08,4.99,35.64,12.24,9.04,5.22,17.73,11.69,26.07,19.41,8.34,7.73,16.17,16.61,23.51,26.67l-17.5,2.59c-5.04-5.9-10.29-11.18-15.71-15.82-5.44-4.64-10.91-8.54-16.43-11.73-20.37-11.76-37.74-13.55-52.11-5.36-14.37,8.19-21.58,23.99-21.65,47.4-.02,7.39.84,15.2,2.58,23.44,1.74,8.24,4.21,16.45,7.41,24.65l126.83,73.22c3.54-4.66,6.13-10.13,7.76-16.41,1.63-6.29,2.45-13.3,2.48-21.05.02-6.34-.61-12.88-1.9-19.61-1.28-6.73-3.22-13.67-5.81-20.8l11.08-13.7c4.57,10.93,8.19,21.83,10.84,32.7,2.66,10.88,4.04,21.38,4.17,31.5Z"/>
148
+ <path class="cls-18" d="M210.92,318.86c.25-6.38,2.45-9.96,6.59-10.74l77.37-14.57-51.72,59c-2.77,3.17-7.06,3.11-12.89-.17-.12-.07-.24-.13-.36-.2-5.66-3.27-10.28-8.01-13.87-14.22-3.67-6.35-5.37-12.71-5.13-19.1Z"/>
149
+ </g>
150
+ </g>
151
+ <g>
152
+ <path class="cls-7" d="M287.78,346.78c-2.65-10.88-6.27-21.78-10.84-32.7l-16.32,9.48c4.57,10.93,8.19,21.83,10.84,32.7,2.66,10.88,4.04,21.38,4.17,31.5h0c.13,10.12-.9,19.14-3.07,27.06-2.17,7.91-5.34,14.81-9.49,20.7-.73.94-1.56,1.69-2.51,2.24l16.32-9.48c.95-.55,1.79-1.3,2.51-2.24,4.16-5.89,7.32-12.79,9.49-20.7,2.17-7.91,3.19-16.93,3.07-27.06-.13-10.12-1.51-20.62-4.17-31.5Z"/>
153
+ <path class="cls-7" d="M215.98,255.83c.94.96,1.87,1.94,2.79,2.93.15.16.29.31.44.46,1.05,1.14,2.1,2.3,3.14,3.48.31.35.61.72.92,1.07.72.83,1.44,1.67,2.16,2.52.36.43.72.88,1.08,1.32.68.83,1.37,1.67,2.04,2.52.36.45.71.91,1.07,1.37.82,1.06,1.64,2.13,2.46,3.22.51.68,1.02,1.35,1.52,2.04l16.32-9.48c-.3-.41-.59-.81-.89-1.21-.21-.28-.42-.55-.63-.83-.81-1.08-1.63-2.16-2.45-3.21-.21-.27-.41-.55-.62-.81-.15-.19-.3-.37-.45-.55-.68-.85-1.36-1.69-2.04-2.52-.27-.33-.54-.68-.82-1.01-.09-.1-.18-.2-.26-.31-.71-.85-1.44-1.69-2.16-2.52-.27-.31-.53-.63-.8-.94-.04-.04-.08-.09-.12-.13-1.04-1.18-2.08-2.34-3.14-3.48-.01-.01-.02-.03-.04-.04-.13-.14-.27-.28-.41-.43-.92-.99-1.85-1.97-2.79-2.93-.08-.08-.15-.16-.22-.24-.28-.28-.56-.55-.84-.83-.76-.76-1.52-1.52-2.29-2.27-.15-.15-.3-.3-.45-.45-.69-.66-1.38-1.32-2.08-1.96-.55-.51-1.1-1.02-1.66-1.51-.2-.18-.41-.35-.61-.53-.84-.75-1.68-1.48-2.52-2.2-.27-.23-.53-.47-.8-.7-.11-.09-.21-.17-.32-.26-1.19-1-2.38-1.97-3.58-2.92-.01,0-.02-.02-.03-.03,0,0,0,0,0,0-1.2-.95-2.41-1.86-3.62-2.76-.1-.07-.19-.15-.29-.22-.3-.22-.6-.42-.89-.63-.81-.59-1.63-1.17-2.45-1.74-.19-.13-.37-.27-.56-.39-.27-.19-.55-.36-.83-.55-.76-.51-1.52-1.01-2.28-1.51-.26-.17-.52-.35-.78-.52-.21-.14-.43-.26-.64-.39-.78-.49-1.56-.97-2.35-1.44-.31-.19-.62-.39-.94-.57-.3-.18-.61-.36-.92-.53-.92-.53-1.83-1.04-2.75-1.54-.1-.05-.19-.11-.29-.16-.13-.07-.26-.13-.39-.2-1.08-.58-2.16-1.14-3.23-1.67-.06-.03-.12-.06-.18-.09-.02,0-.04-.02-.06-.03-1.09-.54-2.18-1.05-3.26-1.54-.12-.06-.25-.12-.37-.18-.11-.05-.22-.09-.34-.14-1.06-.47-2.11-.92-3.16-1.34-.04-.01-.07-.03-.11-.05-.1-.04-.2-.07-.3-.11-.96-.38-1.92-.74-2.87-1.08-.13-.05-.26-.1-.39-.15-.07-.03-.15-.05-.22-.07-1.04-.36-2.07-.7-3.09-1.01-.08-.03-.17-.06-.25-.08-.13-.04-.25-.07-.37-.1-1.04-.31-2.07-.6-3.1-.86-.04,0-.08-.02-.11-.03-.02,0-.03,0-.05-.01-.11-.03-.22-.05-.33-.08-.57-.14-1.13-.27-1.69-.39-.23-.05-.46-.1-.69-.14-.3-.06-.6-.13-.91-.19-.14-.03-.27-.05-.41-.07-.28-.05-.55-.1-.83-.15-.4-.07-.81-.14-1.21-.2-.28-.04-.56-.09-.84-.13-.17-.02-.34-.05-.5-.08-.12-.02-.24-.02-.36-.04-.99-.13-1.98-.24-2.96-.32-.25-.02-.51-.04-.76-.06-.18-.01-.36-.02-.54-.03-.46-.03-.92-.05-1.38-.07-.3-.01-.59-.02-.89-.03-.46-.01-.91-.02-1.36-.02-.18,0-.37,0-.55,0-.09,0-.19,0-.28,0-.61,0-1.22.02-1.82.04-.15,0-.3,0-.45.01-.75.04-1.49.09-2.22.15-.04,0-.09,0-.13,0-.12.01-.23.03-.35.04-.67.06-1.33.14-1.98.23-.22.03-.44.06-.66.09-.77.11-1.54.24-2.3.39-.01,0-.03,0-.05,0,0,0,0,0-.01,0-.06.01-.11.02-.17.04-.52.1-1.04.22-1.56.34-.19.05-.38.1-.58.15-.38.09-.75.19-1.12.29-.22.06-.44.13-.66.19-.34.1-.68.2-1.01.3-.23.07-.46.15-.69.23-.18.06-.37.12-.55.18-.11.04-.22.09-.34.13-.36.13-.71.26-1.06.4-.25.1-.49.19-.74.29-.36.15-.72.3-1.08.46-.23.1-.46.2-.68.3-.39.18-.77.37-1.16.56-.19.09-.38.18-.56.28-.57.29-1.13.59-1.68.91-.11.06-.22.12-.33.19l-16.32,9.48c.11-.06.22-.13.33-.19.55-.32,1.11-.62,1.68-.91.19-.1.38-.18.56-.28.38-.19.77-.38,1.16-.56.23-.1.46-.2.68-.3.36-.16.71-.31,1.07-.46.25-.1.49-.19.74-.29.35-.14.7-.27,1.06-.4.3-.11.59-.21.89-.31.23-.08.46-.15.69-.23.34-.11.67-.21,1.01-.31.22-.06.44-.13.66-.19.37-.1.75-.2,1.12-.29.19-.05.38-.1.58-.14.52-.12,1.04-.23,1.56-.34.06-.01.11-.03.17-.04.02,0,.04,0,.06,0,.76-.15,1.52-.27,2.29-.39.22-.03.44-.06.66-.09.66-.09,1.32-.16,1.98-.23.16-.02.32-.03.48-.05.73-.06,1.47-.11,2.22-.15.15,0,.3,0,.45-.01.6-.02,1.21-.04,1.82-.04.28,0,.55,0,.83,0,.45,0,.9,0,1.36.02.3,0,.59.02.89.03.46.02.92.04,1.38.07.43.03.86.05,1.3.09.98.08,1.97.19,2.97.32.29.04.58.07.86.11.28.04.56.08.84.13.4.06.81.13,1.21.2.28.05.55.1.83.15.44.08.88.17,1.32.26.23.05.46.09.69.14.56.12,1.13.26,1.7.39.11.03.22.05.33.08.05.01.11.03.16.04,1.03.26,2.06.55,3.1.86.21.06.41.12.62.18,1.03.31,2.06.65,3.09,1.01.2.07.41.15.61.22.95.34,1.91.7,2.87,1.08.14.05.28.11.41.16,1.05.42,2.1.87,3.16,1.34.24.1.47.21.71.32,1.08.49,2.17,1,3.26,1.54.08.04.16.08.24.12,1.07.53,2.15,1.09,3.23,1.68.23.12.45.24.68.36.91.5,1.83,1.01,2.75,1.54.62.36,1.23.74,1.85,1.11.79.47,1.57.95,2.35,1.44.48.3.95.6,1.42.91.76.49,1.52,1,2.28,1.51.46.31.92.62,1.38.94.82.57,1.63,1.15,2.45,1.74.4.29.79.57,1.19.86,1.21.9,2.42,1.81,3.62,2.76,0,0,.02.01.03.02,1.2.95,2.4,1.93,3.59,2.93.37.31.75.64,1.12.96.84.72,1.69,1.45,2.52,2.2.76.68,1.51,1.35,2.27,2.04.85.79,1.69,1.6,2.53,2.41.77.75,1.53,1.51,2.3,2.27.35.36.71.71,1.06,1.07Z"/>
154
+ <path class="cls-11" d="M248.26,299.49l-51.72,59c-.52.6-1.1,1.08-1.74,1.45l16.32-9.48c.63-.37,1.21-.85,1.74-1.45l51.72-59-16.32,9.48Z"/>
155
+ <path class="cls-16" d="M187.21,304.58s-.05,0-.07.01c-.37.07-.73.17-1.07.29-.01,0-.03.01-.04.02-.4.14-.79.32-1.15.53l-16.32,9.48c.36-.21.74-.38,1.15-.52.37-.13.76-.24,1.18-.32l77.37-14.57,16.32-9.48-77.37,14.57Z"/>
156
+ <path class="cls-10" d="M275.63,387.76c.13,10.12-.9,19.14-3.07,27.06-2.17,7.91-5.34,14.81-9.49,20.7-1.69,2.19-4,3.33-6.92,3.41-2.91.08-5.99-.82-9.2-2.67l-126.83-73.22c-3.22-1.86-6.28-4.5-9.19-7.94-2.9-3.44-5.19-7.23-6.87-11.37-3.96-10.22-7-20.4-9.12-30.52-2.12-10.13-3.16-20.12-3.14-29.98.04-14.61,2.49-26.9,7.35-36.88,4.86-9.97,11.48-17.35,19.86-22.12,8.38-4.77,18.17-6.7,29.36-5.79,11.2.91,23.08,4.99,35.64,12.24,9.04,5.22,17.73,11.69,26.07,19.41,8.34,7.73,16.17,16.61,23.51,26.67l-17.5,2.59c-5.04-5.9-10.29-11.18-15.71-15.82-5.44-4.64-10.91-8.54-16.43-11.73-20.37-11.76-37.74-13.55-52.11-5.36-14.37,8.19-21.58,23.99-21.65,47.4-.02,7.39.84,15.2,2.58,23.44,1.74,8.24,4.21,16.45,7.41,24.65l126.83,73.22c3.54-4.66,6.13-10.13,7.76-16.41,1.63-6.29,2.45-13.3,2.48-21.05.02-6.34-.61-12.88-1.9-19.61-1.28-6.73-3.22-13.67-5.81-20.8l11.08-13.7c4.57,10.93,8.19,21.83,10.84,32.7,2.66,10.88,4.04,21.38,4.17,31.5Z"/>
157
+ <path class="cls-10" d="M164.3,324.8c.25-6.38,2.45-9.96,6.59-10.74l77.37-14.57-51.72,59c-2.77,3.17-7.06,3.11-12.89-.17-.12-.07-.24-.13-.36-.2-5.66-3.27-10.28-8.01-13.87-14.22-3.67-6.35-5.37-12.71-5.13-19.1Z"/>
158
+ <path class="cls-7" d="M254.28,400.43l-117.79-68-16.32,9.48,126.83,73.22c3.22-4.23,5.64-9.13,7.27-14.7Z"/>
159
+ <path class="cls-7" d="M112.77,317.26c1.74,8.24,4.21,16.45,7.41,24.65l16.32-9.48c-3.2-8.2-5.67-16.41-7.41-24.65-1.74-8.23-2.6-16.05-2.58-23.44.05-18.69,4.68-32.51,13.85-41.5-2.95.83-5.78,2.03-8.51,3.58-14.37,8.19-21.58,23.99-21.65,47.4-.02,7.39.84,15.2,2.58,23.44Z"/>
160
+ </g>
161
+ <g>
162
+ <path class="cls-10" d="M135.54,455c41.21,43.71,99.64,71,164.46,71s123.25-27.29,164.46-71H135.54Z"/>
163
+ <path class="cls-12" d="M288.7,489.5c0,2.69.96,5,2.88,6.92,1.92,1.92,4.23,2.88,6.92,2.88s5-.96,6.92-2.88,2.88-4.23,2.88-6.92-.96-5-2.88-6.92-4.23-2.88-6.92-2.88-5,.96-6.92,2.88c-1.92,1.92-2.88,4.23-2.88,6.92ZM298.5,504.2c.53,0,1.04-.02,1.53-.06s.98-.12,1.47-.24l-5.76,9.92c-6.17-.69-11.33-3.34-15.5-7.93s-6.25-10.06-6.25-16.38c0-1.72.16-3.38.49-4.99s.82-3.15,1.47-4.62l9.8,16.97c1.27,2.21,3.02,3.98,5.27,5.33,2.25,1.35,4.74,2.02,7.47,2.02ZM298.5,474.8c-3.27,0-6.17.95-8.7,2.85-2.53,1.9-4.29,4.32-5.27,7.26l-5.76-9.92c2.25-3.02,5.07-5.44,8.48-7.26,3.41-1.82,7.16-2.73,11.24-2.73s7.76.89,11.15,2.66,6.21,4.15,8.45,7.14h-19.6ZM320.92,479.7c.69,1.51,1.21,3.08,1.56,4.72s.52,3.33.52,5.08c0,6.33-2.07,11.78-6.22,16.35-4.14,4.57-9.26,7.23-15.34,7.96l9.8-16.97c.61-1.06,1.09-2.22,1.44-3.46s.52-2.54.52-3.89c0-1.92-.34-3.71-1.01-5.36s-1.6-3.13-2.79-4.44h11.51Z"/>
164
+ </g>
165
+ </g>
166
+ </svg>
@@ -717,6 +717,8 @@ export class HostConfigTracker extends Common.ObjectWrapper.ObjectWrapper<EventT
717
717
  const config =
718
718
  await new Promise<Root.Runtime.HostConfig>(resolve => InspectorFrontendHostInstance.getHostConfig(resolve));
719
719
  Object.assign(Root.Runtime.hostConfig, config);
720
+ // TODO(crbug.com/442545623): Send `currentAidaAvailability` to the listeners as part of the event so that
721
+ // `await AidaClient.checkAccessPreconditions()` does not need to be called again in the event handlers.
720
722
  this.dispatchEventToListeners(Events.AIDA_AVAILABILITY_CHANGED);
721
723
  }
722
724
  }
@@ -36,6 +36,20 @@ export enum EmailPreference {
36
36
  interface CheckElibigilityResponse {
37
37
  createProfile: EligibilityStatus;
38
38
  }
39
+ export interface Award {
40
+ name: string;
41
+ badge: {
42
+ title: string,
43
+ description: string,
44
+ imageUri: string,
45
+ deletableByUser: boolean,
46
+ };
47
+ title: string;
48
+ description: string;
49
+ imageUri: string;
50
+ createTime: string;
51
+ awardingUri: string;
52
+ }
39
53
 
40
54
  export interface Profile {
41
55
  // Resource name of the profile.
@@ -117,14 +131,36 @@ export class GdpClient {
117
131
  return (await this.checkEligibility())?.createProfile === EligibilityStatus.ELIGIBLE;
118
132
  }
119
133
 
120
- createProfile({user, emailPreference}: {user: string, emailPreference: EmailPreference}): Promise<Profile|null> {
121
- return makeHttpRequest({
134
+ async createProfile({user, emailPreference}: {user: string, emailPreference: EmailPreference}):
135
+ Promise<Profile|null> {
136
+ const result = await makeHttpRequest<Profile>({
122
137
  service: SERVICE_NAME,
123
138
  path: '/v1beta1/profiles',
124
139
  method: 'POST',
125
140
  body: JSON.stringify({
126
141
  user,
127
142
  newsletter_email: emailPreference,
143
+ }),
144
+ });
145
+ if (result) {
146
+ this.#clearCache();
147
+ }
148
+ return result;
149
+ }
150
+
151
+ #clearCache(): void {
152
+ this.#cachedProfilePromise = undefined;
153
+ this.#cachedEligibilityPromise = undefined;
154
+ }
155
+
156
+ createAward({name}: {name: string}): Promise<Award|null> {
157
+ return makeHttpRequest({
158
+ service: SERVICE_NAME,
159
+ path: '/v1beta1/profiles/me/awards',
160
+ method: 'POST',
161
+ body: JSON.stringify({
162
+ awardingUri: 'devtools://devtools',
163
+ name,
128
164
  })
129
165
  });
130
166
  }
@@ -39,6 +39,13 @@ export function defineFormatter(options: Intl.NumberFormatOptions): NumberFormat
39
39
  * We don't like that, so when there is no space literal we inject the provided separator manually.
40
40
  */
41
41
  function formatAndEnsureSpace(formatter: Intl.NumberFormat, value: number, separator = '\xA0'): string {
42
+ // TODO(crbug.com/443038315): this method is defined in
43
+ // models/ai_assistance in the UnitFormatters file. We can't currently
44
+ // re-use it because various models depend on i18n and that creates a
45
+ // circular build.
46
+ // We should move the unit formatters to their own model so it can be
47
+ // used across the codebase.
48
+
42
49
  const parts = formatter.formatToParts(value);
43
50
 
44
51
  let hasSpace = false;
@@ -18,7 +18,6 @@ import {
18
18
  TraceEventFormatter,
19
19
  } from '../data_formatters/PerformanceInsightFormatter.js';
20
20
  import {PerformanceTraceFormatter} from '../data_formatters/PerformanceTraceFormatter.js';
21
- import type {UnitFormatters} from '../data_formatters/Types.js';
22
21
  import {debugLog} from '../debug.js';
23
22
 
24
23
  import {
@@ -220,19 +219,6 @@ enum ScorePriority {
220
219
  DEFAULT = 1,
221
220
  }
222
221
 
223
- export const PERF_AGENT_UNIT_FORMATTERS: UnitFormatters = {
224
- micros(x) {
225
- const milli = Trace.Helpers.Timing.microToMilli(x as Trace.Types.Timing.Micro);
226
- return PERF_AGENT_UNIT_FORMATTERS.millis(milli);
227
- },
228
- millis(x) {
229
- return i18n.TimeUtilities.preciseMillisToString(x, 1, ' ');
230
- },
231
- bytes(x) {
232
- return i18n.ByteUtilities.bytesToString(x);
233
- },
234
- };
235
-
236
222
  export class PerformanceTraceContext extends ConversationContext<TimelineUtils.AIContext.AgentFocus> {
237
223
  static full(
238
224
  parsedTrace: Trace.Handlers.Types.ParsedTrace, insights: Trace.Insights.Types.TraceInsightSets,
@@ -330,8 +316,7 @@ export class PerformanceTraceContext extends ConversationContext<TimelineUtils.A
330
316
  return;
331
317
  }
332
318
 
333
- return new PerformanceInsightFormatter(PERF_AGENT_UNIT_FORMATTERS, focus.parsedTrace, focus.insight)
334
- .getSuggestions();
319
+ return new PerformanceInsightFormatter(focus.parsedTrace, focus.insight).getSuggestions();
335
320
  }
336
321
  }
337
322
 
@@ -672,7 +657,7 @@ export class PerformanceAgent extends AiAgent<TimelineUtils.AIContext.AgentFocus
672
657
  this.addFact(this.#networkDataDescriptionFact);
673
658
 
674
659
  if (!this.#traceFacts.length) {
675
- this.#formatter = new PerformanceTraceFormatter(PERF_AGENT_UNIT_FORMATTERS, focus, this.#eventsSerializer);
660
+ this.#formatter = new PerformanceTraceFormatter(focus, this.#eventsSerializer);
676
661
  this.#createFactForTraceSummary(focus);
677
662
  this.#createFactForCriticalRequests();
678
663
  this.#createFactForMainThreadBottomUpSummary();
@@ -738,8 +723,7 @@ export class PerformanceAgent extends AiAgent<TimelineUtils.AIContext.AgentFocus
738
723
  return {error: 'No insight available'};
739
724
  }
740
725
 
741
- const details =
742
- new PerformanceInsightFormatter(PERF_AGENT_UNIT_FORMATTERS, parsedTrace, insight).formatInsight();
726
+ const details = new PerformanceInsightFormatter(parsedTrace, insight).formatInsight();
743
727
 
744
728
  const key = `getInsightDetails('${params.insightName}')`;
745
729
  this.#cacheFunctionResult(focus, key, details);
@@ -20,6 +20,6 @@ export * from './data_formatters/FileFormatter.js';
20
20
  export * from './data_formatters/NetworkRequestFormatter.js';
21
21
  export * from './data_formatters/PerformanceInsightFormatter.js';
22
22
  export * from './data_formatters/PerformanceTraceFormatter.js';
23
- export * from './data_formatters/Types.js';
23
+ export * from './data_formatters/UnitFormatters.js';
24
24
  export * from './ConversationHandler.js';
25
25
  export * from './injected.js';
@@ -2,11 +2,12 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import * as i18n from '../../../core/i18n/i18n.js';
6
5
  import type * as SDK from '../../../core/sdk/sdk.js';
7
6
  import * as Logs from '../../logs/logs.js';
8
7
  import * as NetworkTimeCalculator from '../../network_time_calculator/network_time_calculator.js';
9
8
 
9
+ import {seconds} from './UnitFormatters.js';
10
+
10
11
  const MAX_HEADERS_SIZE = 1000;
11
12
 
12
13
  /**
@@ -104,22 +105,22 @@ Request initiator chain:\n${this.formatRequestInitiatorChain()}`;
104
105
  formatNetworkRequestTiming(): string {
105
106
  const results = NetworkTimeCalculator.calculateRequestTimeRanges(this.#request, this.#calculator.minimumBoundary());
106
107
 
107
- function getDuration(name: string): string|undefined {
108
+ const getDuration = (name: string): string|undefined => {
108
109
  const result = results.find(r => r.name === name);
109
110
  if (!result) {
110
111
  return;
111
112
  }
112
- return i18n.TimeUtilities.secondsToString(result.end - result.start, true);
113
- }
113
+ return seconds(result.end - result.start);
114
+ };
114
115
 
115
116
  const labels = [
116
117
  {
117
118
  label: 'Queued at (timestamp)',
118
- value: this.#calculator.formatValue(this.#request.issueTime(), 2),
119
+ value: seconds(this.#request.issueTime() - this.#calculator.zeroTime()),
119
120
  },
120
121
  {
121
122
  label: 'Started at (timestamp)',
122
- value: this.#calculator.formatValue(this.#request.startTime, 2),
123
+ value: seconds(this.#request.startTime - this.#calculator.zeroTime()),
123
124
  },
124
125
  {
125
126
  label: 'Queueing (duration)',