@yeaft/webchat-agent 0.1.1034 → 0.1.1036
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/package.json +1 -1
- package/yeaft/engine.js +10 -0
- package/yeaft/web-bridge.js +3 -0
package/package.json
CHANGED
package/yeaft/engine.js
CHANGED
|
@@ -2178,6 +2178,11 @@ export class Engine {
|
|
|
2178
2178
|
latencyMs,
|
|
2179
2179
|
ttfbMs,
|
|
2180
2180
|
stopReason: 'error',
|
|
2181
|
+
// feat-debug-timestamp: epoch ms when this loop completed
|
|
2182
|
+
// (request end). The panel uses this to print HH:MM:SS per
|
|
2183
|
+
// loop; falls back to turn.openedAt + cumulative latency
|
|
2184
|
+
// when missing for hydrated-from-disk loops.
|
|
2185
|
+
at: Date.now(),
|
|
2181
2186
|
rawRequest,
|
|
2182
2187
|
rawResponse,
|
|
2183
2188
|
};
|
|
@@ -2345,6 +2350,11 @@ export class Engine {
|
|
|
2345
2350
|
latencyMs,
|
|
2346
2351
|
ttfbMs,
|
|
2347
2352
|
stopReason,
|
|
2353
|
+
// feat-debug-timestamp: epoch ms when this loop completed
|
|
2354
|
+
// (request end). The panel uses this to print HH:MM:SS per
|
|
2355
|
+
// loop; falls back to turn.openedAt + cumulative latency
|
|
2356
|
+
// when missing for hydrated-from-disk loops.
|
|
2357
|
+
at: Date.now(),
|
|
2348
2358
|
rawRequest,
|
|
2349
2359
|
rawResponse,
|
|
2350
2360
|
};
|
package/yeaft/web-bridge.js
CHANGED
|
@@ -2383,6 +2383,8 @@ function handleEngineEvent(event, hctx) {
|
|
|
2383
2383
|
case 'loop':
|
|
2384
2384
|
// feat-6af5f9f1 PR B: replaces the old `debug_turn` event. Same
|
|
2385
2385
|
// payload shape plus turnId + loopNumber + usage.totalTokens.
|
|
2386
|
+
// feat-debug-timestamp: also forward `at` (epoch ms) so the
|
|
2387
|
+
// debug panel can render per-loop HH:MM:SS.
|
|
2386
2388
|
sendSessionEvent({
|
|
2387
2389
|
type: 'loop',
|
|
2388
2390
|
turnId: event.turnId,
|
|
@@ -2396,6 +2398,7 @@ function handleEngineEvent(event, hctx) {
|
|
|
2396
2398
|
latencyMs: event.latencyMs,
|
|
2397
2399
|
ttfbMs: event.ttfbMs,
|
|
2398
2400
|
stopReason: event.stopReason,
|
|
2401
|
+
at: event.at,
|
|
2399
2402
|
rawRequest: event.rawRequest,
|
|
2400
2403
|
rawResponse: event.rawResponse,
|
|
2401
2404
|
}, envelope);
|