Skip to content

Commit 290c6fe

Browse files
authored
feat: add extra affordances to make it obvious websearch & reasoning can be opened (#1613)
1 parent ff9a4ce commit 290c6fe

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/lib/components/OpenWebSearchResults.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import CarbonError from "~icons/carbon/error-filled";
99
import EosIconsLoading from "~icons/eos-icons/loading";
1010
import IconInternet from "./icons/IconInternet.svelte";
11+
import CarbonCaretDown from "~icons/carbon/caret-down";
1112
1213
export let webSearchMessages: MessageWebSearchUpdate[] = [];
1314
@@ -22,9 +23,11 @@
2223
</script>
2324

2425
<details
25-
class="flex w-fit max-w-full rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900"
26+
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"
2627
>
27-
<summary class="grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2">
28+
<summary
29+
class="grid min-w-72 cursor-pointer select-none grid-cols-[40px,1fr,24px] items-center gap-2.5 rounded-xl p-2 group-open:rounded-b-none hover:bg-gray-500/10"
30+
>
2831
<div
2932
class="relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-100 dark:bg-gray-800"
3033
>
@@ -59,6 +62,7 @@
5962
{/if}
6063
</dt>
6164
</dl>
65+
<CarbonCaretDown class="size-6 text-gray-400 transition-transform group-open:rotate-180" />
6266
</summary>
6367

6468
<div class="content px-5 pb-5 pt-4">

src/lib/components/chat/ChatInput.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
enterkeyhint={!isVirtualKeyboard() ? "enter" : "send"}
6666
tabindex="0"
6767
rows="1"
68-
class="scrollbar-custom absolute max-sm:text-[16px] max-sm:p-2.5 top-0 m-0 h-full w-full resize-none scroll-p-3 overflow-x-hidden overflow-y-scroll border-0 bg-transparent p-3 outline-none focus:ring-0 focus-visible:ring-0"
68+
class="scrollbar-custom absolute top-0 m-0 h-full w-full resize-none scroll-p-3 overflow-x-hidden overflow-y-scroll border-0 bg-transparent p-3 outline-none focus:ring-0 focus-visible:ring-0 max-sm:p-2.5 max-sm:text-[16px]"
6969
class:text-gray-400={disabled}
7070
bind:value
7171
bind:this={textareaElement}

src/lib/components/chat/OpenReasoningResults.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<script lang="ts">
22
import MarkdownRenderer from "./MarkdownRenderer.svelte";
3+
import CarbonCaretDown from "~icons/carbon/caret-down";
34
45
export let summary: string;
56
export let content: string;
67
export let loading: boolean = false;
78
</script>
89

910
<details
10-
class="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"
11+
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"
1112
>
1213
<summary
13-
class="grid min-w-72 cursor-pointer select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"
14+
class="
15+
grid min-w-72 cursor-pointer select-none grid-cols-[40px,1fr,24px] items-center gap-2.5 rounded-xl p-2 group-open:rounded-b-none hover:bg-gray-500/10"
1416
>
1517
<div
1618
class="relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-100 dark:bg-gray-800"
@@ -49,6 +51,7 @@
4951
{summary}
5052
</dt>
5153
</dl>
54+
<CarbonCaretDown class="size-6 text-gray-400 transition-transform group-open:rotate-180" />
5255
</summary>
5356

5457
<div

0 commit comments

Comments
 (0)