mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
refac
This commit is contained in:
parent
308fa924a5
commit
58ca51364c
3 changed files with 18 additions and 17 deletions
|
|
@ -107,22 +107,6 @@
|
|||
</script>
|
||||
|
||||
<div {id} class="w-full">
|
||||
{#if allEmbeds.length > 0}
|
||||
<!-- Embeds rendered directly above the collapsed group -->
|
||||
{#each allEmbeds as embedItem, idx}
|
||||
<div id={`${id}-embed-${idx}`}>
|
||||
<FullHeightIframe
|
||||
src={embedItem.embed}
|
||||
args={embedItem.args}
|
||||
allowScripts={true}
|
||||
allowForms={$settings?.iframeSandboxAllowForms ?? false}
|
||||
allowSameOrigin={$settings?.iframeSandboxAllowSameOrigin ?? false}
|
||||
allowPopups={true}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<button
|
||||
class="w-fit text-left text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition cursor-pointer"
|
||||
|
|
@ -176,4 +160,19 @@
|
|||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if allEmbeds.length > 0}
|
||||
{#each allEmbeds as embedItem, idx}
|
||||
<div id={`${id}-embed-${idx}`}>
|
||||
<FullHeightIframe
|
||||
src={embedItem.embed}
|
||||
args={embedItem.args}
|
||||
allowScripts={true}
|
||||
allowForms={$settings?.iframeSandboxAllowForms ?? false}
|
||||
allowSameOrigin={$settings?.iframeSandboxAllowSameOrigin ?? false}
|
||||
allowPopups={true}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@
|
|||
<ToolCallDisplay
|
||||
id={`${id}-${tokenIdx}-${detailIdx}-tc`}
|
||||
attributes={detailToken.attributes}
|
||||
grouped={true}
|
||||
open={false}
|
||||
className="w-full space-y-1"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
} = {};
|
||||
|
||||
export let open = false;
|
||||
export let grouped = false;
|
||||
export let className = '';
|
||||
|
||||
const RESULT_PREVIEW_LIMIT = 10000;
|
||||
|
|
@ -87,7 +88,7 @@
|
|||
</script>
|
||||
|
||||
<div {id} class={className}>
|
||||
{#if embeds && Array.isArray(embeds) && embeds.length > 0}
|
||||
{#if !grouped && embeds && Array.isArray(embeds) && embeds.length > 0}
|
||||
<!-- Embed Mode: Show iframes without collapsible behavior -->
|
||||
<div class="py-1 w-full cursor-pointer">
|
||||
<div class="w-full text-xs text-gray-500">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue