Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
877b604
add workflows
wen422 May 21, 2025
a935b6e
kor translation update
wen422 May 22, 2025
394a8ab
Merge pull request #375 from wen422/master
wen422 May 22, 2025
a08ecc7
Merge v6.1.2
wen422 May 27, 2025
0af6b7c
Merge branch 'release-0615' into HEAD
hemiao2023 Jun 30, 2025
5d2ac09
Merge branch 'release-0715' into HEAD
hemiao2023 Jul 16, 2025
91adbc3
Fix build on macOS
aduh95 Jul 20, 2025
a572a06
Use `const auto` instead of `auto`
aduh95 Jul 20, 2025
fb09f81
Merge pull request #416 from aduh95/patch-2
hemiao2023 Jul 23, 2025
fbc8d71
Merge pull request #415 from aduh95/patch-1
hemiao2023 Jul 23, 2025
2741f0c
Improve turkish localization (#385)
truncgil Jul 24, 2025
42d7118
Merge branch 'release-0730' into HEAD
hemiao2023 Jul 31, 2025
875542c
Update PO files
hemiao2023 Jul 31, 2025
4bd1404
Update README.md
Dai-112100 Aug 12, 2025
45f1120
Update README.md
Dai-112100 Aug 12, 2025
78c1629
Update README.md
Dai-112100 Aug 12, 2025
45df5d1
Update README.md
Dai-112100 Aug 12, 2025
bf5de04
Update README.md
Dai-112100 Aug 12, 2025
2743264
Update README.md
Dai-112100 Aug 12, 2025
b4a66f1
Update SendPage_ja.po (#432)
Psych0h3ad Aug 15, 2025
5f6ca3d
Update CrealityPrint_ja.po (#433)
Psych0h3ad Aug 15, 2025
b2691b1
Merge branch 'release-0815' into HEAD
hemiao2023 Aug 15, 2025
8f88ad1
Merge branch 'release-0815' into HEAD
hemiao2023 Aug 30, 2025
a93b9bf
Merge branch 'release-0915' into HEAD
hemiao2023 Sep 27, 2025
80bd404
Fix illegitimate re-licensing of the underlying AGPL projects.
Sep 29, 2025
0353092
Merge branch 'release-1025' into HEAD
hemiao2023 Dec 3, 2025
9abfbad
Merge branch 'release-1130' into HEAD
hemiao2023 Dec 29, 2025
0d4ac73
Merge branch 'release-260130' into HEAD
hemiao2023 Jan 26, 2026
7622ae4
Merge branch 'release-260330' into HEAD
hemiao2023 Mar 30, 2026
010c71d
Merge branch 'release-260430' into HEAD
hemiao2023 Apr 28, 2026
d32f2cc
Merge branch 'release-260630' into HEAD
hemiao2023 Jun 29, 2026
24b9395
Merge branch 'release-260731' into HEAD
hemiao2023 Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
If:
PathMatch: [.*deps/.*, .*out/.*, .*build/.*]

Index:
Background: Skip
27 changes: 27 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"permissions": {
"allow": [
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"docker ps -a | grep postgres\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"apt-get update -o Dir::Etc::sourcelist='/etc/apt/sources.list' && apt-get install -y nginx\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"systemctl status nginx --no-pager | head -10 && curl -s http://localhost/ | head -20\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -s http://localhost/healthz && curl -s http://localhost/api/debug/echo\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"ps aux | grep '[u]vicorn' && curl -s http://localhost:8787/healthz\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -s -X POST http://localhost/api/chat/completions -H 'Content-Type: application/json' -d '{\\\\\"query\\\\\":\\\\\"test\\\\\"}' | head -c 200\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -s http://localhost:8787/docs | head -50\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -s http://localhost:8787/openapi.json | python3 -c 'import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(list\\(d.get\\(\\\\\"paths\\\\\",{}\\).keys\\(\\)\\), indent=2\\)\\)'\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -s http://localhost/api/billing/me\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"ls -la /etc/nginx/ssl/ 2>/dev/null || echo 'No SSL directory'\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"which certbot && certbot --version\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"mkdir -p /etc/nginx/ssl && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/cxagent.key -out /etc/nginx/ssl/cxagent.crt -subj '/CN=cxagent.crealitycloud.cn/O=CxAgent/C=CN'\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -sk https://localhost/healthz && echo '' && curl -s http://localhost/ | head -5\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -sI http://localhost/ | head -5 && echo '---' && curl -sk https://localhost/ | head -10\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -sk https://localhost/healthz && echo '' && curl -sk https://localhost/api/billing/me\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"apt-get update -o Dir::Etc::sourcelist='/etc/apt/sources.list' && apt-get install -y certbot python3-certbot-nginx\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"certbot --nginx -d cxagent.crealitycloud.cn --non-interactive --agree-tos --email admin@crealitycloud.cn --redirect\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"curl -sI https://cxagent.crealitycloud.cn/ | head -10 && echo '---' && curl -sk https://cxagent.crealitycloud.cn/healthz\")",
"Bash(ssh -p 22 root@cxagent.crealitycloud.cn \"rm -rf /etc/nginx/ssl && certbot certificates\")",
"Bash(chmod +x f:/work/Community/CrealityCommunity/AIChatPage/publish-remote.sh)",
"Read(//tmp/**)"
]
}
}
15 changes: 15 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"permissions": {
"allow": [
"Bash(ssh -p 33335 cxsw@172.20.180.14 \"sleep 10 && docker ps -a --filter 'name=cxagent' && echo '---' && curl -s http://127.0.0.1:8787/healthz 2>&1 || docker logs cxagent-server --tail 20 2>&1\")",
"Bash(ssh -p 33335 cxsw@172.20.180.14 \"docker logs cxagent-server --tail 50 2>&1\")",
"Bash(docker build:*)",
"Bash(ssh -p 33335 cxsw@172.20.180.14 \"cat /etc/os-release 2>/dev/null | head -5 && dpkg -l 2>/dev/null | grep compose; apt list --installed 2>/dev/null | grep compose\")",
"Bash(ssh -p 33335 cxsw@172.20.180.14 ':*)",
"Bash(tar czf:*)",
"Bash(scp -P 33335 /tmp/cxagent-server.tar.gz cxsw@172.20.180.14:/home/cxsw/cxagent/)",
"Bash(scp -P 33335 /tmp/cxagent-server.tar.gz cxsw@172.20.180.14:/tmp/)",
"Bash(scp -P 33335 C:/work/CxAgent/server/.env cxsw@172.20.180.14:/home/cxsw/cxagent/server/.env)"
]
}
}
6 changes: 4 additions & 2 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ apt upgrade -y
echo "-----------------------------------------"
echo "Running BuildLinux.sh with update flag..."
echo "-----------------------------------------"
apt-get install -y software-properties-common
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
./BuildLinux.sh -u

echo "------------------------------"
echo "Installing missing packages..."
echo "------------------------------"
apt install -y libgl1-mesa-dev m4 autoconf libtool
apt install -y libgl1-mesa-dev m4 autoconf libtool ccache
53 changes: 53 additions & 0 deletions .devcontainer/ubuntu20.04/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "CrealityPrint20",
"image": "mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04",
"runArgs": ["--env-file", "/tmp/devcontainer.env"],
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {
"password": "orca"
}
},
"customizations": {
"vscode": {
"settings": {
"cmake.configureArgs": [
"-DSLIC3R_GTK=3",
"-DBBL_RELEASE_TO_PUBLIC=1",
"-DBBL_INTERNAL_TESTING=0",
"-DSLIC3R_STATIC=1",
"-DCMAKE_PREFIX_PATH=${workspaceFolder}/deps/build/destdir/usr/local"
],
"cmake.buildToolArgs": [
"-l${containerEnv:CORES}"
]
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack"
]
}
},
"mounts": [
"source=${env:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
],
"forwardPorts": [6080],
"portsAttributes": {
"6080": {
"label": "VNC web client (noVNC)",
"onAutoForward": "silent"
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
},

"initializeCommand": {
"Setup Temporary Env File": "echo \"CORES=`nproc --all`\" > /tmp/devcontainer.env"
},
"onCreateCommand": {
"Set postCreate executable flag": "chmod +x .devcontainer/postCreate.sh"
},
"postCreateCommand": "sudo .devcontainer/postCreate.sh"
}
53 changes: 53 additions & 0 deletions .devcontainer/ubuntu24.04/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "CrealityPrint24",
"image": "mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04",
"runArgs": ["--env-file", "/tmp/devcontainer.env"],
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {
"password": "orca"
}
},
"customizations": {
"vscode": {
"settings": {
"cmake.configureArgs": [
"-DSLIC3R_GTK=3",
"-DBBL_RELEASE_TO_PUBLIC=1",
"-DBBL_INTERNAL_TESTING=0",
"-DSLIC3R_STATIC=1",
"-DCMAKE_PREFIX_PATH=${workspaceFolder}/deps/build/destdir/usr/local"
],
"cmake.buildToolArgs": [
"-l${containerEnv:CORES}"
]
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack"
]
}
},
"mounts": [
"source=${env:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
],
"forwardPorts": [6080],
"portsAttributes": {
"6080": {
"label": "VNC web client (noVNC)",
"onAutoForward": "silent"
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
},

"initializeCommand": {
"Setup Temporary Env File": "echo \"CORES=`nproc --all`\" > /tmp/devcontainer.env"
},
"onCreateCommand": {
"Set postCreate executable flag": "chmod +x .devcontainer/postCreate.sh"
},
"postCreateCommand": "sudo .devcontainer/postCreate.sh"
}
31 changes: 31 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Auto-detect text/binary by default
* text=auto


