@kite-copilot/chat-panel 0.2.15 → 0.2.16

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
@@ -2354,23 +2354,35 @@ ${userText}`
2354
2354
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Sparkles, { className: "h-3.5 w-3.5 text-black", fill: "currentColor" }),
2355
2355
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "text-sm font-semibold text-gray-800", children: "Copilot" })
2356
2356
  ] }),
2357
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2358
- Button,
2359
- {
2360
- variant: "ghost",
2361
- size: "sm",
2362
- className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2363
- onClick: () => {
2364
- setMessages([]);
2365
- setPanelView("landing");
2366
- setCurrentFolderId(void 0);
2367
- setActiveGuide(void 0);
2368
- activeGuideRef.current = void 0;
2369
- setGuideComplete(false);
2370
- },
2371
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.SquarePen, { className: "h-3.5 w-3.5" })
2372
- }
2373
- ) })
2357
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-1", children: [
2358
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2359
+ Button,
2360
+ {
2361
+ variant: "ghost",
2362
+ size: "sm",
2363
+ className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2364
+ onClick: () => {
2365
+ setMessages([]);
2366
+ setPanelView("landing");
2367
+ setCurrentFolderId(void 0);
2368
+ setActiveGuide(void 0);
2369
+ activeGuideRef.current = void 0;
2370
+ setGuideComplete(false);
2371
+ },
2372
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.SquarePen, { className: "h-3 w-3" })
2373
+ }
2374
+ ),
2375
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2376
+ Button,
2377
+ {
2378
+ variant: "ghost",
2379
+ size: "sm",
2380
+ className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2381
+ onClick: () => onClose?.(),
2382
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.X, { className: "h-3.5 w-3.5" })
2383
+ }
2384
+ )
2385
+ ] })
2374
2386
  ] }),
2375
2387
  /* @__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: [
2376
2388
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "py-3 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 || "" : "How can I help?" }) }),
@@ -3318,7 +3330,7 @@ ${userText}`
3318
3330
  }
3319
3331
  }
3320
3332
  ),
3321
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-center gap-2 rounded-2xl border border-gray-200 bg-white px-3 py-2 shadow-sm", children: [
3333
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-start gap-2 rounded-xl border border-gray-200 bg-white px-3 py-2 shadow-sm", children: [
3322
3334
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3323
3335
  Button,
3324
3336
  {
@@ -3326,9 +3338,9 @@ ${userText}`
3326
3338
  size: "icon",
3327
3339
  variant: "ghost",
3328
3340
  onClick: () => fileInputRef.current?.click(),
3329
- className: "h-8 w-8 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100",
3341
+ className: "h-5 w-5 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100",
3330
3342
  title: "Upload CSV for bulk operations",
3331
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Paperclip, { className: "h-4 w-4" })
3343
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Paperclip, { className: "h-2.5 w-2.5" })
3332
3344
  }
3333
3345
  ),
3334
3346
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -3336,10 +3348,14 @@ ${userText}`
3336
3348
  {
3337
3349
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3338
3350
  value: input,
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`;
3351
+ onChange: (e) => setInput(e.target.value),
3352
+ rows: 1,
3353
+ 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-hidden outline-none",
3354
+ style: { minHeight: "20px", maxHeight: "120px" },
3355
+ onInput: (e) => {
3356
+ const target = e.target;
3357
+ target.style.height = "auto";
3358
+ target.style.height = Math.min(target.scrollHeight, 120) + "px";
3343
3359
  },
3344
3360
  onKeyDown: (e) => {
3345
3361
  if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
@@ -3380,9 +3396,7 @@ ${userText}`
3380
3396
  return;
3381
3397
  }
3382
3398
  }
3383
- },
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"
3399
+ }
3386
3400
  }
3387
3401
  ),
3388
3402
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -3391,8 +3405,8 @@ ${userText}`
3391
3405
  type: "submit",
3392
3406
  size: "icon",
3393
3407
  disabled: !input.trim() && !pendingFile,
3394
- className: "h-8 w-8 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3395
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ArrowUp, { className: "h-4 w-4" })
3408
+ className: "h-6 w-6 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3409
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ArrowUp, { className: "h-2.5 w-2.5" })
3396
3410
  }
3397
3411
  )
3398
3412
  ] })
package/dist/auto.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createKiteChat
3
- } from "./chunk-US7B3XXI.js";
3
+ } from "./chunk-RUEKV5AV.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -2353,23 +2353,35 @@ ${userText}`
2353
2353
  /* @__PURE__ */ jsx9(Sparkles, { className: "h-3.5 w-3.5 text-black", fill: "currentColor" }),
2354
2354
  /* @__PURE__ */ jsx9("h3", { className: "text-sm font-semibold text-gray-800", children: "Copilot" })
