@jchaffin/voicekit 0.2.1 → 0.2.2

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.
package/dist/index.js CHANGED
@@ -1174,11 +1174,7 @@ function useSessionHistory() {
1174
1174
  const { itemId, role, content = [] } = item;
1175
1175
  if (itemId && role) {
1176
1176
  let text = extractMessageText(content);
1177
- if (role === "assistant" && !text) {
1178
- text = "";
1179
- } else if (role === "user" && !text) {
1180
- return;
1181
- }
1177
+ if (!text) text = "";
1182
1178
  const guardrailMessage = sketchilyDetectGuardrailMessage(text);
1183
1179
  if (guardrailMessage) {
1184
1180
  const failureDetails = JSON.parse(guardrailMessage);
package/dist/index.mjs CHANGED
@@ -960,11 +960,7 @@ function useSessionHistory() {
960
960
  const { itemId, role, content = [] } = item;
961
961
  if (itemId && role) {
962
962
  let text = extractMessageText(content);
963
- if (role === "assistant" && !text) {
964
- text = "";
965
- } else if (role === "user" && !text) {
966
- return;
967
- }
963
+ if (!text) text = "";
968
964
  const guardrailMessage = sketchilyDetectGuardrailMessage(text);
969
965
  if (guardrailMessage) {
970
966
  const failureDetails = JSON.parse(guardrailMessage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jchaffin/voicekit",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A provider-agnostic React library for building voice-enabled AI agents",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",