Spaces:
Sleeping
Sleeping
feat(chat): auto-open reasoning results on loading
Browse files
src/lib/components/chat/OpenReasoningResults.svelte
CHANGED
|
@@ -9,9 +9,15 @@
|
|
| 9 |
}
|
| 10 |
|
| 11 |
let { summary, content, loading = false }: Props = $props();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
</script>
|
| 13 |
|
| 14 |
<details
|
|
|
|
| 15 |
class="group flex w-fit max-w-full flex-col rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900"
|
| 16 |
>
|
| 17 |
<summary
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
let { summary, content, loading = false }: Props = $props();
|
| 12 |
+
let isOpen = $state(loading);
|
| 13 |
+
|
| 14 |
+
$effect(() => {
|
| 15 |
+
isOpen = loading;
|
| 16 |
+
});
|
| 17 |
</script>
|
| 18 |
|
| 19 |
<details
|
| 20 |
+
bind:open={isOpen}
|
| 21 |
class="group flex w-fit max-w-full flex-col rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900"
|
| 22 |
>
|
| 23 |
<summary
|