@yeaft/webchat-agent 0.0.160 → 0.0.162
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.
- package/crew.js +7 -7
- package/package.json +1 -1
package/crew.js
CHANGED
|
@@ -69,12 +69,12 @@ function expandRoles(roles) {
|
|
|
69
69
|
// reviewer/tester 跟随 developer 的 count
|
|
70
70
|
const count = isExpandable ? devCount : 1;
|
|
71
71
|
|
|
72
|
-
if (count <= 1
|
|
73
|
-
//
|
|
72
|
+
if (count <= 1) {
|
|
73
|
+
// 单实例:保持原名,expandable 角色也分配 groupIndex=1 以获得独立 worktree
|
|
74
74
|
expanded.push({
|
|
75
75
|
...role,
|
|
76
76
|
roleType: role.name,
|
|
77
|
-
groupIndex: 0
|
|
77
|
+
groupIndex: isExpandable ? 1 : 0
|
|
78
78
|
});
|
|
79
79
|
} else {
|
|
80
80
|
// 多实例展开
|
|
@@ -99,9 +99,9 @@ function expandRoles(roles) {
|
|
|
99
99
|
// =====================================================================
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* 为开发组创建 git worktree
|
|
103
103
|
* 每个 groupIndex 对应一个 worktree,同组的 dev/rev/test 共享
|
|
104
|
-
* count=1
|
|
104
|
+
* 所有 EXPANDABLE_ROLES(包括 count=1)都会获得独立 worktree
|
|
105
105
|
*
|
|
106
106
|
* @param {string} projectDir - 主项目目录
|
|
107
107
|
* @param {Array} roles - 展开后的角色列表
|
|
@@ -572,9 +572,9 @@ export async function createCrewSession(msg) {
|
|
|
572
572
|
// 初始化共享区
|
|
573
573
|
await initSharedDir(sharedDir, goal, roles, projectDir, sharedKnowledge);
|
|
574
574
|
|
|
575
|
-
// 初始化 git worktrees
|
|
575
|
+
// 初始化 git worktrees(所有 EXPANDABLE_ROLES 都会获得独立 worktree)
|
|
576
576
|
const worktreeMap = await initWorktrees(projectDir, roles);
|
|
577
|
-
// 回填 workDir:同组的 dev
|
|
577
|
+
// 回填 workDir:同组的 dev/rev/test 共享同一个 worktree
|
|
578
578
|
for (const role of roles) {
|
|
579
579
|
if (role.groupIndex > 0 && worktreeMap.has(role.groupIndex)) {
|
|
580
580
|
role.workDir = worktreeMap.get(role.groupIndex);
|