From a3d4672d52951312fdbc5b57e1a2e1829932b043 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 17 Nov 2025 17:53:52 +0000 Subject: [PATCH 1/2] fix: replace broken badgen.net badges with shields.io and add missing Installs/Rating badges - Replace badgen.net badges in main README.md with working shields.io badges - Add missing Installs and Rating badges to all 17 localized README files - Ensures consistent badge display across all README files - Fixes rendering issues reported in GitHub issue --- README.md | 8 ++++---- locales/ca/README.md | 4 +++- locales/de/README.md | 4 +++- locales/es/README.md | 4 +++- locales/fr/README.md | 4 +++- locales/hi/README.md | 4 +++- locales/id/README.md | 4 +++- locales/it/README.md | 4 +++- locales/ja/README.md | 4 +++- locales/ko/README.md | 4 +++- locales/nl/README.md | 4 +++- locales/pl/README.md | 4 +++- locales/pt-BR/README.md | 4 +++- locales/ru/README.md | 4 +++- locales/tr/README.md | 4 +++- locales/vi/README.md | 4 +++- locales/zh-CN/README.md | 4 +++- locales/zh-TW/README.md | 4 +++- 18 files changed, 55 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 12741f6a1e5..362b37a1b10 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

- VS Code - Installs - Rating + VS Code + Installs + Rating X YouTube Join Discord @@ -37,7 +37,7 @@ - [简体中文](locales/zh-CN/README.md) - [繁體中文](locales/zh-TW/README.md) - ... - + --- diff --git a/locales/ca/README.md b/locales/ca/README.md index f5c33b0c676..cea3a4cdc79 100644 --- a/locales/ca/README.md +++ b/locales/ca/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/de/README.md b/locales/de/README.md index e0322da970e..f970e109c33 100644 --- a/locales/de/README.md +++ b/locales/de/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/es/README.md b/locales/es/README.md index 90e3af4b7d0..767a80c336b 100644 --- a/locales/es/README.md +++ b/locales/es/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/fr/README.md b/locales/fr/README.md index 5eb2b42a576..c4b29a89256 100644 --- a/locales/fr/README.md +++ b/locales/fr/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/hi/README.md b/locales/hi/README.md index a9b3153d776..06679328277 100644 --- a/locales/hi/README.md +++ b/locales/hi/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/id/README.md b/locales/id/README.md index feeff54c5ed..6927d5b1898 100644 --- a/locales/id/README.md +++ b/locales/id/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/it/README.md b/locales/it/README.md index a67dbd74f46..be90390fb72 100644 --- a/locales/it/README.md +++ b/locales/it/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ja/README.md b/locales/ja/README.md index f17bc615fe1..1cf5e9ee2ff 100644 --- a/locales/ja/README.md +++ b/locales/ja/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ko/README.md b/locales/ko/README.md index 9740a09567a..02e2474bbf5 100644 --- a/locales/ko/README.md +++ b/locales/ko/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/nl/README.md b/locales/nl/README.md index eb0c1701482..982dd7bc148 100644 --- a/locales/nl/README.md +++ b/locales/nl/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/pl/README.md b/locales/pl/README.md index dcc77205f11..fdfcce5ed0c 100644 --- a/locales/pl/README.md +++ b/locales/pl/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/pt-BR/README.md b/locales/pt-BR/README.md index f40ddabd246..0aacb3891ab 100644 --- a/locales/pt-BR/README.md +++ b/locales/pt-BR/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ru/README.md b/locales/ru/README.md index 1a596bc7b5f..d265209fd34 100644 --- a/locales/ru/README.md +++ b/locales/ru/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/tr/README.md b/locales/tr/README.md index d480560e08e..5ff465d72f6 100644 --- a/locales/tr/README.md +++ b/locales/tr/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/vi/README.md b/locales/vi/README.md index f9eef31447e..806198a6052 100644 --- a/locales/vi/README.md +++ b/locales/vi/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/zh-CN/README.md b/locales/zh-CN/README.md index de95ee3a82e..d0026513263 100644 --- a/locales/zh-CN/README.md +++ b/locales/zh-CN/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/zh-TW/README.md b/locales/zh-TW/README.md index dfa65152a13..3e60505b364 100644 --- a/locales/zh-TW/README.md +++ b/locales/zh-TW/README.md @@ -1,5 +1,7 @@

