Spaces:
Running
Running
feat(tools): ux improvement assistant tool picker
Browse files
src/lib/components/AssistantToolPicker.svelte
CHANGED
@@ -110,17 +110,23 @@
|
|
110 |
<div
|
111 |
class="invisible absolute z-10 mt-1 w-full rounded border border-gray-300 bg-white shadow-lg group-focus-within:visible"
|
112 |
>
|
113 |
-
{#
|
114 |
-
<
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
</div>
|
125 |
{/if}
|
126 |
</div>
|
|
|
110 |
<div
|
111 |
class="invisible absolute z-10 mt-1 w-full rounded border border-gray-300 bg-white shadow-lg group-focus-within:visible"
|
112 |
>
|
113 |
+
{#if inputValue === ""}
|
114 |
+
<p class="px-3 py-2 text-left text-xs text-gray-500">
|
115 |
+
Start typing to search for tools...
|
116 |
+
</p>
|
117 |
+
{:else}
|
118 |
+
{#each suggestions as suggestion}
|
119 |
+
<button
|
120 |
+
on:click|stopPropagation|preventDefault={() => addValue(suggestion)}
|
121 |
+
class="w-full cursor-pointer px-3 py-2 text-left hover:bg-blue-500 hover:text-white"
|
122 |
+
>
|
123 |
+
{suggestion.displayName}
|
124 |
+
{#if suggestion.createdByName}
|
125 |
+
<span class="text-xs text-gray-500"> by {suggestion.createdByName}</span>
|
126 |
+
{/if}
|
127 |
+
</button>
|
128 |
+
{/each}
|
129 |
+
{/if}
|
130 |
</div>
|
131 |
{/if}
|
132 |
</div>
|