feat(mcp): add ZCode configuration guidance

Closes #6763
This commit is contained in:
t8y2 committed 2026-08-22 11:14:06 +00:00
1 parent 906ea8ba26
commit 2fee435b33
11 files changed
+49 -2

No files matched your search

@@ -14,6 +14,18 @@ describe("MCP config templates", () => {
});
});
it("preserves the standard mcpServers launch config for ZCode full configuration", () => {
const launch = {
command: "node",
args: ["C:\\dbx\\mcp\\dist\\index.js"],
env: { DBX_DATA_DIR: "D:\\DBX Data" },
};
const config = JSON.parse(buildMcpJsonConfig(launch));
expect(config).toEqual({ mcpServers: { dbx: launch } });
expect(config).not.toHaveProperty("mcp");
});
it("builds the standard mcpServers JSON used by the Pi agent", () => {
expect(JSON.parse(buildMcpPiConfig())).toEqual({
mcpServers: {
@@ -123,9 +123,10 @@ 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(11);
expect(tabsSource.match(/flex-none shrink-0/g)).toHaveLength(12);
expect(tabsSource).toContain('<TabsTrigger value="deepseek-harness"');
expect(tabsSource).toContain('<TabsTrigger value="codebuddy"');
expect(tabsSource).toContain('<TabsTrigger value="zcode"');
expect(tabsSource).not.toContain("min-w-0 px-");
const codeBuddyStart = settingsDialogSource.indexOf('<TabsContent value="codebuddy"', tabsEnd);
@@ -137,6 +138,16 @@ describe("MCP policy settings state", () => {
expect(codeBuddySource).toContain("settings.mcpCodeBuddyConfigPath");
expect(codeBuddySource).toContain("mcpJsonRecommendedConfig");
expect(codeBuddySource).toContain("copyMcpText('codebuddy-config', mcpJsonRecommendedConfig)");
const zCodeStart = settingsDialogSource.indexOf('<TabsContent value="zcode"', tabsEnd);
const zCodeEnd = settingsDialogSource.indexOf("</TabsContent>", zCodeStart);
const zCodeSource = settingsDialogSource.slice(zCodeStart, zCodeEnd);
expect(zCodeStart).toBeGreaterThan(tabsEnd);
expect(zCodeEnd).toBeGreaterThan(zCodeStart);
expect(zCodeSource).toContain("settings.mcpZCodeConfigPath");
expect(zCodeSource).toContain("mcpJsonRecommendedConfig");
expect(zCodeSource).toContain("copyMcpText('zcode-config', mcpJsonRecommendedConfig)");
});
});