@devalok/shilp-sutra-karm 0.16.0 → 0.17.0

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.
Files changed (142) hide show
  1. package/dist/_chunks/chat-panel.js +292 -230
  2. package/dist/_chunks/kanban-board.js +1113 -1078
  3. package/dist/_chunks/project-card.js +51 -51
  4. package/dist/_chunks/render-adjustment-type.js +2044 -2037
  5. package/dist/_chunks/sidebar-scratchpad.js +508 -0
  6. package/dist/_chunks/task-detail-panel.js +774 -752
  7. package/dist/_chunks/vendor.js +10425 -5216
  8. package/dist/admin/adjustments/approved-adjustments.d.ts +2 -1
  9. package/dist/admin/adjustments/approved-adjustments.d.ts.map +1 -1
  10. package/dist/admin/adjustments/index.d.ts +1 -0
  11. package/dist/admin/break/break-admin-skeleton.d.ts +2 -1
  12. package/dist/admin/break/break-admin-skeleton.d.ts.map +1 -1
  13. package/dist/admin/break/break-admin.d.ts +2 -1
  14. package/dist/admin/break/break-admin.d.ts.map +1 -1
  15. package/dist/admin/break/break-balance.d.ts +2 -1
  16. package/dist/admin/break/break-balance.d.ts.map +1 -1
  17. package/dist/admin/break/breaks.d.ts +2 -1
  18. package/dist/admin/break/breaks.d.ts.map +1 -1
  19. package/dist/admin/break/delete-break.d.ts +2 -1
  20. package/dist/admin/break/delete-break.d.ts.map +1 -1
  21. package/dist/admin/break/edit-break-balance.d.ts +2 -1
  22. package/dist/admin/break/edit-break-balance.d.ts.map +1 -1
  23. package/dist/admin/break/edit-break.d.ts +2 -1
  24. package/dist/admin/break/edit-break.d.ts.map +1 -1
  25. package/dist/admin/break/header.d.ts +2 -1
  26. package/dist/admin/break/header.d.ts.map +1 -1
  27. package/dist/admin/break/index.d.ts +1 -0
  28. package/dist/admin/break/leave-request.d.ts +2 -1
  29. package/dist/admin/break/leave-request.d.ts.map +1 -1
  30. package/dist/admin/break/use-break-date-picker.d.ts +1 -0
  31. package/dist/admin/dashboard/admin-dashboard.d.ts +7 -6
  32. package/dist/admin/dashboard/admin-dashboard.d.ts.map +1 -1
  33. package/dist/admin/dashboard/associate-detail.d.ts +2 -1
  34. package/dist/admin/dashboard/associate-detail.d.ts.map +1 -1
  35. package/dist/admin/dashboard/attendance-overview.d.ts +2 -1
  36. package/dist/admin/dashboard/attendance-overview.d.ts.map +1 -1
  37. package/dist/admin/dashboard/break-request.d.ts +2 -1
  38. package/dist/admin/dashboard/break-request.d.ts.map +1 -1
  39. package/dist/admin/dashboard/calendar.d.ts +2 -1
  40. package/dist/admin/dashboard/calendar.d.ts.map +1 -1
  41. package/dist/admin/dashboard/correction-list.d.ts +2 -1
  42. package/dist/admin/dashboard/correction-list.d.ts.map +1 -1
  43. package/dist/admin/dashboard/dashboard-header.d.ts +2 -1
  44. package/dist/admin/dashboard/dashboard-header.d.ts.map +1 -1
  45. package/dist/admin/dashboard/dashboard-skeleton.d.ts +2 -1
  46. package/dist/admin/dashboard/dashboard-skeleton.d.ts.map +1 -1
  47. package/dist/admin/dashboard/index.d.ts +1 -0
  48. package/dist/admin/dashboard/leave-requests.d.ts +2 -1
  49. package/dist/admin/dashboard/leave-requests.d.ts.map +1 -1
  50. package/dist/admin/dashboard/render-date.d.ts +2 -1
  51. package/dist/admin/dashboard/render-date.d.ts.map +1 -1
  52. package/dist/admin/dashboard/use-calendar-navigation.d.ts +1 -0
  53. package/dist/admin/dashboard/use-calendar-navigation.d.ts.map +1 -1
  54. package/dist/admin/dashboard/use-leave-request-interaction.d.ts +1 -0
  55. package/dist/admin/icons.d.ts +1 -0
  56. package/dist/admin/index.d.ts +1 -0
  57. package/dist/admin/types.d.ts +1 -0
  58. package/dist/admin/utils/date-range-utils.d.ts +1 -0
  59. package/dist/admin/utils/date-utils.d.ts +1 -0
  60. package/dist/admin/utils/emoji-utils.d.ts +1 -0
  61. package/dist/admin/utils/render-adjustment-type.d.ts +1 -0
  62. package/dist/admin/utils/render-status.d.ts +1 -0
  63. package/dist/board/board-column.d.ts +2 -1
  64. package/dist/board/board-column.d.ts.map +1 -1
  65. package/dist/board/board-constants.d.ts +6 -5
  66. package/dist/board/board-constants.d.ts.map +1 -1
  67. package/dist/board/board-context.d.ts +2 -1
  68. package/dist/board/board-context.d.ts.map +1 -1
  69. package/dist/board/board-toolbar.d.ts +4 -3
  70. package/dist/board/board-toolbar.d.ts.map +1 -1
  71. package/dist/board/board-types.d.ts +1 -0
  72. package/dist/board/board-utils.d.ts +1 -0
  73. package/dist/board/bulk-action-bar.d.ts +4 -3
  74. package/dist/board/bulk-action-bar.d.ts.map +1 -1
  75. package/dist/board/column-empty.d.ts +4 -6
  76. package/dist/board/column-empty.d.ts.map +1 -1
  77. package/dist/board/column-header.d.ts +4 -5
  78. package/dist/board/column-header.d.ts.map +1 -1
  79. package/dist/board/index.d.ts +1 -0
  80. package/dist/board/kanban-board.d.ts +1 -0
  81. package/dist/board/kanban-board.d.ts.map +1 -1
  82. package/dist/board/task-card.d.ts +5 -4
  83. package/dist/board/task-card.d.ts.map +1 -1
  84. package/dist/board/task-context-menu.d.ts +3 -4
  85. package/dist/board/task-context-menu.d.ts.map +1 -1
  86. package/dist/board/use-board-filters.d.ts +1 -0
  87. package/dist/board/use-board-keyboard.d.ts +1 -0
  88. package/dist/chat/chat-input.d.ts +2 -1
  89. package/dist/chat/chat-input.d.ts.map +1 -1
  90. package/dist/chat/chat-panel.d.ts +2 -1
  91. package/dist/chat/chat-panel.d.ts.map +1 -1
  92. package/dist/chat/conversation-list.d.ts +2 -1
  93. package/dist/chat/conversation-list.d.ts.map +1 -1
  94. package/dist/chat/index.d.ts +1 -0
  95. package/dist/chat/markdown-components.d.ts +1 -0
  96. package/dist/chat/message-list.d.ts +2 -1
  97. package/dist/chat/message-list.d.ts.map +1 -1
  98. package/dist/chat/streaming-text.d.ts +4 -1
  99. package/dist/chat/streaming-text.d.ts.map +1 -1
  100. package/dist/client/accent-provider.d.ts +1 -0
  101. package/dist/client/client-portal-header.d.ts +1 -0
  102. package/dist/client/index.d.ts +1 -0
  103. package/dist/client/project-card.d.ts +1 -0
  104. package/dist/dashboard/attendance-cta.d.ts +2 -1
  105. package/dist/dashboard/attendance-cta.d.ts.map +1 -1
  106. package/dist/dashboard/daily-brief.d.ts +2 -2
  107. package/dist/dashboard/daily-brief.d.ts.map +1 -1
  108. package/dist/dashboard/index.d.ts +1 -0
  109. package/dist/dashboard/index.js +5 -267
  110. package/dist/dashboard/scratchpad-widget.d.ts +2 -2
  111. package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
  112. package/dist/dashboard/sidebar-scratchpad.d.ts +2 -2
  113. package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
  114. package/dist/index.d.ts +3 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +211 -103
  117. package/dist/page-skeletons.d.ts +3 -2
  118. package/dist/page-skeletons.d.ts.map +1 -1
  119. package/dist/shell/karm-command-registry.d.ts +4 -0
  120. package/dist/shell/karm-command-registry.d.ts.map +1 -0
  121. package/dist/tasks/activity-tab.d.ts +2 -2
  122. package/dist/tasks/activity-tab.d.ts.map +1 -1
  123. package/dist/tasks/conversation-tab.d.ts +2 -2
  124. package/dist/tasks/conversation-tab.d.ts.map +1 -1
  125. package/dist/tasks/files-tab.d.ts +2 -2
  126. package/dist/tasks/files-tab.d.ts.map +1 -1
  127. package/dist/tasks/index.d.ts +1 -0
  128. package/dist/tasks/review-tab.d.ts +2 -2
  129. package/dist/tasks/review-tab.d.ts.map +1 -1
  130. package/dist/tasks/subtasks-tab.d.ts +2 -2
  131. package/dist/tasks/subtasks-tab.d.ts.map +1 -1
  132. package/dist/tasks/task-constants.d.ts +1 -0
  133. package/dist/tasks/task-detail-panel.d.ts +2 -1
  134. package/dist/tasks/task-detail-panel.d.ts.map +1 -1
  135. package/dist/tasks/task-properties.d.ts +2 -2
  136. package/dist/tasks/task-properties.d.ts.map +1 -1
  137. package/dist/tasks/task-utils.d.ts +9 -0
  138. package/dist/tasks/task-utils.d.ts.map +1 -0
  139. package/dist/utils/use-composed-ref.d.ts +1 -0
  140. package/llms.txt +3 -1
  141. package/package.json +80 -78
  142. package/dist/_chunks/daily-brief.js +0 -226
