Skip to content

Commit 9a330d9

Browse files
committed
Improve project discovery
1 parent 086bf7d commit 9a330d9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/tools/discover_projects.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* - Recursively scanning directories for Xcode projects and workspaces
1010
* - Filtering out common directories that should be skipped (build, DerivedData, etc.)
1111
* - Respecting maximum depth limits to prevent excessive scanning
12-
* - Providing formatted output with relative paths for discovered files
12+
* - Providing formatted output with absolute paths for discovered files
1313
*/
1414

1515
import { z } from 'zod';
@@ -84,12 +84,12 @@ async function _findProjectsRecursive(
8484
let isXcodeBundle = false;
8585

8686
if (entry.name.endsWith('.xcodeproj')) {
87-
results.projects.push(relativePath);
88-
log('debug', `Found project: ${relativePath}`);
87+
results.projects.push(absoluteEntryPath); // Use absolute path
88+
log('debug', `Found project: ${absoluteEntryPath}`);
8989
isXcodeBundle = true;
9090
} else if (entry.name.endsWith('.xcworkspace')) {
91-
results.workspaces.push(relativePath);
92-
log('debug', `Found workspace: ${relativePath}`);
91+
results.workspaces.push(absoluteEntryPath); // Use absolute path
92+
log('debug', `Found workspace: ${absoluteEntryPath}`);
9393
isXcodeBundle = true;
9494
}
9595

@@ -224,15 +224,15 @@ async function _handleDiscoveryLogic(params: DiscoverProjectsParams): Promise<To
224224
if (results.projects.length > 0) {
225225
responseContent.push(
226226
createTextContent(
227-
`Projects (relative to workspace root):\n - ${results.projects.join('\n - ')}`,
227+
`Projects found:\n - ${results.projects.join('\n - ')}`,
228228
),
229229
);
230230
}
231231

232232
if (results.workspaces.length > 0) {
233233
responseContent.push(
234234
createTextContent(
235-
`Workspaces (relative to workspace root):\n - ${results.workspaces.join('\n - ')}`,
235+
`Workspaces found:\n - ${results.workspaces.join('\n - ')}`,
236236
),
237237
);
238238
}

0 commit comments

Comments
 (0)