From f21e9dbd9aa1fb6122618090f52a70760b88383a Mon Sep 17 00:00:00 2001 From: Clivia <132346501+Yanyutin753@users.noreply.github.com> Date: Sat, 3 Aug 2024 10:48:54 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=92=84=20Support=20@Model=20display?= =?UTF-8?q?=20model=20pictures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/chat/MessageInput/Models.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/MessageInput/Models.svelte b/src/lib/components/chat/MessageInput/Models.svelte index fb28cee59..81e065128 100644 --- a/src/lib/components/chat/MessageInput/Models.svelte +++ b/src/lib/components/chat/MessageInput/Models.svelte @@ -159,7 +159,12 @@ }} on:focus={() => {}} > -
+
+ Model {model.name}
From 8f494292281f5547677fcdd51dad84e1f2e97542 Mon Sep 17 00:00:00 2001 From: Clivia <132346501+Yanyutin753@users.noreply.github.com> Date: Sat, 3 Aug 2024 10:58:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E2=AD=90=20Show=20only=20models=20that=20a?= =?UTF-8?q?re=20not=20be=20hidden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/chat/MessageInput/Models.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Models.svelte b/src/lib/components/chat/MessageInput/Models.svelte index 81e065128..ccd455a99 100644 --- a/src/lib/components/chat/MessageInput/Models.svelte +++ b/src/lib/components/chat/MessageInput/Models.svelte @@ -21,8 +21,10 @@ let filteredModels = []; $: filteredModels = $models - .filter((p) => - p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') + .filter( + (p) => + p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') && + p?.info?.meta?.hidden ) .sort((a, b) => a.name.localeCompare(b.name)); From 028eb7b351bd44e92a2231b39d521dd820ab83d5 Mon Sep 17 00:00:00 2001 From: Clivia <132346501+Yanyutin753@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:00:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9C=A8=20Better=20Practice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Better Practice --- .../components/chat/MessageInput/Models.svelte | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Models.svelte b/src/lib/components/chat/MessageInput/Models.svelte index ccd455a99..249eb96a5 100644 --- a/src/lib/components/chat/MessageInput/Models.svelte +++ b/src/lib/components/chat/MessageInput/Models.svelte @@ -21,10 +21,8 @@ let filteredModels = []; $: filteredModels = $models - .filter( - (p) => - p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') && - p?.info?.meta?.hidden + .filter((p) => + p.name.toLowerCase().includes(prompt.toLowerCase().split(' ')?.at(0)?.substring(1) ?? '') ) .sort((a, b) => a.name.localeCompare(b.name)); @@ -149,9 +147,9 @@
{#each filteredModels as model, modelIdx} {/each}
From af9e0cc33a7f6470d9f6ce7bc1692ca233eed287 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 3 Aug 2024 16:01:25 +0200 Subject: [PATCH 4/4] fix --- src/lib/components/chat/MessageInput/Models.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/Models.svelte b/src/lib/components/chat/MessageInput/Models.svelte index 249eb96a5..c4655991f 100644 --- a/src/lib/components/chat/MessageInput/Models.svelte +++ b/src/lib/components/chat/MessageInput/Models.svelte @@ -149,7 +149,7 @@