Handle revert removals locally and retarget prompt input

This commit is contained in:
Shantur Rathore
2025-12-25 15:12:44 +00:00
parent 94aa469e90
commit 2603b1d260
7 changed files with 158 additions and 22 deletions

View File

@@ -45,11 +45,15 @@ export function useAppLifecycle(options: UseAppLifecycleOptions) {
registerNavigationShortcuts()
registerInputShortcuts(
() => {
const textarea = document.querySelector(".prompt-input") as HTMLTextAreaElement
const textarea = document.querySelector(
".session-cache-pane[aria-hidden=\"false\"] .prompt-input",
) as HTMLTextAreaElement
if (textarea) textarea.value = ""
},
() => {
const textarea = document.querySelector(".prompt-input") as HTMLTextAreaElement
const textarea = document.querySelector(
".session-cache-pane[aria-hidden=\"false\"] .prompt-input",
) as HTMLTextAreaElement
textarea?.focus()
},
)