(projectPath: string)
| 88 | * Remove a specific project from the recent projects list |
| 89 | */ |
| 90 | export const removeRecentProject = (projectPath: string): void => { |
| 91 | const recentProjectsPath = getRecentProjectsPath() |
| 92 | |
| 93 | try { |
| 94 | const existingProjects = loadRecentProjects() |
| 95 | const filteredProjects = existingProjects.filter( |
| 96 | (p) => p.path !== projectPath, |
| 97 | ) |
| 98 | |
| 99 | fs.writeFileSync( |
| 100 | recentProjectsPath, |
| 101 | JSON.stringify(filteredProjects, null, 2), |
| 102 | ) |
| 103 | } catch (error) { |
| 104 | logger.debug( |
| 105 | { error: error instanceof Error ? error.message : String(error) }, |
| 106 | 'Error removing recent project', |
| 107 | ) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Save a project to the recent projects list. |
nothing calls this directly
no test coverage detected