From c400f40663275063a2219f4a3d187cf3d8efe5af Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 4 Oct 2024 19:24:36 -0700 Subject: [PATCH] enh: knowledge search in model editor --- .../Models/Knowledge/Selector.svelte | 51 +++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/src/lib/components/workspace/Models/Knowledge/Selector.svelte b/src/lib/components/workspace/Models/Knowledge/Selector.svelte index 30762bd2c..5cb22dc50 100644 --- a/src/lib/components/workspace/Models/Knowledge/Selector.svelte +++ b/src/lib/components/workspace/Models/Knowledge/Selector.svelte @@ -1,4 +1,6 @@ @@ -57,6 +75,7 @@ on:change={(e) => { if (e.detail === false) { onClose(); + query = ''; } }} > @@ -70,13 +89,39 @@ align="start" transition={flyAndScale} > -
- {#if items.length === 0} +
+
+
+ + + +
+ +
+
+ +
+ +
+ {#if filteredItems.length === 0}
{$i18n.t('No knowledge found')}
{:else} - {#each items as item} + {#each filteredItems as item} {