mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Add ability to import existing git repositories from absolute paths by copying them to the workspace. Backend changes: - Add helper functions: isValidGitRepo(), checkRepoNameAvailable(), copyRepoToWorkspace() - Add checkoutBranchSafely() helper for consistent branch handling across codebase - Modify initLocalRepo() to detect absolute vs relative paths - For absolute paths: validate, check if git repo, copy to workspace using git clone --local - For relative paths: maintain existing behavior (create new empty git repo) - Refactor switchBranch() to use shared checkoutBranchSafely() helper - Fail with clear error message if repo name already exists in workspace Frontend changes: - Update UI placeholder and help text to explain absolute path support - Branch help text adapts based on input type (absolute vs relative)