ework-daemon 0.4.59 → 0.4.60
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/package.json +1 -1
- package/src/opencode.ts +4 -1
package/package.json
CHANGED
package/src/opencode.ts
CHANGED
|
@@ -393,13 +393,16 @@ export class Engine {
|
|
|
393
393
|
// An existing session must keep the backend that owns it: opencode session
|
|
394
394
|
// ids are "ses_..." while pi ids are bare uuids, so the prefix outvotes the
|
|
395
395
|
// per-issue override. New sessions follow the issue's runtime setting.
|
|
396
|
+
// k is the session key "tracker:scope#issue@sessionName"; the runtime map is
|
|
397
|
+
// keyed by the issue part, so strip the "@sessionName" suffix.
|
|
396
398
|
private backendFor(k: string, opencodeSessionId?: string): RuntimeBackend {
|
|
399
|
+
const issueKey = k.slice(0, k.lastIndexOf("@"));
|
|
397
400
|
if (opencodeSessionId) {
|
|
398
401
|
const wants = opencodeSessionId.startsWith("ses_") ? "opencode" : "pi";
|
|
399
402
|
if (wants !== this.cfg.runtime) return this.altBackendFor(wants);
|
|
400
403
|
return this.backend;
|
|
401
404
|
}
|
|
402
|
-
const runtime = this.issueRuntimes.get(
|
|
405
|
+
const runtime = this.issueRuntimes.get(issueKey);
|
|
403
406
|
if (!runtime || runtime === this.cfg.runtime) return this.backend;
|
|
404
407
|
return this.altBackendFor(runtime);
|
|
405
408
|
}
|