INNER CODE UNIT · JavaScript

addRecentProject

frangoteam/FUXA · app/electron/main.js:125

async function addRecentProject(projectDir, projectName) {
    try {
        const config = await loadConfig();
        const newProject = {
            name: projectName || path.basename(projectDir),
            path: projectDir,
            createdAt: new Date().toISOString()
        };
        config.recentProjects = (config.recentProjects || []).filter(p => p.path !== projectDir);
        config.recentProjects.unshift(newProject);
        if (config.recentProjects.length > 5) config.recentProjects.pop();
        await saveConfig(config);
    } catch (error) {
        console.error('Failed to add recent project:', error.message);
    }
}

// Create new project with custom name

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…