Skip to content

Commit a851c9e

Browse files
hannesrudolphdaniel-lxs
authored andcommitted
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 503b30d commit a851c9e

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
@@ -207,7 +206,6 @@ export class Task extends EventEmitter<ClineEvents> {
207206
provider,
208207
apiConfiguration,
209208
enableDiff = false,
210-
disableDiffVisualization = false,
211209
enableCheckpoints = true,
212210
fuzzyMatchThreshold = 1.0,
213211
consecutiveMistakeLimit = 3,
@@ -252,7 +250,7 @@ export class Task extends EventEmitter<ClineEvents> {
252250
this.consecutiveMistakeLimit = consecutiveMistakeLimit
253251
this.providerRef = new WeakRef(provider)
254252
this.globalStoragePath = provider.context.globalStorageUri.fsPath
255-
this.diffViewProvider = new DiffViewProvider(this.cwd, disableDiffVisualization)
253+
this.diffViewProvider = new DiffViewProvider(this.cwd)
256254
this.enableCheckpoints = enableCheckpoints
257255

258256
this.rootTask = rootTask

src/core/webview/ClineProvider.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ export class ClineProvider
535535
experiments,
536536
} = await this.getState()
537537

538-
const disableDiffVisualization = experiments.disableDiffVisualization ?? false
539-
540538
if (!ProfileValidator.isProfileAllowed(apiConfiguration, organizationAllowList)) {
541539
throw new OrganizationAllowListViolationError(t("common:errors.violated_organization_allowlist"))
542540
}
@@ -545,7 +543,6 @@ export class ClineProvider
545543
provider: this,
546544
apiConfiguration,
547545
enableDiff,
548-
disableDiffVisualization,
549546
enableCheckpoints,
550547
fuzzyMatchThreshold,
551548
task,
@@ -578,13 +575,10 @@ export class ClineProvider
578575
experiments,
579576
} = await this.getState()
580577

581-
const disableDiffVisualization = experiments.disableDiffVisualization ?? false
582-
583578
const cline = new Task({
584579
provider: this,
585580
apiConfiguration,
586581
enableDiff,
587-
disableDiffVisualization,
588582
enableCheckpoints,
589583
fuzzyMatchThreshold,
590584
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
disableCompletionCommand: false,
3131
marketplace: 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
disableCompletionCommand: false,
4241
marketplace: 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
disableCompletionCommand: false,
5351
marketplace: 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
DISABLE_COMPLETION_COMMAND: "disableCompletionCommand",
66
POWER_STEERING: "powerSteering",
77
MARKETPLACE: "marketplace",
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
DISABLE_COMPLETION_COMMAND: { enabled: false },
2221
POWER_STEERING: { enabled: false },
2322
MARKETPLACE: { enabled: false },
24-
DISABLE_DIFF_VISUALIZATION: { enabled: false },
2523
}
2624

2725
export const experimentDefault = Object.fromEntries(

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ describe("mergeExtensionState", () => {
223223
marketplace: false,
224224
disableCompletionCommand: false,
225225
multiFileApplyDiff: true,
226-
disableDiffVisualization: false,
227226
} as Record<ExperimentId, boolean>,
228227
}
229228

@@ -239,7 +238,6 @@ describe("mergeExtensionState", () => {
239238
marketplace: false,
240239
disableCompletionCommand: false,
241240
multiFileApplyDiff: true,
242-
disableDiffVisualization: false,
243241
})
244242
})
245243
})

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)