This commit is contained in:
Classic298 2026-11-01 12:25:44 +08:00 • committed by GitHub
commit 478119c3ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2766,7 +2766,8 @@
autoScroll = true;
// resetInput() must stay last: the selected model's defaults override the draft's selection.
await restoreChatInput(sessionStorage.getItem('chat-input'));
const restored = await restoreChatInput(sessionStorage.getItem('chat-input'));
const draftPrompt = prompt;
const previousChatId = $chatId;
const previousMessageId = history.currentId;
await resetInput();
@ -2838,6 +2839,8 @@
loading = false;
await tick();
// the input mounts empty once loading ends
if (restored) messageInput?.setText(draftPrompt);
if (modelSearch) await openModelSelectorWithSearch(modelSearch);
// Consume one-shot desktop event (e.g. Spotlight query, call shortcut)