From ab14c5292c9e5da4950e3a943d4d6b902f0796b3 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lopes" <26071571+TGlide@users.noreply.github.com> Date: Wed, 18 Jun 2025 11:05:28 +0100 Subject: [PATCH] add more icons --- eslint.config.js | 1 + src/lib/components/icons/cohere.svelte | 27 ++++++++++++++++++++ src/lib/components/icons/deepseek.svelte | 17 +++++++++++++ src/lib/utils/array.ts | 4 +++ src/routes/chat/+page.svelte | 4 +-- src/routes/chat/[id]/+page.svelte | 21 ++++++++++++++++ src/routes/chat/model-picker.svelte | 32 +++++------------------- 7 files changed, 78 insertions(+), 28 deletions(-) create mode 100644 src/lib/components/icons/cohere.svelte create mode 100644 src/lib/components/icons/deepseek.svelte diff --git a/eslint.config.js b/eslint.config.js index 826df7d..2826297 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -41,6 +41,7 @@ export default ts.config( ], }, ], + 'svelte/require-each-key': 'off', }, }, { diff --git a/src/lib/components/icons/cohere.svelte b/src/lib/components/icons/cohere.svelte new file mode 100644 index 0000000..0500afc --- /dev/null +++ b/src/lib/components/icons/cohere.svelte @@ -0,0 +1,27 @@ + + +Cohere diff --git a/src/lib/components/icons/deepseek.svelte b/src/lib/components/icons/deepseek.svelte new file mode 100644 index 0000000..4f3375f --- /dev/null +++ b/src/lib/components/icons/deepseek.svelte @@ -0,0 +1,17 @@ + + +DeepSeek diff --git a/src/lib/utils/array.ts b/src/lib/utils/array.ts index 9f7d58d..bd3aaee 100644 --- a/src/lib/utils/array.ts +++ b/src/lib/utils/array.ts @@ -112,3 +112,7 @@ export function* iterate(array: T[]): Generator> { ]; } } + +export function last(arr: T[]): T | undefined { + return arr[arr.length - 1]; +} diff --git a/src/routes/chat/+page.svelte b/src/routes/chat/+page.svelte index fb2a0f8..86f5aec 100644 --- a/src/routes/chat/+page.svelte +++ b/src/routes/chat/+page.svelte @@ -79,7 +79,7 @@ {/if}

- {#each Object.entries(suggestionCategories) as [category, opts]} + {#each Object.entries(suggestionCategories) as [category, opts] (category)}