Skip to content

Commit 8d7f6e5

Browse files
authored
Merge branch 'ChatGPTNextWeb:main' into dev
2 parents b57732d + 12863f5 commit 8d7f6e5

File tree

190 files changed

+13293
-1938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+13293
-1938
lines changed

.env.template

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# Your openai api key. (required)
22
OPENAI_API_KEY=sk-xxxx
33

4+
# DeepSeek Api Key. (Optional)
5+
DEEPSEEK_API_KEY=
6+
47
# Access password, separated by comma. (optional)
58
CODE=your-password
69

710
# You can start service behind a proxy. (optional)
811
PROXY_URL=http://localhost:7890
912

13+
# Enable MCP functionality (optional)
14+
# Default: Empty (disabled)
15+
# Set to "true" to enable MCP functionality
16+
ENABLE_MCP=
17+
1018
# (optional)
1119
# Default: Empty
1220
# Google Gemini Pro API key, set if you want to use Google Gemini Pro API.
@@ -66,4 +74,10 @@ ANTHROPIC_API_VERSION=
6674
ANTHROPIC_URL=
6775

6876
### (optional)
69-
WHITE_WEBDEV_ENDPOINTS=
77+
WHITE_WEBDAV_ENDPOINTS=
78+
79+
### siliconflow Api key (optional)
80+
SILICONFLOW_API_KEY=
81+
82+
### siliconflow Api url (optional)
83+
SILICONFLOW_URL=

.eslintignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
public/serviceWorker.js
1+
public/serviceWorker.js
2+
app/mcp/mcp_config.json
3+
app/mcp/mcp_config.default.json

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"extends": "next/core-web-vitals",
3-
"plugins": ["prettier"]
3+
"plugins": ["prettier", "unused-imports"],
4+
"rules": {
5+
"unused-imports/no-unused-imports": "warn"
6+
}
47
}

.github/workflows/deploy_preview.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: VercelPreviewDeployment
33
on:
44
pull_request_target:
55
types:
6-
- opened
7-
- synchronize
8-
- reopened
6+
- review_requested
97

108
env:
119
VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }}
@@ -49,7 +47,7 @@ jobs:
4947
run: npm install --global vercel@latest
5048

5149
- name: Cache dependencies
52-
uses: actions/cache@v2
50+
uses: actions/cache@v4
5351
id: cache-npm
5452
with:
5553
path: ~/.npm

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "!*"
9+
pull_request:
10+
types:
11+
- review_requested
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 18
25+
cache: "yarn"
26+
27+
- name: Cache node_modules
28+
uses: actions/cache@v4
29+
with:
30+
path: node_modules
31+
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-node_modules-
34+
35+
- name: Install dependencies
36+
run: yarn install
37+
38+
- name: Run Jest tests
39+
run: yarn test:ci

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ dev
4646
*.key.pub
4747

4848
masks.json
49+
50+
# mcp config
51+
app/mcp/mcp_config.json

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ ENV PROXY_URL=""
3434
ENV OPENAI_API_KEY=""
3535
ENV GOOGLE_API_KEY=""
3636
ENV CODE=""
37+
ENV ENABLE_MCP=""
3738

3839
COPY --from=builder /app/public ./public
3940
COPY --from=builder /app/.next/standalone ./
4041
COPY --from=builder /app/.next/static ./.next/static
4142
COPY --from=builder /app/.next/server ./.next/server
4243

44+
RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
45+
COPY --from=builder /app/app/mcp/mcp_config.default.json /app/app/mcp/mcp_config.json
46+
4347
EXPOSE 3000
4448

4549
CMD if [ -n "$PROXY_URL" ]; then \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-2024 Zhang Yifei
3+
Copyright (c) 2023-2025 NextChat
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)