@contentgrowth/llm-service 0.9.93 → 0.9.94
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.
|
@@ -717,7 +717,7 @@ var ChatInputArea = forwardRef(({
|
|
|
717
717
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
718
718
|
}, []);
|
|
719
719
|
const startRecording = async (trigger) => {
|
|
720
|
-
var _a2;
|
|
720
|
+
var _a2, _b2;
|
|
721
721
|
console.log("[ChatInputArea] startRecording called. trigger:", trigger, "isMobile:", isMobile());
|
|
722
722
|
console.log("[ChatInputArea] Current state - voiceTrigger:", voiceTrigger, "isTranscribing:", isTranscribing);
|
|
723
723
|
if (voiceTrigger || isTranscribing) {
|
|
@@ -726,8 +726,6 @@ var ChatInputArea = forwardRef(({
|
|
|
726
726
|
}
|
|
727
727
|
setVoiceTrigger(trigger);
|
|
728
728
|
setVoiceError(null);
|
|
729
|
-
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists...");
|
|
730
|
-
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _a2.call(voiceConfig);
|
|
731
729
|
if ((voiceConfig == null ? void 0 : voiceConfig.mode) === "native") {
|
|
732
730
|
console.log("[ChatInputArea] Using native speech recognition");
|
|
733
731
|
if (!nativeSpeech.isSupported) {
|
|
@@ -739,8 +737,22 @@ var ChatInputArea = forwardRef(({
|
|
|
739
737
|
console.log("[ChatInputArea] Calling nativeSpeech.start()...");
|
|
740
738
|
nativeSpeech.start();
|
|
741
739
|
console.log("[ChatInputArea] nativeSpeech.start() called");
|
|
740
|
+
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists (after nativeSpeech.start)...");
|
|
741
|
+
try {
|
|
742
|
+
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _a2.call(voiceConfig);
|
|
743
|
+
console.log("[ChatInputArea] voiceConfig.onVoiceStart completed");
|
|
744
|
+
} catch (e) {
|
|
745
|
+
console.error("[ChatInputArea] voiceConfig.onVoiceStart threw error", e);
|
|
746
|
+
}
|
|
742
747
|
} else {
|
|
743
748
|
console.log("[ChatInputArea] Using custom recorder");
|
|
749
|
+
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists (custom mode)...");
|
|
750
|
+
try {
|
|
751
|
+
(_b2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _b2.call(voiceConfig);
|
|
752
|
+
console.log("[ChatInputArea] voiceConfig.onVoiceStart completed");
|
|
753
|
+
} catch (e) {
|
|
754
|
+
console.error("[ChatInputArea] voiceConfig.onVoiceStart threw error", e);
|
|
755
|
+
}
|
|
744
756
|
await customRecorder.start();
|
|
745
757
|
console.log("[ChatInputArea] Custom recorder started");
|
|
746
758
|
}
|
|
@@ -752,6 +764,10 @@ var ChatInputArea = forwardRef(({
|
|
|
752
764
|
}, 0);
|
|
753
765
|
} else {
|
|
754
766
|
console.log("[ChatInputArea] SKIPPING textarea focus on mobile to prevent keyboard conflict");
|
|
767
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
768
|
+
console.log("[ChatInputArea] Blur active element on mobile");
|
|
769
|
+
document.activeElement.blur();
|
|
770
|
+
}
|
|
755
771
|
}
|
|
756
772
|
};
|
|
757
773
|
const stopRecording = () => {
|
|
@@ -1094,10 +1110,14 @@ var TapToTalk = ({
|
|
|
1094
1110
|
if (onFocusTarget && !isMobile()) {
|
|
1095
1111
|
console.log("[TapToTalk] calling onFocusTarget() (desktop only)");
|
|
1096
1112
|
onFocusTarget();
|
|
1097
|
-
} else if (onFocusTarget) {
|
|
1098
|
-
console.log("[TapToTalk] SKIPPING onFocusTarget on mobile to prevent keyboard conflict");
|
|
1099
1113
|
} else {
|
|
1100
|
-
|
|
1114
|
+
if (onFocusTarget) {
|
|
1115
|
+
console.log("[TapToTalk] SKIPPING onFocusTarget on mobile to prevent keyboard conflict");
|
|
1116
|
+
}
|
|
1117
|
+
if (isMobile() && document.activeElement instanceof HTMLElement) {
|
|
1118
|
+
console.log("[TapToTalk] Blurring active element on mobile");
|
|
1119
|
+
document.activeElement.blur();
|
|
1120
|
+
}
|
|
1101
1121
|
}
|
|
1102
1122
|
setVoiceTrigger("click");
|
|
1103
1123
|
console.log("[TapToTalk] voiceTrigger set to click");
|