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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/agent-voice-chat/providers/sse-parser.js
overstepping39aa13200c3c
diff --git a/xspace-agent/agent-voice-chat/providers/sse-parser.js b/xspace-agent/agent-voice-chat/providers/sse-parser.jsnew file mode 100644index 000000000..85da5901e--- /dev/null+++ b/xspace-agent/agent-voice-chat/providers/sse-parser.js@@ -0,0 +1,26 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent)++/**+ * Async generator that parses an SSE stream from a fetch/axios response.+ * Yields parsed JSON data objects from each `data: {...}` line.+ * Stops on `data: [DONE]`.+ */+async function* parseSSEStream(responseStream) {+ for await (const chunk of responseStream) {+ const lines = chunk.toString().split("\n").filter(l => l.startsWith("data: "))+ for (const line of lines) {+ const data = line.slice(6).trim()+ if (data === "[DONE]") return+ try {+ yield JSON.parse(data)+ } catch (e) {+ // skip malformed chunks+ }+ }+ }+}++module.exports = { parseSSEStream }++