@justanarthur/modo-ui-ai 0.0.0-stage → 0.2.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 (343) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.fluid-functionalism +21 -0
  3. package/README.md +105 -2
  4. package/blocks/conversation/agent-prompt/examples.mdx +44 -0
  5. package/blocks/conversation/agent-prompt/index.tsx +114 -0
  6. package/blocks/conversation/composer/draft.css +25 -0
  7. package/blocks/conversation/composer/draft.tsx +589 -0
  8. package/blocks/conversation/composer/examples.mdx +114 -0
  9. package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
  10. package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
  11. package/blocks/conversation/composer/index.tsx +517 -0
  12. package/blocks/conversation/composer/queued-row.tsx +102 -0
  13. package/blocks/conversation/composer/shared.ts +38 -0
  14. package/blocks/conversation/composer/suggestion-row.tsx +64 -0
  15. package/blocks/conversation/composer/use-composer-files.ts +142 -0
  16. package/blocks/conversation/composer/use-history-nav.ts +60 -0
  17. package/blocks/conversation/composer/use-message-queue.ts +108 -0
  18. package/blocks/conversation/composer/use-region-height.ts +34 -0
  19. package/blocks/conversation/failure-states/examples.mdx +58 -0
  20. package/blocks/conversation/failure-states/index.tsx +274 -0
  21. package/blocks/conversation/transcript/examples.mdx +43 -0
  22. package/blocks/conversation/transcript/index.tsx +204 -0
  23. package/blocks/conversation/transcript-search/examples.mdx +50 -0
  24. package/blocks/conversation/transcript-search/index.tsx +469 -0
  25. package/blocks/dialogs/command-palette/examples.mdx +33 -0
  26. package/blocks/dialogs/command-palette/index.tsx +232 -0
  27. package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
  28. package/blocks/dialogs/hook-dialog/index.tsx +286 -0
  29. package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
  30. package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
  31. package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
  32. package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
  33. package/blocks/panes/artifacts-pane/examples.mdx +23 -0
  34. package/blocks/panes/artifacts-pane/index.tsx +82 -0
  35. package/blocks/panes/changes-pane/examples.mdx +23 -0
  36. package/blocks/panes/changes-pane/index.tsx +248 -0
  37. package/blocks/panes/file-pane/examples.mdx +13 -0
  38. package/blocks/panes/file-pane/index.tsx +102 -0
  39. package/blocks/panes/pr-pane/examples.mdx +13 -0
  40. package/blocks/panes/pr-pane/index.tsx +191 -0
  41. package/blocks/panes/side-pane/examples.mdx +58 -0
  42. package/blocks/panes/side-pane/index.tsx +187 -0
  43. package/blocks/panes/tasks-pane/examples.mdx +23 -0
  44. package/blocks/panes/tasks-pane/index.tsx +127 -0
  45. package/blocks/panes/terminal-pane/examples.mdx +13 -0
  46. package/blocks/panes/terminal-pane/index.tsx +99 -0
  47. package/blocks/panes/usage-pane/examples.mdx +13 -0
  48. package/blocks/panes/usage-pane/index.tsx +75 -0
  49. package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
  50. package/blocks/profiles/profile-onboarding/index.tsx +580 -0
  51. package/blocks/profiles/profile-switcher/examples.mdx +18 -0
  52. package/blocks/profiles/profile-switcher/index.tsx +197 -0
  53. package/blocks/profiles/profile-usage/examples.mdx +21 -0
  54. package/blocks/profiles/profile-usage/index.tsx +127 -0
  55. package/blocks/sessions/inbox/examples.mdx +35 -0
  56. package/blocks/sessions/inbox/index.tsx +372 -0
  57. package/blocks/sessions/session-board/examples.mdx +34 -0
  58. package/blocks/sessions/session-board/index.tsx +570 -0
  59. package/blocks/sessions/session-sidebar/examples.mdx +43 -0
  60. package/blocks/sessions/session-sidebar/index.tsx +442 -0
  61. package/blocks/settings/extensions/examples.mdx +10 -0
  62. package/blocks/settings/extensions/index.tsx +72 -0
  63. package/blocks/settings/hooks/examples.mdx +16 -0
  64. package/blocks/settings/hooks/index.tsx +127 -0
  65. package/blocks/settings/mcp-servers/examples.mdx +26 -0
  66. package/blocks/settings/mcp-servers/index.tsx +204 -0
  67. package/blocks/settings/memory/examples.mdx +22 -0
  68. package/blocks/settings/memory/index.tsx +113 -0
  69. package/blocks/settings/notifications/examples.mdx +8 -0
  70. package/blocks/settings/notifications/index.tsx +63 -0
  71. package/blocks/settings/permission-rules/examples.mdx +37 -0
  72. package/blocks/settings/permission-rules/index.tsx +317 -0
  73. package/blocks/settings/plugin-catalog/examples.mdx +52 -0
  74. package/blocks/settings/plugin-catalog/index.tsx +407 -0
  75. package/blocks/settings/plugins/examples.mdx +10 -0
  76. package/blocks/settings/plugins/index.tsx +72 -0
  77. package/blocks/settings/settings-window/examples.mdx +40 -0
  78. package/blocks/settings/settings-window/index.tsx +188 -0
  79. package/blocks/settings/worktrees/examples.mdx +17 -0
  80. package/blocks/settings/worktrees/index.tsx +145 -0
  81. package/components/conversation/agent-run/examples.mdx +30 -0
  82. package/components/conversation/agent-run/index.tsx +82 -0
  83. package/components/conversation/chapter-nav/examples.mdx +30 -0
  84. package/components/conversation/chapter-nav/index.tsx +123 -0
  85. package/components/conversation/message/examples.mdx +53 -0
  86. package/components/conversation/message/index.tsx +128 -0
  87. package/components/conversation/message/working.tsx +102 -0
  88. package/components/conversation/reasoning/examples.mdx +22 -0
  89. package/components/conversation/reasoning/index.tsx +54 -0
  90. package/components/conversation/recap/examples.mdx +21 -0
  91. package/components/conversation/recap/index.tsx +67 -0
  92. package/components/conversation/todo-list/examples.mdx +32 -0
  93. package/components/conversation/todo-list/index.tsx +106 -0
  94. package/components/conversation/tool-call/examples.mdx +48 -0
  95. package/components/conversation/tool-call/index.tsx +142 -0
  96. package/components/conversation/work-summary/examples.mdx +50 -0
  97. package/components/conversation/work-summary/index.tsx +87 -0
  98. package/components/prompts/permission-request/examples.mdx +32 -0
  99. package/components/prompts/permission-request/index.tsx +74 -0
  100. package/components/prompts/plan-approval/examples.mdx +37 -0
  101. package/components/prompts/plan-approval/index.tsx +76 -0
  102. package/components/prompts/prompt-card/examples.mdx +31 -0
  103. package/components/prompts/prompt-card/index.tsx +82 -0
  104. package/components/prompts/question-prompt/examples.mdx +46 -0
  105. package/components/prompts/question-prompt/index.tsx +118 -0
  106. package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
  107. package/dist/blocks/conversation/agent-prompt/index.js +13 -0
  108. package/dist/blocks/conversation/composer/index.d.ts +4 -0
  109. package/dist/blocks/conversation/composer/index.js +15 -0
  110. package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
  111. package/dist/blocks/conversation/failure-states/index.js +8 -0
  112. package/dist/blocks/conversation/transcript/index.d.ts +50 -0
  113. package/dist/blocks/conversation/transcript/index.js +17 -0
  114. package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
  115. package/dist/blocks/conversation/transcript-search/index.js +11 -0
  116. package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
  117. package/dist/blocks/dialogs/command-palette/index.js +20 -0
  118. package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
  119. package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
  120. package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
  121. package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
  122. package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
  123. package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
  124. package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
  125. package/dist/blocks/panes/artifacts-pane/index.js +9 -0
  126. package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
  127. package/dist/blocks/panes/changes-pane/index.js +9 -0
  128. package/dist/blocks/panes/file-pane/index.d.ts +3 -0
  129. package/dist/blocks/panes/file-pane/index.js +9 -0
  130. package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
  131. package/dist/blocks/panes/pr-pane/index.js +10 -0
  132. package/dist/blocks/panes/side-pane/index.d.ts +5 -0
  133. package/dist/blocks/panes/side-pane/index.js +21 -0
  134. package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
  135. package/dist/blocks/panes/tasks-pane/index.js +10 -0
  136. package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
  137. package/dist/blocks/panes/terminal-pane/index.js +9 -0
  138. package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
  139. package/dist/blocks/panes/usage-pane/index.js +11 -0
  140. package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
  141. package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
  142. package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
  143. package/dist/blocks/profiles/profile-switcher/index.js +11 -0
  144. package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
  145. package/dist/blocks/profiles/profile-usage/index.js +10 -0
  146. package/dist/blocks/sessions/inbox/index.d.ts +2 -0
  147. package/dist/blocks/sessions/inbox/index.js +11 -0
  148. package/dist/blocks/sessions/session-board/index.d.ts +4 -0
  149. package/dist/blocks/sessions/session-board/index.js +26 -0
  150. package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
  151. package/dist/blocks/sessions/session-sidebar/index.js +15 -0
  152. package/dist/blocks/settings/extensions/index.d.ts +2 -0
  153. package/dist/blocks/settings/extensions/index.js +9 -0
  154. package/dist/blocks/settings/hooks/index.d.ts +4 -0
  155. package/dist/blocks/settings/hooks/index.js +9 -0
  156. package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
  157. package/dist/blocks/settings/mcp-servers/index.js +9 -0
  158. package/dist/blocks/settings/memory/index.d.ts +4 -0
  159. package/dist/blocks/settings/memory/index.js +8 -0
  160. package/dist/blocks/settings/notifications/index.d.ts +2 -0
  161. package/dist/blocks/settings/notifications/index.js +8 -0
  162. package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
  163. package/dist/blocks/settings/permission-rules/index.js +10 -0
  164. package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
  165. package/dist/blocks/settings/plugin-catalog/index.js +11 -0
  166. package/dist/blocks/settings/plugins/index.d.ts +4 -0
  167. package/dist/blocks/settings/plugins/index.js +9 -0
  168. package/dist/blocks/settings/settings-window/index.d.ts +4 -0
  169. package/dist/blocks/settings/settings-window/index.js +8 -0
  170. package/dist/blocks/settings/worktrees/index.d.ts +4 -0
  171. package/dist/blocks/settings/worktrees/index.js +9 -0
  172. package/dist/components/conversation/agent-run/index.d.ts +3 -0
  173. package/dist/components/conversation/agent-run/index.js +10 -0
  174. package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
  175. package/dist/components/conversation/chapter-nav/index.js +11 -0
  176. package/dist/components/conversation/message/index.d.ts +2 -0
  177. package/dist/components/conversation/message/index.js +15 -0
  178. package/dist/components/conversation/reasoning/index.d.ts +2 -0
  179. package/dist/components/conversation/reasoning/index.js +8 -0
  180. package/dist/components/conversation/recap/index.d.ts +2 -0
  181. package/dist/components/conversation/recap/index.js +9 -0
  182. package/dist/components/conversation/todo-list/index.d.ts +2 -0
  183. package/dist/components/conversation/todo-list/index.js +9 -0
  184. package/dist/components/conversation/tool-call/index.d.ts +3 -0
  185. package/dist/components/conversation/tool-call/index.js +13 -0
  186. package/dist/components/conversation/work-summary/index.d.ts +2 -0
  187. package/dist/components/conversation/work-summary/index.js +10 -0
  188. package/dist/components/prompts/permission-request/index.d.ts +2 -0
  189. package/dist/components/prompts/permission-request/index.js +9 -0
  190. package/dist/components/prompts/plan-approval/index.d.ts +2 -0
  191. package/dist/components/prompts/plan-approval/index.js +9 -0
  192. package/dist/components/prompts/prompt-card/index.d.ts +3 -0
  193. package/dist/components/prompts/prompt-card/index.js +8 -0
  194. package/dist/components/prompts/question-prompt/index.d.ts +2 -0
  195. package/dist/components/prompts/question-prompt/index.js +9 -0
  196. package/dist/index.d.ts +50 -0
  197. package/dist/index.js +231 -0
  198. package/dist/lib/config-parts.d.ts +2 -0
  199. package/dist/lib/config-parts.js +16 -0
  200. package/dist/lib/icons.d.ts +2 -0
  201. package/dist/lib/icons.js +10 -0
  202. package/dist/lib/pace-bar.d.ts +11 -0
  203. package/dist/lib/pace-bar.js +6 -0
  204. package/dist/lib/pace.d.ts +4 -0
  205. package/dist/lib/pace.js +12 -0
  206. package/dist/lib/pane-parts.d.ts +25 -0
  207. package/dist/lib/pane-parts.js +11 -0
  208. package/dist/lib/row-trigger.d.ts +5 -0
  209. package/dist/lib/row-trigger.js +7 -0
  210. package/dist/lib/settings-parts.d.ts +70 -0
  211. package/dist/lib/settings-parts.js +24 -0
  212. package/dist/lib/side-pane-types.d.ts +2 -0
  213. package/dist/lib/side-pane-types.js +1 -0
  214. package/dist/lib/status-glyph.d.ts +8 -0
  215. package/dist/lib/status-glyph.js +12 -0
  216. package/dist/lib/types.d.ts +3 -0
  217. package/dist/lib/types.js +1 -0
  218. package/dist/shared/chunk-04a497rr.js +21 -0
  219. package/dist/shared/chunk-13yf0mza.d.ts +70 -0
  220. package/dist/shared/chunk-1aq2xzv5.js +558 -0
  221. package/dist/shared/chunk-1f96cz69.js +45 -0
  222. package/dist/shared/chunk-1yt061np.d.ts +64 -0
  223. package/dist/shared/chunk-218qabm5.js +250 -0
  224. package/dist/shared/chunk-2fk5aq60.js +313 -0
  225. package/dist/shared/chunk-4248zvmh.js +177 -0
  226. package/dist/shared/chunk-45rqgey6.d.ts +25 -0
  227. package/dist/shared/chunk-4n0v64qx.js +179 -0
  228. package/dist/shared/chunk-4zvhpf2x.js +55 -0
  229. package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
  230. package/dist/shared/chunk-58qvny6a.d.ts +29 -0
  231. package/dist/shared/chunk-5fhkkn39.js +130 -0
  232. package/dist/shared/chunk-5hw0525a.d.ts +33 -0
  233. package/dist/shared/chunk-5k6xwqfj.d.ts +68 -0
  234. package/dist/shared/chunk-5meda998.js +238 -0
  235. package/dist/shared/chunk-5pqksw7z.js +91 -0
  236. package/dist/shared/chunk-6220dy5n.js +70 -0
  237. package/dist/shared/chunk-64bnh22t.d.ts +59 -0
  238. package/dist/shared/chunk-66sh633m.d.ts +60 -0
  239. package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
  240. package/dist/shared/chunk-6g4970a6.d.ts +20 -0
  241. package/dist/shared/chunk-75zwypyr.d.ts +43 -0
  242. package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
  243. package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
  244. package/dist/shared/chunk-8mecznyr.js +357 -0
  245. package/dist/shared/chunk-8pag6vmd.js +255 -0
  246. package/dist/shared/chunk-8xg5gwwy.js +38 -0
  247. package/dist/shared/chunk-9kw6m047.d.ts +32 -0
  248. package/dist/shared/chunk-a4s440b6.js +79 -0
  249. package/dist/shared/chunk-at0jje23.d.ts +110 -0
  250. package/dist/shared/chunk-awd573h9.js +34 -0
  251. package/dist/shared/chunk-b171wjge.d.ts +25 -0
  252. package/dist/shared/chunk-bh2b5d1z.js +98 -0
  253. package/dist/shared/chunk-bzs6amnv.js +187 -0
  254. package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
  255. package/dist/shared/chunk-c8wp058j.js +153 -0
  256. package/dist/shared/chunk-cd4f87as.d.ts +28 -0
  257. package/dist/shared/chunk-cmwby8f9.js +467 -0
  258. package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
  259. package/dist/shared/chunk-dh3qy5fj.js +49 -0
  260. package/dist/shared/chunk-e46apgve.d.ts +40 -0
  261. package/dist/shared/chunk-ejtknc0w.js +21 -0
  262. package/dist/shared/chunk-eqajdxn8.js +82 -0
  263. package/dist/shared/chunk-fbn0h7cr.js +123 -0
  264. package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
  265. package/dist/shared/chunk-g28hweee.d.ts +35 -0
  266. package/dist/shared/chunk-g88hweqh.d.ts +70 -0
  267. package/dist/shared/chunk-gewnsgza.js +61 -0
  268. package/dist/shared/chunk-gkyk663q.d.ts +53 -0
  269. package/dist/shared/chunk-hd4gtj5z.d.ts +23 -0
  270. package/dist/shared/chunk-hxjgey30.d.ts +36 -0
  271. package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
  272. package/dist/shared/chunk-jpq101w3.js +91 -0
  273. package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
  274. package/dist/shared/chunk-k5zegxje.d.ts +81 -0
  275. package/dist/shared/chunk-kreypnzp.d.ts +34 -0
  276. package/dist/shared/chunk-kw9npka5.js +224 -0
  277. package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
  278. package/dist/shared/chunk-n1qq2wp9.js +6 -0
  279. package/dist/shared/chunk-n4742y54.js +39 -0
  280. package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
  281. package/dist/shared/chunk-nk4578dr.js +73 -0
  282. package/dist/shared/chunk-paezqfg1.js +106 -0
  283. package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
  284. package/dist/shared/chunk-qhxz1etk.js +96 -0
  285. package/dist/shared/chunk-qj5ev9ak.js +531 -0
  286. package/dist/shared/chunk-qnwggvjy.js +150 -0
  287. package/dist/shared/chunk-r5hz78pb.js +129 -0
  288. package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
  289. package/dist/shared/chunk-rjfwje37.d.ts +234 -0
  290. package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
  291. package/dist/shared/chunk-rzajcn44.d.ts +49 -0
  292. package/dist/shared/chunk-s3r759ec.js +80 -0
  293. package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
  294. package/dist/shared/chunk-sfqvyzcs.d.ts +68 -0
  295. package/dist/shared/chunk-skg3m9m0.js +56 -0
  296. package/dist/shared/chunk-szkvrqg1.d.ts +54 -0
  297. package/dist/shared/chunk-t21t9x7e.js +188 -0
  298. package/dist/shared/chunk-tc75ng2c.js +235 -0
  299. package/dist/shared/chunk-tkx1krwc.js +88 -0
  300. package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
  301. package/dist/shared/chunk-tv9a1sek.js +137 -0
  302. package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
  303. package/dist/shared/chunk-v6yevw62.d.ts +28 -0
  304. package/dist/shared/chunk-v9q38p0x.js +258 -0
  305. package/dist/shared/chunk-vd59gzzd.js +86 -0
  306. package/dist/shared/chunk-vgh4f3sv.js +118 -0
  307. package/dist/shared/chunk-vjht1zn1.js +391 -0
  308. package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
  309. package/dist/shared/chunk-w5z8qnf8.js +175 -0
  310. package/dist/shared/chunk-wgvzavx1.js +1488 -0
  311. package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
  312. package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
  313. package/dist/shared/chunk-x9jf26yb.js +318 -0
  314. package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
  315. package/dist/shared/chunk-xkchhs2z.js +129 -0
  316. package/dist/shared/chunk-xzfrskd7.js +202 -0
  317. package/dist/shared/chunk-y4cj4y54.js +423 -0
  318. package/dist/shared/chunk-y934at6m.js +7 -0
  319. package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
  320. package/dist/shared/chunk-zfhmbb7n.js +63 -0
  321. package/dist/shared/chunk-zk0t4vq5.js +71 -0
  322. package/dist/shared/chunk-znp9gna7.d.ts +23 -0
  323. package/dist/styles.css +467 -0
  324. package/index.ts +49 -0
  325. package/lib/config-parts.tsx +97 -0
  326. package/lib/icons.tsx +149 -0
  327. package/lib/pace-bar.tsx +24 -0
  328. package/lib/pace.ts +74 -0
  329. package/lib/pane-parts.tsx +76 -0
  330. package/lib/row-trigger.tsx +44 -0
  331. package/lib/settings-parts.tsx +232 -0
  332. package/lib/side-pane-types.ts +75 -0
  333. package/lib/status-glyph.tsx +25 -0
  334. package/lib/types.ts +204 -0
  335. package/mock/demo-reply.tsx +33 -0
  336. package/mock/demo-session.tsx +150 -0
  337. package/mock/mock-config.ts +173 -0
  338. package/mock/mock-extras.ts +288 -0
  339. package/mock/mock-panes.ts +190 -0
  340. package/mock/mock-settings.ts +92 -0
  341. package/mock/mock.ts +548 -0
  342. package/mock/screen-frame.tsx +49 -0
  343. package/package.json +114 -4
