From 8d874b839db169906e18e4277cd198504018e022 Mon Sep 17 00:00:00 2001
From: Kujtim Hoxha <kujtimii.h@gmail.com>
Date: Sat, 12 Apr 2025 02:01:45 +0200
Subject: add initial message handling

---
 internal/db/sql/messages.sql | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'internal/db/sql/messages.sql')

diff --git a/internal/db/sql/messages.sql b/internal/db/sql/messages.sql
index 64571158f..a59cebe7d 100644
--- a/internal/db/sql/messages.sql
+++ b/internal/db/sql/messages.sql
@@ -15,10 +15,11 @@ INSERT INTO messages (
     session_id,
     role,
     parts,
+    model,
     created_at,
     updated_at
 ) VALUES (
-    ?, ?, ?, ?, strftime('%s', 'now'), strftime('%s', 'now')
+    ?, ?, ?, ?, ?, strftime('%s', 'now'), strftime('%s', 'now')
 )
 RETURNING *;
 
@@ -26,9 +27,11 @@ RETURNING *;
 UPDATE messages
 SET
     parts = ?,
+    finished_at = ?,
     updated_at = strftime('%s', 'now')
 WHERE id = ?;
 
+
 -- name: DeleteMessage :exec
 DELETE FROM messages
 WHERE id = ?;
-- 
cgit v1.2.3