VS Code + Installs + Rating X YouTube Join Discord @@ -35,7 +37,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- From ecd2c36f2669ee4d309ea5eb0da762ae9389ed69 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 17 Nov 2025 18:48:44 +0000 Subject: [PATCH 2/2] fix: replace dynamic shields.io badges with static badge to avoid rate limiting --- README.md | 6 +- locales/ca/README.md | 6 +- locales/de/README.md | 6 +- locales/es/README.md | 6 +- locales/fr/README.md | 6 +- locales/hi/README.md | 6 +- locales/id/README.md | 6 +- locales/it/README.md | 6 +- locales/ja/README.md | 6 +- locales/ko/README.md | 6 +- locales/nl/README.md | 6 +- locales/pl/README.md | 6 +- locales/pt-BR/README.md | 6 +- locales/ru/README.md | 6 +- locales/tr/README.md | 6 +- locales/vi/README.md | 6 +- locales/zh-CN/README.md | 6 +- locales/zh-TW/README.md | 6 +- src/api/providers/featherless.ts | 7 +- .../__tests__/ShadowCheckpointService.spec.ts | 166 +++++++++--------- src/services/mcp/McpHub.ts | 4 +- src/services/tree-sitter/queries/c-sharp.ts | 2 - webview-ui/src/components/chat/TaskHeader.tsx | 2 +- 23 files changed, 128 insertions(+), 161 deletions(-) diff --git a/README.md b/README.md index 362b37a1b10..9e98cd88456 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](locales/zh-CN/README.md) - [繁體中文](locales/zh-TW/README.md) - ... - + --- diff --git a/locales/ca/README.md b/locales/ca/README.md index cea3a4cdc79..b8feb8a99a7 100644 --- a/locales/ca/README.md +++ b/locales/ca/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/de/README.md b/locales/de/README.md index f970e109c33..d63dfdf9554 100644 --- a/locales/de/README.md +++ b/locales/de/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/es/README.md b/locales/es/README.md index 767a80c336b..af7666d106a 100644 --- a/locales/es/README.md +++ b/locales/es/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/fr/README.md b/locales/fr/README.md index c4b29a89256..b92535f9e7c 100644 --- a/locales/fr/README.md +++ b/locales/fr/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/hi/README.md b/locales/hi/README.md index 06679328277..4499feac72f 100644 --- a/locales/hi/README.md +++ b/locales/hi/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/id/README.md b/locales/id/README.md index 6927d5b1898..9c46a5ca2ee 100644 --- a/locales/id/README.md +++ b/locales/id/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/it/README.md b/locales/it/README.md index be90390fb72..71bbda7c81f 100644 --- a/locales/it/README.md +++ b/locales/it/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ja/README.md b/locales/ja/README.md index 1cf5e9ee2ff..1bf753546aa 100644 --- a/locales/ja/README.md +++ b/locales/ja/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ko/README.md b/locales/ko/README.md index 02e2474bbf5..8b8f45ebb55 100644 --- a/locales/ko/README.md +++ b/locales/ko/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/nl/README.md b/locales/nl/README.md index 982dd7bc148..983318aa81b 100644 --- a/locales/nl/README.md +++ b/locales/nl/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/pl/README.md b/locales/pl/README.md index fdfcce5ed0c..94e23b2980c 100644 --- a/locales/pl/README.md +++ b/locales/pl/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/pt-BR/README.md b/locales/pt-BR/README.md index 0aacb3891ab..abca12ffb73 100644 --- a/locales/pt-BR/README.md +++ b/locales/pt-BR/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/ru/README.md b/locales/ru/README.md index d265209fd34..d2689da5cf4 100644 --- a/locales/ru/README.md +++ b/locales/ru/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/tr/README.md b/locales/tr/README.md index 5ff465d72f6..c095677851a 100644 --- a/locales/tr/README.md +++ b/locales/tr/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/vi/README.md b/locales/vi/README.md index 806198a6052..5b8100eb2bd 100644 --- a/locales/vi/README.md +++ b/locales/vi/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/zh-CN/README.md b/locales/zh-CN/README.md index d0026513263..162e787a2b3 100644 --- a/locales/zh-CN/README.md +++ b/locales/zh-CN/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/locales/zh-TW/README.md b/locales/zh-TW/README.md index 3e60505b364..05d46aca68d 100644 --- a/locales/zh-TW/README.md +++ b/locales/zh-TW/README.md @@ -1,7 +1,5 @@

