Skip to content

Commit 1900083

Browse files
committed
small fixes
1 parent 69c223d commit 1900083

File tree

7 files changed

+29
-30
lines changed

7 files changed

+29
-30
lines changed

src/lib/components/AssistantSettings.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
<form
6161
method="POST"
62-
class="flex flex-col"
62+
class="flex h-full flex-col"
6363
enctype="multipart/form-data"
6464
use:enhance={async ({ formData }) => {
6565
loading = true;

src/lib/components/NavConversationItem.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@
3535
>
3636
<div class="flex flex-1 items-center truncate">
3737
{#if confirmDelete}
38-
<span class="font-semibold"> Delete </span>
38+
<span class="mr-1 font-semibold"> Delete </span>
3939
{/if}
4040
{#if conv.avatarHash && !$settings.hideEmojiOnSidebar}
4141
<img
4242
src="{base}/settings/assistants/{conv.assistantId}/avatar?hash={conv.avatarHash}"
4343
alt="Assistant avatar"
44-
class="mr-1 inline h-4 w-4 rounded-full"
44+
class="mr-1.5 inline size-4 rounded-full"
45+
/>
46+
{conv.title.replace(/\p{Emoji}/gu, "")}
47+
{:else if conv.assistantId}
48+
<div
49+
class="mr-1.5 flex size-4 items-center justify-center rounded-full bg-gray-300 text-xs font-bold uppercase text-gray-500"
4550
/>
4651
{conv.title.replace(/\p{Emoji}/gu, "")}
4752
{:else}

src/lib/components/chat/AssistantIntroduction.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414

1515
<div class="flex h-full w-full flex-col content-center items-center justify-center">
1616
<div
17-
class="relative mt-auto rounded-2xl bg-gray-100 text-gray-600 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-300"
17+
class="relative mt-auto rounded-2xl bg-gray-100 text-gray-600 dark:border-gray-800 dark:bg-gray-800/60 dark:text-gray-300"
1818
>
19-
<div class="flex items-center gap-4 p-4 pr-10 pt-10 md:gap-4 md:p-8">
19+
<div class="flex items-center gap-4 p-4 pr-10 md:p-8 md:pt-10">
2020
{#if assistant.avatar}
2121
<img
2222
src={`${base}/settings/assistants/${assistant._id.toString()}/avatar?hash=${
2323
assistant.avatar
2424
}`}
2525
alt="avatar"
26-
class="mr-4 size-14 rounded-full object-cover md:size-32 md:h-32"
26+
class="size-16 rounded-full object-cover md:size-32"
2727
/>
2828
{:else}
2929
<div
30-
class="flex size-12 items-center justify-center rounded-full bg-gray-300 object-cover text-4xl font-bold uppercase text-gray-500 md:h-32 md:w-32 dark:bg-gray-600"
30+
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 sm:text-4xl md:h-32 md:w-32 dark:bg-gray-600"
3131
>
3232
{assistant?.name[0]}
3333
</div>
@@ -37,9 +37,9 @@
3737
<p
3838
class="mb-2 w-fit truncate text-ellipsis rounded-full bg-gray-200 px-3 py-1 text-xs text-gray-600 dark:bg-gray-700 dark:text-gray-400"
3939
>
40-
{assistant.modelId}
40+
Assistant
4141
</p>
42-
<p class="text-2xl font-bold">{assistant.name}</p>
42+
<p class="text-xl font-bold sm:text-2xl">{assistant.name}</p>
4343
<p class="text-sm text-gray-500 dark:text-gray-400">
4444
{assistant.description}
4545
</p>
@@ -55,7 +55,7 @@
5555
</p>
5656
</div>
5757
</div>
58-
<div class="absolute right-2 top-2">
58+
<div class="absolute right-2 top-3 sm:top-2">
5959
<a
6060
href="{base}/settings/assistants/{assistant._id.toString()}"
6161
class="flex size-7 items-center justify-center rounded-full border bg-gray-200 p-1 text-xs hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600"

src/lib/components/chat/ChatWindow.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156

157157
<div class="w-full">
158158
<div class="flex w-full pb-3">
159-
{#if $page.data.settings?.searchEnabled}
159+
{#if $page.data.settings?.searchEnabled && !assistant}
160160
<WebSearchToggle />
161161
{/if}
162162
{#if loading}
@@ -255,7 +255,7 @@
255255
<CarbonCheckmark class="text-[.6rem] sm:mr-1.5 sm:text-green-600" />
256256
<div class="text-green-600 max-sm:hidden">Link copied to clipboard</div>
257257
{:else}
258-
<CarbonExport class="text-[.6rem] sm:mr-1.5 sm:text-primary-500" />
258+
<CarbonExport class="sm:text-primary-500 text-[.6rem] sm:mr-1.5" />
259259
<div class="max-sm:hidden">Share this conversation</div>
260260
{/if}
261261
</button>

src/routes/assistant/[assistantId]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
type="submit"
105105
class=" w-full rounded-full bg-black px-4 py-2 font-semibold text-white"
106106
>
107-
Add preset and start chatting
107+
Add assistant and start chatting
108108
</button>
109109
</form>
110110
</dialog>

src/routes/settings/+layout.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
use:clickOutside={() => {
3434
goto(previousPage);
3535
}}
36-
class="xl: z-10 grid h-[95dvh] w-[90dvw] grid-cols-1 content-start gap-x-10 overflow-hidden rounded-2xl bg-white p-4 shadow-2xl outline-none sm:h-[80dvh] md:grid-cols-3 md:grid-rows-[auto,1fr] md:p-8 xl:w-[1200px] 2xl:h-[70dvh]"
36+
class="xl: z-10 grid h-[95dvh] w-[90dvw] grid-cols-1 content-start gap-x-8 overflow-hidden rounded-2xl bg-white p-4 shadow-2xl outline-none sm:h-[80dvh] md:grid-cols-3 md:grid-rows-[auto,1fr] md:p-8 xl:w-[1200px] 2xl:h-[70dvh]"
3737
>
3838
<div class="col-span-1 mb-4 flex items-center justify-between md:col-span-3">
3939
<h2 class="text-xl font-bold">Settings</h2>
@@ -60,7 +60,7 @@
6060
<div class="truncate">{model.displayName}</div>
6161
{#if model.id === $settings.activeModel}
6262
<div
63-
class="rounded-lg bg-black px-2 py-1.5 text-xs font-semibold leading-none text-white"
63+
class="ml-auto rounded-lg bg-black px-2 py-1.5 text-xs font-semibold leading-none text-white"
6464
>
6565
Active
6666
</div>
@@ -91,7 +91,7 @@
9191
<div class="truncate">{assistant.name}</div>
9292
{#if assistant._id.toString() === $settings.activeModel}
9393
<div
94-
class="rounded-lg bg-black px-2 py-1.5 text-xs font-semibold leading-none text-white"
94+
class="ml-auto rounded-lg bg-black px-2 py-1.5 text-xs font-semibold leading-none text-white"
9595
>
9696
Active
9797
</div>

src/routes/settings/assistants/[assistantId]/+page.svelte

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,40 +124,34 @@
124124

125125
<div class="mt-5 flex gap-4">
126126
{#if assistant?.createdByMe}
127-
<a href="{base}/settings/assistants/{assistant?._id}/edit" class="underline">
128-
<CarbonPen class="mr-1.5 inline" />
129-
Edit assistant
130-
</a>
127+
<a href="{base}/settings/assistants/{assistant?._id}/edit" class="underline"
128+
><CarbonPen class="mr-1.5 inline" />Edit assistant</a
129+
>
131130
<form method="POST" action="?/delete" use:enhance>
132131
<button type="submit" class="flex items-center underline">
133-
<CarbonTrash class="mr-1.5 inline" />
134-
Delete assistant</button
132+
<CarbonTrash class="mr-1.5 inline" />Delete assistant</button
135133
>
136134
</form>
137135
{:else}
138136
<form method="POST" action="?/unsubscribe" use:enhance>
139137
<button type="submit" class="underline">
140-
<CarbonTrash class="mr-1.5 inline" />
141-
Remove assistant</button
138+
<CarbonTrash class="mr-1.5 inline" />Remove assistant</button
142139
>
143140
</form>
144141
<form method="POST" action="?/edit" use:enhance class="hidden">
145142
<button type="submit" class="underline">
146-
<CarbonCopy class="mr-1.5 inline" />
147-
Duplicate assistant</button
143+
<CarbonCopy class="mr-1.5 inline" />Duplicate assistant</button
148144
>
149145
</form>
150146
{#if !assistant?.reported}
151147
<form method="POST" action="?/report" use:enhance>
152148
<button type="submit" class="underline">
153-
<CarbonFlag class="mr-1.5 inline" />
154-
Report assistant</button
149+
<CarbonFlag class="mr-1.5 inline" />Report assistant</button
155150
>
156151
</form>
157152
{:else}
158153
<button type="button" disabled class="text-gray-700">
159-
<CarbonFlag class="mr-1.5 inline" />
160-
Reported</button
154+
<CarbonFlag class="mr-1.5 inline" />Reported</button
161155
>
162156
{/if}
163157
{/if}

0 commit comments

Comments
 (0)