-
Notifications
You must be signed in to change notification settings - Fork 377
Dev #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #434
Changes from all commits
e75f01b
45f62d6
31fe743
76cda6b
66d4492
0b24f65
be72ceb
1e03e4d
7b50ce6
1d6aec9
fd431e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| # 打 tag(如 v1.2.3)后自动构建 Windows / macOS(Intel+Apple Silicon) 桌面包并发布到 GitHub Release。 | ||
| # 手动运行 workflow 仅上传 Actions Artifact,不创建 Release(便于试打)。 | ||
|
|
||
| name: Electron Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: electron-release-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| NODE_VERSION: "20" | ||
| CSC_IDENTITY_AUTO_DISCOVERY: false | ||
|
|
||
| jobs: | ||
| electron-windows: | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: pnpm | ||
| cache-dependency-path: frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Set package.json version | ||
| shell: bash | ||
| run: | | ||
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | ||
| V="${GITHUB_REF_NAME#v}" | ||
| else | ||
| V="0.0.0-ci.${{ github.run_number }}" | ||
| fi | ||
| # electron-builder 要求严格 semver(至少 major.minor.patch 三段) | ||
| if [[ "$V" =~ ^[0-9]+\.[0-9]+$ ]]; then | ||
| V="${V}.0" | ||
| fi | ||
| node -e "const fs=require('fs');const p='package.json';const j=JSON.parse(fs.readFileSync(p,'utf8'));j.version=process.argv[1];fs.writeFileSync(p,JSON.stringify(j,null,2)+'\n');" "$V" | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| # 仅在 Windows Runner 上开启 signAndEditExecutable(写入 exe 图标等);Linux/WSL 需 false,否则会要求 wine | ||
| - name: Build Windows (portable + NSIS) | ||
| run: pnpm run electron:ci:win:native | ||
|
|
||
| - name: Collect artifacts | ||
| shell: bash | ||
| run: | | ||
| mkdir -p ../_electron_upload | ||
| shopt -s nullglob | ||
| cp release/*.exe ../_electron_upload/ || true | ||
| cp release/*.yml ../_electron_upload/ || true | ||
| ls -la ../_electron_upload/ | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: electron-windows-x64 | ||
| path: _electron_upload/ | ||
|
|
||
| electron-macos: | ||
| runs-on: macos-latest | ||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| cache: pnpm | ||
| cache-dependency-path: frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Set package.json version | ||
| run: | | ||
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | ||
| V="${GITHUB_REF_NAME#v}" | ||
| else | ||
| V="0.0.0-ci.${{ github.run_number }}" | ||
| fi | ||
| if [[ "$V" =~ ^[0-9]+\.[0-9]+$ ]]; then | ||
| V="${V}.0" | ||
| fi | ||
| node -e "const fs=require('fs');const p='package.json';const j=JSON.parse(fs.readFileSync(p,'utf8'));j.version=process.argv[1];fs.writeFileSync(p,JSON.stringify(j,null,2)+'\n');" "$V" | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| # 目标格式(dmg / zip)取自 package.json 的 build.mac.target | ||
| - name: Build macOS (arm64 + x64) | ||
| run: pnpm run electron:ci:mac | ||
|
|
||
| - name: Collect artifacts | ||
| run: | | ||
| mkdir -p ../_electron_upload | ||
| shopt -s nullglob | ||
| cp release/*.dmg ../_electron_upload/ || true | ||
| cp release/*.zip ../_electron_upload/ || true | ||
| cp release/*.yml ../_electron_upload/ || true | ||
| ls -la ../_electron_upload/ | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: electron-macos-universal | ||
| path: _electron_upload/ | ||
|
|
||
| publish-release: | ||
| needs: [electron-windows, electron-macos] | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: electron-windows-x64 | ||
| path: release-assets/windows | ||
|
|
||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: electron-macos-universal | ||
| path: release-assets/macos | ||
|
|
||
| - name: List release files | ||
| run: find release-assets -type f -exec ls -lh {} \; | ||
|
|
||
| - uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: MonkeyCode Desktop ${{ github.ref_name }} | ||
| generate_release_notes: true | ||
| fail_on_unmatched_files: false | ||
| files: | | ||
| release-assets/windows/* | ||
| release-assets/macos/* | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,3 +9,6 @@ logs | |||||||||
| # Local build artifacts | ||||||||||
| monkeycode-ai/ | ||||||||||
| .pnpm-store/ | ||||||||||
|
|
||||||||||
| # Electron (electron-builder) | ||||||||||
| frontend/release/ | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tip 💡 未忽略 release-full 目录,可能提交 Electron 全量打包产物 当前仅忽略了 建议: 在
Suggested change
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,59 +1,38 @@ | ||||||
| # MonkeyCode | ||||||
|
|
||||||
| <p align="center"> | ||||||
| <img src="frontend/public/logo-colored.png" width="200" alt="MonkeyCode" /> | ||||||
| </p> | ||||||
| > 由长亭科技推出的企业级 AI 开发平台,覆盖需求 → 设计 → 开发 → 代码审查全流程 | ||||||
|
|
||||||
| <p align="center"> | ||||||
| <a target="_blank" href="https://monkeycode-ai.com/">⚡ 在线使用</a> | | ||||||
| <a target="_blank" href="https://monkeycode.docs.baizhi.cloud/">📖 帮助文档</a> | | ||||||
| <a target="_blank" href="https://github.com/chaitin/MonkeyCode">🐙 GitHub</a> | ||||||
| </p> | ||||||
| ## 简介 | ||||||
|
|
||||||
| ## 👋 简介 | ||||||
| MonkeyCode 是面向研发团队的企业级 AI 开发平台,通过自然语言交互,让 AI 帮你完成从需求分析、技术设计、代码开发到代码审查的完整开发流程。平台支持多种 AI 模型,集成 GitHub/GitLab/Gitee 等主流 Git 平台,提供在线 IDE、终端、文件管理等功能,大幅提升团队开发效率。 | ||||||
|
|
||||||
| **MonkeyCode** 是由长亭科技推出的企业级 AI 开发平台,覆盖 **需求 → 设计 → 开发 → 代码审查** 全流程。 | ||||||
|
|
||||||
| MonkeyCode 不是简单的 AI 编程工具,而是对传统研发模式的变革,带来全新的 AI 编程体验,让研发团队效率 Max。你可以用自然语言描述需求,让 AI 帮你完成从需求分析、技术设计、代码开发到代码审查的完整开发流程。 | ||||||
|
|
||||||
| ## 💡 核心功能 | ||||||
| ## 核心功能 | ||||||
|
|
||||||
| ### 智能任务 | ||||||
|
|
||||||
| 用自然语言描述需求,AI 自动完成开发、设计或代码审查。支持从 Git 仓库或 ZIP 文件导入代码,可选择开发工具和 AI 模型。 | ||||||
|
|
||||||
| ### 项目管理 | ||||||
|
|
||||||
| 关联 Git 仓库,管理项目需求和任务。可创建需求文档、启动设计任务和开发任务,实现需求驱动的开发流程。 | ||||||
|
|
||||||
| ### 在线开发环境 | ||||||
|
|
||||||
| 提供完整的在线开发环境,包括: | ||||||
|
|
||||||
| - **在线 IDE**:支持多语言高亮的代码编辑器 | ||||||
| - **终端**:支持多会话的 Web 终端 | ||||||
| - **文件管理**:在线浏览、编辑、上传下载文件 | ||||||
| - **在线预览**:一键预览 Web 服务 | ||||||
| - **远程协助**:支持与他人共享终端 | ||||||
|
|
||||||
| ### 代码审查 | ||||||
|
|
||||||
| 配置 Git 机器人,自动审查 GitHub/GitLab/Gitee 的 PR/MR,提供智能代码改进建议。 | ||||||
|
|
||||||
| ### 团队协作 | ||||||
|
|
||||||
| 企业管理员可以管理团队成员、分配资源(宿主机、镜像、AI 模型),实现权限控制和资源统一管理。 | ||||||
|
|
||||||
| ## 🚀 快速开始 | ||||||
|
|
||||||
| 本项目为 MonkeyCode **在线版** 前端,需配合后端服务使用。 | ||||||
| ## 快速开始 | ||||||
|
|
||||||
| ```bash | ||||||
| # 进入前端目录 | ||||||
| cd frontend | ||||||
|
|
||||||
| # 安装依赖 | ||||||
| pnpm install | ||||||
| cd frontend && pnpm install | ||||||
|
|
||||||
| # 启动开发服务器 | ||||||
| pnpm dev | ||||||
|
|
@@ -64,40 +43,11 @@ pnpm build | |||||
|
|
||||||
| 访问 http://localhost:5173 查看应用。 | ||||||
|
|
||||||
| ## 📖 使用文档 | ||||||
|
|
||||||
| - **在线使用**:访问 [monkeycode-ai.com](https://monkeycode-ai.com/) 直接体验 | ||||||
| - **帮助文档**:查看 [MonkeyCode 文档](https://monkeycode.docs.baizhi.cloud/) 了解团队版、点数说明、配置等 | ||||||
| - **使用指南**:项目内详细操作说明见 [frontend/doc.md](./frontend/doc.md) | ||||||
|
|
||||||
| ## ⚡ 界面展示 | ||||||
|
|
||||||
| | <img src="frontend/public/task-1.png" width="370" /> | <img src="frontend/public/task-2.png" width="370" /> | | ||||||
| | --------------------------------------------------- | --------------------------------------------------- | | ||||||
| | <img src="frontend/public/task-3.png" width="370" /> | | | ||||||
|
|
||||||
| ## 🔗 相关链接 | ||||||
|
|
||||||
| - [MonkeyCode 官网](https://monkeycode-ai.com/) | ||||||
| - [MonkeyCode 文档](https://monkeycode.docs.baizhi.cloud/) | ||||||
| - [长亭科技](https://chaitin.cn/) | ||||||
| - [长亭百智云](https://baizhi.cloud/) | ||||||
|
|
||||||
| ## 💬 社区交流 | ||||||
|
|
||||||
| 欢迎加入我们的微信群进行交流。 | ||||||
|
|
||||||
| <img src="frontend/public/wechat.png" width="300" alt="微信交流群" /> | ||||||
|
|
||||||
| ## 🙋♂️ 贡献 | ||||||
|
|
||||||
| 欢迎提交 [Pull Request](https://github.com/chaitin/MonkeyCode/pulls) 或创建 [Issue](https://github.com/chaitin/MonkeyCode/issues) 来帮助改进项目。 | ||||||
| ## 使用文档 | ||||||
|
|
||||||
| ## 📝 许可证 | ||||||
| 详细的使用指南请参考 [frontend/doc.md](./frontend/doc.md)。 | ||||||
|
|
||||||
| 本项目采用 GNU Affero General Public License v3.0 (AGPL-3.0) 许可证。这意味着: | ||||||
| ## 联系我们 | ||||||
|
|
||||||
| - 你可以自由使用、修改和分发本软件 | ||||||
| - 你必须以相同的许可证开源你的修改 | ||||||
| - 如果你通过网络提供服务,也必须开源你的代码 | ||||||
| - 商业使用需要遵守相同的开源要求 | ||||||
| - 官网:https://monkeycode-ai.com | ||||||
| - 帮助文档:https://monkeycode-ai.com/docs | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning README 将帮助文档地址改为 建议: 建议统一文档域名:要么同步更新前端所有帮助入口到新域名,要么在本次 README 中保持与现有产品入口一致,避免文档入口分裂。
Suggested change
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning
工作流声明 electron-builder 需要严格 semver,但当前仅处理了
major.minor补丁补全,未处理major(如v1)场景。若打v1这类 tag,会把版本写成1,可能导致构建失败。macOS 任务中同样存在相同逻辑(第 101 行附近)。建议: 同时补全
major和major.minor两类版本格式,确保始终写入三段式 semver。