@yeaft/webchat-agent 1.0.248 → 1.0.250
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/local-runtime/version.json +1 -1
- package/local-runtime/web/app.bundle.js +299 -303
- package/local-runtime/web/app.bundle.js.gz +0 -0
- package/local-runtime/web/index.html +2 -2
- package/local-runtime/web/style.bundle.css +1 -1
- package/local-runtime/web/style.bundle.css.gz +0 -0
- package/package.json +1 -1
- package/yeaft/work-center/bridge.js +6 -5
- package/yeaft/work-center/debug-projection.js +1 -0
- package/yeaft/work-center/projection.js +147 -116
- package/yeaft/work-center/service.js +30 -0
- package/yeaft/work-center/store.js +1 -0
- package/yeaft/work-center/watcher.js +26 -4
|
@@ -166,7 +166,12 @@ export class WorkItemWatcher {
|
|
|
166
166
|
response: '', summary: '', evidence: [],
|
|
167
167
|
error: error?.message || String(error),
|
|
168
168
|
});
|
|
169
|
-
this.onEvent({
|
|
169
|
+
this.onEvent({
|
|
170
|
+
type: 'run.finished',
|
|
171
|
+
actionId: claim.action.id,
|
|
172
|
+
runId: claim.run.id,
|
|
173
|
+
workItem: this.store.getWorkItemDetail(claim.workItem.id),
|
|
174
|
+
});
|
|
170
175
|
continue;
|
|
171
176
|
}
|
|
172
177
|
this.#startClaim(claim);
|
|
@@ -212,7 +217,12 @@ export class WorkItemWatcher {
|
|
|
212
217
|
if (this.lifecycle === 'running') queueMicrotask(() => { this.tick().catch(() => {}); });
|
|
213
218
|
});
|
|
214
219
|
this.activeRuns.set(key, entry);
|
|
215
|
-
this.onEvent({
|
|
220
|
+
this.onEvent({
|
|
221
|
+
type: 'run.started',
|
|
222
|
+
actionId: claim.action.id,
|
|
223
|
+
runId: claim.run.id,
|
|
224
|
+
workItem: this.store.getWorkItemDetail(claim.workItem.id),
|
|
225
|
+
});
|
|
216
226
|
}
|
|
217
227
|
|
|
218
228
|
async #execute(claim, signal, registerProgressReader, registerInputWake) {
|
|
@@ -232,7 +242,14 @@ export class WorkItemWatcher {
|
|
|
232
242
|
claim.run.leaseEpoch,
|
|
233
243
|
progress,
|
|
234
244
|
);
|
|
235
|
-
if (detail)
|
|
245
|
+
if (detail) {
|
|
246
|
+
this.onEvent({
|
|
247
|
+
type: 'run.progress',
|
|
248
|
+
actionId: claim.action.id,
|
|
249
|
+
runId: claim.run.id,
|
|
250
|
+
workItem: detail,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
236
253
|
return !!detail;
|
|
237
254
|
},
|
|
238
255
|
});
|
|
@@ -265,7 +282,12 @@ export class WorkItemWatcher {
|
|
|
265
282
|
claim.run.leaseEpoch,
|
|
266
283
|
result,
|
|
267
284
|
);
|
|
268
|
-
this.onEvent({
|
|
285
|
+
this.onEvent({
|
|
286
|
+
type: 'run.finished',
|
|
287
|
+
actionId: claim.action.id,
|
|
288
|
+
runId: claim.run.id,
|
|
289
|
+
workItem,
|
|
290
|
+
});
|
|
269
291
|
} catch (err) {
|
|
270
292
|
if (!/stale|cancelled|already finished/i.test(err?.message || '')) throw err;
|
|
271
293
|
}
|