@bytexbyte/nxtlinq-ai-agent-web-development 0.1.9 → 0.2.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceTranscriptMessages.d.ts","sourceRoot":"","sources":["../../src/voice/useVoiceTranscriptMessages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,oBAAoB,EACrB,MAAM,8CAA8C,CAAC;AAMtD,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;IAC7B,cAAc,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,CAAC;IAClE,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtE,CAAC;AAWF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,uBAAuB,EAC5B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,iBAAiB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,EACvC,kBAAkB,CAAC,EAAE,MAAM,MAAM;8BA0GvB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"useVoiceTranscriptMessages.d.ts","sourceRoot":"","sources":["../../src/voice/useVoiceTranscriptMessages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,oBAAoB,EACrB,MAAM,8CAA8C,CAAC;AAMtD,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;IAC7B,cAAc,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,CAAC;IAClE,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtE,CAAC;AAWF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,uBAAuB,EAC5B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,iBAAiB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,EACvC,kBAAkB,CAAC,EAAE,MAAM,MAAM;8BA0GvB,oBAAoB;wBAiBpB,cAAc,YAAY;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE;;EAkCjE"}
|
|
@@ -95,21 +95,7 @@ export function useVoiceTranscriptMessages(api, interactionMode, voiceSessionId,
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
if (event.role === 'user' && !event.interim && text) {
|
|
98
|
-
api.updateMessages((prev) =>
|
|
99
|
-
const last = prev[prev.length - 1];
|
|
100
|
-
if (last?.role === 'user' && last.content === text)
|
|
101
|
-
return prev;
|
|
102
|
-
return [
|
|
103
|
-
...prev,
|
|
104
|
-
{
|
|
105
|
-
id: `voice-user-${Date.now()}`,
|
|
106
|
-
role: 'user',
|
|
107
|
-
content: text,
|
|
108
|
-
timestamp: new Date().toISOString(),
|
|
109
|
-
metadata: voiceMeta(resolveSessionId()),
|
|
110
|
-
},
|
|
111
|
-
];
|
|
112
|
-
});
|
|
98
|
+
api.updateMessages((prev) => ensureUserBubbleForVoiceTurn(prev, text, undefined, voiceMeta(resolveSessionId())));
|
|
113
99
|
}
|
|
114
100
|
}, [api, isVoiceUiActive, resolveSessionId, upsertStreaming]);
|
|
115
101
|
const handleDone = useCallback((event, options) => {
|
package/package.json
CHANGED
|
@@ -144,20 +144,9 @@ export function useVoiceTranscriptMessages(
|
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
if (event.role === 'user' && !event.interim && text) {
|
|
147
|
-
api.updateMessages((prev) =>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return [
|
|
151
|
-
...prev,
|
|
152
|
-
{
|
|
153
|
-
id: `voice-user-${Date.now()}`,
|
|
154
|
-
role: 'user' as const,
|
|
155
|
-
content: text,
|
|
156
|
-
timestamp: new Date().toISOString(),
|
|
157
|
-
metadata: voiceMeta(resolveSessionId()),
|
|
158
|
-
},
|
|
159
|
-
];
|
|
160
|
-
});
|
|
147
|
+
api.updateMessages((prev) =>
|
|
148
|
+
ensureUserBubbleForVoiceTurn(prev, text, undefined, voiceMeta(resolveSessionId())),
|
|
149
|
+
);
|
|
161
150
|
}
|
|
162
151
|
},
|
|
163
152
|
[api, isVoiceUiActive, resolveSessionId, upsertStreaming],
|