Skip to content

Commit df56d0f

Browse files
committed
Fix regression: /compact not working for some models.
Related to #240
1 parent 396d7fb commit df56d0f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Changelog
22

33
## Unreleased
4+
45
- Fix openai-chat tool call + support for Mistral API #233
56
- Skip missing/unreadable @file references when building context
7+
- Fix regression: /compact not working for some models. Related to #240
68

79
## 0.87.1
810

resources/prompts/compact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Purpose: To create a comprehensive record that ensures no important details or c
1717

1818
## Response
1919

20-
DONT reply anything to user, just call the `eca_compact_chat` tool with the created summary, the system will take care to present to user, ignore the tool call output as well.
20+
DONT reply anything to user, just call the `eca__compact_chat` tool with the created summary, the system will take care to present to user, ignore the tool call output as well.
2121

2222
DONT offer to compact automatically in the future.

src/eca/features/chat.clj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@
10121012
Run preRequest hooks before any heavy lifting.
10131013
Only :prompt-message supports rewrite, other only allow additionalContext append."
10141014
[user-messages source-type
1015-
{:keys [db* config chat-id full-model instructions metrics message] :as chat-ctx}]
1015+
{:keys [db* config chat-id full-model behavior instructions metrics message] :as chat-ctx}]
10161016
(let [original-text (or message (-> user-messages first :content first :text))
10171017
modify-allowed? (= source-type :prompt-message)
10181018
run-hooks? (#{:prompt-message :eca-command :mcp-prompt} source-type)
@@ -1067,7 +1067,7 @@
10671067
past-messages (get-in db [:chats chat-id :messages] [])
10681068
model-capabilities (get-in db [:models full-model])
10691069
provider-auth (get-in @db* [:auth provider])
1070-
all-tools (:all-tools chat-ctx)
1070+
all-tools (f.tools/all-tools chat-id behavior @db* config)
10711071
received-msgs* (atom "")
10721072
reasonings* (atom {})
10731073
add-to-history! (fn [msg]
@@ -1339,7 +1339,6 @@
13391339
:instructions instructions
13401340
:user-messages user-messages
13411341
:full-model full-model
1342-
:all-tools all-tools
13431342
:db* db*
13441343
:metrics metrics
13451344
:config config

0 commit comments

Comments
 (0)