Skip to content

Commit ddf1ffb

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
[DrJones] Fix feature name and user tier
Bug: 369822364 Change-Id: Iacc0ec8f0103b02bf990dd59350ba8507d256961 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5934879 Reviewed-by: Nikolay Vitkov <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Auto-Submit: Alex Rudenko <[email protected]>
1 parent 209adee commit ddf1ffb

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

front_end/panels/freestyler/DrJonesFileAgent.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ const MAX_FILE_SIZE = 50000;
7373
export class DrJonesFileAgent extends AiAgent {
7474
readonly preamble = preamble;
7575
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_DRJONES_FILE_AGENT;
76-
// TODO(b/369822364): use a feature param instead.
77-
readonly userTier = 'BETA';
76+
get userTier(): string|undefined {
77+
const config = Common.Settings.Settings.instance().getHostConfig();
78+
return config.devToolsAiAssistanceFileAgentDogfood?.userTier;
79+
}
7880
get options(): AidaRequestOptions {
7981
const config = Common.Settings.Settings.instance().getHostConfig();
8082
const temperature = AiAgent.validTemperature(config.devToolsAiAssistanceFileAgentDogfood?.temperature);

front_end/panels/freestyler/DrJonesNetworkAgent.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ const lockedString = i18n.i18n.lockedString;
105105
export class DrJonesNetworkAgent extends AiAgent {
106106
readonly preamble = preamble;
107107
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_DRJONES_NETWORK_AGENT;
108-
// TODO(b/369822364): use a feature param instead.
109-
readonly userTier = 'BETA';
108+
get userTier(): string|undefined {
109+
const config = Common.Settings.Settings.instance().getHostConfig();
110+
return config.devToolsExplainThisResourceDogfood?.userTier;
111+
}
110112
get options(): AidaRequestOptions {
111113
const config = Common.Settings.Settings.instance().getHostConfig();
112114
const temperature = AiAgent.validTemperature(config.devToolsExplainThisResourceDogfood?.temperature);

front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describeWithEnvironment('DrJonesPerformanceAgent', () => {
113113
model_id: 'test model',
114114
temperature: undefined,
115115
},
116-
client_feature: 2,
116+
client_feature: 8,
117117
functionality_type: 1,
118118
},
119119
);

front_end/panels/freestyler/DrJonesPerformanceAgent.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ const lockedString = i18n.i18n.lockedString;
8080
*/
8181
export class DrJonesPerformanceAgent extends AiAgent {
8282
readonly preamble = preamble;
83-
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_FREESTYLER;
84-
// TODO(b/369822364): use a feature param instead.
85-
readonly userTier = 'BETA';
83+
readonly clientFeature = Host.AidaClient.ClientFeature.CHROME_DRJONES_PERFORMANCE_AGENT;
84+
get userTier(): string|undefined {
85+
const config = Common.Settings.Settings.instance().getHostConfig();
86+
return config.devToolsAiAssistancePerformanceAgentDogfood?.userTier;
87+
}
8688
get options(): AidaRequestOptions {
8789
const config = Common.Settings.Settings.instance().getHostConfig();
8890
const temperature = AiAgent.validTemperature(config.devToolsAiAssistancePerformanceAgentDogfood?.temperature);

0 commit comments

Comments
 (0)