@threadbase-sh/streamer 1.70.2 → 1.70.3
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/cli.cjs +9 -16
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +9 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -16
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18515,23 +18515,16 @@ var StreamerServer = class {
|
|
|
18515
18515
|
* it.
|
|
18516
18516
|
*/
|
|
18517
18517
|
async resolveConversationTarget(sessionId) {
|
|
18518
|
-
|
|
18519
|
-
|
|
18520
|
-
|
|
18521
|
-
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
if (boundId != null && boundId !== sessionId) {
|
|
18526
|
-
historyId = boundId;
|
|
18527
|
-
registryProvider = row?.provider;
|
|
18528
|
-
jsonlPath = this.conversationHandlers.findJsonlPath(boundId);
|
|
18529
|
-
conv = await this.conversationHandlers.findConversationByUuid(boundId);
|
|
18530
|
-
}
|
|
18531
|
-
}
|
|
18518
|
+
const row = this.managedSessionsRepo?.get(sessionId) ?? null;
|
|
18519
|
+
const liveSession = this.sessionStore.getManaged(sessionId);
|
|
18520
|
+
const resumeId = (row ? resumeIdForRow(row) : null) ?? (liveSession?.provider === CODEX_CLI_PROVIDER ? liveSession.boundConversationId ?? null : null);
|
|
18521
|
+
const historyId = resumeId ?? sessionId;
|
|
18522
|
+
const managedProvider = row?.provider ?? liveSession?.provider;
|
|
18523
|
+
const jsonlPath = this.conversationHandlers.findJsonlPath(historyId);
|
|
18524
|
+
const conv = await this.conversationHandlers.findConversationByUuid(historyId);
|
|
18532
18525
|
const cachedConvMeta = this.cache?.getMetaById(historyId);
|
|
18533
18526
|
const cachedPath = cachedConvMeta?.filePath ? toNativeFilePath(cachedConvMeta.filePath) : null;
|
|
18534
|
-
const cachedCodexPath = (
|
|
18527
|
+
const cachedCodexPath = (managedProvider === CODEX_CLI_PROVIDER || cachedConvMeta?.provider === CODEX_CLI_PROVIDER) && cachedPath != null && existsSync16(cachedPath) ? cachedPath : null;
|
|
18535
18528
|
const jsonlCwd = jsonlPath ? await this.conversationHandlers.readCwdFromJsonl(jsonlPath) : null;
|
|
18536
18529
|
const projectPath = jsonlCwd ?? conv?.projectPath ?? (cachedCodexPath ? cachedConvMeta?.projectPath : null);
|
|
18537
18530
|
if (!projectPath) {
|
|
@@ -18541,7 +18534,7 @@ var StreamerServer = class {
|
|
|
18541
18534
|
return { ok: false, reason: "no_project_path" };
|
|
18542
18535
|
}
|
|
18543
18536
|
const provider = coerceProviderForRunner(
|
|
18544
|
-
conv?.provider ?? cachedConvMeta?.provider ??
|
|
18537
|
+
conv?.provider ?? cachedConvMeta?.provider ?? managedProvider
|
|
18545
18538
|
);
|
|
18546
18539
|
return {
|
|
18547
18540
|
ok: true,
|