mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 21:16:38 +00:00
fix: restore acp session meta narrowing
This commit is contained in:
@@ -824,7 +824,7 @@ export class AcpSessionManager {
|
|||||||
metaCleared: false,
|
metaCleared: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const meta = resolution.meta;
|
const meta = requireReadySessionMeta(resolution);
|
||||||
|
|
||||||
let runtimeClosed = false;
|
let runtimeClosed = false;
|
||||||
let runtimeNotice: string | undefined;
|
let runtimeNotice: string | undefined;
|
||||||
|
|||||||
@@ -32,11 +32,10 @@ export function resolveAcpSessionResolutionError(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function requireReadySessionMeta(resolution: AcpSessionResolution): SessionAcpMeta {
|
export function requireReadySessionMeta(resolution: AcpSessionResolution): SessionAcpMeta {
|
||||||
const error = resolveAcpSessionResolutionError(resolution);
|
if (resolution.kind === "ready") {
|
||||||
if (error) {
|
return resolution.meta;
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
return resolution.meta;
|
throw resolveAcpSessionResolutionError(resolution);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function normalizeSessionKey(sessionKey: string): string {
|
export function normalizeSessionKey(sessionKey: string): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user