From 306d0a7f2da409e71ecb7411a92d28002ba6f913 Mon Sep 17 00:00:00 2001 From: shahondin1624 Date: Thu, 12 Mar 2026 11:27:34 +0100 Subject: [PATCH] feat: add message input with send button and keyboard shortcuts - MessageInput component with textarea, send button, Enter-to-send - Shift+Enter for newline, auto-resize textarea - Disabled state while streaming, auto-focus after send - Integrated into /chat page with user message handling Closes #6 Co-Authored-By: Claude Opus 4.6 --- implementation-plans/_index.md | 1 + implementation-plans/issue-006.md | 17 +++++++ src/lib/components/MessageInput.svelte | 63 ++++++++++++++++++++++++++ src/routes/chat/+page.svelte | 13 ++++++ 4 files changed, 94 insertions(+) create mode 100644 implementation-plans/issue-006.md create mode 100644 src/lib/components/MessageInput.svelte diff --git a/implementation-plans/_index.md b/implementation-plans/_index.md index 0e7cf00..0279062 100644 --- a/implementation-plans/_index.md +++ b/implementation-plans/_index.md @@ -7,3 +7,4 @@ | #3 | Configure Caddy for gRPC-Web support | COMPLETED | [issue-003.md](issue-003.md) | | #4 | gRPC-Web client service layer | COMPLETED | [issue-004.md](issue-004.md) | | #5 | Chat page layout and message list component | COMPLETED | [issue-005.md](issue-005.md) | +| #6 | Message input with send and keyboard shortcuts | COMPLETED | [issue-006.md](issue-006.md) | diff --git a/implementation-plans/issue-006.md b/implementation-plans/issue-006.md new file mode 100644 index 0000000..ce86bbb --- /dev/null +++ b/implementation-plans/issue-006.md @@ -0,0 +1,17 @@ +--- +--- + +# Issue #6: Message input with send and keyboard shortcuts + +**Status:** COMPLETED +**Issue:** https://git.shahondin1624.de/llm-multiverse/llm-multiverse-ui/issues/6 +**Branch:** `feature/issue-6-message-input` + +## Acceptance Criteria + +- [x] Text input/textarea component for composing messages +- [x] Send button triggers message submission +- [x] Enter key sends message +- [x] Shift+Enter inserts newline +- [x] Input and send button disabled while a response is streaming +- [x] Input auto-focuses on page load and after send diff --git a/src/lib/components/MessageInput.svelte b/src/lib/components/MessageInput.svelte new file mode 100644 index 0000000..bfc6fcc --- /dev/null +++ b/src/lib/components/MessageInput.svelte @@ -0,0 +1,63 @@ + + +
+
+ + +
+
diff --git a/src/routes/chat/+page.svelte b/src/routes/chat/+page.svelte index 36341d3..e5c1496 100644 --- a/src/routes/chat/+page.svelte +++ b/src/routes/chat/+page.svelte @@ -1,8 +1,20 @@
@@ -11,4 +23,5 @@ +
-- 2.49.1