From b8ee363cb186aa0f073145b34f027000c87e9051 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Thu, 20 Nov 2025 16:13:44 -0500 Subject: [PATCH] refactor: rename persistence methods from `persist`/`restore` to `save`/`load` --- packages/sds/src/message_channel/persistent_history.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sds/src/message_channel/persistent_history.ts b/packages/sds/src/message_channel/persistent_history.ts index 3b198d9edb..2f8979a623 100644 --- a/packages/sds/src/message_channel/persistent_history.ts +++ b/packages/sds/src/message_channel/persistent_history.ts @@ -47,7 +47,7 @@ export class PersistentHistory implements ILocalHistory { this.memory = new MemLocalHistory(); this.storage = options.storage ?? getDefaultHistoryStorage(); this.storageKey = `${HISTORY_STORAGE_PREFIX}${options.storageKeyPrefix}:${options.channelId}`; - this.restore(); + this.load(); } public get length(): number { @@ -56,7 +56,7 @@ export class PersistentHistory implements ILocalHistory { public push(...items: ContentMessage[]): number { const length = this.memory.push(...items); - this.persist(); + this.save(); return length; } @@ -97,7 +97,7 @@ export class PersistentHistory implements ILocalHistory { return this.memory.findIndex(predicate, thisArg); } - private persist(): void { + private save(): void { if (!this.storage) { return; } @@ -111,7 +111,7 @@ export class PersistentHistory implements ILocalHistory { } } - private restore(): void { + private load(): void { if (!this.storage) { return; }