@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.
- package/LICENSE +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/README.md +105 -2
- package/blocks/conversation/agent-prompt/examples.mdx +44 -0
- package/blocks/conversation/agent-prompt/index.tsx +114 -0
- package/blocks/conversation/composer/draft.css +25 -0
- package/blocks/conversation/composer/draft.tsx +589 -0
- package/blocks/conversation/composer/examples.mdx +114 -0
- package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
- package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
- package/blocks/conversation/composer/index.tsx +517 -0
- package/blocks/conversation/composer/queued-row.tsx +102 -0
- package/blocks/conversation/composer/shared.ts +38 -0
- package/blocks/conversation/composer/suggestion-row.tsx +64 -0
- package/blocks/conversation/composer/use-composer-files.ts +142 -0
- package/blocks/conversation/composer/use-history-nav.ts +60 -0
- package/blocks/conversation/composer/use-message-queue.ts +108 -0
- package/blocks/conversation/composer/use-region-height.ts +34 -0
- package/blocks/conversation/failure-states/examples.mdx +58 -0
- package/blocks/conversation/failure-states/index.tsx +274 -0
- package/blocks/conversation/transcript/examples.mdx +43 -0
- package/blocks/conversation/transcript/index.tsx +204 -0
- package/blocks/conversation/transcript-search/examples.mdx +50 -0
- package/blocks/conversation/transcript-search/index.tsx +469 -0
- package/blocks/dialogs/command-palette/examples.mdx +33 -0
- package/blocks/dialogs/command-palette/index.tsx +232 -0
- package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
- package/blocks/dialogs/hook-dialog/index.tsx +286 -0
- package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
- package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
- package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
- package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
- package/blocks/panes/artifacts-pane/examples.mdx +23 -0
- package/blocks/panes/artifacts-pane/index.tsx +82 -0
- package/blocks/panes/changes-pane/examples.mdx +23 -0
- package/blocks/panes/changes-pane/index.tsx +248 -0
- package/blocks/panes/file-pane/examples.mdx +13 -0
- package/blocks/panes/file-pane/index.tsx +102 -0
- package/blocks/panes/pr-pane/examples.mdx +13 -0
- package/blocks/panes/pr-pane/index.tsx +191 -0
- package/blocks/panes/side-pane/examples.mdx +58 -0
- package/blocks/panes/side-pane/index.tsx +187 -0
- package/blocks/panes/tasks-pane/examples.mdx +23 -0
- package/blocks/panes/tasks-pane/index.tsx +127 -0
- package/blocks/panes/terminal-pane/examples.mdx +13 -0
- package/blocks/panes/terminal-pane/index.tsx +99 -0
- package/blocks/panes/usage-pane/examples.mdx +13 -0
- package/blocks/panes/usage-pane/index.tsx +75 -0
- package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
- package/blocks/profiles/profile-onboarding/index.tsx +580 -0
- package/blocks/profiles/profile-switcher/examples.mdx +18 -0
- package/blocks/profiles/profile-switcher/index.tsx +197 -0
- package/blocks/profiles/profile-usage/examples.mdx +21 -0
- package/blocks/profiles/profile-usage/index.tsx +127 -0
- package/blocks/sessions/inbox/examples.mdx +35 -0
- package/blocks/sessions/inbox/index.tsx +372 -0
- package/blocks/sessions/session-board/examples.mdx +34 -0
- package/blocks/sessions/session-board/index.tsx +570 -0
- package/blocks/sessions/session-sidebar/examples.mdx +43 -0
- package/blocks/sessions/session-sidebar/index.tsx +442 -0
- package/blocks/settings/extensions/examples.mdx +10 -0
- package/blocks/settings/extensions/index.tsx +72 -0
- package/blocks/settings/hooks/examples.mdx +16 -0
- package/blocks/settings/hooks/index.tsx +127 -0
- package/blocks/settings/mcp-servers/examples.mdx +26 -0
- package/blocks/settings/mcp-servers/index.tsx +204 -0
- package/blocks/settings/memory/examples.mdx +22 -0
- package/blocks/settings/memory/index.tsx +113 -0
- package/blocks/settings/notifications/examples.mdx +8 -0
- package/blocks/settings/notifications/index.tsx +63 -0
- package/blocks/settings/permission-rules/examples.mdx +37 -0
- package/blocks/settings/permission-rules/index.tsx +317 -0
- package/blocks/settings/plugin-catalog/examples.mdx +52 -0
- package/blocks/settings/plugin-catalog/index.tsx +407 -0
- package/blocks/settings/plugins/examples.mdx +10 -0
- package/blocks/settings/plugins/index.tsx +72 -0
- package/blocks/settings/settings-window/examples.mdx +40 -0
- package/blocks/settings/settings-window/index.tsx +188 -0
- package/blocks/settings/worktrees/examples.mdx +17 -0
- package/blocks/settings/worktrees/index.tsx +145 -0
- package/components/conversation/agent-run/examples.mdx +30 -0
- package/components/conversation/agent-run/index.tsx +82 -0
- package/components/conversation/chapter-nav/examples.mdx +30 -0
- package/components/conversation/chapter-nav/index.tsx +123 -0
- package/components/conversation/message/examples.mdx +53 -0
- package/components/conversation/message/index.tsx +128 -0
- package/components/conversation/message/working.tsx +102 -0
- package/components/conversation/reasoning/examples.mdx +22 -0
- package/components/conversation/reasoning/index.tsx +54 -0
- package/components/conversation/recap/examples.mdx +21 -0
- package/components/conversation/recap/index.tsx +67 -0
- package/components/conversation/todo-list/examples.mdx +32 -0
- package/components/conversation/todo-list/index.tsx +106 -0
- package/components/conversation/tool-call/examples.mdx +48 -0
- package/components/conversation/tool-call/index.tsx +142 -0
- package/components/conversation/work-summary/examples.mdx +50 -0
- package/components/conversation/work-summary/index.tsx +87 -0
- package/components/prompts/permission-request/examples.mdx +32 -0
- package/components/prompts/permission-request/index.tsx +74 -0
- package/components/prompts/plan-approval/examples.mdx +37 -0
- package/components/prompts/plan-approval/index.tsx +76 -0
- package/components/prompts/prompt-card/examples.mdx +31 -0
- package/components/prompts/prompt-card/index.tsx +82 -0
- package/components/prompts/question-prompt/examples.mdx +46 -0
- package/components/prompts/question-prompt/index.tsx +118 -0
- package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
- package/dist/blocks/conversation/agent-prompt/index.js +13 -0
- package/dist/blocks/conversation/composer/index.d.ts +4 -0
- package/dist/blocks/conversation/composer/index.js +15 -0
- package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
- package/dist/blocks/conversation/failure-states/index.js +8 -0
- package/dist/blocks/conversation/transcript/index.d.ts +50 -0
- package/dist/blocks/conversation/transcript/index.js +17 -0
- package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
- package/dist/blocks/conversation/transcript-search/index.js +11 -0
- package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
- package/dist/blocks/dialogs/command-palette/index.js +20 -0
- package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
- package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
- package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
- package/dist/blocks/panes/artifacts-pane/index.js +9 -0
- package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
- package/dist/blocks/panes/changes-pane/index.js +9 -0
- package/dist/blocks/panes/file-pane/index.d.ts +3 -0
- package/dist/blocks/panes/file-pane/index.js +9 -0
- package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
- package/dist/blocks/panes/pr-pane/index.js +10 -0
- package/dist/blocks/panes/side-pane/index.d.ts +5 -0
- package/dist/blocks/panes/side-pane/index.js +21 -0
- package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
- package/dist/blocks/panes/tasks-pane/index.js +10 -0
- package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
- package/dist/blocks/panes/terminal-pane/index.js +9 -0
- package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
- package/dist/blocks/panes/usage-pane/index.js +11 -0
- package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
- package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-switcher/index.js +11 -0
- package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-usage/index.js +10 -0
- package/dist/blocks/sessions/inbox/index.d.ts +2 -0
- package/dist/blocks/sessions/inbox/index.js +11 -0
- package/dist/blocks/sessions/session-board/index.d.ts +4 -0
- package/dist/blocks/sessions/session-board/index.js +26 -0
- package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
- package/dist/blocks/sessions/session-sidebar/index.js +15 -0
- package/dist/blocks/settings/extensions/index.d.ts +2 -0
- package/dist/blocks/settings/extensions/index.js +9 -0
- package/dist/blocks/settings/hooks/index.d.ts +4 -0
- package/dist/blocks/settings/hooks/index.js +9 -0
- package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
- package/dist/blocks/settings/mcp-servers/index.js +9 -0
- package/dist/blocks/settings/memory/index.d.ts +4 -0
- package/dist/blocks/settings/memory/index.js +8 -0
- package/dist/blocks/settings/notifications/index.d.ts +2 -0
- package/dist/blocks/settings/notifications/index.js +8 -0
- package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
- package/dist/blocks/settings/permission-rules/index.js +10 -0
- package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
- package/dist/blocks/settings/plugin-catalog/index.js +11 -0
- package/dist/blocks/settings/plugins/index.d.ts +4 -0
- package/dist/blocks/settings/plugins/index.js +9 -0
- package/dist/blocks/settings/settings-window/index.d.ts +4 -0
- package/dist/blocks/settings/settings-window/index.js +8 -0
- package/dist/blocks/settings/worktrees/index.d.ts +4 -0
- package/dist/blocks/settings/worktrees/index.js +9 -0
- package/dist/components/conversation/agent-run/index.d.ts +3 -0
- package/dist/components/conversation/agent-run/index.js +10 -0
- package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
- package/dist/components/conversation/chapter-nav/index.js +11 -0
- package/dist/components/conversation/message/index.d.ts +2 -0
- package/dist/components/conversation/message/index.js +15 -0
- package/dist/components/conversation/reasoning/index.d.ts +2 -0
- package/dist/components/conversation/reasoning/index.js +8 -0
- package/dist/components/conversation/recap/index.d.ts +2 -0
- package/dist/components/conversation/recap/index.js +9 -0
- package/dist/components/conversation/todo-list/index.d.ts +2 -0
- package/dist/components/conversation/todo-list/index.js +9 -0
- package/dist/components/conversation/tool-call/index.d.ts +3 -0
- package/dist/components/conversation/tool-call/index.js +13 -0
- package/dist/components/conversation/work-summary/index.d.ts +2 -0
- package/dist/components/conversation/work-summary/index.js +10 -0
- package/dist/components/prompts/permission-request/index.d.ts +2 -0
- package/dist/components/prompts/permission-request/index.js +9 -0
- package/dist/components/prompts/plan-approval/index.d.ts +2 -0
- package/dist/components/prompts/plan-approval/index.js +9 -0
- package/dist/components/prompts/prompt-card/index.d.ts +3 -0
- package/dist/components/prompts/prompt-card/index.js +8 -0
- package/dist/components/prompts/question-prompt/index.d.ts +2 -0
- package/dist/components/prompts/question-prompt/index.js +9 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +231 -0
- package/dist/lib/config-parts.d.ts +2 -0
- package/dist/lib/config-parts.js +16 -0
- package/dist/lib/icons.d.ts +2 -0
- package/dist/lib/icons.js +10 -0
- package/dist/lib/pace-bar.d.ts +11 -0
- package/dist/lib/pace-bar.js +6 -0
- package/dist/lib/pace.d.ts +4 -0
- package/dist/lib/pace.js +12 -0
- package/dist/lib/pane-parts.d.ts +25 -0
- package/dist/lib/pane-parts.js +11 -0
- package/dist/lib/row-trigger.d.ts +5 -0
- package/dist/lib/row-trigger.js +7 -0
- package/dist/lib/settings-parts.d.ts +70 -0
- package/dist/lib/settings-parts.js +24 -0
- package/dist/lib/side-pane-types.d.ts +2 -0
- package/dist/lib/side-pane-types.js +1 -0
- package/dist/lib/status-glyph.d.ts +8 -0
- package/dist/lib/status-glyph.js +12 -0
- package/dist/lib/types.d.ts +3 -0
- package/dist/lib/types.js +1 -0
- package/dist/shared/chunk-04a497rr.js +21 -0
- package/dist/shared/chunk-13yf0mza.d.ts +70 -0
- package/dist/shared/chunk-1aq2xzv5.js +558 -0
- package/dist/shared/chunk-1f96cz69.js +45 -0
- package/dist/shared/chunk-1yt061np.d.ts +64 -0
- package/dist/shared/chunk-218qabm5.js +250 -0
- package/dist/shared/chunk-2fk5aq60.js +313 -0
- package/dist/shared/chunk-4248zvmh.js +177 -0
- package/dist/shared/chunk-45rqgey6.d.ts +25 -0
- package/dist/shared/chunk-4n0v64qx.js +179 -0
- package/dist/shared/chunk-4zvhpf2x.js +55 -0
- package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
- package/dist/shared/chunk-58qvny6a.d.ts +29 -0
- package/dist/shared/chunk-5fhkkn39.js +130 -0
- package/dist/shared/chunk-5hw0525a.d.ts +33 -0
- package/dist/shared/chunk-5k6xwqfj.d.ts +68 -0
- package/dist/shared/chunk-5meda998.js +238 -0
- package/dist/shared/chunk-5pqksw7z.js +91 -0
- package/dist/shared/chunk-6220dy5n.js +70 -0
- package/dist/shared/chunk-64bnh22t.d.ts +59 -0
- package/dist/shared/chunk-66sh633m.d.ts +60 -0
- package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
- package/dist/shared/chunk-6g4970a6.d.ts +20 -0
- package/dist/shared/chunk-75zwypyr.d.ts +43 -0
- package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
- package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
- package/dist/shared/chunk-8mecznyr.js +357 -0
- package/dist/shared/chunk-8pag6vmd.js +255 -0
- package/dist/shared/chunk-8xg5gwwy.js +38 -0
- package/dist/shared/chunk-9kw6m047.d.ts +32 -0
- package/dist/shared/chunk-a4s440b6.js +79 -0
- package/dist/shared/chunk-at0jje23.d.ts +110 -0
- package/dist/shared/chunk-awd573h9.js +34 -0
- package/dist/shared/chunk-b171wjge.d.ts +25 -0
- package/dist/shared/chunk-bh2b5d1z.js +98 -0
- package/dist/shared/chunk-bzs6amnv.js +187 -0
- package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
- package/dist/shared/chunk-c8wp058j.js +153 -0
- package/dist/shared/chunk-cd4f87as.d.ts +28 -0
- package/dist/shared/chunk-cmwby8f9.js +467 -0
- package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
- package/dist/shared/chunk-dh3qy5fj.js +49 -0
- package/dist/shared/chunk-e46apgve.d.ts +40 -0
- package/dist/shared/chunk-ejtknc0w.js +21 -0
- package/dist/shared/chunk-eqajdxn8.js +82 -0
- package/dist/shared/chunk-fbn0h7cr.js +123 -0
- package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
- package/dist/shared/chunk-g28hweee.d.ts +35 -0
- package/dist/shared/chunk-g88hweqh.d.ts +70 -0
- package/dist/shared/chunk-gewnsgza.js +61 -0
- package/dist/shared/chunk-gkyk663q.d.ts +53 -0
- package/dist/shared/chunk-hd4gtj5z.d.ts +23 -0
- package/dist/shared/chunk-hxjgey30.d.ts +36 -0
- package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
- package/dist/shared/chunk-jpq101w3.js +91 -0
- package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
- package/dist/shared/chunk-k5zegxje.d.ts +81 -0
- package/dist/shared/chunk-kreypnzp.d.ts +34 -0
- package/dist/shared/chunk-kw9npka5.js +224 -0
- package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
- package/dist/shared/chunk-n1qq2wp9.js +6 -0
- package/dist/shared/chunk-n4742y54.js +39 -0
- package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
- package/dist/shared/chunk-nk4578dr.js +73 -0
- package/dist/shared/chunk-paezqfg1.js +106 -0
- package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
- package/dist/shared/chunk-qhxz1etk.js +96 -0
- package/dist/shared/chunk-qj5ev9ak.js +531 -0
- package/dist/shared/chunk-qnwggvjy.js +150 -0
- package/dist/shared/chunk-r5hz78pb.js +129 -0
- package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
- package/dist/shared/chunk-rjfwje37.d.ts +234 -0
- package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
- package/dist/shared/chunk-rzajcn44.d.ts +49 -0
- package/dist/shared/chunk-s3r759ec.js +80 -0
- package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
- package/dist/shared/chunk-sfqvyzcs.d.ts +68 -0
- package/dist/shared/chunk-skg3m9m0.js +56 -0
- package/dist/shared/chunk-szkvrqg1.d.ts +54 -0
- package/dist/shared/chunk-t21t9x7e.js +188 -0
- package/dist/shared/chunk-tc75ng2c.js +235 -0
- package/dist/shared/chunk-tkx1krwc.js +88 -0
- package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
- package/dist/shared/chunk-tv9a1sek.js +137 -0
- package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
- package/dist/shared/chunk-v6yevw62.d.ts +28 -0
- package/dist/shared/chunk-v9q38p0x.js +258 -0
- package/dist/shared/chunk-vd59gzzd.js +86 -0
- package/dist/shared/chunk-vgh4f3sv.js +118 -0
- package/dist/shared/chunk-vjht1zn1.js +391 -0
- package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
- package/dist/shared/chunk-w5z8qnf8.js +175 -0
- package/dist/shared/chunk-wgvzavx1.js +1488 -0
- package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
- package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
- package/dist/shared/chunk-x9jf26yb.js +318 -0
- package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
- package/dist/shared/chunk-xkchhs2z.js +129 -0
- package/dist/shared/chunk-xzfrskd7.js +202 -0
- package/dist/shared/chunk-y4cj4y54.js +423 -0
- package/dist/shared/chunk-y934at6m.js +7 -0
- package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
- package/dist/shared/chunk-zfhmbb7n.js +63 -0
- package/dist/shared/chunk-zk0t4vq5.js +71 -0
- package/dist/shared/chunk-znp9gna7.d.ts +23 -0
- package/dist/styles.css +467 -0
- package/index.ts +49 -0
- package/lib/config-parts.tsx +97 -0
- package/lib/icons.tsx +149 -0
- package/lib/pace-bar.tsx +24 -0
- package/lib/pace.ts +74 -0
- package/lib/pane-parts.tsx +76 -0
- package/lib/row-trigger.tsx +44 -0
- package/lib/settings-parts.tsx +232 -0
- package/lib/side-pane-types.ts +75 -0
- package/lib/status-glyph.tsx +25 -0
- package/lib/types.ts +204 -0
- package/mock/demo-reply.tsx +33 -0
- package/mock/demo-session.tsx +150 -0
- package/mock/mock-config.ts +173 -0
- package/mock/mock-extras.ts +288 -0
- package/mock/mock-panes.ts +190 -0
- package/mock/mock-settings.ts +92 -0
- package/mock/mock.ts +548 -0
- package/mock/screen-frame.tsx +49 -0
- package/package.json +114 -4
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
3
|
+
* `registry/default/input-message.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
4
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import { useIcon } from '@justanarthur/modo-ui/lib/icon-context'
|
|
10
|
+
import { useSize } from '@justanarthur/modo-ui/lib/size-context'
|
|
11
|
+
import { cn } from '@justanarthur/modo-ui/lib/utils'
|
|
12
|
+
import { useRegisterFluidHoverItem } from '@justanarthur/modo-ui/primitives/systems/fluid-hover'
|
|
13
|
+
import { useRef } from 'react'
|
|
14
|
+
|
|
15
|
+
interface SuggestionRowProps {
|
|
16
|
+
text: string
|
|
17
|
+
index: number
|
|
18
|
+
active: boolean
|
|
19
|
+
/** Show a ↓ hint in the icon slot: the first row does while nothing is highlighted. */
|
|
20
|
+
keyHint: boolean
|
|
21
|
+
optionId: string
|
|
22
|
+
registerItem: (index: number, element: HTMLElement | null) => void
|
|
23
|
+
onSelect: () => void
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** A suggested prompt. The highlight is the list's sliding overlay; the row only recolors its text. */
|
|
27
|
+
function SuggestionRow({ text, index, active, keyHint, optionId, registerItem, onSelect }: SuggestionRowProps) {
|
|
28
|
+
const EnterIcon = useIcon('corner-down-left')
|
|
29
|
+
const ArrowDownIcon = useIcon('arrow-down')
|
|
30
|
+
const compactStep = useSize().variant === 'compact'
|
|
31
|
+
const ref = useRef<HTMLDivElement>(null)
|
|
32
|
+
|
|
33
|
+
useRegisterFluidHoverItem(registerItem, index, ref)
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
// biome-ignore lint/a11y/useFocusableInteractive lint/a11y/useKeyWithClickEvents: focus stays in the textarea, which drives the options (aria-activedescendant).
|
|
37
|
+
<div
|
|
38
|
+
ref={ref}
|
|
39
|
+
id={optionId}
|
|
40
|
+
role="option"
|
|
41
|
+
aria-selected={active}
|
|
42
|
+
onClick={onSelect}
|
|
43
|
+
className={cn(
|
|
44
|
+
'relative flex cursor-pointer items-center gap-2',
|
|
45
|
+
compactStep ? 'h-7 px-2 text-subtitle-compact' : 'h-8 px-2.5 text-subtitle',
|
|
46
|
+
'text-muted-foreground transition-colors duration-fast',
|
|
47
|
+
active && 'text-foreground',
|
|
48
|
+
'weight-normal',
|
|
49
|
+
)}
|
|
50
|
+
>
|
|
51
|
+
<span className="min-w-0 flex-1 truncate text-trim py-1 -my-1">{text}</span>
|
|
52
|
+
{!active && keyHint ? (
|
|
53
|
+
<ArrowDownIcon size={13} className="shrink-0 text-muted-foreground/70 transition-opacity duration-fast" />
|
|
54
|
+
) : (
|
|
55
|
+
<EnterIcon
|
|
56
|
+
size={13}
|
|
57
|
+
className={cn('shrink-0 transition-opacity duration-fast', active ? 'opacity-100' : 'opacity-0')}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { SuggestionRow }
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
3
|
+
* `registry/default/input-message.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
4
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import { useControllableState } from '@justanarthur/modo-ui/lib/use-controllable-state'
|
|
10
|
+
import { type ChangeEvent, type DragEvent, useCallback, useMemo, useRef, useState } from 'react'
|
|
11
|
+
|
|
12
|
+
// A stable seed: a fresh literal per render would churn the stored identity.
|
|
13
|
+
const NO_FILES: File[] = []
|
|
14
|
+
|
|
15
|
+
interface ComposerFilesOptions {
|
|
16
|
+
files: File[] | undefined
|
|
17
|
+
defaultFiles: File[] | undefined
|
|
18
|
+
onFilesChange: ((files: File[]) => void) | undefined
|
|
19
|
+
accept: string
|
|
20
|
+
maxFiles: number | undefined
|
|
21
|
+
disabled: boolean | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Unique enough to catch the same file dropped twice; different bytes mean a different size.
|
|
25
|
+
const fingerprint = (file: File) => `${file.name}-${file.size}-${file.lastModified}`
|
|
26
|
+
|
|
27
|
+
function matchesAccept(file: File, tokens: string[]) {
|
|
28
|
+
return tokens.some(token => {
|
|
29
|
+
if (token.endsWith('/*')) return file.type.startsWith(token.slice(0, -1))
|
|
30
|
+
if (token.startsWith('.')) return file.name.toLowerCase().endsWith(token.toLowerCase())
|
|
31
|
+
return file.type === token
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The composer's attachments: the list both ways, the hidden picker, and drag-and-drop. */
|
|
36
|
+
export function useComposerFiles({
|
|
37
|
+
files,
|
|
38
|
+
defaultFiles,
|
|
39
|
+
onFilesChange,
|
|
40
|
+
accept,
|
|
41
|
+
maxFiles,
|
|
42
|
+
disabled,
|
|
43
|
+
}: ComposerFilesOptions) {
|
|
44
|
+
const supported = onFilesChange !== undefined || defaultFiles !== undefined
|
|
45
|
+
const [list, setList] = useControllableState<File[]>(files, defaultFiles ?? NO_FILES, onFilesChange)
|
|
46
|
+
const inputRef = useRef<HTMLInputElement>(null)
|
|
47
|
+
const [dragOver, setDragOver] = useState(false)
|
|
48
|
+
|
|
49
|
+
const acceptTokens = useMemo(
|
|
50
|
+
() =>
|
|
51
|
+
accept
|
|
52
|
+
.split(',')
|
|
53
|
+
.map(s => s.trim())
|
|
54
|
+
.filter(Boolean),
|
|
55
|
+
[accept],
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
const replace = useCallback(
|
|
59
|
+
(next: File[]) => {
|
|
60
|
+
if (!supported) return
|
|
61
|
+
setList(maxFiles != null ? next.slice(0, maxFiles) : next)
|
|
62
|
+
},
|
|
63
|
+
[supported, setList, maxFiles],
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
const add = useCallback(
|
|
67
|
+
(incoming: File[]) => {
|
|
68
|
+
const seen = new Set(list.map(fingerprint))
|
|
69
|
+
const accepted = incoming.filter(file => {
|
|
70
|
+
if (!matchesAccept(file, acceptTokens) || seen.has(fingerprint(file))) return false
|
|
71
|
+
seen.add(fingerprint(file))
|
|
72
|
+
return true
|
|
73
|
+
})
|
|
74
|
+
if (accepted.length) replace([...list, ...accepted])
|
|
75
|
+
},
|
|
76
|
+
[list, acceptTokens, replace],
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
const remove = useCallback((index: number) => replace(list.filter((_, i) => i !== index)), [list, replace])
|
|
80
|
+
|
|
81
|
+
const openPicker = useCallback(
|
|
82
|
+
(acceptOverride?: string) => {
|
|
83
|
+
const el = inputRef.current
|
|
84
|
+
if (!el) return
|
|
85
|
+
if (!acceptOverride) {
|
|
86
|
+
el.click()
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
// The dialog reads `accept` synchronously, so the override can be undone right after.
|
|
90
|
+
el.accept = acceptOverride
|
|
91
|
+
el.click()
|
|
92
|
+
queueMicrotask(() => {
|
|
93
|
+
if (inputRef.current) inputRef.current.accept = accept
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
[accept],
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
const dropHandlers = {
|
|
100
|
+
onDragOver: (e: DragEvent<HTMLElement>) => {
|
|
101
|
+
if (!supported || disabled || !Array.from(e.dataTransfer.types).includes('Files')) return
|
|
102
|
+
e.preventDefault()
|
|
103
|
+
e.dataTransfer.dropEffect = 'copy'
|
|
104
|
+
setDragOver(true)
|
|
105
|
+
},
|
|
106
|
+
onDragLeave: (e: DragEvent<HTMLElement>) => {
|
|
107
|
+
const next = e.relatedTarget as Node | null
|
|
108
|
+
if (next && e.currentTarget.contains(next)) return
|
|
109
|
+
setDragOver(false)
|
|
110
|
+
},
|
|
111
|
+
onDrop: (e: DragEvent<HTMLElement>) => {
|
|
112
|
+
e.preventDefault()
|
|
113
|
+
setDragOver(false)
|
|
114
|
+
if (!supported || disabled) return
|
|
115
|
+
add(Array.from(e.dataTransfer.files))
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const inputProps = {
|
|
120
|
+
ref: inputRef,
|
|
121
|
+
type: 'file',
|
|
122
|
+
accept,
|
|
123
|
+
multiple: maxFiles == null || maxFiles > 1,
|
|
124
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => {
|
|
125
|
+
if (!e.target.files) return
|
|
126
|
+
add(Array.from(e.target.files))
|
|
127
|
+
e.target.value = '' // so the same file can be picked again
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
supported,
|
|
133
|
+
controlled: files !== undefined,
|
|
134
|
+
files: list,
|
|
135
|
+
dragging: supported && dragOver,
|
|
136
|
+
replace,
|
|
137
|
+
remove,
|
|
138
|
+
openPicker,
|
|
139
|
+
dropHandlers,
|
|
140
|
+
inputProps,
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
3
|
+
* `registry/default/input-message.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
4
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import { type KeyboardEvent, type RefObject, useCallback, useRef, useState } from 'react'
|
|
10
|
+
import { caretToEnd } from './shared'
|
|
11
|
+
|
|
12
|
+
const isPlain = (e: KeyboardEvent) => !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Readline-style recall of sent messages: ArrowUp with the caret on the first
|
|
16
|
+
* line walks back, ArrowDown on the last line walks forward and past the
|
|
17
|
+
* newest entry restores the draft. `exit` leaves history mode (typing, sending).
|
|
18
|
+
*/
|
|
19
|
+
export function useHistoryNav(
|
|
20
|
+
history: string[],
|
|
21
|
+
value: string,
|
|
22
|
+
setValue: (value: string) => void,
|
|
23
|
+
textareaRef: RefObject<HTMLTextAreaElement | null>,
|
|
24
|
+
) {
|
|
25
|
+
const [index, setIndex] = useState<number | null>(null)
|
|
26
|
+
const draft = useRef('')
|
|
27
|
+
|
|
28
|
+
const exit = useCallback(() => setIndex(null), [])
|
|
29
|
+
|
|
30
|
+
const onKeyDown = useCallback(
|
|
31
|
+
(e: KeyboardEvent<HTMLTextAreaElement>) => {
|
|
32
|
+
if (!history.length || !isPlain(e)) return
|
|
33
|
+
const el = e.currentTarget
|
|
34
|
+
const caret = el.selectionStart ?? 0
|
|
35
|
+
const end = el.selectionEnd ?? caret
|
|
36
|
+
|
|
37
|
+
if (e.key === 'ArrowUp' && !value.slice(0, caret).includes('\n')) {
|
|
38
|
+
const start = index ?? history.length
|
|
39
|
+
if (start === 0) return
|
|
40
|
+
e.preventDefault()
|
|
41
|
+
if (index == null) draft.current = value
|
|
42
|
+
setIndex(start - 1)
|
|
43
|
+
setValue(history[start - 1] ?? '')
|
|
44
|
+
caretToEnd(textareaRef, false)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (e.key === 'ArrowDown' && index != null && !value.slice(end).includes('\n')) {
|
|
49
|
+
e.preventDefault()
|
|
50
|
+
const next = index + 1
|
|
51
|
+
setIndex(next >= history.length ? null : next)
|
|
52
|
+
setValue(next >= history.length ? draft.current : (history[next] ?? ''))
|
|
53
|
+
caretToEnd(textareaRef, false)
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[history, value, index, setValue, textareaRef],
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
return { exit, onKeyDown }
|
|
60
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
3
|
+
* `registry/default/input-message.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
4
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import { useControllableState } from '@justanarthur/modo-ui/lib/use-controllable-state'
|
|
10
|
+
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
11
|
+
import type { DraftStatus, QueuedMessage } from './shared'
|
|
12
|
+
|
|
13
|
+
const NO_QUEUE: QueuedMessage[] = []
|
|
14
|
+
|
|
15
|
+
interface MessageQueueOptions {
|
|
16
|
+
status: DraftStatus | undefined
|
|
17
|
+
defaultStatus: DraftStatus | undefined
|
|
18
|
+
onStatusChange: ((status: DraftStatus) => void) | undefined
|
|
19
|
+
onStop: (() => void) | undefined
|
|
20
|
+
queue: QueuedMessage[] | undefined
|
|
21
|
+
defaultQueue: QueuedMessage[] | undefined
|
|
22
|
+
onQueueChange: ((queue: QueuedMessage[]) => void) | undefined
|
|
23
|
+
onSend: ((value: string, files: File[], meta?: { queuedId?: string }) => void) | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The streaming status and the queue of messages typed while it streams. On
|
|
28
|
+
* the streaming → idle edge the head of the queue dispatches through `onSend`;
|
|
29
|
+
* the consumer sets the status back to streaming there, which re-arms it.
|
|
30
|
+
*/
|
|
31
|
+
export function useMessageQueue(options: MessageQueueOptions) {
|
|
32
|
+
const { onStop, onSend } = options
|
|
33
|
+
const statusEnabled = options.status !== undefined || options.defaultStatus !== undefined
|
|
34
|
+
const statusControlled = options.status !== undefined
|
|
35
|
+
const [statusValue, setStatus] = useControllableState<DraftStatus>(
|
|
36
|
+
options.status,
|
|
37
|
+
options.defaultStatus ?? 'idle',
|
|
38
|
+
options.onStatusChange,
|
|
39
|
+
)
|
|
40
|
+
const status = statusEnabled ? statusValue : undefined
|
|
41
|
+
|
|
42
|
+
const [queue, setQueue] = useControllableState<QueuedMessage[]>(
|
|
43
|
+
options.queue,
|
|
44
|
+
options.defaultQueue ?? NO_QUEUE,
|
|
45
|
+
options.onQueueChange,
|
|
46
|
+
)
|
|
47
|
+
// Read by the handlers, so two submits before a controlled `queue` round-trips both land.
|
|
48
|
+
const queueRef = useRef(queue)
|
|
49
|
+
queueRef.current = queue
|
|
50
|
+
const supported = statusEnabled && (options.onQueueChange !== undefined || options.defaultQueue !== undefined)
|
|
51
|
+
const [announcement, setAnnouncement] = useState('')
|
|
52
|
+
|
|
53
|
+
// An uncontrolled status can always stop: Stop flips it to idle itself.
|
|
54
|
+
const canStop = onStop !== undefined || !statusControlled
|
|
55
|
+
const stop = useCallback(() => {
|
|
56
|
+
onStop?.()
|
|
57
|
+
if (!statusControlled) setStatus('idle')
|
|
58
|
+
}, [onStop, statusControlled, setStatus])
|
|
59
|
+
|
|
60
|
+
const previous = useRef(status)
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
const prev = previous.current
|
|
63
|
+
previous.current = status
|
|
64
|
+
if (!supported || prev !== 'streaming' || status !== 'idle') return
|
|
65
|
+
const [next, ...rest] = queue
|
|
66
|
+
if (!next) return
|
|
67
|
+
setQueue(rest)
|
|
68
|
+
onSend?.(next.text, next.files, { queuedId: next.id })
|
|
69
|
+
setAnnouncement(`Message sent.${rest.length ? ` ${rest.length} still queued.` : ''}`)
|
|
70
|
+
}, [status, supported, queue, setQueue, onSend])
|
|
71
|
+
|
|
72
|
+
const enqueue = useCallback(
|
|
73
|
+
(text: string, files: File[]) => setQueue([...queueRef.current, { id: crypto.randomUUID(), text, files }]),
|
|
74
|
+
[setQueue],
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
const remove = useCallback(
|
|
78
|
+
(item: QueuedMessage) => setQueue(queueRef.current.filter(q => q.id !== item.id)),
|
|
79
|
+
[setQueue],
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
const move = useCallback(
|
|
83
|
+
(item: QueuedMessage, dir: -1 | 1) => {
|
|
84
|
+
const next = [...queueRef.current]
|
|
85
|
+
const i = next.findIndex(q => q.id === item.id)
|
|
86
|
+
const a = next[i]
|
|
87
|
+
const b = next[i + dir]
|
|
88
|
+
if (i < 0 || !a || !b) return
|
|
89
|
+
next[i] = b
|
|
90
|
+
next[i + dir] = a
|
|
91
|
+
setQueue(next)
|
|
92
|
+
},
|
|
93
|
+
[setQueue],
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
supported,
|
|
98
|
+
streaming: status === 'streaming',
|
|
99
|
+
canStop,
|
|
100
|
+
stop,
|
|
101
|
+
queue,
|
|
102
|
+
setQueue,
|
|
103
|
+
enqueue,
|
|
104
|
+
remove,
|
|
105
|
+
move,
|
|
106
|
+
announcement,
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
3
|
+
* `registry/default/input-message.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
4
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import { useCallback, useRef, useState } from 'react'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The pixel height of a collapsible region, for motion to animate to. An
|
|
13
|
+
* `"auto"` target resolves from the transformed size, so under a scaled
|
|
14
|
+
* ancestor the region would overshoot and snap back. Put the ref on the
|
|
15
|
+
* region's content: the height is its clipping parent's `scrollHeight`, and
|
|
16
|
+
* observing the child keeps the observer out of a loop with the animation.
|
|
17
|
+
*/
|
|
18
|
+
export function useRegionHeight() {
|
|
19
|
+
const observer = useRef<ResizeObserver | null>(null)
|
|
20
|
+
const [height, setHeight] = useState<number | null>(null)
|
|
21
|
+
const ref = useCallback((el: HTMLElement | null) => {
|
|
22
|
+
observer.current?.disconnect()
|
|
23
|
+
observer.current = null
|
|
24
|
+
if (!el) return
|
|
25
|
+
const sync = () => {
|
|
26
|
+
const next = el.parentElement?.scrollHeight ?? el.offsetHeight
|
|
27
|
+
if (next > 0) setHeight(next)
|
|
28
|
+
}
|
|
29
|
+
sync()
|
|
30
|
+
observer.current = new ResizeObserver(sync)
|
|
31
|
+
observer.current.observe(el)
|
|
32
|
+
}, [])
|
|
33
|
+
return [ref, height] as const
|
|
34
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import FailureState from './index'
|
|
2
|
+
import { PROFILES } from '../../../mock/mock'
|
|
3
|
+
import { CRASH_STDERR } from '../../../mock/mock-extras'
|
|
4
|
+
|
|
5
|
+
# Banners
|
|
6
|
+
|
|
7
|
+
Over the transcript: what happened and the one action that gets the session going. Output folds the crash's stderr open.
|
|
8
|
+
|
|
9
|
+
<div className="flex w-full max-w-[720px] flex-col gap-3">
|
|
10
|
+
<FailureState kind="cli-crashed" exitCode={1} stderr={CRASH_STDERR} />
|
|
11
|
+
<FailureState kind="reconnecting" attempt={2} maxAttempts={5} retryIn="4s" />
|
|
12
|
+
<FailureState kind="rate-limited" profile={PROFILES[1]} resetsIn="at 14:05" alternatives={[PROFILES[0], PROFILES[3]]} />
|
|
13
|
+
<FailureState kind="offline" />
|
|
14
|
+
<FailureState kind="auth-expired" profile={PROFILES[2]} onDismiss={() => {}} />
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
# Crashed
|
|
18
|
+
|
|
19
|
+
As a page, where the transcript would be: the last of claude's stderr and Restart.
|
|
20
|
+
|
|
21
|
+
<div className="h-[520px] w-full rounded-xl border border-border bg-background">
|
|
22
|
+
<FailureState variant="page" kind="cli-crashed" exitCode="SIGABRT" stderr={CRASH_STDERR} />
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
# Rate limited
|
|
26
|
+
|
|
27
|
+
The profile's meters, when it resets, and the profiles with room.
|
|
28
|
+
|
|
29
|
+
<div className="h-[420px] w-full rounded-xl border border-border bg-background">
|
|
30
|
+
<FailureState variant="page" kind="rate-limited" profile={PROFILES[1]} resetsIn="in 1h 12m" alternatives={[PROFILES[0], PROFILES[2], PROFILES[3]]} />
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
# Reconnecting, offline, signed out
|
|
34
|
+
|
|
35
|
+
<div className="grid w-full gap-3 @3xl:grid-cols-3">
|
|
36
|
+
<div className="h-[300px] rounded-xl border border-border bg-background">
|
|
37
|
+
<FailureState variant="page" kind="reconnecting" attempt={3} maxAttempts={5} retryIn="8s" />
|
|
38
|
+
</div>
|
|
39
|
+
<div className="h-[300px] rounded-xl border border-border bg-background">
|
|
40
|
+
<FailureState variant="page" kind="offline" />
|
|
41
|
+
</div>
|
|
42
|
+
<div className="h-[300px] rounded-xl border border-border bg-background">
|
|
43
|
+
<FailureState variant="page" kind="auth-expired" profile={PROFILES[1]} />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
# Light and dark
|
|
48
|
+
|
|
49
|
+
<div className="flex w-full max-w-[720px] flex-col gap-3">
|
|
50
|
+
<div className="light flex flex-col gap-3 rounded-xl border border-border bg-background p-4 text-foreground">
|
|
51
|
+
<FailureState kind="cli-crashed" exitCode={1} stderr={CRASH_STDERR} />
|
|
52
|
+
<FailureState kind="rate-limited" profile={PROFILES[1]} resetsIn="at 14:05" alternatives={[PROFILES[0]]} />
|
|
53
|
+
</div>
|
|
54
|
+
<div className="dark flex flex-col gap-3 rounded-xl border border-border bg-background p-4 text-foreground">
|
|
55
|
+
<FailureState kind="cli-crashed" exitCode={1} stderr={CRASH_STDERR} />
|
|
56
|
+
<FailureState kind="rate-limited" profile={PROFILES[1]} resetsIn="at 14:05" alternatives={[PROFILES[0]]} />
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|