- VS Code - Installs - Rating + VS Code Marketplace X YouTube Join Discord @@ -37,7 +35,7 @@ - [简体中文](../zh-CN/README.md) - [繁體中文](../zh-TW/README.md) - ... - + --- diff --git a/src/api/providers/featherless.ts b/src/api/providers/featherless.ts index 56d7177de7c..2a985e2a87d 100644 --- a/src/api/providers/featherless.ts +++ b/src/api/providers/featherless.ts @@ -1,4 +1,9 @@ -import { DEEP_SEEK_DEFAULT_TEMPERATURE, type FeatherlessModelId, featherlessDefaultModelId, featherlessModels } from "@roo-code/types" +import { + DEEP_SEEK_DEFAULT_TEMPERATURE, + type FeatherlessModelId, + featherlessDefaultModelId, + featherlessModels, +} from "@roo-code/types" import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" diff --git a/src/services/checkpoints/__tests__/ShadowCheckpointService.spec.ts b/src/services/checkpoints/__tests__/ShadowCheckpointService.spec.ts index 3ed98d06253..5172a373694 100644 --- a/src/services/checkpoints/__tests__/ShadowCheckpointService.spec.ts +++ b/src/services/checkpoints/__tests__/ShadowCheckpointService.spec.ts @@ -825,93 +825,93 @@ describe.each([[RepoPerTaskCheckpointService, "RepoPerTaskCheckpointService"]])( }) it("isolates checkpoint operations from GIT_DIR environment variable", async () => { - // This test verifies the fix for the issue where GIT_DIR environment variable - // causes checkpoint commits to go to the wrong repository. - // In the real-world Dev Container scenario, GIT_DIR is set BEFORE Roo starts, - // so we need to set it BEFORE creating the checkpoint service. - - // Create a separate git directory to simulate GIT_DIR pointing elsewhere - const externalGitDir = path.join(tmpDir, `external-git-${Date.now()}`) - await fs.mkdir(externalGitDir, { recursive: true }) - const externalGit = simpleGit(externalGitDir) - await externalGit.init() - await externalGit.addConfig("user.name", "External User") - await externalGit.addConfig("user.email", "external@example.com") - - // Create and commit a file in the external repo - const externalFile = path.join(externalGitDir, "external.txt") - await fs.writeFile(externalFile, "External content") - await externalGit.add(".") - await externalGit.commit("External commit") - - // Store the original commit count in the external repo - const externalLogBefore = await externalGit.log() - const externalCommitCountBefore = externalLogBefore.total - - // Initialize the workspace repo BEFORE setting GIT_DIR - // (In Dev Containers, the workspace repo already exists before GIT_DIR is set) - const testShadowDir = path.join(tmpDir, `shadow-git-dir-test-${Date.now()}`) - const testWorkspaceDir = path.join(tmpDir, `workspace-git-dir-test-${Date.now()}`) - const testRepo = await initWorkspaceRepo({ workspaceDir: testWorkspaceDir }) - - // Set GIT_DIR to point to the external repository BEFORE creating the service - // This simulates the Dev Container environment where GIT_DIR is already set - const originalGitDir = process.env.GIT_DIR - const externalDotGit = path.join(externalGitDir, ".git") - process.env.GIT_DIR = externalDotGit - - try { - // Create a new checkpoint service with GIT_DIR already set - // This is the key difference - we're creating the service - // while GIT_DIR is set, just like in a real Dev Container - const testService = await klass.create({ - taskId: `test-git-dir-${Date.now()}`, - shadowDir: testShadowDir, - workspaceDir: testWorkspaceDir, - log: () => {}, - }) - await testService.initShadowGit() - - // Make a change in the workspace and save a checkpoint - const testWorkspaceFile = path.join(testWorkspaceDir, "test.txt") - await fs.writeFile(testWorkspaceFile, "Modified with GIT_DIR set") - const commit = await testService.saveCheckpoint("Checkpoint with GIT_DIR set") - expect(commit?.commit).toBeTruthy() - - // Verify the checkpoint was saved in the shadow repo, not the external repo - // Temporarily clear GIT_DIR to check the external repo - delete process.env.GIT_DIR - const externalGitCheck = simpleGit(externalGitDir) - const externalLogAfter = await externalGitCheck.log() - const externalCommitCountAfter = externalLogAfter.total - // Restore GIT_DIR + // This test verifies the fix for the issue where GIT_DIR environment variable + // causes checkpoint commits to go to the wrong repository. + // In the real-world Dev Container scenario, GIT_DIR is set BEFORE Roo starts, + // so we need to set it BEFORE creating the checkpoint service. + + // Create a separate git directory to simulate GIT_DIR pointing elsewhere + const externalGitDir = path.join(tmpDir, `external-git-${Date.now()}`) + await fs.mkdir(externalGitDir, { recursive: true }) + const externalGit = simpleGit(externalGitDir) + await externalGit.init() + await externalGit.addConfig("user.name", "External User") + await externalGit.addConfig("user.email", "external@example.com") + + // Create and commit a file in the external repo + const externalFile = path.join(externalGitDir, "external.txt") + await fs.writeFile(externalFile, "External content") + await externalGit.add(".") + await externalGit.commit("External commit") + + // Store the original commit count in the external repo + const externalLogBefore = await externalGit.log() + const externalCommitCountBefore = externalLogBefore.total + + // Initialize the workspace repo BEFORE setting GIT_DIR + // (In Dev Containers, the workspace repo already exists before GIT_DIR is set) + const testShadowDir = path.join(tmpDir, `shadow-git-dir-test-${Date.now()}`) + const testWorkspaceDir = path.join(tmpDir, `workspace-git-dir-test-${Date.now()}`) + const testRepo = await initWorkspaceRepo({ workspaceDir: testWorkspaceDir }) + + // Set GIT_DIR to point to the external repository BEFORE creating the service + // This simulates the Dev Container environment where GIT_DIR is already set + const originalGitDir = process.env.GIT_DIR + const externalDotGit = path.join(externalGitDir, ".git") process.env.GIT_DIR = externalDotGit - // External repo should have the same number of commits (no new commits) - expect(externalCommitCountAfter).toBe(externalCommitCountBefore) - - // Verify the checkpoint is accessible in the shadow repo - const diff = await testService.getDiff({ to: commit!.commit }) - expect(diff).toHaveLength(1) - expect(diff[0].paths.relative).toBe("test.txt") - expect(diff[0].content.after).toBe("Modified with GIT_DIR set") - - // Verify we can restore the checkpoint - await fs.writeFile(testWorkspaceFile, "Another modification") - await testService.restoreCheckpoint(commit!.commit) - expect(await fs.readFile(testWorkspaceFile, "utf-8")).toBe("Modified with GIT_DIR set") - } finally { - // Restore original GIT_DIR - if (originalGitDir !== undefined) { - process.env.GIT_DIR = originalGitDir - } else { + try { + // Create a new checkpoint service with GIT_DIR already set + // This is the key difference - we're creating the service + // while GIT_DIR is set, just like in a real Dev Container + const testService = await klass.create({ + taskId: `test-git-dir-${Date.now()}`, + shadowDir: testShadowDir, + workspaceDir: testWorkspaceDir, + log: () => {}, + }) + await testService.initShadowGit() + + // Make a change in the workspace and save a checkpoint + const testWorkspaceFile = path.join(testWorkspaceDir, "test.txt") + await fs.writeFile(testWorkspaceFile, "Modified with GIT_DIR set") + const commit = await testService.saveCheckpoint("Checkpoint with GIT_DIR set") + expect(commit?.commit).toBeTruthy() + + // Verify the checkpoint was saved in the shadow repo, not the external repo + // Temporarily clear GIT_DIR to check the external repo delete process.env.GIT_DIR - } + const externalGitCheck = simpleGit(externalGitDir) + const externalLogAfter = await externalGitCheck.log() + const externalCommitCountAfter = externalLogAfter.total + // Restore GIT_DIR + process.env.GIT_DIR = externalDotGit + + // External repo should have the same number of commits (no new commits) + expect(externalCommitCountAfter).toBe(externalCommitCountBefore) + + // Verify the checkpoint is accessible in the shadow repo + const diff = await testService.getDiff({ to: commit!.commit }) + expect(diff).toHaveLength(1) + expect(diff[0].paths.relative).toBe("test.txt") + expect(diff[0].content.after).toBe("Modified with GIT_DIR set") + + // Verify we can restore the checkpoint + await fs.writeFile(testWorkspaceFile, "Another modification") + await testService.restoreCheckpoint(commit!.commit) + expect(await fs.readFile(testWorkspaceFile, "utf-8")).toBe("Modified with GIT_DIR set") + } finally { + // Restore original GIT_DIR + if (originalGitDir !== undefined) { + process.env.GIT_DIR = originalGitDir + } else { + delete process.env.GIT_DIR + } - // Clean up external git directory - await fs.rm(externalGitDir, { recursive: true, force: true }) - } - }) + // Clean up external git directory + await fs.rm(externalGitDir, { recursive: true, force: true }) + } + }) }) }, ) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index f5ddf3e57b8..2db26332fae 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -1378,8 +1378,8 @@ export class McpHub { await this.deleteConnection(serverName, serverSource) // Re-add as a disabled connection // Re-read config from file to get updated disabled state - const updatedConfig = await this.readServerConfigFromFile(serverName, serverSource) - await this.connectToServer(serverName, updatedConfig, serverSource) + const updatedConfig = await this.readServerConfigFromFile(serverName, serverSource) + await this.connectToServer(serverName, updatedConfig, serverSource) } else if (!disabled && connection.server.status === "disconnected") { // If enabling a disabled server, connect it // Re-read config from file to get updated disabled state diff --git a/src/services/tree-sitter/queries/c-sharp.ts b/src/services/tree-sitter/queries/c-sharp.ts index 350c24fff6e..46f9651b369 100644 --- a/src/services/tree-sitter/queries/c-sharp.ts +++ b/src/services/tree-sitter/queries/c-sharp.ts @@ -63,5 +63,3 @@ export default ` ; LINQ expressions (query_expression) @definition.linq_expression ` - - \ No newline at end of file diff --git a/webview-ui/src/components/chat/TaskHeader.tsx b/webview-ui/src/components/chat/TaskHeader.tsx index 242db5bb911..b06d6e64f5f 100644 --- a/webview-ui/src/components/chat/TaskHeader.tsx +++ b/webview-ui/src/components/chat/TaskHeader.tsx @@ -265,7 +265,7 @@ const TaskHeader = ({ {t("chat:task.contextWindow")} -

+