oasis_test 0.1.38 → 0.1.39
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 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25136,10 +25136,12 @@ async function startOasisServer(opts) {
|
|
|
25136
25136
|
if (!body.actorId) {
|
|
25137
25137
|
throw new ApiError(400, "CHAT_ACTOR_REQUIRED", "\u8111\u66B4\u5BF9\u8BDD\u5FC5\u987B\u9009\u62E9\u4E00\u4E2A\u6570\u5B57\u5458\u5DE5");
|
|
25138
25138
|
}
|
|
25139
|
+
const inheritedRuntimeSessionId = !body.sessionId && body.chatSessionId && opts.chatSession ? await opts.chatSession.getSession(body.chatSessionId).catch(() => null).then((s2) => s2 && s2.humanActorId === actor ? s2.runtimeSessionId ?? void 0 : void 0) : void 0;
|
|
25140
|
+
const effectiveSessionId = body.sessionId ?? inheritedRuntimeSessionId;
|
|
25139
25141
|
const session = await opts.dispatchChat({
|
|
25140
25142
|
actorId: body.actorId,
|
|
25141
25143
|
message: body.message,
|
|
25142
|
-
...
|
|
25144
|
+
...effectiveSessionId ? { sessionId: effectiveSessionId } : {},
|
|
25143
25145
|
...body.chatSessionId ? { chatSessionId: body.chatSessionId } : {},
|
|
25144
25146
|
...body.workspace ? { workspace: body.workspace } : {},
|
|
25145
25147
|
...currentCompanyId !== void 0 ? { companyId: currentCompanyId } : {},
|
|
@@ -58119,7 +58121,7 @@ ${res.warning}`);
|
|
|
58119
58121
|
}
|
|
58120
58122
|
|
|
58121
58123
|
// src/index.ts
|
|
58122
|
-
var PKG_VERSION = true ? "0.1.
|
|
58124
|
+
var PKG_VERSION = true ? "0.1.39" : "dev";
|
|
58123
58125
|
var OASIS_DIR = path18.join(os10.homedir(), ".oasis");
|
|
58124
58126
|
var CONFIG_FILE = path18.join(OASIS_DIR, "node-config.json");
|
|
58125
58127
|
var PID_FILE = path18.join(OASIS_DIR, "node.pid");
|