refac
This commit is contained in:
@@ -107,22 +107,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div {id} class="w-full">
|
<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 -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<button
|
<button
|
||||||
class="w-fit text-left text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition cursor-pointer"
|
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>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/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>
|
</div>
|
||||||
|
|||||||
@@ -380,6 +380,7 @@
|
|||||||
<ToolCallDisplay
|
<ToolCallDisplay
|
||||||
id={`${id}-${tokenIdx}-${detailIdx}-tc`}
|
id={`${id}-${tokenIdx}-${detailIdx}-tc`}
|
||||||
attributes={detailToken.attributes}
|
attributes={detailToken.attributes}
|
||||||
|
grouped={true}
|
||||||
open={false}
|
open={false}
|
||||||
className="w-full space-y-1"
|
className="w-full space-y-1"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
} = {};
|
} = {};
|
||||||
|
|
||||||
export let open = false;
|
export let open = false;
|
||||||
|
export let grouped = false;
|
||||||
export let className = '';
|
export let className = '';
|
||||||
|
|
||||||
const RESULT_PREVIEW_LIMIT = 10000;
|
const RESULT_PREVIEW_LIMIT = 10000;
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div {id} class={className}>
|
<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 -->
|
<!-- Embed Mode: Show iframes without collapsible behavior -->
|
||||||
<div class="py-1 w-full cursor-pointer">
|
<div class="py-1 w-full cursor-pointer">
|
||||||
<div class="w-full text-xs text-gray-500">
|
<div class="w-full text-xs text-gray-500">
|
||||||
|
|||||||
Reference in New Issue
Block a user