This commit is contained in:
Timothy Jaeryang Baek
2026-06-16 14:51:38 +02:00
Unverified
parent 09b131ac41
commit ad54ec5d1e
3 changed files with 37 additions and 30 deletions
+4 -2
View File
@@ -82,11 +82,13 @@
border-radius: 9999px;
}
.scrollbar-hidden {
.scrollbar-hidden,
.scrollbar-none {
scrollbar-width: none;
-ms-overflow-style: none;
}
.scrollbar-hidden::-webkit-scrollbar {
.scrollbar-hidden::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
display: none;
}
@@ -646,7 +646,7 @@
<!-- Universal toolbar (hidden for untitled files with no content yet) -->
<div class="toolbar">
<div class="toolbar-left">
<span class="file-name">{fileData.name}</span>
<span class="file-name scrollbar-none">{fileData.name}</span>
<span class="file-size">{formatSize(fileData.size)}</span>
</div>
<div class="toolbar-right">
@@ -880,6 +880,7 @@
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
height: 30px;
padding: 0 10px;
border-bottom: 1px solid var(--color-gray-200);
@@ -893,26 +894,42 @@
.toolbar-left {
display: flex;
align-items: center;
flex: 1 1 auto;
gap: 8px;
min-width: 0;
overflow: hidden;
}
.toolbar-right {
display: flex;
align-items: center;
flex: 0 0 auto;
gap: 2px;
}
.file-name {
display: block;
flex: 1 1 auto;
min-width: 0;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
font-size: 12px;
font-weight: 500;
color: var(--color-gray-700);
}
.file-name::-webkit-scrollbar {
display: none;
}
:global(.dark) .file-name {
color: var(--color-gray-300);
}
.file-size {
flex: 0 0 auto;
white-space: nowrap;
font-size: 11px;
color: var(--color-gray-400);
}
@@ -921,6 +938,7 @@
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 20px;
height: 20px;
border-radius: 4px;
@@ -380,10 +380,9 @@
{@const artifact = displayItem.item}
{@const preview = (artifact.content || '')
.replace(/^#.*\n*/m, '')
.trim()
.slice(0, 200)}
.trim()}
<button
class="w-full text-left my-2 rounded-xl cursor-pointer
class="w-full min-w-0 overflow-hidden text-left my-2 rounded-xl cursor-pointer
border border-gray-200 dark:border-white/8
hover:border-gray-300 dark:hover:border-white/12
hover:bg-gray-50/50 dark:hover:bg-white/[0.03]
@@ -396,32 +395,20 @@
}
}}
>
<div class="flex items-center gap-2 px-3 pt-2.5 pb-0.5">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-3.5 shrink-0 text-gray-400 dark:text-gray-500"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
/>
</svg>
<span class="text-xs font-medium text-gray-800 dark:text-gray-100"
>{artifact.title || $t('chat.artifact')}</span
<div class="min-w-0 px-3 py-2.5">
<div
class="line-clamp-1 max-h-4 text-xs leading-4 font-medium text-gray-800 dark:text-gray-100 [overflow-wrap:anywhere]"
>
{artifact.title || $t('chat.artifact')}
</div>
{#if preview}
<div
class="line-clamp-2 max-h-8 text-[10px] leading-4 font-normal text-gray-400 dark:text-gray-500 [overflow-wrap:anywhere]"
>
{preview}
</div>
{/if}
</div>
{#if preview}
<p
class="px-3 pb-2.5 text-[10px] text-gray-400 dark:text-gray-500 line-clamp-2 leading-relaxed"
>
{preview}{preview.length >= 200 ? '...' : ''}
</p>
{/if}
</button>
{:else if displayItem.type === 'tool_group'}
{@const calls = displayItem.calls}