feat(mcp): add Qoder configuration
This commit is contained in:
1 parent
644812fa07
commit
7e06992f3b
13 files changed
+63
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildMcpCherryStudioConfig, buildMcpCodexConfig, buildMcpDeepSeekHarnessConfig, buildMcpJsonConfig, buildMcpOpenCodeConfig, buildMcpPiConfig, buildMcpTraeConfig, buildMcpVsCodeConfig, mcpWebBackendUrl } from "@/lib/mcp/mcpConfigTemplates";
|
||||
import { buildMcpCherryStudioConfig, buildMcpCodexConfig, buildMcpDeepSeekHarnessConfig, buildMcpJsonConfig, buildMcpOpenCodeConfig, buildMcpPiConfig, buildMcpQoderConfig, buildMcpTraeConfig, buildMcpVsCodeConfig, mcpWebBackendUrl } from "@/lib/mcp/mcpConfigTemplates";
|
||||
|
||||
describe("MCP config templates", () => {
|
||||
it("builds the standard mcpServers JSON used by Claude, Cursor, TRAE, and Windsurf", () => {
|
||||
@@ -66,6 +66,19 @@ describe("MCP config templates", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("builds the Qoder config with the same launch shape as TRAE", () => {
|
||||
const launch = {
|
||||
command: "C:\\Program Files\\nodejs\\node.exe",
|
||||
args: ["C:\\dbx\\mcp\\dist\\index.js"],
|
||||
env: { DBX_DATA_DIR: "D:\\DBX Data" },
|
||||
};
|
||||
const nativeBinPath = "C:\\Users\\supervisor\\AppData\\Roaming\\npm\\node_modules\\@dbx-app\\mcp-win32-x64\\bin\\dbx-mcp.exe";
|
||||
|
||||
expect(JSON.parse(buildMcpQoderConfig(launch, nativeBinPath))).toEqual({
|
||||
mcpServers: { dbx: { command: nativeBinPath, env: launch.env } },
|
||||
});
|
||||
});
|
||||
|
||||
it("includes Web runtime settings without restoring permission environment variables", () => {
|
||||
const launch = {
|
||||
command: "dbx-mcp-server",
|
||||
|
||||
@@ -123,10 +123,11 @@ describe("MCP policy settings state", () => {
|
||||
expect(tabsSource).toContain("overscroll-x-contain");
|
||||
expect(tabsSource).not.toContain("flex-wrap");
|
||||
expect(tabsSource).not.toContain("grid-cols-");
|
||||
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(12);
|
||||
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(13);
|
||||
expect(tabsSource).toContain('<TabsTrigger value="deepseek-harness"');
|
||||
expect(tabsSource).toContain('<TabsTrigger value="codebuddy"');
|
||||
expect(tabsSource).toContain('<TabsTrigger value="zcode"');
|
||||
expect(tabsSource).toContain('<TabsTrigger value="qoder"');
|
||||
expect(tabsSource).not.toContain("min-w-0 px-");
|
||||
|
||||
const codeBuddyStart = settingsDialogSource.indexOf('<TabsContent value="codebuddy"', tabsEnd);
|
||||
@@ -148,6 +149,16 @@ describe("MCP policy settings state", () => {
|
||||
expect(zCodeSource).toContain("settings.mcpZCodeConfigPath");
|
||||
expect(zCodeSource).toContain("mcpJsonRecommendedConfig");
|
||||
expect(zCodeSource).toContain("copyMcpText('zcode-config', mcpJsonRecommendedConfig)");
|
||||
|
||||
const qoderStart = settingsDialogSource.indexOf('<TabsContent value="qoder"', tabsEnd);
|
||||
const qoderEnd = settingsDialogSource.indexOf("</TabsContent>", qoderStart);
|
||||
const qoderSource = settingsDialogSource.slice(qoderStart, qoderEnd);
|
||||
|
||||
expect(qoderStart).toBeGreaterThan(tabsEnd);
|
||||
expect(qoderEnd).toBeGreaterThan(qoderStart);
|
||||
expect(qoderSource).toContain("settings.mcpQoderConfigPath");
|
||||
expect(qoderSource).toContain("mcpQoderRecommendedConfig");
|
||||
expect(qoderSource).toContain("copyMcpText('qoder-config', mcpQoderRecommendedConfig)");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user