Elffuss BraidHub

kikocis/continue public

fix: try to resolve path to open files if not in workspace
Changesetae0f6b584d4fef45a7e899e1f58ce7d5a75fd528ebc65b0c0b4d325b5a863cd2
AuthorNate <sestinj@gmail.com> · 2025-09-09 22:37 -07:00
CommitterNate <sestinj@gmail.com> · 2025-09-09 22:37 -07:00
Parentsb7c96fb1b25b

Browse the files at this changeset

1 file changed

modified gui/src/util/clientTools/editImpl.ts +13 −1
@@ -12,10 +12,22 @@
1212 "`filepath` and `changes` arguments are required to edit an existing file.",
1313 );
1414 }
15- const firstUriMatch = await resolveRelativePathInDir(
15+
16+ const openFiles = await extras.ideMessenger.ide.getOpenFiles();
17+ let firstUriMatch = await resolveRelativePathInDir(
1618 args.filepath,
1719 extras.ideMessenger.ide,
1820 );
21+
22+ if (!firstUriMatch) {
23+ for (const uri of openFiles) {
24+ if (uri.endsWith(args.filepath)) {
25+ firstUriMatch = uri;
26+ break;
27+ }
28+ }
29+ }
30+
1931 if (!firstUriMatch) {
2032 throw new Error(`${args.filepath} does not exist`);
2133 }