|
41 | 41 | {:type "file" :path (h/file-path (str root "/dir/nested.txt"))} |
42 | 42 | {:type "file" :path (h/file-path (str root "/bar.txt"))} |
43 | 43 | {:type "mcpResource" :uri "mcp://r1"}] |
44 | | - (f.context/all-contexts nil (h/db*) (h/config))))))) |
| 44 | + (f.context/all-contexts nil false (h/db*) (h/config))))))) |
45 | 45 |
|
46 | 46 | (testing "respects the query by limiting glob results" |
47 | 47 | (h/reset-components!) |
|
57 | 57 | fs/canonicalize identity |
58 | 58 | f.index/filter-allowed (fn [file-paths _root _config] file-paths) |
59 | 59 | f.mcp/all-resources (fn [_db] [])] |
60 | | - (let [result (f.context/all-contexts "foo" (h/db*) {})] |
| 60 | + (let [result (f.context/all-contexts "foo" false (h/db*) {})] |
61 | 61 | ;; Should include foo.txt but not bar.txt |
62 | 62 | (is (some #(= {:type "file" :path (str root "/foo.txt")} %) result)) |
63 | 63 | (is (not (some #(= {:type "file" :path (str root "/bar.txt")} %) result))))))) |
|
85 | 85 | fs/canonicalize identity |
86 | 86 | f.index/filter-allowed (fn [file-paths _root _config] file-paths) |
87 | 87 | f.mcp/all-resources (fn [_db] [])] |
88 | | - (let [result (f.context/all-contexts nil (h/db*) {})] |
| 88 | + (let [result (f.context/all-contexts nil false (h/db*) {})] |
89 | 89 | ;; Root directories present |
90 | 90 | (is (some #(= {:type "directory" :path root1} %) result)) |
91 | 91 | (is (some #(= {:type "directory" :path root2} %) result)) |
|
107 | 107 | f.index/filter-allowed (fn [files _root _config] files)] |
108 | 108 | (let [db* (atom {:workspace-folders [{:uri (h/file-uri "file:///fake/repo")}]}) |
109 | 109 | config {} |
110 | | - results (f.context/all-contexts "readme" db* config) |
| 110 | + results (f.context/all-contexts "readme" false db* config) |
111 | 111 | file-paths (->> results (filter #(= "file" (:type %))) (map :path) set)] |
112 | 112 | (is (contains? file-paths readme))))))) |
113 | 113 |
|
|
128 | 128 | fs/canonicalize identity |
129 | 129 | f.index/filter-allowed (fn [file-paths _root _config] file-paths) |
130 | 130 | f.mcp/all-resources (fn [_] [])] |
131 | | - (let [result (f.context/all-contexts "./src" db* {})] |
| 131 | + (let [result (f.context/all-contexts "./src" false db* {})] |
132 | 132 | ;; Root directory present |
133 | 133 | (is (some #(= {:type "directory" :path root} %) result)) |
134 | 134 | ;; Entries mapped from the relative listing |
|
154 | 154 | fs/canonicalize identity |
155 | 155 | f.index/filter-allowed (fn [file-paths _root _config] file-paths) |
156 | 156 | f.mcp/all-resources (fn [_] [])] |
157 | | - (let [result (f.context/all-contexts "./missing/file" db* {})] |
| 157 | + (let [result (f.context/all-contexts "./missing/file" false db* {})] |
158 | 158 | ;; Root directory present |
159 | 159 | (is (some #(= {:type "directory" :path root} %) result)) |
160 | 160 | ;; Entries mapped from the parent listing |
|
179 | 179 | fs/canonicalize identity |
180 | 180 | f.index/filter-allowed (fn [file-paths _root _config] file-paths) |
181 | 181 | f.mcp/all-resources (fn [_] [])] |
182 | | - (let [result (f.context/all-contexts "~" db* {})] |
| 182 | + (let [result (f.context/all-contexts "~" false db* {})] |
183 | 183 | ;; Root directory present |
184 | 184 | (is (some #(= {:type "directory" :path root} %) result)) |
185 | 185 | ;; Entries from home listing |
|
0 commit comments