chrome-devtools-frontend 1.0.1514545 → 1.0.1515796
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/AUTHORS +1 -0
- package/docs/committers_policy.md +1 -1
- package/docs/contributing/infrastructure.md +101 -5
- package/front_end/Images/gdp-logo-dark.png +0 -0
- package/front_end/Images/gdp-logo-light.png +0 -0
- package/front_end/core/common/Settings.ts +11 -32
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/global_typings/global_defs.d.ts +15 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +22 -23
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +6 -7
- package/front_end/models/ai_assistance/ai_assistance.ts +3 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +141 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +96 -10
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +1 -1
- package/front_end/models/extensions/ExtensionPanel.ts +4 -0
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +5 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/Processor.ts +1 -1
- package/front_end/models/trace/helpers/Trace.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -7
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +6 -7
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +25 -16
- package/front_end/panels/common/gdpSignUpDialog.css +10 -14
- package/front_end/panels/console/ConsoleView.ts +4 -0
- package/front_end/panels/elements/ElementsPanel.ts +4 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/network/NetworkConfigView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +2 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +5 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +4 -0
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +7 -29
- package/front_end/panels/profiler/ProfileView.ts +4 -0
- package/front_end/panels/recorder/components/CreateRecordingView.ts +2 -2
- package/front_end/panels/search/SearchView.ts +322 -248
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/components/SyncSection.ts +59 -14
- package/front_end/panels/settings/components/syncSection.css +17 -4
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +4 -7
- package/front_end/panels/sources/SourcesView.ts +4 -0
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +6 -3
- package/front_end/panels/timeline/CountersGraph.ts +5 -5
- package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +9 -4
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +4 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +6 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +2 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +6 -6
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +2 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -3
- package/front_end/panels/timeline/utils/utils.ts +0 -8
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/{panels/timeline/utils → services/tracing}/FreshRecording.ts +1 -1
- package/front_end/services/tracing/tracing.ts +2 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/legacy/Dialog.ts +38 -13
- package/front_end/ui/legacy/InspectorView.ts +7 -9
- package/front_end/ui/legacy/ProgressIndicator.ts +4 -5
- package/front_end/ui/legacy/SearchableView.ts +73 -55
- package/front_end/ui/legacy/SettingsUI.ts +5 -5
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -4
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -5
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +1 -4
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +10 -10
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -0
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +4 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -4
- package/front_end/ui/legacy/searchableView.css +0 -4
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +3 -3
- package/front_end/Images/src/gdp-logo-standalone.svg +0 -9
- /package/front_end/{panels/timeline/utils → models/ai_assistance/performance}/AICallTree.ts +0 -0
- /package/front_end/{panels/timeline/utils → models/ai_assistance/performance}/AIContext.ts +0 -0
- /package/front_end/{panels/timeline/utils/InsightAIContext.ts → models/ai_assistance/performance/AIQueries.ts} +0 -0
@@ -591,7 +591,7 @@ export class ShortcutListItem {
|
|
591
591
|
const activeElement = Platform.DOMUtilities.deepActiveElement(document);
|
592
592
|
for (const [shortcut, shortcutInput] of this.shortcutInputs.entries()) {
|
593
593
|
if (activeElement === shortcutInput) {
|
594
|
-
this.onShortcutInputKeyDown(shortcut, shortcutInput as HTMLInputElement, event
|
594
|
+
this.onShortcutInputKeyDown(shortcut, shortcutInput as HTMLInputElement, event);
|
595
595
|
}
|
596
596
|
}
|
597
597
|
}
|
@@ -208,7 +208,7 @@ export class SettingsScreen extends UI.Widget.VBox implements UI.View.ViewLocati
|
|
208
208
|
Host.userMetrics.settingsPanelShown(tabId);
|
209
209
|
}
|
210
210
|
|
211
|
-
private onEscapeKeyPressed(event:
|
211
|
+
private onEscapeKeyPressed(event: KeyboardEvent): void {
|
212
212
|
if (this.tabbedLocation.tabbedPane().selectedTabId === 'keybinds' && this.keybindsTab) {
|
213
213
|
this.keybindsTab.onEscapeKeyPressed(event);
|
214
214
|
}
|
@@ -77,21 +77,56 @@ const UIStrings = {
|
|
77
77
|
* @description Label for Sign-Up button for the Google Developer Program profiles.
|
78
78
|
*/
|
79
79
|
signUp: 'Sign up',
|
80
|
+
/**
|
81
|
+
* @description Link text for opening the Google Developer Program profile page.
|
82
|
+
*/
|
83
|
+
viewProfile: 'View profile',
|
84
|
+
/**
|
85
|
+
* @description Text for tooltip shown on hovering over "Relevant Data" in the disclaimer text for AI code completion.
|
86
|
+
*/
|
87
|
+
tooltipDisclaimerText:
|
88
|
+
'When you qualify for a badge, the badge’s identifier and the type of activity you did to earn it are sent to Google',
|
80
89
|
/**
|
81
90
|
* @description Text for the data notice right after the settings checkbox.
|
82
91
|
*/
|
83
|
-
|
92
|
+
relevantData: 'Relevant data',
|
84
93
|
/**
|
85
|
-
* @description
|
94
|
+
* @description Text for the data notice right after the settings checkbox.
|
95
|
+
* @example {Relevant data} PH1
|
86
96
|
*/
|
87
|
-
|
97
|
+
dataDisclaimer: '({PH1} is sent to Google)',
|
88
98
|
} as const;
|
89
99
|
const str_ = i18n.i18n.registerUIStrings('panels/settings/components/SyncSection.ts', UIStrings);
|
90
100
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
91
|
-
const lockedString = i18n.i18n.lockedString;
|
92
101
|
|
93
102
|
const {html, Directives: {ref, createRef}} = Lit;
|
94
103
|
|
104
|
+
let cachedTooltipElement: HTMLElement|undefined;
|
105
|
+
|
106
|
+
function renderDataDisclaimer(): HTMLElement {
|
107
|
+
if (cachedTooltipElement) {
|
108
|
+
return cachedTooltipElement;
|
109
|
+
}
|
110
|
+
|
111
|
+
const relevantDataTooltipTemplate = html`
|
112
|
+
<span
|
113
|
+
tabIndex="0"
|
114
|
+
class="link"
|
115
|
+
aria-details="gdp-profile-tooltip"
|
116
|
+
aria-describedby="gdp-profile-tooltip"
|
117
|
+
>${i18nString(UIStrings.relevantData)}</span>
|
118
|
+
<devtools-tooltip id="gdp-profile-tooltip" variant=${'rich'}>
|
119
|
+
<div class="tooltip-content" tabindex="0">${i18nString(UIStrings.tooltipDisclaimerText)}</div>
|
120
|
+
</devtools-tooltip>`;
|
121
|
+
|
122
|
+
const container = document.createElement('span');
|
123
|
+
Lit.render(relevantDataTooltipTemplate, container);
|
124
|
+
cachedTooltipElement = i18n.i18n.getFormatLocalizedString(str_, UIStrings.dataDisclaimer, {
|
125
|
+
PH1: container,
|
126
|
+
});
|
127
|
+
return cachedTooltipElement;
|
128
|
+
}
|
129
|
+
|
95
130
|
function getGdpSubscriptionText(profile: Host.GdpClient.Profile): Platform.UIString.LocalizedString {
|
96
131
|
if (!profile.activeSubscription ||
|
97
132
|
profile.activeSubscription.subscriptionStatus !== Host.GdpClient.SubscriptionStatus.ENABLED) {
|
@@ -112,8 +147,6 @@ function getGdpSubscriptionText(profile: Host.GdpClient.Profile): Platform.UIStr
|
|
112
147
|
}
|
113
148
|
}
|
114
149
|
|
115
|
-
const GDP_LOGO_IMAGE_URL = new URL('../../../Images/gdp-logo-standalone.svg', import.meta.url).toString();
|
116
|
-
|
117
150
|
export interface SyncSectionData {
|
118
151
|
syncInfo: Host.InspectorFrontendHostAPI.SyncInformation;
|
119
152
|
syncSetting: Common.Settings.Setting<boolean>;
|
@@ -127,14 +160,19 @@ export class SyncSection extends HTMLElement {
|
|
127
160
|
#syncSetting?: Common.Settings.Setting<boolean>;
|
128
161
|
#receiveBadgesSetting?: Common.Settings.Setting<boolean>;
|
129
162
|
#receiveBadgesSettingContainerRef = createRef<HTMLElement>();
|
163
|
+
#isEligibleToCreateGdpProfile = false;
|
130
164
|
#gdpProfile?: Host.GdpClient.Profile;
|
131
165
|
|
132
166
|
set data(data: SyncSectionData) {
|
133
167
|
this.#syncInfo = data.syncInfo;
|
134
168
|
this.#syncSetting = data.syncSetting;
|
135
169
|
this.#receiveBadgesSetting = data.receiveBadgesSetting;
|
136
|
-
void this.#updateGdpProfile();
|
137
170
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
171
|
+
|
172
|
+
// Trigger fetching GDP profile if the user is signed in.
|
173
|
+
if (data.syncInfo.accountEmail) {
|
174
|
+
void this.#fetchGdpDetails();
|
175
|
+
}
|
138
176
|
}
|
139
177
|
|
140
178
|
async highlightReceiveBadgesSetting(): Promise<void> {
|
@@ -164,15 +202,21 @@ export class SyncSection extends HTMLElement {
|
|
164
202
|
${renderGdpSectionIfNeeded({
|
165
203
|
receiveBadgesSetting: this.#receiveBadgesSetting,
|
166
204
|
receiveBadgesSettingContainerRef: this.#receiveBadgesSettingContainerRef,
|
167
|
-
gdpProfile: this.#gdpProfile
|
205
|
+
gdpProfile: this.#gdpProfile,
|
206
|
+
isEligibleToCreateProfile: this.#isEligibleToCreateGdpProfile,
|
168
207
|
})}
|
169
208
|
</fieldset>
|
170
209
|
`, this.#shadow, {host: this});
|
171
210
|
// clang-format on
|
172
211
|
}
|
173
212
|
|
174
|
-
async #
|
213
|
+
async #fetchGdpDetails(): Promise<void> {
|
214
|
+
if (!Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled) {
|
215
|
+
return;
|
216
|
+
}
|
217
|
+
|
175
218
|
this.#gdpProfile = await Host.GdpClient.GdpClient.instance().getProfile() ?? undefined;
|
219
|
+
this.#isEligibleToCreateGdpProfile = await Host.GdpClient.GdpClient.instance().isEligibleToCreateProfile();
|
176
220
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
177
221
|
}
|
178
222
|
}
|
@@ -237,7 +281,7 @@ function renderAccountInfo(syncInfo: Host.InspectorFrontendHostAPI.SyncInformati
|
|
237
281
|
// clang-format off
|
238
282
|
return html`
|
239
283
|
<div class="account-info">
|
240
|
-
<img src="data:image/png;base64, ${syncInfo.accountImage}" alt="Account avatar" />
|
284
|
+
<img class="account-avatar" src="data:image/png;base64, ${syncInfo.accountImage}" alt="Account avatar" />
|
241
285
|
<div class="account-email">
|
242
286
|
<span>${i18nString(UIStrings.signedIn)}</span>
|
243
287
|
<span>${syncInfo.accountEmail}</span>
|
@@ -250,21 +294,22 @@ function renderGdpSectionIfNeeded({
|
|
250
294
|
receiveBadgesSetting,
|
251
295
|
receiveBadgesSettingContainerRef,
|
252
296
|
gdpProfile,
|
297
|
+
isEligibleToCreateProfile,
|
253
298
|
}: {
|
254
299
|
receiveBadgesSettingContainerRef: Lit.Directives.Ref<HTMLElement>,
|
255
300
|
receiveBadgesSetting?: Common.Settings.Setting<boolean>,
|
256
301
|
gdpProfile?: Host.GdpClient.Profile,
|
302
|
+
isEligibleToCreateProfile?: boolean,
|
257
303
|
}): Lit.LitTemplate {
|
258
304
|
// clang-format off
|
259
|
-
if (!Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled) {
|
305
|
+
if (!Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled || (!gdpProfile && !isEligibleToCreateProfile)) {
|
260
306
|
return Lit.nothing;
|
261
307
|
}
|
262
308
|
|
263
309
|
function renderBrand(): Lit.LitTemplate {
|
264
310
|
return html`
|
265
311
|
<div class="gdp-profile-header">
|
266
|
-
<
|
267
|
-
${lockedString('Google Developer Program')}
|
312
|
+
<div class="gdp-logo" role="img" tabindex="0" aria-label="Google Developer Program"></div>
|
268
313
|
</div>
|
269
314
|
`;
|
270
315
|
}
|
@@ -293,7 +338,7 @@ function renderGdpSectionIfNeeded({
|
|
293
338
|
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.RECEIVE_BADGES_SETTING_ENABLED);
|
294
339
|
});
|
295
340
|
}}></setting-checkbox>
|
296
|
-
|
341
|
+
${renderDataDisclaimer()}
|
297
342
|
</div>` : Lit.nothing}
|
298
343
|
</div>
|
299
344
|
` : html`
|
@@ -24,7 +24,7 @@ fieldset {
|
|
24
24
|
outline-offset: 2px;
|
25
25
|
}
|
26
26
|
|
27
|
-
|
27
|
+
.account-avatar {
|
28
28
|
border: 0;
|
29
29
|
border-radius: var(--sys-shape-corner-full);
|
30
30
|
display: block;
|
@@ -76,9 +76,16 @@ img {
|
|
76
76
|
font-size: var(--sys-typescale-body3-size);
|
77
77
|
height: var(--sys-size-11);
|
78
78
|
|
79
|
-
.gdp-logo {
|
80
|
-
|
81
|
-
|
79
|
+
& .gdp-logo {
|
80
|
+
background-image: var(--image-file-gdp-logo-light);
|
81
|
+
background-size: contain;
|
82
|
+
width: 203px;
|
83
|
+
height: 18px;
|
84
|
+
background-repeat: no-repeat;
|
85
|
+
}
|
86
|
+
|
87
|
+
:host-context(.theme-with-dark-background) & .gdp-logo {
|
88
|
+
background-image: var(--image-file-gdp-logo-dark);
|
82
89
|
}
|
83
90
|
}
|
84
91
|
|
@@ -107,5 +114,11 @@ img {
|
|
107
114
|
align-items: center;
|
108
115
|
gap: var(--sys-size-2);
|
109
116
|
}
|
117
|
+
|
118
|
+
& .tooltip-content {
|
119
|
+
max-width: 278px;
|
120
|
+
padding: var(--sys-size-2) var(--sys-size-3);
|
121
|
+
font: var(--sys-typescale-body5-regular);
|
122
|
+
}
|
110
123
|
}
|
111
124
|
}
|
@@ -40,7 +40,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
40
40
|
#aiCodeCompletionCitationsToolbarContainer = document.createElement('div');
|
41
41
|
#aiCodeCompletionCitationsToolbarAttached = false;
|
42
42
|
|
43
|
-
#boundEditorKeyDown: (event:
|
43
|
+
#boundEditorKeyDown: (event: KeyboardEvent) => Promise<void>;
|
44
44
|
#boundOnAiCodeCompletionSettingChanged: () => void;
|
45
45
|
|
46
46
|
constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
|
@@ -87,10 +87,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
87
87
|
override editorExtension(): CodeMirror.Extension {
|
88
88
|
return [
|
89
89
|
CodeMirror.EditorView.updateListener.of(update => this.#editorUpdate(update)), this.#teaserCompartment.of([]),
|
90
|
-
|
91
|
-
// autocomplete menu are only activated after the first keyDown/keyUp events.
|
92
|
-
TextEditor.Config.conservativeCompletion, TextEditor.Config.aiAutoCompleteSuggestion,
|
93
|
-
CodeMirror.Prec.highest(CodeMirror.keymap.of(this.#editorKeymap()))
|
90
|
+
TextEditor.Config.aiAutoCompleteSuggestion, CodeMirror.Prec.highest(CodeMirror.keymap.of(this.#editorKeymap()))
|
94
91
|
];
|
95
92
|
}
|
96
93
|
|
@@ -167,11 +164,11 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
167
164
|
];
|
168
165
|
}
|
169
166
|
|
170
|
-
async #editorKeyDown(event:
|
167
|
+
async #editorKeyDown(event: KeyboardEvent): Promise<void> {
|
171
168
|
if (!this.#teaser?.isShowing()) {
|
172
169
|
return;
|
173
170
|
}
|
174
|
-
const keyboardEvent =
|
171
|
+
const keyboardEvent = event;
|
175
172
|
if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(keyboardEvent)) {
|
176
173
|
if (keyboardEvent.key === 'i') {
|
177
174
|
keyboardEvent.consume(true);
|
@@ -536,9 +536,9 @@ export class WatchExpression extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
536
536
|
});
|
537
537
|
}
|
538
538
|
|
539
|
-
private onSectionClick(event:
|
539
|
+
private onSectionClick(event: MouseEvent): void {
|
540
540
|
event.consume(true);
|
541
|
-
const mouseEvent =
|
541
|
+
const mouseEvent = event;
|
542
542
|
if (mouseEvent.detail === 1) {
|
543
543
|
this.preventClickTimeout = window.setTimeout(handleClick.bind(this), 333);
|
544
544
|
} else if (this.preventClickTimeout !== undefined) {
|
@@ -81,6 +81,10 @@ export function entryIsVisibleInTimeline(
|
|
81
81
|
return (eventStyle && !eventStyle.hidden) || eventIsTiming;
|
82
82
|
}
|
83
83
|
|
84
|
+
// These threads have no useful information. Omit them from the UI.
|
85
|
+
const HIDDEN_THREAD_NAMES: ReadonlySet<string> =
|
86
|
+
new Set(['Chrome_ChildIOThread', 'Compositor', 'GpuMemoryThread', 'PerfettoTrace']);
|
87
|
+
|
84
88
|
/**
|
85
89
|
* Track appenders add the data of each track into the timeline flame
|
86
90
|
* chart. Each track appender also implements functions tha allow the
|
@@ -330,8 +334,7 @@ export class CompatibilityTracksAppender {
|
|
330
334
|
this, this.#parsedTrace, pid, tid, name, Trace.Handlers.Threads.ThreadType.OTHER, entries, tree));
|
331
335
|
continue;
|
332
336
|
}
|
333
|
-
|
334
|
-
if ((name === 'Chrome_ChildIOThread' || name === 'Compositor' || name === 'GpuMemoryThread') && !showAllEvents) {
|
337
|
+
if ((name && HIDDEN_THREAD_NAMES.has(name)) && !showAllEvents) {
|
335
338
|
continue;
|
336
339
|
}
|
337
340
|
|
@@ -604,7 +607,7 @@ export class CompatibilityTracksAppender {
|
|
604
607
|
|
605
608
|
// Historically all tracks would have a titleForEvent() method. However a
|
606
609
|
// lot of these were duplicated so we worked on removing them in favour of
|
607
|
-
// the
|
610
|
+
// the Name.forEntry method called below (see crbug.com/365047728).
|
608
611
|
// However, sometimes an appender needs to customise the titles slightly;
|
609
612
|
// for example the LayoutShiftsTrackAppender does not show any titles as we
|
610
613
|
// use diamonds to represent layout shifts.
|
@@ -196,7 +196,7 @@ export class CountersGraph extends UI.Widget.VBox {
|
|
196
196
|
return counter;
|
197
197
|
}
|
198
198
|
|
199
|
-
resizerElement(): Element
|
199
|
+
resizerElement(): Element {
|
200
200
|
return this.header.element;
|
201
201
|
}
|
202
202
|
|
@@ -228,8 +228,8 @@ export class CountersGraph extends UI.Widget.VBox {
|
|
228
228
|
}
|
229
229
|
}
|
230
230
|
|
231
|
-
private onClick(event:
|
232
|
-
const x =
|
231
|
+
private onClick(event: MouseEvent): void {
|
232
|
+
const x = event.x - this.canvasContainer.getBoundingClientRect().left;
|
233
233
|
let minDistance = Infinity;
|
234
234
|
let bestTime;
|
235
235
|
for (const counterUI of this.counterUI) {
|
@@ -259,8 +259,8 @@ export class CountersGraph extends UI.Widget.VBox {
|
|
259
259
|
}
|
260
260
|
}
|
261
261
|
|
262
|
-
private onMouseMove(event:
|
263
|
-
const x =
|
262
|
+
private onMouseMove(event: MouseEvent): void {
|
263
|
+
const x = event.x - this.canvasContainer.getBoundingClientRect().left;
|
264
264
|
this.markerXPosition = x;
|
265
265
|
this.refreshCurrentValues();
|
266
266
|
}
|
@@ -9,6 +9,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
10
10
|
import * as Trace from '../../models/trace/trace.js';
|
11
11
|
import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';
|
12
|
+
import * as Tracing from '../../services/tracing/tracing.js';
|
12
13
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
13
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
14
15
|
import {Directives, html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
@@ -38,7 +39,6 @@ import {
|
|
38
39
|
} from './TimelineTreeView.js';
|
39
40
|
import {TimelineUIUtils} from './TimelineUIUtils.js';
|
40
41
|
import {TracingFrameLayerTree} from './TracingLayerTree.js';
|
41
|
-
import * as Utils from './utils/utils.js';
|
42
42
|
|
43
43
|
const UIStrings = {
|
44
44
|
/**
|
@@ -679,7 +679,7 @@ async function renderSelectedEventDetails(
|
|
679
679
|
return nothing;
|
680
680
|
}
|
681
681
|
const traceRecordingIsFresh =
|
682
|
-
parsedTrace ?
|
682
|
+
parsedTrace ? Tracing.FreshRecording.Tracker.instance().recordingIsFresh(parsedTrace) : false;
|
683
683
|
|
684
684
|
if (Trace.Types.Events.isSyntheticLayoutShift(selectedEvent) ||
|
685
685
|
Trace.Types.Events.isSyntheticLayoutShiftCluster(selectedEvent)) {
|
@@ -6,6 +6,7 @@
|
|
6
6
|
import * as Common from '../../core/common/common.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
8
|
import * as Root from '../../core/root/root.js';
|
9
|
+
import * as AIAssistance from '../../models/ai_assistance/ai_assistance.js';
|
9
10
|
import * as Trace from '../../models/trace/trace.js';
|
10
11
|
import * as SourceMapsResolver from '../../models/trace_source_maps_resolver/trace_source_maps_resolver.js';
|
11
12
|
import * as Workspace from '../../models/workspace/workspace.js';
|
@@ -247,12 +248,12 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
|
|
247
248
|
|
248
249
|
const contextMenu = new UI.ContextMenu.ContextMenu(mouseEvent);
|
249
250
|
if (perfAIEntryPointEnabled && this.parsedTrace) {
|
250
|
-
const aiCallTree =
|
251
|
+
const aiCallTree = AIAssistance.AICallTree.fromEvent(entry, this.parsedTrace);
|
251
252
|
if (aiCallTree) {
|
252
253
|
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(PERF_AI_ACTION_ID);
|
253
254
|
// The other side of setFlavor is handleTraceEntryNodeFlavorChange() in FreestylerPanel
|
254
|
-
const context =
|
255
|
-
UI.Context.Context.instance().setFlavor(
|
255
|
+
const context = AIAssistance.AgentFocus.fromCallTree(aiCallTree);
|
256
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, context);
|
256
257
|
|
257
258
|
if (Root.Runtime.hostConfig.devToolsAiSubmenuPrompts?.enabled) {
|
258
259
|
function appendSubmenuPromptAction(
|
@@ -7,6 +7,7 @@ import * as Common from '../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
9
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
10
|
+
import * as AIAssistance from '../../models/ai_assistance/ai_assistance.js';
|
10
11
|
import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
11
12
|
import * as Trace from '../../models/trace/trace.js';
|
12
13
|
import * as Workspace from '../../models/workspace/workspace.js';
|
@@ -374,7 +375,7 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
|
|
374
375
|
this.chartSplitWidget.setMainWidget(flameChartsContainer);
|
375
376
|
this.chartSplitWidget.setSidebarWidget(this.countersView);
|
376
377
|
this.chartSplitWidget.hideDefaultResizer();
|
377
|
-
this.chartSplitWidget.installResizer(
|
378
|
+
this.chartSplitWidget.installResizer(this.countersView.resizerElement());
|
378
379
|
|
379
380
|
// Create top level properties splitter.
|
380
381
|
this.detailsSplitWidget = new UI.SplitWidget.SplitWidget(false, true, 'timeline-panel-details-split-view-state');
|
@@ -1518,10 +1519,10 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
|
|
1518
1519
|
if (!this.#parsedTrace) {
|
1519
1520
|
return;
|
1520
1521
|
}
|
1521
|
-
const aiCallTree =
|
1522
|
+
const aiCallTree = AIAssistance.AICallTree.fromEvent(selection.event, this.#parsedTrace);
|
1522
1523
|
if (aiCallTree) {
|
1523
|
-
const context =
|
1524
|
-
UI.Context.Context.instance().setFlavor(
|
1524
|
+
const context = AIAssistance.AgentFocus.fromCallTree(aiCallTree);
|
1525
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, context);
|
1525
1526
|
}
|
1526
1527
|
});
|
1527
1528
|
}
|
@@ -1762,6 +1763,10 @@ export class TimelineFlameChartView extends Common.ObjectWrapper.eventMixin<Even
|
|
1762
1763
|
return true;
|
1763
1764
|
}
|
1764
1765
|
|
1766
|
+
supportsWholeWordSearch(): boolean {
|
1767
|
+
return true;
|
1768
|
+
}
|
1769
|
+
|
1765
1770
|
supportsRegexSearch(): boolean {
|
1766
1771
|
return true;
|
1767
1772
|
}
|
@@ -539,8 +539,8 @@ export class DropDown implements UI.ListControl.ListDelegate<number> {
|
|
539
539
|
this.close(this.listControl.selectedItem());
|
540
540
|
}
|
541
541
|
|
542
|
-
private onKeyDown(event:
|
543
|
-
switch (
|
542
|
+
private onKeyDown(event: KeyboardEvent): void {
|
543
|
+
switch (event.key) {
|
544
544
|
case 'Tab':
|
545
545
|
case 'Escape':
|
546
546
|
this.close(null);
|
@@ -50,6 +50,7 @@ import * as Trace from '../../models/trace/trace.js';
|
|
50
50
|
import * as SourceMapsResolver from '../../models/trace_source_maps_resolver/trace_source_maps_resolver.js';
|
51
51
|
import * as Workspace from '../../models/workspace/workspace.js';
|
52
52
|
import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';
|
53
|
+
import * as Tracing from '../../services/tracing/tracing.js';
|
53
54
|
import * as Adorners from '../../ui/components/adorners/adorners.js';
|
54
55
|
import * as Dialogs from '../../ui/components/dialogs/dialogs.js';
|
55
56
|
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
@@ -934,7 +935,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
934
935
|
getOrCreateExternalAIConversationData(): AiAssistanceModel.ExternalPerformanceAIConversationData {
|
935
936
|
if (!this.#externalAIConversationData) {
|
936
937
|
const conversationHandler = AiAssistanceModel.ConversationHandler.instance();
|
937
|
-
const focus =
|
938
|
+
const focus = AiAssistanceModel.getPerformanceAgentFocusFromModel(this.model);
|
938
939
|
if (!focus) {
|
939
940
|
throw new Error('could not create performance agent focus');
|
940
941
|
}
|
@@ -2043,7 +2044,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
2043
2044
|
this.flameChart.getNetworkDataProvider().reset();
|
2044
2045
|
this.flameChart.reset();
|
2045
2046
|
this.#changeView({mode: 'LANDING_PAGE'});
|
2046
|
-
UI.Context.Context.instance().setFlavor(
|
2047
|
+
UI.Context.Context.instance().setFlavor(AiAssistanceModel.AgentFocus, null);
|
2047
2048
|
}
|
2048
2049
|
|
2049
2050
|
#hasActiveTrace(): boolean {
|
@@ -2535,7 +2536,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
2535
2536
|
}
|
2536
2537
|
|
2537
2538
|
if (recordingIsFresh) {
|
2538
|
-
|
2539
|
+
Tracing.FreshRecording.Tracker.instance().registerFreshRecording(parsedTrace);
|
2539
2540
|
}
|
2540
2541
|
|
2541
2542
|
// We store the index of the active trace so we can load it back easily
|
@@ -9,6 +9,7 @@ import * as Common from '../../core/common/common.js';
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
10
10
|
import * as Platform from '../../core/platform/platform.js';
|
11
11
|
import * as Trace from '../../models/trace/trace.js';
|
12
|
+
import * as Tracing from '../../services/tracing/tracing.js';
|
12
13
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
13
14
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
14
15
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
@@ -24,7 +25,6 @@ import {TimelineRegExp} from './TimelineFilters.js';
|
|
24
25
|
import {rangeForSelection, type TimelineSelection} from './TimelineSelection.js';
|
25
26
|
import timelineTreeViewStyles from './timelineTreeView.css.js';
|
26
27
|
import {TimelineUIUtils} from './TimelineUIUtils.js';
|
27
|
-
import * as Utils from './utils/utils.js';
|
28
28
|
|
29
29
|
const UIStrings = {
|
30
30
|
/**
|
@@ -702,6 +702,10 @@ export class TimelineTreeView extends
|
|
702
702
|
return true;
|
703
703
|
}
|
704
704
|
|
705
|
+
supportsWholeWordSearch(): boolean {
|
706
|
+
return true;
|
707
|
+
}
|
708
|
+
|
705
709
|
supportsRegexSearch(): boolean {
|
706
710
|
return true;
|
707
711
|
}
|
@@ -795,7 +799,7 @@ export class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode<Gri
|
|
795
799
|
const target = parsedTrace ? targetForEvent(parsedTrace, event) : null;
|
796
800
|
const linkifier = this.treeView.linkifier;
|
797
801
|
const isFreshRecording =
|
798
|
-
Boolean(parsedTrace &&
|
802
|
+
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().recordingIsFresh(parsedTrace));
|
799
803
|
this.linkElement = TimelineUIUtils.linkifyTopCallFrame(event, target, linkifier, isFreshRecording);
|
800
804
|
if (this.linkElement) {
|
801
805
|
container.createChild('div', 'activity-link').appendChild(this.linkElement);
|
@@ -44,6 +44,7 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
44
44
|
import * as Trace from '../../models/trace/trace.js';
|
45
45
|
import * as SourceMapsResolver from '../../models/trace_source_maps_resolver/trace_source_maps_resolver.js';
|
46
46
|
import * as TraceBounds from '../../services/trace_bounds/trace_bounds.js';
|
47
|
+
import * as Tracing from '../../services/tracing/tracing.js';
|
47
48
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
48
49
|
// eslint-disable-next-line rulesdir/es-modules-import
|
49
50
|
import codeHighlighterStyles from '../../ui/components/code_highlighter/codeHighlighter.css.js';
|
@@ -1072,7 +1073,7 @@ export class TimelineUIUtils {
|
|
1072
1073
|
}
|
1073
1074
|
|
1074
1075
|
const isFreshRecording =
|
1075
|
-
Boolean(parsedTrace &&
|
1076
|
+
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().recordingIsFresh(parsedTrace));
|
1076
1077
|
|
1077
1078
|
switch (event.name) {
|
1078
1079
|
case Trace.Types.Events.Name.GC:
|
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
7
7
|
import * as Platform from '../../../core/platform/platform.js';
|
8
|
+
import * as AIAssistance from '../../../models/ai_assistance/ai_assistance.js';
|
8
9
|
import * as CrUXManager from '../../../models/crux-manager/crux-manager.js';
|
9
10
|
import * as Trace from '../../../models/trace/trace.js';
|
10
11
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
11
12
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
12
13
|
import * as Lit from '../../../ui/lit/lit.js';
|
13
14
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
14
|
-
import * as Utils from '../utils/utils.js';
|
15
15
|
|
16
16
|
import type {BaseInsightComponent} from './insights/BaseInsightComponent.js';
|
17
17
|
import {md, shouldRenderForCategory} from './insights/Helpers.js';
|
@@ -434,7 +434,7 @@ export class SidebarSingleInsightSet extends HTMLElement {
|
|
434
434
|
return html``;
|
435
435
|
}
|
436
436
|
|
437
|
-
const agentFocus =
|
437
|
+
const agentFocus = AIAssistance.AgentFocus.fromInsight(this.#data.parsedTrace, model);
|
438
438
|
// clang-format off
|
439
439
|
return html`<div>
|
440
440
|
<${componentClass.litTagName}
|
@@ -7,6 +7,7 @@ import '../../../../ui/components/markdown_view/markdown_view.js';
|
|
7
7
|
|
8
8
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
9
9
|
import * as Root from '../../../../core/root/root.js';
|
10
|
+
import * as AIAssistance from '../../../../models/ai_assistance/ai_assistance.js';
|
10
11
|
import type {InsightModel} from '../../../../models/trace/insights/types.js';
|
11
12
|
import type * as Trace from '../../../../models/trace/trace.js';
|
12
13
|
import * as Buttons from '../../../../ui/components/buttons/buttons.js';
|
@@ -15,7 +16,6 @@ import * as UI from '../../../../ui/legacy/legacy.js';
|
|
15
16
|
import * as Lit from '../../../../ui/lit/lit.js';
|
16
17
|
import * as VisualLogging from '../../../../ui/visual_logging/visual_logging.js';
|
17
18
|
import type * as Overlays from '../../overlays/overlays.js';
|
18
|
-
import * as Utils from '../../utils/utils.js';
|
19
19
|
|
20
20
|
import baseInsightComponentStyles from './baseInsightComponent.css.js';
|
21
21
|
import {md} from './Helpers.js';
|
@@ -86,7 +86,7 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
86
86
|
|
87
87
|
#selected = false;
|
88
88
|
#model: T|null = null;
|
89
|
-
#agentFocus:
|
89
|
+
#agentFocus: AIAssistance.AgentFocus|null = null;
|
90
90
|
#fieldMetrics: Trace.Insights.Common.CrUXFieldMetricResults|null = null;
|
91
91
|
|
92
92
|
get model(): T|null {
|
@@ -158,7 +158,7 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
158
158
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#render);
|
159
159
|
}
|
160
160
|
|
161
|
-
set agentFocus(agentFocus:
|
161
|
+
set agentFocus(agentFocus: AIAssistance.AgentFocus) {
|
162
162
|
this.#agentFocus = agentFocus;
|
163
163
|
}
|
164
164
|
|
@@ -179,9 +179,9 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
179
179
|
this.dispatchEvent(new SidebarInsight.InsightDeactivated());
|
180
180
|
|
181
181
|
// Clear agent (but only if currently focused on an insight).
|
182
|
-
const focus = UI.Context.Context.instance().flavor(
|
182
|
+
const focus = UI.Context.Context.instance().flavor(AIAssistance.AgentFocus);
|
183
183
|
if (focus && focus.data.type === 'insight') {
|
184
|
-
UI.Context.Context.instance().setFlavor(
|
184
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, null);
|
185
185
|
}
|
186
186
|
return;
|
187
187
|
}
|
@@ -359,7 +359,7 @@ export abstract class BaseInsightComponent<T extends InsightModel> extends HTMLE
|
|
359
359
|
return;
|
360
360
|
}
|
361
361
|
|
362
|
-
UI.Context.Context.instance().setFlavor(
|
362
|
+
UI.Context.Context.instance().setFlavor(AIAssistance.AgentFocus, this.#agentFocus);
|
363
363
|
|
364
364
|
// Trigger the AI Assistance panel to open.
|
365
365
|
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(actionId);
|
@@ -6,10 +6,10 @@
|
|
6
6
|
import * as Common from '../../../core/common/common.js';
|
7
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
8
8
|
import * as Platform from '../../../core/platform/platform.js';
|
9
|
+
import * as AIAssistance from '../../../models/ai_assistance/ai_assistance.js';
|
9
10
|
import * as Trace from '../../../models/trace/trace.js';
|
10
11
|
import type * as PerfUI from '../../../ui/legacy/components/perf_ui/perf_ui.js';
|
11
12
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
12
|
-
import * as Utils from '../utils/utils.js';
|
13
13
|
|
14
14
|
import * as Components from './components/components.js';
|
15
15
|
|
@@ -1476,7 +1476,7 @@ export class Overlays extends EventTarget {
|
|
1476
1476
|
const component = new Components.EntryLabelOverlay.EntryLabelOverlay(overlay.label, shouldDrawLabelBelowEntry);
|
1477
1477
|
// Generate the AI Call Tree for the AI Auto-Annotation feature.
|
1478
1478
|
const parsedTrace = this.#queries.parsedTrace();
|
1479
|
-
const callTree = parsedTrace ?
|
1479
|
+
const callTree = parsedTrace ? AIAssistance.AICallTree.fromEvent(overlay.entry, parsedTrace) : null;
|
1480
1480
|
component.callTree = callTree;
|
1481
1481
|
|
1482
1482
|
component.addEventListener(
|