diff --git a/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte b/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte index 4f28e59eae..58720a923f 100644 --- a/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte +++ b/src/lib/components/chat/MessageInput/CommandSuggestionList.svelte @@ -53,106 +53,103 @@ } - -
- {#if char === '/'} - { - const { type, data } = e; +
0 ? '' : 'hidden'} id="suggestions-container"> + +
+ {#if char === '/'} + { + const { type, data } = e; - if (type === 'prompt') { - insertTextHandler(data.content); - } - }} - /> - {:else if char === '#'} - { - const { type, data } = e; + if (type === 'prompt') { + insertTextHandler(data.content); + } + }} + /> + {:else if char === '#'} + { + const { type, data } = e; - if (type === 'knowledge') { - insertTextHandler(''); + if (type === 'knowledge') { + insertTextHandler(''); - onUpload({ - type: 'file', - data: data - }); - } else if (type === 'web') { - insertTextHandler(''); + onUpload({ + type: 'file', + data: data + }); + } else if (type === 'web') { + insertTextHandler(''); - onUpload({ - type: 'web', - data: data - }); - } - }} - /> - {:else if char === '@'} - { - const { type, data } = e; + onUpload({ + type: 'web', + data: data + }); + } + }} + /> + {:else if char === '@'} + { + const { type, data } = e; - if (type === 'model') { - insertTextHandler(''); + if (type === 'model') { + insertTextHandler(''); - onSelect({ - type: 'model', - data: data - }); - } - }} - /> - {:else if char === '$'} - { - const { type, data } = e; + onSelect({ + type: 'model', + data: data + }); + } + }} + /> + {:else if char === '$'} + { + const { type, data } = e; - if (type === 'skill') { - command({ - id: `${data.id}|${data.name}`, - label: data.name - }); + if (type === 'skill') { + command({ + id: `${data.id}|${data.name}`, + label: data.name + }); - onSelect({ - type: 'skill', - data: data - }); - } - }} - /> - {:else if char === ':'} - { - const { type, data } = e; + onSelect({ + type: 'skill', + data: data + }); + } + }} + /> + {:else if char === ':'} + { + const { type, data } = e; - if (type === 'emoji') { - command({ - id: data.name, - label: data.shortCodes[0] - }); - } - }} - /> - {/if} -
-
+ if (type === 'emoji') { + command({ + id: data.name, + label: data.shortCodes[0] + }); + } + }} + /> + {/if} +
+ +
diff --git a/src/lib/components/chat/MessageInput/Commands/Emojis.svelte b/src/lib/components/chat/MessageInput/Commands/Emojis.svelte index fd06bf8c6a..5e710039c4 100644 --- a/src/lib/components/chat/MessageInput/Commands/Emojis.svelte +++ b/src/lib/components/chat/MessageInput/Commands/Emojis.svelte @@ -64,14 +64,15 @@ {#if filteredItems.length > 0} -
+
{$i18n.t('Emojis')}
{#each filteredItems as emoji, emojiIdx} {:else if query.startsWith('http')} diff --git a/src/lib/components/chat/MessageInput/Commands/Skills.svelte b/src/lib/components/chat/MessageInput/Commands/Skills.svelte index d0aa784539..83fa24eec3 100644 --- a/src/lib/components/chat/MessageInput/Commands/Skills.svelte +++ b/src/lib/components/chat/MessageInput/Commands/Skills.svelte @@ -69,7 +69,7 @@ }; -
+
{$i18n.t('Skills')}
@@ -81,8 +81,9 @@ tippyOptions={{ maxWidth: '20rem' }} >