@tetherto/mdk-ui-agent 0.0.0 → 0.12.1

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 (217) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +310 -0
  3. package/dist/branding.d.ts +36 -0
  4. package/dist/branding.d.ts.map +1 -0
  5. package/dist/branding.js +37 -0
  6. package/dist/branding.js.map +1 -0
  7. package/dist/components/approval-card.d.ts +46 -0
  8. package/dist/components/approval-card.d.ts.map +1 -0
  9. package/dist/components/approval-card.js +84 -0
  10. package/dist/components/approval-card.js.map +1 -0
  11. package/dist/components/assistant-message.d.ts +25 -0
  12. package/dist/components/assistant-message.d.ts.map +1 -0
  13. package/dist/components/assistant-message.js +49 -0
  14. package/dist/components/assistant-message.js.map +1 -0
  15. package/dist/components/co-pilot-panel.d.ts +17 -0
  16. package/dist/components/co-pilot-panel.d.ts.map +1 -0
  17. package/dist/components/co-pilot-panel.js +33 -0
  18. package/dist/components/co-pilot-panel.js.map +1 -0
  19. package/dist/components/code-block.d.ts +17 -0
  20. package/dist/components/code-block.d.ts.map +1 -0
  21. package/dist/components/code-block.js +40 -0
  22. package/dist/components/code-block.js.map +1 -0
  23. package/dist/components/collapsible-answer.d.ts +26 -0
  24. package/dist/components/collapsible-answer.d.ts.map +1 -0
  25. package/dist/components/collapsible-answer.js +30 -0
  26. package/dist/components/collapsible-answer.js.map +1 -0
  27. package/dist/components/composer.d.ts +31 -0
  28. package/dist/components/composer.d.ts.map +1 -0
  29. package/dist/components/composer.js +82 -0
  30. package/dist/components/composer.js.map +1 -0
  31. package/dist/components/conversation-list.d.ts +21 -0
  32. package/dist/components/conversation-list.d.ts.map +1 -0
  33. package/dist/components/conversation-list.js +42 -0
  34. package/dist/components/conversation-list.js.map +1 -0
  35. package/dist/components/icons.d.ts +88 -0
  36. package/dist/components/icons.d.ts.map +1 -0
  37. package/dist/components/icons.js +112 -0
  38. package/dist/components/icons.js.map +1 -0
  39. package/dist/components/launcher-fab.d.ts +8 -0
  40. package/dist/components/launcher-fab.d.ts.map +1 -0
  41. package/dist/components/launcher-fab.js +6 -0
  42. package/dist/components/launcher-fab.js.map +1 -0
  43. package/dist/components/leaked-tool-call-notice.d.ts +18 -0
  44. package/dist/components/leaked-tool-call-notice.d.ts.map +1 -0
  45. package/dist/components/leaked-tool-call-notice.js +14 -0
  46. package/dist/components/leaked-tool-call-notice.js.map +1 -0
  47. package/dist/components/markdown-link.d.ts +17 -0
  48. package/dist/components/markdown-link.d.ts.map +1 -0
  49. package/dist/components/markdown-link.js +18 -0
  50. package/dist/components/markdown-link.js.map +1 -0
  51. package/dist/components/markdown-text.d.ts +26 -0
  52. package/dist/components/markdown-text.d.ts.map +1 -0
  53. package/dist/components/markdown-text.js +32 -0
  54. package/dist/components/markdown-text.js.map +1 -0
  55. package/dist/components/message-list.d.ts +24 -0
  56. package/dist/components/message-list.d.ts.map +1 -0
  57. package/dist/components/message-list.js +92 -0
  58. package/dist/components/message-list.js.map +1 -0
  59. package/dist/components/no-tools-note.d.ts +26 -0
  60. package/dist/components/no-tools-note.d.ts.map +1 -0
  61. package/dist/components/no-tools-note.js +27 -0
  62. package/dist/components/no-tools-note.js.map +1 -0
  63. package/dist/components/panel-header.d.ts +26 -0
  64. package/dist/components/panel-header.d.ts.map +1 -0
  65. package/dist/components/panel-header.js +13 -0
  66. package/dist/components/panel-header.js.map +1 -0
  67. package/dist/components/rehype-highlight-subset.d.ts +17 -0
  68. package/dist/components/rehype-highlight-subset.d.ts.map +1 -0
  69. package/dist/components/rehype-highlight-subset.js +77 -0
  70. package/dist/components/rehype-highlight-subset.js.map +1 -0
  71. package/dist/components/system-message.d.ts +15 -0
  72. package/dist/components/system-message.d.ts.map +1 -0
  73. package/dist/components/system-message.js +12 -0
  74. package/dist/components/system-message.js.map +1 -0
  75. package/dist/components/tool-chip.d.ts +19 -0
  76. package/dist/components/tool-chip.d.ts.map +1 -0
  77. package/dist/components/tool-chip.js +32 -0
  78. package/dist/components/tool-chip.js.map +1 -0
  79. package/dist/components/user-message.d.ts +9 -0
  80. package/dist/components/user-message.d.ts.map +1 -0
  81. package/dist/components/user-message.js +7 -0
  82. package/dist/components/user-message.js.map +1 -0
  83. package/dist/core/conversation-store.d.ts +107 -0
  84. package/dist/core/conversation-store.d.ts.map +1 -0
  85. package/dist/core/conversation-store.js +254 -0
  86. package/dist/core/conversation-store.js.map +1 -0
  87. package/dist/core/error-text.d.ts +19 -0
  88. package/dist/core/error-text.d.ts.map +1 -0
  89. package/dist/core/error-text.js +35 -0
  90. package/dist/core/error-text.js.map +1 -0
  91. package/dist/core/events.d.ts +98 -0
  92. package/dist/core/events.d.ts.map +1 -0
  93. package/dist/core/events.js +50 -0
  94. package/dist/core/events.js.map +1 -0
  95. package/dist/core/format.d.ts +23 -0
  96. package/dist/core/format.d.ts.map +1 -0
  97. package/dist/core/format.js +49 -0
  98. package/dist/core/format.js.map +1 -0
  99. package/dist/core/index.d.ts +27 -0
  100. package/dist/core/index.d.ts.map +1 -0
  101. package/dist/core/index.js +20 -0
  102. package/dist/core/index.js.map +1 -0
  103. package/dist/core/markdown.d.ts +26 -0
  104. package/dist/core/markdown.d.ts.map +1 -0
  105. package/dist/core/markdown.js +49 -0
  106. package/dist/core/markdown.js.map +1 -0
  107. package/dist/core/prose.d.ts +27 -0
  108. package/dist/core/prose.d.ts.map +1 -0
  109. package/dist/core/prose.js +79 -0
  110. package/dist/core/prose.js.map +1 -0
  111. package/dist/core/small-talk.d.ts +15 -0
  112. package/dist/core/small-talk.d.ts.map +1 -0
  113. package/dist/core/small-talk.js +42 -0
  114. package/dist/core/small-talk.js.map +1 -0
  115. package/dist/core/sse.d.ts +108 -0
  116. package/dist/core/sse.d.ts.map +1 -0
  117. package/dist/core/sse.js +236 -0
  118. package/dist/core/sse.js.map +1 -0
  119. package/dist/core/tool-label.d.ts +16 -0
  120. package/dist/core/tool-label.d.ts.map +1 -0
  121. package/dist/core/tool-label.js +31 -0
  122. package/dist/core/tool-label.js.map +1 -0
  123. package/dist/core/transport.d.ts +71 -0
  124. package/dist/core/transport.d.ts.map +1 -0
  125. package/dist/core/transport.js +147 -0
  126. package/dist/core/transport.js.map +1 -0
  127. package/dist/core/turn.d.ts +87 -0
  128. package/dist/core/turn.d.ts.map +1 -0
  129. package/dist/core/turn.js +232 -0
  130. package/dist/core/turn.js.map +1 -0
  131. package/dist/core/uuid.d.ts +21 -0
  132. package/dist/core/uuid.d.ts.map +1 -0
  133. package/dist/core/uuid.js +54 -0
  134. package/dist/core/uuid.js.map +1 -0
  135. package/dist/entries/chat-page.d.ts +28 -0
  136. package/dist/entries/chat-page.d.ts.map +1 -0
  137. package/dist/entries/chat-page.js +25 -0
  138. package/dist/entries/chat-page.js.map +1 -0
  139. package/dist/entries/co-pilot.d.ts +41 -0
  140. package/dist/entries/co-pilot.d.ts.map +1 -0
  141. package/dist/entries/co-pilot.js +39 -0
  142. package/dist/entries/co-pilot.js.map +1 -0
  143. package/dist/entries/lazy-panel.d.ts +15 -0
  144. package/dist/entries/lazy-panel.d.ts.map +1 -0
  145. package/dist/entries/lazy-panel.js +19 -0
  146. package/dist/entries/lazy-panel.js.map +1 -0
  147. package/dist/hooks/index.d.ts +7 -0
  148. package/dist/hooks/index.d.ts.map +1 -0
  149. package/dist/hooks/index.js +4 -0
  150. package/dist/hooks/index.js.map +1 -0
  151. package/dist/hooks/use-agent-chat.d.ts +46 -0
  152. package/dist/hooks/use-agent-chat.d.ts.map +1 -0
  153. package/dist/hooks/use-agent-chat.js +288 -0
  154. package/dist/hooks/use-agent-chat.js.map +1 -0
  155. package/dist/hooks/use-agent-config.d.ts +29 -0
  156. package/dist/hooks/use-agent-config.d.ts.map +1 -0
  157. package/dist/hooks/use-agent-config.js +45 -0
  158. package/dist/hooks/use-agent-config.js.map +1 -0
  159. package/dist/hooks/use-conversations.d.ts +19 -0
  160. package/dist/hooks/use-conversations.d.ts.map +1 -0
  161. package/dist/hooks/use-conversations.js +19 -0
  162. package/dist/hooks/use-conversations.js.map +1 -0
  163. package/dist/index.d.ts +28 -0
  164. package/dist/index.d.ts.map +1 -0
  165. package/dist/index.js +26 -0
  166. package/dist/index.js.map +1 -0
  167. package/dist/styles.css +1 -0
  168. package/package.json +105 -1
  169. package/src/branding.ts +40 -0
  170. package/src/components/approval-card.tsx +141 -0
  171. package/src/components/assistant-message.tsx +140 -0
  172. package/src/components/co-pilot-panel.tsx +109 -0
  173. package/src/components/code-block.tsx +63 -0
  174. package/src/components/collapsible-answer.tsx +55 -0
  175. package/src/components/composer.tsx +147 -0
  176. package/src/components/conversation-list.tsx +141 -0
  177. package/src/components/icons.tsx +189 -0
  178. package/src/components/launcher-fab.tsx +16 -0
  179. package/src/components/leaked-tool-call-notice.tsx +29 -0
  180. package/src/components/markdown-link.tsx +30 -0
  181. package/src/components/markdown-text.tsx +58 -0
  182. package/src/components/message-list.tsx +164 -0
  183. package/src/components/no-tools-note.tsx +33 -0
  184. package/src/components/panel-header.tsx +86 -0
  185. package/src/components/rehype-highlight-subset.ts +84 -0
  186. package/src/components/system-message.tsx +19 -0
  187. package/src/components/tool-chip.tsx +58 -0
  188. package/src/components/user-message.tsx +18 -0
  189. package/src/core/conversation-store.ts +342 -0
  190. package/src/core/error-text.ts +36 -0
  191. package/src/core/events.ts +127 -0
  192. package/src/core/format.ts +59 -0
  193. package/src/core/index.ts +115 -0
  194. package/src/core/markdown.ts +52 -0
  195. package/src/core/prose.ts +78 -0
  196. package/src/core/small-talk.ts +45 -0
  197. package/src/core/sse.ts +269 -0
  198. package/src/core/tool-label.ts +33 -0
  199. package/src/core/transport.ts +208 -0
  200. package/src/core/turn.ts +299 -0
  201. package/src/core/uuid.ts +59 -0
  202. package/src/entries/chat-page.tsx +56 -0
  203. package/src/entries/co-pilot.tsx +84 -0
  204. package/src/entries/lazy-panel.tsx +19 -0
  205. package/src/hooks/index.ts +8 -0
  206. package/src/hooks/use-agent-chat.ts +387 -0
  207. package/src/hooks/use-agent-config.ts +70 -0
  208. package/src/hooks/use-conversations.ts +39 -0
  209. package/src/index.ts +30 -0
  210. package/src/styles/_approval.scss +68 -0
  211. package/src/styles/_composer.scss +45 -0
  212. package/src/styles/_conversations.scss +160 -0
  213. package/src/styles/_messages.scss +444 -0
  214. package/src/styles/_mixins.scss +27 -0
  215. package/src/styles/_panel.scss +147 -0
  216. package/src/styles/_tokens.scss +30 -0
  217. package/src/styles.scss +16 -0
