Skip to content

Commit be6f7b3

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
AI: Remove ellipses from function titles
This CL removes ellipses (… or ...) from the titles used in `declareFunction` calls across all AI agents. Fixed: 498881295 Change-Id: Ie7c6f553a76d4355b192cc4517c44ae5b5d9fd1e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7725365 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
1 parent 46c3e84 commit be6f7b3

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

front_end/models/ai_assistance/agents/AccessibilityAgent.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describeWithMockConnection('AccessibilityAgent', () => {
8686
const responses = await Array.fromAsync(agent.run('test', {selected: context}));
8787
const titleResponse = responses.find(response => response.type === AiAssistance.AiAgent.ResponseType.TITLE);
8888
assert.exists(titleResponse);
89-
assert.strictEqual(titleResponse.title, 'Getting Lighthouse audits for accessibility');
89+
assert.strictEqual(titleResponse.title, 'Getting Lighthouse audits for accessibility');
9090
});
9191

9292
it('can call the getStyles method', async () => {
@@ -143,7 +143,7 @@ describeWithMockConnection('AccessibilityAgent', () => {
143143
const responses = await Array.fromAsync(agent.run('test', {selected: context}));
144144
const titleResponse = responses.find(response => response.type === AiAssistance.AiAgent.ResponseType.TITLE);
145145
assert.exists(titleResponse);
146-
assert.strictEqual(titleResponse.title, 'Running accessibility audits');
146+
assert.strictEqual(titleResponse.title, 'Running accessibility audits');
147147
assert.isTrue(lighthouseRecording.calledOnceWith({
148148
mode: 'snapshot',
149149
categoryIds: ['accessibility'],

front_end/models/ai_assistance/agents/AccessibilityAgent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
240240
},
241241
displayInfoFromArgs: params => {
242242
return {
243-
title: i18n.i18n.lockedString('Running accessibility audits'),
243+
title: i18n.i18n.lockedString('Running accessibility audits'),
244244
thought: params.explanation,
245245
action: 'runAccessibilityAudits()'
246246
};
@@ -282,7 +282,7 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
282282
},
283283
displayInfoFromArgs: params => {
284284
return {
285-
title: i18n.i18n.lockedString(`Getting Lighthouse audits for ${params.categoryId}`),
285+
title: i18n.i18n.lockedString(`Getting Lighthouse audits for ${params.categoryId}`),
286286
action: `getLighthouseAudits('${params.categoryId}')`
287287
};
288288
},

front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export class BreakpointDebuggerAgent extends AiAgent<Workspace.UISourceCode.UILo
407407
},
408408
displayInfoFromArgs: () => {
409409
return {
410-
title: 'Waiting for user action...',
410+
title: 'Waiting for user action',
411411
thought: 'I am waiting for you to trigger a breakpoint in the application.',
412412
};
413413
},

front_end/models/ai_assistance/agents/ContextSelectionAgent.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
110110
},
111111
displayInfoFromArgs: () => {
112112
return {
113-
title: lockedString('Listing network requests'),
113+
title: lockedString('Listing network requests'),
114114
action: 'listNetworkRequest()',
115115
};
116116
},
@@ -175,7 +175,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
175175
},
176176
displayInfoFromArgs: args => {
177177
return {
178-
title: lockedString('Getting network request'),
178+
title: lockedString('Getting network request'),
179179
action: `selectNetworkRequest(${args.id})`,
180180
};
181181
},
@@ -215,7 +215,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
215215
},
216216
displayInfoFromArgs: () => {
217217
return {
218-
title: lockedString('Listing source requests'),
218+
title: lockedString('Listing source requests'),
219219
action: 'listSourceFiles()',
220220
};
221221
},
@@ -252,7 +252,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
252252
},
253253
displayInfoFromArgs: args => {
254254
return {
255-
title: lockedString('Getting source file'),
255+
title: lockedString('Getting source file'),
256256
action: `selectSourceFile(${args.id})`,
257257
};
258258
},
@@ -285,7 +285,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
285285
},
286286
displayInfoFromArgs: () => {
287287
return {
288-
title: 'Recording a performance trace',
288+
title: 'Recording a performance trace',
289289
action: 'performanceRecordAndReload()',
290290
};
291291
},
@@ -317,7 +317,7 @@ export class ContextSelectionAgent extends AiAgent<never> {
317317
},
318318
displayInfoFromArgs: () => {
319319
return {
320-
title: 'Auditing your page with Lighthouse',
320+
title: 'Auditing your page with Lighthouse',
321321
action: 'runLighthouseAudits()',
322322
};
323323
},

