introduce custom mcp server timeout
This commit is contained in:
parent
cdde37d3b7
commit
ef0e7a490f
4 changed files with 5 additions and 1 deletions
|
|
@ -72,6 +72,7 @@ function convertYamlMcpToContinueMcp(
|
|||
args: server.args ?? [],
|
||||
env: server.env,
|
||||
},
|
||||
timeout: server.timeout
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -444,6 +445,7 @@ async function configYamlToContinueConfig(options: {
|
|||
args: [],
|
||||
...server,
|
||||
},
|
||||
timeout: server.timeout
|
||||
})),
|
||||
false,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import {
|
|||
MCPTool,
|
||||
} from "../..";
|
||||
|
||||
export const DEFAULT_MCP_TIMEOUT = 20_000; // 10 seconds
|
||||
const DEFAULT_MCP_TIMEOUT = 20_000; // 20 seconds
|
||||
|
||||
class MCPConnection {
|
||||
public client: Client;
|
||||
|
|
|
|||
1
core/index.d.ts
vendored
1
core/index.d.ts
vendored
|
|
@ -1211,6 +1211,7 @@ export interface ExperimentalModelRoles {
|
|||
export interface ExperimentalMCPOptions {
|
||||
transport: TransportOptions;
|
||||
faviconUrl?: string;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export type EditStatus =
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const mcpServerSchema = z.object({
|
|||
faviconUrl: z.string().optional(),
|
||||
args: z.array(z.string()).optional(),
|
||||
env: z.record(z.string()).optional(),
|
||||
timeout: z.number().gt(0).optional()
|
||||
});
|
||||
|
||||
export type MCPServer = z.infer<typeof mcpServerSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue