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