Skip to content

Commit 96a873e

Browse files
committed
Fix github login
1 parent 8802b73 commit 96a873e

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

src/eca/diff.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
It ignores diff headers (---, +++), hunk markers (@@), and metadata lines starting with \\."
6363
[diff-text]
6464
(let [lines (string/split-lines diff-text)]
65-
(reduce (fn [{:keys [added removed] :as acc} line]
65+
(reduce (fn [acc line]
6666
(cond
6767
(or (string/starts-with? line "---")
6868
(string/starts-with? line "+++")

src/eca/features/login.clj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66

77
(defmulti login-step (fn [ctx] [(:provider ctx) (:step ctx)]))
88

9-
(defmethod login-step :default [_] "Unkown provider-id")
9+
(defmethod login-step :default [_] {:error "Unkown provider-id"})
1010

1111
(defn start [chat-id provider db*]
12-
(let [result (login-step {:chat-id chat-id
13-
:step :login/start
14-
:provider provider
15-
:db* db*})]
16-
result))
12+
(login-step {:chat-id chat-id
13+
:step :login/start
14+
:provider provider
15+
:db* db*}))
1716

1817
(defn continue [{:keys [message chat-id request-id]} db* messenger]
1918
(let [provider (get-in @db* [:chats chat-id :login-provider])

src/eca/features/tools/filesystem.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
:handler #'grep
333333
:summary-fn #'grep-summary}})
334334

335-
(defmethod tools.util/tool-call-details-before-invocation :eca_edit_file [name arguments]
335+
(defmethod tools.util/tool-call-details-before-invocation :eca_edit_file [_name arguments]
336336
(let [path (get arguments "path")
337337
original-content (get arguments "original_content")
338338
new-content (get arguments "new_content")
@@ -350,7 +350,7 @@
350350
(defmethod tools.util/tool-call-details-before-invocation :eca_plan_edit_file [name arguments]
351351
(tools.util/tool-call-details-before-invocation :eca_edit_file name arguments))
352352

353-
(defmethod tools.util/tool-call-details-before-invocation :eca_write_file [name arguments]
353+
(defmethod tools.util/tool-call-details-before-invocation :eca_write_file [_name arguments]
354354
(let [path (get arguments "path")
355355
content (get arguments "content")]
356356
(when (and path content)

src/eca/features/tools/mcp/clojure_mcp.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
(ns eca.features.tools.mcp.clojure-mcp
2-
(:require [clojure.string :as string]
3-
[eca.diff :as diff]
4-
[eca.features.tools.util :as tools.util]))
2+
(:require
3+
[clojure.string :as string]
4+
[eca.diff :as diff]
5+
[eca.features.tools.util :as tools.util]))
56

6-
(defmethod tools.util/tool-call-details-after-invocation :clojure_edit [name arguments details result]
7+
(defmethod tools.util/tool-call-details-after-invocation :clojure_edit [_name arguments details result]
78
(tools.util/tool-call-details-after-invocation :file_edit arguments details result))
89

9-
(defmethod tools.util/tool-call-details-after-invocation :clojure_edit_replace_sexp [name arguments details result]
10+
(defmethod tools.util/tool-call-details-after-invocation :clojure_edit_replace_sexp [_name arguments details result]
1011
(tools.util/tool-call-details-after-invocation :file_edit arguments details result))
1112

12-
(defmethod tools.util/tool-call-details-after-invocation :file_edit [name arguments details result]
13+
(defmethod tools.util/tool-call-details-after-invocation :file_edit [_name arguments _details result]
1314
(when-not (:error result)
1415
(when-let [diff (some->> result :contents (filter #(= :text (:type %))) first :text)]
1516
(let [{:keys [added removed]} (diff/unified-diff-counts diff)]
@@ -19,7 +20,7 @@
1920
:linesRemoved removed
2021
:diff diff}))))
2122

22-
(defmethod tools.util/tool-call-details-after-invocation :file_write [name arguments details result]
23+
(defmethod tools.util/tool-call-details-after-invocation :file_write [_name arguments _details result]
2324
(when-not (:error result)
2425
(when-let [diff (some->> result :contents
2526
(filter #(= :text (:type %)))

src/eca/features/tools/util.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
(defmulti tool-call-details-before-invocation
88
"Return the tool call details before invoking the tool."
9-
(fn [name arguments] (keyword name)))
9+
(fn [name _arguments] (keyword name)))
1010

11-
(defmethod tool-call-details-before-invocation :default [name arguments]
11+
(defmethod tool-call-details-before-invocation :default [_name _arguments]
1212
nil)
1313

1414
(defmulti tool-call-details-after-invocation
1515
"Return the tool call details after invoking the tool."
16-
(fn [name arguments details result] (keyword name)))
16+
(fn [name _arguments _details _result] (keyword name)))
1717

18-
(defmethod tool-call-details-after-invocation :default [name arguments details result]
18+
(defmethod tool-call-details-after-invocation :default [_name _arguments details _result]
1919
details)
2020

2121
(defn single-text-content [text & [error]]

src/eca/llm_api.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[clojure.string :as string]
55
[eca.config :as config]
66
[eca.llm-providers.anthropic :as llm-providers.anthropic]
7+
[eca.llm-providers.copilot]
78
[eca.llm-providers.ollama :as llm-providers.ollama]
89
[eca.llm-providers.openai :as llm-providers.openai]
910
[eca.llm-providers.openai-chat :as llm-providers.openai-chat]

0 commit comments

Comments
 (0)