@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,255 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
PaneSection2,
|
|
8
|
+
IconAction2
|
|
9
|
+
} from "./chunk-eqajdxn8.js";
|
|
10
|
+
import {
|
|
11
|
+
RunningGlyph2
|
|
12
|
+
} from "./chunk-ejtknc0w.js";
|
|
13
|
+
|
|
14
|
+
// blocks/panes/pr-pane/index.tsx
|
|
15
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
16
|
+
import Accordion from "@justanarthur/modo-ui/components/containers/accordion";
|
|
17
|
+
import Badge from "@justanarthur/modo-ui/components/data-display/badge";
|
|
18
|
+
import Switch from "@justanarthur/modo-ui/components/inputs/switch";
|
|
19
|
+
import Code from "@justanarthur/modo-ui/primitives/content/code";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
/*!
|
|
22
|
+
* Local addition: the side pane's Pull request — the session's PR with its
|
|
23
|
+
* CI checks, review comments, auto-fix and the merge.
|
|
24
|
+
*/
|
|
25
|
+
function CheckGlyph({ status }) {
|
|
26
|
+
const Done = useIcon2("circle-check");
|
|
27
|
+
const Failed = useIcon2("circle-x");
|
|
28
|
+
if (status === "running")
|
|
29
|
+
return /* @__PURE__ */ jsx(RunningGlyph2, {
|
|
30
|
+
size: 14
|
|
31
|
+
});
|
|
32
|
+
if (status === "success")
|
|
33
|
+
return /* @__PURE__ */ jsx(Done, {
|
|
34
|
+
size: 14,
|
|
35
|
+
strokeWidth: 1.5,
|
|
36
|
+
className: "shrink-0 text-status-success"
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ jsx(Failed, {
|
|
39
|
+
size: 14,
|
|
40
|
+
strokeWidth: 1.5,
|
|
41
|
+
className: "shrink-0 text-status-error"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function CheckItem({
|
|
45
|
+
check,
|
|
46
|
+
index,
|
|
47
|
+
onOpenLog,
|
|
48
|
+
onFix
|
|
49
|
+
}) {
|
|
50
|
+
const Fix = useIcon2("wrench");
|
|
51
|
+
const Open = useIcon2("external-link");
|
|
52
|
+
return /* @__PURE__ */ jsxs(Accordion.Item, {
|
|
53
|
+
value: check.name,
|
|
54
|
+
index,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(Accordion.Trigger, {
|
|
57
|
+
className: "px-2",
|
|
58
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
59
|
+
className: "flex min-w-0 items-center gap-2",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(CheckGlyph, {
|
|
62
|
+
status: check.status
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: "shrink-0",
|
|
66
|
+
children: check.name
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx("span", {
|
|
69
|
+
className: "min-w-0 flex-1 truncate text-right text-caption weight-normal text-muted-foreground",
|
|
70
|
+
children: check.detail
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsx(Accordion.Content, {
|
|
76
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: "flex flex-col gap-2",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Code, {
|
|
80
|
+
language: "plaintext",
|
|
81
|
+
children: check.log
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "flex items-center justify-end gap-1",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsx(Button, {
|
|
87
|
+
variant: "ghost",
|
|
88
|
+
size: "compact",
|
|
89
|
+
trailingIcon: Open,
|
|
90
|
+
onClick: () => onOpenLog?.(check),
|
|
91
|
+
children: "Full log"
|
|
92
|
+
}),
|
|
93
|
+
check.status === "failed" && /* @__PURE__ */ jsx(Button, {
|
|
94
|
+
variant: "secondary",
|
|
95
|
+
size: "compact",
|
|
96
|
+
leadingIcon: Fix,
|
|
97
|
+
onClick: () => onFix?.(check),
|
|
98
|
+
children: "Ask Claude to fix"
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function PullRequestPane2({
|
|
109
|
+
pr,
|
|
110
|
+
defaultAutoFix = true,
|
|
111
|
+
onAutoFixChange,
|
|
112
|
+
onRerun,
|
|
113
|
+
onOpenLog,
|
|
114
|
+
onFix,
|
|
115
|
+
onOpenOnGitHub,
|
|
116
|
+
onMerge
|
|
117
|
+
}) {
|
|
118
|
+
const Open = useIcon2("external-link");
|
|
119
|
+
const Rerun = useIcon2("rotate-ccw");
|
|
120
|
+
const Icon = useIcon2("git-pull-request");
|
|
121
|
+
const passed = pr.checks.filter((c) => c.status === "success").length;
|
|
122
|
+
const failing = pr.checks.filter((c) => c.status === "failed").length;
|
|
123
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
className: "flex flex-col gap-2",
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsxs("div", {
|
|
127
|
+
className: "flex flex-col gap-1 px-2 pt-2",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsxs("div", {
|
|
130
|
+
className: "flex items-start gap-2",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
133
|
+
size: 16,
|
|
134
|
+
strokeWidth: 1.5,
|
|
135
|
+
className: "mt-0.5 shrink-0 text-muted-foreground"
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ jsx("span", {
|
|
138
|
+
className: "min-w-0 flex-1 text-body weight-medium text-foreground",
|
|
139
|
+
children: pr.title
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ jsxs("div", {
|
|
144
|
+
className: "flex min-w-0 items-center gap-2 pl-6 text-caption text-muted-foreground",
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
147
|
+
size: "compact",
|
|
148
|
+
color: "green",
|
|
149
|
+
className: "shrink-0",
|
|
150
|
+
children: "Open"
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ jsxs("span", {
|
|
153
|
+
className: "shrink-0 tabular-nums",
|
|
154
|
+
children: [
|
|
155
|
+
"#",
|
|
156
|
+
pr.number
|
|
157
|
+
]
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ jsxs("span", {
|
|
160
|
+
className: "min-w-0 truncate font-mono",
|
|
161
|
+
children: [
|
|
162
|
+
pr.branch,
|
|
163
|
+
" → ",
|
|
164
|
+
pr.base
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ jsx(PaneSection2, {
|
|
172
|
+
title: "Checks",
|
|
173
|
+
meta: `${passed} of ${pr.checks.length} passed`,
|
|
174
|
+
actions: /* @__PURE__ */ jsx(IconAction2, {
|
|
175
|
+
icon: Rerun,
|
|
176
|
+
label: "Re-run failed",
|
|
177
|
+
onClick: onRerun
|
|
178
|
+
}),
|
|
179
|
+
children: /* @__PURE__ */ jsx(Accordion.Group, {
|
|
180
|
+
type: "multiple",
|
|
181
|
+
highlight: "trigger",
|
|
182
|
+
defaultValue: pr.checks.filter((c) => c.status === "failed").map((c) => c.name),
|
|
183
|
+
className: "w-full max-w-none",
|
|
184
|
+
children: pr.checks.map((check, i) => /* @__PURE__ */ jsx(CheckItem, {
|
|
185
|
+
check,
|
|
186
|
+
index: i,
|
|
187
|
+
onOpenLog,
|
|
188
|
+
onFix
|
|
189
|
+
}, check.name))
|
|
190
|
+
})
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ jsx(PaneSection2, {
|
|
193
|
+
title: "Reviews",
|
|
194
|
+
meta: `${pr.reviews.length} comments`,
|
|
195
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
196
|
+
className: "m-0 flex list-none flex-col gap-2 p-0 px-2 pb-1",
|
|
197
|
+
children: pr.reviews.map((review) => /* @__PURE__ */ jsxs("li", {
|
|
198
|
+
className: "flex min-w-0 flex-col",
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ jsxs("span", {
|
|
201
|
+
className: "flex min-w-0 gap-2 text-caption text-muted-foreground",
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ jsx("span", {
|
|
204
|
+
className: "shrink-0 weight-medium text-foreground",
|
|
205
|
+
children: review.author
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ jsx("span", {
|
|
208
|
+
className: "min-w-0 truncate font-mono",
|
|
209
|
+
children: review.where
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ jsx("span", {
|
|
214
|
+
className: "text-body text-foreground",
|
|
215
|
+
children: review.body
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
}, review.where))
|
|
219
|
+
})
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ jsx("div", {
|
|
222
|
+
children: /* @__PURE__ */ jsx(Switch, {
|
|
223
|
+
trackSide: "end",
|
|
224
|
+
label: "Auto-fix",
|
|
225
|
+
description: "Watch CI, fix failures and answer review comments in this session",
|
|
226
|
+
defaultChecked: defaultAutoFix,
|
|
227
|
+
onCheckedChange: onAutoFixChange
|
|
228
|
+
})
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ jsxs("div", {
|
|
231
|
+
className: "flex items-center gap-2 px-2 pt-2",
|
|
232
|
+
children: [
|
|
233
|
+
/* @__PURE__ */ jsx("span", {
|
|
234
|
+
className: "min-w-0 flex-1 truncate text-caption text-muted-foreground",
|
|
235
|
+
children: failing > 0 ? `${failing} failing check blocks the merge` : "Ready to merge"
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ jsx(Button, {
|
|
238
|
+
variant: "tertiary",
|
|
239
|
+
size: "compact",
|
|
240
|
+
trailingIcon: Open,
|
|
241
|
+
onClick: onOpenOnGitHub,
|
|
242
|
+
children: "GitHub"
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ jsx(Button, {
|
|
245
|
+
size: "compact",
|
|
246
|
+
disabled: failing > 0,
|
|
247
|
+
onClick: onMerge,
|
|
248
|
+
children: "Merge"
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
export { PullRequestPane2 };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/conversation/reasoning/index.tsx
|
|
4
|
+
import Accordion from "@justanarthur/modo-ui/components/containers/accordion";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
/*!
|
|
7
|
+
* Local addition (not part of Fluid Functionalism): a model's reasoning,
|
|
8
|
+
* folded to one "Thought for 8s" row on an Accordion. Generalised from the AI
|
|
9
|
+
* app's transcript.
|
|
10
|
+
*/
|
|
11
|
+
function Reasoning2({ duration, children, defaultOpen = false }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Accordion, {
|
|
13
|
+
type: "single",
|
|
14
|
+
collapsible: true,
|
|
15
|
+
defaultValue: defaultOpen ? "reasoning" : undefined,
|
|
16
|
+
className: "-mx-3 w-auto max-w-none",
|
|
17
|
+
children: /* @__PURE__ */ jsxs(Accordion.Item, {
|
|
18
|
+
value: "reasoning",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsxs(Accordion.Trigger, {
|
|
21
|
+
children: [
|
|
22
|
+
"Thought for ",
|
|
23
|
+
duration
|
|
24
|
+
]
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(Accordion.Content, {
|
|
27
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
28
|
+
className: "flex flex-col gap-2 border-l border-border pl-[var(--space-3)] text-body text-muted-foreground",
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var reasoning_default = Reasoning2;
|
|
37
|
+
|
|
38
|
+
export { Reasoning2, reasoning_default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MemoryFile2 } from "./chunk-jkkdq1mh.js";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
interface MemoryProps2 {
|
|
4
|
+
/** The profile's memory files, without the MEMORY.md index (it is built from them). */
|
|
5
|
+
files: MemoryFile2[];
|
|
6
|
+
/** The config dir being edited: memory lives in its `memory` folder. */
|
|
7
|
+
configDir: string;
|
|
8
|
+
/** Whether sessions save memories on their own at first. Defaults to `true`. */
|
|
9
|
+
autoMemory?: boolean;
|
|
10
|
+
/** Called when the auto memory switch flips. */
|
|
11
|
+
onAutoMemoryChange?: (enabled: boolean) => void;
|
|
12
|
+
/** File names (`MEMORY.md`, or a file's `name`) whose rows start open. Defaults to `[]`. */
|
|
13
|
+
defaultOpen?: string[];
|
|
14
|
+
/** Called with the file's name (`MEMORY.md` for the index) when an open file's Edit is pressed. */
|
|
15
|
+
onEdit?: (name: string) => void;
|
|
16
|
+
/** Called when an open file's Forget is pressed. */
|
|
17
|
+
onForget?: (file: MemoryFile2) => void;
|
|
18
|
+
}
|
|
19
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
20
|
+
/**
|
|
21
|
+
* What a profile remembers across sessions, one fact per file.
|
|
22
|
+
*
|
|
23
|
+
* A switch on top says whether sessions save and update memories as they
|
|
24
|
+
* learn. Below it, MEMORY.md (the index loaded into every session, with its
|
|
25
|
+
* entry count) and then each file with its description and type. Press a row
|
|
26
|
+
* and it lifts into a card with the file's contents and where it lives; a
|
|
27
|
+
* memory file can be edited or forgotten there.
|
|
28
|
+
*
|
|
29
|
+
* @example {@include ./examples.mdx}
|
|
30
|
+
*/
|
|
31
|
+
declare function Memory2({ files, configDir, autoMemory, onAutoMemoryChange, defaultOpen, onEdit, onForget }: MemoryProps2): Element_12xgc;
|
|
32
|
+
export { MemoryProps2, Memory2 };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
paceOf2,
|
|
5
|
+
duration2,
|
|
6
|
+
percent2,
|
|
7
|
+
VERDICT_TEXT2
|
|
8
|
+
} from "./chunk-1f96cz69.js";
|
|
9
|
+
import {
|
|
10
|
+
PaceBar2
|
|
11
|
+
} from "./chunk-04a497rr.js";
|
|
12
|
+
import {
|
|
13
|
+
PaneSection2
|
|
14
|
+
} from "./chunk-eqajdxn8.js";
|
|
15
|
+
|
|
16
|
+
// blocks/panes/usage-pane/index.tsx
|
|
17
|
+
import Badge from "@justanarthur/modo-ui/components/data-display/badge";
|
|
18
|
+
import { useSize } from "@justanarthur/modo-ui/lib/size-context";
|
|
19
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
/*!
|
|
22
|
+
* Local addition: the side pane's extensions slot, filled with usage —
|
|
23
|
+
* every profile's limits as pace bars, read against the time until each
|
|
24
|
+
* resets.
|
|
25
|
+
*/
|
|
26
|
+
var VERDICT_WORD = { free: "on pace", watch: "only just", tight: "too fast" };
|
|
27
|
+
function UsagePane2({ profiles }) {
|
|
28
|
+
const size = useSize();
|
|
29
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "flex flex-col gap-2",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "flex items-center gap-2 px-2 pt-2",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: "min-w-0 flex-1 text-caption text-muted-foreground",
|
|
37
|
+
children: "From your ai-app MCP server. The tick is where an even spend would be by now."
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
40
|
+
size: "compact",
|
|
41
|
+
color: "violet",
|
|
42
|
+
className: "shrink-0",
|
|
43
|
+
children: "Extension"
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}),
|
|
47
|
+
profiles.map(paceOf2).map(({ profile, limits, binding }) => /* @__PURE__ */ jsx(PaneSection2, {
|
|
48
|
+
title: profile.name,
|
|
49
|
+
meta: profile.plan,
|
|
50
|
+
actions: /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: cn("pr-1 text-caption", VERDICT_TEXT2[binding.verdict]),
|
|
52
|
+
children: VERDICT_WORD[binding.verdict]
|
|
53
|
+
}),
|
|
54
|
+
children: limits.map((pace) => /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: cn("flex items-center gap-2 px-2", size.control, size.text),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "min-w-0 flex-1 truncate text-foreground",
|
|
59
|
+
children: pace.limit.label
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx(PaceBar2, {
|
|
62
|
+
pace,
|
|
63
|
+
className: "w-16 shrink-0"
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsxs("span", {
|
|
66
|
+
className: "w-24 shrink-0 whitespace-nowrap text-right text-caption tabular-nums text-muted-foreground",
|
|
67
|
+
children: [
|
|
68
|
+
percent2(pace.limit.value),
|
|
69
|
+
" · ",
|
|
70
|
+
duration2(pace.limit.resetsInHours)
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
}, pace.limit.label))
|
|
75
|
+
}, profile.id))
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
export { UsagePane2 };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Profile2 } from "./chunk-jkkdq1mh.js";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
import { JSX as JSX_1kxb } from "react";
|
|
4
|
+
type OnboardingStep2 = "kind" | "details" | "sign-in" | "done";
|
|
5
|
+
/** The model each Claude tier maps to on a compatible provider (`ANTHROPIC_DEFAULT_<TIER>_MODEL`). */
|
|
6
|
+
interface ModelMapping2 {
|
|
7
|
+
opus: string;
|
|
8
|
+
sonnet: string;
|
|
9
|
+
haiku: string;
|
|
10
|
+
}
|
|
11
|
+
/** What the form holds while a profile is being added. */
|
|
12
|
+
interface ProfileDraft2 {
|
|
13
|
+
kind: Profile2["provider"];
|
|
14
|
+
name: string;
|
|
15
|
+
configDir: string;
|
|
16
|
+
baseUrl: string;
|
|
17
|
+
/** The env var the API key is read from; the key itself never enters the app. */
|
|
18
|
+
apiKeyEnv: string;
|
|
19
|
+
models: ModelMapping2;
|
|
20
|
+
}
|
|
21
|
+
/** Where the sign-in (or, for a compatible provider, the test request) stands. */
|
|
22
|
+
interface SignInStatus2 {
|
|
23
|
+
state: "idle" | "waiting" | "success" | "failed";
|
|
24
|
+
/** The CLI's output so far, one string per line (ANSI colors read). */
|
|
25
|
+
log: string[];
|
|
26
|
+
/** The sign-in page `claude login` opened, to open again or copy. */
|
|
27
|
+
url?: string;
|
|
28
|
+
/** The signed-in account, once it succeeded. */
|
|
29
|
+
account?: string;
|
|
30
|
+
/** The account's plan, once it succeeded. */
|
|
31
|
+
plan?: string;
|
|
32
|
+
/** Why it failed. */
|
|
33
|
+
error?: string;
|
|
34
|
+
}
|
|
35
|
+
interface ProfileOnboardingPanelProps2 {
|
|
36
|
+
/** The step shown (controlled). Pair with `onStepChange`. */
|
|
37
|
+
step?: OnboardingStep2;
|
|
38
|
+
/** The step it starts on. Defaults to `'kind'`. */
|
|
39
|
+
defaultStep?: OnboardingStep2;
|
|
40
|
+
/** Called when Back or Continue moves to another step. */
|
|
41
|
+
onStepChange?: (step: OnboardingStep2) => void;
|
|
42
|
+
/** What the form starts with: a kind, a name, a provider's base URL and models. */
|
|
43
|
+
defaultDraft?: Partial<ProfileDraft2>;
|
|
44
|
+
/** Names already taken, so a clash is caught before the sign-in. */
|
|
45
|
+
taken?: string[];
|
|
46
|
+
/** Where the sign-in stands; the app runs `claude login` (or the test request) and reports back. Defaults to idle. */
|
|
47
|
+
signIn?: SignInStatus2;
|
|
48
|
+
/** Called on entering the sign-in step, with what the form holds: start `claude login` or the test request here. */
|
|
49
|
+
onSignIn?: (draft: ProfileDraft2) => void;
|
|
50
|
+
/** Called with the new profile when Add profile is pressed on the last step. */
|
|
51
|
+
onComplete?: (profile: Profile2) => void;
|
|
52
|
+
/** Called when Cancel is pressed on the first step. */
|
|
53
|
+
onCancel?: () => void;
|
|
54
|
+
/** Classes for the root. */
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
58
|
+
/** The stepper's body, without the Dialog: for a page of its own, or the docs. */
|
|
59
|
+
declare function ProfileOnboardingPanel2({ step, defaultStep, onStepChange, defaultDraft, taken, signIn, onSignIn, onComplete, onCancel, className }: ProfileOnboardingPanelProps2): Element_12xgc;
|
|
60
|
+
interface ProfileOnboardingProps2 {
|
|
61
|
+
/** The control that opens it, such as the switcher's "Add profile" button. */
|
|
62
|
+
trigger?: ReactElement;
|
|
63
|
+
/** Controlled open state. */
|
|
64
|
+
open?: boolean;
|
|
65
|
+
/** Initial open state, for an uncontrolled dialog. Defaults to `false`. */
|
|
66
|
+
defaultOpen?: boolean;
|
|
67
|
+
/** Called when the dialog opens or closes. */
|
|
68
|
+
onOpenChange?: (open: boolean) => void;
|
|
69
|
+
/** The step shown (controlled). Pair with `onStepChange`. */
|
|
70
|
+
step?: OnboardingStep2;
|
|
71
|
+
/** The step it starts on. Defaults to `'kind'`. */
|
|
72
|
+
defaultStep?: OnboardingStep2;
|
|
73
|
+
/** Called when Back or Continue moves to another step. */
|
|
74
|
+
onStepChange?: (step: OnboardingStep2) => void;
|
|
75
|
+
/** What the form starts with: a kind, a name, a provider's base URL and models. */
|
|
76
|
+
defaultDraft?: Partial<ProfileDraft2>;
|
|
77
|
+
/** Names already taken, so a clash is caught before the sign-in. */
|
|
78
|
+
taken?: string[];
|
|
79
|
+
/** Where the sign-in stands; the app runs `claude login` (or the test request) and reports back. Defaults to idle. */
|
|
80
|
+
signIn?: SignInStatus2;
|
|
81
|
+
/** Called on entering the sign-in step, with what the form holds: start `claude login` or the test request here. */
|
|
82
|
+
onSignIn?: (draft: ProfileDraft2) => void;
|
|
83
|
+
/** Called with the new profile when Add profile is pressed on the last step; the dialog closes. */
|
|
84
|
+
onComplete?: (profile: Profile2) => void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Adds a profile: a Claude account in a config dir of its own, or an
|
|
88
|
+
* Anthropic-compatible provider behind a base URL.
|
|
89
|
+
*
|
|
90
|
+
* Four steps, shown along the top. Pick the kind; name it and give it a
|
|
91
|
+
* config dir (or a base URL, the env var that holds the API key, and which
|
|
92
|
+
* model each Claude tier maps to); sign in; done. Entering the sign-in step
|
|
93
|
+
* calls `onSignIn`, where the app starts `claude login` under the new
|
|
94
|
+
* `CLAUDE_CONFIG_DIR` (or a test request against the provider) and feeds
|
|
95
|
+
* its progress back through `signIn`: the CLI's output scrolls in a log,
|
|
96
|
+
* "waiting for the browser" with the link to open again or copy, then
|
|
97
|
+
* success with the account and plan, or the error and a retry. Continue
|
|
98
|
+
* waits for success. The last step hands the new profile to `onComplete`.
|
|
99
|
+
* The dialog grows out of its trigger; `ProfileOnboarding.Panel` is the same
|
|
100
|
+
* stepper without it.
|
|
101
|
+
*
|
|
102
|
+
* Statics:
|
|
103
|
+
* - `ProfileOnboarding.Panel` — the stepper on its own: the same props, minus the dialog's.
|
|
104
|
+
*
|
|
105
|
+
* @example {@include ./examples.mdx}
|
|
106
|
+
*/
|
|
107
|
+
declare const ProfileOnboarding2: (({ trigger, open, defaultOpen, onOpenChange, onComplete,...panel }: ProfileOnboardingProps2) => Element_12xgc) & {
|
|
108
|
+
Panel: typeof ProfileOnboardingPanel2;
|
|
109
|
+
};
|
|
110
|
+
export { OnboardingStep2, ModelMapping2, ProfileDraft2, SignInStatus2, ProfileOnboardingPanelProps2, ProfileOnboardingPanel2, ProfileOnboardingProps2, ProfileOnboarding2 };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Section2,
|
|
5
|
+
Group2,
|
|
6
|
+
Toggles2
|
|
7
|
+
} from "./chunk-5meda998.js";
|
|
8
|
+
|
|
9
|
+
// blocks/settings/notifications/index.tsx
|
|
10
|
+
import Switch from "@justanarthur/modo-ui/components/inputs/switch";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
/*!
|
|
13
|
+
* Local addition: the settings screen's notifications section — captioned
|
|
14
|
+
* runs of switches for what the app tells you and how.
|
|
15
|
+
*/
|
|
16
|
+
function Notifications2({ groups, onChange }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Section2, {
|
|
18
|
+
title: "Notifications",
|
|
19
|
+
lead: "How the app gets your attention while sessions run in the background.",
|
|
20
|
+
children: groups.map((group) => /* @__PURE__ */ jsx(Group2, {
|
|
21
|
+
title: group.title,
|
|
22
|
+
children: /* @__PURE__ */ jsx(Toggles2, {
|
|
23
|
+
label: group.title,
|
|
24
|
+
children: group.settings.map((setting) => /* @__PURE__ */ jsx(Switch, {
|
|
25
|
+
label: setting.label,
|
|
26
|
+
description: setting.description,
|
|
27
|
+
defaultChecked: setting.enabled,
|
|
28
|
+
onCheckedChange: (enabled) => onChange?.(setting.id, enabled)
|
|
29
|
+
}, setting.id))
|
|
30
|
+
})
|
|
31
|
+
}, group.title))
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
export { Notifications2 };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSX as JSX_1kxb } from "react";
|
|
2
|
+
interface RecapProps2 {
|
|
3
|
+
/** Two or three sentences: what is now true, what is not done or not verified. */
|
|
4
|
+
recap: string;
|
|
5
|
+
/** The one decision left to you, if any. */
|
|
6
|
+
ask?: string;
|
|
7
|
+
/** One or two answers to `ask`; the first is the recommendation. Defaults to `[]`. */
|
|
8
|
+
actions?: string[];
|
|
9
|
+
/** Called with the picked answer. */
|
|
10
|
+
onAction?: (label: string) => void;
|
|
11
|
+
}
|
|
12
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
13
|
+
/**
|
|
14
|
+
* Where a piece of work landed: what changed, what is left, and the one
|
|
15
|
+
* decision that waits on you.
|
|
16
|
+
*
|
|
17
|
+
* The recap reads in the muted color on the muted fill. With an `ask`, the
|
|
18
|
+
* question follows in medium weight with up to two answers beside it, the
|
|
19
|
+
* recommendation first as the primary button. Without one it is the recap
|
|
20
|
+
* alone: nothing waits on you.
|
|
21
|
+
*
|
|
22
|
+
* @example {@include ./examples.mdx}
|
|
23
|
+
*/
|
|
24
|
+
declare function Recap2({ recap, ask, actions, onAction }: RecapProps2): Element_12xgc;
|
|
25
|
+
export { RecapProps2, Recap2 };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// components/conversation/chapter-nav/index.tsx
|
|
8
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
9
|
+
import List, { LIST_POPOVER } from "@justanarthur/modo-ui/components/data-display/list";
|
|
10
|
+
import ChoiceList from "@justanarthur/modo-ui/components/inputs/choice-list";
|
|
11
|
+
import Popover from "@justanarthur/modo-ui/components/overlays/popover";
|
|
12
|
+
import { useControllableState } from "@justanarthur/modo-ui/lib/use-controllable-state";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
/*!
|
|
15
|
+
* Local addition (not part of Fluid Functionalism): chapters for a long
|
|
16
|
+
* conversation. A ghost icon button opens a Popover with the chapters as a
|
|
17
|
+
* ChoiceList; picking one scrolls its break, a titled hairline, into view.
|
|
18
|
+
* Generalised from the AI app's transcript.
|
|
19
|
+
*/
|
|
20
|
+
function ChapterBreak2({ title, id }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
id,
|
|
23
|
+
className: "flex scroll-mt-4 items-center gap-3 pt-2",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "shrink-0 text-caption weight-medium text-muted-foreground",
|
|
27
|
+
children: title
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: "h-px flex-1 bg-border"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
var ChapterNav2 = Object.assign(function ChapterNav({ chapters, defaultValue, onValueChange }) {
|
|
37
|
+
const [current, setCurrent] = useControllableState(undefined, defaultValue ?? chapters[chapters.length - 1]?.id ?? "", onValueChange);
|
|
38
|
+
const ListTree = useIcon2("list-tree");
|
|
39
|
+
const pick = (id) => {
|
|
40
|
+
setCurrent(id);
|
|
41
|
+
document.getElementById(id)?.scrollIntoView({ block: "start" });
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
46
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
47
|
+
variant: "ghost",
|
|
48
|
+
size: "icon-compact",
|
|
49
|
+
"aria-label": "Chapters",
|
|
50
|
+
children: /* @__PURE__ */ jsx(ListTree, {})
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx(Popover.Content, {
|
|
54
|
+
side: "bottom",
|
|
55
|
+
align: "end",
|
|
56
|
+
sideOffset: 8,
|
|
57
|
+
className: LIST_POPOVER,
|
|
58
|
+
children: /* @__PURE__ */ jsx(List.Section, {
|
|
59
|
+
title: "Chapters",
|
|
60
|
+
children: /* @__PURE__ */ jsx(ChoiceList, {
|
|
61
|
+
label: "Chapters",
|
|
62
|
+
value: current,
|
|
63
|
+
onValueChange: pick,
|
|
64
|
+
options: chapters.map((chapter, i) => ({
|
|
65
|
+
value: chapter.id,
|
|
66
|
+
label: chapter.title,
|
|
67
|
+
content: /* @__PURE__ */ jsxs("span", {
|
|
68
|
+
className: "flex min-w-0 flex-1 gap-2",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", {
|
|
71
|
+
className: "w-4 shrink-0 text-right text-caption tabular-nums text-muted-foreground",
|
|
72
|
+
children: i + 1
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsxs("span", {
|
|
75
|
+
className: "flex min-w-0 flex-col",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: "truncate text-body text-foreground",
|
|
79
|
+
children: chapter.title
|
|
80
|
+
}),
|
|
81
|
+
chapter.detail && /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "truncate text-caption text-muted-foreground",
|
|
83
|
+
children: chapter.detail
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
})
|
|
89
|
+
}))
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
}, { Break: ChapterBreak2 });
|
|
96
|
+
var chapter_nav_default = ChapterNav2;
|
|
97
|
+
|
|
98
|
+
export { ChapterBreak2, ChapterNav2, chapter_nav_default };
|