Skip to content

Commit

Permalink
Major bump to sveltekit & node-adapter versions (#1395)
Browse files Browse the repository at this point in the history
* version bump

* sveltekit2 bump

* formatting

* fix imports

* fix deps

* minor bump on chat-ui itself

* better error logging

* bump svelte-check version
  • Loading branch information
nsarrazin authored Aug 7, 2024
1 parent 28351df commit cc5be1a
Show file tree
Hide file tree
Showing 47 changed files with 5,179 additions and 3,103 deletions.
8,039 changes: 5,054 additions & 2,985 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chat-ui",
"version": "0.9.1",
"version": "0.9.2",
"private": true,
"packageManager": "npm@9.5.0",
"scripts": {
Expand All @@ -20,14 +20,15 @@
"@faker-js/faker": "^8.4.1",
"@iconify-json/carbon": "^1.1.16",
"@iconify-json/eos-icons": "^1.1.6",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.30.4",
"@sveltejs/adapter-node": "^5.2.0",
"@sveltejs/kit": "^2.5.20",
"@tailwindcss/typography": "^0.5.9",
"@types/dompurify": "^3.0.5",
"@types/express": "^4.17.21",
"@types/js-yaml": "^4.0.9",
"@types/jsdom": "^21.1.1",
"@types/minimist": "^1.2.5",
"@types/node": "^22.1.0",
"@types/parquetjs": "^0.10.3",
"@types/sbd": "^1.0.5",
"@types/uuid": "^9.0.8",
Expand All @@ -44,13 +45,13 @@
"prettier-plugin-svelte": "^2.10.1",
"prettier-plugin-tailwindcss": "^0.2.7",
"prom-client": "^15.1.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte": "^4.2.18",
"svelte-check": "^3.8.5",
"ts-node": "^10.9.1",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"unplugin-icons": "^0.16.1",
"vite": "^4.5.3",
"vite": "^5.3.5",
"vite-node": "^1.3.1",
"vitest": "^0.31.0"
},
Expand All @@ -72,6 +73,7 @@
"dotenv": "^16.0.3",
"express": "^4.19.2",
"file-type": "^19.0.0",
"google-auth-library": "^9.13.0",
"handlebars": "^4.7.8",
"highlight.js": "^11.7.0",
"husky": "^9.0.11",
Expand Down Expand Up @@ -99,12 +101,12 @@
"sharp": "^0.33.4",
"tailwind-scrollbar": "^3.0.0",
"tailwindcss": "^3.4.0",
"uuid": "^9.0.1",
"uuid": "^10.0.0",
"zod": "^3.22.3"
},
"optionalDependencies": {
"@anthropic-ai/sdk": "^0.17.1",
"@anthropic-ai/vertex-sdk": "^0.3.0",
"@anthropic-ai/sdk": "^0.25.0",
"@anthropic-ai/vertex-sdk": "^0.4.1",
"@google-cloud/vertexai": "^1.1.0",
"@google/generative-ai": "^0.14.1",
"aws4fetch": "^1.0.17",
Expand Down
4 changes: 3 additions & 1 deletion src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!building) {
AbortedGenerations.getInstance();
}

