chore: svelte5 bump

This commit is contained in:
Timothy Jaeryang Baek
2025-10-26 21:06:32 -07:00
parent 69e1ba8234
commit 20cd9e9461
9 changed files with 319 additions and 433 deletions
+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">
@@ -78,7 +78,7 @@
</a>
{#if $user?.role === 'admin'}
<button
<div
class="absolute z-10 right-2 invisible group-hover:visible self-center flex items-center dark:text-gray-300"
on:click={(e) => {
e.stopPropagation();
@@ -88,6 +88,6 @@
<button class="p-0.5 dark:hover:bg-gray-850 rounded-lg touch-auto" on:click={(e) => {}}>
<Cog6 className="size-3.5" />
</button>
</button>
</div>
{/if}
</div>
@@ -470,7 +470,7 @@
>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="w-full group">
<button
<div
id="folder-{folderId}-button"
class="relative w-full py-1 px-1.5 rounded-xl flex items-center gap-1.5 hover:bg-gray-100 dark:hover:bg-gray-900 transition {$selectedFolder?.id ===
folderId
@@ -595,7 +595,7 @@
</div>
</FolderMenu>
</button>
</button>
</div>
</div>
<div slot="content" class="w-full">
+2 -2
View File
@@ -411,7 +411,7 @@
{#if (filteredModels ?? []).length !== 0}
<div class=" px-3 my-2 gap-1 lg:gap-2 grid lg:grid-cols-2" id="model-list">
{#each filteredModels as model (model.id)}
<button
<div
class=" flex cursor-pointer dark:hover:bg-gray-850/50 hover:bg-gray-50 transition rounded-2xl w-full p-2.5"
id="model-item-{model.id}"
on:click={() => {
@@ -593,7 +593,7 @@
</div>
</div>
</div>
</button>
</div>
{/each}
</div>
{:else}