cue-console 0.1.14 → 0.1.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cue-console",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Cue Hub console launcher (Next.js UI)",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": ["mcp", "cue", "console", "nextjs"],
@@ -2,6 +2,7 @@
2
2
 
3
3
  import {
4
4
  useMemo,
5
+ useRef,
5
6
  useState,
6
7
  type ChangeEvent,
7
8
  type ClipboardEvent,
@@ -147,6 +148,7 @@ export function ChatComposer({
147
148
  }, [onBack]);
148
149
 
149
150
  const [dragIndex, setDragIndex] = useState<number | null>(null);
151
+ const isComposingRef = useRef(false);
150
152
 
151
153
  const submitOrQueue = () => {
152
154
  if (busy) return;
@@ -412,6 +414,12 @@ export function ChatComposer({
412
414
  }
413
415
  value={input}
414
416
  onPaste={handlePaste}
417
+ onCompositionStart={() => {
418
+ isComposingRef.current = true;
419
+ }}
420
+ onCompositionEnd={() => {
421
+ isComposingRef.current = false;
422
+ }}
415
423
  onChange={(e) => {
416
424
  const next = e.target.value;
417
425
  setInput(next);
@@ -508,7 +516,7 @@ export function ChatComposer({
508
516
  }
509
517
  }
510
518
 
511
- if (e.key === "Enter" && !e.shiftKey) {
519
+ if (e.key === "Enter" && !e.shiftKey && !isComposingRef.current) {
512
520
  e.preventDefault();
513
521
  submitOrQueue();
514
522
  }