From 4c633ee8ff8d6cab7025dcb4a812509d3cac7b9c Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 18 Nov 2024 21:02:18 -0800 Subject: [PATCH] remove code --- src/vs/workbench/contrib/void/browser/findDiffs.ts | 14 -------------- .../contrib/void/browser/registerInlineDiffs.ts | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/findDiffs.ts b/src/vs/workbench/contrib/void/browser/findDiffs.ts index cfaed6a6..05ec92f2 100644 --- a/src/vs/workbench/contrib/void/browser/findDiffs.ts +++ b/src/vs/workbench/contrib/void/browser/findDiffs.ts @@ -1,5 +1,3 @@ - -import { Range } from 'vscode'; import { diffLines } from './react/out/util/diffLines.js' export type BaseDiff = { @@ -16,18 +14,6 @@ export type BaseDiff = { } -// Andrew diff algo: -export type SuggestedEdit = { - // start/end of current file - newRange: Range; - - // start/end of original file - originalRange: Range; - type: 'insertion' | 'deletion' | 'edit'; - originalContent: string; // original content (originalfile[originalStart...originalEnd]) - newContent: string; -} - export function findDiffs(oldStr: string, newStr: string) { // this makes it so the end of the file always ends with a \n (if you don't have this, then diffing E vs E\n gives an "edit". With it, you end up diffing E\n vs E\n\n which now properly gives an insertion) diff --git a/src/vs/workbench/contrib/void/browser/registerInlineDiffs.ts b/src/vs/workbench/contrib/void/browser/registerInlineDiffs.ts index e896543d..b05eb812 100644 --- a/src/vs/workbench/contrib/void/browser/registerInlineDiffs.ts +++ b/src/vs/workbench/contrib/void/browser/registerInlineDiffs.ts @@ -414,7 +414,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { const elt: IUndoRedoElement = { type: UndoRedoElementType.Resource, resource: model.uri, - label: 'Add Diffs', + label: 'Void Changes', code: 'undoredo.inlineDiffs', undo: () => { restoreDiffAreas(beforeSnapshot) }, redo: () => { if (afterSnapshot) restoreDiffAreas(afterSnapshot) }