fix: Provide coords_3d field required by schema

Production SurrealDB schema requires coords_3d to be array<number>,
which means it cannot be NONE despite the ASSERT allowing it.
TYPE enforcement happens before ASSERT validation.

This fixes the production error:
"Found NONE for field coords_3d but expected array<number>"

New nodes are initialized at origin [0, 0, 0] for galaxy visualization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-09 19:46:29 +00:00
parent 1e423a9bb5
commit 49b12a2933

View File

@@ -229,7 +229,7 @@ export async function POST(request: NextRequest) {
atp_uri: atp_uri,
title: title,
body: body, // Store the raw text body
// coords_3d will be calculated later by UMAP
coords_3d: [0, 0, 0], // Required by schema - origin coordinates for new nodes
};
// Only include embedding if it was successfully generated