@@ -0,0 +1,88 @@
1
+ /**
2
+ * The glyphs the Co-pilot needs that the devkit icon set does not carry.
3
+ *
4
+ * Built with the devkit's `createIcon` factory so they take the same `size` /
5
+ * `color` props and inherit `currentColor` like every other icon in the system.
6
+ */
7
+ /**
8
+ * The launcher glyph: a round speech bubble whose tail points to the
9
+ * bottom-right corner.
10
+ *
11
+ * Geometry fitted to the design's 22×22 `Chat` instance rather than eyeballed —
12
+ * the ring fills the box (center 11, r 10.2) and the tail is a wedge between two
13
+ * points on the arc, tipped at the corner. Drawn as a single arc-plus-wedge path
14
+ * so the stroke stays continuous through the join.
15
+ *
16
+ * Rendered at 48px against the Figma export this matches ~98% of pixels; the
17
+ * residue is the hollow Figma leaves between the bubble's underside and the
18
+ * tail, which is below one pixel at this size.
19
+ */
20
+ export declare const ChatIcon: import("react").ForwardRefExoticComponent<{
21
+ size?: number | string;
22
+ color?: string;
23
+ children?: never;
24
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
25
+ export declare const SendIcon: import("react").ForwardRefExoticComponent<{
26
+ size?: number | string;
27
+ color?: string;
28
+ children?: never;
29
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
30
+ /**
31
+ * New conversation: a square-cornered message box with a center-bottom tail and
32
+ * a plus inside.
33
+ *
34
+ * Squared off, not rounded — the design's box runs the full 16px width with hard
35
+ * corners, and the tail drops from the middle of the bottom edge rather than
36
+ * from a corner.
37
+ */
38
+ export declare const MessagePlusIcon: import("react").ForwardRefExoticComponent<{
39
+ size?: number | string;
40
+ color?: string;
41
+ children?: never;
42
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
43
+ /**
44
+ * Conversations: two squares, each with a rule to its right — a list whose
45
+ * bullets are boxes, not the plain stack of lines this originally drew.
46
+ */
47
+ export declare const ListLayoutIcon: import("react").ForwardRefExoticComponent<{
48
+ size?: number | string;
49
+ color?: string;
50
+ children?: never;
51
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
52
+ export declare const CloseIcon: import("react").ForwardRefExoticComponent<{
53
+ size?: number | string;
54
+ color?: string;
55
+ children?: never;
56
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
57
+ export declare const InfoIcon: import("react").ForwardRefExoticComponent<{
58
+ size?: number | string;
59
+ color?: string;
60
+ children?: never;
61
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
62
+ export declare const TrashIcon: import("react").ForwardRefExoticComponent<{
63
+ size?: number | string;
64
+ color?: string;
65
+ children?: never;
66
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
67
+ export declare const BackIcon: import("react").ForwardRefExoticComponent<{
68
+ size?: number | string;
69
+ color?: string;
70
+ children?: never;
71
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
72
+ /** The filled square a running turn is stopped with, matching the send button's box. */
73
+ export declare const StopIcon: import("react").ForwardRefExoticComponent<{
74
+ size?: number | string;
75
+ color?: string;
76
+ children?: never;
77
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
78
+ export declare const TickIcon: import("react").ForwardRefExoticComponent<{
79
+ size?: number | string;
80
+ color?: string;
81
+ children?: never;
82
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
83
+ export declare const WarningIcon: import("react").ForwardRefExoticComponent<{
84
+ size?: number | string;
85
+ color?: string;
86
+ children?: never;
87
+ } & import("react").SVGAttributes<SVGElement> & import("react").RefAttributes<SVGSVGElement>>;
88
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ;;;;6FAenB,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;6FAcnB,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;6FAW1B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;6FAYzB,CAAA;AAEF,eAAO,MAAM,SAAS;;;;6FAapB,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;6FAWnB,CAAA;AAEF,eAAO,MAAM,SAAS;;;;6FAYpB,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;6FAcnB,CAAA;AAEF,wFAAwF;AACxF,eAAO,MAAM,QAAQ;;;;6FAMnB,CAAA;AAEF,eAAO,MAAM,QAAQ;;;;6FAcnB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;6FAWtB,CAAA"}
@@ -0,0 +1,112 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The glyphs the Co-pilot needs that the devkit icon set does not carry.
4
+ *
5
+ * Built with the devkit's `createIcon` factory so they take the same `size` /
6
+ * `color` props and inherit `currentColor` like every other icon in the system.
7
+ */
8
+ import { createIcon } from '@tetherto/mdk-react-devkit/primitives';
9
+ /**
10
+ * The launcher glyph: a round speech bubble whose tail points to the
11
+ * bottom-right corner.
12
+ *
13
+ * Geometry fitted to the design's 22×22 `Chat` instance rather than eyeballed —
14
+ * the ring fills the box (center 11, r 10.2) and the tail is a wedge between two
15
+ * points on the arc, tipped at the corner. Drawn as a single arc-plus-wedge path
16
+ * so the stroke stays continuous through the join.
17
+ *
18
+ * Rendered at 48px against the Figma export this matches ~98% of pixels; the
19
+ * residue is the hollow Figma leaves between the bubble's underside and the
20
+ * tail, which is below one pixel at this size.
21
+ */
22
+ export const ChatIcon = createIcon({
23
+ displayName: 'ChatIcon',
24
+ viewBox: '0 0 22 22',
25
+ defaultWidth: 22,
26
+ defaultHeight: 22,
27
+ path: ({ color }) => (_jsx("path", { fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.9", d: "M19.83 16.1A10.2 10.2 0 1 0 14.15 20.7L21 21Z" })),
28
+ });
29
+ export const SendIcon = createIcon({
30
+ displayName: 'SendIcon',
31
+ viewBox: '0 0 18 18',
32
+ defaultWidth: 18,
33
+ defaultHeight: 18,
34
+ path: ({ color }) => (_jsx("path", { stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.6", d: "M16.5 1.5 8.25 9.75M16.5 1.5l-5.25 15-3-6.75-6.75-3 15-5.25Z" })),
35
+ });
36
+ /**
37
+ * New conversation: a square-cornered message box with a center-bottom tail and
38
+ * a plus inside.
39
+ *
40
+ * Squared off, not rounded — the design's box runs the full 16px width with hard
41
+ * corners, and the tail drops from the middle of the bottom edge rather than
42
+ * from a corner.
43
+ */
44
+ export const MessagePlusIcon = createIcon({
45
+ displayName: 'MessagePlusIcon',
46
+ viewBox: '0 0 16 16',
47
+ defaultWidth: 16,
48
+ defaultHeight: 16,
49
+ path: ({ color }) => (_jsxs("g", { stroke: color, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.1", children: [_jsx("path", { d: "M0.75 0.75H15.25V12.05H9.1L7.6 15.1L6.1 12.05H0.75Z" }), _jsx("path", { d: "M7.6 4.2V9.2M5.1 6.7H10.1" })] })),
50
+ });
51
+ /**
52
+ * Conversations: two squares, each with a rule to its right — a list whose
53
+ * bullets are boxes, not the plain stack of lines this originally drew.
54
+ */
55
+ export const ListLayoutIcon = createIcon({
56
+ displayName: 'ListLayoutIcon',
57
+ viewBox: '0 0 16 16',
58
+ defaultWidth: 16,
59
+ defaultHeight: 16,
60
+ path: ({ color }) => (_jsxs("g", { stroke: color, fill: "none", strokeLinecap: "square", strokeWidth: "1.1", children: [_jsx("path", { d: "M0.55 1.55H4.45V5.45H0.55Z" }), _jsx("path", { d: "M0.55 10.55H4.45V14.45H0.55Z" }), _jsx("path", { d: "M7.1 3.5H15.45M7.1 12.5H15.45" })] })),
61
+ });
62
+ export const CloseIcon = createIcon({
63
+ displayName: 'CloseIcon',
64
+ viewBox: '0 0 16 16',
65
+ defaultWidth: 16,
66
+ defaultHeight: 16,
67
+ path: ({ color }) => (_jsx("path", { stroke: color, strokeLinecap: "round", strokeWidth: "1.2", d: "M4.6 4.6 11.4 11.4M11.4 4.6 4.6 11.4" })),
68
+ });
69
+ export const InfoIcon = createIcon({
70
+ displayName: 'InfoIcon',
71
+ viewBox: '0 0 12 12',
72
+ defaultWidth: 12,
73
+ defaultHeight: 12,
74
+ path: ({ color }) => (_jsxs("g", { stroke: color, fill: "none", strokeLinecap: "round", strokeWidth: "1.1", children: [_jsx("circle", { cx: "6", cy: "6", r: "5" }), _jsx("path", { d: "M6 5.2v3.1M6 3.6h.005" })] })),
75
+ });
76
+ export const TrashIcon = createIcon({
77
+ displayName: 'TrashIcon',
78
+ viewBox: '0 0 16 16',
79
+ defaultWidth: 16,
80
+ defaultHeight: 16,
81
+ path: ({ color }) => (_jsxs("g", { stroke: color, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.1", children: [_jsx("path", { d: "M2.5 4.2h11M6.2 4.2V2.6h3.6v1.6" }), _jsx("path", { d: "M3.9 4.2 4.6 13.4h6.8l0.7-9.2" }), _jsx("path", { d: "M6.6 6.8v4M9.4 6.8v4" })] })),
82
+ });
83
+ export const BackIcon = createIcon({
84
+ displayName: 'BackIcon',
85
+ viewBox: '0 0 16 16',
86
+ defaultWidth: 16,
87
+ defaultHeight: 16,
88
+ path: ({ color }) => (_jsx("path", { stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.4", d: "M10 3 5 8l5 5" })),
89
+ });
90
+ /** The filled square a running turn is stopped with, matching the send button's box. */
91
+ export const StopIcon = createIcon({
92
+ displayName: 'StopIcon',
93
+ viewBox: '0 0 18 18',
94
+ defaultWidth: 18,
95
+ defaultHeight: 18,
96
+ path: ({ color }) => _jsx("rect", { x: "4", y: "4", width: "10", height: "10", rx: "1", fill: color, stroke: "none" }),
97
+ });
98
+ export const TickIcon = createIcon({
99
+ displayName: 'TickIcon',
100
+ viewBox: '0 0 12 12',
101
+ defaultWidth: 12,
102
+ defaultHeight: 12,
103
+ path: ({ color }) => (_jsx("path", { stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "m2 6.4 2.6 2.6L10 3.5" })),
104
+ });
105
+ export const WarningIcon = createIcon({
106
+ displayName: 'WarningIcon',
107
+ viewBox: '0 0 12 12',
108
+ defaultWidth: 12,
109
+ defaultHeight: 12,
110
+ path: ({ color }) => (_jsxs("g", { stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.3", children: [_jsx("path", { d: "M6 1.5 11 10.5H1L6 1.5Z" }), _jsx("path", { d: "M6 5v2.2M6 9h.005" })] })),
111
+ });
112
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAA;AAElE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;IACjC,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnB,eACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,KAAK,EAC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Aa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,KAAK,EACjB,CAAC,EAAC,uBAAuB,GACzB,CACH;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE;IACjB,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnB,aAAG,MAAM,EAAE,KAAK,EAAE,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,aAC9E,eAAM,CAAC,EAAC,yBAAyB,GAAG,EACpC,eAAM,CAAC,EAAC,mBAAmB,GAAG,IAC5B,CACL;CACF,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ export type LauncherFabProps = {
3
+ label?: string;
4
+ onClick: VoidFunction;
5
+ };
6
+ /** The collapsed state: a 48px round launcher in the bottom-right corner. */
7
+ export declare const LauncherFab: ({ label, onClick }: LauncherFabProps) => JSX.Element;
8
+ //# sourceMappingURL=launcher-fab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher-fab.d.ts","sourceRoot":"","sources":["../../src/components/launcher-fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAKhC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,WAAW,uBAA4C,gBAAgB,KAAG,GAAG,CAAC,OAI1F,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AGENT_LABELS } from '../branding';
3
+ import { ChatIcon } from './icons';
4
+ /** The collapsed state: a 48px round launcher in the bottom-right corner. */
5
+ export const LauncherFab = ({ label = AGENT_LABELS.open, onClick }) => (_jsx("button", { type: "button", className: "mdk-agent-fab", "aria-label": label, onClick: onClick, children: _jsx(ChatIcon, { size: 22 }) }));
6
+ //# sourceMappingURL=launcher-fab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher-fab.js","sourceRoot":"","sources":["../../src/components/launcher-fab.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAOlC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,EAAoB,EAAe,EAAE,CAAC,CACpG,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,eAAe,gBAAa,KAAK,EAAE,OAAO,EAAE,OAAO,YACjF,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI,GACf,CACV,CAAA"}
@@ -0,0 +1,18 @@
1
+ import type { JSX } from 'react';
2
+ import type { LeakedToolCall } from '../core/prose';
3
+ export type LeakedToolCallNoticeProps = {
4
+ call: LeakedToolCall;
5
+ };
6
+ /**
7
+ * Shown in place of an answer that is really a tool call the model failed to
8
+ * emit correctly.
9
+ *
10
+ * The agent's tool loop is prompt-based: the model is asked to reply with only
11
+ * `{"tool": …}`, and the producer classifies the reply as a tool call from its
12
+ * first character being `{`. A model that wraps the JSON in a ```json fence
13
+ * leads with a backtick, so the call is classified as prose and streamed to the
14
+ * operator verbatim. Rendering that raw is the most confusing failure in the
15
+ * stack; naming it is cheap and makes the retry obvious.
16
+ */
17
+ export declare const LeakedToolCallNotice: ({ call }: LeakedToolCallNoticeProps) => JSX.Element;
18
+ //# sourceMappingURL=leaked-tool-call-notice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaked-tool-call-notice.d.ts","sourceRoot":"","sources":["../../src/components/leaked-tool-call-notice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,cAAc,CAAA;CACrB,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,aAAc,yBAAyB,KAAG,GAAG,CAAC,OAS9E,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Shown in place of an answer that is really a tool call the model failed to
4
+ * emit correctly.
5
+ *
6
+ * The agent's tool loop is prompt-based: the model is asked to reply with only
7
+ * `{"tool": …}`, and the producer classifies the reply as a tool call from its
8
+ * first character being `{`. A model that wraps the JSON in a ```json fence
9
+ * leads with a backtick, so the call is classified as prose and streamed to the
10
+ * operator verbatim. Rendering that raw is the most confusing failure in the
11
+ * stack; naming it is cheap and makes the retry obvious.
12
+ */
13
+ export const LeakedToolCallNotice = ({ call }) => (_jsxs("div", { className: "mdk-agent-leaked", role: "status", children: [_jsx("p", { className: "mdk-agent-leaked__title", children: "The model returned a malformed tool call." }), _jsxs("p", { className: "mdk-agent-leaked__body", children: [`It tried to call `, _jsx("code", { className: "mdk-agent-leaked__tool", children: call.tool }), ` but wrapped the request in formatting, so it was never run. Ask again.`] })] }));
14
+ //# sourceMappingURL=leaked-tool-call-notice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaked-tool-call-notice.js","sourceRoot":"","sources":["../../src/components/leaked-tool-call-notice.tsx"],"names":[],"mappings":";AAQA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,IAAI,EAA6B,EAAe,EAAE,CAAC,CACxF,eAAK,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,QAAQ,aAC7C,YAAG,SAAS,EAAC,yBAAyB,0DAA8C,EACpF,aAAG,SAAS,EAAC,wBAAwB,aAClC,mBAAmB,EACpB,eAAM,SAAS,EAAC,wBAAwB,YAAE,IAAI,CAAC,IAAI,GAAQ,EAC1D,yEAAyE,IACxE,IACA,CACP,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef, JSX } from 'react';
2
+ import type { ExtraProps } from 'react-markdown';
3
+ export type MarkdownLinkProps = ComponentPropsWithoutRef<'a'> & ExtraProps;
4
+ /**
5
+ * A link inside an answer.
6
+ *
7
+ * Anything pointing away from the document opens in a new tab: the panel is docked
8
+ * over whatever page the operator is working on, and following a link in place
9
+ * would navigate the app out from under them mid-conversation. An in-document
10
+ * target — a GFM footnote reference, `#...` — has to stay in the panel to work at
11
+ * all, so it is left alone.
12
+ *
13
+ * `react-markdown` blocks `javascript:` hrefs in its default `urlTransform`, so
14
+ * this is about not losing the operator's place rather than about safety.
15
+ */
16
+ export declare const MarkdownLink: ({ href, children, node, ...rest }: MarkdownLinkProps) => JSX.Element;
17
+ //# sourceMappingURL=markdown-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-link.d.ts","sourceRoot":"","sources":["../../src/components/markdown-link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,GAAG,CAAC,GAAG,UAAU,CAAA;AAE1E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,sCAAuC,iBAAiB,KAAG,GAAG,CAAC,OAYvF,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * A link inside an answer.
4
+ *
5
+ * Anything pointing away from the document opens in a new tab: the panel is docked
6
+ * over whatever page the operator is working on, and following a link in place
7
+ * would navigate the app out from under them mid-conversation. An in-document
8
+ * target — a GFM footnote reference, `#...` — has to stay in the panel to work at
9
+ * all, so it is left alone.
10
+ *
11
+ * `react-markdown` blocks `javascript:` hrefs in its default `urlTransform`, so
12
+ * this is about not losing the operator's place rather than about safety.
13
+ */
14
+ export const MarkdownLink = ({ href, children, node, ...rest }) => {
15
+ const isInDocument = href?.startsWith('#') ?? false;
16
+ return (_jsx("a", { href: href, ...(isInDocument ? {} : { target: '_blank', rel: 'noopener noreferrer' }), ...rest, children: children }));
17
+ };
18
+ //# sourceMappingURL=markdown-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-link.js","sourceRoot":"","sources":["../../src/components/markdown-link.tsx"],"names":[],"mappings":";AAKA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,EAAqB,EAAe,EAAE;IAChG,MAAM,YAAY,GAAG,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAA;IAEnD,OAAO,CACL,YACE,IAAI,EAAE,IAAI,KACN,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC,KACtE,IAAI,YAEP,QAAQ,GACP,CACL,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { JSX } from 'react';
2
+ export type MarkdownTextProps = {
3
+ text: string;
4
+ /**
5
+ * A turn still streaming renders as plain text. A half-written fence parses as
6
+ * an unterminated code block, so markdown mid-stream flickers between layouts,
7
+ * and re-parsing the whole answer on every token is wasted work either way.
8
+ * Switch on when the turn finishes.
9
+ */
10
+ streaming?: boolean;
11
+ };
12
+ /**
13
+ * Renders an assistant answer.
14
+ *
15
+ * Raw HTML is deliberately not enabled — `react-markdown` ignores it unless
16
+ * `rehype-raw` is added, which is what keeps untrusted model output from
17
+ * injecting markup. Do not add `rehype-raw` here.
18
+ *
19
+ * Memoized: a live turn re-renders the transcript, and reparsing every settled
20
+ * answer for each token of the current one is the panel's most expensive
21
+ * avoidable work.
22
+ */
23
+ declare const MarkdownTextView: ({ text, streaming }: MarkdownTextProps) => JSX.Element;
24
+ export declare const MarkdownText: import("react").MemoExoticComponent<typeof MarkdownTextView>;
25
+ export {};
26
+ //# sourceMappingURL=markdown-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-text.d.ts","sourceRoot":"","sources":["../../src/components/markdown-text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAiBhC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,gBAAgB,wBAAiC,iBAAiB,KAAG,GAAG,CAAC,OAgB9E,CAAA;AAED,eAAO,MAAM,YAAY,8DAAyB,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import Markdown from 'react-markdown';
4
+ import remarkGfm from 'remark-gfm';
5
+ import { unwrapWholeAnswerFence } from '../core/markdown';
6
+ import { CodeBlock } from './code-block';
7
+ import { MarkdownLink } from './markdown-link';
8
+ import { rehypeHighlightSubset } from './rehype-highlight-subset';
9
+ // Module scope, not inline: a fresh array each render makes react-markdown
10
+ // rebuild its processor for every streamed token.
11
+ const REMARK_PLUGINS = [remarkGfm];
12
+ const REHYPE_PLUGINS = [rehypeHighlightSubset];
13
+ const COMPONENTS = { a: MarkdownLink, pre: CodeBlock };
14
+ /**
15
+ * Renders an assistant answer.
16
+ *
17
+ * Raw HTML is deliberately not enabled — `react-markdown` ignores it unless
18
+ * `rehype-raw` is added, which is what keeps untrusted model output from
19
+ * injecting markup. Do not add `rehype-raw` here.
20
+ *
21
+ * Memoized: a live turn re-renders the transcript, and reparsing every settled
22
+ * answer for each token of the current one is the panel's most expensive
23
+ * avoidable work.
24
+ */
25
+ const MarkdownTextView = ({ text, streaming = false }) => {
26
+ if (streaming) {
27
+ return _jsx("div", { className: "mdk-agent-markdown mdk-agent-markdown--streaming", children: text });
28
+ }
29
+ return (_jsx("div", { className: "mdk-agent-markdown", children: _jsx(Markdown, { remarkPlugins: REMARK_PLUGINS, rehypePlugins: REHYPE_PLUGINS, components: COMPONENTS, children: unwrapWholeAnswerFence(text) }) }));
30
+ };
31
+ export const MarkdownText = memo(MarkdownTextView);
32
+ //# sourceMappingURL=markdown-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-text.js","sourceRoot":"","sources":["../../src/components/markdown-text.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAC5B,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AACrC,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEjE,2EAA2E;AAC3E,kDAAkD;AAClD,MAAM,cAAc,GAAG,CAAC,SAAS,CAAC,CAAA;AAClC,MAAM,cAAc,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAC9C,MAAM,UAAU,GAAe,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,CAAA;AAalE;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,EAAqB,EAAe,EAAE;IACvF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,cAAK,SAAS,EAAC,kDAAkD,YAAE,IAAI,GAAO,CAAA;IACvF,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,QAAQ,IACP,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,cAAc,EAC7B,UAAU,EAAE,UAAU,YAErB,sBAAsB,CAAC,IAAI,CAAC,GACpB,GACP,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAA"}
@@ -0,0 +1,24 @@
1
+ import type { JSX } from 'react';
2
+ import type { ChatMessage } from '../core/conversation-store';
3
+ import type { ToolLabels } from '../core/tool-label';
4
+ import type { AgentTurnState, PendingApproval } from '../core/turn';
5
+ export type MessageListProps = {
6
+ messages: ChatMessage[];
7
+ live: AgentTurnState | null;
8
+ toolLabels?: ToolLabels;
9
+ pendingApproval: PendingApproval | null;
10
+ isDecisionPending: boolean;
11
+ onDecide: (approved: boolean) => void;
12
+ /** Re-asks the last question. Offered on the newest failed turn only. */
13
+ onRetry?: VoidFunction;
14
+ };
15
+ /**
16
+ * The transcript, pinned to the bottom while the operator is following along.
17
+ *
18
+ * There is no `ScrollArea` primitive in the devkit and `@radix-ui/react-scroll-area`
19
+ * is not a dependency, so this is a plain overflow container. The pinning rule
20
+ * matters more than the chrome: scrolling up to re-read an earlier answer must
21
+ * not be undone by the next token arriving.
22
+ */
23
+ export declare const MessageList: ({ messages, live, toolLabels, pendingApproval, isDecisionPending, onDecide, onRetry, }: MessageListProps) => JSX.Element;
24
+ //# sourceMappingURL=message-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-list.d.ts","sourceRoot":"","sources":["../../src/components/message-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAwBnE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,eAAe,EAAE,eAAe,GAAG,IAAI,CAAA;IACvC,iBAAiB,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,yEAAyE;IACzE,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,2FAQrB,gBAAgB,KAAG,GAAG,CAAC,OA2GzB,CAAA"}
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useRef } from 'react';
3
+ import { MESSAGE_ROLE } from '../core/conversation-store';
4
+ import { TURN_STATUS } from '../core/turn';
5
+ import { AssistantMessage } from './assistant-message';
6
+ import { SystemMessage } from './system-message';
7
+ import { UserMessage } from './user-message';
8
+ /** How close to the bottom still counts as "following along", in pixels. */
9
+ const PIN_THRESHOLD_PX = 48;
10
+ /**
11
+ * The operator message an assistant reply answers: the nearest user message above it.
12
+ *
13
+ * A turn can leave several assistant entries behind, so this is a scan rather than
14
+ * `messages[index - 1]`. Read only to tell a fleet question from a greeting.
15
+ */
16
+ function precedingQuestion(messages, index) {
17
+ for (let cursor = index - 1; cursor >= 0; cursor -= 1) {
18
+ const message = messages[cursor];
19
+ if (message?.role === MESSAGE_ROLE.USER)
20
+ return message.text;
21
+ }
22
+ return '';
23
+ }
24
+ /**
25
+ * The transcript, pinned to the bottom while the operator is following along.
26
+ *
27
+ * There is no `ScrollArea` primitive in the devkit and `@radix-ui/react-scroll-area`
28
+ * is not a dependency, so this is a plain overflow container. The pinning rule
29
+ * matters more than the chrome: scrolling up to re-read an earlier answer must
30
+ * not be undone by the next token arriving.
31
+ */
32
+ export const MessageList = ({ messages, live, toolLabels, pendingApproval, isDecisionPending, onDecide, onRetry, }) => {
33
+ const scrollRef = useRef(null);
34
+ const pinnedRef = useRef(true);
35
+ const handleScroll = useCallback(() => {
36
+ const node = scrollRef.current;
37
+ if (!node)
38
+ return;
39
+ const distance = node.scrollHeight - node.scrollTop - node.clientHeight;
40
+ pinnedRef.current = distance <= PIN_THRESHOLD_PX;
41
+ }, []);
42
+ // Depends on the streamed length rather than the state object so it also fires
43
+ // while tokens land inside one unchanged turn.
44
+ const liveLength = live ? live.text.length + live.tools.length : 0;
45
+ /**
46
+ * Whether a turn is open at all — not the same question as how much of it has arrived.
47
+ *
48
+ * `liveLength` is 0 both before a turn exists and at the instant one starts, so on its own it
49
+ * cannot see the transition. The assistant block (speaker label and thinking indicator) is
50
+ * appended in exactly that commit and went unscrolled: the operator was left looking at their
51
+ * own question with the reply below the fold, which reads as the panel ignoring them. It
52
+ * self-corrected on the first token or tool call, so the dead window was however long the
53
+ * model took to say anything — seconds locally, far longer on a thinking model.
54
+ */
55
+ const isLive = live !== null;
56
+ /**
57
+ * A turn opening re-pins, whatever the operator had scrolled to.
58
+ *
59
+ * A turn only opens because they just sent something, and sending is an explicit request to
60
+ * see the answer — so this is not the "don't yank the view while they read" case the pinning
61
+ * rule protects. Without it, asking a question after scrolling up back through the transcript
62
+ * left both the question and its answer off-screen, with no indication either had happened.
63
+ */
64
+ useEffect(() => {
65
+ if (isLive)
66
+ pinnedRef.current = true;
67
+ }, [isLive]);
68
+ useEffect(() => {
69
+ const node = scrollRef.current;
70
+ if (!node || !pinnedRef.current)
71
+ return;
72
+ node.scrollTop = node.scrollHeight;
73
+ }, [messages.length, liveLength, isLive, pendingApproval]);
74
+ const isEmpty = messages.length === 0 && live === null;
75
+ // Retrying an older turn would send it as the newest question, so only the last
76
+ // message is offered the affordance — and never while a turn is running.
77
+ const retryableId = live === null && onRetry ? (messages.at(-1)?.error ? messages.at(-1)?.id : undefined) : undefined;
78
+ return (_jsxs("div", { className: "mdk-agent-messages", ref: scrollRef, "aria-live": "polite", "aria-busy": live !== null, onScroll: handleScroll, children: [isEmpty
79
+ ? (_jsx("p", { className: "mdk-agent-messages__empty", children: "Ask about your fleet \u2014 device status, telemetry, or an action to run." }))
80
+ : null, messages.map((message, index) => {
81
+ if (message.role === MESSAGE_ROLE.USER) {
82
+ return _jsx(UserMessage, { text: message.text }, message.id);
83
+ }
84
+ if (message.role === MESSAGE_ROLE.SYSTEM) {
85
+ return _jsx(SystemMessage, { text: message.text }, message.id);
86
+ }
87
+ return (_jsx(AssistantMessage, { text: message.text, question: precedingQuestion(messages, index), tools: message.tools, error: message.error, interrupted: message.interrupted, toolLabels: toolLabels, ...(message.id === retryableId && onRetry ? { onRetry } : {}) }, message.id));
88
+ }), live
89
+ ? (_jsx(AssistantMessage, { text: live.text, question: precedingQuestion(messages, messages.length), tools: live.tools, error: live.error, streaming: live.status !== TURN_STATUS.COMPLETE && live.status !== TURN_STATUS.ERROR, toolLabels: toolLabels, approval: pendingApproval, isDecisionPending: isDecisionPending, onDecide: onDecide }))
90
+ : null] }));
91
+ };
92
+ //# sourceMappingURL=message-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-list.js","sourceRoot":"","sources":["../../src/components/message-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAKtD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACh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gBACH,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { JSX } from 'react';
2
+ /**
3
+ * Marks an answer that consulted nothing.
4
+ *
5
+ * The agent's premise is that it reads the fleet through tools rather than
6
+ * inventing it, so a turn that emitted no `tool_call` answered from the model's
7
+ * own weights and its conversation history — including, sometimes, a confident
8
+ * claim that a write was carried out when none was. That failure is not
9
+ * detectable from the text, but the absence of tool activity is a fact the UI
10
+ * holds exactly, so it is stated rather than left to be inferred from a missing
11
+ * chip.
12
+ *
13
+ * Still shown for benign cases — a decline, an answer the tools cannot cover —
14
+ * because "this answer did not consult the fleet" is true and useful there too.
15
+ * The one exception is small talk (`core/small-talk`): against "hey" there was
16
+ * never a tool to call, and marking every greeting turned the note into
17
+ * wallpaper.
18
+ *
19
+ * Rendered as a suffix on the existing `CO-PILOT` label rather than a sentence
20
+ * of its own: in a degraded session every answer carries it, and a repeated
21
+ * full-width line turned the transcript into a column of warnings. On the label
22
+ * row it costs no vertical space and still reads at a glance; the full sentence
23
+ * lives in the tooltip.
24
+ */
25
+ export declare const NoToolsNote: () => JSX.Element;
26
+ //# sourceMappingURL=no-tools-note.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-tools-note.d.ts","sourceRoot":"","sources":["../../src/components/no-tools-note.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAIhC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW,QAAO,GAAG,CAAC,OAKlC,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InfoIcon } from './icons';
3
+ /**
4
+ * Marks an answer that consulted nothing.
5
+ *
6
+ * The agent's premise is that it reads the fleet through tools rather than
7
+ * inventing it, so a turn that emitted no `tool_call` answered from the model's
8
+ * own weights and its conversation history — including, sometimes, a confident
9
+ * claim that a write was carried out when none was. That failure is not
10
+ * detectable from the text, but the absence of tool activity is a fact the UI
11
+ * holds exactly, so it is stated rather than left to be inferred from a missing
12
+ * chip.
13
+ *
14
+ * Still shown for benign cases — a decline, an answer the tools cannot cover —
15
+ * because "this answer did not consult the fleet" is true and useful there too.
16
+ * The one exception is small talk (`core/small-talk`): against "hey" there was
17
+ * never a tool to call, and marking every greeting turned the note into
18
+ * wallpaper.
19
+ *
20
+ * Rendered as a suffix on the existing `CO-PILOT` label rather than a sentence
21
+ * of its own: in a degraded session every answer carries it, and a repeated
22
+ * full-width line turned the transcript into a column of warnings. On the label
23
+ * row it costs no vertical space and still reads at a glance; the full sentence
24
+ * lives in the tooltip.
25
+ */
26
+ export const NoToolsNote = () => (_jsxs("span", { className: "mdk-agent-no-tools", title: "No tool was called for this answer \u2014 it came from the model alone, not from the fleet.", children: [_jsx(InfoIcon, { size: 11, "aria-hidden": "true" }), "no tools used"] }));
27
+ //# sourceMappingURL=no-tools-note.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-tools-note.js","sourceRoot":"","sources":["../../src/components/no-tools-note.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAgB,EAAE,CAAC,CAC5C,gBAAM,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAC,6FAAwF,aACjI,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,iBAAc,MAAM,GAAG,qBAEpC,CACR,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { JSX, ReactNode } from 'react';
2
+ export declare const PANEL_VIEW: {
3
+ readonly CHAT: 'chat';
4
+ readonly CONVERSATIONS: 'conversations';
5
+ };
6
+ export type PanelView = (typeof PANEL_VIEW)[keyof typeof PANEL_VIEW];
7
+ export type PanelHeaderProps = {
8
+ view: PanelView;
9
+ title: string;
10
+ /**
11
+ * The line under the title. Nothing on the gateway reports the model name or
12
+ * the tool count — the agent is built lazily on the first session and its MCP
13
+ * tools are never enumerated over HTTP — so the host supplies this or it stays
14
+ * empty.
15
+ */
16
+ status?: ReactNode;
17
+ /** Disabled mid-turn: starting or switching conversation would strand the stream. */
18
+ actionsDisabled?: boolean;
19
+ onNewConversation: VoidFunction;
20
+ onToggleConversations: VoidFunction;
21
+ onClose?: VoidFunction | undefined;
22
+ };
23
+ declare const PanelHeaderView: ({ view, title, status, actionsDisabled, onNewConversation, onToggleConversations, onClose, }: PanelHeaderProps) => JSX.Element;
24
+ export declare const PanelHeader: import("react").MemoExoticComponent<typeof PanelHeaderView>;
25
+ export {};
26
+ //# sourceMappingURL=panel-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-header.d.ts","sourceRoot":"","sources":["../../src/components/panel-header.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM3C,eAAO,MAAM,UAAU;aAAK,IAAI,EAAE,MAAM;aAAE,aAAa,EAAE,eAAe;CAAW,CAAA;AAEnF,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAA;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,qFAAqF;IACrF,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,EAAE,YAAY,CAAA;IAC/B,qBAAqB,EAAE,YAAY,CAAA;IACnC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;CACnC,CAAA;AAED,QAAA,MAAM,eAAe,iGAQlB,gBAAgB,KAAG,GAAG,CAAC,OA+CzB,CAAA;AAED,eAAO,MAAM,WAAW,6DAAwB,CAAA"}