@@ -1,224 +1,283 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as t, Fragment as $ } from "react/jsx-runtime";
3
- import * as y from "react";
4
- import { useRef as M, useEffect as F, useState as D, useCallback as C } from "react";
5
- import { Sheet as G, SheetContent as V, SheetTitle as _ } from "@devalok/shilp-sutra/ui/sheet";
6
- import { u as q } from "./use-composed-ref.js";
7
- import { M as T } from "./vendor.js";
8
- import { IconRobot as g, IconAlertCircle as J, IconUser as X, IconSquare as Y, IconSend as Q, IconMessagePlus as R, IconMessage as S, IconArchive as W, IconTrash as Z, IconChevronDown as O, IconHistory as ee, IconX as se } from "@tabler/icons-react";
9
- import { Button as I } from "@devalok/shilp-sutra/ui/button";
10
- import { cn as L } from "@devalok/shilp-sutra/ui/lib/utils";
11
- import { DropdownMenu as te, DropdownMenuTrigger as ae, DropdownMenuContent as re, DropdownMenuItem as le } from "@devalok/shilp-sutra/ui";
2
+ import { jsx as e, jsxs as s, Fragment as q } from "react/jsx-runtime";
3
+ import * as k from "react";
4
+ import { useRef as R, useEffect as X, useState as A, useCallback as T } from "react";
5
+ import { Sheet as Y, SheetContent as J, SheetTitle as Q } from "@devalok/shilp-sutra/ui/sheet";
6
+ import { cn as b } from "@devalok/shilp-sutra/ui/lib/utils";
7
+ import { springs as w } from "@devalok/shilp-sutra/ui/lib/motion";
8
+ import { u as W } from "./use-composed-ref.js";
9
+ import { M as P, A as Z, m as N } from "./vendor.js";
10
+ import { IconRobot as C, IconAlertCircle as $, IconUser as O, IconSquare as S, IconSend as ee, IconMessagePlus as L, IconMessage as se, IconArchive as ae, IconTrash as re, IconChevronDown as te, IconHistory as le, IconX as de } from "@tabler/icons-react";
11
+ import { Button as D } from "@devalok/shilp-sutra/ui/button";
12
+ import { formatRelativeTime as ce } from "@devalok/shilp-sutra/ui/lib/date-utils";
13
+ import { DropdownMenu as ie, DropdownMenuTrigger as ne, DropdownMenuContent as oe, DropdownMenuItem as me } from "@devalok/shilp-sutra/ui";
12
14
  const H = {
13
- p: ({ children: s }) => /* @__PURE__ */ e("p", { className: "mb-ds-03 last:mb-0", children: s }),
15
+ p: ({ children: a }) => /* @__PURE__ */ e("p", { className: "mb-ds-03 last:mb-0", children: a }),
14
16
  code: ({
15
- children: s,
16
- className: a
17
- }) => (a == null ? void 0 : a.includes("language-")) ? /* @__PURE__ */ e("code", { className: a, children: s }) : /* @__PURE__ */ e("code", { className: "rounded bg-field px-ds-02 py-ds-01 text-ds-md", children: s }),
18
- pre: ({ children: s }) => /* @__PURE__ */ e("pre", { className: "mb-ds-03 overflow-x-auto rounded-ds-lg bg-field p-ds-04 text-ds-md", children: s }),
19
- ul: ({ children: s }) => /* @__PURE__ */ e("ul", { className: "mb-ds-03 list-disc pl-ds-05", children: s }),
20
- ol: ({ children: s }) => /* @__PURE__ */ e("ol", { className: "mb-ds-03 list-decimal pl-ds-05", children: s }),
21
- li: ({ children: s }) => /* @__PURE__ */ e("li", { className: "mb-ds-02", children: s }),
22
- strong: ({ children: s }) => /* @__PURE__ */ e("strong", { className: "font-semibold", children: s }),
23
- a: ({
24
- href: s,
25
17
  children: a,
26
- ...d
18
+ className: t
19
+ }) => (t == null ? void 0 : t.includes("language-")) ? /* @__PURE__ */ e("code", { className: t, children: a }) : /* @__PURE__ */ e("code", { className: "rounded bg-surface-3 px-ds-02 py-ds-01 text-ds-md", children: a }),
20
+ pre: ({ children: a }) => /* @__PURE__ */ e("pre", { className: "mb-ds-03 overflow-x-auto rounded-ds-lg bg-surface-3 p-ds-04 text-ds-md", children: a }),
21
+ ul: ({ children: a }) => /* @__PURE__ */ e("ul", { className: "mb-ds-03 list-disc pl-ds-05", children: a }),
22
+ ol: ({ children: a }) => /* @__PURE__ */ e("ol", { className: "mb-ds-03 list-decimal pl-ds-05", children: a }),
23
+ li: ({ children: a }) => /* @__PURE__ */ e("li", { className: "mb-ds-02", children: a }),
24
+ strong: ({ children: a }) => /* @__PURE__ */ e("strong", { className: "font-semibold", children: a }),
25
+ a: ({
26
+ href: a,
27
+ children: t,
28
+ ...c
27
29
  }) => {
28
- const l = s && /^(https?:\/\/|mailto:)/i.test(s) ? s : "#";
30
+ const d = a && /^(https?:\/\/|mailto:)/i.test(a) ? a : "#";
29
31
  return /* @__PURE__ */ e(
30
32
  "a",
31
33
  {
32
- href: l,
34
+ href: d,
33
35
  target: "_blank",
34
36
  rel: "noopener noreferrer",
35
- className: "text-interactive underline hover:text-interactive-hover",
36
- ...d,
37
- children: a
37
+ className: "text-accent-11 underline hover:text-accent-12",
38
+ ...c,
39
+ children: t
38
40
  }
39
41
  );
40
42
  }
41
- }, P = y.forwardRef(
42
- function({ text: a }, d) {
43
- return /* @__PURE__ */ t("div", { ref: d, "aria-live": "polite", children: [
44
- /* @__PURE__ */ e(T, { components: H, children: a }),
45
- /* @__PURE__ */ e("span", { className: "inline-block h-4 w-2 animate-pulse bg-text-secondary ml-ds-01" })
43
+ }, E = k.forwardRef(
44
+ function({ text: t, isComplete: c = !1, className: d, ...u }, n) {
45
+ return /* @__PURE__ */ s("div", { ref: n, className: b(d), ...u, "aria-live": "off", children: [
46
+ /* @__PURE__ */ e(P, { components: H, children: t }),
47
+ !c && /* @__PURE__ */ e("span", { className: "inline-block h-4 w-2 animate-pulse bg-surface-fg-muted ml-ds-01" }),
48
+ /* @__PURE__ */ e(
49
+ "span",
50
+ {
51
+ className: "sr-only",
52
+ "aria-live": "polite",
53
+ "aria-atomic": "true",
54
+ children: c ? t : ""
55
+ }
56
+ )
46
57
  ] });
47
58
  }
48
59
  );
49
- P.displayName = "StreamingText";
50
- const A = y.forwardRef(
60
+ E.displayName = "StreamingText";
61
+ const K = k.forwardRef(
51
62
  function({
52
- messages: a,
53
- isStreaming: d = !1,
54
- streamingText: l = "",
55
- isLoadingMessages: m = !1,
56
- emptyTitle: c = "Karm AI",
57
- emptyDescription: x = "Ask me about tasks, projects, attendance, or anything else."
63
+ messages: t,
64
+ isStreaming: c = !1,
65
+ streamingText: d = "",
66
+ isLoadingMessages: u = !1,
67
+ emptyTitle: n = "Karm AI",
68
+ emptyDescription: h = "Ask me about tasks, projects, attendance, or anything else.",
69
+ className: m,
70
+ ...f
58
71
  }, o) {
59
- const h = M(null), i = q(h, o);
60
- return F(() => {
61
- const r = h.current;
72
+ const p = R(null), i = W(p, o);
73
+ return X(() => {
74
+ const r = p.current;
62
75
  r && (r.scrollTop = r.scrollHeight);
63
- }, [a, l]), m ? /* @__PURE__ */ e("div", { ref: o, className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-ds-03", children: [
64
- /* @__PURE__ */ e("div", { className: "h-ds-xs w-ds-xs animate-spin rounded-ds-full border-2 border-text-secondary border-t-transparent" }),
65
- /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-placeholder", children: "Loading messages..." })
66
- ] }) }) : a.length === 0 && !d ? /* @__PURE__ */ e("div", { ref: o, className: "flex flex-1 items-center justify-center p-ds-06", children: /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-ds-04 text-center", children: [
67
- /* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(g, { className: "h-ico-lg w-ico-lg text-text-secondary" }) }),
68
- /* @__PURE__ */ e("h3", { className: "text-ds-base text-text-primary", children: c }),
69
- /* @__PURE__ */ e("p", { className: "text-ds-sm max-w-[280px] text-text-placeholder", children: x })
70
- ] }) }) : /* @__PURE__ */ e("div", { ref: i, className: "no-scrollbar flex-1 overflow-y-auto p-ds-05", children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-05", role: "log", "aria-label": "Chat messages", children: [
71
- a.map((r) => r.role === "SYSTEM" ? /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-lg bg-error-surface px-ds-04 py-ds-03", children: [
72
- /* @__PURE__ */ e(J, { className: "h-ico-sm w-ico-sm shrink-0 text-text-error" }),
73
- /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-error", children: r.content })
74
- ] }) }, r.id) : r.role === "USER" ? /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ t("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
75
- /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-br-ds-sm bg-interactive px-ds-04 py-ds-03 text-text-on-color", children: /* @__PURE__ */ e("p", { className: "text-ds-md whitespace-pre-wrap", children: r.content }) }),
76
- /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(X, { className: "h-ico-sm w-ico-sm text-text-secondary" }) })
77
- ] }) }, r.id) : /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ t("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
78
- /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
79
- /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-text-primary", children: /* @__PURE__ */ e(T, { components: H, children: r.content }) }) })
80
- ] }) }, r.id)),
81
- d && l && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ t("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
82
- /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
83
- /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-text-primary", children: /* @__PURE__ */ e(P, { text: l }) }) })
84
- ] }) }),
85
- d && !l && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ t("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
86
- /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
87
- /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02b py-ds-02", children: [
88
- /* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:0ms]" }),
89
- /* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:150ms]" }),
90
- /* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:300ms]" })
91
- ] }) })
92
- ] }) })
93
- ] }) });
76
+ }, [t, d]), u ? /* @__PURE__ */ e("div", { ref: o, className: b("flex flex-1 items-center justify-center", m), ...f, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-ds-03", children: [
77
+ /* @__PURE__ */ e("div", { className: "h-ds-xs w-ds-xs animate-spin rounded-ds-full border-2 border-surface-border border-t-transparent" }),
78
+ /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: "Loading messages..." })
79
+ ] }) }) : t.length === 0 && !c ? /* @__PURE__ */ e("div", { ref: o, className: b("flex flex-1 items-center justify-center p-ds-06", m), ...f, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-ds-04 text-center", children: [
80
+ /* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-surface-3", children: /* @__PURE__ */ e(C, { className: "h-ico-lg w-ico-lg text-surface-fg-muted" }) }),
81
+ /* @__PURE__ */ e("h3", { className: "text-ds-base text-surface-fg", children: n }),
82
+ /* @__PURE__ */ e("p", { className: "text-ds-sm max-w-[280px] text-surface-fg-subtle", children: h })
83
+ ] }) }) : /* @__PURE__ */ e("div", { ref: i, className: b("no-scrollbar flex-1 overflow-y-auto p-ds-05", m), ...f, children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-05", role: "log", "aria-label": "Chat messages", children: /* @__PURE__ */ s(Z, { initial: !1, children: [
84
+ t.map((r) => r.role === "SYSTEM" ? /* @__PURE__ */ e(
85
+ N.div,
86
+ {
87
+ initial: { opacity: 0, y: 10 },
88
+ animate: { opacity: 1, y: 0 },
89
+ transition: w.snappy,
90
+ className: "flex justify-center",
91
+ children: /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-lg bg-error-3 px-ds-04 py-ds-03", children: [
92
+ /* @__PURE__ */ e($, { className: "h-ico-sm w-ico-sm shrink-0 text-error-11" }),
93
+ /* @__PURE__ */ e("p", { className: "text-ds-sm text-error-11", children: r.content })
94
+ ] })
95
+ },
96
+ r.id
97
+ ) : r.role === "USER" ? /* @__PURE__ */ e(
98
+ N.div,
99
+ {
100
+ initial: { opacity: 0, y: 10 },
101
+ animate: { opacity: 1, y: 0 },
102
+ transition: w.snappy,
103
+ className: "flex justify-end",
104
+ children: /* @__PURE__ */ s("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
105
+ /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-br-ds-sm bg-accent-9 px-ds-04 py-ds-03 text-accent-fg", children: /* @__PURE__ */ e("p", { className: "text-ds-md whitespace-pre-wrap", children: r.content }) }),
106
+ /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-surface-3", children: /* @__PURE__ */ e(O, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) })
107
+ ] })
108
+ },
109
+ r.id
110
+ ) : /* @__PURE__ */ e(
111
+ N.div,
112
+ {
113
+ initial: { opacity: 0, y: 10 },
114
+ animate: { opacity: 1, y: 0 },
115
+ transition: w.snappy,
116
+ className: "flex justify-start",
117
+ children: /* @__PURE__ */ s("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
118
+ /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-surface-3", children: /* @__PURE__ */ e(C, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) }),
119
+ /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-surface-3 px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg", children: /* @__PURE__ */ e(P, { components: H, children: r.content }) }) })
120
+ ] })
121
+ },
122
+ r.id
123
+ )),
124
+ c && d && /* @__PURE__ */ e(
125
+ N.div,
126
+ {
127
+ initial: { opacity: 0, y: 10 },
128
+ animate: { opacity: 1, y: 0 },
129
+ transition: w.snappy,
130
+ className: "flex justify-start",
131
+ children: /* @__PURE__ */ s("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
132
+ /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-surface-3", children: /* @__PURE__ */ e(C, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) }),
133
+ /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-surface-3 px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg", children: /* @__PURE__ */ e(E, { text: d }) }) })
134
+ ] })
135
+ },
136
+ "streaming-text"
137
+ ),
138
+ c && !d && /* @__PURE__ */ e(
139
+ N.div,
140
+ {
141
+ initial: { opacity: 0, y: 10 },
142
+ animate: { opacity: 1, y: 0 },
143
+ transition: w.snappy,
144
+ className: "flex justify-start",
145
+ children: /* @__PURE__ */ s("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
146
+ /* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-surface-3", children: /* @__PURE__ */ e(C, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) }),
147
+ /* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-surface-3 px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02b py-ds-02", children: [0, 1, 2].map((r) => /* @__PURE__ */ e(
148
+ N.span,
149
+ {
150
+ className: "h-2 w-2 rounded-ds-full bg-surface-fg-subtle",
151
+ animate: { y: [0, -4, 0] },
152
+ transition: { duration: 0.6, repeat: 1 / 0, delay: r * 0.15 }
153
+ },
154
+ r
155
+ )) }) })
156
+ ] })
157
+ },
158
+ "streaming-dots"
159
+ )
160
+ ] }) }) });
94
161
  }
