Enhance upload handling: add db-backed upload rate limiting and lease management, enforce stricter validation for deployment configurations, optimize test suite and retired functionality, and improve input handling and error recovery.
This commit is contained in:
@@ -179,7 +179,10 @@ export function createComposerController({
|
||||
else state.chatDrafts.delete(chatId);
|
||||
const currentAttachments = attachmentComposer.attachments;
|
||||
if (currentAttachments.length === attachments.length && currentAttachments.every((item, index) => item.id === attachments[index].id)) attachmentComposer.clear();
|
||||
} else clearSentDraft();
|
||||
} else {
|
||||
state.chatDrafts.delete(chatId);
|
||||
clearSentDraft();
|
||||
}
|
||||
if (!followOutput && visible()) requestAnimationFrame(() => {
|
||||
if (visible()) messagesDiv.scrollTop = previousScrollTop;
|
||||
});
|
||||
@@ -194,8 +197,18 @@ export function createComposerController({
|
||||
const messageText = signal.aborted ? "Generation stopped." : error?.message || "Unable to send message.";
|
||||
if (visible() && completedReply === null) announceResponseStatus(messageText);
|
||||
if (completedReply !== null) {
|
||||
if (visible() && !msgInput.value.trim()) {
|
||||
msgInput.value = message;
|
||||
state.chatDrafts.set(chatId ?? "new", message);
|
||||
resizeComposerInput();
|
||||
}
|
||||
setNotice(`Reply sent, but the conversation could not be refreshed: ${messageText}`, "error");
|
||||
} else {
|
||||
if (signal.aborted && chatId == null && !msgInput.value.trim()) {
|
||||
msgInput.value = message;
|
||||
state.chatDrafts.set("new", message);
|
||||
resizeComposerInput();
|
||||
}
|
||||
if (visible()) {
|
||||
if (!msgInput.value.trim()) {
|
||||
msgInput.value = message;
|
||||
|
||||
Reference in New Issue
Block a user