@kite-copilot/chat-panel 0.2.11 → 0.2.12

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/dist/auto.cjs CHANGED
@@ -3335,12 +3335,26 @@ ${userText}`
3335
3335
  }
3336
3336
  ),
3337
3337
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3338
- Input,
3338
+ "textarea",
3339
3339
  {
3340
3340
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3341
3341
  value: input,
3342
- onChange: (e) => setInput(e.target.value),
3342
+ onChange: (e) => {
3343
+ setInput(e.target.value);
3344
+ e.target.style.height = "24px";
3345
+ e.target.style.height = `${Math.min(120, e.target.scrollHeight)}px`;
3346
+ },
3343
3347
  onKeyDown: (e) => {
3348
+ if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
3349
+ e.preventDefault();
3350
+ if (input.trim() || pendingFile) {
3351
+ const form = e.currentTarget.closest("form");
3352
+ if (form) {
3353
+ form.requestSubmit();
3354
+ }
3355
+ }
3356
+ return;
3357
+ }
3344
3358
  if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
3345
3359
  const currentBulkSession = pendingBulkSessionRef.current;
3346
3360
  if (currentBulkSession) {
@@ -3370,7 +3384,8 @@ ${userText}`
3370
3384
  }
3371
3385
  }
3372
3386
  },
3373
- className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400"
3387
+ rows: 1,
3388
+ className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400 resize-none overflow-y-auto min-h-[24px] max-h-[120px] py-0 leading-6"
3374
3389
  }
3375
3390
  ),
3376
3391
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
package/dist/auto.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createKiteChat
3
- } from "./chunk-6BQ6C2XU.js";
3
+ } from "./chunk-DEBLRDOF.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -3334,12 +3334,26 @@ ${userText}`
3334
3334
  }
3335
3335
  ),
3336
3336
  /* @__PURE__ */ jsx9(
3337
- Input,
3337
+ "textarea",
3338
3338
  {
3339
3339
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3340
3340
  value: input,
3341
- onChange: (e) => setInput(e.target.value),
3341
+ onChange: (e) => {
3342
+ setInput(e.target.value);
3343
+ e.target.style.height = "24px";
3344
+ e.target.style.height = `${Math.min(120, e.target.scrollHeight)}px`;
3345
+ },
3342
3346
  onKeyDown: (e) => {
3347
+ if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
3348
+ e.preventDefault();
3349
+ if (input.trim() || pendingFile) {
3350
+ const form = e.currentTarget.closest("form");
3351
+ if (form) {
3352
+ form.requestSubmit();
3353
+ }
3354
+ }
3355
+ return;
3356
+ }
3343
3357
  if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
3344
3358
  const currentBulkSession = pendingBulkSessionRef.current;
3345
3359
  if (currentBulkSession) {
@@ -3369,7 +3383,8 @@ ${userText}`
3369
3383
  }
3370
3384
  }
3371
3385
  },
3372
- className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400"
3386
+ rows: 1,
3387
+ className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400 resize-none overflow-y-auto min-h-[24px] max-h-[120px] py-0 leading-6"
3373
3388
  }
3374
3389
  ),
3375
3390
  /* @__PURE__ */ jsx9(