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:
@@ -56,14 +56,14 @@ export function createConversationController({
|
||||
}
|
||||
try {
|
||||
const historyUrl = `/chats/${id}/messages${matchMessageId ? `?around=${matchMessageId}` : ""}`;
|
||||
let res = await get(historyUrl);
|
||||
let res = await get(historyUrl, {retries: 0});
|
||||
if (openRequest !== state.chatOpenRequest) return;
|
||||
if (res.error) return failed(res);
|
||||
if (matchMessageId && !res.messages?.some(message => message.id === matchMessageId)) {
|
||||
const activated = await post(`/chats/${id}/branches/${matchMessageId}/activate`, {includeDescendants: true});
|
||||
if (openRequest !== state.chatOpenRequest) return;
|
||||
if (activated.error) return failed(activated);
|
||||
res = await get(historyUrl);
|
||||
res = await get(historyUrl, {retries: 0});
|
||||
if (openRequest !== state.chatOpenRequest) return;
|
||||
if (res.error) return failed(res);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ export function createConversationController({
|
||||
state.historyLoading = true;
|
||||
updateHistoryControls();
|
||||
try {
|
||||
const result = await get(`/chats/${chatId}/messages?before=${page.before}&leaf=${page.leafId}`);
|
||||
const result = await get(`/chats/${chatId}/messages?before=${page.before}&leaf=${page.leafId}`, {retries: 0});
|
||||
if (chatId !== state.activeChatId || requestId !== state.chatOpenRequest) return;
|
||||
if (result.error) { setNotice(result.error, "error"); return result; }
|
||||
const oldHeight = messagesDiv.scrollHeight, oldTop = messagesDiv.scrollTop;
|
||||
|
||||
Reference in New Issue
Block a user