@devness/useai 0.5.28 → 0.5.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 +8 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2681,7 +2681,7 @@ var VERSION;
|
|
|
2681
2681
|
var init_version = __esm({
|
|
2682
2682
|
"../shared/dist/constants/version.js"() {
|
|
2683
2683
|
"use strict";
|
|
2684
|
-
VERSION = "0.5.
|
|
2684
|
+
VERSION = "0.5.29";
|
|
2685
2685
|
}
|
|
2686
2686
|
});
|
|
2687
2687
|
|
|
@@ -37453,23 +37453,19 @@ function readChainMetadata(useaiSessionId) {
|
|
|
37453
37453
|
function recoverStartSession(staleMcpSessionId, args, rpcId, res) {
|
|
37454
37454
|
const map = readMcpMap();
|
|
37455
37455
|
const prevSessionId = map[staleMcpSessionId];
|
|
37456
|
-
if (prevSessionId)
|
|
37457
|
-
|
|
37458
|
-
|
|
37459
|
-
|
|
37460
|
-
}
|
|
37461
|
-
}
|
|
37462
|
-
let client = "unknown";
|
|
37463
|
-
if (prevSessionId) {
|
|
37464
|
-
const meta = readChainMetadata(prevSessionId);
|
|
37465
|
-
if (meta) client = meta.client;
|
|
37456
|
+
if (!prevSessionId) return false;
|
|
37457
|
+
const prevActivePath = join10(ACTIVE_DIR, `${prevSessionId}.jsonl`);
|
|
37458
|
+
if (existsSync11(prevActivePath)) {
|
|
37459
|
+
sealOrphanFile(prevSessionId);
|
|
37466
37460
|
}
|
|
37461
|
+
const meta = readChainMetadata(prevSessionId);
|
|
37462
|
+
const client = meta?.client ?? "unknown";
|
|
37467
37463
|
const newSessionId = randomUUID4();
|
|
37468
37464
|
const taskType = args["task_type"] ?? "coding";
|
|
37469
37465
|
const title = args["title"];
|
|
37470
37466
|
const privateTitle = args["private_title"];
|
|
37471
37467
|
const project = args["project"];
|
|
37472
|
-
const convId =
|
|
37468
|
+
const convId = meta?.convId ?? randomUUID4();
|
|
37473
37469
|
const chainData = {
|
|
37474
37470
|
client,
|
|
37475
37471
|
task_type: taskType,
|