feat(FN-2001): merge fusion/fn-2001

This commit is contained in:
gsxdsm
2026-04-17 14:09:45 -07:00
parent 6f12375725
commit 0a2dc6105d
4 changed files with 148 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ import {
CentralCore,
GlobalSettingsStore,
TaskStore,
ensureMemoryFileWithBackend,
type RegisteredProject,
type IsolationMode,
type ProjectHealth,
@@ -364,11 +365,22 @@ export async function runProjectAdd(
// Activate the project (registration sets it to 'initializing')
await central.updateProject(project.id, { status: "active" });
// Bootstrap memory files (non-fatal if it fails)
let memoryInitialized = false;
try {
memoryInitialized = await ensureMemoryFileWithBackend(absolutePath);
} catch (err) {
console.warn(` ⚠ Warning: Could not initialize project memory: ${err instanceof Error ? err.message : String(err)}`);
}
console.log();
console.log(` ✓ Registered project '${projectName}'`);
console.log(` Location: ${formatDisplayPath(project.path)}`);
console.log(` ID: ${project.id}`);
console.log(` Isolation: ${project.isolationMode}`);
if (memoryInitialized) {
console.log(` Memory: initialized`);
}
console.log();
} finally {
await central.close();