Skip to content

Commit

Permalink
Edit: Update code lens to be more descriptive (#2710)
Browse files Browse the repository at this point in the history
## Description

Part of #2009

Keyboard functionality will be added in a follow up PR

<img width="492" alt="image"
src="https://github.com/sourcegraph/cody/assets/9516420/e729a511-53df-4fad-bf3f-8c0dbd5db41b">


## Test plan

1. Create an edit
2. Observe the code lens on complete

<!-- Required. See
https://sourcegraph.com/docs/dev/background-information/testing_principles.
-->
  • Loading branch information
umpox committed Jan 16, 2024
1 parent 8127810 commit 39ca63b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vscode/src/non-stop/codelenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export function getLensesForTask(task: FixupTask): vscode.CodeLens[] {
}
case CodyTaskState.applied: {
const title = getAppliedLens(codeLensRange, task.id)
const accept = getAcceptLens(codeLensRange, task.id)
const retry = getRetryLens(codeLensRange, task.id)
const undo = getUndoLens(codeLensRange, task.id)
const accept = getAcceptLens(codeLensRange, task.id)
return [title, retry, undo, accept]
return [title, accept, retry, undo]
}
case CodyTaskState.error: {
const title = getErrorLens(codeLensRange, task)
Expand Down Expand Up @@ -142,7 +142,7 @@ function getDiscardLens(codeLensRange: vscode.Range, id: string): vscode.CodeLen
function getAppliedLens(codeLensRange: vscode.Range, id: string): vscode.CodeLens {
const lens = new vscode.CodeLens(codeLensRange)
lens.command = {
title: '$(cody-logo) Edits Applied',
title: '$(cody-logo) Show Diff',
command: 'cody.fixup.codelens.diff',
arguments: [id],
}
Expand Down Expand Up @@ -172,7 +172,7 @@ function getUndoLens(codeLensRange: vscode.Range, id: string): vscode.CodeLens {
function getAcceptLens(codeLensRange: vscode.Range, id: string): vscode.CodeLens {
const lens = new vscode.CodeLens(codeLensRange)
lens.command = {
title: 'Done',
title: 'Accept',
command: 'cody.fixup.codelens.accept',
arguments: [id],
}
Expand Down

0 comments on commit 39ca63b

Please sign in to comment.