feat: widgets and ai chat

This commit is contained in:
Rotimi Best
2026-04-27 11:40:38 +01:00
parent ae1801f85f
commit 5717dd8004
391 changed files with 28177 additions and 22467 deletions
@@ -0,0 +1,27 @@
<script lang="ts">
import LoaderIcon from '@lucide/svelte/icons/loader';
import CheckIcon from '@lucide/svelte/icons/check';
import { getToolLabel, getToolResultLabel } from '$features/ai-assistant/utils/tool-labels';
interface Props {
toolName: string;
state: string;
result?: unknown;
}
let { toolName, state, result }: Props = $props();
</script>
<div class="ui:bg-background/50 flex items-center gap-2 rounded border px-2 py-1 text-xs">
{#if state === 'call' || state === 'partial-call'}
<LoaderIcon size={12} class="animate-spin" />
<span class="ui:text-muted-foreground">
{getToolLabel(toolName)}...
</span>
{:else if state === 'result'}
<CheckIcon size={12} class="ui:text-primary" />
<span>
{getToolResultLabel(toolName, result)}
</span>
{/if}
</div>