front_end/models/ai_assistance/agents/PerformanceAgent.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ code
522522
const expectedOutput = JSON.stringify({summary: expectedRequestsOutput});
523523
const titleResponse = responses.find(response => response.type === AiAgent.ResponseType.TITLE);
524524
assert.exists(titleResponse);
525-
assert.strictEqual(titleResponse.title, 'Investigating network activity');
525+
assert.strictEqual(titleResponse.title, 'Investigating network activity');
526526

527527
assert.deepEqual(action, {
528528
type: 'action' as AiAgent.ActionResponse['type'],
@@ -555,7 +555,7 @@ code
555555
const responses = await Array.fromAsync(agent.run('test', {selected: context}));
556556
const titleResponse = responses.find(response => response.type === AiAgent.ResponseType.TITLE);
557557
assert.exists(titleResponse);
558-
assert.strictEqual(titleResponse.title, 'Investigating main thread activity');
558+
assert.strictEqual(titleResponse.title, 'Investigating main thread activity');
559559

560560
const action = responses.find(response => response.type === AiAgent.ResponseType.ACTION);
561561
assert.exists(action);

front_end/models/ai_assistance/agents/PerformanceAgent.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ const UIStringsNotTranslated = {
4141
/**
4242
* @description Shown when the agent is investigating network activity
4343
*/
44-
networkActivitySummary: 'Investigating network activity',
44+
networkActivitySummary: 'Investigating network activity',
4545
/**
4646
* @description Shown when the agent is investigating main thread activity
4747
*/
48-
mainThreadActivity: 'Investigating main thread activity',
48+
mainThreadActivity: 'Investigating main thread activity',
4949
} as const;
5050
const lockedString = i18n.i18n.lockedString;
5151

@@ -805,7 +805,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
805805
},
806806
displayInfoFromArgs: params => {
807807
return {
808-
title: lockedString(`Investigating insight ${params.insightName}`),
808+
title: lockedString(`Investigating insight ${params.insightName}`),
809809
action: `getInsightDetails('${params.insightSetId}', '${params.insightName}')`
810810
};
811811
},
@@ -903,7 +903,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
903903
required: ['eventKey']
904904
},
905905
displayInfoFromArgs: params => {
906-
return {title: lockedString('Looking at trace event'), action: `getEventByKey('${params.eventKey}')`};
906+
return {title: lockedString('Looking at trace event'), action: `getEventByKey('${params.eventKey}')`};
907907
},
908908
handler: async params => {
909909
debugLog('Function call: getEventByKey', params);
@@ -1093,7 +1093,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
10931093
required: ['eventKey']
10941094
},
10951095
displayInfoFromArgs: args => {
1096-
return {title: lockedString('Looking at call tree'), action: `getDetailedCallTree('${args.eventKey}')`};
1096+
return {title: lockedString('Looking at call tree'), action: `getDetailedCallTree('${args.eventKey}')`};
10971097
},
10981098
handler: async args => {
10991099
debugLog('Function call: getDetailedCallTree');
@@ -1213,7 +1213,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
12131213
},
12141214
displayInfoFromArgs: args => {
12151215
return {
1216-
title: lockedString('Looking up function code'),
1216+
title: lockedString('Looking up function code'),
12171217
action: `getFunctionCode('${args.scriptUrl}', ${args.line}, ${args.column})`
12181218
};
12191219
},
@@ -1271,7 +1271,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
12711271
required: ['url']
12721272
},
12731273
displayInfoFromArgs: args => {
1274-
return {title: lockedString('Looking at resource content'), action: `getResourceContent('${args.url}')`};
1274+
return {title: lockedString('Looking at resource content'), action: `getResourceContent('${args.url}')`};
12751275
},
12761276
handler: async args => {
12771277
debugLog('Function call: getResourceContent');
@@ -1326,7 +1326,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
13261326
required: ['eventKey']
13271327
},
13281328
displayInfoFromArgs: params => {
1329-
return {title: lockedString('Selecting event'), action: `selectEventByKey('${params.eventKey}')`};
1329+
return {title: lockedString('Selecting event'), action: `selectEventByKey('${params.eventKey}')`};
13301330
},
13311331
handler: async params => {
13321332
debugLog('Function call: selectEventByKey', params);

0 commit comments

Comments
 (0)