From 8805dfc8496858bf090cabe12157db1b75d142b4 Mon Sep 17 00:00:00 2001 From: Ariane Emory Date: Tue, 10 Feb 2026 22:21:39 -0500 Subject: [PATCH] fix: deduplicate prompt history entries Avoid adding duplicate entries to prompt history when the same input is appended multiple times (e.g., clearing with ctrl+c then restoring via history navigation and clearing again). --- packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx index e90503e9f5..d7bf148614 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/history.tsx @@ -82,6 +82,7 @@ export const { use: usePromptHistory, provider: PromptHistoryProvider } = create return store.history.at(store.index) }, append(item: PromptInfo) { + if (store.history.at(-1)?.input === item.input) return const entry = clone(item) let trimmed = false setStore(