@justanarthur/modo-ui-ai 0.0.0-stage → 0.3.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 +164 -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 +651 -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 +206 -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 +50 -0
- package/blocks/dialogs/command-palette/index.tsx +239 -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 +23 -0
- package/blocks/panes/usage-pane/index.tsx +78 -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 +29 -0
- package/blocks/profiles/profile-switcher/index.tsx +212 -0
- package/blocks/profiles/profile-usage/examples.mdx +41 -0
- package/blocks/profiles/profile-usage/index.tsx +141 -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 +93 -0
- package/blocks/sessions/session-sidebar/index.tsx +497 -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 +38 -0
- package/components/conversation/agent-run/index.tsx +83 -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 +130 -0
- package/components/conversation/message/working.tsx +102 -0
- package/components/conversation/reasoning/examples.mdx +32 -0
- package/components/conversation/reasoning/index.tsx +55 -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 +16 -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 +12 -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 +27 -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 +14 -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-1hzrm8r5.d.ts +51 -0
- package/dist/shared/chunk-1qdwg7w5.d.ts +81 -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-3ps5h55t.d.ts +30 -0
- package/dist/shared/chunk-3yaftgh0.d.ts +28 -0
- package/dist/shared/chunk-4zvhpf2x.js +55 -0
- package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
- package/dist/shared/chunk-58jh3mje.js +46 -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-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-6kwk9vag.js +558 -0
- package/dist/shared/chunk-6rdwkymk.js +177 -0
- package/dist/shared/chunk-71j8qzvb.d.ts +57 -0
- package/dist/shared/chunk-74bvf3tw.d.ts +21 -0
- package/dist/shared/chunk-75zwypyr.d.ts +43 -0
- package/dist/shared/chunk-7mfer3tp.js +176 -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-94grzz9f.js +187 -0
- package/dist/shared/chunk-9kw6m047.d.ts +32 -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-b4dz15em.d.ts +36 -0
- package/dist/shared/chunk-b5ccp5de.js +35 -0
- package/dist/shared/chunk-bh2b5d1z.js +98 -0
- package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
- package/dist/shared/chunk-c8wp058j.js +153 -0
- package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
- package/dist/shared/chunk-dh3qy5fj.js +49 -0
- package/dist/shared/chunk-dxzrtvt9.d.ts +283 -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-fapc805j.js +130 -0
- package/dist/shared/chunk-fm1qyrae.d.ts +68 -0
- package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
- package/dist/shared/chunk-g88hweqh.d.ts +70 -0
- package/dist/shared/chunk-gb5ee5dw.d.ts +88 -0
- package/dist/shared/chunk-gewnsgza.js +61 -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-kreypnzp.d.ts +34 -0
- package/dist/shared/chunk-mnzw0bav.js +80 -0
- package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
- package/dist/shared/chunk-n1qq2wp9.js +6 -0
- package/dist/shared/chunk-n31qwnj2.js +1544 -0
- package/dist/shared/chunk-n4742y54.js +39 -0
- package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
- package/dist/shared/chunk-njf851p1.js +245 -0
- package/dist/shared/chunk-nk4578dr.js +73 -0
- package/dist/shared/chunk-nkbgg7bw.d.ts +24 -0
- package/dist/shared/chunk-nvh33x9x.js +488 -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-qt31n444.js +178 -0
- package/dist/shared/chunk-r5hz78pb.js +129 -0
- package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
- package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
- package/dist/shared/chunk-s3r759ec.js +80 -0
- package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
- package/dist/shared/chunk-skg3m9m0.js +56 -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-ty2ccknv.d.ts +54 -0
- package/dist/shared/chunk-v6yevw62.d.ts +28 -0
- package/dist/shared/chunk-v9q38p0x.js +258 -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-whsx7yp9.d.ts +37 -0
- package/dist/shared/chunk-wq9h37gy.js +86 -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 +78 -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,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
Section2,
|
|
8
|
+
Group2,
|
|
9
|
+
Details2,
|
|
10
|
+
ON_HOVER2,
|
|
11
|
+
Row2,
|
|
12
|
+
Facts2,
|
|
13
|
+
Mono2
|
|
14
|
+
} from "./chunk-5meda998.js";
|
|
15
|
+
|
|
16
|
+
// blocks/settings/worktrees/index.tsx
|
|
17
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
18
|
+
import Badge from "@justanarthur/modo-ui/components/data-display/badge";
|
|
19
|
+
import Tooltip from "@justanarthur/modo-ui/components/overlays/tooltip";
|
|
20
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
21
|
+
/*!
|
|
22
|
+
* Local addition: the settings screen's worktrees section — each session's
|
|
23
|
+
* checkout with its state and size, removable on hover once merged or stale.
|
|
24
|
+
*/
|
|
25
|
+
var BADGE = {
|
|
26
|
+
active: { color: "green", label: "Active" },
|
|
27
|
+
merged: { color: "gray", label: "Merged" },
|
|
28
|
+
stale: { color: "amber", label: "Stale" }
|
|
29
|
+
};
|
|
30
|
+
var NOTE = {
|
|
31
|
+
active: "Its session is still running in it.",
|
|
32
|
+
merged: "Its branch is merged into main; nothing here is lost when it goes.",
|
|
33
|
+
stale: "No commits for 3 weeks and its session is archived. Uncommitted changes go with it."
|
|
34
|
+
};
|
|
35
|
+
function Worktrees2({
|
|
36
|
+
worktrees,
|
|
37
|
+
onDisk,
|
|
38
|
+
defaultOpen,
|
|
39
|
+
onCleanUp,
|
|
40
|
+
onOpenTerminal,
|
|
41
|
+
onRemove
|
|
42
|
+
}) {
|
|
43
|
+
const Trash = useIcon2("trash");
|
|
44
|
+
const Terminal = useIcon2("terminal");
|
|
45
|
+
const removable = worktrees.filter((w) => w.state !== "active");
|
|
46
|
+
return /* @__PURE__ */ jsx(Section2, {
|
|
47
|
+
title: "Worktrees",
|
|
48
|
+
lead: `Sessions that work in their own checkout. ${onDisk} on disk; merged and stale ones can go.`,
|
|
49
|
+
actions: /* @__PURE__ */ jsxs(Button, {
|
|
50
|
+
size: "compact",
|
|
51
|
+
variant: "tertiary",
|
|
52
|
+
leadingIcon: Trash,
|
|
53
|
+
onClick: onCleanUp,
|
|
54
|
+
children: [
|
|
55
|
+
"Clean up ",
|
|
56
|
+
removable.length
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
children: /* @__PURE__ */ jsx(Group2, {
|
|
60
|
+
title: "Checkouts",
|
|
61
|
+
aside: /* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "tabular-nums",
|
|
63
|
+
children: worktrees.length
|
|
64
|
+
}),
|
|
65
|
+
children: /* @__PURE__ */ jsx(Details2, {
|
|
66
|
+
label: "Worktrees",
|
|
67
|
+
actions: "icon",
|
|
68
|
+
defaultOpen,
|
|
69
|
+
children: worktrees.map((worktree, i) => /* @__PURE__ */ jsxs(Row2, {
|
|
70
|
+
value: worktree.path,
|
|
71
|
+
index: i,
|
|
72
|
+
label: worktree.session,
|
|
73
|
+
caption: /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "font-mono",
|
|
75
|
+
children: worktree.branch
|
|
76
|
+
}),
|
|
77
|
+
meta: /* @__PURE__ */ jsxs(Fragment, {
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
80
|
+
size: "compact",
|
|
81
|
+
variant: "dot",
|
|
82
|
+
color: BADGE[worktree.state].color,
|
|
83
|
+
children: BADGE[worktree.state].label
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: "hidden w-14 text-right text-caption tabular-nums @md:inline",
|
|
87
|
+
children: worktree.size
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
}),
|
|
91
|
+
action: worktree.state !== "active" && /* @__PURE__ */ jsx(Tooltip, {
|
|
92
|
+
content: "Remove worktree",
|
|
93
|
+
side: "top",
|
|
94
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
95
|
+
size: "icon-compact",
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
"aria-label": `Remove ${worktree.path}`,
|
|
98
|
+
className: ON_HOVER2,
|
|
99
|
+
onClick: () => onRemove?.(worktree),
|
|
100
|
+
children: /* @__PURE__ */ jsx(Trash, {})
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("p", {
|
|
105
|
+
className: "m-0 text-body text-foreground",
|
|
106
|
+
children: NOTE[worktree.state]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx(Facts2, {
|
|
109
|
+
items: [
|
|
110
|
+
["Path", /* @__PURE__ */ jsx(Mono2, {
|
|
111
|
+
children: worktree.path
|
|
112
|
+
}, "p")],
|
|
113
|
+
["Branch", /* @__PURE__ */ jsx(Mono2, {
|
|
114
|
+
children: worktree.branch
|
|
115
|
+
}, "b")],
|
|
116
|
+
[
|
|
117
|
+
"On disk",
|
|
118
|
+
/* @__PURE__ */ jsx("span", {
|
|
119
|
+
className: "tabular-nums",
|
|
120
|
+
children: worktree.size
|
|
121
|
+
}, "s")
|
|
122
|
+
]
|
|
123
|
+
]
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ jsxs("div", {
|
|
126
|
+
className: "flex justify-end gap-[var(--space-1)]",
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx(Button, {
|
|
129
|
+
size: "compact",
|
|
130
|
+
variant: "ghost",
|
|
131
|
+
leadingIcon: Terminal,
|
|
132
|
+
onClick: () => onOpenTerminal?.(worktree),
|
|
133
|
+
children: "Open in terminal"
|
|
134
|
+
}),
|
|
135
|
+
worktree.state !== "active" && /* @__PURE__ */ jsx(Button, {
|
|
136
|
+
size: "compact",
|
|
137
|
+
variant: "ghost",
|
|
138
|
+
leadingIcon: Trash,
|
|
139
|
+
onClick: () => onRemove?.(worktree),
|
|
140
|
+
children: "Remove"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
}, worktree.path))
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
export { Worktrees2 };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
tool_call_default
|
|
8
|
+
} from "./chunk-vgh4f3sv.js";
|
|
9
|
+
import {
|
|
10
|
+
agent_run_default
|
|
11
|
+
} from "./chunk-nk4578dr.js";
|
|
12
|
+
import {
|
|
13
|
+
chapter_nav_default
|
|
14
|
+
} from "./chunk-bh2b5d1z.js";
|
|
15
|
+
import {
|
|
16
|
+
message_default
|
|
17
|
+
} from "./chunk-94grzz9f.js";
|
|
18
|
+
import {
|
|
19
|
+
reasoning_default
|
|
20
|
+
} from "./chunk-b5ccp5de.js";
|
|
21
|
+
import {
|
|
22
|
+
recap_default
|
|
23
|
+
} from "./chunk-skg3m9m0.js";
|
|
24
|
+
import {
|
|
25
|
+
todo_list_default
|
|
26
|
+
} from "./chunk-jpq101w3.js";
|
|
27
|
+
import {
|
|
28
|
+
work_summary_default
|
|
29
|
+
} from "./chunk-zfhmbb7n.js";
|
|
30
|
+
|
|
31
|
+
// blocks/conversation/transcript/index.tsx
|
|
32
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
33
|
+
import Markdown from "@justanarthur/modo-ui/components/data-display/markdown";
|
|
34
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
35
|
+
import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
|
|
36
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
37
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
38
|
+
/*!
|
|
39
|
+
* Local addition: the AI app's transcript. A scrolling reading column for
|
|
40
|
+
* one session, with the show-work toggle and the chapter list floating in its
|
|
41
|
+
* corner; it follows a growing session while you read at its end. The parts
|
|
42
|
+
* are the generic AI components (Message, Reasoning,
|
|
43
|
+
* ToolCall, AgentRun, WorkSummary, ChapterNav, TodoList, Recap), aliased as
|
|
44
|
+
* statics.
|
|
45
|
+
*/
|
|
46
|
+
function UserTurn(props) {
|
|
47
|
+
return /* @__PURE__ */ jsx(message_default, {
|
|
48
|
+
role: "user",
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function AssistantTurn({ children, streaming, ...props }) {
|
|
53
|
+
if (typeof children === "string")
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: "flex flex-col gap-3",
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Markdown, {
|
|
58
|
+
streaming,
|
|
59
|
+
children
|
|
60
|
+
}),
|
|
61
|
+
streaming && /* @__PURE__ */ jsx(message_default.Working, {})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
return /* @__PURE__ */ jsx(message_default, {
|
|
65
|
+
role: "assistant",
|
|
66
|
+
streaming,
|
|
67
|
+
...props,
|
|
68
|
+
children
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
var Transcript2 = Object.assign(function Transcript({ children, chapters, defaultShowWork = false, footer, className }) {
|
|
72
|
+
const [showWork, setShowWork] = useState(defaultShowWork);
|
|
73
|
+
const [following, setFollowing] = useState(true);
|
|
74
|
+
const Eye = useIcon2("eye");
|
|
75
|
+
const Down = useIcon2("arrow-down");
|
|
76
|
+
const column = useRef(null);
|
|
77
|
+
const viewport = useRef(null);
|
|
78
|
+
const atEnd = useRef(true);
|
|
79
|
+
const toEnd = () => {
|
|
80
|
+
const el = viewport.current;
|
|
81
|
+
if (el)
|
|
82
|
+
el.scrollTop = el.scrollHeight;
|
|
83
|
+
};
|
|
84
|
+
useLayoutEffect(() => {
|
|
85
|
+
viewport.current = column.current?.closest('[data-slot="scroll-area-viewport"]') ?? null;
|
|
86
|
+
toEnd();
|
|
87
|
+
}, []);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
const el = viewport.current;
|
|
90
|
+
const content = column.current;
|
|
91
|
+
if (!el || !content)
|
|
92
|
+
return;
|
|
93
|
+
const onScroll = () => {
|
|
94
|
+
const end = el.scrollHeight - el.scrollTop - el.clientHeight < 8;
|
|
95
|
+
if (end === atEnd.current)
|
|
96
|
+
return;
|
|
97
|
+
atEnd.current = end;
|
|
98
|
+
setFollowing(end);
|
|
99
|
+
};
|
|
100
|
+
const observer = new ResizeObserver(() => {
|
|
101
|
+
if (atEnd.current)
|
|
102
|
+
toEnd();
|
|
103
|
+
});
|
|
104
|
+
el.addEventListener("scroll", onScroll, { passive: true });
|
|
105
|
+
observer.observe(content);
|
|
106
|
+
return () => {
|
|
107
|
+
el.removeEventListener("scroll", onScroll);
|
|
108
|
+
observer.disconnect();
|
|
109
|
+
};
|
|
110
|
+
}, []);
|
|
111
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: cn("@container relative flex min-h-0 flex-1 flex-col", className),
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsxs("div", {
|
|
115
|
+
className: "flex shrink-0 items-center justify-end gap-0.5 px-3 pt-1 @3xl:absolute @3xl:right-3 @3xl:top-2 @3xl:z-20 @3xl:p-0",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ jsx(Button, {
|
|
118
|
+
variant: "ghost",
|
|
119
|
+
size: "icon-compact",
|
|
120
|
+
"aria-label": showWork ? "Hide work" : "Show work",
|
|
121
|
+
"aria-pressed": showWork,
|
|
122
|
+
active: showWork,
|
|
123
|
+
onClick: () => setShowWork(!showWork),
|
|
124
|
+
children: /* @__PURE__ */ jsx(Eye, {})
|
|
125
|
+
}),
|
|
126
|
+
chapters && chapters.length > 0 && /* @__PURE__ */ jsx(chapter_nav_default, {
|
|
127
|
+
chapters
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
132
|
+
className: "min-h-0 flex-1",
|
|
133
|
+
viewportClassName: "scroll-fade",
|
|
134
|
+
children: /* @__PURE__ */ jsx(work_summary_default.Provider, {
|
|
135
|
+
open: showWork,
|
|
136
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
137
|
+
ref: column,
|
|
138
|
+
className: "mx-auto flex w-full max-w-3xl flex-col gap-5 px-6 py-6 [contain:inline-size]",
|
|
139
|
+
children
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
!following && /* @__PURE__ */ jsx("div", {
|
|
144
|
+
className: "pointer-events-none relative z-20 mx-auto flex w-full max-w-3xl justify-center px-6",
|
|
145
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
146
|
+
variant: "secondary",
|
|
147
|
+
size: "compact",
|
|
148
|
+
className: "pointer-events-auto absolute bottom-2",
|
|
149
|
+
onClick: toEnd,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ jsx(Down, {}),
|
|
152
|
+
"Latest"
|
|
153
|
+
]
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
157
|
+
className: "mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3",
|
|
158
|
+
children: footer
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
}, {
|
|
163
|
+
User: UserTurn,
|
|
164
|
+
Assistant: AssistantTurn,
|
|
165
|
+
Work: work_summary_default,
|
|
166
|
+
Thinking: reasoning_default,
|
|
167
|
+
Tools: tool_call_default.Group,
|
|
168
|
+
Tool: tool_call_default,
|
|
169
|
+
Agent: agent_run_default,
|
|
170
|
+
Chapter: chapter_nav_default.Break,
|
|
171
|
+
Mention: message_default.Mention,
|
|
172
|
+
Attachment: message_default.Attachment,
|
|
173
|
+
Working: message_default.Working,
|
|
174
|
+
TaskList: todo_list_default,
|
|
175
|
+
NextStep: recap_default
|
|
176
|
+
});
|
|
177
|
+
var transcript_default = Transcript2;
|
|
178
|
+
export { Transcript2, transcript_default };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
PaneSection2,
|
|
8
|
+
IconAction2,
|
|
9
|
+
PaneEmpty2
|
|
10
|
+
} from "./chunk-eqajdxn8.js";
|
|
11
|
+
import {
|
|
12
|
+
RunningGlyph2
|
|
13
|
+
} from "./chunk-ejtknc0w.js";
|
|
14
|
+
|
|
15
|
+
// blocks/panes/tasks-pane/index.tsx
|
|
16
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
17
|
+
import { useState } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
/*!
|
|
20
|
+
* Local addition: the side pane's Tasks — the session's background agents,
|
|
21
|
+
* shells and child sessions, running ones first.
|
|
22
|
+
*/
|
|
23
|
+
var TASK_KIND_ICON = { agent: "bot", shell: "terminal", session: "split" };
|
|
24
|
+
function TaskRow({ task, onStop, onRetry }) {
|
|
25
|
+
const Icon = useIcon2(TASK_KIND_ICON[task.kind]);
|
|
26
|
+
const Failed = useIcon2("circle-x");
|
|
27
|
+
const Done = useIcon2("circle-check");
|
|
28
|
+
const Stop = useIcon2("square");
|
|
29
|
+
const Retry = useIcon2("rotate-ccw");
|
|
30
|
+
const running = task.status === "running";
|
|
31
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
32
|
+
className: "flex min-h-11 items-center gap-2 px-2 py-1",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
35
|
+
size: 16,
|
|
36
|
+
strokeWidth: 1.5,
|
|
37
|
+
className: "shrink-0 text-muted-foreground"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsxs("span", {
|
|
40
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "truncate text-body text-foreground",
|
|
44
|
+
children: task.title
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn("truncate text-caption", task.status === "failed" ? "text-status-error" : "text-muted-foreground"),
|
|
48
|
+
children: task.status === "stopped" ? `Stopped · ${task.detail}` : task.detail
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs("span", {
|
|
53
|
+
className: "flex size-4 shrink-0 items-center justify-center",
|
|
54
|
+
children: [
|
|
55
|
+
running && /* @__PURE__ */ jsx(RunningGlyph2, {
|
|
56
|
+
size: 14
|
|
57
|
+
}),
|
|
58
|
+
task.status === "done" && /* @__PURE__ */ jsx(Done, {
|
|
59
|
+
size: 14,
|
|
60
|
+
strokeWidth: 1.5,
|
|
61
|
+
className: "text-muted-foreground"
|
|
62
|
+
}),
|
|
63
|
+
task.status === "failed" && /* @__PURE__ */ jsx(Failed, {
|
|
64
|
+
size: 14,
|
|
65
|
+
strokeWidth: 1.5,
|
|
66
|
+
className: "text-status-error"
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsxs("span", {
|
|
71
|
+
className: "flex w-7 shrink-0 justify-center",
|
|
72
|
+
children: [
|
|
73
|
+
running && /* @__PURE__ */ jsx(IconAction2, {
|
|
74
|
+
icon: Stop,
|
|
75
|
+
label: "Stop",
|
|
76
|
+
onClick: onStop
|
|
77
|
+
}),
|
|
78
|
+
(task.status === "failed" || task.status === "stopped") && /* @__PURE__ */ jsx(IconAction2, {
|
|
79
|
+
icon: Retry,
|
|
80
|
+
label: "Retry",
|
|
81
|
+
onClick: onRetry
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function TasksPane2({ tasks, onStop, onRetry }) {
|
|
89
|
+
const [list, setList] = useState(tasks);
|
|
90
|
+
const setStatus = (id, status) => setList((l) => l.map((t) => t.id === id ? { ...t, status } : t));
|
|
91
|
+
const running = list.filter((t) => t.status === "running");
|
|
92
|
+
const finished = list.filter((t) => t.status !== "running");
|
|
93
|
+
if (list.length === 0)
|
|
94
|
+
return /* @__PURE__ */ jsx(PaneEmpty2, {
|
|
95
|
+
icon: "list-checks",
|
|
96
|
+
title: "No background tasks",
|
|
97
|
+
detail: "Subagents, shells and child sessions run here."
|
|
98
|
+
});
|
|
99
|
+
const rows = (items) => /* @__PURE__ */ jsx("ul", {
|
|
100
|
+
className: "m-0 flex list-none flex-col p-0",
|
|
101
|
+
children: items.map((task) => /* @__PURE__ */ jsx(TaskRow, {
|
|
102
|
+
task,
|
|
103
|
+
onStop: () => {
|
|
104
|
+
setStatus(task.id, "stopped");
|
|
105
|
+
onStop?.(task);
|
|
106
|
+
},
|
|
107
|
+
onRetry: () => {
|
|
108
|
+
setStatus(task.id, "running");
|
|
109
|
+
onRetry?.(task);
|
|
110
|
+
}
|
|
111
|
+
}, task.id))
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
114
|
+
className: "flex flex-col gap-2",
|
|
115
|
+
children: [
|
|
116
|
+
running.length > 0 && /* @__PURE__ */ jsx(PaneSection2, {
|
|
117
|
+
title: "Running",
|
|
118
|
+
meta: running.length,
|
|
119
|
+
children: rows(running)
|
|
120
|
+
}),
|
|
121
|
+
finished.length > 0 && /* @__PURE__ */ jsx(PaneSection2, {
|
|
122
|
+
title: "Finished",
|
|
123
|
+
meta: finished.length,
|
|
124
|
+
children: rows(finished)
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export { TasksPane2 };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ConfigScope2 } from "./chunk-whsx7yp9.js";
|
|
2
|
+
import { Profile2 } from "./chunk-jkkdq1mh.js";
|
|
3
|
+
import { KeyValuePair } from "@justanarthur/modo-ui/components/inputs/key-value";
|
|
4
|
+
import { ReactElement } from "react";
|
|
5
|
+
import { JSX as JSX_1kxb } from "react";
|
|
6
|
+
type McpTransport2 = "stdio" | "http" | "sse";
|
|
7
|
+
/** An MCP server as the form writes it. */
|
|
8
|
+
interface McpServerConfig2 {
|
|
9
|
+
name: string;
|
|
10
|
+
transport: McpTransport2;
|
|
11
|
+
/** The executable a stdio server runs. */
|
|
12
|
+
command: string;
|
|
13
|
+
/** Its arguments, one word each. */
|
|
14
|
+
args: string[];
|
|
15
|
+
/** Env vars passed to a stdio server. */
|
|
16
|
+
env: KeyValuePair[];
|
|
17
|
+
/** Where an http or sse server answers. */
|
|
18
|
+
url: string;
|
|
19
|
+
/** Headers sent to an http or sse server. */
|
|
20
|
+
headers: KeyValuePair[];
|
|
21
|
+
scope: ConfigScope2;
|
|
22
|
+
/** Ids of the profiles whose sessions load it. */
|
|
23
|
+
profiles: string[];
|
|
24
|
+
}
|
|
25
|
+
/** Where the connection test stands; the app runs it and reports back. */
|
|
26
|
+
interface McpConnectionTest2 {
|
|
27
|
+
state: "idle" | "testing" | "ok" | "failed";
|
|
28
|
+
/** The tools the server listed, once it answered. */
|
|
29
|
+
tools?: string[];
|
|
30
|
+
/** Why it failed: the tail of its stderr or the HTTP error. */
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
interface McpServerDialogPanelProps2 {
|
|
34
|
+
/** What the form starts with; a server with a name is being edited. Defaults to an empty stdio server. */
|
|
35
|
+
defaultServer?: Partial<McpServerConfig2>;
|
|
36
|
+
/** The profiles it can apply to. Defaults to `[]`. */
|
|
37
|
+
profiles?: Profile2[];
|
|
38
|
+
/** Server names already taken, so a clash is caught before saving. Defaults to `[]`. */
|
|
39
|
+
taken?: string[];
|
|
40
|
+
/** Where the connection test stands. Defaults to idle. */
|
|
41
|
+
test?: McpConnectionTest2;
|
|
42
|
+
/** Called with what the form holds when "Test connection" is pressed: run the test here. */
|
|
43
|
+
onTest?: (server: McpServerConfig2) => void;
|
|
44
|
+
/** Called with the server when Save is pressed. */
|
|
45
|
+
onSave?: (server: McpServerConfig2) => void;
|
|
46
|
+
/** Called with the server when Delete is pressed; leave it out and no Delete shows. */
|
|
47
|
+
onDelete?: (server: McpServerConfig2) => void;
|
|
48
|
+
/** Called when Cancel is pressed; leave it out and no Cancel shows. */
|
|
49
|
+
onCancel?: () => void;
|
|
50
|
+
/** Classes for the root. */
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
54
|
+
/** The form without the Dialog: for a settings page, or the docs. */
|
|
55
|
+
declare function McpServerDialogPanel2({ defaultServer, profiles, taken, test, onTest, onSave, onDelete, onCancel, className }: McpServerDialogPanelProps2): Element_12xgc;
|
|
56
|
+
interface McpServerDialogProps2 {
|
|
57
|
+
/** The control that opens it, such as the MCP section's "Add server" button. */
|
|
58
|
+
trigger?: ReactElement;
|
|
59
|
+
/** Controlled open state. */
|
|
60
|
+
open?: boolean;
|
|
61
|
+
/** Initial open state, for an uncontrolled dialog. Defaults to `false`. */
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
/** Called when the dialog opens or closes. */
|
|
64
|
+
onOpenChange?: (open: boolean) => void;
|
|
65
|
+
/** What the form starts with; a server with a name is being edited. Defaults to an empty stdio server. */
|
|
66
|
+
defaultServer?: Partial<McpServerConfig2>;
|
|
67
|
+
/** The profiles it can apply to. Defaults to `[]`. */
|
|
68
|
+
profiles?: Profile2[];
|
|
69
|
+
/** Server names already taken, so a clash is caught before saving. Defaults to `[]`. */
|
|
70
|
+
taken?: string[];
|
|
71
|
+
/** Where the connection test stands. Defaults to idle. */
|
|
72
|
+
test?: McpConnectionTest2;
|
|
73
|
+
/** Called with what the form holds when "Test connection" is pressed: run the test here. */
|
|
74
|
+
onTest?: (server: McpServerConfig2) => void;
|
|
75
|
+
/** Called with the server when Save is pressed; the dialog closes. */
|
|
76
|
+
onSave?: (server: McpServerConfig2) => void;
|
|
77
|
+
/** Called with the server when Delete is pressed; the dialog closes. Leave it out and no Delete shows. */
|
|
78
|
+
onDelete?: (server: McpServerConfig2) => void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Adds or edits an MCP server: how the sessions reach it, where it is
|
|
82
|
+
* configured and who loads it.
|
|
83
|
+
*
|
|
84
|
+
* Pick the transport and the form follows it: a stdio server takes a
|
|
85
|
+
* command, its arguments and env vars (values masked, the eye shows one);
|
|
86
|
+
* an http or sse server takes a URL and headers. The scope says which file
|
|
87
|
+
* it lands in (your config dir, the repo, or the repo's local file) and the
|
|
88
|
+
* profiles which sessions load it. "Test connection" hands the form to
|
|
89
|
+
* `onTest`; the app connects and reports back through `test`: connecting,
|
|
90
|
+
* the tools it listed, or the error. Save waits for a name and a command
|
|
91
|
+
* or URL. The dialog grows out of its trigger; `McpServerDialog.Panel` is
|
|
92
|
+
* the same form without it.
|
|
93
|
+
*
|
|
94
|
+
* Statics:
|
|
95
|
+
* - `McpServerDialog.Panel` — the form on its own: the same props, minus the dialog's, plus `onCancel`.
|
|
96
|
+
*
|
|
97
|
+
* @example {@include ./examples.mdx}
|
|
98
|
+
*/
|
|
99
|
+
declare const McpServerDialog2: (({ trigger, open, defaultOpen, onOpenChange, onSave, onDelete,...panel }: McpServerDialogProps2) => Element_12xgc) & {
|
|
100
|
+
Panel: typeof McpServerDialogPanel2;
|
|
101
|
+
};
|
|
102
|
+
export { McpTransport2, McpServerConfig2, McpConnectionTest2, McpServerDialogPanelProps2, McpServerDialogPanel2, McpServerDialogProps2, McpServerDialog2 };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
type CatalogKind2 = "skill" | "command" | "agent" | "hook" | "mcp";
|
|
4
|
+
/** One thing a plugin ships. */
|
|
5
|
+
interface CatalogContent2 {
|
|
6
|
+
kind: CatalogKind2;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
/** A plugin as a marketplace lists it. */
|
|
11
|
+
interface CatalogPlugin2 {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
author: string;
|
|
15
|
+
/** The marketplace it comes from. */
|
|
16
|
+
marketplace: string;
|
|
17
|
+
description: string;
|
|
18
|
+
category: string;
|
|
19
|
+
/** The latest version the marketplace offers. */
|
|
20
|
+
version: string;
|
|
21
|
+
/** The installed version; absent when it isn't installed. */
|
|
22
|
+
installed?: string;
|
|
23
|
+
/** Its README, in Markdown. */
|
|
24
|
+
readme: string;
|
|
25
|
+
contents: CatalogContent2[];
|
|
26
|
+
}
|
|
27
|
+
interface PluginCatalogPanelProps2 {
|
|
28
|
+
/** Everything the marketplaces list. */
|
|
29
|
+
plugins: CatalogPlugin2[];
|
|
30
|
+
/** Controlled search query. Pair with `onQueryChange`. */
|
|
31
|
+
query?: string;
|
|
32
|
+
/** Initial query, for an uncontrolled catalog. Defaults to `''`. */
|
|
33
|
+
defaultQuery?: string;
|
|
34
|
+
/** Called on every change of the query. */
|
|
35
|
+
onQueryChange?: (query: string) => void;
|
|
36
|
+
/** Initial category; `'all'` shows every one. Defaults to `'all'`. */
|
|
37
|
+
defaultCategory?: string;
|
|
38
|
+
/** Controlled id of the plugin whose detail shows. Pair with `onSelectedChange`. */
|
|
39
|
+
selected?: string;
|
|
40
|
+
/** Id of the plugin whose detail shows first. Defaults to none. */
|
|
41
|
+
defaultSelected?: string;
|
|
42
|
+
/** Called with the id of the plugin picked for its detail. */
|
|
43
|
+
onSelectedChange?: (id: string) => void;
|
|
44
|
+
/** Ids being installed, updated or uninstalled: their button spins. Defaults to `[]`. */
|
|
45
|
+
pending?: string[];
|
|
46
|
+
/** Called with a plugin's id when Install is pressed. */
|
|
47
|
+
onInstall?: (id: string) => void;
|
|
48
|
+
/** Called with a plugin's id when Uninstall is pressed. */
|
|
49
|
+
onUninstall?: (id: string) => void;
|
|
50
|
+
/** Called with a plugin's id when Update is pressed. */
|
|
51
|
+
onUpdate?: (id: string) => void;
|
|
52
|
+
/** Classes for the root. */
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
56
|
+
/** The catalog without the Dialog: for a settings page, or the docs. */
|
|
57
|
+
declare function PluginCatalogPanel2({ plugins, query, defaultQuery, onQueryChange, defaultCategory, selected, defaultSelected, onSelectedChange, pending, onInstall, onUninstall, onUpdate, className }: PluginCatalogPanelProps2): Element_12xgc;
|
|
58
|
+
interface PluginCatalogProps2 {
|
|
59
|
+
/** Everything the marketplaces list. */
|
|
60
|
+
plugins: CatalogPlugin2[];
|
|
61
|
+
/** The control that opens it, such as the plugins section's "Browse catalog" 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
|
+
/** Initial query. Defaults to `''`. */
|
|
70
|
+
defaultQuery?: string;
|
|
71
|
+
/** Initial category; `'all'` shows every one. Defaults to `'all'`. */
|
|
72
|
+
defaultCategory?: string;
|
|
73
|
+
/** Id of the plugin whose detail shows first. Defaults to none. */
|
|
74
|
+
defaultSelected?: string;
|
|
75
|
+
/** Ids being installed, updated or uninstalled: their button spins. Defaults to `[]`. */
|
|
76
|
+
pending?: string[];
|
|
77
|
+
/** Called with a plugin's id when Install is pressed. */
|
|
78
|
+
onInstall?: (id: string) => void;
|
|
79
|
+
/** Called with a plugin's id when Uninstall is pressed. */
|
|
80
|
+
onUninstall?: (id: string) => void;
|
|
81
|
+
/** Called with a plugin's id when Update is pressed. */
|
|
82
|
+
onUpdate?: (id: string) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Browse what the marketplaces offer, and install it: plugins that bundle
|
|
86
|
+
* skills, commands, agents, hooks and MCP servers.
|
|
87
|
+
*
|
|
88
|
+
* Search by name, author, description or kind, and narrow to a category.
|
|
89
|
+
* Each row names the plugin and its author, says what it does, badges what
|
|
90
|
+
* it ships, and says whether it is installed or has an update; its Install,
|
|
91
|
+
* Update or Uninstall shows on hover. Pick a row and its detail opens
|
|
92
|
+
* beside the list (in place of it, in a narrow window): the README, and
|
|
93
|
+
* the contents one by one. Nothing matching shows an empty state that
|
|
94
|
+
* clears the filters. The app does the installing: `onInstall`,
|
|
95
|
+
* `onUninstall` and `onUpdate` get the id, and `pending` spins the
|
|
96
|
+
* button meanwhile. The dialog grows out of its trigger;
|
|
97
|
+
* `PluginCatalog.Panel` is the same catalog without it.
|
|
98
|
+
*
|
|
99
|
+
* Statics:
|
|
100
|
+
* - `PluginCatalog.Panel` — the catalog on its own: the same props, minus the dialog's, plus a controlled `query` and `selected`.
|
|
101
|
+
*
|
|
102
|
+
* @example {@include ./examples.mdx}
|
|
103
|
+
*/
|
|
104
|
+
declare const PluginCatalog2: (({ trigger, open, defaultOpen, onOpenChange,...panel }: PluginCatalogProps2) => Element_12xgc) & {
|
|
105
|
+
Panel: typeof PluginCatalogPanel2;
|
|
106
|
+
};
|
|
107
|
+
export { CatalogKind2, CatalogContent2, CatalogPlugin2, PluginCatalogPanelProps2, PluginCatalogPanel2, PluginCatalogProps2, PluginCatalog2 };
|