Add chat persistence with multi-session support#18
Conversation
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/18938176-f8ee-4198-8aed-5bd3c53fb369 Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/18938176-f8ee-4198-8aed-5bd3c53fb369 Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds SQLite-backed chat persistence with multi-session support, integrating chat session/message entities into EF Core and updating the MVC chat UI/controller to load, create, rename, delete, and continue persisted conversations.
Changes:
- Added
ChatSessionandChatSessionMessageentities, DbSets, relationship mapping, and migration. - Updated
ChatControllerto load persisted sessions/messages and persist new user/assistant messages. - Expanded the chat view with a session sidebar, server-rendered persisted messages, and session management actions.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
LifelogBb/Controllers/ChatController.cs |
Adds session-aware chat loading, sending, persistence, rename, create, and delete actions. |
LifelogBb/Views/Chat/Index.cshtml |
Adds chat sidebar, persisted message hydration, and client-side session actions. |
LifelogBb/Models/LifelogBbContext.cs |
Registers chat session DbSets and cascade relationship mapping. |
LifelogBb/Models/Entities/ChatSession.cs |
Adds chat session entity. |
LifelogBb/Models/Entities/ChatSessionMessage.cs |
Adds persisted chat message entity. |
LifelogBb/Models/Chat/ChatViewModel.cs |
Extends chat view model with session state. |
LifelogBb/Models/Chat/ChatSessionListItem.cs |
Adds sidebar session list item model. |
LifelogBb/Migrations/20260516065018_ChatPersistence.cs |
Creates chat persistence tables and FK/index. |
LifelogBb/Migrations/20260516065018_ChatPersistence.Designer.cs |
EF migration model snapshot for chat persistence. |
LifelogBb/Migrations/LifelogBbContextModelSnapshot.cs |
Updates EF model snapshot with chat entities. |
Files not reviewed (1)
- LifelogBb/Migrations/20260516065018_ChatPersistence.Designer.cs: Language not supported
|
@copilot apply changes based on the comments in this thread but don't over engineer the sanitizer. The app is supposed to have input/output in a more or less trusted env (self hosted llm or chat gpt) and instructions are also handled by the user so the risk is very low. |
…t, rename attr, remove History Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/5a0978d3-2505-456f-91f9-5bd3c8cb0bba Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Applied all review fixes in commit
|
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/bec98573-ee12-4c46-a333-cc5c36ca9d1f Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/bec98573-ee12-4c46-a333-cc5c36ca9d1f Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Implemented in This updates |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/bd9c72a4-f6d5-4fd7-8efd-8867ebc4db50 Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Agent-Logs-Url: https://github.com/spech66/lifelogbb/sessions/bd9c72a4-f6d5-4fd7-8efd-8867ebc4db50 Co-authored-by: spech66 <22615238+spech66@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.