Skip to content

Commit

Permalink
Edit: Remove show diff CTA for insertions (#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
umpox authored Mar 25, 2024
1 parent 5096b57 commit e024610
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vscode/src/non-stop/codelenses/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { CodyTaskState } from '../utils'
export function getLensesForTask(task: FixupTask): vscode.CodeLens[] {
const codeLensRange = new vscode.Range(task.selectionRange.start, task.selectionRange.start)
const isTest = task.intent === 'test'
const isEdit = task.mode === 'edit'
switch (task.state) {
case CodyTaskState.pending:
case CodyTaskState.working: {
Expand Down Expand Up @@ -41,7 +42,10 @@ export function getLensesForTask(task: FixupTask): vscode.CodeLens[] {
if (isTest) {
return [accept, undo]
}
return [accept, retry, undo, showDiff]
if (isEdit) {
return [accept, retry, undo, showDiff]
}
return [accept, retry, undo]
}
case CodyTaskState.error: {
const title = getErrorLens(codeLensRange, task)
Expand Down

0 comments on commit e024610

Please sign in to comment.