Repository navigation
工作目录 Git 改为只读呈现,提交交给 AI 员工 - #127
Merged
Merged
Conversation
- 去掉 Git 备份与设置:仓库地址、令牌(含环境预设令牌)、测试连接、备份、 用仓库初始化/一键还原,以及对应接口和运行时操作 - 换机迁移去掉「从 Git 恢复」,保留复制当前文件与使用已有目录 - Git 面板只读展示 origin(去掉其中的凭证)、分支与上游、未推送提交数、 最近提交和有变化的文件;点文件查看相对最近提交的 diff(限 256 KB) - 查看时不带凭证、不联网,不执行仓库配置的外部 diff 与 textconv;敏感文件不列出 - 撤回预设标签编辑;bots.git_* 列不再读取,下个版本删除 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
试用 Git 备份后,结论是由 CoreMan 替员工备份/还原不符合预期:仓库地址交给 AI 员工,由它自己决定工作目录如何初始化与提交更合适。管理台只需要呈现当前状态,方便管理员判断是否该让员工提交。
改动
PUT /git、/git/test、/git/backup、/git/adopt、/git/presets接口,以及运行时的workspace-git-test/backup/restore/adopt。GET /git/status返回 origin(去掉 URL 中的用户名与令牌)、分支与上游、未推送提交数、最近提交和有变化的文件(未跟踪目录合为一项,敏感文件不列出);新增GET /git/diff?path=查看单个文件相对最近提交的改动,未跟踪文件按新增呈现,超过 256 KB 截断。--no-ext-diff --no-textconv,仓库配置的外部 diff 程序不会执行;原有的仓库配置检查(拒绝 include、filter、sshCommand 等)保留。bots.git_*六列不再读取,为兼容滚动升级下个版本再删。换机后自动重装技能(Git 备份纳入 .claude,已装技能不进 Git、换机后自动重装 #124)保留。测试
tests/unit/test_runtime_workspace.py:非仓库返回未初始化;origin 凭证被去掉;上游与未推送数;变更列表含修改、未跟踪文件与目录,不含.env;diff 正确且不执行diff.external;敏感文件不能查看。tests/api/test_bot_workspace.py:diff 接口转发路径;备份与设置接口已移除。兼容性
运行时改动需升级节点;未升级的节点上 diff 不可用、概况信息不全。无数据库迁移。
🤖 Generated with Claude Code