From 4ac46eeccf585e408d7d2bebad4b1d1841ba6e11 Mon Sep 17 00:00:00 2001 From: centdix Date: Tue, 27 May 2025 12:14:35 +0200 Subject: [PATCH] implement logic --- .../src/lib/components/chat/GlobalChat.svelte | 199 +++++------------- .../components/chat/GlobalChatDrawer.svelte | 10 +- .../components/{globalchat => chat}/core.ts | 0 .../lib/components/globalchat/Input.svelte | 65 ------ .../scripts/CreateActionsScript.svelte | 5 - .../src/routes/(root)/(logged)/+layout.svelte | 2 - 6 files changed, 58 insertions(+), 223 deletions(-) rename frontend/src/lib/components/{globalchat => chat}/core.ts (100%) delete mode 100644 frontend/src/lib/components/globalchat/Input.svelte diff --git a/frontend/src/lib/components/chat/GlobalChat.svelte b/frontend/src/lib/components/chat/GlobalChat.svelte index 4d8ca25e70..18c680565f 100644 --- a/frontend/src/lib/components/chat/GlobalChat.svelte +++ b/frontend/src/lib/components/chat/GlobalChat.svelte @@ -1,163 +1,72 @@
- -
-
- -

Global Chat

-
-
- -
-
- -
- {#each messages as msg (msg.timestamp.getTime())} -
-
+
+ {#each messages as msg} +
+

{msg.content}

- - {formatTime(msg.timestamp)} -
{/each} - - {#if $loading} + + {#if isSubmitting}
@@ -173,23 +82,25 @@
-

- Global chat with placeholder functionality - ready for AI integration -

-
\ No newline at end of file +
diff --git a/frontend/src/lib/components/chat/GlobalChatDrawer.svelte b/frontend/src/lib/components/chat/GlobalChatDrawer.svelte index 8276dd986a..694086d3f9 100644 --- a/frontend/src/lib/components/chat/GlobalChatDrawer.svelte +++ b/frontend/src/lib/components/chat/GlobalChatDrawer.svelte @@ -10,12 +10,8 @@ } - + - + - \ No newline at end of file + diff --git a/frontend/src/lib/components/globalchat/core.ts b/frontend/src/lib/components/chat/core.ts similarity index 100% rename from frontend/src/lib/components/globalchat/core.ts rename to frontend/src/lib/components/chat/core.ts diff --git a/frontend/src/lib/components/globalchat/Input.svelte b/frontend/src/lib/components/globalchat/Input.svelte deleted file mode 100644 index 63600dbc1a..0000000000 --- a/frontend/src/lib/components/globalchat/Input.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - -
-
{ - e.preventDefault() - handleSubmit() - }} - > - - - -
-
-

{currentReply}

-
-
diff --git a/frontend/src/lib/components/scripts/CreateActionsScript.svelte b/frontend/src/lib/components/scripts/CreateActionsScript.svelte index 475f9a92c8..15663add39 100644 --- a/frontend/src/lib/components/scripts/CreateActionsScript.svelte +++ b/frontend/src/lib/components/scripts/CreateActionsScript.svelte @@ -2,16 +2,11 @@ import { Code2, Plus } from 'lucide-svelte' import Button from '../common/button/Button.svelte' import { base } from '$lib/base' - import { goto } from '$app/navigation' // Reference to the button component let buttonComponent: { click: () => void } | undefined = undefined export function triggerClick() { - // Navigate to the script creation page directly - // goto(`${base}/scripts/add`) - - // Focus the button for visual feedback if (buttonComponent) { buttonComponent.click() } diff --git a/frontend/src/routes/(root)/(logged)/+layout.svelte b/frontend/src/routes/(root)/(logged)/+layout.svelte index 5a6dc8447f..7e396ab764 100644 --- a/frontend/src/routes/(root)/(logged)/+layout.svelte +++ b/frontend/src/routes/(root)/(logged)/+layout.svelte @@ -54,7 +54,6 @@ import { base } from '$app/paths' import { Menubar } from '$lib/components/meltComponents' import GlobalChatDrawer from '$lib/components/chat/GlobalChatDrawer.svelte' - import Input from '$lib/components/globalchat/Input.svelte' OpenAPI.WITH_CREDENTIALS = true let menuOpen = false @@ -661,7 +660,6 @@ >
-