@yeaft/webchat-agent 0.0.83 → 0.0.85
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 +17 -16
- package/package.json +1 -1
package/crew.js
CHANGED
|
@@ -724,7 +724,23 @@ ${otherRoles.map(r => `- ${r.name}: ${r.displayName}`).join('\n')}
|
|
|
724
724
|
- 如果你有足够的信息做出决策,直接决定并 @相关角色执行
|
|
725
725
|
- 如果你需要更多信息,@具体角色请求补充
|
|
726
726
|
- 如果问题超出你的能力范围或需要业务判断,@human 请人类决定
|
|
727
|
-
-
|
|
727
|
+
- 你可以随时审查其他角色的工作并给出反馈
|
|
728
|
+
|
|
729
|
+
# 任务清单
|
|
730
|
+
你可以在回复中添加 TASKS 块来发布/更新任务清单,团队界面会自动展示:
|
|
731
|
+
|
|
732
|
+
\`\`\`
|
|
733
|
+
---TASKS---
|
|
734
|
+
- [ ] 任务描述 @角色name
|
|
735
|
+
- [x] 已完成的任务 @角色name
|
|
736
|
+
---END_TASKS---
|
|
737
|
+
\`\`\`
|
|
738
|
+
|
|
739
|
+
注意:
|
|
740
|
+
- 每行一个任务,[ ] 表示待办,[x] 表示已完成
|
|
741
|
+
- @角色name 标注负责人(可选)
|
|
742
|
+
- 后续回复中可更新 TASKS 块(标记完成的任务)
|
|
743
|
+
- TASKS 块不需要在回复最末尾,可以放在任意位置`;
|
|
728
744
|
}
|
|
729
745
|
|
|
730
746
|
return prompt;
|
|
@@ -915,21 +931,6 @@ async function executeRoute(session, fromRole, route) {
|
|
|
915
931
|
// 增加轮次计数
|
|
916
932
|
session.round++;
|
|
917
933
|
|
|
918
|
-
// 检查最大轮次
|
|
919
|
-
if (session.round >= session.maxRounds) {
|
|
920
|
-
console.log(`[Crew] Max rounds (${session.maxRounds}) reached`);
|
|
921
|
-
session.status = 'completed';
|
|
922
|
-
sendCrewMessage({
|
|
923
|
-
type: 'crew_status',
|
|
924
|
-
sessionId: session.id,
|
|
925
|
-
status: 'max_rounds_reached',
|
|
926
|
-
round: session.round,
|
|
927
|
-
maxRounds: session.maxRounds
|
|
928
|
-
});
|
|
929
|
-
sendStatusUpdate(session);
|
|
930
|
-
return;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
934
|
// 如果 session 已暂停或停止,保存 pendingRoute 等恢复时重放
|
|
934
935
|
if (session.status === 'paused' || session.status === 'stopped') {
|
|
935
936
|
session.pendingRoute = { fromRole, route };
|