Skip to content

Commit 1e89bab

Browse files
committed
fix query context refactor
1 parent 2426f36 commit 1e89bab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
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 query context refactor
6+
57
## 0.17.1
68

79
- Avoid crash MCP start if doesn't support some capabilities.

src/eca/features/context.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
allowed-files (f.index/filter-allowed all-files root-filename config)]
4444
allowed-files))
4545

46-
(defn all-contexts [query config db*]
46+
(defn all-contexts [query db* config]
4747
(let [all-subfiles-and-dirs (into []
4848
(comp
4949
(map :uri)

src/eca/features/tools/filesystem.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434

3535
(defn ^:private read-file [arguments {:keys [db]}]
3636
(or (tools.util/invalid-arguments arguments (concat (path-validations db)
37-
[["path" fs/readable? "File $path is not readable"]]))
37+
[["path" fs/readable? "File $path is not readable"]
38+
["path" (complement fs/directory?) "$path is a directory, not a file"]]))
3839
(let [line-offset (get arguments "line_offset")
3940
limit (or (get arguments "limit") read-file-max-lines)
4041
content (cond-> (slurp (fs/file (fs/canonicalize (get arguments "path"))))

0 commit comments

Comments
 (0)