@kite-copilot/chat-panel 0.2.11 → 0.2.13

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
@@ -2370,10 +2370,7 @@ ${userText}`
2370
2370
  ) })
2371
2371
  ] }),
2372
2372
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: isEmpty ? "grid flex-1 place-items-center transition-all duration-300" : "flex flex-1 flex-col transition-all duration-300 min-h-0 overflow-hidden", children: isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w-full overflow-y-auto px-4", children: [
2373
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "py-4 transition-all duration-300", children: [
2374
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-center text-2xl font-semibold text-gray-900", children: panelView === "folder" ? folders.find((f) => f.id === currentFolderId)?.title || "" : "What can I help with?" }),
2375
- panelView === "landing" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-center text-xs text-gray-500", children: "Ask me anything about your account" })
2376
- ] }),
2373
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "py-4 transition-all duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: "text-center text-2xl font-semibold text-gray-900", children: panelView === "folder" ? folders.find((f) => f.id === currentFolderId)?.title || "" : "What can I help with?" }) }),
2377
2374
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pb-4", children: [
2378
2375
  panelView === "landing" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
2379
2376
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400", children: "Suggested Questions" }),
@@ -3335,12 +3332,26 @@ ${userText}`
3335
3332
  }
3336
3333
  ),
3337
3334
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3338
- Input,
3335
+ "textarea",
3339
3336
  {
3340
3337
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3341
3338
  value: input,
3342
- onChange: (e) => setInput(e.target.value),
3339
+ onChange: (e) => {
3340
+ setInput(e.target.value);
3341
+ e.target.style.height = "24px";
3342
+ e.target.style.height = `${Math.min(120, e.target.scrollHeight)}px`;
3343
+ },
3343
3344
  onKeyDown: (e) => {
3345
+ if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
3346
+ e.preventDefault();
3347
+ if (input.trim() || pendingFile) {
3348
+ const form = e.currentTarget.closest("form");
3349
+ if (form) {
3350
+ form.requestSubmit();
3351
+ }
3352
+ }
3353
+ return;
3354
+ }
3344
3355
  if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
3345
3356
  const currentBulkSession = pendingBulkSessionRef.current;
3346
3357
  if (currentBulkSession) {
@@ -3370,7 +3381,8 @@ ${userText}`
3370
3381
  }
3371
3382
  }
3372
3383
  },
3373
- className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400"
3384
+ rows: 1,
3385
+ 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
3386
  }
3375
3387
  ),
3376
3388
  /* @__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-SJYNJCR5.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -2369,10 +2369,7 @@ ${userText}`
2369
2369
  ) })
2370
2370
  ] }),
2371
2371
  /* @__PURE__ */ jsx9("div", { className: isEmpty ? "grid flex-1 place-items-center transition-all duration-300" : "flex flex-1 flex-col transition-all duration-300 min-h-0 overflow-hidden", children: isEmpty ? /* @__PURE__ */ jsxs5("div", { className: "w-full overflow-y-auto px-4", children: [
2372
- /* @__PURE__ */ jsxs5("div", { className: "py-4 transition-all duration-300", children: [
2373
- /* @__PURE__ */ jsx9("h2", { className: "text-center text-2xl font-semibold text-gray-900", children: panelView === "folder" ? folders.find((f) => f.id === currentFolderId)?.title || "" : "What can I help with?" }),
2374
- panelView === "landing" && /* @__PURE__ */ jsx9("p", { className: "mt-1 text-center text-xs text-gray-500", children: "Ask me anything about your account" })
2375
- ] }),
2372
+ /* @__PURE__ */ jsx9("div", { className: "py-4 transition-all duration-300", children: /* @__PURE__ */ jsx9("h2", { className: "text-center text-2xl font-semibold text-gray-900", children: panelView === "folder" ? folders.find((f) => f.id === currentFolderId)?.title || "" : "What can I help with?" }) }),
2376
2373
  /* @__PURE__ */ jsxs5("div", { className: "pb-4", children: [
2377
2374
  panelView === "landing" && /* @__PURE__ */ jsxs5(Fragment2, { children: [
2378
2375
  /* @__PURE__ */ jsx9("div", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400", children: "Suggested Questions" }),
@@ -3334,12 +3331,26 @@ ${userText}`
3334
3331
  }
3335
3332
  ),
3336
3333
  /* @__PURE__ */ jsx9(
3337
- Input,
3334
+ "textarea",
3338
3335
  {
3339
3336
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3340
3337
  value: input,
3341
- onChange: (e) => setInput(e.target.value),
3338
+ onChange: (e) => {
3339
+ setInput(e.target.value);
3340
+ e.target.style.height = "24px";
3341
+ e.target.style.height = `${Math.min(120, e.target.scrollHeight)}px`;
3342
+ },
3342
3343
  onKeyDown: (e) => {
3344
+ if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
3345
+ e.preventDefault();
3346
+ if (input.trim() || pendingFile) {
3347
+ const form = e.currentTarget.closest("form");
3348
+ if (form) {
3349
+ form.requestSubmit();
3350
+ }
3351
+ }
3352
+ return;
3353
+ }
3343
3354
  if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
3344
3355
  const currentBulkSession = pendingBulkSessionRef.current;
3345
3356
  if (currentBulkSession) {
@@ -3369,7 +3380,8 @@ ${userText}`
3369
3380
  }
3370
3381
  }
3371
3382
  },
3372
- className: "flex-1 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-gray-400"
3383
+ rows: 1,
3384
+ 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
3385
  }
3374
3386
  ),
3375
3387
  /* @__PURE__ */ jsx9(