You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -107,8 +107,16 @@ Content:
107
107
"type": 6,
108
108
"description": "",
109
109
"nullable": true,
110
-
"required": [],
111
-
"properties": {}
110
+
"required": [
111
+
"mode"
112
+
],
113
+
"properties": {
114
+
"mode": {
115
+
"type": 1,
116
+
"description": "The mode to run Lighthouse in. Your ONLY options are \"navigation\" or \"snapshot\". You should determine this based on the user's question. If the user is asking specifically about accessibility, you can run in \"snapshot\" mode which avoids reloading the page. If the user asks for a full Lighthouse report, you should run in \"navigation\" mode which is the default. These are the only options you can pass.",
'Records a Lighthouse audit on the current page. Use this to debug accessibility, SEO, and best practices. (For performance metrics like LCP, use performanceRecordAndReload instead).',
312
318
parameters: {
313
319
type: Host.AidaClient.ParametersTypes.OBJECT,
314
320
description: '',
315
321
nullable: true,
316
-
required: [],
317
-
properties: {},
322
+
required: ['mode'],
323
+
properties: {
324
+
mode: {
325
+
type: Host.AidaClient.ParametersTypes.STRING,
326
+
description:
327
+
'The mode to run Lighthouse in. Your ONLY options are "navigation" or "snapshot". You should determine this based on the user\'s question. If the user is asking specifically about accessibility, you can run in "snapshot" mode which avoids reloading the page. If the user asks for a full Lighthouse report, you should run in "navigation" mode which is the default. These are the only options you can pass.',
328
+
nullable: false,
329
+
}
330
+
},
318
331
},
319
-
displayInfoFromArgs: ()=>{
332
+
displayInfoFromArgs: args=>{
333
+
constmode=parseLighthouseMode(args.mode);
320
334
return{
321
335
title: 'Auditing your page with Lighthouse',
322
-
action: 'runLighthouseAudits()',
336
+
action: `runLighthouseAudits(${mode})`,
323
337
};
324
338
},
325
-
handler: async()=>{
339
+
handler: asyncparams=>{
326
340
if(!this.#lighthouseRecording){
327
341
return{
328
342
error: 'Lighthouse report is not available.',
329
343
};
330
344
}
331
-
constresult=awaitthis.#lighthouseRecording();
345
+
constmode=parseLighthouseMode(params.mode);
346
+
debugLog(`Recording with Lighthouse; runMode=${mode}`);
0 commit comments