# Windows scripts: keep CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.psm1 text eol=crlf

# Shell scripts: LF (explicit for clarity)
*.sh text eol=lf



# Binary assets (avoid auto-conversion and diff noise)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.ttf binary
*.otf binary
*.woff binary
*.woff2 binary
*.exe binary
*.dll binary
*.msi binary
*.zip binary
*.7z binary
*.rar binary
169 changes: 169 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
#!/bin/bash

# 获取配置的clang-format风格
STYLE=$(git config --get hooks.clangformat.style)

GIT_ROOT=$(git rev-parse --show-toplevel)
# 定义 clang-format.exe 的路径(假设在根目录下)
CLANG_FORMAT="${GIT_ROOT}/clang-format.exe"
# 检测操作系统类型
case "$(uname -s)" in
Linux*) OS=Linux;;
Darwin*) OS=macOS;;
CYGWIN*|MINGW*) OS=Windows;;
*) OS=Unknown
esac

# 调用对应平台的子脚本
if [ "$OS" = "Windows" ]; then
CLANG_FORMAT="${GIT_ROOT}/clang-format.exe"
else
# 检查clang-format是否安装
if ! command -v clang-format >/dev/null 2>&1; then
echo "错误:未安装 clang-format" >&2
echo "安装方法:" >&2
echo " macOS: brew install clang-format" >&2
echo " Linux: sudo apt-get install clang-format" >&2
exit 1
fi
CLANG_FORMAT="clang-format"
fi

