Skip to content

Commit 9137953

Browse files
committed
fix: remove unintended DISABLE_DIFF_VISUALIZATION feature from LaTeX PR
- Removed DISABLE_DIFF_VISUALIZATION from experiment types and configurations - Removed disableDiffVisualization parameter from Task and DiffViewProvider - Removed all DISABLE_DIFF_VISUALIZATION translations from locale files - Removed disable-diff-visualization changeset - Keep only LaTeX rendering related changes in this PR
1 parent 2bb65da commit 9137953

File tree

26 files changed

+4
-116
lines changed

26 files changed

+4
-116
lines changed

.changeset/disable-diff-visualization.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/types/src/experiment.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
66
* ExperimentId
77
*/
88

9-
export const experimentIds = [
10-
"powerSteering",
11-
"disableCompletionCommand",
12-
"marketplace",
13-
"multiFileApplyDiff",
14-
"disableDiffVisualization",
15-
] as const
9+
export const experimentIds = ["powerSteering", "disableCompletionCommand", "marketplace", "multiFileApplyDiff"] as const
1610

1711
export const experimentIdsSchema = z.enum(experimentIds)
1812

@@ -27,7 +21,6 @@ export const experimentsSchema = z.object({
2721
disableCompletionCommand: z.boolean().optional(),
2822
marketplace: z.boolean().optional(),
2923
multiFileApplyDiff: z.boolean().optional(),
30-
disableDiffVisualization: z.boolean().optional(),
3124
})
3225

3326
export type Experiments = z.infer<typeof experimentsSchema>

src/core/task/Task.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export type TaskOptions = {
104104
provider: ClineProvider
105105
apiConfiguration: ProviderSettings
106106
enableDiff?: boolean
107-
disableDiffVisualization?: boolean
108107
enableCheckpoints?: boolean
109108
fuzzyMatchThreshold?: number
110109
consecutiveMistakeLimit?: number
@@ -199,7 +198,6 @@ export class Task extends EventEmitter<ClineEvents> {
199198
provider,
200199
apiConfiguration,
201200
enableDiff = false,
202-
disableDiffVisualization = false,
203201
enableCheckpoints = true,
204202
fuzzyMatchThreshold = 1.0,
205203
consecutiveMistakeLimit = 3,
@@ -244,7 +242,7 @@ export class Task extends EventEmitter<ClineEvents> {
244242
this.consecutiveMistakeLimit = consecutiveMistakeLimit
245243
this.providerRef = new WeakRef(provider)
246244
this.globalStoragePath = provider.context.globalStorageUri.fsPath
247-
this.diffViewProvider = new DiffViewProvider(this.cwd, disableDiffVisualization)
245+
this.diffViewProvider = new DiffViewProvider(this.cwd)
248246
this.enableCheckpoints = enableCheckpoints
249247

250248
this.rootTask = rootTask

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,6 @@ export class ClineProvider
538538
experiments,
539539
} = await this.getState()
540540

541-
const disableDiffVisualization = experiments.disableDiffVisualization ?? false
542-
543541
if (!ProfileValidator.isProfileAllowed(apiConfiguration, organizationAllowList)) {
544542
throw new OrganizationAllowListViolationError(t("common:errors.violated_organization_allowlist"))
545543
}
@@ -548,7 +546,6 @@ export class ClineProvider
548546
provider: this,
549547
apiConfiguration,
550548
enableDiff,
551-
disableDiffVisualization,
552549
enableCheckpoints,
553550
fuzzyMatchThreshold,
554551
task,
@@ -581,13 +578,10 @@ export class ClineProvider
581578
experiments,
582579
} = await this.getState()
583580

584-
const disableDiffVisualization = experiments.disableDiffVisualization ?? false
585-
586581
const cline = new Task({
587582
provider: this,
588583
apiConfiguration,
589584
enableDiff,
590-
disableDiffVisualization,
591585
enableCheckpoints,
592586
fuzzyMatchThreshold,
593587
historyItem,

src/integrations/editor/DiffViewProvider.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ export class DiffViewProvider {
3434
private streamedLines: string[] = []
3535
private preDiagnostics: [vscode.Uri, vscode.Diagnostic[]][] = []
3636

37-
constructor(
38-
private cwd: string,
39-
private disableDiffVisualization: boolean = false,
40-
) {}
37+
constructor(private cwd: string) {}
4138

4239
async open(relPath: string): Promise<void> {
4340
this.relPath = relPath
@@ -95,13 +92,7 @@ export class DiffViewProvider {
9592
this.documentWasOpen = true
9693
}
9794

98-
// If diff visualization is disabled, open the file directly
99-
if (this.disableDiffVisualization) {
100-
const document = await vscode.workspace.openTextDocument(absolutePath)
101-
this.activeDiffEditor = await vscode.window.showTextDocument(document, { preview: false })
102-
} else {
103-
this.activeDiffEditor = await this.openDiffEditor()
104-
}
95+
this.activeDiffEditor = await this.openDiffEditor()
10596
this.fadedOverlayController = new DecorationController("fadedOverlay", this.activeDiffEditor)
10697
this.activeLineController = new DecorationController("activeLine", this.activeDiffEditor)
10798
// Apply faded overlay to all lines initially.

src/shared/__tests__/experiments.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe("experiments", () => {
3030
marketplace: false,
3131
disableCompletionCommand: false,
3232
multiFileApplyDiff: false,
33-
disableDiffVisualization: false,
3433
}
3534
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
3635
})
@@ -41,7 +40,6 @@ describe("experiments", () => {
4140
marketplace: false,
4241
disableCompletionCommand: false,
4342
multiFileApplyDiff: false,
44-
disableDiffVisualization: false,
4543
}
4644
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(true)
4745
})
@@ -52,7 +50,6 @@ describe("experiments", () => {
5250
marketplace: false,
5351
disableCompletionCommand: false,
5452
multiFileApplyDiff: false,
55-
disableDiffVisualization: false,
5653
}
5754
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
5855
})
@@ -73,7 +70,6 @@ describe("experiments", () => {
7370
marketplace: false,
7471
disableCompletionCommand: false,
7572
multiFileApplyDiff: false,
76-
disableDiffVisualization: false,
7773
}
7874
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.MARKETPLACE)).toBe(false)
7975
})
@@ -84,7 +80,6 @@ describe("experiments", () => {
8480
marketplace: true,
8581
disableCompletionCommand: false,
8682
multiFileApplyDiff: false,
87-
disableDiffVisualization: false,
8883
}
8984
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.MARKETPLACE)).toBe(true)
9085
})

