@contentgrowth/llm-service 0.9.95 → 0.9.97
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.
|
@@ -588,6 +588,10 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
588
588
|
const originalLog = console.log;
|
|
589
589
|
const originalWarn = console.warn;
|
|
590
590
|
const originalError = console.error;
|
|
591
|
+
const formatTime = () => {
|
|
592
|
+
const now = /* @__PURE__ */ new Date();
|
|
593
|
+
return `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}.${now.getMilliseconds().toString().padStart(3, "0")}`;
|
|
594
|
+
};
|
|
591
595
|
const addLog = (type, args) => {
|
|
592
596
|
try {
|
|
593
597
|
const msg = args.map((arg) => {
|
|
@@ -595,7 +599,7 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
595
599
|
if (typeof arg === "object") return JSON.stringify(arg);
|
|
596
600
|
return String(arg);
|
|
597
601
|
}).join(" ");
|
|
598
|
-
setLogs((prev) => [`[${type}] ${msg}
|
|
602
|
+
setLogs((prev) => [...prev, `[${formatTime()}] [${type}] ${msg}`].slice(-50));
|
|
599
603
|
} catch (e) {
|
|
600
604
|
}
|
|
601
605
|
};
|
|
@@ -762,13 +766,6 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
762
766
|
var _a2, _b2;
|
|
763
767
|
console.log("[ChatInputArea] startRecording called. trigger:", trigger, "isMobile:", isMobile());
|
|
764
768
|
console.log("[ChatInputArea] Current state - voiceTrigger:", voiceTrigger, "isTranscribing:", isTranscribing);
|
|
765
|
-
if (isMobile()) {
|
|
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 BEFORE start");
|
|
769
|
-
document.activeElement.blur();
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
769
|
if (voiceTrigger || isTranscribing) {
|
|
773
770
|
console.log("[ChatInputArea] startRecording ignored - already active");
|
|
774
771
|
return;
|
|
@@ -786,7 +783,7 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
786
783
|
console.log("[ChatInputArea] Calling nativeSpeech.start()...");
|
|
787
784
|
nativeSpeech.start();
|
|
788
785
|
console.log("[ChatInputArea] nativeSpeech.start() called");
|
|
789
|
-
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists
|
|
786
|
+
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists...");
|
|
790
787
|
try {
|
|
791
788
|
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _a2.call(voiceConfig);
|
|
792
789
|
console.log("[ChatInputArea] voiceConfig.onVoiceStart completed");
|
|
@@ -1023,6 +1020,10 @@ var TapToTalk = ({
|
|
|
1023
1020
|
const originalLog = console.log;
|
|
1024
1021
|
const originalWarn = console.warn;
|
|
1025
1022
|
const originalError = console.error;
|
|
1023
|
+
const formatTime = () => {
|
|
1024
|
+
const now = /* @__PURE__ */ new Date();
|
|
1025
|
+
return `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}.${now.getMilliseconds().toString().padStart(3, "0")}`;
|
|
1026
|
+
};
|
|
1026
1027
|
const addLog = (type, args) => {
|
|
1027
1028
|
try {
|
|
1028
1029
|
const msg = args.map((arg) => {
|
|
@@ -1030,7 +1031,7 @@ var TapToTalk = ({
|
|
|
1030
1031
|
if (typeof arg === "object") return JSON.stringify(arg);
|
|
1031
1032
|
return String(arg);
|
|
1032
1033
|
}).join(" ");
|
|
1033
|
-
setLogs((prev) => [`[${type}] ${msg}
|
|
1034
|
+
setLogs((prev) => [...prev, `[${formatTime()}] [${type}] ${msg}`].slice(-50));
|
|
1034
1035
|
} catch (e) {
|
|
1035
1036
|
}
|
|
1036
1037
|
};
|
|
@@ -1150,17 +1151,12 @@ var TapToTalk = ({
|
|
|
1150
1151
|
} else {
|
|
1151
1152
|
console.log("[TapToTalk] Starting voice... mode:", voiceConfig == null ? void 0 : voiceConfig.mode);
|
|
1152
1153
|
setErrorMsg(null);
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
document.activeElement.blur();
|
|
1157
|
-
}
|
|
1158
|
-
} else if (onFocusTarget) {
|
|
1154
|
+
setVoiceTrigger("click");
|
|
1155
|
+
console.log("[TapToTalk] voiceTrigger set to click");
|
|
1156
|
+
if (!isMobile() && onFocusTarget) {
|
|
1159
1157
|
console.log("[TapToTalk] Desktop: calling onFocusTarget()");
|
|
1160
1158
|
onFocusTarget();
|
|
1161
1159
|
}
|
|
1162
|
-
setVoiceTrigger("click");
|
|
1163
|
-
console.log("[TapToTalk] voiceTrigger set to click");
|
|
1164
1160
|
if ((voiceConfig == null ? void 0 : voiceConfig.mode) === "custom") {
|
|
1165
1161
|
console.log("[TapToTalk] Starting custom recorder...");
|
|
1166
1162
|
try {
|