# 检查文件是否存在
if [ ! -f "${CLANG_FORMAT}" ]; then
echo "错误:未找到 ${CLANG_FORMAT},请确保 clang-format.exe 在项目根目录下!" >&2
exit 1
fi

if [ -n "${STYLE}" ]; then
STYLEARG="-style=${STYLE}"
else
# 尝试使用项目根目录的.clang-format文件
if [ -f "$(git rev-parse --show-toplevel)/.clang-format" ]; then
STYLEARG="-style=file"
else
STYLEARG=""
fi
fi

# 格式化单个文件函数
format_file() {
file="${1}"
if [ -f "${file}" ]; then
"${CLANG_FORMAT}" -i ${STYLEARG} "${file}"
echo "clang-format ${STYLEARG} -i ${file}"

# 统一行尾符为CRLF(Windows格式)
normalize_line_endings "${file}"

# 在文件第一行添加格式化标记
add_format_marker "${file}"

git add "${file}"
fi
}

# 统一文件行尾符处理
normalize_line_endings() {
file="${1}"
if [ -f "${file}" ]; then
# 由于Git的core.autocrlf=true会自动处理行尾符转换
# 我们只需要确保文件内容一致性,让Git处理行尾符
# 这样可以避免与Git的自动转换产生冲突

# 检查文件是否有混合行尾符
if grep -q $'\r\n' "${file}" && grep -q $'[^\r]\n' "${file}"; then
# 文件有混合行尾符,统一处理
if [ "$OS" = "Windows" ]; then
# Windows环境:移除所有CR,让Git的autocrlf处理
tr -d '\r' < "${file}" > "${file}.tmp" && mv "${file}.tmp" "${file}"
echo "Normalized mixed line endings for ${file}"
else
# Unix/Linux环境:统一为LF
tr -d '\r' < "${file}" > "${file}.tmp" && mv "${file}.tmp" "${file}"
echo "Normalized line endings to LF for ${file}"
fi
fi
fi
}

