@contentgrowth/llm-service 0.9.5 → 0.9.6
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.
|
@@ -473,6 +473,9 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
473
473
|
console.error = originalError;
|
|
474
474
|
};
|
|
475
475
|
}, []);
|
|
476
|
+
const copyLogs = (0, import_react5.useCallback)(() => {
|
|
477
|
+
navigator.clipboard.writeText(logs.join("\n")).then(() => alert("Logs copied to clipboard")).catch((err) => console.error("Failed to copy logs", err));
|
|
478
|
+
}, [logs]);
|
|
476
479
|
const textareaRef = (0, import_react5.useRef)(null);
|
|
477
480
|
const measurementRef = (0, import_react5.useRef)(null);
|
|
478
481
|
const pendingSelectionRef = (0, import_react5.useRef)(null);
|
|
@@ -665,7 +668,13 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
665
668
|
showDebug && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "absolute bottom-full left-0 right-0 mb-2 p-2 bg-black/80 text-green-400 text-xs font-mono h-48 overflow-y-auto rounded z-50 pointer-events-auto", children: [
|
|
666
669
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex justify-between items-center bg-gray-800 p-1 mb-1", children: [
|
|
667
670
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "Debug Logs" }),
|
|
668
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
671
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-2", children: [
|
|
672
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: copyLogs, className: "text-white hover:text-blue-400", title: "Copy Logs", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_outline.Square2StackIcon, { className: "w-4 h-4" }) }),
|
|
673
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: () => {
|
|
674
|
+
copyLogs();
|
|
675
|
+
setShowDebug(false);
|
|
676
|
+
}, className: "text-white hover:text-red-400", title: "Copy & Close", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_outline.XMarkIcon, { className: "w-4 h-4" }) })
|
|
677
|
+
] })
|
|
669
678
|
] }),
|
|
670
679
|
logs.map((log, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mb-0.5 border-b border-gray-700/50 pb-0.5 break-all", children: log }, i)),
|
|
671
680
|
logs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "No logs yet..." })
|
|
@@ -686,6 +695,7 @@ var ChatInputArea = (0, import_react5.forwardRef)(({
|
|
|
686
695
|
if (tapCountRef.current.count >= 5) {
|
|
687
696
|
setShowDebug((prev) => !prev);
|
|
688
697
|
tapCountRef.current.count = 0;
|
|
698
|
+
stopRecording();
|
|
689
699
|
return;
|
|
690
700
|
}
|
|
691
701
|
if (voiceTrigger) {
|
|
@@ -860,6 +870,9 @@ var TapToTalk = ({
|
|
|
860
870
|
console.error = originalError;
|
|
861
871
|
};
|
|
862
872
|
}, []);
|
|
873
|
+
const copyLogs = (0, import_react6.useCallback)(() => {
|
|
874
|
+
navigator.clipboard.writeText(logs.join("\n")).then(() => alert("Logs copied to clipboard")).catch((err) => console.error("Failed to copy logs", err));
|
|
875
|
+
}, [logs]);
|
|
863
876
|
const handleVoiceResult = (0, import_react6.useCallback)((text, isFinal) => {
|
|
864
877
|
if (isFinal) {
|
|
865
878
|
onResult(text);
|
|
@@ -915,6 +928,11 @@ var TapToTalk = ({
|
|
|
915
928
|
if (tapCountRef.current.count >= 5) {
|
|
916
929
|
setShowDebug((prev) => !prev);
|
|
917
930
|
tapCountRef.current.count = 0;
|
|
931
|
+
if (isActive) {
|
|
932
|
+
if ((voiceConfig == null ? void 0 : voiceConfig.mode) === "native") nativeSpeech.stop();
|
|
933
|
+
else customRecorder.stop();
|
|
934
|
+
setVoiceTrigger(null);
|
|
935
|
+
}
|
|
918
936
|
return;
|
|
919
937
|
}
|
|
920
938
|
if (isActive) {
|
|
@@ -965,10 +983,17 @@ var TapToTalk = ({
|
|
|
965
983
|
showDebug && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "absolute bottom-full left-0 right-0 mb-2 p-2 bg-black/80 text-green-400 text-xs font-mono h-48 overflow-y-auto rounded z-50 pointer-events-auto", children: [
|
|
966
984
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex justify-between items-center bg-gray-800 p-1 mb-1", children: [
|
|
967
985
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "Debug Logs" }),
|
|
968
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2", children: [
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { onClick: (e) => {
|
|
988
|
+
e.stopPropagation();
|
|
989
|
+
copyLogs();
|
|
990
|
+
}, className: "text-white hover:text-blue-400", title: "Copy Logs", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_outline2.Square2StackIcon, { className: "w-4 h-4" }) }),
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { onClick: (e) => {
|
|
992
|
+
e.stopPropagation();
|
|
993
|
+
copyLogs();
|
|
994
|
+
setShowDebug(false);
|
|
995
|
+
}, className: "text-white hover:text-red-400", title: "Copy & Close", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_outline2.XMarkIcon, { className: "w-4 h-4" }) })
|
|
996
|
+
] })
|
|
972
997
|
] }),
|
|
973
998
|
logs.map((log, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mb-0.5 border-b border-gray-700/50 pb-0.5 break-all", children: log }, i)),
|
|
974
999
|
logs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: "No logs yet..." })
|