@devness/useai 0.6.28 → 0.6.29
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/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -684,7 +684,7 @@ var VERSION;
|
|
|
684
684
|
var init_version = __esm({
|
|
685
685
|
"../shared/dist/constants/version.js"() {
|
|
686
686
|
"use strict";
|
|
687
|
-
VERSION = "0.6.
|
|
687
|
+
VERSION = "0.6.29";
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
|
|
@@ -35429,9 +35429,9 @@ function sealOrphanFile(sessionId) {
|
|
|
35429
35429
|
const lastRecordTime = new Date(lastRecord.timestamp).getTime();
|
|
35430
35430
|
const startTimeMs = new Date(startTime).getTime();
|
|
35431
35431
|
const chainDuration = Math.round((lastRecordTime - startTimeMs) / 1e3);
|
|
35432
|
-
const
|
|
35433
|
-
const duration3 =
|
|
35434
|
-
const now =
|
|
35432
|
+
const mtimeMs = statSync(filePath).mtimeMs;
|
|
35433
|
+
const duration3 = chainDuration < 1 ? Math.max(0, Math.round((mtimeMs - startTimeMs) / 1e3)) : chainDuration;
|
|
35434
|
+
const now = chainDuration < 1 ? new Date(mtimeMs).toISOString() : lastRecord.timestamp;
|
|
35435
35435
|
const endRecord = buildChainRecord("session_end", sessionId, {
|
|
35436
35436
|
duration_seconds: duration3,
|
|
35437
35437
|
task_type: taskType,
|