2355
2355
  ] }),
2356
- /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsx9(
2357
- Button,
2358
- {
2359
- variant: "ghost",
2360
- size: "sm",
2361
- className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2362
- onClick: () => {
2363
- setMessages([]);
2364
- setPanelView("landing");
2365
- setCurrentFolderId(void 0);
2366
- setActiveGuide(void 0);
2367
- activeGuideRef.current = void 0;
2368
- setGuideComplete(false);
2369
- },
2370
- children: /* @__PURE__ */ jsx9(SquarePen, { className: "h-3.5 w-3.5" })
2371
- }
2372
- ) })
2356
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-1", children: [
2357
+ /* @__PURE__ */ jsx9(
2358
+ Button,
2359
+ {
2360
+ variant: "ghost",
2361
+ size: "sm",
2362
+ className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2363
+ onClick: () => {
2364
+ setMessages([]);
2365
+ setPanelView("landing");
2366
+ setCurrentFolderId(void 0);
2367
+ setActiveGuide(void 0);
2368
+ activeGuideRef.current = void 0;
2369
+ setGuideComplete(false);
2370
+ },
2371
+ children: /* @__PURE__ */ jsx9(SquarePen, { className: "h-3 w-3" })
2372
+ }
2373
+ ),
2374
+ /* @__PURE__ */ jsx9(
2375
+ Button,
2376
+ {
2377
+ variant: "ghost",
2378
+ size: "sm",
2379
+ className: "h-7 w-7 p-0 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-full",
2380
+ onClick: () => onClose?.(),
2381
+ children: /* @__PURE__ */ jsx9(X, { className: "h-3.5 w-3.5" })
2382
+ }
2383
+ )
2384
+ ] })
2373
2385
  ] }),
2374
2386
  /* @__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: [
2375
2387
  /* @__PURE__ */ jsx9("div", { className: "py-3 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 || "" : "How can I help?" }) }),
@@ -3317,7 +3329,7 @@ ${userText}`
3317
3329
  }
3318
3330
  }
3319
3331
  ),
3320
- /* @__PURE__ */ jsxs5("div", { className: "flex w-full items-center gap-2 rounded-2xl border border-gray-200 bg-white px-3 py-2 shadow-sm", children: [
3332
+ /* @__PURE__ */ jsxs5("div", { className: "flex w-full items-start gap-2 rounded-xl border border-gray-200 bg-white px-3 py-2 shadow-sm", children: [
3321
3333
  /* @__PURE__ */ jsx9(
3322
3334
  Button,
3323
3335
  {
@@ -3325,9 +3337,9 @@ ${userText}`
3325
3337
  size: "icon",
3326
3338
  variant: "ghost",
3327
3339
  onClick: () => fileInputRef.current?.click(),
3328
- className: "h-8 w-8 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100",
3340
+ className: "h-5 w-5 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100",
3329
3341
  title: "Upload CSV for bulk operations",
3330
- children: /* @__PURE__ */ jsx9(Paperclip, { className: "h-4 w-4" })
3342
+ children: /* @__PURE__ */ jsx9(Paperclip, { className: "h-2.5 w-2.5" })
3331
3343
  }
3332
3344
  ),
3333
3345
  /* @__PURE__ */ jsx9(
@@ -3335,10 +3347,14 @@ ${userText}`
3335
3347
  {
3336
3348
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3337
3349
  value: input,
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`;
3350
+ onChange: (e) => setInput(e.target.value),
3351
+ rows: 1,
3352
+ 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-hidden outline-none",
3353
+ style: { minHeight: "20px", maxHeight: "120px" },
3354
+ onInput: (e) => {
3355
+ const target = e.target;
3356
+ target.style.height = "auto";
3357
+ target.style.height = Math.min(target.scrollHeight, 120) + "px";
3342
3358
  },
3343
3359
  onKeyDown: (e) => {
3344
3360
  if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
@@ -3379,9 +3395,7 @@ ${userText}`
3379
3395
  return;
3380
3396
  }
3381
3397
  }
3382
- },
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"
3398
+ }
3385
3399
  }
3386
3400
  ),
3387
3401
  /* @__PURE__ */ jsx9(
@@ -3390,8 +3404,8 @@ ${userText}`
3390
3404
  type: "submit",
3391
3405
  size: "icon",
3392
3406
  disabled: !input.trim() && !pendingFile,
3393
- className: "h-8 w-8 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3394
- children: /* @__PURE__ */ jsx9(ArrowUp, { className: "h-4 w-4" })
3407
+ className: "h-6 w-6 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3408
+ children: /* @__PURE__ */ jsx9(ArrowUp, { className: "h-2.5 w-2.5" })
3395
3409
  }
3396
3410
  )
3397
3411
  ] })