mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-12 04:53:44 +08:00
Add StreamableHttp support
This commit is contained in:
@@ -116,10 +116,15 @@ export interface ServerStatusResponse {
|
||||
|
||||
export const isServerSseConfig = (c?: ServerConfig): c is ServerSseConfig =>
|
||||
c !== null && typeof c === "object" && c.type === "sse";
|
||||
export const isStreamableSseConfig = (c?: ServerConfig): c is ServerSseConfig =>
|
||||
c !== null && typeof c === "object" && c.type === "streamable";
|
||||
export const isServerStdioConfig = (c?: ServerConfig): c is ServerStdioConfig =>
|
||||
c !== null && typeof c === "object" && (!c.type || c.type === "stdio");
|
||||
|
||||
export type ServerConfig = ServerStdioConfig | ServerSseConfig;
|
||||
export type ServerConfig =
|
||||
| ServerStdioConfig
|
||||
| ServerSseConfig
|
||||
| ServerSteamableConfig;
|
||||
|
||||
export interface ServerStdioConfig {
|
||||
type?: "stdio";
|
||||
@@ -136,6 +141,13 @@ export interface ServerSseConfig {
|
||||
status?: "active" | "paused" | "error";
|
||||
}
|
||||
|
||||
export interface ServerSteamableConfig {
|
||||
type: "streamable";
|
||||
url: string;
|
||||
headers?: Record<string, string>;
|
||||
status?: "active" | "paused" | "error";
|
||||
}
|
||||
|
||||
export interface McpConfigData {
|
||||
enableMcp?: boolean;
|
||||
// MCP Server 的配置
|
||||
|
Reference in New Issue
Block a user