@contentgrowth/llm-service 0.9.1 → 0.9.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.
@@ -578,13 +578,17 @@ var ChatInputArea = forwardRef(({
578
578
  onClick: () => {
579
579
  if (voiceTrigger) {
580
580
  stopRecording();
581
- } else {
581
+ } else if (!isTranscribing) {
582
582
  startRecording("click");
583
583
  }
584
584
  },
585
- className: `mb-1 p-2 rounded-full transition-all duration-300 flex-shrink-0 border ${voiceTrigger ? "text-white border-orange-400 bg-orange-500 scale-110 shadow-lg animate-pulse" : "text-gray-500 border-gray-300 bg-white hover:text-gray-700 hover:bg-gray-100"}`,
586
- title: voiceTrigger ? "Stop Recording" : "Start Voice Input",
587
- children: /* @__PURE__ */ jsx5(MicrophoneIcon, { className: "w-5 h-5" })
585
+ className: `mb-1 p-2 rounded-full transition-all duration-300 flex-shrink-0 border ${voiceTrigger || isTranscribing ? "text-white border-orange-400 bg-orange-500 scale-110 shadow-lg" : "text-gray-500 border-gray-300 bg-white hover:text-gray-700 hover:bg-gray-100"} ${voiceTrigger ? "animate-pulse" : ""} ${isTranscribing ? "cursor-wait" : ""}`,
586
+ disabled: isTranscribing,
587
+ title: isTranscribing ? "Transcribing..." : voiceTrigger ? "Stop Recording" : "Start Voice Input",
588
+ children: isTranscribing ? /* @__PURE__ */ jsx5("div", { className: "animate-spin w-5 h-5 flex items-center justify-center", children: /* @__PURE__ */ jsxs3("svg", { className: "w-5 h-5 text-white", viewBox: "0 0 24 24", children: [
589
+ /* @__PURE__ */ jsx5("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", fill: "none" }),
590
+ /* @__PURE__ */ jsx5("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
591
+ ] }) }) : /* @__PURE__ */ jsx5(MicrophoneIcon, { className: "w-5 h-5" })
588
592
  }
589
593
  ),
590
594
  /* @__PURE__ */ jsxs3(
@@ -626,10 +630,6 @@ var ChatInputArea = forwardRef(({
626
630
  className: `flex-grow px-4 py-2 outline-none text-gray-700 placeholder-gray-500 resize-none leading-6 w-full ${isInputDisabled ? "bg-gray-100 cursor-not-allowed" : "bg-transparent"} ${voiceTrigger || isTranscribing ? "cursor-default" : ""}`
627
631
  }
628
632
  ),
629
- isTranscribing && /* @__PURE__ */ jsx5("div", { className: "flex-shrink-0 animate-spin mr-2", children: /* @__PURE__ */ jsxs3("svg", { className: "w-4 h-4 text-orange-500", viewBox: "0 0 24 24", children: [
630
- /* @__PURE__ */ jsx5("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", fill: "none" }),
631
- /* @__PURE__ */ jsx5("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
632
- ] }) }),
633
633
  /* @__PURE__ */ jsxs3("div", { className: "relative mx-2 flex-shrink-0", children: [
634
634
  isSending && /* @__PURE__ */ jsx5("div", { className: "absolute -inset-1", children: /* @__PURE__ */ jsxs3(
635
635
  "svg",