fix(tui): Show correct keybind in session delete confirmation message (#3805)

This commit is contained in:
Haris Gušić
2025-11-03 15:22:05 +01:00
committed by GitHub
parent 0f7ff3fcb1
commit 573ffe186b

View File

@@ -18,6 +18,8 @@ export function DialogSessionList() {
const [toDelete, setToDelete] = createSignal<string>()
const deleteKeybind = "ctrl+d"
const options = createMemo(() => {
const today = new Date().toDateString()
return sync.data.session
@@ -30,7 +32,7 @@ export function DialogSessionList() {
}
const isDeleting = toDelete() === x.id
return {
title: isDeleting ? "Press delete again to confirm" : x.title,
title: isDeleting ? `Press ${deleteKeybind} again to confirm` : x.title,
bg: isDeleting ? theme.error : undefined,
value: x.id,
category,
@@ -60,7 +62,7 @@ export function DialogSessionList() {
}}
keybind={[
{
keybind: Keybind.parse("ctrl+d")[0],
keybind: Keybind.parse(deleteKeybind)[0],
title: "delete",
onTrigger: async (option) => {
if (toDelete() === option.value) {