Skip to content

Commit 573ffe1

Browse files
authored
fix(tui): Show correct keybind in session delete confirmation message (anomalyco#3805)
1 parent 0f7ff3f commit 573ffe1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export function DialogSessionList() {
1818

1919
const [toDelete, setToDelete] = createSignal<string>()
2020

21+
const deleteKeybind = "ctrl+d"
22+
2123
const options = createMemo(() => {
2224
const today = new Date().toDateString()
2325
return sync.data.session
@@ -30,7 +32,7 @@ export function DialogSessionList() {
3032
}
3133
const isDeleting = toDelete() === x.id
3234
return {
33-
title: isDeleting ? "Press delete again to confirm" : x.title,
35+
title: isDeleting ? `Press ${deleteKeybind} again to confirm` : x.title,
3436
bg: isDeleting ? theme.error : undefined,
3537
value: x.id,
3638
category,
@@ -60,7 +62,7 @@ export function DialogSessionList() {
6062
}}
6163
keybind={[
6264
{
63-
keybind: Keybind.parse("ctrl+d")[0],
65+
keybind: Keybind.parse(deleteKeybind)[0],
6466
title: "delete",
6567
onTrigger: async (option) => {
6668
if (toDelete() === option.value) {

0 commit comments

Comments
 (0)