Commit 9b77b52
authored
fix: migrate FileUtils to VFS (#6866)
* fix: migrate FileUtils to VFS
I replicated the original behavior, for example, writeFile should automatically create dirs + overwrite the file (if exists), readText normalizes line endings + limits the output to 10k chars, etc. All those details should be covered by unit test.
Also, I removed some usages of UriUtils because if we treat "file URIs" as URLs, we can use refreshAndFindFileByUrl. It works, but we should keep that in mind.
### Extra: Manual testing
(I did it myself on top of the unit tests, but I’m posting the instructions here in case someone wants to reproduce it)
* writeFile - run Continue in agentic mode and ask smth like: "create scss/test.scss"
* listDir (+ getFileStats) - ask: "list files in project root"
* openFile/showFile - edit a rule using the toolbar (pen icon)
* fileExists - is invoked on startup multiple times
* readFile - is invoked on startup multiple times (put some files into .continue/*)
* fix: remove params in FileUtils
* fix: read from documents if possible1 parent 4752d7a commit 9b77b52
File tree
3 files changed
+225
-110
lines changed- extensions/intellij/src
- main/kotlin/com/github/continuedev/continueintellijextension/continue
- file
- test/kotlin/com/github/continuedev/continueintellijextension/unit
3 files changed
+225
-110
lines changedLines changed: 11 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 201 | + | |
| 202 | + | |
213 | 203 | | |
214 | 204 | | |
215 | 205 | | |
| |||
278 | 268 | | |
279 | 269 | | |
280 | 270 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
291 | 274 | | |
292 | | - | |
293 | 275 | | |
294 | 276 | | |
295 | 277 | | |
| |||
604 | 586 | | |
605 | 587 | | |
606 | 588 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 589 | + | |
| 590 | + | |
612 | 591 | | |
613 | 592 | | |
614 | 593 | | |
| |||
Lines changed: 91 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
14 | | - | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
25 | 49 | | |
26 | 50 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
31 | 60 | | |
32 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
33 | 65 | | |
34 | 66 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
44 | 75 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
65 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
66 | 95 | | |
67 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
68 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
69 | 110 | | |
0 commit comments