diff --git a/src/lib/components/common/Banner.svelte b/src/lib/components/common/Banner.svelte index 659950514..64a7a2054 100644 --- a/src/lib/components/common/Banner.svelte +++ b/src/lib/components/common/Banner.svelte @@ -39,7 +39,7 @@ {#if !dismissed} {#if mounted}
diff --git a/src/lib/components/common/Dropdown.svelte b/src/lib/components/common/Dropdown.svelte index 4beb1d26c..e8e1eb8b5 100644 --- a/src/lib/components/common/Dropdown.svelte +++ b/src/lib/components/common/Dropdown.svelte @@ -14,6 +14,7 @@ onOpenChange={(state) => { dispatch('change', state); }} + typeahead={false} > diff --git a/src/lib/components/common/Tags.svelte b/src/lib/components/common/Tags.svelte index c3eb3c99f..bc1e7b5b3 100644 --- a/src/lib/components/common/Tags.svelte +++ b/src/lib/components/common/Tags.svelte @@ -11,7 +11,7 @@ export let addTag: Function; -
+
{ diff --git a/src/lib/components/common/Tags/TagInput.svelte b/src/lib/components/common/Tags/TagInput.svelte index 31fe581a5..c583c897b 100644 --- a/src/lib/components/common/Tags/TagInput.svelte +++ b/src/lib/components/common/Tags/TagInput.svelte @@ -22,26 +22,12 @@ }; -
+
{#if showTagInput}
- { @@ -55,11 +41,27 @@
{/if} {#if label && !showTagInput} - {label} + {label} {/if}
diff --git a/src/lib/components/common/Tags/TagList.svelte b/src/lib/components/common/Tags/TagList.svelte index 09773a2dc..f1a23f6dc 100644 --- a/src/lib/components/common/Tags/TagList.svelte +++ b/src/lib/components/common/Tags/TagList.svelte @@ -7,22 +7,23 @@ {#each tags as tag}
{tag.name}
-
-
{$i18n.t('Description')}
+
+
+
{$i18n.t('Description')}
-
+ +
+ + {#if info.meta.description !== null} -
+ {/if}
+
+
{$i18n.t('Model Params')}
@@ -401,7 +424,9 @@
-
+
+ +
{$i18n.t('Prompt suggestions')}
@@ -491,8 +516,8 @@ {/if}
-
-
+
+
{$i18n.t('Capabilities')}
@@ -505,7 +530,7 @@ }} /> -
+
{$i18n.t(capability)}
@@ -513,7 +538,30 @@
-
+
+
+
{$i18n.t('Tags')}
+
+ +
+ { + info.meta.tags = info.meta.tags.filter((tag) => tag.name !== tagName); + }} + addTag={(tagName) => { + console.log(tagName); + if (!(info?.meta?.tags ?? null)) { + info.meta.tags = [{ name: tagName }]; + } else { + info.meta.tags = [...info.meta.tags, { name: tagName }]; + } + }} + /> +
+
+ +
{$i18n.t('JSON Preview')}
diff --git a/src/routes/(app)/workspace/models/edit/+page.svelte b/src/routes/(app)/workspace/models/edit/+page.svelte index 558ad3663..169d439fa 100644 --- a/src/routes/(app)/workspace/models/edit/+page.svelte +++ b/src/routes/(app)/workspace/models/edit/+page.svelte @@ -13,6 +13,7 @@ import AdvancedParams from '$lib/components/chat/Settings/Advanced/AdvancedParams.svelte'; import { getModels } from '$lib/apis'; import Checkbox from '$lib/components/common/Checkbox.svelte'; + import Tags from '$lib/components/common/Tags.svelte'; const i18n = getContext('i18n'); @@ -44,7 +45,8 @@ meta: { profile_image_url: '/favicon.png', description: '', - suggestion_prompts: null + suggestion_prompts: null, + tags: [] }, params: { system: '' @@ -223,26 +225,26 @@
-
+
-
{$i18n.t('Name')}*
+
{$i18n.t('Name')}*
-
{$i18n.t('Model ID')}*
+
{$i18n.t('Model ID')}*
{#if model.preset} -
-
{$i18n.t('Base Model (From)')}
+
+
{$i18n.t('Base Model (From)')}
-
+ {/if}
+
+
{$i18n.t('Model Params')}
@@ -369,7 +393,9 @@
-
+
+ +
{$i18n.t('Prompt suggestions')}
@@ -459,7 +485,7 @@ {/if}
-
+
{$i18n.t('Capabilities')}
@@ -481,7 +507,30 @@
-
+
+
+
{$i18n.t('Tags')}
+
+ +
+ { + info.meta.tags = info.meta.tags.filter((tag) => tag.name !== tagName); + }} + addTag={(tagName) => { + console.log(tagName); + if (!(info?.meta?.tags ?? null)) { + info.meta.tags = [{ name: tagName }]; + } else { + info.meta.tags = [...info.meta.tags, { name: tagName }]; + } + }} + /> +
+
+ +
{$i18n.t('JSON Preview')}