Skip to content

Commit

Permalink
Clean up the "Ask Cody to Explain" functionality in terminal (#7254)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ykdojo authored Feb 26, 2025
1 parent 4c1817a commit b1dc271
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vscode/src/commands/execute/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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}`)
}
Expand Down

0 comments on commit b1dc271

Please sign in to comment.