@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.
|
@@ -546,6 +546,10 @@ var ChatInputArea = forwardRef(({
|
|
|
546
546
|
const originalLog = console.log;
|
|
547
547
|
const originalWarn = console.warn;
|
|
548
548
|
const originalError = console.error;
|
|
549
|
+
const formatTime = () => {
|
|
550
|
+
const now = /* @__PURE__ */ new Date();
|
|
551
|
+
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")}`;
|
|
552
|
+
};
|
|
549
553
|
const addLog = (type, args) => {
|
|
550
554
|
try {
|
|
551
555
|
const msg = args.map((arg) => {
|
|
@@ -553,7 +557,7 @@ var ChatInputArea = forwardRef(({
|
|
|
553
557
|
if (typeof arg === "object") return JSON.stringify(arg);
|
|
554
558
|
return String(arg);
|
|
555
559
|
}).join(" ");
|
|
556
|
-
setLogs((prev) => [`[${type}] ${msg}
|
|
560
|
+
setLogs((prev) => [...prev, `[${formatTime()}] [${type}] ${msg}`].slice(-50));
|
|
557
561
|
} catch (e) {
|
|
558
562
|
}
|
|
559
563
|
};
|
|
@@ -720,13 +724,6 @@ var ChatInputArea = forwardRef(({
|
|
|
720
724
|
var _a2, _b2;
|
|
721
725
|
console.log("[ChatInputArea] startRecording called. trigger:", trigger, "isMobile:", isMobile());
|
|
722
726
|
console.log("[ChatInputArea] Current state - voiceTrigger:", voiceTrigger, "isTranscribing:", isTranscribing);
|
|
723
|
-
if (isMobile()) {
|
|
724
|
-
console.log("[ChatInputArea] SKIPPING textarea focus on mobile to prevent keyboard conflict");
|
|
725
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
726
|
-
console.log("[ChatInputArea] Blur active element on mobile BEFORE start");
|
|
727
|
-
document.activeElement.blur();
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
727
|
if (voiceTrigger || isTranscribing) {
|
|
731
728
|
console.log("[ChatInputArea] startRecording ignored - already active");
|
|
732
729
|
return;
|
|
@@ -744,7 +741,7 @@ var ChatInputArea = forwardRef(({
|
|
|
744
741
|
console.log("[ChatInputArea] Calling nativeSpeech.start()...");
|
|
745
742
|
nativeSpeech.start();
|
|
746
743
|
console.log("[ChatInputArea] nativeSpeech.start() called");
|
|
747
|
-
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists
|
|
744
|
+
console.log("[ChatInputArea] Calling voiceConfig.onVoiceStart if exists...");
|
|
748
745
|
try {
|
|
749
746
|
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _a2.call(voiceConfig);
|
|
750
747
|
console.log("[ChatInputArea] voiceConfig.onVoiceStart completed");
|
|
@@ -981,6 +978,10 @@ var TapToTalk = ({
|
|
|
981
978
|
const originalLog = console.log;
|
|
982
979
|
const originalWarn = console.warn;
|
|
983
980
|
const originalError = console.error;
|
|
981
|
+
const formatTime = () => {
|
|
982
|
+
const now = /* @__PURE__ */ new Date();
|
|
983
|
+
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")}`;
|
|
984
|
+
};
|
|
984
985
|
const addLog = (type, args) => {
|
|
985
986
|
try {
|
|
986
987
|
const msg = args.map((arg) => {
|
|
@@ -988,7 +989,7 @@ var TapToTalk = ({
|
|
|
988
989
|
if (typeof arg === "object") return JSON.stringify(arg);
|
|
989
990
|
return String(arg);
|
|
990
991
|
}).join(" ");
|
|
991
|
-
setLogs((prev) => [`[${type}] ${msg}
|
|
992
|
+
setLogs((prev) => [...prev, `[${formatTime()}] [${type}] ${msg}`].slice(-50));
|
|
992
993
|
} catch (e) {
|
|
993
994
|
}
|
|
994
995
|
};
|
|
@@ -1108,17 +1109,12 @@ var TapToTalk = ({
|
|
|
1108
1109
|
} else {
|
|
1109
1110
|
console.log("[TapToTalk] Starting voice... mode:", voiceConfig == null ? void 0 : voiceConfig.mode);
|
|
1110
1111
|
setErrorMsg(null);
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
document.activeElement.blur();
|
|
1115
|
-
}
|
|
1116
|
-
} else if (onFocusTarget) {
|
|
1112
|
+
setVoiceTrigger("click");
|
|
1113
|
+
console.log("[TapToTalk] voiceTrigger set to click");
|
|
1114
|
+
if (!isMobile() && onFocusTarget) {
|
|
1117
1115
|
console.log("[TapToTalk] Desktop: calling onFocusTarget()");
|
|
1118
1116
|
onFocusTarget();
|
|
1119
1117
|
}
|
|
1120
|
-
setVoiceTrigger("click");
|
|
1121
|
-
console.log("[TapToTalk] voiceTrigger set to click");
|
|
1122
1118
|
if ((voiceConfig == null ? void 0 : voiceConfig.mode) === "custom") {
|
|
1123
1119
|
console.log("[TapToTalk] Starting custom recorder...");
|
|
1124
1120
|
try {
|