update , add mcp server stdio and sse

This commit is contained in:
duanfuxiang
2025-06-02 20:38:40 +08:00
parent 8ca5216b71
commit b1315aa6b1
30 changed files with 2639 additions and 955 deletions

View File

@@ -90,4 +90,11 @@ export type SwitchModeToolArgs = {
finish?: boolean;
}
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs;
export type UseMcpToolArgs = {
type: 'use_mcp_tool';
server_name: string;
tool_name: string;
parameters: Record<string, unknown>;
}
export type ToolArgs = ReadFileToolArgs | WriteToFileToolArgs | InsertContentToolArgs | SearchAndReplaceToolArgs | ListFilesToolArgs | RegexSearchFilesToolArgs | SemanticSearchFilesToolArgs | SearchWebToolArgs | FetchUrlsContentToolArgs | SwitchModeToolArgs | ApplyDiffToolArgs | UseMcpToolArgs;

View File

@@ -26,6 +26,7 @@ export type ChatAssistantMessage = {
content: string
reasoningContent: string
id: string
isToolResult?: boolean
metadata?: {
usage?: ResponseUsage
model?: LLMModel

View File

@@ -220,6 +220,9 @@ export const InfioSettingsSchema = z.object({
grokProvider: GrokProviderSchema,
openaicompatibleProvider: OpenAICompatibleProviderSchema,
// MCP Servers
mcpEnabled: z.boolean().catch(true),
// Chat Model start list
collectedChatModels: z.array(z.object({
provider: z.nativeEnum(ApiProvider),