@yeaft/webchat-agent 0.1.254 → 0.1.255

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/control.js CHANGED
@@ -231,6 +231,13 @@ async function interruptRole(session, roleName, newContent, fromSource = 'human'
231
231
  roleState.turnActive = false;
232
232
  roleState.accumulatedText = '';
233
233
 
234
+ // Mark pending tool messages as completed before notifying frontend
235
+ for (const m of session.uiMessages) {
236
+ if (m.role === roleName && m.type === 'tool' && !m.hasResult) {
237
+ m.hasResult = true;
238
+ }
239
+ }
240
+
234
241
  sendCrewMessage({
235
242
  type: 'crew_turn_completed',
236
243
  sessionId: session.id,
@@ -281,6 +288,13 @@ async function abortRole(session, roleName) {
281
288
  roleState.turnActive = false;
282
289
  roleState.accumulatedText = '';
283
290
 
291
+ // Mark pending tool messages as completed before notifying frontend
292
+ for (const m of session.uiMessages) {
293
+ if (m.role === roleName && m.type === 'tool' && !m.hasResult) {
294
+ m.hasResult = true;
295
+ }
296
+ }
297
+
284
298
  sendCrewMessage({
285
299
  type: 'crew_turn_completed',
286
300
  sessionId: session.id,
@@ -156,6 +156,13 @@ export async function processRoleOutput(session, roleName, roleQuery, roleState)
156
156
  roleState.accumulatedText = '';
157
157
  roleState.turnActive = false;
158
158
 
159
+ // Mark pending tool messages as completed before notifying frontend
160
+ for (const m of session.uiMessages) {
161
+ if (m.role === roleName && m.type === 'tool' && !m.hasResult) {
162
+ m.hasResult = true;
163
+ }
164
+ }
165
+
159
166
  sendCrewMessage({
160
167
  type: 'crew_turn_completed',
161
168
  sessionId: session.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.254",
3
+ "version": "0.1.255",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",