Skip to content

Commit 8d69252

Browse files
Samiya CaurDevtools-frontend LUCI CQ
authored andcommitted
Add setting description and info for performance agent launch
Bug: 372412129 Change-Id: Ide831a1c9ef7bf6789e7a30feeb957e55e48fa3e Fixed: 372412129 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5952645 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Samiya Caur <[email protected]>
1 parent 67f366b commit 8d69252

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

front_end/panels/settings/AISettingsTab.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ describeWithEnvironment('AISettingsTab', () => {
9292
assert.isNotNull(view.shadowRoot);
9393

9494
const settingCardDesc = view.shadowRoot.querySelectorAll('.setting-description');
95-
assert.strictEqual(settingCardDesc[1].textContent, 'Get help with understanding CSS styles and network requests');
95+
assert.strictEqual(settingCardDesc[1].textContent, 'Get help with understanding CSS styles, and network requests');
9696
});
9797

9898
it('can turn feature on, which automatically expands it', async () => {

front_end/panels/settings/AISettingsTab.ts

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,16 @@ const UIStrings = {
9090
/**
9191
*@description Text describing the 'AI assistance' feature
9292
*/
93-
helpUnderstandStylingAndNetworkRequest: 'Get help with understanding CSS styles and network requests',
93+
helpUnderstandStylingAndNetworkRequest: 'Get help with understanding CSS styles, and network requests',
9494
/**
9595
*@description Text describing the 'AI assistance' feature
9696
*/
9797
helpUnderstandStylingNetworkAndFile: 'Get help with understanding CSS styles, network requests, and files',
98+
/**
99+
*@description Text describing the 'AI assistance' feature
100+
*/
101+
helpUnderstandStylingNetworkPerformanceAndFile:
102+
'Get help with understanding CSS styles, network requests, performance, and files',
98103
/**
99104
*@description Text which is a hyperlink to more documentation
100105
*/
@@ -111,6 +116,11 @@ const UIStrings = {
111116
*@description Description of the AI assistance feature
112117
*/
113118
explainStylingNetworkAndFile: 'Understand CSS styles, network activity, and file origins with AI-powered insights',
119+
/**
120+
*@description Description of the AI assistance feature
121+
*/
122+
explainStylingNetworkPerformanceAndFile:
123+
'Understand CSS styles, network activity, performance bottlenecks, and file origins with AI-powered insights',
114124
/**
115125
*@description Description of the AI assistance feature
116126
*/
@@ -205,21 +215,27 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
205215

206216
#getAiAssistanceSettingDescription(): Platform.UIString.LocalizedString {
207217
const config = Common.Settings.Settings.instance().getHostConfig();
218+
if (config.devToolsAiAssistancePerformanceAgentDogfood?.enabled) {
219+
return i18nString(UIStrings.helpUnderstandStylingNetworkPerformanceAndFile);
220+
}
221+
if (config.devToolsAiAssistanceFileAgentDogfood?.enabled) {
222+
return i18nString(UIStrings.helpUnderstandStylingNetworkAndFile);
223+
}
208224
if (config.devToolsExplainThisResourceDogfood?.enabled) {
209-
if (config.devToolsAiAssistanceFileAgentDogfood?.enabled) {
210-
return i18nString(UIStrings.helpUnderstandStylingNetworkAndFile);
211-
}
212225
return i18nString(UIStrings.helpUnderstandStylingAndNetworkRequest);
213226
}
214227
return i18nString(UIStrings.helpUnderstandStyling);
215228
}
216229

217230
#getAiAssistanceSettingInfo(): Platform.UIString.LocalizedString {
218231
const config = Common.Settings.Settings.instance().getHostConfig();
232+
if (config.devToolsAiAssistancePerformanceAgentDogfood?.enabled) {
233+
return i18nString(UIStrings.explainStylingNetworkPerformanceAndFile);
234+
}
235+
if (config.devToolsAiAssistanceFileAgentDogfood?.enabled) {
236+
return i18nString(UIStrings.explainStylingNetworkAndFile);
237+
}
219238
if (config.devToolsExplainThisResourceDogfood?.enabled) {
220-
if (config.devToolsAiAssistanceFileAgentDogfood?.enabled) {
221-
return i18nString(UIStrings.explainStylingNetworkAndFile);
222-
}
223239
return i18nString(UIStrings.explainStylingAndNetworkRequest);
224240
}
225241
return i18nString(UIStrings.explainStyling);

0 commit comments

Comments
 (0)