feat: add 409 retry, error improvements, and queue restoration (#618)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-21 14:57:48 -08:00
committed by GitHub
parent 802136c868
commit 6a0bcdd683
5 changed files with 281 additions and 36 deletions

View File

@@ -140,6 +140,8 @@ export function Input({
onRalphExit,
conversationId,
onPasteError,
restoredInput,
onRestoredInputConsumed,
}: {
visible?: boolean;
streaming: boolean;
@@ -165,6 +167,8 @@ export function Input({
onRalphExit?: () => void;
conversationId?: string;
onPasteError?: (message: string) => void;
restoredInput?: string | null;
onRestoredInputConsumed?: () => void;
}) {
const [value, setValue] = useState("");
const [escapePressed, setEscapePressed] = useState(false);
@@ -191,6 +195,17 @@ export function Input({
// Bash mode state
const [isBashMode, setIsBashMode] = useState(false);
// Restore input from error (only if current value is empty)
useEffect(() => {
if (restoredInput && value === "") {
setValue(restoredInput);
onRestoredInputConsumed?.();
} else if (restoredInput && value !== "") {
// Input has content, don't clobber - just consume the restored value
onRestoredInputConsumed?.();
}
}, [restoredInput, value, onRestoredInputConsumed]);
const handleBangAtEmpty = () => {
if (isBashMode) return false;
setIsBashMode(true);