Elffuss BraidHub

kikocis/continue public

support for reading ./ paths (again?...)
Changesete035bf028461845b5ea015f497a99b65781c77b03c2325f34aedc65d1f64fdd0
AuthorNate <sestinj@gmail.com> · 2025-09-06 20:17 -07:00
CommitterNate <sestinj@gmail.com> · 2025-09-06 20:17 -07:00
Parentsf679de86c340

Browse the files at this changeset

1 file changed

modified extensions/cli/src/tools/readFile.ts +6 −2
@@ -20,13 +20,17 @@
2020 readonly: true,
2121 isBuiltIn: true,
2222 preprocess: async (args) => {
23- throwIfFileIsSecurityConcern(args.filepath);
23+ let { filepath } = args;
24+ if (filepath.startsWith("./")) {
25+ filepath = filepath.slice(2);
26+ }
27+ throwIfFileIsSecurityConcern(filepath);
2428 return {
2529 args,
2630 preview: [
2731 {
2832 type: "text",
29- content: `Will read ${formatToolArgument(args.filepath)}`,
33+ content: `Will read ${formatToolArgument(filepath)}`,
3034 },
3135 ],
3236 };