@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,202 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
import {
|
|
7
|
+
Section2,
|
|
8
|
+
Group2,
|
|
9
|
+
Details2,
|
|
10
|
+
Row2,
|
|
11
|
+
Facts2,
|
|
12
|
+
CardCode2,
|
|
13
|
+
Mono2,
|
|
14
|
+
Footer2
|
|
15
|
+
} from "./chunk-5meda998.js";
|
|
16
|
+
|
|
17
|
+
// blocks/settings/mcp-servers/index.tsx
|
|
18
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
19
|
+
import Badge from "@justanarthur/modo-ui/components/data-display/badge";
|
|
20
|
+
import Tooltip from "@justanarthur/modo-ui/components/overlays/tooltip";
|
|
21
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
22
|
+
/*!
|
|
23
|
+
* Local addition: the settings screen's MCP servers section — each server's
|
|
24
|
+
* state with its fix at the row's end, opening into its command or URL, env
|
|
25
|
+
* and tools.
|
|
26
|
+
*/
|
|
27
|
+
var BADGE = {
|
|
28
|
+
connected: { color: "green", label: "Connected" },
|
|
29
|
+
"needs-auth": { color: "amber", label: "Needs auth" },
|
|
30
|
+
failed: { color: "red", label: "Failed" },
|
|
31
|
+
disabled: { color: "gray", label: "Disabled" }
|
|
32
|
+
};
|
|
33
|
+
function caption(server) {
|
|
34
|
+
if (server.status === "needs-auth")
|
|
35
|
+
return `Sign in at ${server.authHost} to load its tools`;
|
|
36
|
+
if (server.status === "failed")
|
|
37
|
+
return server.error?.split(`
|
|
38
|
+
`)[0];
|
|
39
|
+
if (server.status === "disabled")
|
|
40
|
+
return `${server.transport} · ${server.scope}`;
|
|
41
|
+
return `${server.transport} · ${server.scope} · ${server.tools} tools`;
|
|
42
|
+
}
|
|
43
|
+
function source(server, configDir) {
|
|
44
|
+
if (server.scope === "project")
|
|
45
|
+
return ".mcp.json";
|
|
46
|
+
if (server.scope === "plugin")
|
|
47
|
+
return `the ${server.name} plugin`;
|
|
48
|
+
return `${configDir}/.claude.json`;
|
|
49
|
+
}
|
|
50
|
+
function Fix({ server, onFix }) {
|
|
51
|
+
const Retry = useIcon2("refresh-cw");
|
|
52
|
+
const Key = useIcon2("key");
|
|
53
|
+
if (server.status !== "needs-auth" && server.status !== "failed")
|
|
54
|
+
return null;
|
|
55
|
+
const [Icon, label] = server.status === "needs-auth" ? [Key, "Authenticate"] : [Retry, "Retry"];
|
|
56
|
+
const variant = server.status === "needs-auth" ? "tertiary" : "ghost";
|
|
57
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Button, {
|
|
60
|
+
size: "compact",
|
|
61
|
+
variant,
|
|
62
|
+
leadingIcon: Icon,
|
|
63
|
+
className: "hidden @md:inline-flex",
|
|
64
|
+
onClick: onFix,
|
|
65
|
+
children: label
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ jsx(Tooltip, {
|
|
68
|
+
content: label,
|
|
69
|
+
side: "top",
|
|
70
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
71
|
+
size: "icon-compact",
|
|
72
|
+
variant,
|
|
73
|
+
"aria-label": `${label} ${server.name}`,
|
|
74
|
+
className: "@md:hidden",
|
|
75
|
+
onClick: onFix,
|
|
76
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function ServerCard({
|
|
83
|
+
server,
|
|
84
|
+
configDir,
|
|
85
|
+
onEdit,
|
|
86
|
+
onToggle
|
|
87
|
+
}) {
|
|
88
|
+
const facts = [
|
|
89
|
+
[server.transport === "stdio" ? "Command" : "URL", /* @__PURE__ */ jsx(Mono2, {
|
|
90
|
+
children: server.target
|
|
91
|
+
}, "t")],
|
|
92
|
+
["Env", server.env ? /* @__PURE__ */ jsx(Mono2, {
|
|
93
|
+
children: server.env.join(", ")
|
|
94
|
+
}, "e") : "None"]
|
|
95
|
+
];
|
|
96
|
+
if (server.toolNames) {
|
|
97
|
+
const more = server.tools - server.toolNames.length;
|
|
98
|
+
facts.push([
|
|
99
|
+
"Tools",
|
|
100
|
+
/* @__PURE__ */ jsxs(Mono2, {
|
|
101
|
+
children: [
|
|
102
|
+
server.toolNames.join(", "),
|
|
103
|
+
more > 0 && `, +${more} more`
|
|
104
|
+
]
|
|
105
|
+
}, "tools")
|
|
106
|
+
]);
|
|
107
|
+
}
|
|
108
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
109
|
+
children: [
|
|
110
|
+
server.status === "needs-auth" && /* @__PURE__ */ jsxs("p", {
|
|
111
|
+
className: "m-0 text-body text-foreground",
|
|
112
|
+
children: [
|
|
113
|
+
"Authenticate opens ",
|
|
114
|
+
server.authHost,
|
|
115
|
+
" in your browser. The token is kept in this profile's keychain entry, so other profiles sign in on their own."
|
|
116
|
+
]
|
|
117
|
+
}),
|
|
118
|
+
server.error && /* @__PURE__ */ jsx(CardCode2, {
|
|
119
|
+
language: "txt",
|
|
120
|
+
children: server.error
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx(Facts2, {
|
|
123
|
+
items: facts
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ jsxs(Footer2, {
|
|
126
|
+
source: source(server, configDir),
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ jsx(Button, {
|
|
129
|
+
size: "compact",
|
|
130
|
+
variant: "ghost",
|
|
131
|
+
onClick: onEdit,
|
|
132
|
+
children: "Edit"
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ jsx(Button, {
|
|
135
|
+
size: "compact",
|
|
136
|
+
variant: "ghost",
|
|
137
|
+
onClick: onToggle,
|
|
138
|
+
children: server.status === "disabled" ? "Enable" : "Disable"
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function McpServers2({
|
|
146
|
+
servers,
|
|
147
|
+
configDir,
|
|
148
|
+
defaultOpen,
|
|
149
|
+
onAdd,
|
|
150
|
+
onAuthenticate,
|
|
151
|
+
onRetry,
|
|
152
|
+
onEdit,
|
|
153
|
+
onToggle
|
|
154
|
+
}) {
|
|
155
|
+
const Plus = useIcon2("plus");
|
|
156
|
+
const attention = servers.filter((s) => s.status === "needs-auth" || s.status === "failed").length;
|
|
157
|
+
return /* @__PURE__ */ jsx(Section2, {
|
|
158
|
+
title: "MCP servers",
|
|
159
|
+
lead: "Tools the sessions can call. ai-app is this app's own server: it answers permission prompts and serves your extensions.",
|
|
160
|
+
actions: /* @__PURE__ */ jsx(Button, {
|
|
161
|
+
size: "compact",
|
|
162
|
+
leadingIcon: Plus,
|
|
163
|
+
onClick: onAdd,
|
|
164
|
+
children: "Add server"
|
|
165
|
+
}),
|
|
166
|
+
children: /* @__PURE__ */ jsx(Group2, {
|
|
167
|
+
title: "Servers",
|
|
168
|
+
aside: /* @__PURE__ */ jsx("span", {
|
|
169
|
+
className: "tabular-nums",
|
|
170
|
+
children: `${servers.length} · ${attention} need you`
|
|
171
|
+
}),
|
|
172
|
+
children: /* @__PURE__ */ jsx(Details2, {
|
|
173
|
+
label: "MCP servers",
|
|
174
|
+
actions: "button",
|
|
175
|
+
defaultOpen,
|
|
176
|
+
children: servers.map((server, i) => /* @__PURE__ */ jsx(Row2, {
|
|
177
|
+
value: server.name,
|
|
178
|
+
index: i,
|
|
179
|
+
label: server.name,
|
|
180
|
+
caption: caption(server),
|
|
181
|
+
meta: /* @__PURE__ */ jsx(Badge, {
|
|
182
|
+
size: "compact",
|
|
183
|
+
variant: "dot",
|
|
184
|
+
color: BADGE[server.status].color,
|
|
185
|
+
children: BADGE[server.status].label
|
|
186
|
+
}),
|
|
187
|
+
action: /* @__PURE__ */ jsx(Fix, {
|
|
188
|
+
server,
|
|
189
|
+
onFix: () => (server.status === "needs-auth" ? onAuthenticate : onRetry)?.(server)
|
|
190
|
+
}),
|
|
191
|
+
children: /* @__PURE__ */ jsx(ServerCard, {
|
|
192
|
+
server,
|
|
193
|
+
configDir,
|
|
194
|
+
onEdit: () => onEdit?.(server),
|
|
195
|
+
onToggle: () => onToggle?.(server)
|
|
196
|
+
})
|
|
197
|
+
}, server.name))
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
export { McpServers2 };
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// blocks/conversation/transcript-search/index.tsx
|
|
8
|
+
import { FluidHoverHighlight, useFluidHover, useRegisterFluidHoverItem } from "@justanarthur/modo-ui";
|
|
9
|
+
import Kbd from "@justanarthur/modo-ui/components/data-display/kbd";
|
|
10
|
+
import Input from "@justanarthur/modo-ui/components/inputs/input";
|
|
11
|
+
import Select from "@justanarthur/modo-ui/components/inputs/select";
|
|
12
|
+
import Dialog from "@justanarthur/modo-ui/components/overlays/dialog";
|
|
13
|
+
import { useShape } from "@justanarthur/modo-ui/lib/shape-context";
|
|
14
|
+
import { useControllableState } from "@justanarthur/modo-ui/lib/use-controllable-state";
|
|
15
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
16
|
+
import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
|
|
17
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
18
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
19
|
+
/*!
|
|
20
|
+
* Local addition: the AI app's search across transcripts. A query field,
|
|
21
|
+
* project / profile / date filters, and the matching lines grouped by
|
|
22
|
+
* session with a line of context on each side. The input keeps focus while
|
|
23
|
+
* the arrow keys move one fluid highlight through the hits, as Command's
|
|
24
|
+
* list does; Enter opens the hit.
|
|
25
|
+
*/
|
|
26
|
+
var ALL = "*";
|
|
27
|
+
var RANGES = ["any", "today", "week", "month"];
|
|
28
|
+
var RANGE_DAYS = {
|
|
29
|
+
any: Number.POSITIVE_INFINITY,
|
|
30
|
+
today: 0,
|
|
31
|
+
week: 7,
|
|
32
|
+
month: 30
|
|
33
|
+
};
|
|
34
|
+
var RANGE_LABEL = {
|
|
35
|
+
any: "Any time",
|
|
36
|
+
today: "Today",
|
|
37
|
+
week: "Past 7 days",
|
|
38
|
+
month: "Past 30 days"
|
|
39
|
+
};
|
|
40
|
+
var ROLE_LABEL = { user: "You", assistant: "Claude", tool: "Tool" };
|
|
41
|
+
var PER_SESSION = 4;
|
|
42
|
+
function search(sessions, query) {
|
|
43
|
+
const q = query.trim().toLowerCase();
|
|
44
|
+
if (!q)
|
|
45
|
+
return [];
|
|
46
|
+
return sessions.map((session) => {
|
|
47
|
+
const hits = [];
|
|
48
|
+
for (const message of session.messages) {
|
|
49
|
+
const lines = message.text.split(`
|
|
50
|
+
`);
|
|
51
|
+
lines.forEach((line, i) => {
|
|
52
|
+
if (line.toLowerCase().includes(q))
|
|
53
|
+
hits.push({ session, message, before: lines[i - 1], line, after: lines[i + 1] });
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return { session, hits };
|
|
57
|
+
}).filter((group) => group.hits.length > 0);
|
|
58
|
+
}
|
|
59
|
+
function Highlighted({ text, query }) {
|
|
60
|
+
const q = query.trim().toLowerCase();
|
|
61
|
+
const parts = [];
|
|
62
|
+
let from = 0;
|
|
63
|
+
for (let at = text.toLowerCase().indexOf(q, from);q && at !== -1; at = text.toLowerCase().indexOf(q, from)) {
|
|
64
|
+
if (at > from)
|
|
65
|
+
parts.push({ text: text.slice(from, at), match: false });
|
|
66
|
+
parts.push({ text: text.slice(at, at + q.length), match: true });
|
|
67
|
+
from = at + q.length;
|
|
68
|
+
}
|
|
69
|
+
parts.push({ text: text.slice(from), match: false });
|
|
70
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
71
|
+
children: parts.map((part, i) => part.match ? /* @__PURE__ */ jsx("mark", {
|
|
72
|
+
className: "rounded-glyph bg-status-warning/16 text-foreground",
|
|
73
|
+
children: part.text
|
|
74
|
+
}, i) : part.text)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function HitRow({
|
|
78
|
+
hit,
|
|
79
|
+
query,
|
|
80
|
+
index,
|
|
81
|
+
active,
|
|
82
|
+
id,
|
|
83
|
+
register,
|
|
84
|
+
onHover,
|
|
85
|
+
onOpen
|
|
86
|
+
}) {
|
|
87
|
+
const ref = useRef(null);
|
|
88
|
+
const shape = useShape();
|
|
89
|
+
useRegisterFluidHoverItem(register, index, ref);
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (active)
|
|
92
|
+
ref.current?.scrollIntoView({ block: "nearest" });
|
|
93
|
+
}, [active]);
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
95
|
+
ref,
|
|
96
|
+
id,
|
|
97
|
+
role: "option",
|
|
98
|
+
"aria-selected": active,
|
|
99
|
+
tabIndex: -1,
|
|
100
|
+
onPointerMove: () => onHover(index),
|
|
101
|
+
onClick: onOpen,
|
|
102
|
+
className: cn("relative z-10 flex cursor-pointer gap-[var(--space-3)] px-[var(--space-2)] py-[var(--space-2)] text-caption", shape.item),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx("span", {
|
|
105
|
+
className: "w-12 shrink-0 text-muted-foreground",
|
|
106
|
+
children: ROLE_LABEL[hit.message.role]
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsxs("span", {
|
|
109
|
+
className: "flex min-w-0 flex-1 flex-col font-mono",
|
|
110
|
+
children: [
|
|
111
|
+
hit.before && /* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "truncate text-muted-foreground",
|
|
113
|
+
children: hit.before
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ jsx("span", {
|
|
116
|
+
className: "truncate text-foreground",
|
|
117
|
+
children: /* @__PURE__ */ jsx(Highlighted, {
|
|
118
|
+
text: hit.line,
|
|
119
|
+
query
|
|
120
|
+
})
|
|
121
|
+
}),
|
|
122
|
+
hit.after && /* @__PURE__ */ jsx("span", {
|
|
123
|
+
className: "truncate text-muted-foreground",
|
|
124
|
+
children: hit.after
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ jsx("span", {
|
|
129
|
+
className: "shrink-0 tabular-nums text-muted-foreground",
|
|
130
|
+
children: hit.message.when
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function TranscriptSearchPanel2({
|
|
136
|
+
sessions,
|
|
137
|
+
projects,
|
|
138
|
+
profiles,
|
|
139
|
+
query,
|
|
140
|
+
defaultQuery = "",
|
|
141
|
+
onQueryChange,
|
|
142
|
+
defaultProject = "",
|
|
143
|
+
defaultProfile = "",
|
|
144
|
+
defaultRange = "any",
|
|
145
|
+
onOpen,
|
|
146
|
+
className
|
|
147
|
+
}) {
|
|
148
|
+
const [q, setQ] = useControllableState(query, defaultQuery, onQueryChange);
|
|
149
|
+
const [project, setProject] = useState(defaultProject || ALL);
|
|
150
|
+
const [profile, setProfile] = useState(defaultProfile || ALL);
|
|
151
|
+
const [range, setRange] = useState(defaultRange);
|
|
152
|
+
const [active, setActive] = useState(0);
|
|
153
|
+
const containerRef = useRef(null);
|
|
154
|
+
const { itemRects, isMeasured, registerItem } = useFluidHover(containerRef);
|
|
155
|
+
const shape = useShape();
|
|
156
|
+
const listId = useId();
|
|
157
|
+
const SearchIcon = useIcon2("search");
|
|
158
|
+
const scoped = sessions.filter((s) => (project === ALL || s.project === project) && (profile === ALL || s.profile === profile) && s.daysAgo <= RANGE_DAYS[range]);
|
|
159
|
+
const groups = search(scoped, q).map((g) => ({ ...g, shown: g.hits.slice(0, PER_SESSION) }));
|
|
160
|
+
const hits = groups.flatMap((g) => g.shown);
|
|
161
|
+
const current = Math.min(active, hits.length - 1);
|
|
162
|
+
const rect = isMeasured && current >= 0 ? itemRects[current] ?? null : null;
|
|
163
|
+
const total = groups.reduce((n, g) => n + g.hits.length, 0);
|
|
164
|
+
const open = (hit) => hit && onOpen?.(hit.session.id, hit.message.id);
|
|
165
|
+
const onKeyDown = (event) => {
|
|
166
|
+
if (hits.length === 0)
|
|
167
|
+
return;
|
|
168
|
+
const step = (by) => setActive((a) => (Math.min(a, hits.length - 1) + by + hits.length) % hits.length);
|
|
169
|
+
if (event.key === "ArrowDown")
|
|
170
|
+
step(1);
|
|
171
|
+
else if (event.key === "ArrowUp")
|
|
172
|
+
step(-1);
|
|
173
|
+
else if (event.key === "Home")
|
|
174
|
+
setActive(0);
|
|
175
|
+
else if (event.key === "End")
|
|
176
|
+
setActive(hits.length - 1);
|
|
177
|
+
else if (event.key === "Enter")
|
|
178
|
+
open(hits[current]);
|
|
179
|
+
else
|
|
180
|
+
return;
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
};
|
|
183
|
+
const projectLabel = (path) => projects.find((p) => p.path === path)?.label ?? path;
|
|
184
|
+
const profileLabel = (id) => profiles.find((p) => p.id === id)?.name ?? id;
|
|
185
|
+
let index = 0;
|
|
186
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
187
|
+
className: cn("flex min-h-0 flex-col gap-[var(--space-3)]", className),
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx(Input, {
|
|
190
|
+
autoFocus: true,
|
|
191
|
+
variant: "bordered",
|
|
192
|
+
icon: SearchIcon,
|
|
193
|
+
placeholder: "Search every transcript…",
|
|
194
|
+
"aria-label": "Search transcripts",
|
|
195
|
+
role: "combobox",
|
|
196
|
+
"aria-expanded": hits.length > 0,
|
|
197
|
+
"aria-controls": listId,
|
|
198
|
+
"aria-activedescendant": current >= 0 ? `${listId}-${current}` : undefined,
|
|
199
|
+
value: q,
|
|
200
|
+
onValueChange: (value) => {
|
|
201
|
+
setQ(value);
|
|
202
|
+
setActive(0);
|
|
203
|
+
},
|
|
204
|
+
onKeyDown
|
|
205
|
+
}),
|
|
206
|
+
/* @__PURE__ */ jsxs("div", {
|
|
207
|
+
className: "flex flex-wrap items-center gap-[var(--space-1)]",
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
210
|
+
value: project,
|
|
211
|
+
onValueChange: setProject,
|
|
212
|
+
size: "compact",
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ jsx(Select.Trigger, {
|
|
215
|
+
variant: "borderless",
|
|
216
|
+
"aria-label": "Project"
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ jsx(Select.Content, {
|
|
219
|
+
children: [{ label: "All projects", path: ALL }, ...projects].map((p, i) => /* @__PURE__ */ jsx(Select.Item, {
|
|
220
|
+
index: i,
|
|
221
|
+
value: p.path,
|
|
222
|
+
children: p.label
|
|
223
|
+
}, p.path))
|
|
224
|
+
})
|
|
225
|
+
]
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
228
|
+
value: profile,
|
|
229
|
+
onValueChange: setProfile,
|
|
230
|
+
size: "compact",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ jsx(Select.Trigger, {
|
|
233
|
+
variant: "borderless",
|
|
234
|
+
"aria-label": "Profile"
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ jsx(Select.Content, {
|
|
237
|
+
children: [{ name: "All profiles", id: ALL }, ...profiles].map((p, i) => /* @__PURE__ */ jsx(Select.Item, {
|
|
238
|
+
index: i,
|
|
239
|
+
value: p.id,
|
|
240
|
+
children: p.name
|
|
241
|
+
}, p.id))
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
246
|
+
value: range,
|
|
247
|
+
onValueChange: (value) => setRange(RANGES.find((r) => r === value) ?? "any"),
|
|
248
|
+
size: "compact",
|
|
249
|
+
children: [
|
|
250
|
+
/* @__PURE__ */ jsx(Select.Trigger, {
|
|
251
|
+
variant: "borderless",
|
|
252
|
+
"aria-label": "Date"
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ jsx(Select.Content, {
|
|
255
|
+
children: RANGES.map((r, i) => /* @__PURE__ */ jsx(Select.Item, {
|
|
256
|
+
index: i,
|
|
257
|
+
value: r,
|
|
258
|
+
children: RANGE_LABEL[r]
|
|
259
|
+
}, r))
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
}),
|
|
263
|
+
q.trim() && /* @__PURE__ */ jsx("span", {
|
|
264
|
+
"aria-live": "polite",
|
|
265
|
+
className: "ml-auto pr-[var(--space-2)] text-caption tabular-nums text-muted-foreground",
|
|
266
|
+
children: total === 0 ? "No matches" : `${total} ${total === 1 ? "match" : "matches"} in ${groups.length} ${groups.length === 1 ? "session" : "sessions"}`
|
|
267
|
+
})
|
|
268
|
+
]
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
271
|
+
className: "min-h-0 flex-1",
|
|
272
|
+
viewportClassName: "scroll-fade",
|
|
273
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
274
|
+
ref: containerRef,
|
|
275
|
+
id: listId,
|
|
276
|
+
role: "listbox",
|
|
277
|
+
"aria-label": "Matches",
|
|
278
|
+
className: "@container relative flex flex-col gap-[var(--space-3)]",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ jsx(FluidHoverHighlight, {
|
|
281
|
+
rect,
|
|
282
|
+
session: 0,
|
|
283
|
+
className: shape.bg
|
|
284
|
+
}),
|
|
285
|
+
groups.map((group) => /* @__PURE__ */ jsxs("section", {
|
|
286
|
+
"aria-label": group.session.title,
|
|
287
|
+
className: "flex flex-col",
|
|
288
|
+
children: [
|
|
289
|
+
/* @__PURE__ */ jsxs("div", {
|
|
290
|
+
className: "flex items-baseline gap-[var(--space-2)] px-[var(--space-2)] pb-[var(--space-1)]",
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ jsx("span", {
|
|
293
|
+
className: "min-w-0 truncate text-body weight-medium text-foreground",
|
|
294
|
+
children: group.session.title
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ jsxs("span", {
|
|
297
|
+
className: "min-w-0 truncate text-caption text-muted-foreground",
|
|
298
|
+
children: [
|
|
299
|
+
projectLabel(group.session.project),
|
|
300
|
+
" · ",
|
|
301
|
+
profileLabel(group.session.profile)
|
|
302
|
+
]
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ jsx("span", {
|
|
305
|
+
className: "ml-auto shrink-0 text-caption tabular-nums text-muted-foreground",
|
|
306
|
+
children: group.hits.length > group.shown.length ? `+${group.hits.length - group.shown.length} more` : ""
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
310
|
+
group.shown.map((hit) => {
|
|
311
|
+
const i = index++;
|
|
312
|
+
return /* @__PURE__ */ jsx(HitRow, {
|
|
313
|
+
hit,
|
|
314
|
+
query: q,
|
|
315
|
+
index: i,
|
|
316
|
+
id: `${listId}-${i}`,
|
|
317
|
+
active: i === current,
|
|
318
|
+
register: registerItem,
|
|
319
|
+
onHover: setActive,
|
|
320
|
+
onOpen: () => open(hit)
|
|
321
|
+
}, `${hit.message.id}-${hit.line}`);
|
|
322
|
+
})
|
|
323
|
+
]
|
|
324
|
+
}, group.session.id)),
|
|
325
|
+
q.trim() && total === 0 && /* @__PURE__ */ jsxs("span", {
|
|
326
|
+
className: "px-[var(--space-4)] py-[var(--space-6)] text-center text-body text-muted-foreground",
|
|
327
|
+
children: [
|
|
328
|
+
"Nothing in ",
|
|
329
|
+
scoped.length,
|
|
330
|
+
" ",
|
|
331
|
+
scoped.length === 1 ? "transcript" : "transcripts",
|
|
332
|
+
" says “",
|
|
333
|
+
q.trim(),
|
|
334
|
+
"”."
|
|
335
|
+
]
|
|
336
|
+
}),
|
|
337
|
+
!q.trim() && /* @__PURE__ */ jsxs("span", {
|
|
338
|
+
className: "px-[var(--space-4)] py-[var(--space-6)] text-center text-body text-muted-foreground",
|
|
339
|
+
children: [
|
|
340
|
+
"Search what you asked, what Claude answered and what the tools printed, across ",
|
|
341
|
+
scoped.length,
|
|
342
|
+
" ",
|
|
343
|
+
scoped.length === 1 ? "session" : "sessions",
|
|
344
|
+
"."
|
|
345
|
+
]
|
|
346
|
+
})
|
|
347
|
+
]
|
|
348
|
+
})
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ jsxs("div", {
|
|
351
|
+
className: "flex items-center gap-[var(--space-3)] px-[var(--space-2)] text-caption text-muted-foreground",
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ jsxs("span", {
|
|
354
|
+
className: "flex items-center gap-[var(--space-1)]",
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ jsx(Kbd, {
|
|
357
|
+
children: "↑"
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ jsx(Kbd, {
|
|
360
|
+
children: "↓"
|
|
361
|
+
}),
|
|
362
|
+
" move"
|
|
363
|
+
]
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ jsxs("span", {
|
|
366
|
+
className: "flex items-center gap-[var(--space-1)]",
|
|
367
|
+
children: [
|
|
368
|
+
/* @__PURE__ */ jsx(Kbd, {
|
|
369
|
+
children: "↵"
|
|
370
|
+
}),
|
|
371
|
+
" open"
|
|
372
|
+
]
|
|
373
|
+
}),
|
|
374
|
+
/* @__PURE__ */ jsxs("span", {
|
|
375
|
+
className: "flex items-center gap-[var(--space-1)]",
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ jsx(Kbd, {
|
|
378
|
+
children: "Esc"
|
|
379
|
+
}),
|
|
380
|
+
" close"
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
var TranscriptSearch2 = Object.assign(function TranscriptSearch({
|
|
389
|
+
trigger,
|
|
390
|
+
open,
|
|
391
|
+
defaultOpen = false,
|
|
392
|
+
onOpenChange,
|
|
393
|
+
onOpen,
|
|
394
|
+
...panel
|
|
395
|
+
}) {
|
|
396
|
+
const [isOpen, setOpen] = useControllableState(open, defaultOpen, onOpenChange);
|
|
397
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
398
|
+
open: isOpen,
|
|
399
|
+
onOpenChange: setOpen,
|
|
400
|
+
children: [
|
|
401
|
+
trigger && /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
402
|
+
render: trigger
|
|
403
|
+
}),
|
|
404
|
+
/* @__PURE__ */ jsx(Dialog.Content, {
|
|
405
|
+
width: "xl",
|
|
406
|
+
position: "top",
|
|
407
|
+
"aria-label": "Search transcripts",
|
|
408
|
+
className: "flex h-[min(560px,76dvh)] flex-col p-4",
|
|
409
|
+
children: /* @__PURE__ */ jsx(TranscriptSearchPanel2, {
|
|
410
|
+
...panel,
|
|
411
|
+
className: "flex-1",
|
|
412
|
+
onOpen: (sessionId, messageId) => {
|
|
413
|
+
onOpen?.(sessionId, messageId);
|
|
414
|
+
setOpen(false);
|
|
415
|
+
}
|
|
416
|
+
})
|
|
417
|
+
})
|
|
418
|
+
]
|
|
419
|
+
});
|
|
420
|
+
}, { Panel: TranscriptSearchPanel2 });
|
|
421
|
+
var transcript_search_default = TranscriptSearch2;
|
|
422
|
+
|
|
423
|
+
export { TranscriptSearchPanel2, TranscriptSearch2, transcript_search_default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// lib/side-pane-types.ts
|
|
2
|
+
/*!
|
|
3
|
+
* Local addition: the side pane's data shapes — the session's changed files,
|
|
4
|
+
* an open file, a shell, a pull request with its checks and reviews,
|
|
5
|
+
* artifacts and background tasks. The pane blocks take these through props;
|
|
6
|
+
* the pages fill them from mock/mock-panes.ts.
|
|
7
|
+
*/
|