fix: preserve prompt input across unmount/remount cycles (#22508)

This commit is contained in:
Dax
2026-04-17 04:23:30 +00:00
committed by GitHub
parent dfaae14544
commit 4bd5a158a5
9 changed files with 45 additions and 36 deletions
@@ -420,12 +420,8 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
aliases: ["clear"],
},
onSelect: () => {
const current = promptRef.current
// Don't require focus - if there's any text, preserve it
const currentPrompt = current?.current?.input ? current.current : undefined
route.navigate({
type: "home",
initialPrompt: currentPrompt,
})
dialog.clear()
},