Skip to content

Commit c4f5427

Browse files
committed
Fix chat/queryContext to not return already added contexts
1 parent 29b0618 commit c4f5427

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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 `chat/queryContext` to not return already added contexts
6+
57
## 0.26.1
68

79
- Fix anthropic api for custom providers.

src/eca/features/context.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
(take 200) ;; for performance, user can always make query specific for better results.
5353
(map (fn [file-or-dir]
5454
{:type (if (fs/directory? file-or-dir)
55-
:directory
56-
:file)
55+
"directory"
56+
"file")
5757
:path (str (fs/canonicalize file-or-dir))})))
5858
(:workspace-folders @db*))
59-
root-dirs (mapv (fn [{:keys [uri]}] {:type :directory
59+
root-dirs (mapv (fn [{:keys [uri]}] {:type "directory"
6060
:path (shared/uri->filename uri)})
6161
(:workspace-folders @db*))
62-
mcp-resources (mapv #(assoc % :type :mcpResource) (f.mcp/all-resources @db*))]
63-
(concat [{:type :repoMap}]
62+
mcp-resources (mapv #(assoc % :type "mcpResource") (f.mcp/all-resources @db*))]
63+
(concat [{:type "repoMap"}]
6464
root-dirs
6565
all-subfiles-and-dirs
6666
mcp-resources)))

0 commit comments

Comments
 (0)