From 032c3f5faf574caa403fb92130dc0b8d7f0b19bc Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Thu, 20 Nov 2025 16:12:39 -0500 Subject: [PATCH] refactor: rename `storageKey` to `storageKeyPrefix` and update storage key generation. --- packages/sds/src/message_channel/persistent_history.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/sds/src/message_channel/persistent_history.ts b/packages/sds/src/message_channel/persistent_history.ts index 1a578554b2..3b198d9edb 100644 --- a/packages/sds/src/message_channel/persistent_history.ts +++ b/packages/sds/src/message_channel/persistent_history.ts @@ -12,7 +12,7 @@ export interface HistoryStorage { export interface PersistentHistoryOptions { channelId: ChannelId; storage?: HistoryStorage; - storageKey?: string; + storageKeyPrefix?: string; } type StoredHistoryEntry = { @@ -46,8 +46,7 @@ export class PersistentHistory implements ILocalHistory { public constructor(options: PersistentHistoryOptions) { this.memory = new MemLocalHistory(); this.storage = options.storage ?? getDefaultHistoryStorage(); - this.storageKey = - options.storageKey ?? `${HISTORY_STORAGE_PREFIX}${options.channelId}`; + this.storageKey = `${HISTORY_STORAGE_PREFIX}${options.storageKeyPrefix}:${options.channelId}`; this.restore(); }