@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,258 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// blocks/conversation/failure-states/index.tsx
|
|
8
|
+
import { SurfaceProvider, useSurface } from "@justanarthur/modo-ui";
|
|
9
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
10
|
+
import LogView from "@justanarthur/modo-ui/components/data-display/log-view";
|
|
11
|
+
import Meter from "@justanarthur/modo-ui/components/feedback/meter";
|
|
12
|
+
import { Spinner } from "@justanarthur/modo-ui/components/feedback/progress";
|
|
13
|
+
import { useShape } from "@justanarthur/modo-ui/lib/shape-context";
|
|
14
|
+
import { SURFACE_BG } from "@justanarthur/modo-ui/lib/surface-classes";
|
|
15
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
16
|
+
import { useState } from "react";
|
|
17
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
18
|
+
/*!
|
|
19
|
+
* Local addition: the AI app's error and degraded states in one block — the
|
|
20
|
+
* claude process crashed, the connection is coming back, a profile hit its
|
|
21
|
+
* limit, the machine is offline, a sign-in expired. Each is a banner over
|
|
22
|
+
* the transcript or a full empty state, with the one action that gets the
|
|
23
|
+
* session going again.
|
|
24
|
+
*/
|
|
25
|
+
var ICON = {
|
|
26
|
+
"cli-crashed": { icon: "circle-x", tone: "text-status-error" },
|
|
27
|
+
"rate-limited": { icon: "gauge", tone: "text-status-warning" },
|
|
28
|
+
offline: { icon: "cloud", tone: "text-muted-foreground" },
|
|
29
|
+
"auth-expired": { icon: "key", tone: "text-status-warning" }
|
|
30
|
+
};
|
|
31
|
+
function FailureState2({
|
|
32
|
+
kind,
|
|
33
|
+
variant = "banner",
|
|
34
|
+
profile,
|
|
35
|
+
stderr = [],
|
|
36
|
+
exitCode,
|
|
37
|
+
attempt = 1,
|
|
38
|
+
maxAttempts = 5,
|
|
39
|
+
retryIn,
|
|
40
|
+
resetsIn,
|
|
41
|
+
alternatives = [],
|
|
42
|
+
onRestart,
|
|
43
|
+
onRetry,
|
|
44
|
+
onSwitchProfile,
|
|
45
|
+
onLogin,
|
|
46
|
+
onDismiss,
|
|
47
|
+
className
|
|
48
|
+
}) {
|
|
49
|
+
const [showLog, setShowLog] = useState(variant === "page");
|
|
50
|
+
const shape = useShape();
|
|
51
|
+
const level = Math.min(useSurface() + 1, 8);
|
|
52
|
+
const X = useIcon2("x");
|
|
53
|
+
const Retry = useIcon2("rotate-ccw");
|
|
54
|
+
const Terminal = useIcon2("terminal");
|
|
55
|
+
const Key = useIcon2("key");
|
|
56
|
+
const page = variant === "page";
|
|
57
|
+
const name = profile?.name ?? "this profile";
|
|
58
|
+
const copy = {
|
|
59
|
+
"cli-crashed": {
|
|
60
|
+
title: "claude stopped",
|
|
61
|
+
detail: `The process exited${exitCode === undefined ? "" : ` (${exitCode})`}. The transcript is kept; Restart picks the session up where it was.`
|
|
62
|
+
},
|
|
63
|
+
reconnecting: {
|
|
64
|
+
title: "Reconnecting…",
|
|
65
|
+
detail: `Attempt ${attempt} of ${maxAttempts}${retryIn ? ` · next in ${retryIn}` : ""}. Replies resume once it is back.`
|
|
66
|
+
},
|
|
67
|
+
"rate-limited": {
|
|
68
|
+
title: `${name} hit its limit`,
|
|
69
|
+
detail: `${resetsIn ? `It resets ${resetsIn}.` : "It resets soon."}${alternatives.length > 0 ? " Move the session to a profile with room, or wait." : ""}`
|
|
70
|
+
},
|
|
71
|
+
offline: {
|
|
72
|
+
title: "You are offline",
|
|
73
|
+
detail: "Sessions pause until the network is back; nothing you typed is lost."
|
|
74
|
+
},
|
|
75
|
+
"auth-expired": {
|
|
76
|
+
title: `${name} is signed out`,
|
|
77
|
+
detail: `The sign-in for ${profile?.configDir ?? "its config dir"} expired. Sign in again to keep going.`
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const icon = kind === "reconnecting" ? /* @__PURE__ */ jsx(Spinner, {
|
|
81
|
+
className: page ? "size-5" : "size-4"
|
|
82
|
+
}) : /* @__PURE__ */ jsx(Glyph, {
|
|
83
|
+
icon: ICON[kind].icon,
|
|
84
|
+
className: ICON[kind].tone,
|
|
85
|
+
size: page ? 20 : 16
|
|
86
|
+
});
|
|
87
|
+
const actions = /* @__PURE__ */ jsxs(Fragment, {
|
|
88
|
+
children: [
|
|
89
|
+
kind === "cli-crashed" && !page && stderr.length > 0 && /* @__PURE__ */ jsx(Button, {
|
|
90
|
+
variant: "ghost",
|
|
91
|
+
size: "compact",
|
|
92
|
+
leadingIcon: Terminal,
|
|
93
|
+
active: showLog,
|
|
94
|
+
onClick: () => setShowLog(!showLog),
|
|
95
|
+
children: "Output"
|
|
96
|
+
}),
|
|
97
|
+
kind === "cli-crashed" && /* @__PURE__ */ jsx(Button, {
|
|
98
|
+
variant: page ? "primary" : "secondary",
|
|
99
|
+
size: "compact",
|
|
100
|
+
leadingIcon: Retry,
|
|
101
|
+
onClick: onRestart,
|
|
102
|
+
children: "Restart"
|
|
103
|
+
}),
|
|
104
|
+
(kind === "reconnecting" || kind === "offline") && /* @__PURE__ */ jsx(Button, {
|
|
105
|
+
variant: "secondary",
|
|
106
|
+
size: "compact",
|
|
107
|
+
onClick: onRetry,
|
|
108
|
+
children: "Retry now"
|
|
109
|
+
}),
|
|
110
|
+
kind === "rate-limited" && alternatives.slice(0, page ? 3 : 1).map((alt, i) => /* @__PURE__ */ jsxs(Button, {
|
|
111
|
+
variant: i === 0 ? "secondary" : "ghost",
|
|
112
|
+
size: "compact",
|
|
113
|
+
onClick: () => onSwitchProfile?.(alt.id),
|
|
114
|
+
children: [
|
|
115
|
+
"Continue in ",
|
|
116
|
+
alt.name
|
|
117
|
+
]
|
|
118
|
+
}, alt.id)),
|
|
119
|
+
kind === "auth-expired" && /* @__PURE__ */ jsx(Button, {
|
|
120
|
+
variant: page ? "primary" : "secondary",
|
|
121
|
+
size: "compact",
|
|
122
|
+
leadingIcon: Key,
|
|
123
|
+
onClick: onLogin,
|
|
124
|
+
children: "Sign in again"
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
const progress = kind === "reconnecting" && /* @__PURE__ */ jsx(Meter, {
|
|
129
|
+
variant: "line",
|
|
130
|
+
label: "Reconnect attempts",
|
|
131
|
+
value: attempt,
|
|
132
|
+
max: maxAttempts,
|
|
133
|
+
className: page ? "w-48" : "w-16"
|
|
134
|
+
});
|
|
135
|
+
const log = kind === "cli-crashed" && showLog && stderr.length > 0 && /* @__PURE__ */ jsx(LogView, {
|
|
136
|
+
label: "claude stderr",
|
|
137
|
+
lines: stderr,
|
|
138
|
+
prompt: "",
|
|
139
|
+
maxHeight: page ? 220 : 140,
|
|
140
|
+
wrap: true,
|
|
141
|
+
className: "w-full"
|
|
142
|
+
});
|
|
143
|
+
if (page)
|
|
144
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
145
|
+
role: kind === "reconnecting" ? "status" : "alert",
|
|
146
|
+
className: cn("flex h-full w-full flex-col items-center justify-center gap-[var(--space-4)] p-[var(--space-6)]", className),
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsxs("div", {
|
|
149
|
+
className: "flex max-w-md flex-col items-center gap-[var(--space-2)] text-center",
|
|
150
|
+
children: [
|
|
151
|
+
icon,
|
|
152
|
+
/* @__PURE__ */ jsx("h2", {
|
|
153
|
+
className: "m-0 text-title text-foreground",
|
|
154
|
+
children: copy[kind].title
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsx("p", {
|
|
157
|
+
className: "m-0 text-body text-muted-foreground",
|
|
158
|
+
children: copy[kind].detail
|
|
159
|
+
}),
|
|
160
|
+
kind === "rate-limited" && profile && /* @__PURE__ */ jsx(LimitMeters, {
|
|
161
|
+
profile
|
|
162
|
+
}),
|
|
163
|
+
progress
|
|
164
|
+
]
|
|
165
|
+
}),
|
|
166
|
+
log && /* @__PURE__ */ jsx("div", {
|
|
167
|
+
className: "flex w-full max-w-xl",
|
|
168
|
+
children: log
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ jsx("div", {
|
|
171
|
+
className: "flex flex-wrap items-center justify-center gap-[var(--space-2)]",
|
|
172
|
+
children: actions
|
|
173
|
+
})
|
|
174
|
+
]
|
|
175
|
+
});
|
|
176
|
+
return /* @__PURE__ */ jsx(SurfaceProvider, {
|
|
177
|
+
value: level,
|
|
178
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
179
|
+
role: kind === "reconnecting" ? "status" : "alert",
|
|
180
|
+
className: cn("flex flex-col gap-[var(--space-2)] border border-border p-[var(--space-2)] pl-[var(--space-3)]", SURFACE_BG[level], shape.container, className),
|
|
181
|
+
children: [
|
|
182
|
+
/* @__PURE__ */ jsxs("div", {
|
|
183
|
+
className: "flex items-center gap-[var(--space-3)]",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ jsx("span", {
|
|
186
|
+
className: "flex shrink-0",
|
|
187
|
+
children: icon
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ jsxs("div", {
|
|
190
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ jsx("span", {
|
|
193
|
+
className: "truncate text-body weight-medium text-foreground",
|
|
194
|
+
children: copy[kind].title
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ jsx("span", {
|
|
197
|
+
className: "truncate text-caption text-muted-foreground",
|
|
198
|
+
children: copy[kind].detail
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}),
|
|
202
|
+
progress,
|
|
203
|
+
/* @__PURE__ */ jsxs("div", {
|
|
204
|
+
className: "flex shrink-0 items-center gap-[var(--space-1)]",
|
|
205
|
+
children: [
|
|
206
|
+
actions,
|
|
207
|
+
onDismiss && /* @__PURE__ */ jsx(Button, {
|
|
208
|
+
variant: "ghost",
|
|
209
|
+
size: "icon-compact",
|
|
210
|
+
"aria-label": "Dismiss",
|
|
211
|
+
onClick: onDismiss,
|
|
212
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
213
|
+
})
|
|
214
|
+
]
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
}),
|
|
218
|
+
log
|
|
219
|
+
]
|
|
220
|
+
})
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
function Glyph({ icon, className, size }) {
|
|
224
|
+
const Icon = useIcon2(icon);
|
|
225
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
226
|
+
size,
|
|
227
|
+
strokeWidth: 1.5,
|
|
228
|
+
className
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
function LimitMeters({ profile }) {
|
|
232
|
+
return /* @__PURE__ */ jsx("div", {
|
|
233
|
+
className: "flex w-64 flex-col gap-[var(--space-1)] pt-[var(--space-2)]",
|
|
234
|
+
children: profile.limits.map((limit) => /* @__PURE__ */ jsxs("div", {
|
|
235
|
+
className: "flex items-center gap-[var(--space-2)] text-caption",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ jsx("span", {
|
|
238
|
+
className: "w-32 shrink-0 truncate text-left text-muted-foreground",
|
|
239
|
+
children: limit.label
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ jsx(Meter, {
|
|
242
|
+
variant: "line",
|
|
243
|
+
label: limit.label,
|
|
244
|
+
value: limit.value,
|
|
245
|
+
className: "flex-1"
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ jsxs("span", {
|
|
248
|
+
className: "w-10 shrink-0 text-right tabular-nums text-muted-foreground",
|
|
249
|
+
children: [
|
|
250
|
+
Math.round(limit.value * 100),
|
|
251
|
+
"%"
|
|
252
|
+
]
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
}, limit.label))
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
export { FailureState2 };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PromptCard2
|
|
5
|
+
} from "./chunk-zk0t4vq5.js";
|
|
6
|
+
import {
|
|
7
|
+
PermissionRequest2
|
|
8
|
+
} from "./chunk-gewnsgza.js";
|
|
9
|
+
import {
|
|
10
|
+
PlanApproval2
|
|
11
|
+
} from "./chunk-6220dy5n.js";
|
|
12
|
+
import {
|
|
13
|
+
QuestionPrompt2
|
|
14
|
+
} from "./chunk-paezqfg1.js";
|
|
15
|
+
|
|
16
|
+
// blocks/conversation/agent-prompt/index.tsx
|
|
17
|
+
import Button from "@justanarthur/modo-ui/components/actions/button";
|
|
18
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
19
|
+
/*!
|
|
20
|
+
* Local addition: the AI app's interaction prompts — everything the agent
|
|
21
|
+
* asks of the user mid-turn. The generic prompts (Prompt card, Permission
|
|
22
|
+
* request, Question prompt, Plan approval) live in the kit's `components/`; this
|
|
23
|
+
* block adds the session cards (an offer to split work off, an
|
|
24
|
+
* own-initiative task) and gathers them all as statics.
|
|
25
|
+
*/
|
|
26
|
+
function Offer({ title, brief, onChoose }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(PromptCard2, {
|
|
28
|
+
icon: "split",
|
|
29
|
+
title,
|
|
30
|
+
tag: "New session?",
|
|
31
|
+
actions: /* @__PURE__ */ jsxs(Fragment, {
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Button, {
|
|
34
|
+
size: "compact",
|
|
35
|
+
variant: "tertiary",
|
|
36
|
+
onClick: () => onChoose?.("here"),
|
|
37
|
+
children: "Do it here"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx(Button, {
|
|
40
|
+
size: "compact",
|
|
41
|
+
onClick: () => onChoose?.("new-session"),
|
|
42
|
+
children: "New session"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}),
|
|
46
|
+
children: brief && /* @__PURE__ */ jsx("p", {
|
|
47
|
+
className: "m-0 text-body text-muted-foreground",
|
|
48
|
+
children: brief
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function Task({ title, brief, where, onDecide }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(PromptCard2, {
|
|
54
|
+
icon: "git-fork",
|
|
55
|
+
title,
|
|
56
|
+
tag: "New task",
|
|
57
|
+
hint: where ? `${where} · expires in 7 days` : "Expires in 7 days",
|
|
58
|
+
actions: /* @__PURE__ */ jsxs(Fragment, {
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Button, {
|
|
61
|
+
size: "compact",
|
|
62
|
+
variant: "ghost",
|
|
63
|
+
onClick: () => onDecide?.("dismiss"),
|
|
64
|
+
children: "Dismiss"
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx(Button, {
|
|
67
|
+
size: "compact",
|
|
68
|
+
variant: "tertiary",
|
|
69
|
+
onClick: () => onDecide?.("start"),
|
|
70
|
+
children: "Start session"
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
}),
|
|
74
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
75
|
+
className: "m-0 text-body text-muted-foreground",
|
|
76
|
+
children: brief
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
var AgentPrompt2 = Object.assign(function AgentPrompt(props) {
|
|
81
|
+
return /* @__PURE__ */ jsx(PromptCard2, {
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}, { Permission: PermissionRequest2, Question: QuestionPrompt2, Plan: PlanApproval2, Offer, Task });
|
|
85
|
+
var agent_prompt_default = AgentPrompt2;
|
|
86
|
+
export { AgentPrompt2, agent_prompt_default };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// components/conversation/tool-call/index.tsx
|
|
8
|
+
import Accordion from "@justanarthur/modo-ui/components/containers/accordion";
|
|
9
|
+
import { Spinner } from "@justanarthur/modo-ui/components/feedback/progress";
|
|
10
|
+
import { statusGlyph } from "@justanarthur/modo-ui/components/feedback/status-dot";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
/*!
|
|
13
|
+
* Local addition (not part of Fluid Functionalism): an AI's tool calls. A run
|
|
14
|
+
* of calls is one Accordion group, so one fluid hover highlight runs down it
|
|
15
|
+
* and each call's output morphs out of its row. Generalised from the AI app's
|
|
16
|
+
* transcript.
|
|
17
|
+
*/
|
|
18
|
+
var TOOL_ICON = {
|
|
19
|
+
bash: "terminal",
|
|
20
|
+
shell: "terminal",
|
|
21
|
+
terminal: "terminal",
|
|
22
|
+
read: "file-text",
|
|
23
|
+
edit: "pen-line",
|
|
24
|
+
write: "file-plus",
|
|
25
|
+
grep: "search",
|
|
26
|
+
search: "search",
|
|
27
|
+
glob: "folder-open",
|
|
28
|
+
fetch: "globe",
|
|
29
|
+
webfetch: "globe",
|
|
30
|
+
websearch: "globe",
|
|
31
|
+
agent: "bot",
|
|
32
|
+
mcp: "plug",
|
|
33
|
+
todowrite: "list-checks"
|
|
34
|
+
};
|
|
35
|
+
var Waiting = statusGlyph("waiting");
|
|
36
|
+
function ToolStatusMark2({ status }) {
|
|
37
|
+
const Failed = useIcon2("circle-x");
|
|
38
|
+
const Denied = useIcon2("ban");
|
|
39
|
+
if (status === "running")
|
|
40
|
+
return /* @__PURE__ */ jsx(Spinner, {
|
|
41
|
+
className: "size-3.5"
|
|
42
|
+
});
|
|
43
|
+
if (status === "waiting")
|
|
44
|
+
return /* @__PURE__ */ jsx(Waiting, {
|
|
45
|
+
size: 14
|
|
46
|
+
});
|
|
47
|
+
if (status === "error")
|
|
48
|
+
return /* @__PURE__ */ jsx(Failed, {
|
|
49
|
+
size: 14,
|
|
50
|
+
strokeWidth: 1.5,
|
|
51
|
+
"aria-label": "Failed",
|
|
52
|
+
className: "shrink-0 text-status-error"
|
|
53
|
+
});
|
|
54
|
+
if (status === "denied")
|
|
55
|
+
return /* @__PURE__ */ jsx(Denied, {
|
|
56
|
+
size: 14,
|
|
57
|
+
strokeWidth: 1.5,
|
|
58
|
+
"aria-label": "Denied",
|
|
59
|
+
className: "shrink-0 text-muted-foreground"
|
|
60
|
+
});
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function ToolCallGroup2({ children, defaultValue }) {
|
|
64
|
+
return /* @__PURE__ */ jsx(Accordion.Group, {
|
|
65
|
+
type: "multiple",
|
|
66
|
+
defaultValue,
|
|
67
|
+
size: "compact",
|
|
68
|
+
className: "-mx-2.5 w-auto max-w-none",
|
|
69
|
+
children
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
var ToolCall2 = Object.assign(function ToolCall({ tool, summary, value, index, icon, status = "done", meta, children }) {
|
|
73
|
+
const Icon = useIcon2(icon ?? TOOL_ICON[tool.toLowerCase()] ?? "wrench");
|
|
74
|
+
return /* @__PURE__ */ jsxs(Accordion.Item, {
|
|
75
|
+
value,
|
|
76
|
+
index,
|
|
77
|
+
disabled: !children,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Accordion.Trigger, {
|
|
80
|
+
className: "[&>span:first-child]:min-w-0",
|
|
81
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
82
|
+
className: "flex min-w-0 items-center gap-2",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
85
|
+
size: 14,
|
|
86
|
+
strokeWidth: 1.5,
|
|
87
|
+
className: "shrink-0"
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "shrink-0",
|
|
91
|
+
children: tool
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: "min-w-0 truncate font-mono text-caption-compact weight-normal text-muted-foreground",
|
|
95
|
+
children: summary
|
|
96
|
+
}),
|
|
97
|
+
meta && /* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: "ml-auto shrink-0 text-caption-compact weight-normal text-muted-foreground",
|
|
99
|
+
children: meta
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(ToolStatusMark2, {
|
|
102
|
+
status
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
children && /* @__PURE__ */ jsx(Accordion.Content, {
|
|
108
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
109
|
+
className: "pb-2",
|
|
110
|
+
children
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
});
|
|
115
|
+
}, { Group: ToolCallGroup2 });
|
|
116
|
+
var tool_call_default = ToolCall2;
|
|
117
|
+
|
|
118
|
+
export { ToolStatusMark2, ToolCallGroup2, ToolCall2, tool_call_default };
|