Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#6084 from ChatGPTNextWeb/temp-fix
Browse files Browse the repository at this point in the history
fix: missing mcp_config.json files required for building
  • Loading branch information
Leizhenpeng authored Jan 22, 2025
2 parents 6a86237 + 55cacfb commit 2f9cb5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
public/serviceWorker.js
app/mcp/mcp_config.json
app/mcp/mcp_config.json
app/mcp/mcp_config.default.json
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/server ./.next/server

RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
COPY --from=builder /app/app/mcp/mcp_config.json /app/app/mcp/
COPY --from=builder /app/app/mcp/mcp_config.default.json /app/app/mcp/mcp_config.json

EXPOSE 3000

Expand Down
2 changes: 2 additions & 0 deletions app/mcp/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ export async function getMcpConfigFromFile(): Promise<McpConfigData> {
// 更新 MCP 配置文件
async function updateMcpConfig(config: McpConfigData): Promise<void> {
try {
// 确保目录存在
await fs.mkdir(path.dirname(CONFIG_PATH), { recursive: true });
await fs.writeFile(CONFIG_PATH, JSON.stringify(config, null, 2));
} catch (error) {
throw error;
Expand Down
3 changes: 3 additions & 0 deletions app/mcp/mcp_config.default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"mcpServers": {}
}

0 comments on commit 2f9cb5a

Please sign in to comment.