fix(tui): restore prompt from undo autocomplete

This commit is contained in:
Aiden Cline 2026-07-05 23:38:43 -05:00
commit 4bd1ecb232
3 changed files with 7 additions and 6 deletions

View file

@ -43,6 +43,10 @@ describe("reverted prompt", () => {
})
})
test.each(["/", "/u", "/un", "/und", "/undo", " /undo "])("replaces the undo autocomplete query %p", (input) => {
expect(revertedPrompt({ input, parts: [] }, message)?.input).toBe("Fix the tests")
})
test("preserves an existing text draft", () => {
expect(revertedPrompt({ input: "Keep this", parts: [] }, message)).toBeUndefined()
})