Merge pull request #5811 from continuedev/nate/sse

Nate/sse
This commit is contained in:
Nate Sesti 2025-05-22 22:45:25 -07:00 • committed by GitHub
commit af06ec3d6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 6 deletions

View file

@ -71,7 +71,7 @@ function convertYamlMcpToContinueMcp(
command: server.command,
args: server.args ?? [],
env: server.env,
},
} as any, // TODO: Fix the mcpServers types in config-yaml (discriminated union)
timeout: server.connectionTimeout,
};
}
@ -458,7 +458,7 @@ async function configYamlToContinueConfig(options: {
transport: {
type: "stdio",
args: [],
...server,
...(server as any), // TODO: fix the types on mcpServers in config-yaml
},
timeout: server.connectionTimeout,
})),

View file

@ -1,12 +1,12 @@
{
"name": "continue",
"version": "1.1.38",
"version": "1.1.39",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
"version": "1.1.38",
"version": "1.1.39",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",

View file

@ -9,13 +9,16 @@ export const contextSchema = z.object({
params: z.any().optional(),
});
// TODO: This should be a discriminated union by type
const mcpServerSchema = z.object({
name: z.string(),
command: z.string(),
command: z.string().optional(),
type: z.enum(["sse", "stdio"]).optional(),
url: z.string().optional(),
faviconUrl: z.string().optional(),
args: z.array(z.string()).optional(),
env: z.record(z.string()).optional(),
connectionTimeout: z.number().gt(0).optional()
connectionTimeout: z.number().gt(0).optional(),
});
export type MCPServer = z.infer<typeof mcpServerSchema>;