Skip to content

Commit 2b56c41

Browse files
committed
Fix tool call approval ignoring eca tools.
1 parent 75ed5e5 commit 2b56c41

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix tool call approval ignoring eca tools.
6+
57
## 0.73.3
68

79
- Fix tool call approval ignoring configs for mcp servers.

src/eca/features/tools.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
(f.tools.custom/definitions config))))
5656

5757
(defn native-tools [db config]
58-
(mapv #(assoc % :server "eca") (vals (native-definitions db config))))
58+
(mapv #(assoc % :server {:name "eca"}) (vals (native-definitions db config))))
5959

6060
(defn all-tools
6161
"Returns all available tools, including both native ECA tools

test/eca/features/tools_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(testing "Include enabled native tools"
3131
(is (match?
3232
(m/embeds [{:name "eca_directory_tree"
33-
:server "eca"
33+
:server {:name "eca"}
3434
:description string?
3535
:parameters some?
3636
:origin :native}])

test/eca/handlers_test.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454
(testing "Switching behavior updates tool status"
5555
(h/reset-components!)
5656
(h/config! {:behavior {"plan" {:disabledTools ["eca_edit_file" "eca_write_file"]}}})
57-
(with-redefs [f.tools/native-tools (constantly [{:name "eca_edit_file"}
58-
{:name "eca_read_file"}])]
57+
(with-redefs [f.tools/native-tools (constantly [{:name "eca_edit_file"
58+
:server {:name "eca"}}
59+
{:name "eca_read_file"
60+
:server {:name "eca"}}])]
5961
(handlers/chat-selected-behavior-changed (h/components)
6062
{:behavior "plan"})
6163
(is (match? {:tool-server-update [{:tools [{:name "eca_edit_file"

0 commit comments

Comments
 (0)