export const handleError: HandleServerError = async ({ error, event }) => {
export const handleError: HandleServerError = async ({ error, event, status, message }) => {
// handle 404

if (building) {
Expand All @@ -55,8 +55,10 @@ export const handleError: HandleServerError = async ({ error, event }) => {
url: event.request.url,
params: event.params,
request: event.request,
message,
error,
errorId,
status,
});

return {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ExpandNavigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<button
on:click
class="{classNames} group flex h-16 w-6 flex-col items-center justify-center -space-y-1 outline-none *:h-3 *:w-1 *:rounded-full *:hover:bg-gray-300 max-md:hidden dark:*:hover:bg-gray-600 {!isCollapsed
class="{classNames} group flex h-16 w-6 flex-col items-center justify-center -space-y-1 outline-none *:h-3 *:w-1 *:rounded-full *:hover:bg-gray-300 dark:*:hover:bg-gray-600 max-md:hidden {!isCollapsed
? '*:bg-gray-200/70 dark:*:bg-gray-800'
: '*:bg-gray-200 dark:*:bg-gray-700'}"
>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/MobileNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</script>

<nav
class="flex h-12 items-center justify-between border-b bg-gray-50 px-3 md:hidden dark:border-gray-800 dark:bg-gray-800/70"
class="flex h-12 items-center justify-between border-b bg-gray-50 px-3 dark:border-gray-800 dark:bg-gray-800/70 md:hidden"
>
<button
type="button"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/NavConversationItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
confirmDelete = false;
}}
href="{base}/conversation/{conv.id}"
class="group flex h-10 flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-600 hover:bg-gray-100 sm:h-[2.35rem] dark:text-gray-300 dark:hover:bg-gray-700 {conv.id ===
class="group flex h-10 flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700 sm:h-[2.35rem] {conv.id ===
$page.params.id
? 'bg-gray-100 dark:bg-gray-700'
: ''}"
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/NavMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
<a
href={`${base}/`}
on:click={handleNewChatClick}
class="flex rounded-lg border bg-white px-2 py-0.5 text-center shadow-sm hover:shadow-none sm:text-smd dark:border-gray-600 dark:bg-gray-700"
class="flex rounded-lg border bg-white px-2 py-0.5 text-center shadow-sm hover:shadow-none dark:border-gray-600 dark:bg-gray-700 sm:text-smd"
>
New Chat
</a>
</div>
<div
class="scrollbar-custom flex flex-col gap-1 overflow-y-auto rounded-r-xl from-gray-50 px-3 pb-3 pt-2 text-[.9rem] max-sm:bg-gradient-to-t md:bg-gradient-to-l dark:from-gray-800/30"
class="scrollbar-custom flex flex-col gap-1 overflow-y-auto rounded-r-xl from-gray-50 px-3 pb-3 pt-2 text-[.9rem] dark:from-gray-800/30 max-sm:bg-gradient-to-t md:bg-gradient-to-l"
>
{#each Object.entries(groupedConversations) as [group, convs]}
{#if convs.length}
Expand Down Expand Up @@ -92,7 +92,7 @@
{#if !user.logoutDisabled}
<button
type="submit"
class="ml-auto h-6 flex-none items-center gap-1.5 rounded-md border bg-white px-2 text-gray-700 shadow-sm group-hover:flex hover:shadow-none md:hidden dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400 dark:hover:text-gray-300"
class="ml-auto h-6 flex-none items-center gap-1.5 rounded-md border bg-white px-2 text-gray-700 shadow-sm group-hover:flex hover:shadow-none dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400 dark:hover:text-gray-300 md:hidden"
>
Sign Out
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Pagination.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{#if numTotalPages > 1}
<nav>
<ul
class="flex select-none items-center justify-between space-x-2 text-gray-700 sm:justify-center dark:text-gray-300 {classNames}"
class="flex select-none items-center justify-between space-x-2 text-gray-700 dark:text-gray-300 sm:justify-center {classNames}"
>
<li>
<PaginationArrow
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/chat/AssistantIntroduction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
/>
{:else}
<div
class="flex size-12 flex-none items-center justify-center rounded-full bg-gray-300 object-cover text-xl font-bold uppercase text-gray-500 max-sm:self-start sm:text-4xl md:size-32 dark:bg-gray-600"
class="flex size-12 flex-none items-center justify-center rounded-full bg-gray-300 object-cover text-xl font-bold uppercase text-gray-500 dark:bg-gray-600 max-sm:self-start sm:text-4xl md:size-32"
>
{assistant?.name[0]}
</div>
Expand Down Expand Up @@ -116,7 +116,7 @@
<div class="absolute right-3 top-3 md:right-4 md:top-4">
<div class="flex flex-row items-center gap-1">
<button
class="flex h-7 items-center gap-1.5 rounded-full border bg-white px-2.5 py-1 text-gray-800 shadow-sm hover:shadow-inner max-sm:px-1.5 md:text-sm dark:border-gray-700 dark:bg-gray-700 dark:text-gray-300/90 dark:hover:bg-gray-800"
class="flex h-7 items-center gap-1.5 rounded-full border bg-white px-2.5 py-1 text-gray-800 shadow-sm hover:shadow-inner dark:border-gray-700 dark:bg-gray-700 dark:text-gray-300/90 dark:hover:bg-gray-800 max-sm:px-1.5 md:text-sm"
on:click={() => {
if (!isCopied) {
share(shareUrl, assistant.name);
Expand All @@ -137,7 +137,7 @@
</button>
<a
href="{base}/settings/assistants/{assistant._id.toString()}"
class="flex h-7 items-center gap-1.5 rounded-full border bg-white px-2.5 py-1 text-gray-800 shadow-sm hover:shadow-inner md:text-sm dark:border-gray-700 dark:bg-gray-700 dark:text-gray-300/90 dark:hover:bg-gray-800"
class="flex h-7 items-center gap-1.5 rounded-full border bg-white px-2.5 py-1 text-gray-800 shadow-sm hover:shadow-inner dark:border-gray-700 dark:bg-gray-700 dark:text-gray-300/90 dark:hover:bg-gray-800 md:text-sm"
><IconGear class="text-xxs" />Settings</a
>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/chat/ChatIntroduction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{#each currentModelMetadata.promptExamples as example}
<button
type="button"
class="rounded-xl border bg-gray-50 p-3 text-gray-600 hover:bg-gray-100 max-xl:text-sm xl:p-3.5 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"
class="rounded-xl border bg-gray-50 p-3 text-gray-600 hover:bg-gray-100 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 max-xl:text-sm xl:p-3.5"
on:click={() => dispatch("message", example.prompt)}
>
{example.title}
Expand Down
20 changes: 10 additions & 10 deletions src/lib/components/chat/ChatMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
{/if}

<div
class="prose max-w-none max-sm:prose-sm dark:prose-invert prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900"
class="prose max-w-none dark:prose-invert max-sm:prose-sm prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900"
bind:this={contentEl}
>
{#if isLast && loading && $settings.disableStream}
Expand Down Expand Up @@ -343,7 +343,7 @@
>
{#if isAuthor}
<button
class="btn rounded-sm p-1 text-sm text-gray-400 focus:ring-0 hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-300
class="btn rounded-sm p-1 text-sm text-gray-400 hover:text-gray-500 focus:ring-0 dark:text-gray-400 dark:hover:text-gray-300
{message.score && message.score > 0
? 'text-green-500 hover:text-green-500 dark:text-green-400 hover:dark:text-green-400'
: ''}"
Expand All @@ -355,7 +355,7 @@
<CarbonThumbsUp class="h-[1.14em] w-[1.14em]" />
</button>
<button
class="btn rounded-sm p-1 text-sm text-gray-400 focus:ring-0 hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-300
class="btn rounded-sm p-1 text-sm text-gray-400 hover:text-gray-500 focus:ring-0 dark:text-gray-400 dark:hover:text-gray-300
{message.score && message.score < 0
? 'text-red-500 hover:text-red-500 dark:text-red-400 hover:dark:text-red-400'
: ''}"
Expand All @@ -368,7 +368,7 @@
</button>
{/if}
<button
class="btn rounded-sm p-1 text-sm text-gray-400 focus:ring-0 hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-300"
class="btn rounded-sm p-1 text-sm text-gray-400 hover:text-gray-500 focus:ring-0 dark:text-gray-400 dark:hover:text-gray-300"
title="Retry"
type="button"
on:click={() => dispatch("retry", { id: message.id })}
Expand Down Expand Up @@ -439,15 +439,15 @@
class="btn rounded-lg px-3 py-1.5 text-sm
{loading
? 'bg-gray-300 text-gray-400 dark:bg-gray-700 dark:text-gray-600'
: 'bg-gray-200 text-gray-600 focus:ring-0 hover:text-gray-800 dark:bg-gray-800 dark:text-gray-300 dark:hover:text-gray-200'}
: 'bg-gray-200 text-gray-600 hover:text-gray-800 focus:ring-0 dark:bg-gray-800 dark:text-gray-300 dark:hover:text-gray-200'}
"
disabled={loading}
>
Submit
</button>
<button
type="button"
class="btn rounded-sm p-2 text-sm text-gray-400 focus:ring-0 hover:text-gray-500 dark:text-gray-400 dark:hover:text-gray-300"
class="btn rounded-sm p-2 text-sm text-gray-400 hover:text-gray-500 focus:ring-0 dark:text-gray-400 dark:hover:text-gray-300"
on:click={() => {
$convTreeStore.editing = null;
}}
Expand All @@ -469,7 +469,7 @@
<div class="mx-auto flex flex-row flex-nowrap gap-2">
{#if downloadLink}
<a
class="rounded-lg border border-gray-100 bg-gray-100 p-1 text-xs text-gray-400 group-hover:block hover:text-gray-500 max-sm:!hidden md:hidden dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-gray-300"
class="rounded-lg border border-gray-100 bg-gray-100 p-1 text-xs text-gray-400 group-hover:block hover:text-gray-500 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-gray-300 max-sm:!hidden md:hidden"
title="Download prompt and parameters"
type="button"
target="_blank"
Expand All @@ -480,7 +480,7 @@
{/if}
{#if !readOnly}
<button
class="cursor-pointer rounded-lg border border-gray-100 bg-gray-100 p-1 text-xs text-gray-400 group-hover:block hover:text-gray-500 md:hidden lg:-right-2 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-gray-300"
class="cursor-pointer rounded-lg border border-gray-100 bg-gray-100 p-1 text-xs text-gray-400 group-hover:block hover:text-gray-500 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-gray-300 md:hidden lg:-right-2"
title="Branch"
type="button"
on:click={() => ($convTreeStore.editing = message.id)}
Expand Down Expand Up @@ -515,7 +515,7 @@
class="font-white group/navbranch z-10 -mt-1 ml-3.5 mr-auto flex h-6 w-fit select-none flex-row items-center justify-center gap-1 text-sm"
>
<button
class="inline text-lg font-thin text-gray-400 disabled:pointer-events-none disabled:opacity-25 hover:text-gray-800 dark:text-gray-500 dark:hover:text-gray-200"
class="inline text-lg font-thin text-gray-400 hover:text-gray-800 disabled:pointer-events-none disabled:opacity-25 dark:text-gray-500 dark:hover:text-gray-200"
on:click={() => (childrenToRender = Math.max(0, childrenToRender - 1))}
disabled={childrenToRender === 0 || loading}
>
Expand All @@ -525,7 +525,7 @@
{childrenToRender + 1} / {nChildren}
</span>
<button
class="inline text-lg font-thin text-gray-400 disabled:pointer-events-none disabled:opacity-25 hover:text-gray-800 dark:text-gray-500 dark:hover:text-gray-200"
class="inline text-lg font-thin text-gray-400 hover:text-gray-800 disabled:pointer-events-none disabled:opacity-25 dark:text-gray-500 dark:hover:text-gray-200"
on:click={() =>
(childrenToRender = Math.min(
message?.children?.length ?? 1 - 1,
Expand Down
8 changes: 4 additions & 4 deletions src/lib/components/chat/ChatWindow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
/>
</div>
<div
class="dark:via-gray-80 pointer-events-none absolute inset-x-0 bottom-0 z-0 mx-auto flex w-full max-w-3xl flex-col items-center justify-center bg-gradient-to-t from-white via-white/80 to-white/0 px-3.5 py-4 max-md:border-t max-md:bg-white sm:px-5 md:py-8 xl:max-w-4xl dark:border-gray-800 dark:from-gray-900 dark:to-gray-900/0 max-md:dark:bg-gray-900 [&>*]:pointer-events-auto"
class="dark:via-gray-80 pointer-events-none absolute inset-x-0 bottom-0 z-0 mx-auto flex w-full max-w-3xl flex-col items-center justify-center bg-gradient-to-t from-white via-white/80 to-white/0 px-3.5 py-4 dark:border-gray-800 dark:from-gray-900 dark:to-gray-900/0 max-md:border-t max-md:bg-white max-md:dark:bg-gray-900 sm:px-5 md:py-8 xl:max-w-4xl [&>*]:pointer-events-auto"
>
{#if sources?.length}
<div class="flex flex-row flex-wrap justify-center gap-2.5 max-md:pb-3">
Expand Down Expand Up @@ -373,19 +373,19 @@

{#if loading}
<button
class="btn mx-1 my-1 inline-block h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 disabled:opacity-60 enabled:hover:text-gray-700 md:hidden dark:disabled:opacity-40 enabled:dark:hover:text-gray-100"
class="btn mx-1 my-1 inline-block h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 enabled:hover:text-gray-700 disabled:opacity-60 enabled:dark:hover:text-gray-100 dark:disabled:opacity-40 md:hidden"
on:click={() => dispatch("stop")}
>
<CarbonStopFilledAlt />
</button>
<div
class="mx-1 my-1 hidden h-[2.4rem] items-center p-1 px-[0.7rem] text-gray-400 disabled:opacity-60 enabled:hover:text-gray-700 md:flex dark:disabled:opacity-40 enabled:dark:hover:text-gray-100"
class="mx-1 my-1 hidden h-[2.4rem] items-center p-1 px-[0.7rem] text-gray-400 enabled:hover:text-gray-700 disabled:opacity-60 enabled:dark:hover:text-gray-100 dark:disabled:opacity-40 md:flex"
>
<EosIconsLoading />
</div>
{:else}
<button
class="btn mx-1 my-1 h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 disabled:opacity-60 enabled:hover:text-gray-700 dark:disabled:opacity-40 enabled:dark:hover:text-gray-100"
class="btn mx-1 my-1 h-[2.4rem] self-end rounded-lg bg-transparent p-1 px-[0.7rem] text-gray-400 enabled:hover:text-gray-700 disabled:opacity-60 enabled:dark:hover:text-gray-100 dark:disabled:opacity-40"
disabled={!message || isReadOnly}
type="submit"
>
Expand Down
8 changes: 7 additions & 1 deletion src/lib/server/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Issuer, BaseClient, type UserinfoResponse, TokenSet, custom } from "openid-client";
import {
Issuer,
type BaseClient,
type UserinfoResponse,
type TokenSet,
custom,
} from "openid-client";
import { addHours, addWeeks } from "date-fns";
import { env } from "$env/dynamic/private";
import { sha256 } from "$lib/utils/sha256";
Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/endpoints/anthropic/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ImageBlockParam, MessageParam } from "@anthropic-ai/sdk/resources";
import { makeImageProcessor, type ImageProcessorOptions } from "../images";
import type { EndpointMessage } from "../endpoints";
import type { MessageFile } from "$lib/types/Message";
import type { ImageBlockParam, MessageParam } from "@anthropic-ai/sdk/resources/messages.mjs";

export async function fileToImageBlock(
file: MessageFile,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/server/endpoints/cohere/endpointCohere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { TextGenerationStreamOutput } from "@huggingface/inference";
import type { Cohere, CohereClient } from "cohere-ai";
import { buildPrompt } from "$lib/buildPrompt";
import { ToolResultStatus, type ToolCall } from "$lib/types/Tool";
import { pipeline, Writable, Readable } from "node:stream";
import { pipeline, Writable, type Readable } from "node:stream";
import { toolHasName } from "$lib/utils/tools";

export const endpointCohereParametersSchema = z.object({
Expand Down Expand Up @@ -78,7 +78,7 @@ export async function endpointCohere(
.map((message) => ({
role: message.from === "user" ? "USER" : "CHATBOT",
message: message.content,
})) satisfies Cohere.ChatMessage[];
})) satisfies Cohere.Message[];

stream = await cohere
.chatStream({
Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/exitHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function onExit(cb: ExitHandler): ExitHandlerUnsubscribe {

async function runExitHandler(handler: ExitHandler): Promise<void> {
return timeout(Promise.resolve().then(handler), 30_000).catch((err) => {
logger.error("Exit handler failed to run", err);
logger.error(err, "Exit handler failed to run");
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/server/files/downloadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export async function downloadFile(

const file = await fileId.next();
if (!file) {
throw error(404, "File not found");
error(404, "File not found");
}
if (file.metadata?.conversation !== convId.toString()) {
throw error(403, "You don't have access to this file.");
error(403, "You don't have access to this file.");
}

const mime = file.metadata?.mime;
Expand Down
6 changes: 3 additions & 3 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<div
class="grid h-full w-screen grid-cols-1 grid-rows-[auto,1fr] overflow-hidden text-smd {!isNavCollapsed
? 'md:grid-cols-[280px,1fr]'
: 'md:grid-cols-[0px,1fr]'} transition-[300ms] [transition-property:grid-template-columns] md:grid-rows-[1fr] dark:text-gray-300"
: 'md:grid-cols-[0px,1fr]'} transition-[300ms] [transition-property:grid-template-columns] dark:text-gray-300 md:grid-rows-[1fr]"
>
<MobileNav isOpen={isNavOpen} on:toggle={(ev) => (isNavOpen = ev.detail)} title={mobileNavTitle}>
<NavMenu
Expand Down Expand Up @@ -242,8 +242,8 @@
href="https://play.google.com/store/apps/details?id=co.huggingface.chat_ui_android"
class="fixed left-0 right-0 top-0 mx-auto flex h-fit min-h-12 w-screen flex-nowrap items-center justify-evenly gap-4 bg-gray-200 px-4 py-4 text-gray-900 shadow-lg backdrop-blur-md
hover:bg-gray-100
sm:top-5 sm:max-w-fit sm:gap-4 sm:rounded-lg
dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600"
dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600 sm:top-5
sm:max-w-fit sm:gap-4 sm:rounded-lg"
>
<button
class="border-r-2 border-black/20 pr-4 text-2xl"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin/export/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { logger } from "$lib/server/logger.js";

export async function POST({ request }) {
if (!env.PARQUET_EXPORT_DATASET || !env.PARQUET_EXPORT_HF_TOKEN) {
throw error(500, "Parquet export is not configured.");
error(500, "Parquet export is not configured.");
}

const { model } = z
Expand Down
Loading

0 comments on commit cc5be1a

Please sign in to comment.