src/shared/experiments.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const EXPERIMENT_IDS = {
55
MULTI_FILE_APPLY_DIFF: "multiFileApplyDiff",
66
DISABLE_COMPLETION_COMMAND: "disableCompletionCommand",
77
POWER_STEERING: "powerSteering",
8-
DISABLE_DIFF_VISUALIZATION: "disableDiffVisualization",
98
} as const satisfies Record<string, ExperimentId>
109

1110
type _AssertExperimentIds = AssertEqual<Equals<ExperimentId, Values<typeof EXPERIMENT_IDS>>>
@@ -21,7 +20,6 @@ export const experimentConfigsMap: Record<ExperimentKey, ExperimentConfig> = {
2120
MULTI_FILE_APPLY_DIFF: { enabled: false },
2221
DISABLE_COMPLETION_COMMAND: { enabled: false },
2322
POWER_STEERING: { enabled: false },
24-
DISABLE_DIFF_VISUALIZATION: { enabled: false },
2523
}
2624

2725
export const experimentDefault = Object.fromEntries(

webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ describe("mergeExtensionState", () => {
225225
marketplace: false,
226226
disableCompletionCommand: false,
227227
multiFileApplyDiff: true,
228-
disableDiffVisualization: false,
229228
} as Record<ExperimentId, boolean>,
230229
}
231230

@@ -241,7 +240,6 @@ describe("mergeExtensionState", () => {
241240
marketplace: false,
242241
disableCompletionCommand: false,
243242
multiFileApplyDiff: true,
244-
disableDiffVisualization: false,
245243
})
246244
})
247245
})

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,6 @@
508508
"MULTI_FILE_APPLY_DIFF": {
509509
"name": "Habilita edicions de fitxers concurrents",
510510
"description": "Quan està activat, Roo pot editar múltiples fitxers en una sola petició. Quan està desactivat, Roo ha d'editar fitxers d'un en un. Desactivar això pot ajudar quan es treballa amb models menys capaços o quan vols més control sobre les modificacions de fitxers."
511-
},
512-
"DISABLE_DIFF_VISUALIZATION": {
513-
"name": "Desactivar la visualització de diferències per a totes les eines d'edició",
514-
"description": "Quan estigui activat, els fitxers s'obriran directament a l'editor en lloc de mostrar una vista de diferències per a totes les eines d'edició (write_to_file, apply_diff, insert_content, search_and_replace). Això ajuda a prevenir bloquejos de LSP amb fitxers molt grans. Els canvis encara són visibles a la finestra de xat."
515511
}
516512
},
517513
"promptCaching": {

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,6 @@
508508
"MULTI_FILE_APPLY_DIFF": {
509509
"name": "Gleichzeitige Dateibearbeitungen aktivieren",
510510
"description": "Wenn aktiviert, kann Roo mehrere Dateien in einer einzigen Anfrage bearbeiten. Wenn deaktiviert, muss Roo Dateien einzeln bearbeiten. Das Deaktivieren kann helfen, wenn du mit weniger fähigen Modellen arbeitest oder mehr Kontrolle über Dateiänderungen haben möchtest."
511-
},
512-
"DISABLE_DIFF_VISUALIZATION": {
513-
"name": "Diff-Visualisierung für alle Bearbeitungswerkzeuge deaktivieren",
514-
"description": "Wenn aktiviert, werden Dateien direkt im Editor geöffnet, anstatt eine Diff-Ansicht für alle Bearbeitungswerkzeuge (write_to_file, apply_diff, insert_content, search_and_replace) anzuzeigen. Dies hilft, LSP-Abstürze bei sehr großen Dateien zu vermeiden. Änderungen sind weiterhin im Chatfenster sichtbar."
515511
}
516512
},
517513
"promptCaching": {

0 commit comments

Comments
 (0)