Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
738d6c8
feat: save prompt to history when cleared with Ctrl+C
ariane-emory Feb 2, 2026
2c6ff35
feat: add toggle to control whether cleared prompts are saved to history
ariane-emory Feb 2, 2026
39332f5
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 2, 2026
ded6bb6
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 3, 2026
f762125
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 3, 2026
eaba997
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 5, 2026
4f96975
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 5, 2026
0c154e6
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 6, 2026
d5dcadc
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 7, 2026
b8031c5
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 10, 2026
eaf94ed
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 10, 2026
ac5a5d8
Merge branch 'feat/canceled-prompts-in-history' of github.com:ariane-…
ariane-emory Feb 10, 2026
8805dfc
fix: deduplicate prompt history entries
ariane-emory Feb 11, 2026
3f37b43
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 11, 2026
7fb6b58
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 12, 2026
5cc0901
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 13, 2026
377812b
Merge dev into feat/canceled-prompts-in-history
ariane-emory Feb 14, 2026
459b22b
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 15, 2026
5ba2d7e
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 15, 2026
b7b016f
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 17, 2026
b70629a
Merge branch 'dev' into feat/canceled-prompts-in-history
ariane-emory Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/opencode/src/cli/cmd/tui/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,15 @@ function App() {
dialog.clear()
},
},
{
title: kv.get("clear_prompt_save_history", false) ? "Don't include cleared prompts in history" : "Include cleared prompts in history",
value: "app.toggle.clear_prompt_history",
category: "System",
onSelect: (dialog) => {
kv.set("clear_prompt_save_history", !kv.get("clear_prompt_save_history", false))
dialog.clear()
},
},
])

createEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,12 @@ export function Prompt(props: PromptProps) {
// If no image, let the default paste behavior continue
}
if (keybind.match("input_clear", e) && store.prompt.input !== "") {
if (kv.get("clear_prompt_save_history", false)) {
history.append({
...store.prompt,
mode: store.mode,
})
}
input.clear()
input.extmarks.clear()
setStore("prompt", {
Expand Down
Loading