@botlearn-course/daemon 0.0.18-beta.2 → 0.0.19
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/dist/run-dispatcher.js +7 -0
- package/package.json +1 -1
package/dist/run-dispatcher.js
CHANGED
|
@@ -233,6 +233,7 @@ export class RunDispatcher {
|
|
|
233
233
|
let runtimeUsage = {};
|
|
234
234
|
let modelStartedAt;
|
|
235
235
|
let modelFinishedAt;
|
|
236
|
+
let finalContentFirstTokenAt;
|
|
236
237
|
let fileReportStartedAt;
|
|
237
238
|
let fileReportFinishedAt;
|
|
238
239
|
let progressEvents = 0;
|
|
@@ -270,6 +271,11 @@ export class RunDispatcher {
|
|
|
270
271
|
...(modelStartedAt !== undefined && modelFinishedAt !== undefined
|
|
271
272
|
? { model_wall_time_ms: Math.max(0, modelFinishedAt - modelStartedAt) }
|
|
272
273
|
: {}),
|
|
274
|
+
...(modelStartedAt !== undefined && finalContentFirstTokenAt !== undefined
|
|
275
|
+
? {
|
|
276
|
+
final_content_ttft_ms: Math.max(0, finalContentFirstTokenAt - modelStartedAt),
|
|
277
|
+
}
|
|
278
|
+
: {}),
|
|
273
279
|
...(fileReportStartedAt !== undefined && fileReportFinishedAt !== undefined
|
|
274
280
|
? {
|
|
275
281
|
file_report_time_ms: Math.max(0, fileReportFinishedAt - fileReportStartedAt),
|
|
@@ -659,6 +665,7 @@ export class RunDispatcher {
|
|
|
659
665
|
if (block.kind === "text_delta") {
|
|
660
666
|
if (!block.text)
|
|
661
667
|
return;
|
|
668
|
+
finalContentFirstTokenAt ??= this.now();
|
|
662
669
|
pendingContent += block.text;
|
|
663
670
|
if (pendingContent.length >= CONTENT_FLUSH_MAX_CHARS) {
|
|
664
671
|
await flushContent();
|
package/package.json
CHANGED