feat(FN-3229): add async planning draft sync to avoid blocking while typing

Merged two changes: a new feature (FN-3229) that syncs planning drafts to the server in real-time while the user types, adding a PlanningModeModal component, a new ai-session-store for managing session state, and a dashboard API route to persist drafts; plus a performance fix replacing a blocking `e

Fusion-Task-Id: FN-3229
This commit is contained in:
Fusion
2026-05-02 19:21:38 -07:00
committed by gsxdsm
parent 488024ebfb
commit 963e11e578
6 changed files with 199 additions and 0 deletions

View File

@@ -7235,6 +7235,17 @@ export function pingSession(sessionId: string, projectId?: string): Promise<{ ok
});
}
export function updatePlanningSessionDraft(
sessionId: string,
draft: { title: string; initialPlan: string },
projectId?: string,
): Promise<{ ok: boolean }> {
return api<{ ok: boolean }>(withProjectId(`/ai-sessions/${encodeURIComponent(sessionId)}/draft`, projectId), {
method: "PATCH",
body: JSON.stringify(draft),
});
}
// ── Messages API ──────────────────────────────────────────────────────────
/** Response shape for GET /messages/inbox */