This commit is contained in:
Timothy Jaeryang Baek
2025-02-13 22:11:56 -08:00
parent c9a8808b0d
commit b7aeb432ed
6 changed files with 123 additions and 4 deletions
@@ -31,7 +31,10 @@
$: (async () => {
if (content) {
tokens = marked.lexer(
replaceTokens(processResponseContent(content), sourceIds, model?.name, $user?.name)
replaceTokens(processResponseContent(content), sourceIds, model?.name, $user?.name),
{
gfm: true
}
);
}
})();
+23
View File
@@ -0,0 +1,23 @@
<script lang="ts">
export let className = 'size-4';
export let strokeWidth = '1.5';
</script>
<svg
stroke-width={strokeWidth}
stroke="currentColor"
class={className}
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
width="24"
height="24"
viewBox="0 0 22 22"
>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
d="m4 12 8-8 8 8M6 10.5V19a1 1 0 0 0 1 1h3v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h3a1 1 0 0 0 1-1v-8.5"
/>
</svg>
+29 -2
View File
@@ -57,6 +57,7 @@
import ChannelModal from './Sidebar/ChannelModal.svelte';
import ChannelItem from './Sidebar/ChannelItem.svelte';
import PencilSquare from '../icons/PencilSquare.svelte';
import Home from '../icons/Home.svelte';
const BREAKPOINT = 768;
@@ -536,10 +537,36 @@
</a>
</div>
<!-- {#if $user?.role === 'admin'}
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
<a
class="flex-grow flex items-center space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/home"
on:click={() => {
selectedChatId = null;
chatId.set('');
if ($mobile) {
showSidebar.set(false);
}
}}
draggable="false"
>
<div class="self-center">
<Home strokeWidth="2" className="size-[1.1rem]" />
</div>
<div class="flex self-center translate-y-[0.5px]">
<div class=" self-center font-medium text-sm font-primary">{$i18n.t('Home')}</div>
</div>
</a>
</div>
{/if} -->
{#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools}
<div class="px-1.5 flex justify-center text-gray-800 dark:text-gray-200">
<a
class="flex-grow flex space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
class="flex-grow flex items-center space-x-3 rounded-lg px-2 py-[7px] hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/workspace"
on:click={() => {
selectedChatId = null;
@@ -568,7 +595,7 @@
</svg>
</div>
<div class="flex self-center">
<div class="flex self-center translate-y-[0.5px]">
<div class=" self-center font-medium text-sm font-primary">{$i18n.t('Workspace')}</div>
</div>
</a>
+2 -1
View File
@@ -42,9 +42,10 @@
<div class=" flex-1 w-full h-full">
<RichTextInput
className=" input-prose-sm"
className="input-prose-sm"
bind:value={content}
placeholder={$i18n.t('Write something...')}
preserveBreaks={true}
/>
</div>
</div>