chore: svelte5 bump

This commit is contained in:
Timothy Jaeryang Baek committed 2025-10-26 21:06:32 -07:00
1 parent 69e1ba8234
commit 20cd9e9461
9 files changed
+319 -433

No files matched your search

+8 -8
View File
@@ -1139,7 +1139,7 @@
});
}
};
const chatCompletedHandler = async (chatId, modelId, responseMessageId, messages) => {
const chatCompletedHandler = async (_chatId, modelId, responseMessageId, messages) => {
const res = await chatCompleted(localStorage.token, {
model: modelId,
messages: messages.map((m) => ({
@@ -1153,7 +1153,7 @@
})),
filter_ids: selectedFilterIds.length > 0 ? selectedFilterIds : undefined,
model_item: $models.find((m) => m.id === modelId),
chat_id: chatId,
chat_id: _chatId,
session_id: $socket?.id,
id: responseMessageId
}).catch((error) => {
@@ -1181,9 +1181,9 @@
await tick();
if ($chatId == chatId) {
if ($chatId == _chatId) {
if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, chatId, {
chat = await updateChatById(localStorage.token, _chatId, {
models: selectedModels,
messages: messages,
history: history,
@@ -1199,7 +1199,7 @@
taskIds = null;
};
const chatActionHandler = async (chatId, actionId, modelId, responseMessageId, event = null) => {
const chatActionHandler = async (_chatId, actionId, modelId, responseMessageId, event = null) => {
const messages = createMessagesList(history, responseMessageId);
const res = await chatAction(localStorage.token, actionId, {
@@ -1214,7 +1214,7 @@
})),
...(event ? { event: event } : {}),
model_item: $models.find((m) => m.id === modelId),
chat_id: chatId,
chat_id: _chatId,
session_id: $socket?.id,
id: responseMessageId
}).catch((error) => {
@@ -1236,9 +1236,9 @@
}
}
if ($chatId == chatId) {
if ($chatId == _chatId) {
if (!$temporaryChatEnabled) {
chat = await updateChatById(localStorage.token, chatId, {
chat = await updateChatById(localStorage.token, _chatId, {
models: selectedModels,
messages: messages,
history: history,
@@ -79,7 +79,12 @@
title="Embedded content"
frameborder="0"
sandbox
onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"
on:load={(e) => {
try {
e.currentTarget.style.height =
e.currentTarget.contentWindow.document.body.scrollHeight + 20 + 'px';
} catch {}
}}
></iframe>
{:else}
{token.text}
@@ -116,7 +121,12 @@
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
width="100%"
onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"
on:load={(e) => {
try {
e.currentTarget.style.height =
e.currentTarget.contentWindow.document.body.scrollHeight + 20 + 'px';
} catch {}
}}
></iframe>
{/if}
{:else if token.text.includes(`<source_id`)}
@@ -59,7 +59,12 @@
title={token.fileId}
width="100%"
frameborder="0"
onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"
on:load={(e) => {
try {
e.currentTarget.style.height =
e.currentTarget.contentWindow.document.body.scrollHeight + 20 + 'px';
} catch {}
}}
></iframe>
{:else if token.type === 'mention'}
<MentionToken {token} />
@@ -321,7 +321,12 @@
title={token.fileId}
width="100%"
frameborder="0"
onload="this.style.height=(this.contentWindow.document.body.scrollHeight+20)+'px';"
on:load={(e) => {
try {
e.currentTarget.style.height =
e.currentTarget.contentWindow.document.body.scrollHeight + 20 + 'px';
} catch {}
}}
></iframe>
{:else if token.type === 'paragraph'}
<p dir="auto">