@yeaft/webchat-agent 0.1.153 → 0.1.155

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.
@@ -48,6 +48,7 @@ export function sendCrewOutput(session, roleName, outputType, rawMessage, extra
48
48
  const role = session.roles.get(roleName);
49
49
  const roleIcon = role?.icon || '';
50
50
  const displayName = role?.displayName || roleName;
51
+ const isDecisionMaker = !!(role && role.isDecisionMaker);
51
52
 
52
53
  // 从 extra 或 roleState 获取当前 task 信息(extra 优先)
53
54
  const roleState = session.roleStates.get(roleName);
@@ -99,7 +100,7 @@ export function sendCrewOutput(session, roleName, outputType, rawMessage, extra
99
100
  session.uiMessages.push({
100
101
  role: roleName, roleIcon, roleName: displayName,
101
102
  type: 'text', content: text, _streaming: true,
102
- taskId, taskTitle,
103
+ taskId, taskTitle, isDecisionMaker,
103
104
  timestamp: Date.now()
104
105
  });
105
106
  }
@@ -111,7 +112,7 @@ export function sendCrewOutput(session, roleName, outputType, rawMessage, extra
111
112
  type: 'route', routeTo: extra.routeTo,
112
113
  routeSummary: extra.routeSummary || '',
113
114
  content: `→ @${extra.routeTo} ${extra.routeSummary || ''}`,
114
- taskId, taskTitle,
115
+ taskId, taskTitle, isDecisionMaker,
115
116
  timestamp: Date.now()
116
117
  });
117
118
  } else if (outputType === 'system') {
@@ -159,7 +160,7 @@ export function sendCrewOutput(session, roleName, outputType, rawMessage, extra
159
160
  toolInput: savedInput,
160
161
  content: `${block.name} ${block.input?.file_path || block.input?.command?.substring(0, 60) || ''}`,
161
162
  hasResult: false,
162
- taskId, taskTitle,
163
+ taskId, taskTitle, isDecisionMaker,
163
164
  timestamp: Date.now()
164
165
  });
165
166
  }
@@ -196,7 +197,7 @@ export function sendCrewOutput(session, roleName, outputType, rawMessage, extra
196
197
  role: roleName, roleIcon, roleName: displayName,
197
198
  type: 'image', toolId: toolId || '',
198
199
  mimeType: item.source.media_type,
199
- taskId, taskTitle,
200
+ taskId, taskTitle, isDecisionMaker,
200
201
  timestamp: Date.now()
201
202
  });
202
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.153",
3
+ "version": "0.1.155",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",