From 13b3449d82d06b4f259fe4c379fd7fec24e186cc Mon Sep 17 00:00:00 2001 From: Aidan Bleser <117548273+ieedan@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:14:41 -0500 Subject: [PATCH] WIP feat: Enhance prompt button (#31) --- src/app.css | 13 + .../components/animations/shiny-text.svelte | 31 + .../ui/sidebar/sidebar-sidebar.svelte | 2 +- src/lib/utils/rules.ts | 14 + src/routes/api/enhance-prompt/+server.ts | 132 +++ src/routes/api/enhance-prompt/call.ts | 31 + src/routes/api/generate-message/+server.ts | 15 +- src/routes/chat/+layout.svelte | 124 ++- src/routes/chat/+page.svelte | 4 + src/routes/chat/layout copy.svelte | 774 ++++++++++++++++++ src/routes/chat/search-modal.svelte | 2 +- vite.config.ts | 6 +- 12 files changed, 1102 insertions(+), 46 deletions(-) create mode 100644 src/lib/components/animations/shiny-text.svelte create mode 100644 src/lib/utils/rules.ts create mode 100644 src/routes/api/enhance-prompt/+server.ts create mode 100644 src/routes/api/enhance-prompt/call.ts create mode 100644 src/routes/chat/layout copy.svelte diff --git a/src/app.css b/src/app.css index 7e86435..5f5f1ca 100644 --- a/src/app.css +++ b/src/app.css @@ -147,6 +147,9 @@ --shadow-lg: var(--shadow-lg); --shadow-xl: var(--shadow-xl); --shadow-2xl: var(--shadow-2xl); + + /* For shiny text */ + --animate-shimmer: shimmer 1.5s infinite; } @theme inline { @@ -584,3 +587,13 @@ pre button.copy { opacity: 1; } } + +/* For shiny text */ +@keyframes shimmer { + 0% { + background-position: calc(-100% - var(--shimmer-width)) 0; + } + 100% { + background-position: calc(100% + var(--shimmer-width)) 0; + } +} diff --git a/src/lib/components/animations/shiny-text.svelte b/src/lib/components/animations/shiny-text.svelte new file mode 100644 index 0000000..5dcd114 --- /dev/null +++ b/src/lib/components/animations/shiny-text.svelte @@ -0,0 +1,31 @@ + + + + +
+ {@render children?.()} +
diff --git a/src/lib/components/ui/sidebar/sidebar-sidebar.svelte b/src/lib/components/ui/sidebar/sidebar-sidebar.svelte index d24f83a..acac6a6 100644 --- a/src/lib/components/ui/sidebar/sidebar-sidebar.svelte +++ b/src/lib/components/ui/sidebar/sidebar-sidebar.svelte @@ -12,7 +12,7 @@Add image
+Drop an image here to attach it to your message.
+