feat(chat): added chat interface and connection to ollama #10

Merged
sharang merged 6 commits from feat/CAI-20 into main 2026-02-20 19:40:26 +00:00

6 Commits

Author SHA1 Message Date
Sharang Parnerkar
b7df8222bb feat(ui): add privacy policy and impressum links to sidebar footer
All checks were successful
CI / Format (push) Successful in 3s
CI / Clippy (push) Successful in 2m29s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Format (pull_request) Successful in 2s
CI / Clippy (pull_request) Successful in 2m19s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Deploy (push) Has been skipped
CI / Deploy (pull_request) Has been skipped
Add legal links below the social icons in the sidebar footer,
matching the existing links on the landing page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:37:23 +01:00
Sharang Parnerkar
7bff029194 feat(chat): add copy, share, and edit action buttons above input bar
All checks were successful
CI / Format (push) Successful in 4s
CI / Clippy (push) Successful in 2m34s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Deploy (push) Has been skipped
Add ChatActionBar component with three icon buttons above the chat
input:
- Copy: copies last assistant response to clipboard
- Share: copies full conversation text to clipboard
- Edit: removes last user message and places it back in input

Buttons are disabled when no relevant messages exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 20:00:33 +01:00
Sharang Parnerkar
515347d896 fix(chat): load messages when clicking a session in sidebar
Move active_session_id signal read inside the use_resource closure
so it is tracked as a reactive dependency. Previously the read
happened outside, so use_resource never re-fetched messages on
session change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:48:27 +01:00
Sharang Parnerkar
0ca0366f3a feat(chat): integrate News namespace sessions from dashboard
Dashboard article follow-up chats now persist to MongoDB as News
namespace sessions, making them visible in the Chat page sidebar
under "News Chats".

On first follow-up message: creates a News session with the article
title/URL, saves the system context message, then persists each
user and assistant message. Subsequent messages in the same article
reuse the existing session ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:43:35 +01:00
Sharang Parnerkar
1a244f8f3d feat(chat): add LibreChat-inspired chat interface with MongoDB persistence
Implement full chat functionality with persistent sessions and messages
stored in MongoDB, LLM completion via Ollama (with multi-provider
dispatch support), markdown rendering, and a model selector.

- Add ChatSession/ChatMessage models with serde attributes for MongoDB
  ObjectId handling (skip_serializing_if empty, alias _id)
- Add CRUD server functions: list/create/rename/delete sessions,
  list/save messages, non-streaming chat completion
- Add raw Document collection accessor for BSON ObjectId -> String
  conversion in read paths
- Add SSE streaming endpoint (Axum handler) for future streaming support
- Add provider dispatch client (Ollama, OpenAI, Anthropic, HuggingFace)
- Add frontend components: ChatSidebar with namespace grouping,
  ChatModelSelector, ChatMessageList, ChatInputBar, ChatBubble with
  pulldown-cmark markdown rendering and StreamingBubble thinking indicator
- Rewrite ChatPage with full signal-based state management
- Add comprehensive CSS for chat UI, markdown prose, animations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:40:31 +01:00
Sharang Parnerkar
1f9629f111 feat(auth): add custom Keycloak login theme matching dashboard
Branded Keycloak login page with CERTifAI dark theme: indigo/teal
color palette, Inter + Space Grotesk fonts, animated background
gradients, card glow, logo float, and button shimmer effects.
Overrides PatternFly v4 defaults including autofill color fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:15:37 +01:00