enh: <think> tag support

This commit is contained in:
Timothy Jaeryang Baek
2025-01-22 00:13:24 -08:00
parent 8d3c73aed5
commit c9dc7299c5
7 changed files with 116 additions and 54 deletions
@@ -195,7 +195,11 @@
</ul>
{/if}
{:else if token.type === 'details'}
<Collapsible title={token.summary} className="w-fit space-y-1">
<Collapsible
title={token.summary}
isLoading={token?.isLoading ?? false}
className="w-fit space-y-1"
>
<div class=" mb-1.5" slot="content">
<svelte:self id={`${id}-${tokenIdx}-d`} tokens={marked.lexer(token.text)} />
</div>
+1 -1
View File
@@ -1,3 +1,3 @@
<div class=" self-center font-semibold mb-0.5 line-clamp-1 flex gap-1 items-center">
<div class=" self-center font-semibold line-clamp-1 flex gap-1 items-center">
<slot />
</div>
@@ -1234,48 +1234,4 @@
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.shimmer {
background: linear-gradient(90deg, #9a9b9e 25%, #2a2929 50%, #9a9b9e 75%);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 4s linear infinite;
color: #818286; /* Fallback color */
}
:global(.dark) .shimmer {
background: linear-gradient(90deg, #818286 25%, #eae5e5 50%, #818286 75%);
background-size: 200% 100%;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmer 4s linear infinite;
color: #a1a3a7; /* Darker fallback color for dark mode */
}
@keyframes smoothFadeIn {
0% {
opacity: 0;
transform: translateY(-10px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.status-description {
animation: smoothFadeIn 0.2s forwards;
}
</style>