@kite-copilot/chat-panel 0.2.14 → 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,48 +2354,57 @@ ${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
- /* @__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
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pb-4", children: [
2378
- panelView === "landing" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
2379
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400", children: "Suggested Questions" }),
2380
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex flex-col gap-1", children: loadingQuestions ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Loader2, { className: "h-4 w-4 animate-spin text-gray-400" }) }) : startingQuestions.map((question, index) => {
2381
- const iconColors = ["bg-blue-400", "bg-green-400", "bg-purple-400", "bg-orange-400", "bg-pink-400"];
2382
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2383
- Button,
2384
- {
2385
- type: "button",
2386
- size: "sm",
2387
- variant: "ghost",
2388
- className: "w-full justify-start rounded-lg px-3 py-2 text-xs text-gray-700 hover:bg-gray-100 h-auto",
2389
- onClick: () => sendTopic(question.prompt),
2390
- children: [
2391
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: `mr-2 inline-block h-1.5 w-1.5 rounded-full ${iconColors[index % iconColors.length]}` }),
2392
- question.label
2393
- ]
2394
- },
2395
- question.id
2396
- );
2397
- }) })
2398
- ] }),
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?" }) }),
2389
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pb-4 px-4", children: [
2390
+ panelView === "landing" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex flex-col gap-1", children: loadingQuestions ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Loader2, { className: "h-4 w-4 animate-spin text-gray-400" }) }) : startingQuestions.map((question, index) => {
2391
+ const iconColors = ["bg-blue-400", "bg-green-400", "bg-purple-400", "bg-orange-400", "bg-pink-400"];
2392
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2393
+ Button,
2394
+ {
2395
+ type: "button",
2396
+ size: "sm",
2397
+ variant: "ghost",
2398
+ className: "w-full justify-start rounded-lg px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-100 h-auto",
2399
+ onClick: () => sendTopic(question.prompt),
2400
+ children: [
2401
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: `mr-2 inline-block h-1.5 w-1.5 rounded-full ${iconColors[index % iconColors.length]}` }),
2402
+ question.label
2403
+ ]
2404
+ },
2405
+ question.id
2406
+ );
2407
+ }) }) }),
2399
2408
  panelView === "folder" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
2400
2409
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "mb-3 flex items-center gap-2", children: [
2401
2410
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -3321,7 +3330,7 @@ ${userText}`
3321
3330
  }
3322
3331
  }
3323
3332
  ),
3324
- /* @__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: [
3325
3334
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3326
3335
  Button,
3327
3336
  {
@@ -3329,9 +3338,9 @@ ${userText}`
3329
3338
  size: "icon",
3330
3339
  variant: "ghost",
3331
3340
  onClick: () => fileInputRef.current?.click(),
3332
- 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",
3333
3342
  title: "Upload CSV for bulk operations",
3334
- 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" })
3335
3344
  }
3336
3345
  ),
3337
3346
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -3339,10 +3348,14 @@ ${userText}`
3339
3348
  {
3340
3349
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3341
3350
  value: input,
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`;
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";
3346
3359
  },
3347
3360
  onKeyDown: (e) => {
3348
3361
  if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
@@ -3383,9 +3396,7 @@ ${userText}`
3383
3396
  return;
3384
3397
  }
3385
3398
  }
3386
- },
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"
3399
+ }
3389
3400
  }
3390
3401
  ),
3391
3402
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
@@ -3394,8 +3405,8 @@ ${userText}`
3394
3405
  type: "submit",
3395
3406
  size: "icon",
3396
3407
  disabled: !input.trim() && !pendingFile,
3397
- className: "h-8 w-8 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3398
- 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" })
3399
3410
  }
3400
3411
  )
3401
3412
  ] })
package/dist/auto.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createKiteChat
3
- } from "./chunk-3A6DAX65.js";
3
+ } from "./chunk-RUEKV5AV.js";
4
4
 
5
5
  // src/auto.ts
6
6
  function mountKiteChat(config) {
@@ -2353,48 +2353,57 @@ ${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
- /* @__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
- /* @__PURE__ */ jsxs5("div", { className: "pb-4", children: [
2377
- panelView === "landing" && /* @__PURE__ */ jsxs5(Fragment2, { children: [
2378
- /* @__PURE__ */ jsx9("div", { className: "mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400", children: "Suggested Questions" }),
2379
- /* @__PURE__ */ jsx9("div", { className: "flex flex-col gap-1", children: loadingQuestions ? /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx9(Loader22, { className: "h-4 w-4 animate-spin text-gray-400" }) }) : startingQuestions.map((question, index) => {
2380
- const iconColors = ["bg-blue-400", "bg-green-400", "bg-purple-400", "bg-orange-400", "bg-pink-400"];
2381
- return /* @__PURE__ */ jsxs5(
2382
- Button,
2383
- {
2384
- type: "button",
2385
- size: "sm",
2386
- variant: "ghost",
2387
- className: "w-full justify-start rounded-lg px-3 py-2 text-xs text-gray-700 hover:bg-gray-100 h-auto",
2388
- onClick: () => sendTopic(question.prompt),
2389
- children: [
2390
- /* @__PURE__ */ jsx9("span", { className: `mr-2 inline-block h-1.5 w-1.5 rounded-full ${iconColors[index % iconColors.length]}` }),
2391
- question.label
2392
- ]
2393
- },
2394
- question.id
2395
- );
2396
- }) })
2397
- ] }),
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?" }) }),
2388
+ /* @__PURE__ */ jsxs5("div", { className: "pb-4 px-4", children: [
2389
+ panelView === "landing" && /* @__PURE__ */ jsx9(Fragment2, { children: /* @__PURE__ */ jsx9("div", { className: "flex flex-col gap-1", children: loadingQuestions ? /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx9(Loader22, { className: "h-4 w-4 animate-spin text-gray-400" }) }) : startingQuestions.map((question, index) => {
2390
+ const iconColors = ["bg-blue-400", "bg-green-400", "bg-purple-400", "bg-orange-400", "bg-pink-400"];
2391
+ return /* @__PURE__ */ jsxs5(
2392
+ Button,
2393
+ {
2394
+ type: "button",
2395
+ size: "sm",
2396
+ variant: "ghost",
2397
+ className: "w-full justify-start rounded-lg px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-100 h-auto",
2398
+ onClick: () => sendTopic(question.prompt),
2399
+ children: [
2400
+ /* @__PURE__ */ jsx9("span", { className: `mr-2 inline-block h-1.5 w-1.5 rounded-full ${iconColors[index % iconColors.length]}` }),
2401
+ question.label
2402
+ ]
2403
+ },
2404
+ question.id
2405
+ );
2406
+ }) }) }),
2398
2407
  panelView === "folder" && /* @__PURE__ */ jsxs5(Fragment2, { children: [
2399
2408
  /* @__PURE__ */ jsxs5("div", { className: "mb-3 flex items-center gap-2", children: [
2400
2409
  /* @__PURE__ */ jsx9(
@@ -3320,7 +3329,7 @@ ${userText}`
3320
3329
  }
3321
3330
  }
3322
3331
  ),
3323
- /* @__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: [
3324
3333
  /* @__PURE__ */ jsx9(
3325
3334
  Button,
3326
3335
  {
@@ -3328,9 +3337,9 @@ ${userText}`
3328
3337
  size: "icon",
3329
3338
  variant: "ghost",
3330
3339
  onClick: () => fileInputRef.current?.click(),
3331
- 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",
3332
3341
  title: "Upload CSV for bulk operations",
3333
- children: /* @__PURE__ */ jsx9(Paperclip, { className: "h-4 w-4" })
3342
+ children: /* @__PURE__ */ jsx9(Paperclip, { className: "h-2.5 w-2.5" })
3334
3343
  }
3335
3344
  ),
3336
3345
  /* @__PURE__ */ jsx9(
@@ -3338,10 +3347,14 @@ ${userText}`
3338
3347
  {
3339
3348
  placeholder: pendingFile ? "Describe what to do with this CSV..." : "Ask anything...",
3340
3349
  value: input,
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`;
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";
3345
3358
  },
3346
3359
  onKeyDown: (e) => {
3347
3360
  if (e.key === "Enter" && !e.shiftKey && !e.metaKey && !e.ctrlKey) {
@@ -3382,9 +3395,7 @@ ${userText}`
3382
3395
  return;
3383
3396
  }
3384
3397
  }
3385
- },
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"
3398
+ }
3388
3399
  }
3389
3400
  ),
3390
3401
  /* @__PURE__ */ jsx9(
@@ -3393,8 +3404,8 @@ ${userText}`
3393
3404
  type: "submit",
3394
3405
  size: "icon",
3395
3406
  disabled: !input.trim() && !pendingFile,
3396
- className: "h-8 w-8 rounded-full bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300",
3397
- 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" })
3398
3409
  }
3399
3410
  )
3400
3411
  ] })