mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 11:23:31 +02:00
style: fix acpx runtime lint types
This commit is contained in:
@@ -12,11 +12,18 @@ import {
|
||||
type AcpRuntimeHandle,
|
||||
type AcpRuntimeOptions,
|
||||
type AcpRuntimeStatus,
|
||||
type AcpSessionRecord,
|
||||
type AcpSessionStore,
|
||||
} from "acpx/runtime";
|
||||
import type { AcpRuntime } from "../runtime-api.js";
|
||||
|
||||
type AcpSessionRecord = Record<string, unknown> & {
|
||||
name?: string;
|
||||
};
|
||||
|
||||
type AcpSessionStore = {
|
||||
load(sessionId: string): Promise<AcpSessionRecord | undefined>;
|
||||
save(record: AcpSessionRecord): Promise<void>;
|
||||
};
|
||||
|
||||
type ResetAwareSessionStore = AcpSessionStore & {
|
||||
markFresh: (sessionKey: string) => void;
|
||||
};
|
||||
@@ -34,7 +41,7 @@ function createResetAwareSessionStore(baseStore: AcpSessionStore): ResetAwareSes
|
||||
},
|
||||
async save(record: AcpSessionRecord): Promise<void> {
|
||||
await baseStore.save(record);
|
||||
const sessionName = record.name.trim();
|
||||
const sessionName = typeof record.name === "string" ? record.name.trim() : "";
|
||||
if (sessionName) {
|
||||
freshSessionKeys.delete(sessionName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user