Skip to content

Commit cd944cb

Browse files
committed
roll back loadYaml.ts to main
1 parent a5db30d commit cd944cb

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

core/config/yaml/loadYaml.ts

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function convertYamlMcpToContinueMcp(
6767
return {
6868
transport: {
6969
type: "stdio",
70-
command: server.command || "", // Add default empty string to handle undefined
70+
command: server.command,
7171
args: server.args ?? [],
7272
env: server.env,
7373
} as any, // TODO: Fix the mcpServers types in config-yaml (discriminated union)
@@ -424,28 +424,16 @@ async function configYamlToContinueConfig(options: {
424424
// Trigger MCP server refreshes (Config is reloaded again once connected!)
425425
const mcpManager = MCPManagerSingleton.getInstance();
426426
mcpManager.setConnections(
427-
(config.mcpServers ?? []).map((server) => {
428-
// Create proper transport object based on type
429-
const transport = server.type === "sse"
430-
? {
431-
type: "sse" as const,
432-
url: server.url || "",
433-
faviconUrl: server.faviconUrl
434-
}
435-
: {
436-
type: "stdio" as const,
437-
command: server.command || "",
438-
args: server.args || [],
439-
env: server.env,
440-
faviconUrl: server.faviconUrl
441-
};
442-
return {
443-
id: server.name,
444-
name: server.name,
445-
transport,
446-
timeout: server.connectionTimeout
447-
};
448-
}),
427+
(config.mcpServers ?? []).map((server) => ({
428+
id: server.name,
429+
name: server.name,
430+
transport: {
431+
type: "stdio",
432+
args: [],
433+
...(server as any), // TODO: fix the types on mcpServers in config-yaml
434+
},
435+
timeout: server.connectionTimeout,
436+
})),
449437
false,
450438
);
451439

@@ -491,8 +479,8 @@ export async function loadContinueConfigFromYaml(options: {
491479
errors: configYamlResult.errors,
492480
config: undefined,
493481
configLoadInterrupted: true,
494-
};
495-
}
482+
};
483+
}
496484

497485
const { config: continueConfig, errors: localErrors } =
498486
await configYamlToContinueConfig({

0 commit comments

Comments
 (0)