95
162
  );
96
- A.displayName = "MessageList";
97
- const E = y.forwardRef(
163
+ K.displayName = "MessageList";
164
+ const U = k.forwardRef(
98
165
  function({
99
- onSubmit: a,
100
- onCancel: d,
101
- isStreaming: l = !1,
102
- placeholder: m = "Ask Karm AI...",
103
- disclaimer: c = "AI responses may be inaccurate. Verify important information."
104
- }, x) {
105
- const [o, h] = D(""), i = M(null), r = C(() => {
106
- const n = i.current;
107
- n && (n.style.height = "auto", n.style.height = Math.min(n.scrollHeight, 160) + "px");
108
- }, []), b = C(() => {
109
- const n = o.trim();
110
- !n || l || (h(""), i.current && (i.current.style.height = "auto"), a(n));
111
- }, [o, l, a]), v = C(
112
- (n) => {
113
- n.key === "Enter" && !n.shiftKey && (n.preventDefault(), b());
166
+ onSubmit: t,
167
+ onCancel: c,
168
+ isStreaming: d = !1,
169
+ placeholder: u = "Ask Karm AI...",
170
+ disclaimer: n = "AI responses may be inaccurate. Verify important information.",
171
+ className: h,
172
+ ...m
173
+ }, f) {
174
+ const [o, p] = A(""), i = R(null), r = T(() => {
175
+ const l = i.current;
176
+ l && (l.style.height = "auto", l.style.height = Math.min(l.scrollHeight, 160) + "px");
177
+ }, []), y = T(() => {
178
+ const l = o.trim();
179
+ !l || d || (p(""), i.current && (i.current.style.height = "auto"), t(l));
180
+ }, [o, d, t]), v = T(
181
+ (l) => {
182
+ l.key === "Enter" && !l.shiftKey && (l.preventDefault(), y());
114
183
  },
115
- [b]
184
+ [y]
116
185
  );
117
- return /* @__PURE__ */ t("div", { ref: x, className: "border-t border-border bg-layer-01 p-ds-04", children: [
118
- /* @__PURE__ */ t("div", { className: "flex items-end gap-ds-03 rounded-ds-xl border border-border bg-field px-ds-04 py-ds-03", children: [
186
+ return /* @__PURE__ */ s("div", { ref: f, className: b("border-t border-surface-border-strong bg-surface-1 p-ds-04", h), ...m, children: [
187
+ /* @__PURE__ */ s("div", { className: "flex items-end gap-ds-03 rounded-ds-xl border border-surface-border-strong bg-surface-3 px-ds-04 py-ds-03", children: [
119
188
  /* @__PURE__ */ e(
120
189
  "textarea",
121
190
  {
122
191
  ref: i,
123
192
  value: o,
124
- onChange: (n) => {
125
- h(n.target.value), r();
193
+ onChange: (l) => {
194
+ p(l.target.value), r();
126
195
  },
127
196
  onKeyDown: v,
128
- placeholder: m,
197
+ placeholder: u,
129
198
  "aria-label": "Type a message",
130
- disabled: l,
199
+ disabled: d,
131
200
  rows: 1,
132
- className: "text-ds-md no-scrollbar max-h-[160px] min-h-ds-xs flex-1 resize-none bg-transparent text-text-primary placeholder:text-text-placeholder focus:outline-none disabled:opacity-[0.38]"
201
+ className: "text-ds-md no-scrollbar max-h-[160px] min-h-ds-xs flex-1 resize-none bg-transparent text-surface-fg placeholder:text-surface-fg-subtle focus:outline-none disabled:opacity-action-disabled"
133
202
  }
134
203
  ),
135
- l ? /* @__PURE__ */ e(I, { variant: "solid", color: "error", size: "icon-sm", className: "h-ds-sm w-ds-sm shrink-0 rounded-ds-lg", onClick: d, "aria-label": "Stop generating", children: /* @__PURE__ */ e(Y, { className: "h-ico-sm w-ico-sm" }) }) : /* @__PURE__ */ e(I, { size: "icon-sm", className: "h-ds-sm w-ds-sm shrink-0 rounded-ds-lg", onClick: b, disabled: !o.trim(), "aria-label": "Send message", children: /* @__PURE__ */ e(Q, { className: "h-ico-sm w-ico-sm" }) })
204
+ d ? /* @__PURE__ */ e(D, { variant: "solid", color: "error", size: "icon-sm", className: "h-ds-sm w-ds-sm shrink-0 rounded-ds-lg", onClick: c, "aria-label": "Stop generating", children: /* @__PURE__ */ e(S, { className: "h-ico-sm w-ico-sm" }) }) : /* @__PURE__ */ e(D, { size: "icon-sm", className: "h-ds-sm w-ds-sm shrink-0 rounded-ds-lg", onClick: y, disabled: !o.trim(), "aria-label": "Send message", children: /* @__PURE__ */ e(ee, { className: "h-ico-sm w-ico-sm" }) })
136
205
  ] }),
137
- c && /* @__PURE__ */ e("p", { className: "text-ds-sm mt-ds-02b text-center text-text-placeholder", children: c })
206
+ n && /* @__PURE__ */ e("p", { className: "text-ds-sm mt-ds-02b text-center text-surface-fg-subtle", children: n })
138
207
  ] });
139
208
  }
140
209
  );
141
- E.displayName = "ChatInput";
142
- function de(s) {
143
- const a = new Date(s), l = (/* @__PURE__ */ new Date()).getTime() - a.getTime(), m = Math.floor(l / 6e4);
144
- if (m < 1) return "Just now";
145
- if (m < 60) return `${m}m ago`;
146
- const c = Math.floor(m / 60);
147
- if (c < 24) return `${c}h ago`;
148
- const x = Math.floor(c / 24);
149
- return x < 7 ? `${x}d ago` : a.toLocaleDateString("en-IN", {
150
- day: "numeric",
151
- month: "short"
152
- });
153
- }
154
- const K = y.forwardRef(
210
+ U.displayName = "ChatInput";
211
+ const z = k.forwardRef(
155
212
  function({
156
- conversations: a,
157
- activeConversationId: d,
158
- isLoading: l = !1,
159
- onSelect: m,
160
- onNewChat: c,
161
- onArchive: x,
162
- onDelete: o
163
- }, h) {
164
- return /* @__PURE__ */ t("div", { ref: h, className: "flex flex-1 flex-col overflow-hidden", children: [
165
- /* @__PURE__ */ t("div", { className: "flex items-center justify-between border-b border-border px-ds-05 py-ds-04", children: [
166
- /* @__PURE__ */ e("h3", { className: "text-ds-md font-semibold text-text-primary", children: "Conversations" }),
167
- /* @__PURE__ */ t(
213
+ conversations: t,
214
+ activeConversationId: c,
215
+ isLoading: d = !1,
216
+ onSelect: u,
217
+ onNewChat: n,
218
+ onArchive: h,
219
+ onDelete: m,
220
+ className: f,
221
+ ...o
222
+ }, p) {
223
+ return /* @__PURE__ */ s("div", { ref: p, className: b("flex flex-1 flex-col overflow-hidden", f), ...o, children: [
224
+ /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
225
+ /* @__PURE__ */ e("h3", { className: "text-ds-md font-semibold text-surface-fg", children: "Conversations" }),
226
+ /* @__PURE__ */ s(
168
227
  "button",
169
228
  {
170
- onClick: c,
171
- className: "flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-text-secondary transition-colors hover:bg-layer-02",
229
+ onClick: n,
230
+ className: "flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b text-surface-fg-muted transition-colors hover:bg-surface-2",
172
231
  children: [
173
- /* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm" }),
232
+ /* @__PURE__ */ e(L, { className: "h-ico-sm w-ico-sm" }),
174
233
  /* @__PURE__ */ e("span", { className: "text-ds-sm", children: "New Chat" })
175
234
  ]
176
235
  }
177
236
  )
178
237
  ] }),
179
- /* @__PURE__ */ e("div", { className: "no-scrollbar flex-1 overflow-y-auto", children: l ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md animate-spin rounded-ds-full border-2 border-text-secondary border-t-transparent" }) }) : a.length === 0 ? /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center gap-ds-03 py-12", children: [
180
- /* @__PURE__ */ e(S, { className: "h-ds-sm w-ds-sm text-text-placeholder" }),
181
- /* @__PURE__ */ e("p", { className: "text-ds-md text-text-placeholder", children: "No conversations yet" })
182
- ] }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: a.map((i) => /* @__PURE__ */ t(
238
+ /* @__PURE__ */ e("div", { className: "no-scrollbar flex-1 overflow-y-auto", children: d ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md animate-spin rounded-ds-full border-2 border-surface-border border-t-transparent" }) }) : t.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-ds-03 py-12", children: [
239
+ /* @__PURE__ */ e(se, { className: "h-ds-sm w-ds-sm text-surface-fg-subtle" }),
240
+ /* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: "No conversations yet" })
241
+ ] }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: t.map((i) => /* @__PURE__ */ s(
183
242
  "div",
184
243
  {
185
- className: L(
186
- "group flex items-center gap-ds-04 border-b border-border-subtle px-ds-05 py-ds-04 transition-colors hover:bg-layer-02",
187
- d === i.id && "bg-layer-02"
244
+ className: b(
245
+ "group flex items-center gap-ds-04 border-b border-surface-border px-ds-05 py-ds-04 transition-colors hover:bg-surface-2",
246
+ c === i.id && "bg-surface-2"
188
247
  ),
189
248
  children: [
190
- /* @__PURE__ */ t(
249
+ /* @__PURE__ */ s(
191
250
  "button",
192
251
  {
193
- onClick: () => m(i.id),
252
+ onClick: () => u(i.id),
194
253
  className: "flex min-w-0 flex-1 flex-col gap-ds-01 text-left",
195
254
  children: [
196
- /* @__PURE__ */ e("p", { className: "text-ds-md truncate text-text-primary", children: i.title || "Untitled conversation" }),
197
- /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-placeholder", children: de(i.updatedAt) })
255
+ /* @__PURE__ */ e("p", { className: "text-ds-md truncate text-surface-fg", children: i.title || "Untitled conversation" }),
256
+ /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: ce(i.updatedAt) })
198
257
  ]
199
258
  }
200
259
  ),
201
- /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-ds-02 opacity-0 transition-opacity group-hover:opacity-100", children: [
202
- x && /* @__PURE__ */ e(
260
+ /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-ds-02 opacity-0 transition-opacity group-hover:opacity-100", children: [
261
+ h && /* @__PURE__ */ e(
203
262
  "button",
204
263
  {
205
264
  onClick: (r) => {
206
- r.stopPropagation(), x(i.id);
265
+ r.stopPropagation(), h(i.id);
207
266
  },
208
- className: "flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-text-placeholder transition-colors hover:bg-field hover:text-text-secondary",
267
+ className: "flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-3 hover:text-surface-fg-muted",
209
268
  "aria-label": "Archive conversation",
210
- children: /* @__PURE__ */ e(W, { className: "h-ico-sm w-ico-sm" })
269
+ children: /* @__PURE__ */ e(ae, { className: "h-ico-sm w-ico-sm" })
211
270
  }
212
271
  ),
213
- o && /* @__PURE__ */ e(
272
+ m && /* @__PURE__ */ e(
214
273
  "button",
215
274
  {
216
275
  onClick: (r) => {
217
- r.stopPropagation(), o(i.id);
276
+ r.stopPropagation(), m(i.id);
218
277
  },
219
- className: "flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-text-placeholder transition-colors hover:bg-error-surface hover:text-text-error",
278
+ className: "flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-error-3 hover:text-error-11",
220
279
  "aria-label": "Delete conversation",
221
- children: /* @__PURE__ */ e(Z, { className: "h-ico-sm w-ico-sm" })
280
+ children: /* @__PURE__ */ e(re, { className: "h-ico-sm w-ico-sm" })
222
281
  }
223
282
  )
224
283
  ] })
@@ -229,8 +288,8 @@ const K = y.forwardRef(
229
288
  ] });
230
289
  }
231
290
  );
232
- K.displayName = "ConversationList";
233
- const ie = [
291
+ z.displayName = "ConversationList";
292
+ const fe = [
234
293
  { id: "devadoot", name: "Devadoot", desc: "General Assistant" },
235
294
  { id: "prahari", name: "Prahari", desc: "Attendance & Time" },
236
295
  { id: "sutradhar", name: "Sutradhar", desc: "Tasks & Projects" },
@@ -238,126 +297,129 @@ const ie = [
238
297
  { id: "vidwan", name: "Vidwan", desc: "Knowledge Expert" },
239
298
  { id: "sanchalak", name: "Sanchalak", desc: "Manager Advisor" },
240
299
  { id: "dwar-palak", name: "Dwar-Palak", desc: "Access Control" }
241
- ], ne = y.forwardRef(
300
+ ], ue = k.forwardRef(
242
301
  function({
243
- isOpen: a,
244
- onOpenChange: d,
245
- messages: l,
246
- conversations: m,
247
- agents: c = ie,
248
- selectedAgentId: x = "devadoot",
249
- activeConversationId: o,
250
- isStreaming: h = !1,
251
- streamingText: i = "",
252
- isLoadingMessages: r = !1,
253
- isLoadingConversations: b = !1,
254
- onSendMessage: v,
255
- onCancelStream: n,
256
- onSelectAgent: w,
257
- onStartNewChat: p,
258
- onSelectConversation: k,
259
- onArchiveConversation: U,
260
- onDeleteConversation: z
261
- }, B) {
262
- const [j, N] = D(!1), u = c.find((f) => f.id === x) ?? c[0];
263
- return /* @__PURE__ */ e(G, { open: a, onOpenChange: d, children: /* @__PURE__ */ t(
264
- V,
302
+ isOpen: t,
303
+ onOpenChange: c,
304
+ messages: d,
305
+ conversations: u,
306
+ agents: n = fe,
307
+ selectedAgentId: h = "devadoot",
308
+ activeConversationId: m,
309
+ isStreaming: f = !1,
310
+ streamingText: o = "",
311
+ isLoadingMessages: p = !1,
312
+ isLoadingConversations: i = !1,
313
+ onSendMessage: r,
314
+ onCancelStream: y,
315
+ onSelectAgent: v,
316
+ onStartNewChat: l,
317
+ onSelectConversation: I,
318
+ onArchiveConversation: B,
319
+ onDeleteConversation: F,
320
+ className: G,
321
+ ...V
322
+ }, _) {
323
+ const [M, j] = A(!1), g = n.find((x) => x.id === h) ?? n[0];
324
+ return /* @__PURE__ */ e(Y, { open: t, onOpenChange: c, children: /* @__PURE__ */ s(
325
+ J,
265
326
  {
266
- ref: B,
327
+ ref: _,
267
328
  side: "right",
268
- className: "flex w-full flex-col gap-0 border-l border-border bg-layer-01 p-0 sm:max-w-[480px] [&>button]:hidden",
329
+ className: b("flex w-full flex-col gap-0 border-l border-surface-border-strong bg-surface-1 p-0 sm:max-w-[480px] [&>button]:hidden", G),
330
+ ...V,
269
331
  children: [
270
- /* @__PURE__ */ e(_, { className: "sr-only", children: "AI Chat" }),
271
- /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 border-b border-border px-ds-05 py-ds-04", children: [
272
- /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ t(te, { children: [
273
- /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ t(
332
+ /* @__PURE__ */ e(Q, { className: "sr-only", children: "AI Chat" }),
333
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
334
+ /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ s(ie, { children: [
335
+ /* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ s(
274
336
  "button",
275
337
  {
276
- className: "flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b transition-colors hover:bg-layer-02",
338
+ className: "flex items-center gap-ds-02b rounded-ds-lg px-ds-03 py-ds-02b transition-colors hover:bg-surface-2",
277
339
  children: [
278
- /* @__PURE__ */ e("span", { className: "text-ds-base text-text-primary", children: u == null ? void 0 : u.name }),
279
- /* @__PURE__ */ e("span", { className: "text-ds-sm text-text-placeholder", children: u == null ? void 0 : u.desc }),
280
- /* @__PURE__ */ e(O, { className: "h-ico-sm w-ico-sm text-text-placeholder" })
340
+ /* @__PURE__ */ e("span", { className: "text-ds-base text-surface-fg", children: g == null ? void 0 : g.name }),
341
+ /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: g == null ? void 0 : g.desc }),
342
+ /* @__PURE__ */ e(te, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" })
281
343
  ]
282
344
  }
283
345
  ) }),
284
- /* @__PURE__ */ e(re, { align: "start", className: "w-64", children: c.map((f) => /* @__PURE__ */ e(
285
- le,
346
+ /* @__PURE__ */ e(oe, { align: "start", className: "w-64", children: n.map((x) => /* @__PURE__ */ e(
347
+ me,
286
348
  {
287
- onClick: () => w == null ? void 0 : w(f.id),
288
- className: x === f.id ? "bg-layer-02" : "",
289
- children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
290
- /* @__PURE__ */ e("span", { className: "text-ds-md text-text-primary", children: f.name }),
291
- /* @__PURE__ */ e("span", { className: "text-ds-sm text-text-placeholder", children: f.desc })
349
+ onClick: () => v == null ? void 0 : v(x.id),
350
+ className: h === x.id ? "bg-surface-2" : "",
351
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
352
+ /* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg", children: x.name }),
353
+ /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: x.desc })
292
354
  ] })
293
355
  },
294
- f.id
356
+ x.id
295
357
  )) })
296
358
  ] }) }),
297
359
  /* @__PURE__ */ e(
298
360
  "button",
299
361
  {
300
362
  onClick: () => {
301
- p == null || p(), N(!1);
363
+ l == null || l(), j(!1);
302
364
  },
303
- className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg text-text-secondary transition-colors hover:bg-layer-02",
365
+ className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg text-surface-fg-muted transition-colors hover:bg-surface-2",
304
366
  "aria-label": "New chat",
305
- children: /* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm" })
367
+ children: /* @__PURE__ */ e(L, { className: "h-ico-sm w-ico-sm" })
306
368
  }
307
369
  ),
308
370
  /* @__PURE__ */ e(
309
371
  "button",
310
372
  {
311
- onClick: () => N(!j),
312
- className: L(
313
- "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg transition-colors hover:bg-layer-02",
314
- j ? "bg-layer-02 text-text-primary" : "text-text-secondary"
373
+ onClick: () => j(!M),
374
+ className: b(
375
+ "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg transition-colors hover:bg-surface-2",
376
+ M ? "bg-surface-2 text-surface-fg" : "text-surface-fg-muted"
315
377
  ),
316
378
  "aria-label": "Conversation history",
317
- children: /* @__PURE__ */ e(ee, { className: "h-ico-sm w-ico-sm" })
379
+ children: /* @__PURE__ */ e(le, { className: "h-ico-sm w-ico-sm" })
318
380
  }
319
381
  ),
320
382
  /* @__PURE__ */ e(
321
383
  "button",
322
384
  {
323
- onClick: () => d(!1),
324
- className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg text-text-secondary transition-colors hover:bg-layer-02",
385
+ onClick: () => c(!1),
386
+ className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-lg text-surface-fg-muted transition-colors hover:bg-surface-2",
325
387
  "aria-label": "Close chat",
326
- children: /* @__PURE__ */ e(se, { className: "h-ico-sm w-ico-sm" })
388
+ children: /* @__PURE__ */ e(de, { className: "h-ico-sm w-ico-sm" })
327
389
  }
328
390
  )
329
391
  ] }),
330
- j ? /* @__PURE__ */ e(
331
- K,
392
+ M ? /* @__PURE__ */ e(
393
+ z,
332
394
  {
333
- conversations: m,
334
- activeConversationId: o,
335
- isLoading: b,
336
- onSelect: (f) => {
337
- k == null || k(f), N(!1);
395
+ conversations: u,
396
+ activeConversationId: m,
397
+ isLoading: i,
398
+ onSelect: (x) => {
399
+ I == null || I(x), j(!1);
338
400
  },
339
401
  onNewChat: () => {
340
- p == null || p(), N(!1);
402
+ l == null || l(), j(!1);
341
403
  },
342
- onArchive: U,
343
- onDelete: z
404
+ onArchive: B,
405
+ onDelete: F
344
406
  }
345
- ) : /* @__PURE__ */ t($, { children: [
407
+ ) : /* @__PURE__ */ s(q, { children: [
346
408
  /* @__PURE__ */ e(
347
- A,
409
+ K,
348
410
  {
349
- messages: l,
350
- isStreaming: h,
351
- streamingText: i,
352
- isLoadingMessages: r
411
+ messages: d,
412
+ isStreaming: f,
413
+ streamingText: o,
414
+ isLoadingMessages: p
353
415
  }
354
416
  ),
355
417
  /* @__PURE__ */ e(
356
- E,
418
+ U,
357
419
  {
358
- onSubmit: v,
359
- onCancel: n,
360
- isStreaming: h
420
+ onSubmit: r,
421
+ onCancel: y,
422
+ isStreaming: f
361
423
  }
362
424
  )
363
425
  ] })
@@ -366,11 +428,11 @@ const ie = [
366
428
  ) });
367
429
  }
368
430
  );
369
- ne.displayName = "ChatPanel";
431
+ ue.displayName = "ChatPanel";
370
432
  export {
371
- E as C,
372
- A as M,
373
- P as S,
374
- ne as a,
375
- K as b
433
+ U as C,
434
+ K as M,
435
+ E as S,
436
+ ue as a,
437
+ z as b
376
438
  };