fix(arch+design): wire architecture and design together

- Architecture route now uses /generate endpoint (no Atlas session
  overhead, no conflicting system prompt) for clean JSON generation
- Design page fetches saved architecture on load and maps designSurfaces
  to known surface IDs via fuzzy match; AI-suggested surfaces are
  pre-selected in the picker with an "AI" badge and explanatory note

Made-with: Cursor
This commit is contained in:
2026-03-03 21:11:27 -08:00
parent bedd7d3470
commit a3aa5e4208
2 changed files with 75 additions and 18 deletions

View File

@@ -137,16 +137,10 @@ ${phaseContext}
${prd}`;
try {
const res = await fetch(`${AGENT_RUNNER_URL}/atlas/chat`, {
const res = await fetch(`${AGENT_RUNNER_URL}/generate`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
message: prompt,
session_id: `arch_${projectId}_${Date.now()}`,
history: [],
is_init: false,
tools: [], // no tools needed — just structured generation
}),
body: JSON.stringify({ prompt }),
signal: AbortSignal.timeout(120_000),
});