@@ -0,0 +1,188 @@
1
+ /*!
2
+ * Local addition: the AI app's settings window — a Sidebar of sections
3
+ * (with a search that narrows them) beside the picked section, with a picker
4
+ * for the config dir the scoped sections edit.
5
+ */
6
+
7
+ 'use client'
8
+
9
+ import { SidebarSearchField } from '@justanarthur/modo-ui/blocks/sidebar-app'
10
+ import Select from '@justanarthur/modo-ui/components/inputs/select'
11
+ import Sidebar from '@justanarthur/modo-ui/components/navigation/sidebar'
12
+ import { useControllableState } from '@justanarthur/modo-ui/lib/use-controllable-state'
13
+ import { type ReactNode, useState } from 'react'
14
+ import { type IconName, useIcon, useIcons } from '../../../lib/icons'
15
+ import type { Profile } from '../../../lib/types'
16
+
17
+ export interface SettingsWindowSection {
18
+ id: string
19
+ label: string
20
+ icon: IconName
21
+ /** Lives in a config dir, so the scope picker shows while it is open. */
22
+ scoped: boolean
23
+ /** Words the search matches besides the label. */
24
+ keywords: string
25
+ }
26
+
27
+ const PROJECT = { id: 'project', dir: '.claude' }
28
+
29
+ interface SettingsWindowProps {
30
+ /** The sections, in sidebar order. */
31
+ sections: SettingsWindowSection[]
32
+ /** The profiles the scope picker offers, before "This project". */
33
+ profiles: Profile[]
34
+ /** The open section's id (controlled). */
35
+ section?: string
36
+ /** The section that starts open. Defaults to the first section. */
37
+ defaultSection?: string
38
+ /** Called when another section is picked. */
39
+ onSectionChange?: (section: string) => void
40
+ /** The profile id (or `'project'`) whose config dir the scoped sections edit (controlled). */
41
+ scope?: string
42
+ /** The scope at first. Defaults to the first profile. */
43
+ defaultScope?: string
44
+ /** Called when another scope is picked. */
45
+ onScopeChange?: (scope: string) => void
46
+ /** Start with the section list open. Defaults to `true`. */
47
+ sidebar?: boolean
48
+ /** Called when "Back to sessions" is pressed. */
49
+ onBack?: () => void
50
+ /** Called when "Profiles" in the sidebar's footer is pressed: profiles have their own page. */
51
+ onOpenProfiles?: () => void
52
+ /** Renders the open section, given its id and the config dir being edited. */
53
+ children: (section: string, configDir: string) => ReactNode
54
+ }
55
+
56
+ /**
57
+ * The app's settings window: a list of sections on the left, the open one
58
+ * on the right.
59
+ *
60
+ * The search over the section list narrows it by name and by what each
61
+ * section holds ("auth", "sound", "disk"). Sections that live in a config dir
62
+ * show a picker in the header that says which one you are editing (a
63
+ * profile's, or the project's `.claude`) and switches it; the others belong
64
+ * to the app and hide it. Profiles themselves are their own page, linked from
65
+ * the sidebar's footer. The content is yours: `children` renders the open
66
+ * section for the config dir in scope.
67
+ *
68
+ * @example {@include ./examples.mdx}
69
+ */
70
+ export default function SettingsWindow({
71
+ sections,
72
+ profiles,
73
+ section,
74
+ defaultSection,
75
+ onSectionChange,
76
+ scope,
77
+ defaultScope,
78
+ onScopeChange,
79
+ sidebar = true,
80
+ onBack,
81
+ onOpenProfiles,
82
+ children,
83
+ }: SettingsWindowProps) {
84
+ const [current, setCurrent] = useControllableState(section, defaultSection ?? sections[0]?.id ?? '', onSectionChange)
85
+ const [scopeId, setScopeId] = useControllableState(
86
+ scope,
87
+ defaultScope ?? profiles[0]?.id ?? PROJECT.id,
88
+ onScopeChange,
89
+ )
90
+ const [query, setQuery] = useState('')
91
+ const icons = useIcons()
92
+ const Back = useIcon('arrow-left')
93
+ const Users = useIcon('users')
94
+ const Folder = useIcon('folder')
95
+ const scoped = sections.find(s => s.id === current)?.scoped ?? false
96
+ const configDir =
97
+ scopeId === PROJECT.id ? PROJECT.dir : (profiles.find(p => p.id === scopeId)?.configDir ?? PROJECT.dir)
98
+ const needle = query.trim().toLowerCase()
99
+ const shown = sections.filter(s => `${s.label} ${s.keywords}`.toLowerCase().includes(needle))
100
+
101
+ return (
102
+ <div className="flex h-full min-h-[640px] w-full bg-background">
103
+ <Sidebar.Provider className="h-full min-h-0" persist={false} mobileBreakpoint={0} defaultOpen={sidebar}>
104
+ <Sidebar variant="inset" className="h-full" value={current} onValueChange={value => setCurrent(value)}>
105
+ <Sidebar.Header>
106
+ <div className="flex flex-col gap-0.5">
107
+ <Sidebar.Menu>
108
+ <Sidebar.MenuItem>
109
+ <Sidebar.MenuButton icon={Back} onClick={onBack}>
110
+ Back to sessions
111
+ </Sidebar.MenuButton>
112
+ </Sidebar.MenuItem>
113
+ </Sidebar.Menu>
114
+ <SidebarSearchField
115
+ placeholder="Search settings"
116
+ shortcut={null}
117
+ value={query}
118
+ onChange={event => setQuery(event.target.value)}
119
+ />
120
+ </div>
121
+ </Sidebar.Header>
122
+ <Sidebar.Content>
123
+ <Sidebar.Group>
124
+ <Sidebar.GroupLabel>Settings</Sidebar.GroupLabel>
125
+ {shown.length > 0 ? (
126
+ <Sidebar.Menu>
127
+ {shown.map(s => (
128
+ <Sidebar.MenuItem key={s.id}>
129
+ <Sidebar.MenuButton value={s.id} icon={icons[s.icon]}>
130
+ {s.label}
131
+ </Sidebar.MenuButton>
132
+ </Sidebar.MenuItem>
133
+ ))}
134
+ </Sidebar.Menu>
135
+ ) : (
136
+ <p className="m-0 px-2 text-caption text-muted-foreground">No settings match “{query.trim()}”</p>
137
+ )}
138
+ </Sidebar.Group>
139
+ </Sidebar.Content>
140
+ <Sidebar.Footer>
141
+ <Sidebar.Menu>
142
+ <Sidebar.MenuItem>
143
+ <Sidebar.MenuButton icon={Users} onClick={onOpenProfiles}>
144
+ Profiles
145
+ </Sidebar.MenuButton>
146
+ </Sidebar.MenuItem>
147
+ </Sidebar.Menu>
148
+ </Sidebar.Footer>
149
+ </Sidebar>
150
+ <Sidebar.Inset className="@container min-h-0 min-w-0 overflow-auto">
151
+ <header className="flex h-12 shrink-0 items-center gap-2 px-1.5">
152
+ <Sidebar.Trigger />
153
+ <span className="text-body weight-medium text-foreground">Settings</span>
154
+ {scoped && (
155
+ <div className="ml-auto flex min-w-0 items-center gap-2">
156
+ <span className="hidden min-w-0 truncate text-caption text-muted-foreground @2xl:inline">
157
+ Editing <span className="font-mono">{configDir}</span>
158
+ </span>
159
+ <Select value={scopeId} onValueChange={setScopeId} size="compact">
160
+ <Select.Trigger variant="borderless" icon={Folder} aria-label="Config dir" />
161
+ <Select.Content>
162
+ <Select.Label>Profiles</Select.Label>
163
+ {profiles.map((profile, i) => (
164
+ <Select.Item key={profile.id} index={i} value={profile.id}>
165
+ {profile.name}
166
+ </Select.Item>
167
+ ))}
168
+ <Select.Separator />
169
+ <Select.Item index={profiles.length} value={PROJECT.id}>
170
+ This project
171
+ </Select.Item>
172
+ </Select.Content>
173
+ </Select>
174
+ </div>
175
+ )}
176
+ </header>
177
+ <main className="mx-auto flex w-full max-w-3xl flex-col px-6 pb-8 pt-4 [contain:inline-size]">
178
+ {children(current, configDir)}
179
+ </main>
180
+ </Sidebar.Inset>
181
+ </Sidebar.Provider>
182
+ </div>
183
+ )
184
+ }
185
+
186
+ export type { SettingsWindowProps }
187
+
188
+ export { SettingsWindow }
@@ -0,0 +1,17 @@
1
+ import Worktrees from './index'
2
+ import { WORKTREES } from '../../../mock/mock'
3
+ import { WORKTREES_ON_DISK } from '../../../mock/mock-settings'
4
+
5
+ # Worktrees
6
+
7
+ Hover a merged or stale worktree to remove it, or open it for its path and what removing it costs.
8
+
9
+ <div className="@container w-full max-w-3xl">
10
+ <Worktrees worktrees={WORKTREES} onDisk={WORKTREES_ON_DISK} />
11
+ </div>
12
+
13
+ # Open
14
+
15
+ <div className="@container w-full max-w-3xl">
16
+ <Worktrees worktrees={WORKTREES} onDisk={WORKTREES_ON_DISK} defaultOpen={['.worktrees/lib-canvas']} />
17
+ </div>
@@ -0,0 +1,145 @@
1
+ /*!
2
+ * Local addition: the settings screen's worktrees section — each session's
3
+ * checkout with its state and size, removable on hover once merged or stale.
4
+ */
5
+
6
+ 'use client'
7
+
8
+ import Button from '@justanarthur/modo-ui/components/actions/button'
9
+ import Badge from '@justanarthur/modo-ui/components/data-display/badge'
10
+ import Tooltip from '@justanarthur/modo-ui/components/overlays/tooltip'
11
+ import { useIcon } from '../../../lib/icons'
12
+ import { Details, Facts, Group, Mono, ON_HOVER, Row, Section } from '../../../lib/settings-parts'
13
+ import type { Worktree } from '../../../lib/types'
14
+
15
+ const BADGE: Record<Worktree['state'], { color: 'green' | 'gray' | 'amber'; label: string }> = {
16
+ active: { color: 'green', label: 'Active' },
17
+ merged: { color: 'gray', label: 'Merged' },
18
+ stale: { color: 'amber', label: 'Stale' },
19
+ }
20
+
21
+ const NOTE: Record<Worktree['state'], string> = {
22
+ active: 'Its session is still running in it.',
23
+ merged: 'Its branch is merged into main; nothing here is lost when it goes.',
24
+ stale: 'No commits for 3 weeks and its session is archived. Uncommitted changes go with it.',
25
+ }
26
+
27
+ interface WorktreesProps {
28
+ /** The sessions' checkouts. */
29
+ worktrees: Worktree[]
30
+ /** Their total size on disk, as the lead says it (`4.4 GB`). */
31
+ onDisk: string
32
+ /** Worktree paths whose rows start open. Defaults to `[]`. */
33
+ defaultOpen?: string[]
34
+ /** Called when "Clean up" (every merged and stale worktree) is pressed. */
35
+ onCleanUp?: () => void
36
+ /** Called when an open worktree's "Open in terminal" is pressed. */
37
+ onOpenTerminal?: (worktree: Worktree) => void
38
+ /** Called when a worktree's Remove is pressed, from its row or its card. */
39
+ onRemove?: (worktree: Worktree) => void
40
+ }
41
+
42
+ /**
43
+ * The checkouts sessions work in, and what they cost on disk.
44
+ *
45
+ * A row names the session over its branch, with its state and size on the
46
+ * right. A merged or stale worktree can go: its remove button sits at the
47
+ * row's end on hover (always shown on touch), and Clean up on top removes
48
+ * them all. Press a row and it lifts into a card that says what removing it
49
+ * costs, with its path, branch and size.
50
+ *
51
+ * @example {@include ./examples.mdx}
52
+ */
53
+ export default function Worktrees({
54
+ worktrees,
55
+ onDisk,
56
+ defaultOpen,
57
+ onCleanUp,
58
+ onOpenTerminal,
59
+ onRemove,
60
+ }: WorktreesProps) {
61
+ const Trash = useIcon('trash')
62
+ const Terminal = useIcon('terminal')
63
+ const removable = worktrees.filter(w => w.state !== 'active')
64
+ return (
65
+ <Section
66
+ title="Worktrees"
67
+ lead={`Sessions that work in their own checkout. ${onDisk} on disk; merged and stale ones can go.`}
68
+ actions={
69
+ <Button size="compact" variant="tertiary" leadingIcon={Trash} onClick={onCleanUp}>
70
+ Clean up {removable.length}
71
+ </Button>
72
+ }
73
+ >
74
+ <Group title="Checkouts" aside={<span className="tabular-nums">{worktrees.length}</span>}>
75
+ <Details label="Worktrees" actions="icon" defaultOpen={defaultOpen}>
76
+ {worktrees.map((worktree, i) => (
77
+ <Row
78
+ key={worktree.path}
79
+ value={worktree.path}
80
+ index={i}
81
+ label={worktree.session}
82
+ caption={<span className="font-mono">{worktree.branch}</span>}
83
+ meta={
84
+ <>
85
+ <Badge size="compact" variant="dot" color={BADGE[worktree.state].color}>
86
+ {BADGE[worktree.state].label}
87
+ </Badge>
88
+ <span className="hidden w-14 text-right text-caption tabular-nums @md:inline">{worktree.size}</span>
89
+ </>
90
+ }
91
+ action={
92
+ worktree.state !== 'active' && (
93
+ <Tooltip content="Remove worktree" side="top">
94
+ <Button
95
+ size="icon-compact"
96
+ variant="ghost"
97
+ aria-label={`Remove ${worktree.path}`}
98
+ className={ON_HOVER}
99
+ onClick={() => onRemove?.(worktree)}
100
+ >
101
+ <Trash />
102
+ </Button>
103
+ </Tooltip>
104
+ )
105
+ }
106
+ >
107
+ <p className="m-0 text-body text-foreground">{NOTE[worktree.state]}</p>
108
+ <Facts
109
+ items={[
110
+ ['Path', <Mono key="p">{worktree.path}</Mono>],
111
+ ['Branch', <Mono key="b">{worktree.branch}</Mono>],
112
+ [
113
+ 'On disk',
114
+ <span key="s" className="tabular-nums">
115
+ {worktree.size}
116
+ </span>,
117
+ ],
118
+ ]}
119
+ />
120
+ <div className="flex justify-end gap-[var(--space-1)]">
121
+ <Button
122
+ size="compact"
123
+ variant="ghost"
124
+ leadingIcon={Terminal}
125
+ onClick={() => onOpenTerminal?.(worktree)}
126
+ >
127
+ Open in terminal
128
+ </Button>
129
+ {worktree.state !== 'active' && (
130
+ <Button size="compact" variant="ghost" leadingIcon={Trash} onClick={() => onRemove?.(worktree)}>
131
+ Remove
132
+ </Button>
133
+ )}
134
+ </div>
135
+ </Row>
136
+ ))}
137
+ </Details>
138
+ </Group>
139
+ </Section>
140
+ )
141
+ }
142
+
143
+ export type { WorktreesProps }
144
+
145
+ export { Worktrees }
@@ -0,0 +1,30 @@
1
+ import AgentRun from './index'
2
+ import ToolCall from '../tool-call'
3
+
4
+ # Sub-agent
5
+
6
+ The run frames its own calls and ends with its report.
7
+
8
+ <div className="w-full max-w-2xl">
9
+ <AgentRun agent="Explore" description="Find every overlay that skips the morph layer" meta="22 tool uses · 1m 04s">
10
+ <ToolCall.Group>
11
+ <ToolCall index={0} value="g" tool="Grep" summary={'"Popup" components/overlays'} meta="9 files" />
12
+ <ToolCall index={1} value="r" tool="Read" summary="components/overlays/toast/index.tsx" meta="402 lines" />
13
+ </ToolCall.Group>
14
+ <p className="m-0 text-body text-muted-foreground">Every overlay grows through useMorph; none hand-rolls its motion.</p>
15
+ </AgentRun>
16
+ </div>
17
+
18
+ # Background
19
+
20
+ A background run carries a badge and keeps turning after the turn ends.
21
+
22
+ <div className="w-full max-w-2xl">
23
+ <AgentRun agent="general-purpose" description="Run the full test suite on main" status="running" background meta="3 tool uses" />
24
+ </div>
25
+
26
+ # Failed
27
+
28
+ <div className="w-full max-w-2xl">
29
+ <AgentRun agent="researcher" icon="globe" description="Compare three charting libraries" status="error" meta="5 tool uses · 12s" />
30
+ </div>
@@ -0,0 +1,82 @@
1
+ /*!
2
+ * Local addition (not part of Fluid Functionalism): a sub-agent or background
3
+ * agent's run, framed as a card with its own tool calls and report inside.
4
+ * Generalised from the AI app's transcript.
5
+ */
6
+
7
+ 'use client'
8
+
9
+ import Badge from '@justanarthur/modo-ui/components/data-display/badge'
10
+ import { useShape } from '@justanarthur/modo-ui/lib/shape-context'
11
+ import { cn } from '@justanarthur/modo-ui/lib/utils'
12
+ import type { ReactNode } from 'react'
13
+ import { type IconName, useIcon } from '../../../lib/icons'
14
+ import { ToolStatusMark } from '../tool-call'
15
+
16
+ type AgentRunStatus = 'running' | 'done' | 'error'
17
+
18
+ interface AgentRunProps {
19
+ /** The agent's name or type: `Explore`, `researcher`, a custom agent. */
20
+ agent: string
21
+ /** What it was asked to do, in a few words. */
22
+ description: string
23
+ /** Where it stands. Defaults to `'done'`. */
24
+ status?: AgentRunStatus
25
+ /** Ran detached: the conversation went on without waiting. Defaults to `false`. */
26
+ background?: boolean
27
+ /** The run's tally: `14 tool uses · 38s`. */
28
+ meta?: string
29
+ /** The glyph before the name. Defaults to `'bot'`. */
30
+ icon?: IconName
31
+ /** Its calls (a `ToolCall.Group`) and its report. */
32
+ children?: ReactNode
33
+ }
34
+
35
+ /**
36
+ * A run an AI handed to another agent: a framed card with what it was asked,
37
+ * its calls and its report.
38
+ *
39
+ * The header names the agent and its task, with the tally and the run's
40
+ * state on the right (the Spinner while it runs, the failed mark on error).
41
+ * A background run carries a badge: the conversation went on without
42
+ * waiting for it. Inside, a `ToolCall.Group` lists its calls and a line of
43
+ * text its report.
44
+ *
45
+ * @example {@include ./examples.mdx}
46
+ */
47
+ function AgentRun({
48
+ agent,
49
+ description,
50
+ status = 'done',
51
+ background = false,
52
+ meta,
53
+ icon = 'bot',
54
+ children,
55
+ }: AgentRunProps) {
56
+ const shape = useShape()
57
+ const Icon = useIcon(icon)
58
+ return (
59
+ <div className={cn('flex flex-col gap-2 border border-border p-[var(--space-3)]', shape.container)}>
60
+ <div className="flex min-w-0 items-center gap-2">
61
+ <Icon size={16} strokeWidth={1.5} className="shrink-0 text-muted-foreground" />
62
+ <span className="shrink-0 text-body weight-medium text-foreground">{agent}</span>
63
+ <span className="min-w-0 truncate text-body text-muted-foreground">{description}</span>
64
+ {background && (
65
+ <Badge size="compact" color="gray" className="shrink-0">
66
+ Background
67
+ </Badge>
68
+ )}
69
+ <span className="ml-auto flex shrink-0 items-center gap-2 text-caption text-muted-foreground">
70
+ {meta}
71
+ <ToolStatusMark status={status} />
72
+ </span>
73
+ </div>
74
+ {children}
75
+ </div>
76
+ )
77
+ }
78
+
79
+ export type { AgentRunProps, AgentRunStatus }
80
+ export { AgentRun }
81
+
82
+ export default AgentRun
@@ -0,0 +1,30 @@
1
+ import ChapterNav from './index'
2
+
3
+ # Chapters
4
+
5
+ Open the list and pick a chapter: its break scrolls to the top of the column.
6
+
7
+ <div className="relative flex h-80 w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-border">
8
+ <div className="absolute right-3 top-2 z-10">
9
+ <ChapterNav
10
+ chapters={[
11
+ { id: 'example-chapter-plan', title: 'Planning', detail: '14:02 · 3 turns' },
12
+ { id: 'example-chapter-build', title: 'Building', detail: '14:20 · 5 turns' },
13
+ { id: 'example-chapter-ship', title: 'Shipping', detail: '14:51 · now' },
14
+ ]}
15
+ />
16
+ </div>
17
+ <div className="flex flex-col gap-24 overflow-y-auto px-6 py-6 pb-60">
18
+ <ChapterNav.Break id="example-chapter-plan" title="Planning" />
19
+ <ChapterNav.Break id="example-chapter-build" title="Building" />
20
+ <ChapterNav.Break id="example-chapter-ship" title="Shipping" />
21
+ </div>
22
+ </div>
23
+
24
+ # Break
25
+
26
+ The titled hairline a chapter starts with.
27
+
28
+ <div className="w-full max-w-2xl">
29
+ <ChapterNav.Break id="example-chapter-break" title="Verification" />
30
+ </div>
@@ -0,0 +1,123 @@
1
+ /*!
2
+ * Local addition (not part of Fluid Functionalism): chapters for a long
3
+ * conversation. A ghost icon button opens a Popover with the chapters as a
4
+ * ChoiceList; picking one scrolls its break, a titled hairline, into view.
5
+ * Generalised from the AI app's transcript.
6
+ */
7
+
8
+ 'use client'
9
+
10
+ import Button from '@justanarthur/modo-ui/components/actions/button'
11
+ import List, { LIST_POPOVER } from '@justanarthur/modo-ui/components/data-display/list'
12
+ import ChoiceList from '@justanarthur/modo-ui/components/inputs/choice-list'
13
+ import Popover from '@justanarthur/modo-ui/components/overlays/popover'
14
+ import { useControllableState } from '@justanarthur/modo-ui/lib/use-controllable-state'
15
+ import { useIcon } from '../../../lib/icons'
16
+
17
+ interface ChapterNavItem {
18
+ /** The id of its `ChapterNav.Break`. */
19
+ id: string
20
+ /** The chapter's title. */
21
+ title: string
22
+ /** A short line under the title: when it started, how many turns. */
23
+ detail?: string
24
+ }
25
+
26
+ interface ChapterBreakProps {
27
+ /** The chapter's title, also its entry in the chapter list. */
28
+ title: string
29
+ /** The anchor id the chapter list jumps to. */
30
+ id: string
31
+ }
32
+
33
+ /** A chapter break: a hairline with the chapter's title. */
34
+ function ChapterBreak({ title, id }: ChapterBreakProps) {
35
+ return (
36
+ <div id={id} className="flex scroll-mt-4 items-center gap-3 pt-2">
37
+ <span className="shrink-0 text-caption weight-medium text-muted-foreground">{title}</span>
38
+ <span aria-hidden="true" className="h-px flex-1 bg-border" />
39
+ </div>
40
+ )
41
+ }
42
+
43
+ interface ChapterNavProps {
44
+ /** The chapters, in order. */
45
+ chapters: ChapterNavItem[]
46
+ /** The current chapter's id. Defaults to the last chapter. */
47
+ defaultValue?: string
48
+ /** Called with a chapter id when one is picked. */
49
+ onValueChange?: (id: string) => void
50
+ }
51
+
52
+ /**
53
+ * The chapters of a long conversation, one press away.
54
+ *
55
+ * A ghost icon button opens a Popover listing the chapters, numbered, each
56
+ * with a short line under its title; the current one is checked. Picking a
57
+ * chapter scrolls its `ChapterNav.Break` (a hairline with the title, placed
58
+ * in the conversation) to the top of the view.
59
+ *
60
+ * Statics:
61
+ * - `ChapterNav.Break` — the titled hairline a chapter starts with: `title`, `id`.
62
+ *
63
+ * @example {@include ./examples.mdx}
64
+ */
65
+ const ChapterNav = Object.assign(
66
+ function ChapterNav({ chapters, defaultValue, onValueChange }: ChapterNavProps) {
67
+ const [current, setCurrent] = useControllableState<string>(
68
+ undefined,
69
+ defaultValue ?? chapters[chapters.length - 1]?.id ?? '',
70
+ onValueChange,
71
+ )
72
+ const ListTree = useIcon('list-tree')
73
+
74
+ const pick = (id: string) => {
75
+ setCurrent(id)
76
+ document.getElementById(id)?.scrollIntoView({ block: 'start' })
77
+ }
78
+
79
+ return (
80
+ <Popover>
81
+ <Popover.Trigger
82
+ render={
83
+ <Button variant="ghost" size="icon-compact" aria-label="Chapters">
84
+ <ListTree />
85
+ </Button>
86
+ }
87
+ />
88
+ <Popover.Content side="bottom" align="end" sideOffset={8} className={LIST_POPOVER}>
89
+ <List.Section title="Chapters">
90
+ <ChoiceList
91
+ label="Chapters"
92
+ value={current}
93
+ onValueChange={pick}
94
+ options={chapters.map((chapter, i) => ({
95
+ value: chapter.id,
96
+ label: chapter.title,
97
+ content: (
98
+ <span className="flex min-w-0 flex-1 gap-2">
99
+ <span className="w-4 shrink-0 text-right text-caption tabular-nums text-muted-foreground">
100
+ {i + 1}
101
+ </span>
102
+ <span className="flex min-w-0 flex-col">
103
+ <span className="truncate text-body text-foreground">{chapter.title}</span>
104
+ {chapter.detail && (
105
+ <span className="truncate text-caption text-muted-foreground">{chapter.detail}</span>
106
+ )}
107
+ </span>
108
+ </span>
109
+ ),
110
+ }))}
111
+ />
112
+ </List.Section>
113
+ </Popover.Content>
114
+ </Popover>
115
+ )
116
+ },
117
+ { Break: ChapterBreak },
118
+ )
119
+
120
+ export type { ChapterBreakProps, ChapterNavItem, ChapterNavProps }
121
+ export { ChapterBreak, ChapterNav }
122
+
123
+ export default ChapterNav
@@ -0,0 +1,53 @@
1
+ import Message from './index'
2
+ import Code from '@justanarthur/modo-ui/primitives/content/code'
3
+
4
+ # Conversation
5
+
6
+ Your turn is a bubble on the right; the reply is text on the page.
7
+
8
+ <div className="flex w-full max-w-2xl flex-col gap-5">
9
+ <Message role="user">Which overlays skip the morph layer?</Message>
10
+ <Message role="assistant">
11
+ <p className="m-0">None of them. Every overlay grows through <code>useMorph</code>:</p>
12
+ <ul className="m-0">
13
+ <li><strong>Popover</strong>, Menu and Select morph out of their trigger.</li>
14
+ <li><strong>Dialog</strong> morphs out of the button that opened it.</li>
15
+ </ul>
16
+ <Code language="sh">rg -l useMorph components/overlays</Code>
17
+ </Message>
18
+ </div>
19
+
20
+ # Attachments and mentions
21
+
22
+ Files, images and pasted text sit above the bubble; an @-mention is a chip inside the text.
23
+
24
+ <div className="w-full max-w-2xl">
25
+ <Message
26
+ role="user"
27
+ attachments={
28
+ <>
29
+ <Message.Attachment kind="image" name="screenshot.png" detail="1.2 MB" />
30
+ <Message.Attachment kind="pasted" name="Pasted text" detail="38 lines" />
31
+ <Message.Attachment name="brief.pdf" detail="4 pages" />
32
+ </>
33
+ }
34
+ >
35
+ Build it to the rules in <Message.Mention path="ui/DESIGN.md" /> and match the screenshot.
36
+ </Message>
37
+ </div>
38
+
39
+ # Streaming
40
+
41
+ While the reply arrives, the working dots follow its last block.
42
+
43
+ <div className="w-full max-w-2xl">
44
+ <Message role="assistant" streaming>
45
+ <p className="m-0">Reading the design rules first, then the craft page.</p>
46
+ </Message>
47
+ </div>
48
+
49
+ # Working
50
+
51
+ The dots on their own, with a line saying what is happening.
52
+
53
+ <Message.Working label="Reading 4 files" />