journal/Journal.Core/Models/Conversation.cs
Jacob Schmidt 192e6e3891 feat: add AI coaching, conversation persistence, and LLamaSharp integration
- Add Journal.AI project with LLamaSharp-based AI service (Phi-3 model)
- Implement coach sessions (daily check-in, evening review, weekly review)
- Add conversation CRUD with SQLCipher persistence
- AI chat with full conversation history for context-aware replies
- Frontend: CoachPanel, AI stores, conversation stores, side panel UI
- Conversation list with create, rename, and delete support
- Fix Phi-3 output quality (system prompt leaking, token cleanup, JSON filtering)
- Fix CREATEDRAFT kind override in coach sessions

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-01 16:07:59 -06:00

34 lines
979 B
C#

namespace Journal.Core.Models;
public class Conversation
{
public Guid Id { get; }
public string Title { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public Conversation(string title)
{
if (string.IsNullOrWhiteSpace(title))
throw new ArgumentException("Title is required", nameof(title));
Id = Guid.NewGuid();
Title = title.Trim();
CreatedAt = DateTimeOffset.Now;
UpdatedAt = CreatedAt;
}
public Conversation(Guid id, string title, DateTimeOffset createdAt, DateTimeOffset updatedAt)
{
if (id == Guid.Empty)
throw new ArgumentException("Id is required", nameof(id));
if (string.IsNullOrWhiteSpace(title))
throw new ArgumentException("Title is required", nameof(title));
Id = id;
Title = title.Trim();
CreatedAt = createdAt;
UpdatedAt = updatedAt;
}
}