From b1dc271c15996d8b3c71fefeae05c31b6a8515cb Mon Sep 17 00:00:00 2001 From: YK <1811651+ykdojo@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:40:02 -0800 Subject: [PATCH] Clean up the "Ask Cody to Explain" functionality in terminal (#7254) Specifically, `Process options` should not be included if it's empty. Before: ![image](https://github.com/user-attachments/assets/9106c8d1-81d8-4775-a226-f06e7dc5a02e) After: ![image](https://github.com/user-attachments/assets/1dcafd81-c325-496e-933f-67e6005dd762) ## Test plan Manually test it. --- vscode/src/commands/execute/terminal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/src/commands/execute/terminal.ts b/vscode/src/commands/execute/terminal.ts index 6f028412a31f..60ec2c680af5 100644 --- a/vscode/src/commands/execute/terminal.ts +++ b/vscode/src/commands/execute/terminal.ts @@ -23,7 +23,7 @@ export async function executeExplainOutput( const source = 'terminal' telemetryRecorder.recordEvent('cody.command.terminal', 'executed', { metadata: { - useCodebaseContex: 0, + useCodebaseContext: 0, }, interactionID: requestID, privateMetadata: { @@ -46,7 +46,7 @@ export async function executeExplainOutput( let prompt = template.replaceAll('{{PROCESS}}', promptArgs.name).replaceAll('{{OUTPUT}}', output) const options = promptArgs.creationOptions - if (options) { + if (options && options.toString() !== '{}') { span.addEvent('hasCreationOptions') prompt = prompt.concat(ps`\nProcess options: ${options}`) }