Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(api/_okx3d): split CJK briefs on punctuation that carries no trailing space

nirholas927536d42127
diff --git a/api/_okx3d/identity.js b/api/_okx3d/identity.js
index 3aa511734..52cd7edbc 100644
--- a/api/_okx3d/identity.js
+++ b/api/_okx3d/identity.js
@@ -165,7 +165,7 @@ export function fallbackIdentityPrompt({ brief, styleHints }) {
// usually is not, so that branch splits on a zero-width boundary instead, or
// a whole Chinese brief counts as one sentence and crowds out the hints.
const raw = String(brief ?? '').trim();
- const firstSentence = raw.split(/(?<=[.!?。!?])\s+/)[0] || raw;
+ const firstSentence = raw.split(/(?<=[.!?])\s+|(?<=[。!?])\s*/)[0] || raw;
const subject = cleanClause(
clampPrompt(firstSentence, MAX_GENERATION_PROMPT_CHARS - 140 - (hints ? hints.length + 2 : 0)),
);