mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-23 22:14:58 -06:00
refac
This commit is contained in:
@@ -112,7 +112,7 @@
|
||||
<div {id} class="w-full">
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<button
|
||||
class="w-fit py-1 text-left text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition cursor-pointer"
|
||||
class="w-fit py-0.5 text-left text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition cursor-pointer"
|
||||
aria-label={$i18n.t('Toggle details')}
|
||||
aria-expanded={open}
|
||||
on:click={() => {
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
{#if open}
|
||||
<div transition:slide={{ duration: 300, easing: quintOut, axis: 'y' }}>
|
||||
<div class="mb-1 space-y-1.5">
|
||||
<div class="mb-1">
|
||||
<slot name="content" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
messageDone={done}
|
||||
{allowEmbeds}
|
||||
>
|
||||
<div slot="content" class="space-y-1">
|
||||
<div slot="content">
|
||||
{#each token.items as detailToken, detailIdx}
|
||||
{@const textContent = getDetailTextContent(detailToken)}
|
||||
|
||||
@@ -388,7 +388,8 @@
|
||||
resultContent={getDetailTextContent(detailToken)}
|
||||
grouped={true}
|
||||
open={$settings?.expandDetails ?? false}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
/>
|
||||
{:else if textContent.length > 0}
|
||||
<Collapsible
|
||||
@@ -396,7 +397,8 @@
|
||||
open={$settings?.expandDetails ?? false}
|
||||
attributes={detailToken?.attributes}
|
||||
messageDone={done}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
dir="auto"
|
||||
>
|
||||
<div class="mb-1.5" slot="content">
|
||||
@@ -419,7 +421,8 @@
|
||||
disabled={true}
|
||||
attributes={detailToken?.attributes}
|
||||
messageDone={done}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
dir="auto"
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
tokens={displayItem.tokens}
|
||||
messageDone={done}
|
||||
>
|
||||
<div slot="content" class="space-y-2">
|
||||
<div slot="content">
|
||||
{#each displayItem.tokens as detailToken, detailIndex}
|
||||
{#if detailToken.attributes?.type === 'tool_calls'}
|
||||
<ToolCallDisplay
|
||||
@@ -74,7 +74,8 @@
|
||||
resultContent={detailToken.text}
|
||||
grouped={true}
|
||||
open={$settings?.expandDetails ?? false}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
/>
|
||||
{:else if detailToken.text?.length > 0}
|
||||
<Collapsible
|
||||
@@ -82,7 +83,8 @@
|
||||
open={$settings?.expandDetails ?? false}
|
||||
attributes={getDetailAttributes(detailToken)}
|
||||
messageDone={done}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
>
|
||||
<div class="mb-1.5" slot="content">
|
||||
<div class="markdown-prose">
|
||||
@@ -102,7 +104,8 @@
|
||||
disabled={true}
|
||||
attributes={getDetailAttributes(detailToken)}
|
||||
messageDone={done}
|
||||
className="w-full space-y-2"
|
||||
className="w-full"
|
||||
buttonClassName="w-fit py-0.5 text-[0.9375rem] text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition"
|
||||
/>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user