This commit is contained in:
Timothy Jaeryang Baek
2026-08-10 23:37:45 -06:00
parent 934802e186
commit bd250a0e24
6 changed files with 24 additions and 19 deletions
+2 -2
View File
@@ -140,8 +140,8 @@
class="{buttonClassName} cursor-pointer"
on:click={(e) => {
e.stopPropagation();
toggleOpen();
}}
on:pointerup={toggleOpen}
>
<div>
<div class="flex items-start justify-between">
@@ -162,7 +162,7 @@
{#if open && !hide}
<div
transition:slide={{ duration: 300, easing: quintOut, axis: 'y' }}
on:pointerup={(e) => {
on:click={(e) => {
e.stopPropagation();
}}
>
-3
View File
@@ -175,9 +175,6 @@
{#if onAdd}
<button
class="absolute z-10 right-2 invisible group-hover:visible self-center flex items-center dark:text-gray-300"
on:pointerup={(e) => {
e.stopPropagation();
}}
on:click={(e) => {
e.stopPropagation();
onAdd();
@@ -95,6 +95,19 @@
$: parsedArgs = parseArguments(args);
$: parsedResult = parseJSONString(result);
const toggleOpen = () => {
open = !open;
};
const toggleOpenOnKeydown = (event: KeyboardEvent) => {
if (event.key !== 'Enter' && event.key !== ' ') {
return;
}
event.preventDefault();
toggleOpen();
};
</script>
<div {id} class={className}>
@@ -119,12 +132,12 @@
</div>
{:else}
<!-- Tool call display -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="{buttonClassName} cursor-pointer"
on:pointerup={() => {
open = !open;
}}
role="button"
tabindex="0"
on:click={toggleOpen}
on:keydown={toggleOpenOnKeydown}
>
<div
class="w-full max-w-full font-normal flex items-center gap-1.5 {isExecuting