Allow message retries for "pending" status, refactor message context handling, remove workspace import/export routes, and add SQLite-backed rate limiting.
CI / check (22) (push) Failing after 16m26s
CI / check (24) (push) Failing after 15m49s
CI / check (22) (pull_request) Failing after 16m26s
CI / check (24) (pull_request) Failing after 15m50s

This commit is contained in:
2026-10-09 19:28:43 +02:00
parent 8666e09049
commit f67d918d09
13 changed files with 313 additions and 193 deletions
+5 -2
View File
@@ -77,7 +77,8 @@ export function createComposerController({
const visible = () => state.activeChatId === chatId;
let userCard, loadingMsg, rendering, completedReply = null;
let completedThinking = "", completedSources = null;
const userMessage = {role: "user", content: message, attachments};
const userMessage = {role: "user", content: message, attachments,
...(retryMessage?.id ? {id: retryMessage.id, deliveryStatus: retryMessage.deliveryStatus, errorMessage: retryMessage.errorMessage} : {})};
if (!retryMessage) {
msgInput.value = "";
state.chatDrafts.set(chatId ?? "new", "");
@@ -135,7 +136,9 @@ export function createComposerController({
if (loadingBody) setMessageContent(loadingBody, text);
})
});
await api.stream("/chat/stream", {message, attachments: attachments.map(item => item.id), model, chatId, webSearch, reasoning}, {
await api.stream("/chat/stream", {message, attachments: attachments.map(item => item.id), model, chatId,
...(retryMessage?.id && ["failed", "pending"].includes(retryMessage.deliveryStatus) ? {userMessageId: retryMessage.id} : {}),
webSearch, reasoning}, {
...rendering,
onStatus: ({status, sourceCount, searchState}) => {
if (status === "accepted" || !visible() || !loadingLabel) return;