expo-ai-kit 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,11 +85,13 @@ class ExpoAiKitModule : Module() {
85
85
 
86
86
  // Launch streaming in a coroutine that can be cancelled
87
87
  val job = streamScope.launch {
88
- val streamCallback = { token: String, accumulatedText: String, isDone: Boolean ->
88
+ val streamAccumulator = StringBuilder()
89
+ val streamCallback = { token: String, _: String, isDone: Boolean ->
90
+ streamAccumulator.append(token)
89
91
  sendEvent("onStreamToken", mapOf(
90
92
  "sessionId" to sessionId,
91
93
  "token" to token,
92
- "accumulatedText" to accumulatedText,
94
+ "accumulatedText" to streamAccumulator.toString(),
93
95
  "isDone" to isDone
94
96
  ))
95
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-ai-kit",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "On-device AI for Expo apps — run Gemma 4, Apple Foundation Models, and ML Kit locally with zero API keys",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",