完成:aide/024 - 优化 finish 后提交信息中的任务名格式
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"next_number": 24,
|
||||
"next_number": 25,
|
||||
"branches": [
|
||||
{
|
||||
"number": 1,
|
||||
@@ -270,6 +270,18 @@
|
||||
"status": "finished",
|
||||
"end_commit": "91c9bca5d5356e7c06d018fab0138152ab96c56a",
|
||||
"finished_at": "2025-12-19T05:17:07+08:00"
|
||||
},
|
||||
{
|
||||
"number": 24,
|
||||
"branch_name": "aide/024",
|
||||
"source_branch": "master",
|
||||
"start_commit": "5942bd2d6c906d57574aba6a4bff52f6ae649604",
|
||||
"task_id": "2025-12-19T05-31-03",
|
||||
"task_summary": "开始任务准备: 优化 finish 后提交信息中的任务名格式",
|
||||
"started_at": "2025-12-19T05:31:03+08:00",
|
||||
"status": "finished",
|
||||
"end_commit": "4fdf7664c19b276336970421e1788a27c19815d7",
|
||||
"finished_at": "2025-12-19T05:39:19+08:00"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# Git 分支概况
|
||||
|
||||
## aide/024
|
||||
|
||||
- **任务**: 开始任务准备: 优化 finish 后提交信息中的任务名格式
|
||||
- **任务ID**: 2025-12-19T05-31-03
|
||||
- **源分支**: master
|
||||
- **起始提交**: 5942bd2
|
||||
- **结束提交**: 4fdf766
|
||||
- **状态**: finished
|
||||
- **起始时间**: 2025-12-19 05:31
|
||||
- **结束时间**: 2025-12-19 05:39
|
||||
|
||||
## aide/023
|
||||
|
||||
- **任务**: 开始任务准备: 为 user-docs 添加分步执行和接续执行能力
|
||||
|
||||
123
.aide/logs/2025-12-19T05-31-03-status.json
Normal file
123
.aide/logs/2025-12-19T05-31-03-status.json
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"task_id": "2025-12-19T05-31-03",
|
||||
"current_phase": "finish",
|
||||
"current_step": 14,
|
||||
"started_at": "2025-12-19T05:31:03+08:00",
|
||||
"history": [
|
||||
{
|
||||
"timestamp": "2025-12-19T05:31:03+08:00",
|
||||
"action": "start",
|
||||
"phase": "task-optimize",
|
||||
"step": 1,
|
||||
"summary": "开始任务准备: 优化 finish 后提交信息中的任务名格式",
|
||||
"git_commit": "9b8814a16b93b0119007991b6e4525319309c5b3"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:33:45+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "task-optimize",
|
||||
"step": 2,
|
||||
"summary": "任务分析完成:修改 branch.py 去除提交信息中的任务名前缀",
|
||||
"git_commit": "0922f60205c1a2017251671f78075fa593229160"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:35:01+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "task-optimize",
|
||||
"step": 3,
|
||||
"summary": "任务细则已确认",
|
||||
"git_commit": "4b499cef435649bddd27e5cf60ce833f654a3bd5"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:35:14+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "flow-design",
|
||||
"step": 4,
|
||||
"summary": "进入流程设计环节",
|
||||
"git_commit": "e7028827d841419dfcedebe302f529581b35f6ea"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:36:13+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "flow-design",
|
||||
"step": 5,
|
||||
"summary": "流程图设计完成",
|
||||
"git_commit": "dabdad8ee9ca142f46255b831fb3c16c52017f8f"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:36:29+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "impl",
|
||||
"step": 6,
|
||||
"summary": "流程设计完成,进入实现环节",
|
||||
"git_commit": "837fcbef5cc629e34e5f8ab6cd41659c8a013014"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:36:43+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "impl",
|
||||
"step": 7,
|
||||
"summary": "代码实现完成:添加 _clean_task_summary 函数并修改提交信息生成逻辑",
|
||||
"git_commit": "ba78733192b47e2b47082f2078119136fef7340d"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:36:55+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "verify",
|
||||
"step": 8,
|
||||
"summary": "实现完成,进入验证环节",
|
||||
"git_commit": "eda0235c71db77fdad3467d4246250c17198686d"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:37:38+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "verify",
|
||||
"step": 9,
|
||||
"summary": "验证完成: 所有测试用例通过,_clean_task_summary 函数工作正常",
|
||||
"git_commit": "1f47af58d7f58251b67841a528e8ca6e6b150db7"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:37:49+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "docs",
|
||||
"step": 10,
|
||||
"summary": "验证通过,进入文档环节",
|
||||
"git_commit": "6814f8ec9c9c5c244d9e2d4e8c50a4c278c9373d"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:38:24+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "docs",
|
||||
"step": 11,
|
||||
"summary": "文档更新完成",
|
||||
"git_commit": "bfd3c8f488b773808c9124a69272f908f63f1765"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:38:35+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "confirm",
|
||||
"step": 12,
|
||||
"summary": "文档更新完成,进入用户确认环节",
|
||||
"git_commit": "82086b484b873078843528b217e61b08e66b2496"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:39:08+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "confirm",
|
||||
"step": 13,
|
||||
"summary": "用户确认通过",
|
||||
"git_commit": "ba0748a19c11b01a8e59d468f55b8516efe34e4a"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-19T05:39:19+08:00",
|
||||
"action": "next-part",
|
||||
"phase": "finish",
|
||||
"step": 14,
|
||||
"summary": "用户确认通过,进入收尾",
|
||||
"git_commit": "4fdf7664c19b276336970421e1788a27c19815d7"
|
||||
}
|
||||
],
|
||||
"source_branch": "master",
|
||||
"start_commit": "5942bd2d6c906d57574aba6a4bff52f6ae649604",
|
||||
"task_branch": "aide/024"
|
||||
}
|
||||
@@ -26,6 +26,8 @@
|
||||
- 正常完成:`完成:<分支名> - <任务名>`
|
||||
- 强制清理:`任务中断,清理:<分支名> - <任务名>`
|
||||
- 替代原有的 `{短哈希}的任务收尾` 格式,更加语义化
|
||||
- 新增 `_clean_task_summary()` 函数,移除任务名中的"开始任务准备:"前缀
|
||||
- 支持半角/全角冒号、有无空格的多种格式
|
||||
|
||||
**decide 界面源文件显示**
|
||||
|
||||
|
||||
@@ -87,6 +87,26 @@ class BranchesData:
|
||||
return BranchesData(next_number=next_number, branches=branches)
|
||||
|
||||
|
||||
# 需要从 task_summary 中移除的前缀列表(finish 提交信息使用)
|
||||
_TASK_SUMMARY_PREFIXES = [
|
||||
"开始任务准备: ",
|
||||
"开始任务准备:",
|
||||
"开始任务准备: ",
|
||||
"开始任务准备:",
|
||||
]
|
||||
|
||||
|
||||
def _clean_task_summary(task_summary: str) -> str:
|
||||
"""清理 task_summary 中的前缀。
|
||||
|
||||
用于生成 finish 提交信息时,移除 "开始任务准备:" 等前缀。
|
||||
"""
|
||||
for prefix in _TASK_SUMMARY_PREFIXES:
|
||||
if task_summary.startswith(prefix):
|
||||
return task_summary[len(prefix):]
|
||||
return task_summary
|
||||
|
||||
|
||||
class BranchManager:
|
||||
"""管理 aide flow 任务分支"""
|
||||
|
||||
@@ -620,10 +640,11 @@ class BranchManager:
|
||||
|
||||
# 8. 创建收尾提交
|
||||
self.git.add_all()
|
||||
clean_summary = _clean_task_summary(branch_info.task_summary)
|
||||
if is_force_clean:
|
||||
commit_msg = f"任务中断,清理:{task_branch} - {branch_info.task_summary}"
|
||||
commit_msg = f"任务中断,清理:{task_branch} - {clean_summary}"
|
||||
else:
|
||||
commit_msg = f"完成:{task_branch} - {branch_info.task_summary}"
|
||||
commit_msg = f"完成:{task_branch} - {clean_summary}"
|
||||
self.git.commit(commit_msg)
|
||||
|
||||
return True, f"任务分支已合并到 {source_branch}"
|
||||
@@ -720,10 +741,11 @@ class BranchManager:
|
||||
|
||||
# 8. 创建压缩提交
|
||||
self.git.add_all()
|
||||
clean_summary = _clean_task_summary(task_summary)
|
||||
if is_force_clean:
|
||||
commit_msg = f"[aide] 强制清理压缩提交: {task_summary}"
|
||||
commit_msg = f"[aide] 强制清理压缩提交: {clean_summary}"
|
||||
else:
|
||||
commit_msg = f"[aide] 任务压缩提交: {task_summary}"
|
||||
commit_msg = f"[aide] 任务压缩提交: {clean_summary}"
|
||||
self.git.commit(commit_msg)
|
||||
|
||||
action_name = "强制清理" if is_force_clean else "任务完成"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
现在的finish后原分支的提交信息里,分支名后的任务名里的"开始任务准备:"是哪里来的,我希望不要有这段内容,只要有后面的实际任务名就行,
|
||||
|
||||
你可以执行`git lg`来快速查看历史提交,
|
||||
Reference in New Issue
Block a user