mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-13 02:24:44 +08:00
- Add environment field to sandbox config for injecting env vars into container - Support $VAR syntax to resolve values from host environment variables - Refactor frontend API modules to use centralized getBackendBaseURL() - Improve Doraemon skill with explicit input/output path arguments - Add .env.example file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
563 B
TypeScript
22 lines
563 B
TypeScript
import { getBackendBaseURL } from "@/core/config";
|
|
|
|
import type { MCPConfig } from "./types";
|
|
|
|
export async function loadMCPConfig() {
|
|
const response = await fetch(`${getBackendBaseURL()}/api/mcp/config`);
|
|
return response.json() as Promise<MCPConfig>;
|
|
}
|
|
|
|
export async function updateMCPConfig(config: MCPConfig) {
|
|
const response = await fetch(`${getBackendBaseURL()}/api/mcp/config`,
|
|
{
|
|
method: "PUT",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
body: JSON.stringify(config),
|
|
},
|
|
);
|
|
return response.json();
|
|
}
|