openmatrix 0.1.57 → 0.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -37,6 +37,7 @@ exports.completeCommand = void 0;
|
|
|
37
37
|
// src/cli/commands/complete.ts
|
|
38
38
|
const commander_1 = require("commander");
|
|
39
39
|
const state_manager_js_1 = require("../../storage/state-manager.js");
|
|
40
|
+
const git_commit_manager_js_1 = require("../../orchestrator/git-commit-manager.js");
|
|
40
41
|
const path = __importStar(require("path"));
|
|
41
42
|
exports.completeCommand = new commander_1.Command('complete')
|
|
42
43
|
.description('标记任务完成并更新全局统计')
|
|
@@ -93,7 +94,31 @@ exports.completeCommand = new commander_1.Command('complete')
|
|
|
93
94
|
currentPhase: allDone ? 'completed' : 'execution',
|
|
94
95
|
...(allDone ? { completedAt: now } : {})
|
|
95
96
|
});
|
|
96
|
-
// 5.
|
|
97
|
+
// 5. Git 自动提交
|
|
98
|
+
if (isSuccess) {
|
|
99
|
+
const state = await stateManager.getState();
|
|
100
|
+
const gitManager = new git_commit_manager_js_1.GitCommitManager(basePath);
|
|
101
|
+
try {
|
|
102
|
+
const commitResult = await gitManager.commit({
|
|
103
|
+
taskId,
|
|
104
|
+
taskTitle: task.title,
|
|
105
|
+
runId: state.runId,
|
|
106
|
+
phase: 'develop',
|
|
107
|
+
changes: [],
|
|
108
|
+
impactScope: []
|
|
109
|
+
});
|
|
110
|
+
if (commitResult.success) {
|
|
111
|
+
console.error(`✅ Git 提交成功: ${commitResult.commitHash}`);
|
|
112
|
+
}
|
|
113
|
+
else if (commitResult.message !== 'No changes to commit') {
|
|
114
|
+
console.error(`⚠️ Git 提交跳过: ${commitResult.message || commitResult.error}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
console.error(`⚠️ Git 提交失败: ${error}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// 6. 输出结果
|
|
97
122
|
const result = {
|
|
98
123
|
taskId,
|
|
99
124
|
status: isSuccess ? 'completed' : 'failed',
|