From ecadba6e44239c6d7a0a1ee8b46f4ec71b14a1cd Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Wed, 16 Aug 2023 13:11:43 +0100 Subject: [PATCH] AI question avatar --- src/lib/commandCenter/panels/ai.svelte | 11 +++++++- src/lib/components/avatarInitials.svelte | 3 +- src/routes/console/+layout.svelte | 35 +++++++++++------------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index 7aac568a6..85bd9fb9f 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -76,6 +76,11 @@ } $: answer = parseCompletion($completion); + + function getInitials(name: string) { + const [first, last] = name.split(' '); + return `${first[0]}${last[0]}`; + }