Skip to content

Commit 20aaeff

Browse files
committed
Support backwards compatibility
1 parent d057493 commit 20aaeff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/eca/features/chat.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,10 @@
14401440
"Remove messages from chat in db until content-id matches.
14411441
Then notify to clear chat and then the kept messages."
14421442
[{:keys [chat-id content-id include]} db* messenger]
1443-
(let [include (set include)
1443+
(let [include (if (seq include)
1444+
(set include)
1445+
;; backwards compatibility
1446+
["messages" "tools"])
14441447
all-messages (get-in @db* [:chats chat-id :messages])
14451448
tool-calls (get-in @db* [:chats chat-id :tool-calls])
14461449
new-messages (when (contains? include "messages")

0 commit comments

Comments
 (0)