From afd9ad0560d76c2a6d161dad52553b10ff428905 Mon Sep 17 00:00:00 2001
From: Kujtim Hoxha <kujtimii.h@gmail.com>
Date: Thu, 27 Mar 2025 22:35:48 +0100
Subject: rework llm

---
 internal/db/sql/sessions.sql | 3 +++
 1 file changed, 3 insertions(+)

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

diff --git a/internal/db/sql/sessions.sql b/internal/db/sql/sessions.sql
index 2be8b7ccc..f065b5f56 100644
--- a/internal/db/sql/sessions.sql
+++ b/internal/db/sql/sessions.sql
@@ -1,6 +1,7 @@
 -- name: CreateSession :one
 INSERT INTO sessions (
     id,
+    parent_session_id,
     title,
     message_count,
     prompt_tokens,
@@ -15,6 +16,7 @@ INSERT INTO sessions (
     ?,
     ?,
     ?,
+    ?,
     strftime('%s', 'now'),
     strftime('%s', 'now')
 ) RETURNING *;
@@ -27,6 +29,7 @@ WHERE id = ? LIMIT 1;
 -- name: ListSessions :many
 SELECT *
 FROM sessions
+WHERE parent_session_id is NULL
 ORDER BY created_at DESC;
 
 -- name: UpdateSession :one
-- 
cgit v1.2.3

