@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,391 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// blocks/settings/plugin-catalog/index.tsx
|
|
8
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
9
|
+
import Badge from "@justanarthur/modo-ui/components/data-display/badge";
|
|
10
|
+
import Markdown from "@justanarthur/modo-ui/components/data-display/markdown";
|
|
11
|
+
import EmptyState from "@justanarthur/modo-ui/components/feedback/empty-state";
|
|
12
|
+
import ChoiceList from "@justanarthur/modo-ui/components/inputs/choice-list";
|
|
13
|
+
import Input from "@justanarthur/modo-ui/components/inputs/input";
|
|
14
|
+
import Select from "@justanarthur/modo-ui/components/inputs/select";
|
|
15
|
+
import Tabs from "@justanarthur/modo-ui/components/navigation/tabs";
|
|
16
|
+
import Dialog from "@justanarthur/modo-ui/components/overlays/dialog";
|
|
17
|
+
import { useControllableState } from "@justanarthur/modo-ui/lib/use-controllable-state";
|
|
18
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
19
|
+
import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
|
|
20
|
+
import { useState } from "react";
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
/*!
|
|
23
|
+
* Local addition: the AI app's plugin catalog. Plugins, skills and MCP
|
|
24
|
+
* servers from the marketplaces you added, searched and filtered by
|
|
25
|
+
* category, each opening into its README and contents, with install,
|
|
26
|
+
* update and uninstall. A Dialog with a static panel.
|
|
27
|
+
*/
|
|
28
|
+
var KIND = {
|
|
29
|
+
skill: { label: "Skill", color: "blue" },
|
|
30
|
+
command: { label: "Command", color: "violet" },
|
|
31
|
+
agent: { label: "Agent", color: "amber" },
|
|
32
|
+
hook: { label: "Hook", color: "teal" },
|
|
33
|
+
mcp: { label: "MCP", color: "green" }
|
|
34
|
+
};
|
|
35
|
+
var ALL = "all";
|
|
36
|
+
var kindsOf = (plugin) => [...new Set(plugin.contents.map((c) => c.kind))];
|
|
37
|
+
function matches(plugin, query, category) {
|
|
38
|
+
if (category !== ALL && plugin.category !== category)
|
|
39
|
+
return false;
|
|
40
|
+
const q = query.trim().toLowerCase();
|
|
41
|
+
if (!q)
|
|
42
|
+
return true;
|
|
43
|
+
return [plugin.name, plugin.author, plugin.description, plugin.marketplace, ...kindsOf(plugin)].some((text) => text.toLowerCase().includes(q));
|
|
44
|
+
}
|
|
45
|
+
function Kinds({ plugin }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: "flex flex-wrap gap-[var(--space-1)]",
|
|
48
|
+
children: kindsOf(plugin).map((kind) => /* @__PURE__ */ jsx(Badge, {
|
|
49
|
+
size: "compact",
|
|
50
|
+
color: KIND[kind].color,
|
|
51
|
+
children: KIND[kind].label
|
|
52
|
+
}, kind))
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function state(plugin) {
|
|
56
|
+
if (!plugin.installed)
|
|
57
|
+
return;
|
|
58
|
+
return plugin.installed === plugin.version ? `Installed ${plugin.installed}` : `Update ${plugin.installed} → ${plugin.version}`;
|
|
59
|
+
}
|
|
60
|
+
function Actions({ plugin, handlers, all = false }) {
|
|
61
|
+
const Install = useIcon2("arrow-down");
|
|
62
|
+
const Refresh = useIcon2("refresh-cw");
|
|
63
|
+
const Trash = useIcon2("trash");
|
|
64
|
+
const busy = handlers.pending.includes(plugin.id);
|
|
65
|
+
const outdated = plugin.installed !== undefined && plugin.installed !== plugin.version;
|
|
66
|
+
if (!plugin.installed)
|
|
67
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
68
|
+
size: "compact",
|
|
69
|
+
leadingIcon: Install,
|
|
70
|
+
loading: busy,
|
|
71
|
+
onClick: () => handlers.onInstall?.(plugin.id),
|
|
72
|
+
children: "Install"
|
|
73
|
+
});
|
|
74
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
75
|
+
className: "flex gap-[var(--space-1)]",
|
|
76
|
+
children: [
|
|
77
|
+
outdated && /* @__PURE__ */ jsx(Button, {
|
|
78
|
+
size: "compact",
|
|
79
|
+
leadingIcon: Refresh,
|
|
80
|
+
loading: busy,
|
|
81
|
+
onClick: () => handlers.onUpdate?.(plugin.id),
|
|
82
|
+
children: "Update"
|
|
83
|
+
}),
|
|
84
|
+
(all || !outdated) && /* @__PURE__ */ jsx(Button, {
|
|
85
|
+
size: "compact",
|
|
86
|
+
variant: "ghost",
|
|
87
|
+
leadingIcon: Trash,
|
|
88
|
+
loading: busy && !outdated,
|
|
89
|
+
onClick: () => handlers.onUninstall?.(plugin.id),
|
|
90
|
+
children: "Uninstall"
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function Detail({ plugin, handlers, onBack }) {
|
|
96
|
+
const Back = useIcon2("arrow-left");
|
|
97
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
98
|
+
className: "flex min-w-0 flex-col gap-[var(--space-4)]",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx(Button, {
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
size: "compact",
|
|
103
|
+
leadingIcon: Back,
|
|
104
|
+
className: "self-start @2xl:hidden",
|
|
105
|
+
onClick: onBack,
|
|
106
|
+
children: "All plugins"
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsxs("div", {
|
|
109
|
+
className: "flex flex-wrap items-start gap-[var(--space-3)]",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: "flex min-w-0 flex-1 flex-col gap-[var(--space-1)]",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx("h3", {
|
|
115
|
+
className: "m-0 text-subtitle text-foreground",
|
|
116
|
+
children: plugin.name
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsxs("span", {
|
|
119
|
+
className: "text-caption text-muted-foreground",
|
|
120
|
+
children: [
|
|
121
|
+
plugin.author,
|
|
122
|
+
" · ",
|
|
123
|
+
plugin.marketplace,
|
|
124
|
+
" · ",
|
|
125
|
+
plugin.version,
|
|
126
|
+
state(plugin) && ` · ${state(plugin)}`
|
|
127
|
+
]
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ jsx(Actions, {
|
|
132
|
+
plugin,
|
|
133
|
+
handlers,
|
|
134
|
+
all: true
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx("p", {
|
|
139
|
+
className: "m-0 text-body text-foreground",
|
|
140
|
+
children: plugin.description
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ jsx(Kinds, {
|
|
143
|
+
plugin
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsxs(Tabs, {
|
|
146
|
+
variant: "subtle",
|
|
147
|
+
size: "compact",
|
|
148
|
+
defaultValue: "readme",
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsxs(Tabs.List, {
|
|
151
|
+
"aria-label": `${plugin.name} details`,
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx(Tabs.Item, {
|
|
154
|
+
value: "readme",
|
|
155
|
+
label: "README"
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ jsx(Tabs.Item, {
|
|
158
|
+
value: "contents",
|
|
159
|
+
label: `Contents · ${plugin.contents.length}`
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsx(Tabs.Panel, {
|
|
164
|
+
value: "readme",
|
|
165
|
+
className: "pt-[var(--space-3)]",
|
|
166
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
167
|
+
children: plugin.readme
|
|
168
|
+
})
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ jsx(Tabs.Panel, {
|
|
171
|
+
value: "contents",
|
|
172
|
+
className: "pt-[var(--space-3)]",
|
|
173
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
174
|
+
"aria-label": "Contents",
|
|
175
|
+
className: "m-0 flex list-none flex-col p-0",
|
|
176
|
+
children: plugin.contents.map((item) => /* @__PURE__ */ jsxs("li", {
|
|
177
|
+
className: "flex min-w-0 items-baseline gap-[var(--space-3)] border-b border-border py-[var(--space-2)] last:border-b-0",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ jsx("span", {
|
|
180
|
+
className: "w-20 shrink-0",
|
|
181
|
+
children: /* @__PURE__ */ jsx(Badge, {
|
|
182
|
+
size: "compact",
|
|
183
|
+
color: KIND[item.kind].color,
|
|
184
|
+
children: KIND[item.kind].label
|
|
185
|
+
})
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ jsxs("span", {
|
|
188
|
+
className: "flex min-w-0 flex-col",
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ jsx("span", {
|
|
191
|
+
className: "truncate font-mono text-caption text-foreground",
|
|
192
|
+
children: item.name
|
|
193
|
+
}),
|
|
194
|
+
item.description && /* @__PURE__ */ jsx("span", {
|
|
195
|
+
className: "text-caption text-muted-foreground",
|
|
196
|
+
children: item.description
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}, `${item.kind}-${item.name}`))
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
})
|
|
206
|
+
]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function PluginCatalogPanel2({
|
|
210
|
+
plugins,
|
|
211
|
+
query,
|
|
212
|
+
defaultQuery = "",
|
|
213
|
+
onQueryChange,
|
|
214
|
+
defaultCategory = ALL,
|
|
215
|
+
selected,
|
|
216
|
+
defaultSelected = "",
|
|
217
|
+
onSelectedChange,
|
|
218
|
+
pending = [],
|
|
219
|
+
onInstall,
|
|
220
|
+
onUninstall,
|
|
221
|
+
onUpdate,
|
|
222
|
+
className
|
|
223
|
+
}) {
|
|
224
|
+
const [q, setQ] = useControllableState(query, defaultQuery, onQueryChange);
|
|
225
|
+
const [category, setCategory] = useState(defaultCategory);
|
|
226
|
+
const [picked, setPicked] = useControllableState(selected, defaultSelected, onSelectedChange);
|
|
227
|
+
const SearchIcon = useIcon2("search");
|
|
228
|
+
const Package = useIcon2("package");
|
|
229
|
+
const handlers = { pending, onInstall, onUninstall, onUpdate };
|
|
230
|
+
const categories = [...new Set(plugins.map((p) => p.category))].sort();
|
|
231
|
+
const shown = plugins.filter((p) => matches(p, q, category));
|
|
232
|
+
const detail = plugins.find((p) => p.id === picked);
|
|
233
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
234
|
+
className: cn("@container flex min-h-0 flex-col gap-[var(--space-4)]", className),
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsxs("div", {
|
|
237
|
+
className: "flex flex-wrap items-center gap-[var(--space-2)] pr-[var(--space-6)]",
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ jsx("h2", {
|
|
240
|
+
className: "m-0 mr-auto text-title text-foreground",
|
|
241
|
+
children: "Plugin catalog"
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ jsx(Input, {
|
|
244
|
+
variant: "bordered",
|
|
245
|
+
size: "compact",
|
|
246
|
+
icon: SearchIcon,
|
|
247
|
+
"aria-label": "Search plugins",
|
|
248
|
+
placeholder: "Search plugins, skills, MCP…",
|
|
249
|
+
className: "w-60",
|
|
250
|
+
value: q,
|
|
251
|
+
onValueChange: setQ
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
254
|
+
size: "compact",
|
|
255
|
+
value: category,
|
|
256
|
+
onValueChange: setCategory,
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ jsx(Select.Trigger, {
|
|
259
|
+
"aria-label": "Category",
|
|
260
|
+
className: "w-40"
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ jsxs(Select.Content, {
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ jsx(Select.Item, {
|
|
265
|
+
index: 0,
|
|
266
|
+
value: ALL,
|
|
267
|
+
children: "All categories"
|
|
268
|
+
}),
|
|
269
|
+
categories.map((c, i) => /* @__PURE__ */ jsx(Select.Item, {
|
|
270
|
+
index: i + 1,
|
|
271
|
+
value: c,
|
|
272
|
+
children: c
|
|
273
|
+
}, c))
|
|
274
|
+
]
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ jsxs("div", {
|
|
281
|
+
className: "grid min-h-0 flex-1 grid-cols-1 gap-[var(--space-6)] @2xl:grid-cols-[minmax(0,24rem)_minmax(0,1fr)]",
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
284
|
+
className: cn("min-h-0", detail && "hidden @2xl:block"),
|
|
285
|
+
viewportClassName: "scroll-fade",
|
|
286
|
+
children: shown.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
287
|
+
size: "compact",
|
|
288
|
+
icon: SearchIcon,
|
|
289
|
+
title: "No plugins match",
|
|
290
|
+
description: q.trim() ? `Nothing in ${category === ALL ? "the catalog" : category} matches “${q.trim()}”.` : `Nothing in ${category}.`,
|
|
291
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
292
|
+
size: "compact",
|
|
293
|
+
variant: "secondary",
|
|
294
|
+
onClick: () => {
|
|
295
|
+
setQ("");
|
|
296
|
+
setCategory(ALL);
|
|
297
|
+
},
|
|
298
|
+
children: "Clear filters"
|
|
299
|
+
})
|
|
300
|
+
}) : /* @__PURE__ */ jsx(ChoiceList, {
|
|
301
|
+
label: "Plugins",
|
|
302
|
+
value: picked,
|
|
303
|
+
onValueChange: setPicked,
|
|
304
|
+
rowClassName: "pr-24",
|
|
305
|
+
options: shown.map((plugin) => ({
|
|
306
|
+
value: plugin.id,
|
|
307
|
+
label: plugin.name,
|
|
308
|
+
actions: /* @__PURE__ */ jsx(Actions, {
|
|
309
|
+
plugin,
|
|
310
|
+
handlers
|
|
311
|
+
}),
|
|
312
|
+
content: /* @__PURE__ */ jsxs("span", {
|
|
313
|
+
className: "flex min-w-0 flex-1 flex-col gap-[var(--space-1)]",
|
|
314
|
+
children: [
|
|
315
|
+
/* @__PURE__ */ jsxs("span", {
|
|
316
|
+
className: "flex min-w-0 items-baseline gap-[var(--space-2)]",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsx("span", {
|
|
319
|
+
className: "truncate weight-medium text-foreground",
|
|
320
|
+
children: plugin.name
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ jsx("span", {
|
|
323
|
+
className: "shrink-0 truncate text-caption text-muted-foreground",
|
|
324
|
+
children: plugin.author
|
|
325
|
+
})
|
|
326
|
+
]
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ jsx("span", {
|
|
329
|
+
className: "line-clamp-2 text-caption text-muted-foreground",
|
|
330
|
+
children: plugin.description
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ jsxs("span", {
|
|
333
|
+
className: "flex flex-wrap items-center gap-[var(--space-2)]",
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ jsx(Kinds, {
|
|
336
|
+
plugin
|
|
337
|
+
}),
|
|
338
|
+
state(plugin) && /* @__PURE__ */ jsx("span", {
|
|
339
|
+
className: "text-caption text-muted-foreground",
|
|
340
|
+
children: state(plugin)
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
})
|
|
344
|
+
]
|
|
345
|
+
})
|
|
346
|
+
}))
|
|
347
|
+
})
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
350
|
+
className: cn("min-h-0", !detail && "hidden @2xl:block"),
|
|
351
|
+
viewportClassName: "scroll-fade",
|
|
352
|
+
children: detail ? /* @__PURE__ */ jsx(Detail, {
|
|
353
|
+
plugin: detail,
|
|
354
|
+
handlers,
|
|
355
|
+
onBack: () => setPicked("")
|
|
356
|
+
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
357
|
+
size: "compact",
|
|
358
|
+
icon: Package,
|
|
359
|
+
title: "Pick a plugin",
|
|
360
|
+
description: "Its README and what it ships show here."
|
|
361
|
+
})
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})
|
|
365
|
+
]
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
var PluginCatalog2 = Object.assign(function PluginCatalog({ trigger, open, defaultOpen = false, onOpenChange, ...panel }) {
|
|
369
|
+
const [isOpen, setOpen] = useControllableState(open, defaultOpen, onOpenChange);
|
|
370
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
371
|
+
open: isOpen,
|
|
372
|
+
onOpenChange: setOpen,
|
|
373
|
+
children: [
|
|
374
|
+
trigger && /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
375
|
+
render: trigger
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ jsx(Dialog.Content, {
|
|
378
|
+
width: "xl",
|
|
379
|
+
"aria-label": "Plugin catalog",
|
|
380
|
+
className: "flex h-[min(640px,85dvh)] flex-col",
|
|
381
|
+
children: /* @__PURE__ */ jsx(PluginCatalogPanel2, {
|
|
382
|
+
...panel,
|
|
383
|
+
className: "flex-1"
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
}, { Panel: PluginCatalogPanel2 });
|
|
389
|
+
var plugin_catalog_default = PluginCatalog2;
|
|
390
|
+
|
|
391
|
+
export { PluginCatalogPanel2, PluginCatalog2, plugin_catalog_default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PaneShell2 } from "./chunk-66sh633m.js";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
interface TerminalPaneProps2 {
|
|
4
|
+
/** The shell: its name, folder, prompt and the history so far. The pane keeps its own copy as you run and clear. */
|
|
5
|
+
shell: PaneShell2;
|
|
6
|
+
/** Called with each command entered at the prompt. */
|
|
7
|
+
onRun?: (command: string) => void;
|
|
8
|
+
}
|
|
9
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
10
|
+
/**
|
|
11
|
+
* The session's shell in its folder: its history, then a prompt you type at.
|
|
12
|
+
*
|
|
13
|
+
* The history is a LogView (ANSI colors, follows the latest line, smooth on
|
|
14
|
+
* long output). A press anywhere in the frame puts the caret on the prompt, as a terminal
|
|
15
|
+
* does; Enter runs the line and adds it to the history. A failed command
|
|
16
|
+
* ends on its exit code. Clear empties the history.
|
|
17
|
+
*
|
|
18
|
+
* @example {@include ./examples.mdx}
|
|
19
|
+
*/
|
|
20
|
+
declare function TerminalPane2({ shell, onRun }: TerminalPaneProps2): Element_12xgc;
|
|
21
|
+
export { TerminalPaneProps2, TerminalPane2 };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcons2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
STATUS_GLYPH2
|
|
8
|
+
} from "./chunk-ejtknc0w.js";
|
|
9
|
+
import {
|
|
10
|
+
PANES2
|
|
11
|
+
} from "./chunk-4248zvmh.js";
|
|
12
|
+
|
|
13
|
+
// blocks/dialogs/command-palette/index.tsx
|
|
14
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
15
|
+
import Kbd from "@justanarthur/modo-ui/components/data-display/kbd";
|
|
16
|
+
import Command from "@justanarthur/modo-ui/components/overlays/command";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
/*!
|
|
19
|
+
* Local addition: the AI app's ⌘K palette on the Command overlay — switch
|
|
20
|
+
* to a session, start one in a project under a profile, run a command or
|
|
21
|
+
* skill, open a pane, a settings section or another profile.
|
|
22
|
+
*/
|
|
23
|
+
function CommandPalette2({
|
|
24
|
+
sessions,
|
|
25
|
+
projects,
|
|
26
|
+
profiles,
|
|
27
|
+
commands,
|
|
28
|
+
settings,
|
|
29
|
+
profile,
|
|
30
|
+
project,
|
|
31
|
+
onSelect,
|
|
32
|
+
open,
|
|
33
|
+
defaultOpen,
|
|
34
|
+
onOpenChange,
|
|
35
|
+
hotkey = "k",
|
|
36
|
+
trigger,
|
|
37
|
+
label = "Search",
|
|
38
|
+
className
|
|
39
|
+
}) {
|
|
40
|
+
const icons = useIcons2();
|
|
41
|
+
const active = profiles.find((p) => p.id === profile) ?? profiles[0];
|
|
42
|
+
const here = projects.find((p) => p.path === project) ?? projects[0];
|
|
43
|
+
const pick = (item) => () => onSelect?.(item);
|
|
44
|
+
const kind = (k) => k === "command" ? icons.command : k === "skill" ? icons.zap : icons.puzzle;
|
|
45
|
+
const groups = [
|
|
46
|
+
{
|
|
47
|
+
label: "Sessions",
|
|
48
|
+
items: sessions.map((s) => ({
|
|
49
|
+
label: s.title,
|
|
50
|
+
icon: STATUS_GLYPH2[s.status] ?? icons["message-circle"],
|
|
51
|
+
shortcut: s.updated,
|
|
52
|
+
keywords: [s.branch ?? "", s.project ?? "", s.profile],
|
|
53
|
+
onSelect: pick({ kind: "session", id: s.id })
|
|
54
|
+
}))
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: "New",
|
|
58
|
+
items: [
|
|
59
|
+
...active ? projects.map((p) => ({
|
|
60
|
+
label: `New session in ${p.label}`,
|
|
61
|
+
icon: icons.plus,
|
|
62
|
+
shortcut: active.name,
|
|
63
|
+
keywords: [p.path, active.name],
|
|
64
|
+
onSelect: pick({ kind: "new-session", project: p.path, profile: active.id })
|
|
65
|
+
})) : [],
|
|
66
|
+
...here ? profiles.filter((p) => p !== active).map((p) => ({
|
|
67
|
+
label: `New ${p.name} session`,
|
|
68
|
+
icon: icons.plus,
|
|
69
|
+
shortcut: here.label,
|
|
70
|
+
keywords: [p.plan, p.account, here.path],
|
|
71
|
+
onSelect: pick({ kind: "new-session", project: here.path, profile: p.id })
|
|
72
|
+
})) : []
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "Commands",
|
|
77
|
+
items: commands.filter((c) => c.kind === "command").map((c) => ({
|
|
78
|
+
label: c.name,
|
|
79
|
+
icon: kind(c.kind),
|
|
80
|
+
keywords: [c.description],
|
|
81
|
+
onSelect: pick({ kind: "command", name: c.name })
|
|
82
|
+
}))
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "Skills",
|
|
86
|
+
items: commands.filter((c) => c.kind !== "command").map((c) => ({
|
|
87
|
+
label: c.name,
|
|
88
|
+
icon: kind(c.kind),
|
|
89
|
+
keywords: [c.description, c.kind],
|
|
90
|
+
onSelect: pick({ kind: "command", name: c.name })
|
|
91
|
+
}))
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "Find",
|
|
95
|
+
items: [
|
|
96
|
+
{
|
|
97
|
+
label: "Search transcripts",
|
|
98
|
+
icon: icons.search,
|
|
99
|
+
keywords: ["find", "history", "messages"],
|
|
100
|
+
onSelect: pick({ kind: "search" })
|
|
101
|
+
},
|
|
102
|
+
{ label: "Keyboard shortcuts", icon: icons.command, shortcut: "⌘/", onSelect: pick({ kind: "shortcuts" }) }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Panes",
|
|
107
|
+
items: PANES2.map((p) => ({
|
|
108
|
+
label: `Open ${p.label.toLowerCase()}`,
|
|
109
|
+
icon: icons[p.icon],
|
|
110
|
+
keywords: ["pane", "side"],
|
|
111
|
+
onSelect: pick({ kind: "pane", pane: p.id })
|
|
112
|
+
}))
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: "Settings",
|
|
116
|
+
items: [
|
|
117
|
+
{ label: "Open settings", icon: icons.settings, shortcut: "⌘,", onSelect: pick({ kind: "settings" }) },
|
|
118
|
+
...(settings ?? []).map((s) => ({
|
|
119
|
+
label: `Settings: ${s.label}`,
|
|
120
|
+
icon: icons[s.icon],
|
|
121
|
+
keywords: [s.keywords],
|
|
122
|
+
onSelect: pick({ kind: "settings", section: s.id })
|
|
123
|
+
}))
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: "Profiles",
|
|
128
|
+
items: [
|
|
129
|
+
...profiles.map((p) => ({
|
|
130
|
+
label: `Switch to ${p.name}`,
|
|
131
|
+
icon: icons.user,
|
|
132
|
+
shortcut: p.plan,
|
|
133
|
+
keywords: [p.account, p.configDir],
|
|
134
|
+
disabled: p === active,
|
|
135
|
+
onSelect: pick({ kind: "profile", id: p.id })
|
|
136
|
+
})),
|
|
137
|
+
{ label: "Manage profiles", icon: icons.users, onSelect: pick({ kind: "profiles" }) }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
];
|
|
141
|
+
return /* @__PURE__ */ jsxs(Command, {
|
|
142
|
+
open,
|
|
143
|
+
defaultOpen,
|
|
144
|
+
onOpenChange,
|
|
145
|
+
hotkey,
|
|
146
|
+
children: [
|
|
147
|
+
trigger !== null && /* @__PURE__ */ jsx(Command.Trigger, {
|
|
148
|
+
render: trigger ?? /* @__PURE__ */ jsxs(Button, {
|
|
149
|
+
variant: "secondary",
|
|
150
|
+
size: "compact",
|
|
151
|
+
leadingIcon: icons.search,
|
|
152
|
+
"aria-label": label,
|
|
153
|
+
className,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ jsx("span", {
|
|
156
|
+
className: "hidden @lg:inline",
|
|
157
|
+
children: label
|
|
158
|
+
}),
|
|
159
|
+
hotkey && /* @__PURE__ */ jsx(Kbd, {
|
|
160
|
+
variant: "plain",
|
|
161
|
+
className: "ml-3 hidden @lg:inline-flex",
|
|
162
|
+
children: `⌘${hotkey.toUpperCase()}`
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
})
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ jsx(Command.Content, {
|
|
168
|
+
label: "Command palette",
|
|
169
|
+
placeholder: "Search sessions, commands and settings…",
|
|
170
|
+
items: groups.filter((g) => g.items.length > 0)
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
export { CommandPalette2 };
|