Skip to content

Commit 732dda2

Browse files
authored
Merge branch 'langgenius:main' into main
2 parents 5bec133 + 8041808 commit 732dda2

File tree

6,795 files changed

+367612
-331392
lines changed

Some content is hidden

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

6,795 files changed

+367612
-331392
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/python:3.10
1+
FROM mcr.microsoft.com/devcontainers/python:3.12
22

3-
# [Optional] Uncomment this section to install additional OS packages.
4-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5-
# && apt-get -y install --no-install-recommends <your-package-list-here>
3+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
4+
&& apt-get -y install libgmp-dev libmpfr-dev libmpc-dev

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ if you see such error message when you open this project in codespaces:
3434
![Alt text](troubleshooting.png)
3535

3636
a simple workaround is change `/signin` endpoint into another one, then login with GitHub account and close the tab, then change it back to `/signin` endpoint. Then all things will be fine.
37-
The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)
37+
The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
33
{
4-
"name": "Python 3.10",
5-
"build": {
4+
"name": "Python 3.12",
5+
"build": {
66
"context": "..",
77
"dockerfile": "Dockerfile"
88
},

.devcontainer/noop.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This file copied into the container along with environment.yml* from the parent
2-
folder. This file is included to prevents the Dockerfile COPY instruction from
3-
failing if no environment.yml is found.
2+
folder. This file is included to prevents the Dockerfile COPY instruction from
3+
failing if no environment.yml is found.

.devcontainer/post_create_command.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#!/bin/bash
22

3-
cd web && npm install
4-
pipx install poetry
3+
npm add -g pnpm@10.13.1
4+
cd web && pnpm install
5+
pipx install uv
56

6-
echo 'alias start-api="cd /workspaces/dify/api && poetry run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc
7-
echo 'alias start-worker="cd /workspaces/dify/api && poetry run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion"' >> ~/.bashrc
8-
echo 'alias start-web="cd /workspaces/dify/web && npm run dev"' >> ~/.bashrc
9-
echo 'alias start-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify up -d"' >> ~/.bashrc
7+
echo 'alias start-api="cd /workspaces/dify/api && uv run python -m flask run --host 0.0.0.0 --port=5001 --debug"' >> ~/.bashrc
8+
echo 'alias start-worker="cd /workspaces/dify/api && uv run python -m celery -A app.celery worker -P gevent -c 1 --loglevel INFO -Q dataset,generation,mail,ops_trace,app_deletion"' >> ~/.bashrc
9+
echo 'alias start-web="cd /workspaces/dify/web && pnpm dev"' >> ~/.bashrc
10+
echo 'alias start-web-prod="cd /workspaces/dify/web && pnpm build && pnpm start"' >> ~/.bashrc
11+
echo 'alias start-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify --env-file middleware.env up -d"' >> ~/.bashrc
12+
echo 'alias stop-containers="cd /workspaces/dify/docker && docker-compose -f docker-compose.middleware.yaml -p dify --env-file middleware.env down"' >> ~/.bashrc
13+
14+
source /home/vscode/.bashrc
1015

11-
source /home/vscode/.bashrc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
poetry install -C api
3+
cd api && uv sync

.editorconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.py]
14+
indent_size = 4
15+
indent_style = space
16+
17+
[*.{yml,yaml}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.toml]
22+
indent_size = 4
23+
indent_style = space
24+
25+
# Markdown and MDX are whitespace sensitive languages.
26+
# Do not remove trailing spaces.
27+
[*.{md,mdx}]
28+
trim_trailing_whitespace = false
29+
30+
# Matches multiple files with brace expansion notation
31+
# Set default charset
32+
[*.{js,tsx}]
33+
indent_style = space
34+
indent_size = 2
35+
36+
# Matches the exact files package.json
37+
[package.json]
38+
indent_style = space
39+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Ensure that .sh scripts use LF as line separator, even if they are checked out
2-
# to Windows(NTFS) file-system, by a user of Docker for Window.
2+
# to Windows(NTFS) file-system, by a user of Docker for Windows.
33
# These .sh scripts will be run from the Container after `docker compose up -d`.
44
# If they appear to be CRLF style, Dash from the Container will fail to execute
55
# them.

.github/DISCUSSION_TEMPLATE/general.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
required: true
1010
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
1111
required: true
12-
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:"
12+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
1313
required: true
1414
- label: "Please do not modify this template :) and fill in all the required fields."
1515
required: true

.github/DISCUSSION_TEMPLATE/help.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
required: true
1010
- label: I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)).
1111
required: true
12-
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:"
12+
- label: "[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)"
1313
required: true
1414
- label: "Please do not modify this template :) and fill in all the required fields."
1515
required: true

0 commit comments

Comments
 (0)