@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,26 @@
|
|
|
1
|
+
import McpServers from './index'
|
|
2
|
+
import { MCP_SERVERS } from '../../../mock/mock'
|
|
3
|
+
|
|
4
|
+
# Servers
|
|
5
|
+
|
|
6
|
+
Each server's state with its fix at the row's end. Press a row for its command or URL, env and tools.
|
|
7
|
+
|
|
8
|
+
<div className="@container w-full max-w-3xl">
|
|
9
|
+
<McpServers servers={MCP_SERVERS} configDir="~/.claude-jobiflow" />
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
# Failed and needing auth
|
|
13
|
+
|
|
14
|
+
A failed server shows its error; one needing auth says where it signs in.
|
|
15
|
+
|
|
16
|
+
<div className="@container w-full max-w-3xl">
|
|
17
|
+
<McpServers servers={MCP_SERVERS} configDir="~/.claude-jobiflow" defaultOpen={['postgres', 'linear']} />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
# Narrow
|
|
21
|
+
|
|
22
|
+
Below a medium width, the row fixes fold to their icons.
|
|
23
|
+
|
|
24
|
+
<div className="@container w-[420px] max-w-full">
|
|
25
|
+
<McpServers servers={MCP_SERVERS} configDir="~/.claude-jobiflow" />
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Local addition: the settings screen's MCP servers section — each server's
|
|
3
|
+
* state with its fix at the row's end, opening into its command or URL, env
|
|
4
|
+
* and tools.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use client'
|
|
8
|
+
|
|
9
|
+
import Button from '@justanarthur/modo-ui/components/actions/button'
|
|
10
|
+
import Badge from '@justanarthur/modo-ui/components/data-display/badge'
|
|
11
|
+
import Tooltip from '@justanarthur/modo-ui/components/overlays/tooltip'
|
|
12
|
+
import type { ReactNode } from 'react'
|
|
13
|
+
import { useIcon } from '../../../lib/icons'
|
|
14
|
+
import { CardCode, Details, Facts, Footer, Group, Mono, Row, Section } from '../../../lib/settings-parts'
|
|
15
|
+
import type { McpServer } from '../../../lib/types'
|
|
16
|
+
|
|
17
|
+
const BADGE: Record<McpServer['status'], { color: 'green' | 'amber' | 'red' | 'gray'; label: string }> = {
|
|
18
|
+
connected: { color: 'green', label: 'Connected' },
|
|
19
|
+
'needs-auth': { color: 'amber', label: 'Needs auth' },
|
|
20
|
+
failed: { color: 'red', label: 'Failed' },
|
|
21
|
+
disabled: { color: 'gray', label: 'Disabled' },
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function caption(server: McpServer) {
|
|
25
|
+
if (server.status === 'needs-auth') return `Sign in at ${server.authHost} to load its tools`
|
|
26
|
+
if (server.status === 'failed') return server.error?.split('\n')[0]
|
|
27
|
+
if (server.status === 'disabled') return `${server.transport} · ${server.scope}`
|
|
28
|
+
return `${server.transport} · ${server.scope} · ${server.tools} tools`
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function source(server: McpServer, configDir: string) {
|
|
32
|
+
if (server.scope === 'project') return '.mcp.json'
|
|
33
|
+
if (server.scope === 'plugin') return `the ${server.name} plugin`
|
|
34
|
+
return `${configDir}/.claude.json`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function Fix({ server, onFix }: { server: McpServer; onFix?: () => void }) {
|
|
38
|
+
const Retry = useIcon('refresh-cw')
|
|
39
|
+
const Key = useIcon('key')
|
|
40
|
+
if (server.status !== 'needs-auth' && server.status !== 'failed') return null
|
|
41
|
+
const [Icon, label] = server.status === 'needs-auth' ? [Key, 'Authenticate'] : [Retry, 'Retry']
|
|
42
|
+
const variant = server.status === 'needs-auth' ? 'tertiary' : 'ghost'
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<Button size="compact" variant={variant} leadingIcon={Icon} className="hidden @md:inline-flex" onClick={onFix}>
|
|
46
|
+
{label}
|
|
47
|
+
</Button>
|
|
48
|
+
<Tooltip content={label} side="top">
|
|
49
|
+
<Button
|
|
50
|
+
size="icon-compact"
|
|
51
|
+
variant={variant}
|
|
52
|
+
aria-label={`${label} ${server.name}`}
|
|
53
|
+
className="@md:hidden"
|
|
54
|
+
onClick={onFix}
|
|
55
|
+
>
|
|
56
|
+
<Icon />
|
|
57
|
+
</Button>
|
|
58
|
+
</Tooltip>
|
|
59
|
+
</>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function ServerCard({
|
|
64
|
+
server,
|
|
65
|
+
configDir,
|
|
66
|
+
onEdit,
|
|
67
|
+
onToggle,
|
|
68
|
+
}: {
|
|
69
|
+
server: McpServer
|
|
70
|
+
configDir: string
|
|
71
|
+
onEdit?: () => void
|
|
72
|
+
onToggle?: () => void
|
|
73
|
+
}) {
|
|
74
|
+
const facts: [string, ReactNode][] = [
|
|
75
|
+
[server.transport === 'stdio' ? 'Command' : 'URL', <Mono key="t">{server.target}</Mono>],
|
|
76
|
+
['Env', server.env ? <Mono key="e">{server.env.join(', ')}</Mono> : 'None'],
|
|
77
|
+
]
|
|
78
|
+
if (server.toolNames) {
|
|
79
|
+
const more = server.tools - server.toolNames.length
|
|
80
|
+
facts.push([
|
|
81
|
+
'Tools',
|
|
82
|
+
<Mono key="tools">
|
|
83
|
+
{server.toolNames.join(', ')}
|
|
84
|
+
{more > 0 && `, +${more} more`}
|
|
85
|
+
</Mono>,
|
|
86
|
+
])
|
|
87
|
+
}
|
|
88
|
+
return (
|
|
89
|
+
<>
|
|
90
|
+
{server.status === 'needs-auth' && (
|
|
91
|
+
<p className="m-0 text-body text-foreground">
|
|
92
|
+
Authenticate opens {server.authHost} in your browser. The token is kept in this profile's keychain entry, so
|
|
93
|
+
other profiles sign in on their own.
|
|
94
|
+
</p>
|
|
95
|
+
)}
|
|
96
|
+
{server.error && <CardCode language="txt">{server.error}</CardCode>}
|
|
97
|
+
<Facts items={facts} />
|
|
98
|
+
<Footer source={source(server, configDir)}>
|
|
99
|
+
<Button size="compact" variant="ghost" onClick={onEdit}>
|
|
100
|
+
Edit
|
|
101
|
+
</Button>
|
|
102
|
+
<Button size="compact" variant="ghost" onClick={onToggle}>
|
|
103
|
+
{server.status === 'disabled' ? 'Enable' : 'Disable'}
|
|
104
|
+
</Button>
|
|
105
|
+
</Footer>
|
|
106
|
+
</>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface McpServersProps {
|
|
111
|
+
/** The servers the scope's config lists. */
|
|
112
|
+
servers: McpServer[]
|
|
113
|
+
/** The config dir being edited: where user-scoped servers live. */
|
|
114
|
+
configDir: string
|
|
115
|
+
/** Server names whose rows start open. Defaults to `[]`. */
|
|
116
|
+
defaultOpen?: string[]
|
|
117
|
+
/** Called when "Add server" is pressed. */
|
|
118
|
+
onAdd?: () => void
|
|
119
|
+
/** Called with a needs-auth server when its Authenticate is pressed. */
|
|
120
|
+
onAuthenticate?: (server: McpServer) => void
|
|
121
|
+
/** Called with a failed server when its Retry is pressed. */
|
|
122
|
+
onRetry?: (server: McpServer) => void
|
|
123
|
+
/** Called when an open server's Edit is pressed. */
|
|
124
|
+
onEdit?: (server: McpServer) => void
|
|
125
|
+
/** Called when an open server's Enable or Disable is pressed. */
|
|
126
|
+
onToggle?: (server: McpServer) => void
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The tools the sessions can call: every MCP server in the config dir being
|
|
131
|
+
* edited, with what it needs from you.
|
|
132
|
+
*
|
|
133
|
+
* A row names the server, its transport, scope and tool count, and its state
|
|
134
|
+
* as a badge. A server that needs auth says where it signs in and one that
|
|
135
|
+
* failed shows its error's first line; both keep their fix (Authenticate,
|
|
136
|
+
* Retry) at the row's end, folded to an icon in a narrow window. Press a row
|
|
137
|
+
* and it lifts into a card with the command or URL, the env var names, the
|
|
138
|
+
* tools, and which file the server comes from.
|
|
139
|
+
*
|
|
140
|
+
* @example {@include ./examples.mdx}
|
|
141
|
+
*/
|
|
142
|
+
export default function McpServers({
|
|
143
|
+
servers,
|
|
144
|
+
configDir,
|
|
145
|
+
defaultOpen,
|
|
146
|
+
onAdd,
|
|
147
|
+
onAuthenticate,
|
|
148
|
+
onRetry,
|
|
149
|
+
onEdit,
|
|
150
|
+
onToggle,
|
|
151
|
+
}: McpServersProps) {
|
|
152
|
+
const Plus = useIcon('plus')
|
|
153
|
+
const attention = servers.filter(s => s.status === 'needs-auth' || s.status === 'failed').length
|
|
154
|
+
return (
|
|
155
|
+
<Section
|
|
156
|
+
title="MCP servers"
|
|
157
|
+
lead="Tools the sessions can call. ai-app is this app's own server: it answers permission prompts and serves your extensions."
|
|
158
|
+
actions={
|
|
159
|
+
<Button size="compact" leadingIcon={Plus} onClick={onAdd}>
|
|
160
|
+
Add server
|
|
161
|
+
</Button>
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
<Group
|
|
165
|
+
title="Servers"
|
|
166
|
+
aside={<span className="tabular-nums">{`${servers.length} · ${attention} need you`}</span>}
|
|
167
|
+
>
|
|
168
|
+
<Details label="MCP servers" actions="button" defaultOpen={defaultOpen}>
|
|
169
|
+
{servers.map((server, i) => (
|
|
170
|
+
<Row
|
|
171
|
+
key={server.name}
|
|
172
|
+
value={server.name}
|
|
173
|
+
index={i}
|
|
174
|
+
label={server.name}
|
|
175
|
+
caption={caption(server)}
|
|
176
|
+
meta={
|
|
177
|
+
<Badge size="compact" variant="dot" color={BADGE[server.status].color}>
|
|
178
|
+
{BADGE[server.status].label}
|
|
179
|
+
</Badge>
|
|
180
|
+
}
|
|
181
|
+
action={
|
|
182
|
+
<Fix
|
|
183
|
+
server={server}
|
|
184
|
+
onFix={() => (server.status === 'needs-auth' ? onAuthenticate : onRetry)?.(server)}
|
|
185
|
+
/>
|
|
186
|
+
}
|
|
187
|
+
>
|
|
188
|
+
<ServerCard
|
|
189
|
+
server={server}
|
|
190
|
+
configDir={configDir}
|
|
191
|
+
onEdit={() => onEdit?.(server)}
|
|
192
|
+
onToggle={() => onToggle?.(server)}
|
|
193
|
+
/>
|
|
194
|
+
</Row>
|
|
195
|
+
))}
|
|
196
|
+
</Details>
|
|
197
|
+
</Group>
|
|
198
|
+
</Section>
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type { McpServersProps }
|
|
203
|
+
|
|
204
|
+
export { McpServers }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Memory from './index'
|
|
2
|
+
import { MEMORY } from '../../../mock/mock'
|
|
3
|
+
|
|
4
|
+
# Memory
|
|
5
|
+
|
|
6
|
+
MEMORY.md and each memory file open into their contents.
|
|
7
|
+
|
|
8
|
+
<div className="@container w-full max-w-3xl">
|
|
9
|
+
<Memory files={MEMORY} configDir="~/.claude-jobiflow" />
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
# The index, open
|
|
13
|
+
|
|
14
|
+
<div className="@container w-full max-w-3xl">
|
|
15
|
+
<Memory files={MEMORY} configDir="~/.claude-jobiflow" defaultOpen={['MEMORY.md']} />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
# Auto memory off
|
|
19
|
+
|
|
20
|
+
<div className="@container w-full max-w-3xl">
|
|
21
|
+
<Memory files={MEMORY} configDir="~/.claude-work" autoMemory={false} />
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Local addition: the settings screen's memory section — the auto memory
|
|
3
|
+
* switch, then MEMORY.md and each memory file, opening into its contents.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use client'
|
|
7
|
+
|
|
8
|
+
import Button from '@justanarthur/modo-ui/components/actions/button'
|
|
9
|
+
import Switch from '@justanarthur/modo-ui/components/inputs/switch'
|
|
10
|
+
import { CardCode, Details, Footer, Group, Row, Section, Toggles } from '../../../lib/settings-parts'
|
|
11
|
+
import type { MemoryFile } from '../../../lib/types'
|
|
12
|
+
|
|
13
|
+
function frontmatter(memory: MemoryFile) {
|
|
14
|
+
return `---\nname: ${memory.name}\ndescription: ${memory.description}\ntype: ${memory.type}\n---`
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface MemoryProps {
|
|
18
|
+
/** The profile's memory files, without the MEMORY.md index (it is built from them). */
|
|
19
|
+
files: MemoryFile[]
|
|
20
|
+
/** The config dir being edited: memory lives in its `memory` folder. */
|
|
21
|
+
configDir: string
|
|
22
|
+
/** Whether sessions save memories on their own at first. Defaults to `true`. */
|
|
23
|
+
autoMemory?: boolean
|
|
24
|
+
/** Called when the auto memory switch flips. */
|
|
25
|
+
onAutoMemoryChange?: (enabled: boolean) => void
|
|
26
|
+
/** File names (`MEMORY.md`, or a file's `name`) whose rows start open. Defaults to `[]`. */
|
|
27
|
+
defaultOpen?: string[]
|
|
28
|
+
/** Called with the file's name (`MEMORY.md` for the index) when an open file's Edit is pressed. */
|
|
29
|
+
onEdit?: (name: string) => void
|
|
30
|
+
/** Called when an open file's Forget is pressed. */
|
|
31
|
+
onForget?: (file: MemoryFile) => void
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* What a profile remembers across sessions, one fact per file.
|
|
36
|
+
*
|
|
37
|
+
* A switch on top says whether sessions save and update memories as they
|
|
38
|
+
* learn. Below it, MEMORY.md (the index loaded into every session, with its
|
|
39
|
+
* entry count) and then each file with its description and type. Press a row
|
|
40
|
+
* and it lifts into a card with the file's contents and where it lives; a
|
|
41
|
+
* memory file can be edited or forgotten there.
|
|
42
|
+
*
|
|
43
|
+
* @example {@include ./examples.mdx}
|
|
44
|
+
*/
|
|
45
|
+
export default function Memory({
|
|
46
|
+
files,
|
|
47
|
+
configDir,
|
|
48
|
+
autoMemory = true,
|
|
49
|
+
onAutoMemoryChange,
|
|
50
|
+
defaultOpen,
|
|
51
|
+
onEdit,
|
|
52
|
+
onForget,
|
|
53
|
+
}: MemoryProps) {
|
|
54
|
+
const index = files.map(m => `- [${m.name}](${m.name}.md) — ${m.description}`).join('\n')
|
|
55
|
+
const dir = `${configDir}/memory`
|
|
56
|
+
return (
|
|
57
|
+
<Section
|
|
58
|
+
title="Memory"
|
|
59
|
+
lead="What this profile remembers across sessions, one fact per file. MEMORY.md is the index loaded into every session."
|
|
60
|
+
>
|
|
61
|
+
<Toggles label="Memory">
|
|
62
|
+
<Switch
|
|
63
|
+
label="Auto memory"
|
|
64
|
+
description="Let sessions save and update memories as they learn"
|
|
65
|
+
defaultChecked={autoMemory}
|
|
66
|
+
onCheckedChange={onAutoMemoryChange}
|
|
67
|
+
/>
|
|
68
|
+
</Toggles>
|
|
69
|
+
<Group title="Files" aside={<span className="tabular-nums">{files.length + 1}</span>}>
|
|
70
|
+
<Details label="Memory files" defaultOpen={defaultOpen}>
|
|
71
|
+
<Row
|
|
72
|
+
value="MEMORY.md"
|
|
73
|
+
index={0}
|
|
74
|
+
label="MEMORY.md"
|
|
75
|
+
caption="The index, loaded into every session"
|
|
76
|
+
meta={<span className="text-caption tabular-nums">{files.length} entries</span>}
|
|
77
|
+
>
|
|
78
|
+
<CardCode language="md">{index}</CardCode>
|
|
79
|
+
<Footer source={dir}>
|
|
80
|
+
<Button size="compact" variant="ghost" onClick={() => onEdit?.('MEMORY.md')}>
|
|
81
|
+
Edit
|
|
82
|
+
</Button>
|
|
83
|
+
</Footer>
|
|
84
|
+
</Row>
|
|
85
|
+
{files.map((memory, i) => (
|
|
86
|
+
<Row
|
|
87
|
+
key={memory.name}
|
|
88
|
+
value={memory.name}
|
|
89
|
+
index={i + 1}
|
|
90
|
+
label={`${memory.name}.md`}
|
|
91
|
+
caption={memory.description}
|
|
92
|
+
meta={<span className="text-caption">{memory.type}</span>}
|
|
93
|
+
>
|
|
94
|
+
<CardCode language="md">{frontmatter(memory)}</CardCode>
|
|
95
|
+
<Footer source={dir}>
|
|
96
|
+
<Button size="compact" variant="ghost" onClick={() => onEdit?.(memory.name)}>
|
|
97
|
+
Edit
|
|
98
|
+
</Button>
|
|
99
|
+
<Button size="compact" variant="ghost" onClick={() => onForget?.(memory)}>
|
|
100
|
+
Forget
|
|
101
|
+
</Button>
|
|
102
|
+
</Footer>
|
|
103
|
+
</Row>
|
|
104
|
+
))}
|
|
105
|
+
</Details>
|
|
106
|
+
</Group>
|
|
107
|
+
</Section>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type { MemoryProps }
|
|
112
|
+
|
|
113
|
+
export { Memory }
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Local addition: the settings screen's notifications section — captioned
|
|
3
|
+
* runs of switches for what the app tells you and how.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use client'
|
|
7
|
+
|
|
8
|
+
import Switch from '@justanarthur/modo-ui/components/inputs/switch'
|
|
9
|
+
import { Group, Section, Toggles } from '../../../lib/settings-parts'
|
|
10
|
+
|
|
11
|
+
export interface NotificationSetting {
|
|
12
|
+
id: string
|
|
13
|
+
label: string
|
|
14
|
+
description: string
|
|
15
|
+
enabled: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface NotificationGroup {
|
|
19
|
+
title: string
|
|
20
|
+
settings: NotificationSetting[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface NotificationsProps {
|
|
24
|
+
/** Captioned runs of settings, in order ("Notify me when", "Behavior"). */
|
|
25
|
+
groups: NotificationGroup[]
|
|
26
|
+
/** Called when a setting's switch flips, with its id and new state. */
|
|
27
|
+
onChange?: (id: string, enabled: boolean) => void
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* How the app gets your attention while sessions run in the background.
|
|
32
|
+
*
|
|
33
|
+
* Each run is a captioned list of switches with a description under each
|
|
34
|
+
* label: what to be told about (input needed, a turn finished, CI changed)
|
|
35
|
+
* and how (a sound, keeping the Mac awake).
|
|
36
|
+
*
|
|
37
|
+
* @example {@include ./examples.mdx}
|
|
38
|
+
*/
|
|
39
|
+
export default function Notifications({ groups, onChange }: NotificationsProps) {
|
|
40
|
+
return (
|
|
41
|
+
<Section title="Notifications" lead="How the app gets your attention while sessions run in the background.">
|
|
42
|
+
{groups.map(group => (
|
|
43
|
+
<Group key={group.title} title={group.title}>
|
|
44
|
+
<Toggles label={group.title}>
|
|
45
|
+
{group.settings.map(setting => (
|
|
46
|
+
<Switch
|
|
47
|
+
key={setting.id}
|
|
48
|
+
label={setting.label}
|
|
49
|
+
description={setting.description}
|
|
50
|
+
defaultChecked={setting.enabled}
|
|
51
|
+
onCheckedChange={enabled => onChange?.(setting.id, enabled)}
|
|
52
|
+
/>
|
|
53
|
+
))}
|
|
54
|
+
</Toggles>
|
|
55
|
+
</Group>
|
|
56
|
+
))}
|
|
57
|
+
</Section>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type { NotificationsProps }
|
|
62
|
+
|
|
63
|
+
export { Notifications }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import PermissionRules from './index'
|
|
2
|
+
import { PERMISSIONS } from '../../../mock/mock-config'
|
|
3
|
+
|
|
4
|
+
# Rules
|
|
5
|
+
|
|
6
|
+
Add a rule on the line at the top; hover one to move it to another group or remove it.
|
|
7
|
+
|
|
8
|
+
<div className="w-full max-w-3xl">
|
|
9
|
+
<PermissionRules defaultValue={PERMISSIONS} />
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
# Validation
|
|
13
|
+
|
|
14
|
+
A malformed rule is caught as you type; one already listed names its group.
|
|
15
|
+
|
|
16
|
+
<div className="w-full max-w-3xl">
|
|
17
|
+
<PermissionRules defaultValue={{ mode: 'default', rules: [{ rule: 'Bash(bun run *)', behavior: 'allow', scope: 'project' }], directories: [] }} />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
# Empty
|
|
21
|
+
|
|
22
|
+
Nothing set yet: the default mode, and every group empty.
|
|
23
|
+
|
|
24
|
+
<div className="w-full max-w-3xl">
|
|
25
|
+
<PermissionRules />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
# Light and dark
|
|
29
|
+
|
|
30
|
+
<div className="grid w-full gap-3 @5xl:grid-cols-2">
|
|
31
|
+
<div className="light rounded-xl border border-border bg-background p-6 text-foreground">
|
|
32
|
+
<PermissionRules defaultValue={PERMISSIONS} />
|
|
33
|
+
</div>
|
|
34
|
+
<div className="dark rounded-xl border border-border bg-background p-6 text-foreground">
|
|
35
|
+
<PermissionRules defaultValue={PERMISSIONS} />
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|