# 添加格式化标记到文件第一行
add_format_marker() {
file="${1}"
if [ -f "${file}" ]; then
# 获取文件扩展名
ext="${file##*.}"

# 根据文件类型选择注释符号
case "${ext}" in
cpp|cc|c|h|hpp)
marker="// [FORMATTED BY CLANG-FORMAT $(date '+%Y-%m-%d %H:%M:%S')]"
;;
*)
marker="// [FORMATTED BY CLANG-FORMAT $(date '+%Y-%m-%d %H:%M:%S')]"
;;
esac

# 检查第一行是否已经有格式化标记
first_line=$(head -n 1 "${file}")
if [[ "${first_line}" == *"[FORMATTED BY CLANG-FORMAT"* ]]; then
# 如果已有标记,更新第一行的时间戳
temp_file=$(mktemp)
echo "${marker}" > "${temp_file}"
tail -n +2 "${file}" >> "${temp_file}"
mv "${temp_file}" "${file}"
echo "Updated format marker in ${file}"
else
# 如果没有标记,添加新标记到第一行
temp_file=$(mktemp)
echo "${marker}" > "${temp_file}"
cat "${file}" >> "${temp_file}"
mv "${temp_file}" "${file}"
echo "Added format marker to ${file}"
fi
fi
}

# 检查是否需要格式化
is_need_format() {
file="${1}"
need=1

# 忽略/test/目录下的文件
if [[ "${file}" == */test/* ]]; then
need=0
fi

if [[ $need -eq 1 ]]; then
# 只处理C/C++源文件
if [[ "${file}" != *.cpp && "${file}" != *.h && "${file}" != *.cc && "${file}" != *.c && "${file}" != *.hpp ]]; then
need=0
fi
fi

return $need
}

case "${1}" in
--about )
echo "Runs clang-format on source files"
;;
* )
# 获取暂存区的文件列表
# 对于amend操作,也需要检查当前暂存的文件
if git rev-parse --verify HEAD >/dev/null 2>&1; then
# 有提交历史,使用diff-index
files=$(git diff-index --cached --name-only HEAD)
else
# 初始提交,使用diff-index --cached
files=$(git diff-index --cached --name-only --diff-filter=A HEAD 2>/dev/null || git ls-files --cached)
fi

for file in $files; do
is_need_format "${file}"
if [[ $? -eq 1 ]]; then
format_file "${file}"
fi
done
;;
esac
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

Loading