fix: remove hardcoded productName in workspace commands#588
fix: remove hardcoded productName in workspace commands#588
Conversation
- Add productName parameter to worktree utility functions (listWorktrees, createWorktree, deleteWorktree, generateWorkspaceName, addToGitExclude, getWorktreeFromPath, mergeWorktree)
- Update workspace commands (create, list, delete, complete) to pass productName from context
- Update nodeBridge handlers to pass context.productName to worktree functions
- Fix hardcoded '.neovate-workspaces' to use dynamic '.{productName}-workspaces'
- Fix hardcoded error messages to use context.productName instead of 'neo'
- Update WorkspaceList component to accept and use productName prop
This ensures workspace functionality works correctly regardless of the productName value (e.g., 'neo', 'neovate', or any other name).
🤖 Augment PR SummarySummary: This PR removes hardcoded workspace/product identifiers so workspace commands work with any configured Changes:
Technical Notes: Worktree discovery now filters Git worktrees by a product-specific workspace directory name, so consistent normalization of 🤖 Was this summary useful? React with 👍 or 👎 |
src/worktree.ts
Outdated
| if (!worktree) { | ||
| throw new Error( | ||
| `Workspace '${name}' not found. Use 'neo workspace list' to see active workspaces.`, | ||
| `Workspace '${name}' not found. Use workspace list to see active workspaces.`, |
There was a problem hiding this comment.
deleteWorktree now throws Use workspace list... without including the CLI prefix, which can make the guidance ambiguous when multiple products/CLIs exist. Since productName is already a parameter, consider including it in this user-facing message for consistency with the other errors.
🤖 Was this useful? React with 👍 or 👎
| export function WorkspaceList({ | ||
| worktrees, | ||
| verbose, | ||
| productName = 'neo', |
There was a problem hiding this comment.
This ensures workspace functionality works correctly regardless of the productName value (e.g., 'neo', 'neovate', or any other name).