Elffuss BraidHub

kikocis/continue public

Merge pull request #7622 from continuedev/nate/cn-updates-for-serve

support for reading ./ paths (again?...)
Changeset7a512fed920fb670c82e9782b2cdff71b6b489101ecea48ce56b92bd1c9e8017
AuthorDallin Romney <dallinromney@gmail.com> · 2025-09-08 16:27 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-08 16:27 -07:00
Parentsd1aa4d889681, e035bf028461

Browse the files at this changeset

1 file changed

modified extensions/cli/src/tools/readFile.ts +6 −2
@@ -25,13 +25,17 @@
2525 readonly: true,
2626 isBuiltIn: true,
2727 preprocess: async (args) => {
28- throwIfFileIsSecurityConcern(args.filepath);
28+ let { filepath } = args;
29+ if (filepath.startsWith("./")) {
30+ filepath = filepath.slice(2);
31+ }
32+ throwIfFileIsSecurityConcern(filepath);
2933 return {
3034 args,
3135 preview: [
3236 {
3337 type: "text",
34- content: `Will read ${formatToolArgument(args.filepath)}`,
38+ content: `Will read ${formatToolArgument(filepath)}`,
3539 },
3640 ],
3741 };