From 49423da081d6fdffb0bd7275e070a2edeb28e3b5 Mon Sep 17 00:00:00 2001
From: adamdottv <2363879+adamdottv@users.noreply.github.com>
Date: Fri, 2 May 2025 09:24:24 -0500
Subject: feat: compact command with auto-compact

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

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

diff --git a/internal/db/sql/messages.sql b/internal/db/sql/messages.sql
index a59cebe7d..475b23a86 100644
--- a/internal/db/sql/messages.sql
+++ b/internal/db/sql/messages.sql
@@ -9,6 +9,12 @@ FROM messages
 WHERE session_id = ?
 ORDER BY created_at ASC;
 
+-- name: ListMessagesBySessionAfter :many
+SELECT *
+FROM messages
+WHERE session_id = ? AND created_at > ?
+ORDER BY created_at ASC;
+
 -- name: CreateMessage :one
 INSERT INTO messages (
     id,
-- 
cgit v1.2.3

