(
projectPath: string,
oldName: string,
newName: string,
_abortSignal?: AbortSignal,
trusted?: boolean
)
| 869 | } |
| 870 | |
| 871 | async renameWorkspace( |
| 872 | projectPath: string, |
| 873 | oldName: string, |
| 874 | newName: string, |
| 875 | _abortSignal?: AbortSignal, |
| 876 | trusted?: boolean |
| 877 | ): Promise< |
| 878 | { success: true; oldPath: string; newPath: string } | { success: false; error: string } |
| 879 | > { |
| 880 | // Stop container before rename (container labels reference old path) |
| 881 | const oldPath = this.getWorkspacePath(projectPath, oldName); |
| 882 | await devcontainerDown(oldPath, this.configPath); |
| 883 | |
| 884 | // Rename worktree on host |
| 885 | const result = await this.worktreeManager.renameWorkspace( |
| 886 | projectPath, |
| 887 | oldName, |
| 888 | newName, |
| 889 | trusted |
| 890 | ); |
| 891 | |
| 892 | if (result.success) { |
| 893 | // Update current workspace path if this was the active workspace |
| 894 | if (this.currentWorkspacePath === oldPath) { |
| 895 | this.currentWorkspacePath = result.newPath; |
| 896 | } |
| 897 | } |
| 898 | |
| 899 | return result; |
| 900 | } |
| 901 | |
| 902 | async deleteWorkspace( |
| 903 | projectPath: string, |
nothing calls this directly
no test coverage detected