mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: think tag
This commit is contained in:
@@ -195,11 +195,7 @@
|
||||
</ul>
|
||||
{/if}
|
||||
{:else if token.type === 'details'}
|
||||
<Collapsible
|
||||
title={token.summary}
|
||||
isLoading={token?.isLoading ?? false}
|
||||
className="w-fit space-y-1"
|
||||
>
|
||||
<Collapsible title={token.summary} attributes={token?.attributes} 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>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
export let buttonClassName =
|
||||
'w-fit text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition';
|
||||
export let title = null;
|
||||
export let isLoading = false;
|
||||
export let attributes = null;
|
||||
|
||||
export let grow = false;
|
||||
|
||||
@@ -37,12 +37,13 @@
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class=" w-full font-medium flex items-center justify-between gap-2 {isLoading === true
|
||||
class=" w-full font-medium flex items-center justify-between gap-2 {attributes?.done !==
|
||||
'true'
|
||||
? 'shimmer'
|
||||
: ''}
|
||||
"
|
||||
>
|
||||
{#if isLoading}
|
||||
{#if attributes?.done !== 'true'}
|
||||
<div>
|
||||
<Spinner className="size-4" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user