oasis_test 0.1.38 → 0.1.40
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 +7 -4
- 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 } : {},
|
|
@@ -55438,10 +55440,11 @@ async function startServe(opts) {
|
|
|
55438
55440
|
}
|
|
55439
55441
|
}
|
|
55440
55442
|
}
|
|
55443
|
+
const sessionLine = chatSessionId ? `chat_session_id: ${chatSessionId}` : `runtime_session_id: ${runtimeSessionId}`;
|
|
55441
55444
|
const taskHeader = workspace ? [
|
|
55442
55445
|
"# \u4E0E\u5DE5\u5355\u7BA1\u7406\u8005\u5BF9\u8BDD",
|
|
55443
55446
|
"",
|
|
55444
|
-
|
|
55447
|
+
sessionLine,
|
|
55445
55448
|
`actor_id: ${actorId}`,
|
|
55446
55449
|
`workspace: ${workspace}`,
|
|
55447
55450
|
"",
|
|
@@ -55449,7 +55452,7 @@ async function startServe(opts) {
|
|
|
55449
55452
|
] : [
|
|
55450
55453
|
"# \u5373\u65F6\u8111\u66B4\u5BF9\u8BDD",
|
|
55451
55454
|
"",
|
|
55452
|
-
|
|
55455
|
+
sessionLine,
|
|
55453
55456
|
`actor_id: ${actorId}`,
|
|
55454
55457
|
"",
|
|
55455
55458
|
"\u8BF7\u76F4\u63A5\u56DE\u7B54\u7528\u6237\u95EE\u9898\u3002\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u5199\u5165\u7CFB\u7EDF\uFF0C\u5426\u5219\u4E0D\u8981\u521B\u5EFA\u6216\u4FEE\u6539 artifact\u3002"
|
|
@@ -58119,7 +58122,7 @@ ${res.warning}`);
|
|
|
58119
58122
|
}
|
|
58120
58123
|
|
|
58121
58124
|
// src/index.ts
|
|
58122
|
-
var PKG_VERSION = true ? "0.1.
|
|
58125
|
+
var PKG_VERSION = true ? "0.1.40" : "dev";
|
|
58123
58126
|
var OASIS_DIR = path18.join(os10.homedir(), ".oasis");
|
|
58124
58127
|
var CONFIG_FILE = path18.join(OASIS_DIR, "node-config.json");
|
|
58125
58128
|
var PID_FILE = path18.join(OASIS_DIR, "node.pid");
|