@ganglion/xacpx 0.14.1 → 0.15.1
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.js +11 -11
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -22389,6 +22389,9 @@ async function handleSessionArchive(context, chatKey, alias, archive) {
|
|
|
22389
22389
|
async function promptWithSession(context, session3, chatKey, text, reply, replyContextToken, accountId, media, abortSignal, onToolEvent, onThought, perfSpan, metadata, onPlan, onUsage, onCommands) {
|
|
22390
22390
|
if (session3.archived) {
|
|
22391
22391
|
await context.sessions.setArchived(session3.alias, false);
|
|
22392
|
+
if (!await context.lifecycle.checkTransportSession(session3)) {
|
|
22393
|
+
await context.lifecycle.ensureTransportSession(session3, reply, perfSpan);
|
|
22394
|
+
}
|
|
22392
22395
|
}
|
|
22393
22396
|
const effectiveReplyMode = resolveEffectiveReplyMode(context.config, chatKey, session3.replyMode);
|
|
22394
22397
|
if (!session3.replyMode)
|
|
@@ -25032,17 +25035,6 @@ class CommandRouter {
|
|
|
25032
25035
|
try {
|
|
25033
25036
|
await this.transport.cancel(session3);
|
|
25034
25037
|
} catch {}
|
|
25035
|
-
if (this.transport.removeSession) {
|
|
25036
|
-
try {
|
|
25037
|
-
await this.transport.removeSession(session3);
|
|
25038
|
-
} catch (error2) {
|
|
25039
|
-
await this.logger.error("session.archive_close_failed", "failed to close acpx session on archive", {
|
|
25040
|
-
alias: internalAlias,
|
|
25041
|
-
transportSession: session3.transportSession,
|
|
25042
|
-
message: error2 instanceof Error ? error2.message : String(error2)
|
|
25043
|
-
});
|
|
25044
|
-
}
|
|
25045
|
-
}
|
|
25046
25038
|
}
|
|
25047
25039
|
await this.sessions.setArchived(internalAlias, true);
|
|
25048
25040
|
}
|
|
@@ -33835,6 +33827,11 @@ class ControlService {
|
|
|
33835
33827
|
resolveSettled = resolve4;
|
|
33836
33828
|
});
|
|
33837
33829
|
this.inFlight.set(key, { controller, settled });
|
|
33830
|
+
let wasArchived = false;
|
|
33831
|
+
try {
|
|
33832
|
+
const internalAlias = await this.deps.sessions.resolveAliasForChat(params.chatKey, params.sessionAlias);
|
|
33833
|
+
wasArchived = (await this.deps.sessions.getSession(internalAlias))?.archived === true;
|
|
33834
|
+
} catch {}
|
|
33838
33835
|
try {
|
|
33839
33836
|
await this.deps.sessions.useSession(params.chatKey, params.sessionAlias);
|
|
33840
33837
|
} catch (error2) {
|
|
@@ -33842,6 +33839,9 @@ class ControlService {
|
|
|
33842
33839
|
resolveSettled();
|
|
33843
33840
|
return { ok: false, errorMessage: toErrorMessage(error2) };
|
|
33844
33841
|
}
|
|
33842
|
+
if (wasArchived) {
|
|
33843
|
+
this.deps.events.emit({ type: "sessions-changed" });
|
|
33844
|
+
}
|
|
33845
33845
|
this.deps.events.emit({
|
|
33846
33846
|
type: "turn-started",
|
|
33847
33847
|
chatKey: params.chatKey,
|