@r2digisolutions/components 0.21.35 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -419,11 +419,15 @@
|
|
|
419
419
|
{disabled}
|
|
420
420
|
onkeydown={onTriggerKeydown}
|
|
421
421
|
class={[
|
|
422
|
-
'
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
422
|
+
'inline-flex items-center font-medium transition-colors focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none',
|
|
423
|
+
trigger
|
|
424
|
+
? 'gap-0 rounded-lg border-0 bg-transparent p-0 text-inherit hover:bg-transparent'
|
|
425
|
+
: [
|
|
426
|
+
'gap-2 rounded-lg border border-border bg-surface-elevated text-primary',
|
|
427
|
+
'hover:bg-surface-overlay',
|
|
428
|
+
size === 'sm' ? 'min-h-8 px-2.5 text-xs' : 'min-h-9 px-3 text-sm'
|
|
429
|
+
],
|
|
430
|
+
disabled && 'cursor-not-allowed opacity-50'
|
|
427
431
|
]}
|
|
428
432
|
aria-label={trigger ? label : undefined}
|
|
429
433
|
aria-haspopup="menu"
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
draft?: string;
|
|
39
39
|
loading?: boolean;
|
|
40
40
|
loadingLabel?: string;
|
|
41
|
+
/** Atom-style progress lines inside the pending assistant bubble. */
|
|
42
|
+
statusSteps?: string[];
|
|
41
43
|
/** When false, the spinner bubble is hidden (parent paints status in a message). */
|
|
42
44
|
showLoadingBubble?: boolean;
|
|
43
45
|
error?: string | null;
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
draft = $bindable(''),
|
|
84
86
|
loading = false,
|
|
85
87
|
loadingLabel = 'Procesando…',
|
|
88
|
+
statusSteps = [],
|
|
86
89
|
showLoadingBubble = true,
|
|
87
90
|
error = null,
|
|
88
91
|
voiceEnabled = true,
|
|
@@ -309,10 +312,21 @@
|
|
|
309
312
|
class="rounded-2xl rounded-bl-sm bg-surface-overlay px-3.5 py-2.5 text-sm leading-relaxed text-primary max-w-[calc(100%-2rem)] whitespace-pre-wrap"
|
|
310
313
|
>
|
|
311
314
|
{#if message.id === pendingAssistantId}
|
|
312
|
-
<
|
|
313
|
-
<
|
|
314
|
-
|
|
315
|
-
|
|
315
|
+
<div class="gap-1.5 flex flex-col">
|
|
316
|
+
<span class="gap-2 text-muted flex items-center">
|
|
317
|
+
<LoaderCircle size={14} strokeWidth={2} class="animate-spin shrink-0" />
|
|
318
|
+
{#if statusSteps.length === 0}
|
|
319
|
+
<span class="text-xs">{loadingLabel}</span>
|
|
320
|
+
{/if}
|
|
321
|
+
</span>
|
|
322
|
+
{#if statusSteps.length}
|
|
323
|
+
{#each statusSteps as step, i (i)}
|
|
324
|
+
<p class="text-[11px] text-muted">→ {step}</p>
|
|
325
|
+
{/each}
|
|
326
|
+
{/if}
|
|
327
|
+
</div>
|
|
328
|
+
{:else if loading && message === messages[messages.length - 1] && message.content}
|
|
329
|
+
{message.content}<span class="animate-pulse">▍</span>
|
|
316
330
|
{:else}
|
|
317
331
|
{message.content}
|
|
318
332
|
{/if}
|
|
@@ -20,6 +20,8 @@ interface AssistantChatProps {
|
|
|
20
20
|
draft?: string;
|
|
21
21
|
loading?: boolean;
|
|
22
22
|
loadingLabel?: string;
|
|
23
|
+
/** Atom-style progress lines inside the pending assistant bubble. */
|
|
24
|
+
statusSteps?: string[];
|
|
23
25
|
/** When false, the spinner bubble is hidden (parent paints status in a message). */
|
|
24
26
|
showLoadingBubble?: boolean;
|
|
25
27
|
error?: string | null;
|