Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
run: bun install --frozen-lockfile
- name: Check tool count drift
run: bun run scripts/check-tool-count.ts
- name: Test
run: bun test
- name: Build
run: bun run build
- name: Lint
Expand Down
2 changes: 1 addition & 1 deletion src/tool-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function cliExists(name: string): boolean {
return false;
}

const VSCODE_VARIANTS = ["Code", "Code - Insiders", "Cursor", "VSCodium", "Windsurf"];
const VSCODE_VARIANTS = ["Code", "Code - Insiders", "Cursor", "Cursor Nightly", "VSCodium", "Windsurf", "Windsurf Next", "Trae", "Void", "Positron"];

function vscodeExtensionStorageExists(extensionId: string): boolean {
let bases: string[];
Expand Down
59 changes: 59 additions & 0 deletions tests/tool-configs.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { beforeAll, describe, expect, mock, test } from "bun:test";

let activeVariant = "";
let activeExtensionId = "";

mock.module("os", () => ({
homedir: () => "/home/agentfiles-test",
platform: () => "linux",
}));

mock.module("fs", () => ({
existsSync: (path: unknown) => {
const normalized = String(path).replaceAll("\\", "/");
return normalized.endsWith(
`/${activeVariant}/User/globalStorage/${activeExtensionId}`,
);
},
readdirSync: () => [],
}));

let toolConfigs: typeof import("../src/tool-configs");

beforeAll(async () => {
toolConfigs = await import("../src/tool-configs");
});

const VSCODE_VARIANTS = [
"Code",
"Code - Insiders",
"Cursor",
"Cursor Nightly",
"VSCodium",
"Windsurf",
"Windsurf Next",
"Trae",
"Void",
"Positron",
] as const;

const VSCODE_EXTENSION_TOOLS = [
{ id: "cline", extensionId: "saoudrizwan.claude-dev" },
{ id: "roo-code", extensionId: "RooVeterinaryInc.roo-cline" },
] as const;

describe("VS Code fork extension storage detection", () => {
for (const variant of VSCODE_VARIANTS) {
test(`detects extension-backed tools in ${variant}`, () => {
for (const tool of VSCODE_EXTENSION_TOOLS) {
activeVariant = variant;
activeExtensionId = tool.extensionId;
toolConfigs.clearInstallCache();

const config = toolConfigs.TOOL_CONFIGS.find(({ id }) => id === tool.id);
expect(config).toBeDefined();
expect(config?.isInstalled()).toBe(true);
}
});
}
});