diff --git a/apps/desktop/src/components/redis/RedisKeyBrowser.vue b/apps/desktop/src/components/redis/RedisKeyBrowser.vue index dcfdc39776..f7995f7032 100644 --- a/apps/desktop/src/components/redis/RedisKeyBrowser.vue +++ b/apps/desktop/src/components/redis/RedisKeyBrowser.vue @@ -816,38 +816,13 @@ function resumeRedisBrowserBackgroundWork() { registerRedisDbFlushedListener(); } -async function loadPersistedRedisHistory() { - try { - const entries = await api.loadRedisHistory(200, 0); - if (entries.length === 0) return; - // Merge persisted entries into in-memory commandHistory (newest first, reversed for display order) - const persisted: RedisCommandHistoryEntry[] = entries.reverse().map((entry) => ({ - id: ++commandHistoryId, - prompt: `db${entry.database}>`, - command: entry.sql, - output: entry.details_json ? formatRedisCommandResult(JSON.parse(entry.details_json)) : entry.error || "", - error: !entry.success, - })); - commandHistory.value = [...persisted, ...commandHistory.value]; - scrollCommandTerminalToEnd(); - } catch { - // Silently ignore load errors — history is best-effort - } -} - -async function clearPersistedRedisHistory() { - try { - await api.clearRedisHistory(); - toast(t("redis.historyCleared")); - } catch { - // Silently ignore - } +async function clearInMemoryHistory() { + commandHistory.value = []; } onMounted(() => { resumeRedisBrowserBackgroundWork(); void loadKeys(); - void loadPersistedRedisHistory(); }); onActivated(resumeRedisBrowserBackgroundWork); @@ -976,7 +951,7 @@ defineExpose({ focusSearch }); {{ t("redis.pubsub") }} -