diff --git a/.changeset/ninety-stingrays-give.md b/.changeset/ninety-stingrays-give.md new file mode 100644 index 0000000..b1ce60d --- /dev/null +++ b/.changeset/ninety-stingrays-give.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Default diff editing to on for new installs diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 2245d80..6789d9a 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -972,7 +972,7 @@ export class ClineProvider implements vscode.WebviewViewProvider { .filter((item) => item.ts && item.task) .sort((a, b) => b.ts - a.ts), soundEnabled: soundEnabled ?? false, - diffEnabled: diffEnabled ?? false, + diffEnabled: diffEnabled ?? true, shouldShowAnnouncement: lastShownAnnouncementId !== this.latestAnnouncementId, allowedCommands, soundVolume: soundVolume ?? 0.5, @@ -1166,7 +1166,7 @@ export class ClineProvider implements vscode.WebviewViewProvider { taskHistory, allowedCommands, soundEnabled: soundEnabled ?? false, - diffEnabled: diffEnabled ?? false, + diffEnabled: diffEnabled ?? true, soundVolume, browserLargeViewport: browserLargeViewport ?? false, fuzzyMatchThreshold: fuzzyMatchThreshold ?? 1.0, diff --git a/src/core/webview/__tests__/ClineProvider.test.ts b/src/core/webview/__tests__/ClineProvider.test.ts index b8d7105..b2ab983 100644 --- a/src/core/webview/__tests__/ClineProvider.test.ts +++ b/src/core/webview/__tests__/ClineProvider.test.ts @@ -300,6 +300,15 @@ describe('ClineProvider', () => { expect(state).toHaveProperty('diffEnabled') }) + test('diffEnabled defaults to true when not set', async () => { + // Mock globalState.get to return undefined for diffEnabled + (mockContext.globalState.get as jest.Mock).mockReturnValue(undefined) + + const state = await provider.getState() + + expect(state.diffEnabled).toBe(true) + }) + test('updates sound utility when sound setting changes', async () => { provider.resolveWebviewView(mockWebviewView)