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