This commit is contained in:
Timothy Jaeryang Baek
2026-05-09 07:13:36 +09:00
parent a938c8ae2e
commit e1dce99147
4 changed files with 9 additions and 0 deletions
@@ -24,6 +24,7 @@
export let paragraphTag = 'p';
export let editCodeBlock = true;
export let topPadding = false;
export let allowEmbeds = true;
export let sourceIds = [];
@@ -104,6 +105,7 @@
{editCodeBlock}
{sourceIds}
{topPadding}
{allowEmbeds}
{onTaskClick}
{onSourceClick}
{onSave}
@@ -30,6 +30,7 @@
}> = [];
export let messageDone = true;
export let allowEmbeds = true;
let open = $settings?.expandDetails ?? false;
@@ -51,6 +52,8 @@
// Collect all embeds from tool_calls tokens
$: allEmbeds = (() => {
if (!allowEmbeds) return [];
const result: Array<{ name: string; embed: string; args: string }> = [];
for (const t of tokens) {
if (t?.attributes?.type !== 'tool_calls') continue;
@@ -41,6 +41,7 @@
export let editCodeBlock = true;
export let topPadding = false;
export let allowEmbeds = true;
export let onSave: Function = () => {};
export let onUpdate: Function = () => {};
@@ -371,6 +372,7 @@
id={`${id}-${tokenIdx}-detail-group`}
tokens={token.items}
messageDone={done}
{allowEmbeds}
>
<div slot="content" class="space-y-1">
{#each token.items as detailToken, detailIdx}