Commit 24f76cc
committed
address PR review comments for prompt path handling
- Treat path traversal as hard failure: return blocked=true with empty
resolvedPath instead of leaking the outside-root absolute path
- Handle file:// URIs in resolvePromptFilePath via fileURLToPath so all
callers (queryPath, workspaceUri, etc.) get consistent URI handling
- Replace synchronous existsSync with async fs/promises.access to avoid
blocking the event loop on the prompt hot path
- Fix integration test success condition to fail when no tests executed
- Make VS Code e2e invalid-language test deterministic (assert inline
validation instead of accepting both throw and inline error)
- Fix misleading test name "should return the original path" to match
actual behavior (resolves relative to workspace root)1 parent e07ae1b commit 24f76cc
File tree
6 files changed
+158
-132
lines changed- client/src/lib
- extensions/vscode/test/suite
- server
- dist
- src/prompts
- test/src/prompts
6 files changed
+158
-132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| |||
Lines changed: 19 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
190 | 189 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
208 | 200 | | |
209 | 201 | | |
210 | 202 | | |
| |||
0 commit comments