Skip to content

Commit 23b1e2c

Browse files
committed
refac
1 parent 05b8768 commit 23b1e2c

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

src/lib/components/common/ToolCallDisplay.svelte

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@
9494
open = !open;
9595
}}
9696
>
97-
<div class="w-full font-medium flex items-center gap-1.5 {isExecuting ? 'shimmer' : ''}">
97+
<div
98+
class="w-full max-w-full font-medium flex items-center gap-1.5 {isExecuting
99+
? 'shimmer'
100+
: ''}"
101+
>
98102
<!-- Status icon -->
99103
{#if isExecuting}
100104
<div>
@@ -111,26 +115,31 @@
111115
{/if}
112116

113117
<!-- Label -->
114-
<div class="">
115-
{#if isDone}
116-
<Markdown
117-
id={`${componentId}-tool-call-title`}
118-
content={$i18n.t('View Result from **{{NAME}}**', {
119-
NAME: attributes.name
120-
})}
121-
/>
122-
{:else}
123-
<Markdown
124-
id={`${componentId}-tool-call-executing`}
125-
content={$i18n.t('Executing **{{NAME}}**...', {
126-
NAME: attributes.name
127-
})}
128-
/>
129-
{/if}
118+
<div class="flex-1 line-clamp-1">
119+
<!-- Short label (below md) -->
120+
<span class="@md:hidden font-semibold text-black dark:text-white">{attributes.name}</span>
121+
<!-- Full label (md and above) -->
122+
<span class="hidden @md:inline">
123+
{#if isDone}
124+
<Markdown
125+
id={`${componentId}-tool-call-title`}
126+
content={$i18n.t('View Result from **{{NAME}}**', {
127+
NAME: attributes.name
128+
})}
129+
/>
130+
{:else}
131+
<Markdown
132+
id={`${componentId}-tool-call-executing`}
133+
content={$i18n.t('Executing **{{NAME}}**...', {
134+
NAME: attributes.name
135+
})}
136+
/>
137+
{/if}
138+
</span>
130139
</div>
131140

132141
<!-- Chevron -->
133-
<div class="flex self-center translate-y-[1px]">
142+
<div class="flex shrink-0 self-center translate-y-[1px]">
134143
{#if open}
135144
<ChevronUp strokeWidth="3.5" className="size-3.5" />
136145
{:else}

0 commit comments

Comments
 (0)