@alwith/module-chat 0.5.24 → 0.5.25
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/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-f5gsffbv.js → chunk-03x33m2h.js} +2 -2
- package/dist/chunk-04xjj6q3.js +2 -0
- package/dist/{chunk-855w49k0.js → chunk-09zfz3ap.js} +2 -2
- package/dist/{chunk-pz0v5f2k.js → chunk-0kb39fpp.js} +2 -2
- package/dist/{chunk-qwfw4xpn.js → chunk-0kdemqjf.js} +2 -2
- package/dist/{chunk-vnsgjnp3.js → chunk-0kvfbr22.js} +2 -2
- package/dist/{chunk-95mynf7q.js → chunk-10emnq39.js} +2 -2
- package/dist/{chunk-9j9rx57q.js → chunk-1fr9rhkn.js} +2 -2
- package/dist/{chunk-wb8sf2ww.js → chunk-1fxadr5w.js} +2 -2
- package/dist/{chunk-kmdag4vy.js → chunk-1zh28e39.js} +2 -2
- package/dist/{chunk-fmjez7xp.js → chunk-22tg663v.js} +2 -2
- package/dist/{chunk-nj9y0bwb.js → chunk-2ac213n3.js} +2 -2
- package/dist/{chunk-wm0jty6e.js → chunk-2apyrry0.js} +2 -2
- package/dist/{chunk-99fh3f1v.js → chunk-2djv6s3a.js} +2 -2
- package/dist/{chunk-3bsk6xcf.js → chunk-2dvryx1q.js} +2 -2
- package/dist/{chunk-ececn091.js → chunk-2gg3gcmb.js} +1 -1
- package/dist/{chunk-7absxkjt.js → chunk-2hzdkgrk.js} +2 -2
- package/dist/{chunk-kz1kjzmq.js → chunk-33tyec6w.js} +2 -2
- package/dist/{chunk-f1x483c9.js → chunk-3fm507f7.js} +2 -2
- package/dist/{chunk-mnzqtg7h.js → chunk-3k33zp9m.js} +1 -1
- package/dist/{chunk-ypk1gwzc.js → chunk-3p9g44yz.js} +5 -5
- package/dist/chunk-3v3bd582.js +2 -0
- package/dist/{chunk-vt6cyes7.js → chunk-46phvpzh.js} +2 -2
- package/dist/{chunk-8dbx6g7q.js → chunk-4hwtb6yn.js} +1 -1
- package/dist/{chunk-gsfgdnfp.js → chunk-4jghs8rf.js} +2 -2
- package/dist/{chunk-jgd6dcgy.js → chunk-4qp43adx.js} +2 -2
- package/dist/{chunk-pbf73n1s.js → chunk-4vk86bbk.js} +2 -2
- package/dist/{chunk-tgskd2p2.js → chunk-517bhxvr.js} +2 -2
- package/dist/{chunk-0wa9yjg3.js → chunk-5c5z2b48.js} +2 -2
- package/dist/chunk-5dkj3ntx.js +5 -0
- package/dist/{chunk-j322kgxf.js → chunk-5r081sme.js} +2 -2
- package/dist/{chunk-5ap6fvrp.js → chunk-6fefnp6e.js} +1 -1
- package/dist/{chunk-36m8zstj.js → chunk-6g7btgsr.js} +2 -2
- package/dist/{chunk-drhzcs6e.js → chunk-6rgyckw8.js} +2 -2
- package/dist/{chunk-2rkrmpa7.js → chunk-6wmdpam5.js} +2 -2
- package/dist/{chunk-jxntqarp.js → chunk-725wv6ca.js} +2 -2
- package/dist/{chunk-azfmr99x.js → chunk-77cd8tev.js} +2 -2
- package/dist/{chunk-rbv1scqm.js → chunk-7a668qzy.js} +2 -2
- package/dist/{chunk-1e0e41vw.js → chunk-7e1wvb6e.js} +1 -1
- package/dist/{chunk-8hf11jas.js → chunk-7p80b5jc.js} +2 -2
- package/dist/{chunk-mvs2dzyt.js → chunk-81r1geaz.js} +2 -2
- package/dist/{chunk-qmzb07jg.js → chunk-8e5ytb0f.js} +2 -2
- package/dist/{chunk-yg3xhn5m.js → chunk-8xdak312.js} +2 -2
- package/dist/{chunk-k7ye738q.js → chunk-8zrfdjy4.js} +2 -2
- package/dist/{chunk-sqjgh9e2.js → chunk-9183jr6z.js} +3 -3
- package/dist/{chunk-ckyat78p.js → chunk-96tcqne6.js} +2 -2
- package/dist/chunk-99ftqpgg.js +4 -0
- package/dist/{chunk-7k64wn19.js → chunk-9jep8zjg.js} +3 -3
- package/dist/{chunk-1kbxsxft.js → chunk-9n2vrkkh.js} +2 -2
- package/dist/{chunk-btanfat4.js → chunk-9zth7avc.js} +1 -1
- package/dist/{chunk-g44hhdha.js → chunk-a5htm58g.js} +2 -2
- package/dist/{chunk-6t5war9h.js → chunk-ap6sr2c6.js} +2 -2
- package/dist/{chunk-r19q0w11.js → chunk-awfvvmjt.js} +2 -2
- package/dist/{chunk-bnbc6q4p.js → chunk-b9y436vs.js} +3 -3
- package/dist/{chunk-qd1z91fm.js → chunk-bfcswk98.js} +2 -2
- package/dist/{chunk-7170hbdr.js → chunk-bg0cf6kz.js} +2 -2
- package/dist/{chunk-3yxjh7b1.js → chunk-ce3wg766.js} +2 -2
- package/dist/{chunk-3s94ekrs.js → chunk-chq163r8.js} +2 -2
- package/dist/{chunk-agqnt7xq.js → chunk-cpe2b276.js} +2 -2
- package/dist/{chunk-pwjz3yxb.js → chunk-crx8p5zx.js} +2 -2
- package/dist/{chunk-3e6wcamp.js → chunk-dfcks9g4.js} +2 -2
- package/dist/{chunk-cw76pj9b.js → chunk-dv4d6mrb.js} +2 -2
- package/dist/{chunk-tpbqg729.js → chunk-dx745syv.js} +1 -1
- package/dist/chunk-e24jv7zb.js +2 -0
- package/dist/{chunk-rr36dnn9.js → chunk-e5twctz7.js} +2 -2
- package/dist/{chunk-jhzs9ab0.js → chunk-ef99py8a.js} +2 -2
- package/dist/{chunk-988sgbn9.js → chunk-ewvb59ye.js} +2 -2
- package/dist/{chunk-bg03czcx.js → chunk-f06zyvek.js} +2 -2
- package/dist/chunk-f50rww1k.js +2 -0
- package/dist/{chunk-kc56dhwd.js → chunk-f7ggbprz.js} +2 -2
- package/dist/{chunk-rjw63t34.js → chunk-fgk4f0jq.js} +2 -2
- package/dist/chunk-fprj3wy4.js +2 -0
- package/dist/{chunk-4r7j0ymq.js → chunk-g93wzhsv.js} +2 -2
- package/dist/{chunk-ddv00vjf.js → chunk-g9gktxv9.js} +2 -2
- package/dist/{chunk-cqnqwa54.js → chunk-gnwa39me.js} +2 -2
- package/dist/{chunk-dte0n4kf.js → chunk-h09ez7fc.js} +2 -2
- package/dist/{chunk-hdw3mwmb.js → chunk-h9m4z5dk.js} +3 -3
- package/dist/chunk-hq06m42h.js +2 -0
- package/dist/{chunk-t6vcdf4j.js → chunk-hswtp9wv.js} +1 -1
- package/dist/{chunk-vfhxerxt.js → chunk-hza92pfj.js} +2 -2
- package/dist/{chunk-qtp1xer1.js → chunk-jamq0frz.js} +1 -1
- package/dist/{chunk-1vf83jdk.js → chunk-jsabvejp.js} +2 -2
- package/dist/{chunk-1rg3nab3.js → chunk-jst7n5r4.js} +1 -1
- package/dist/chunk-k0dnnn77.js +2 -0
- package/dist/{chunk-j0m35s05.js → chunk-k1vkc88d.js} +1 -1
- package/dist/{chunk-m0834n5y.js → chunk-k2gwmccn.js} +2 -2
- package/dist/{chunk-n625g0h1.js → chunk-k727wnh1.js} +1 -1
- package/dist/{chunk-3cssygmg.js → chunk-kbbq3y2j.js} +2 -2
- package/dist/{chunk-9tp0z23q.js → chunk-kwp1fere.js} +2 -2
- package/dist/{chunk-pmkk6e5x.js → chunk-kz8zf6y0.js} +2 -2
- package/dist/chunk-mttcvwhx.js +2 -0
- package/dist/{chunk-g2qcyqc6.js → chunk-n5dkkw01.js} +2 -2
- package/dist/{chunk-x3y5htkt.js → chunk-n7qcezk8.js} +2 -2
- package/dist/{chunk-z3nybrbb.js → chunk-n8yww1mr.js} +2 -2
- package/dist/{chunk-509kwzxq.js → chunk-nr3spt0n.js} +2 -2
- package/dist/{chunk-f2w2sct6.js → chunk-nsb0d92p.js} +1 -1
- package/dist/{chunk-4bb6dzzs.js → chunk-p0s2pg33.js} +1 -1
- package/dist/chunk-p272qmbv.js +2 -0
- package/dist/{chunk-acb8t4jt.js → chunk-p3hxcpfy.js} +2 -2
- package/dist/{chunk-apyfztsv.js → chunk-p58e9z34.js} +2 -2
- package/dist/{chunk-n2e3a7n4.js → chunk-pf5655kt.js} +1 -1
- package/dist/{chunk-ttqy9d4r.js → chunk-pncx4r2c.js} +1 -1
- package/dist/{chunk-60neqgfx.js → chunk-ps722b9k.js} +2 -2
- package/dist/{chunk-pprt7ntb.js → chunk-pv5g85k0.js} +4 -4
- package/dist/{chunk-1mn2t6ga.js → chunk-pw1pws10.js} +2 -2
- package/dist/{chunk-qdg5zphd.js → chunk-pyznxtyg.js} +1 -1
- package/dist/chunk-q0fhp33b.js +2 -0
- package/dist/{chunk-7z4gtfkd.js → chunk-qjrgbqhy.js} +2 -2
- package/dist/{chunk-f1gj3yzt.js → chunk-qn2jfxff.js} +2 -2
- package/dist/chunk-qn4zvgc9.js +2 -0
- package/dist/{chunk-6trv0snh.js → chunk-qqqcqvrv.js} +2 -2
- package/dist/{chunk-9tn2n7xv.js → chunk-r1as1cra.js} +1 -1
- package/dist/{chunk-a4apcx3e.js → chunk-r4vfytjv.js} +3 -3
- package/dist/{chunk-ar4a6nyv.js → chunk-rb0cqdjg.js} +1 -1
- package/dist/{chunk-mj7094yh.js → chunk-rezwwmw7.js} +2 -2
- package/dist/{chunk-wgrmjfyp.js → chunk-rsp574n3.js} +2 -2
- package/dist/chunk-s2w7e9pg.js +2 -0
- package/dist/{chunk-4a46cpnm.js → chunk-s7yzvpmc.js} +3 -3
- package/dist/{chunk-pzjag1mt.js → chunk-sdf73s05.js} +3 -3
- package/dist/{chunk-74qvpvzv.js → chunk-syhh17rh.js} +2 -2
- package/dist/{chunk-x2jd9bpn.js → chunk-tdn5g8xd.js} +3 -3
- package/dist/chunk-v0p94epn.js +2 -0
- package/dist/{chunk-wvry7t79.js → chunk-vgrjqwbq.js} +2 -2
- package/dist/{chunk-48fj5m0p.js → chunk-vr0dfq9w.js} +2 -2
- package/dist/{chunk-1qyxrh0n.js → chunk-w233xc7k.js} +3 -3
- package/dist/{chunk-ddk8v2g9.js → chunk-w8qn76a1.js} +3 -3
- package/dist/{chunk-yakar0e2.js → chunk-wnn9r2r6.js} +2 -2
- package/dist/chunk-wsbh4n9e.js +2 -0
- package/dist/{chunk-g2zznfan.js → chunk-wtf1eyzy.js} +1 -1
- package/dist/{chunk-76a04a6j.js → chunk-x2nemdjf.js} +2 -2
- package/dist/chunk-x68b6rmk.js +2 -0
- package/dist/{chunk-0pzyavch.js → chunk-xdvbb3av.js} +2 -2
- package/dist/{chunk-5a6xc345.js → chunk-y7ngqt59.js} +2 -2
- package/dist/{chunk-3ka3bt0t.js → chunk-yez26qfc.js} +2 -2
- package/dist/chunk-ymy8d3hp.js +4 -0
- package/dist/{chunk-m271yxxm.js → chunk-yyba5e1c.js} +2 -2
- package/dist/{chunk-h9v3pks1.js → chunk-z18fvy7d.js} +1 -1
- package/dist/{chunk-swpy2b9a.js → chunk-z1aqmqgc.js} +2 -2
- package/dist/{chunk-mz8a6292.js → chunk-zacep5bq.js} +2 -2
- package/dist/{chunk-3vkkmyjm.js → chunk-zp8rq8nh.js} +2 -2
- package/dist/{chunk-jm6zxy9h.js → chunk-zyvvk8b2.js} +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.d.ts +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.d.ts +3 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.d.ts +3 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.d.ts +3 -0
- package/dist/conversation/composer/prompt-history.js +1 -0
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.d.ts +3 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-0p6y2t9b.js +0 -2
- package/dist/chunk-6dbswsek.js +0 -2
- package/dist/chunk-b13pahat.js +0 -2
- package/dist/chunk-bmey8et5.js +0 -2
- package/dist/chunk-c32z3wjq.js +0 -2
- package/dist/chunk-d8q2qv1m.js +0 -2
- package/dist/chunk-dy92pv7q.js +0 -2
- package/dist/chunk-fnpf84rf.js +0 -4
- package/dist/chunk-hxtxrtpm.js +0 -2
- package/dist/chunk-jmb8r6aj.js +0 -2
- package/dist/chunk-jwt7q6yx.js +0 -4
- package/dist/chunk-nwtambg5.js +0 -2
- package/dist/chunk-pk2rvqd0.js +0 -2
- package/dist/chunk-q9zawfn1.js +0 -2
- package/dist/chunk-qn6ppn0r.js +0 -2
- package/dist/chunk-z7sswh39.js +0 -2
- package/dist/chunk-zxp0mb14.js +0 -2
- /package/dist/{chunk-a1czzft3.js → chunk-py0zbgaj.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ho}from"./chunk-
|
|
1
|
+
import{ho}from"./chunk-p0s2pg33.js";import{T}from"./chunk-7a668qzy.js";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as H,HoverCardContent as k,HoverCardTrigger as M}from"@nyssance/shadcn/vega/components/ui/hover-card";import{cn as v}from"cn";import{PaperclipIcon as L,XIcon as z}from"lucide-react";import{Fragment as E,useEffect as R,useRef as D,useState as P}from"react";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(k,{align:"start",...t})}function co({data:t,t:n,className:l,...m}){let c=T(),[u,f]=P(!1),[N,d]=P(1),I=D(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",C=a||(o?n("input.image"):n("input.attachment"));return R(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),g=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,y=s==="+"||s==="=",A=s==="-"||s==="_",x=s==="0";if(!y&&!A&&!x)return;i.preventDefault(),d((w)=>{if(x)return 1;if(y)return h(w+p);return h(w-p)})};return window.addEventListener("keydown",g,{passive:!1}),()=>window.removeEventListener("keydown",g)},[u]),r(K,{children:[r(H,{children:[e(M,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(b,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(L,{className:"size-3"})}),r(b,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(z,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:C})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(ho,{containerRef:I,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:N,url:t.url})]})}function uo({children:t,className:n,...l}){let m=T();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(E,{children:t(c)},c.id))})}
|
|
2
2
|
export{co,uo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Dr(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function go(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Dr(t,o))}return{imageFiles:n,sawNonImageFile:i}}function fo(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Hr(e){return e.replace(s,"")}function wr(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Dt(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Hr(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-wr(n,i)),r=Math.max(0,o-wr(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
+
export{Dr,go,fo,Hr,wr,Dt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Oo({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(d,{size:"sm",children:[e(C,{children:[a(s,{children:i("approval.needed")}),a(m,{children:r})]}),a(c,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(v,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(p,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
|
|
2
|
+
export{Oo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{k}from"./chunk-sdf73s05.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Qr(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function bi(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function M(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=k(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(k(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function Ci(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Qr(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,I=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&I!==null&&a!==I||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")I=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let h=`turn:${l.kind}:${l.id}`,x=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(h);if(y!==void 0&&K(y.items,a)&&y.endedAt===x)return y;let b={key:h,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:x,replayed:a.every(wn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,g)=>j(b,c,g<v,a[g-1])),b})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function wn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ie(t){return S(t.content)}function nt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function kn(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function wi(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function ki(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function Si(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!ki(t,e[n-1],o))break;n--}return e[n]?.key}function _i(t,e,n){let o=n,s=n;while(o>0&&ki(t,e[o-1],e[o]))o--;while(s+1<e.length&&ki(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{Qr,bi,Ci,wn,ie,nt,kn,wi,ki,Si,_i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-zyvvk8b2.js";import{e}from"./chunk-k1vkc88d.js";import{m,G}from"./chunk-v5mzxjzc.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var p=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function g(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let o=Math.min(100,a/t*100),f=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:f}}function P(a){let t=m(a.configOptions,"model");return t===void 0?void 0:G(t)}function Ae(a,t){let o=a.windowDurationMins;if(o===null)return t("usage.usage");if(o%1440===0)return t("usage.windowDays",{count:o/1440});return t("usage.windowHours",{count:Math.round(o/60)})}function _(a){let{client:t}=e(),o=n((s)=>a&&s.connection==="ready"&&D(s.agent)),[f,c]=F(null);return T(()=>{if(!o){c(null);return}let s=!0;t.readRateLimits().then((d)=>{if(s)c(d)},()=>{return});let l=t.onRateLimits((d)=>{if(s)c(d)});return()=>{s=!1,l()}},[o,t]),o?f:null}function B({session:a}){let{t}=e().host,o=m(a.configOptions,"model"),f=o!==void 0&&(L(o.options)?o.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((i)=>i.value===o.currentValue)),c=_(f),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let d=s&&s.size>0?V(s.used,s.size):null,h=7,b=2*Math.PI*h,N=g(l?.inputTokens),k=g(l?.outputTokens),x=g(l?.cachedReadTokens),w=g(l?.cachedWriteTokens),S=g(l?.totalTokens)||N+k+x+w,R=N+x,C=R>0?A.format(x/R):t("tokens.notAvailable"),M=[[t("tokens.input"),p.format(N)],[t("tokens.output"),p.format(k)],[t("tokens.cachedRead"),p.format(x)],[t("tokens.cachedWrite"),p.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),p.format(S)]],v=P(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",d?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),d!==null&&r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-d.pct/100),transform:"rotate(-90 9 9)"})]}),d!==null&&u("span",{children:[Math.round(d.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[v!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:v,children:v})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:p.format(s.used),limit:p.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:Ae(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var Ot=W(B);
|
|
2
|
+
export{Ae,Ot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var De=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function
|
|
2
|
-
export{De,
|
|
1
|
+
import{createStore as r}from"@alwith/api/client";var De=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function Di(e){De.setState({...e,terminals:e.terminals??{}})}function Hi(e){if(De.getState().sessionId===e)De.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function Oi(e,n,t){let i=De.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
|
|
2
|
+
export{De,Di,Hi,Oi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l,i}from"./chunk-
|
|
1
|
+
import{l,i}from"./chunk-wtf1eyzy.js";import{f}from"./chunk-1k21j77z.js";import{I}from"./chunk-vgrjqwbq.js";import{le}from"./chunk-bg0cf6kz.js";import{E,ae,se}from"./chunk-tv0fwt2g.js";import{ExternalLinkIcon as W,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as y}from"react";import{Badge as O}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as T}from"react/jsx-runtime";function lt({entry:r,onBack:p}){let u=l(),{t}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),x=i((a)=>a.busyIds[r.plugin.id]),H=i((a)=>a.install),V=i((a)=>a.uninstall),j=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,U]=y(null),[R,M]=y(0),[c,z]=y(null);q(()=>{let a=!0;return U(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,R]);let d=o?.summary??r.plugin,m=C?.plugin??d,s=d.interface,b=s?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",A=s?.longDescription??o?.description??s?.shortDescription,L=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(se,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(v,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:b})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(I,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:b})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?n(T,{children:[e(X,{checked:m.enabled,disabled:!!x||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void j(m,a)}),e(v,{variant:"outline",size:"sm",disabled:!!x,onClick:()=>void V(m),children:x?e(S,{}):t("plugins.detail.uninstall")})]}):e(v,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(k?"plugins.detail.unavailable":"plugins.detail.install"),title:t(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!x||k,onClick:()=>void H({...r,plugin:d}).catch(()=>{}),children:x?e(S,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(f,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${E} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(O,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(N,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(N,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(N,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(N,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(N,{label:t("plugins.detail.website"),children:e(w,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!D&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),t("plugins.detail.loading")]}),D&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",D]}),e(v,{variant:"outline",size:"sm",className:"h-9",onClick:()=>M((a)=>a+1),children:t("plugins.loadError.retry")})]}),A&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:A}),L.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(L)].map((a)=>e("img",{src:a,alt:b,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(h,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(O,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(h,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(I,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(h,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(v,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(I,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(h,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(h,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(w,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(w,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(F,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(G,{className:ae,children:c&&n(T,{children:[e("div",{className:"shrink-0 pr-8",children:e(I,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(le,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function N({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function h({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(v,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(W,{className:"size-3.5"})]})}
|
|
2
2
|
export{lt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`),w=o?null:ot(n,"assistant"),D=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(U).filter((r)=>r!==null))),b=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(
|
|
3
|
-
export{
|
|
1
|
+
import{gn,fn}from"./chunk-h9m4z5dk.js";import{k}from"./chunk-sdf73s05.js";import{Nn}from"./chunk-8zrfdjy4.js";import{t}from"./chunk-zyvvk8b2.js";import{bi,ie,nt,wi}from"./chunk-qn2jfxff.js";import{vn}from"./chunk-zp8rq8nh.js";import{Ce}from"./chunk-pf5655kt.js";import{Pn}from"./chunk-4hwtb6yn.js";import{Qo}from"./chunk-3p9g44yz.js";import{ni}from"./chunk-wsbh4n9e.js";import{oi}from"./chunk-77cd8tev.js";import{Sn,_n}from"./chunk-2gg3gcmb.js";import{ot}from"./chunk-gha517v4.js";import{codexMessageError as z,codexTurnError as J,isContentEntry as oe,isEmbeddedResource as q,isImage as X,isResourceLink as ae,isText as me,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as ue,useEffect as pe,useState as fe}from"react";import{jsx as s,jsxs as m,Fragment as E}from"react/jsx-runtime";function U(i){if(X(i))return`${i.mimeType.toLowerCase()}:${i.data}`;if(q(i)&&"blob"in i.resource&&i.resource.mimeType?.toLowerCase().startsWith("image/"))return`${i.resource.mimeType.toLowerCase()}:${i.resource.blob}`;return null}function ye({item:i}){let{t:n}=t(),l=i.status==="in_progress",[o,c]=fe(()=>Date.now()-i.at>=1e4);return pe(()=>{if(!l)return;let a=Math.max(0,i.at+1e4-Date.now());if(c(a===0),a===0)return;let f=setTimeout(()=>c(!0),a);return()=>clearTimeout(f)},[i.id,i.at,l]),m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:i.status==="completed"?n("stream.codex.contextCompacted"):i.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:i,entry:n,terminals:l,streaming:o,streamingThoughtId:c}){let{t:a}=t();switch(n.kind){case"activity":return s(vn,{sessionId:i,items:n.items,terminals:l,streamingThoughtId:c});case"text":return k(n.item._meta).length>0?s(Pn,{sessionId:i,item:n.item}):s(Ce,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(ni,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Sn,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return s(ye,{item:n.item})}}function he({sessionId:i,turn:n,terminals:l,active:o,blocked:c=!1,continued:a=!1,edits:f=n.edits,activityItems:M=n.items,workStartedAt:Y=n.startedAt,isLast:W,error:y,interrupted:F,retry:L,retrying:u,answerActions:K,footer:Z}){let{t:d}=t(),C=n.errors.map((e)=>{let r=z(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let v=L?.turnId===le(e)?L:void 0;return s(_n,{error:r,retry:v},`${e.id}:${v?.delaySeconds??"manual"}`)});if(W&&y!==null&&!n.errors.some((e)=>{let r=z(e);return r!==null&&r.stopReason===y.stopReason&&J(r).message===J(y).message}))C.push(s(_n,{error:y},"current-run-error"));let h=C.length>0?s("div",{className:"codex-turn-errors",children:C}):null,A=n.items.filter(Nn);if(A.length>0&&A.length===n.items.length)return m(E,{children:[s(vn,{sessionId:i,items:A,terminals:l,streamingThoughtId:null}),h]});let x=n.work,T=x.length>0&&x.every((e)=>e.kind==="compaction");if(bi(n)||T&&n.final.length===0)return m(E,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),h]});let O=nt(n),P=n.final.filter((e)=>k(e._meta).length===0).map(ie).join(`
|
|
2
|
+
`),w=o?null:ot(n,"assistant"),D=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(U).filter((r)=>r!==null))),b=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((r,v)=>{let g=r.content,se=e.name==="image_generation"&&X(g),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(g)||q(g)&&("blob"in g.resource));if(!se&&!re)return[];let _=U(g);if(_!==null){if(G.has(_))return[];G.add(_)}return[{key:`${e.id}:${v}`,block:g}]})}),R=n.final.some((e)=>k(e._meta).length===0&&e.content.some((r)=>!me(r)||r.text.trim().length>0)),ee=D.length>0||b.length>0||T||R||n.final.some((e)=>k(e._meta).length>0),I=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),B=x.filter((e)=>I===-1||S(e)<I),te=x.filter((e)=>I!==-1&&S(e)>I),ne=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...te.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,r)=>e.index-r.index),H=!o&&!a&&(P.trim().length>0?s(gn,{text:P,isMostRecentTurn:W,time:w,afterCopy:K}):m("div",{className:"flex items-center gap-0.5",children:[K,w&&s("span",{className:"codex-user-time ms-1",title:w.full,children:w.short})]})),p=oi({...n,items:M},{running:o,blocked:c,retrying:u!==void 0}),Q=p.kind==="reasoning"?p.ownerKey??null:null,V=p.kind==="thinking",j=wi({...n,items:M});return m(E,{children:[s(fn,{stateKey:JSON.stringify([i,n.replayed?"history":"live",n.key]),active:o&&!R,defaultExpanded:o&&!R||!n.replayed&&(F||O),...j,startedAt:j.startedAt??Y,loading:(V||p.kind==="working")&&n.work.length===0,loadingLabel:p.kind==="working"?d("stream.codex.working"):void 0,work:a||T?[]:B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:o,streamingThoughtId:Q},e.key)),answer:ee||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),ne.map((e)=>{if(e.kind==="work")return s(N,{sessionId:i,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Q},e.entry.key);let r=e.item;return m(ge,{children:[k(r._meta).length>0?s(Pn,{sessionId:i,item:r}):s(Ce,{content:r.content,messageId:r.id,streaming:o}),r===n.final.at(-1)&&H]},r.id)}),D.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),b.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:b.map((e)=>s(Ce,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&H]}):null,footer:m(E,{children:[V&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),Z,f.length>0&&!o&&!a&&s(Qo,{items:f}),F&&!O&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&h]})}),o&&u!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:u.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(u.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():u.message}),o&&h]})}var Wo=ue(he);
|
|
3
|
+
export{Wo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
1
|
+
import{n}from"./chunk-zyvvk8b2.js";import{Je}from"./chunk-jamq0frz.js";import{e,g}from"./chunk-k1vkc88d.js";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as p,EmptyDescription as c,EmptyHeader as l,EmptyTitle as d}from"@nyssance/shadcn/vega/components/ui/empty";import{Loader2Icon as v}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Wt({session:t,timeline:y}){let{host:m,client:s}=e(),{t:i}=m,f=n((E)=>E.historyPages[t.id]?.cursor!=null),u=()=>g(m,s.open(t.id,t.cwd)),a=o(Je,{...y,session:t,client:s,host:m});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):a;if(!t.attached&&t.items.length===0)return r(p,{className:"flex-1",children:[r(l,{children:[o(d,{children:i("conversation.reopen")}),o(c,{children:i("conversation.detached")})]}),o(h,{onClick:u,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!f)return o(p,{className:"flex-1",children:r(l,{children:[o(d,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(c,{className:"truncate font-mono",children:t.cwd})]})});return a}
|
|
2
2
|
export{Wt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function Ui({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function c(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function S(t){let{Markdown:o}=c();return e(o,{...t})}
|
|
2
|
+
export{Ui,c,S};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function
|
|
2
|
-
export{
|
|
1
|
+
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function yi(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function bn(n){let t=n.replaceAll(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(t)}
|
|
2
|
+
export{yi,bn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var la=["full","compact","codexUI"];function ei(t){return t==="compact"||t==="codexUI"}var $r=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function V(t){let o=$r.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ca(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{la,ei,$r,V,ca};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as b}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function k(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function Tn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as b}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function k(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function Tn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function Ii(e){return{selected:e.options?.length?0:null,text:""}}function Zt(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function Ni(e){return`<send_user_message_question_reply>
|
|
2
2
|
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function In(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function
|
|
4
|
-
export{k,Tn,
|
|
3
|
+
</send_user_message_question_reply>`}function In(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function Mi({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:A,t:u}){let g=R(),h=b(!1),a=b(null);v(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",N=o==="answered"||o==="skipped",f=e.options??[],w=l&&Zt(e,n).trim().length>0,Q="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:N?c(_,{children:[i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:u("asyncQuestion.skipped")})]}):c(r.Root,{items:f.length>0?[{name:"answer",choices:[...f.map((s,d)=>({value:String(d)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),w)x()},children:[c(r.Item,{name:"answer",className:"m-0 flex min-w-0 flex-col gap-3 border-0 p-0",children:[i(r.Title,{render:i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),f.length>0&&c(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[f.map((s,d)=>c(r.Choice,{value:String(d),checked:n.selected===d,onChange:()=>l&&y({...n,selected:d}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{className:"whitespace-pre-wrap",children:s})]},d)),c(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&y({...n,selected:null}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{children:u("asyncQuestion.other")})]})]}),i(r.Input,{render:i(S,{rows:1,className:"min-h-0 resize-none"}),onCompositionStart:()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null,h.current=!0},onCompositionEnd:()=>{if(h.current=!1,a.current!==null)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{a.current=null})},onKeyDown:(s)=>{if(s.key==="Enter")s.stopPropagation();if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||h.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&Zt(e,{...n,text:s.currentTarget.value}).trim().length>0)x()},"aria-label":u("asyncQuestion.answer"),placeholder:u("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>y({selected:null,text:s.target.value})}),m&&i("p",{role:"alert",className:"text-destructive text-sm",children:m})]}),c("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(C,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(C,{size:"sm",variant:"ghost"}),disabled:!l,onClick:A,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{k,Tn,Ii,Zt,Ni,In,Mi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M}from"./chunk-667z0pac.js";import{he}from"./chunk-
|
|
2
|
-
export{qn,
|
|
1
|
+
import{M}from"./chunk-667z0pac.js";import{he}from"./chunk-py0zbgaj.js";import{x,J}from"./chunk-kwp1fere.js";import{N,K}from"./chunk-22tg663v.js";import{de,X}from"./chunk-g9gktxv9.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as k,DropdownMenuItem as O,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as q,DropdownMenuSeparator as Q,DropdownMenuTrigger as V}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function qn({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:R=n?"none":void 0,allowRemove:B=!0,submenu:g=!1,className:A,onOpenChange:T}){let{t}=x(),c=X(),H=J(),P=he(),{collections:s,order:C}=de(),i=C.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(G(o),P(o),T?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),H(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(V,{disabled:r,"data-hover-background":R,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(y,{variant:"ghost",size:"icon-sm",className:A,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(k,{children:e(_,{value:i??null,children:C.map((o)=>a(q,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===N?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:K(s[o],t)})]},o))})}),e(Q,{}),a(k,{children:[a(O,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(z,{}),t("collection.newCollection")]}),B&&i!==void 0&&a(O,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(W,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(y,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function er({sessionId:l,allowRemove:f=!0}){let{t:n}=x();return e(qn,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(M,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
|
|
2
|
+
export{qn,er};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d}from"./chunk-92xxp77d.js";import{b,p}from"./chunk-
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(v);return m.map(({marketplace:x,entries:h})=>({marketplace:x,plugins:h.filter(({plugin:y,text:P})=>c===""?x.path!==null||n.has(y.id):P.includes(c)).map(({plugin:y})=>y)}))},[m,v,c]);return s(Z,{children:[r.map(({marketplace:n,plugins:x})=>e(ze,{marketplace:n,plugins:x,onOpen:u},JSON.stringify([n.name,n.path,c]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Te(){let{t}=l(),c=q(),u=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[v,m]=S(""),[r,n]=S(!1),[x,h]=S(!1),[y,P]=S(null),A=async()=>{let N=v.trim();if(!N||r)return;n(!0),P(null);try{await u({source:N}),m(""),h(!1)}catch(M){P(M instanceof Error?M.message:String(M))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(le,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:x,onOpenChange:(N)=>{if(!r)h(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c}),children:[e(U,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:v,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||v.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Ae({onOpen:t,query:c}){let u=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,v=ve(c.trim().toLowerCase());return e(f,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${E} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(re,{}):e(Be,{query:v,onOpen:t})]})})}function
|
|
3
|
-
export{
|
|
1
|
+
import{d}from"./chunk-92xxp77d.js";import{b,p}from"./chunk-py0zbgaj.js";import{at}from"./chunk-bvgqsaey.js";import{Se,l,_e,Oe,i}from"./chunk-wtf1eyzy.js";import{L,R,Y,F,D,ce,ut}from"./chunk-z18fvy7d.js";import{re}from"./chunk-3k33zp9m.js";import{He}from"./chunk-p7dd93e5.js";import{f}from"./chunk-1k21j77z.js";import{ct,I}from"./chunk-vgrjqwbq.js";import{E,se}from"./chunk-tv0fwt2g.js";import{lt}from"./chunk-r1as1cra.js";import{st}from"./chunk-7e1wvb6e.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ae,BookOpenIcon as ne,CheckIcon as ie,CircleArrowUpIcon as le,MoreVerticalIcon as oe,PlusIcon as U,PuzzleIcon as de,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as S}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as De}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Z}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function Me({plugin:t,marketplace:c}){let{t:u}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((x)=>x.plugin.id===t.id)),v=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=u(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ie,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?u("plugins.disabledReason.unknown"):r,onClick:()=>void v({plugin:t,marketplace:c}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(U,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Ee({plugin:t,marketplace:c,actions:u,onOpen:g}){let a=X(t),v=t.interface?.developerName,m=t.localVersion??t.version,r=[v,m?`v${m}`:null].filter(Boolean).join(" · ");return s(ce,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:c})}),e(F,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(I,{name:t.name})})}),s(R,{className:"pointer-events-none relative min-w-0",children:[e(ut,{className:"mb-0.5",children:T(t)}),e(Y,{className:"line-clamp-1",title:a,children:a||c.interface?.displayName||c.name}),r&&e(Y,{"data-toolbox-metadata":"",children:r})]}),e(L,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function q(){return Oe((t)=>t.connection==="ready"&&te(t.agent))}var z=48;function ze({marketplace:t,plugins:c,onOpen:u}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[v,m]=S(0),r=Math.min(v,Math.max(0,Math.ceil(c.length/z)-1));if(c.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:c.length}),t.path!==null&&s(Pe,{children:[e(Ie,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(oe,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(D,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:c.slice(r*z,(r+1)*z).map((n)=>e(Ee,{onOpen:u,plugin:n,marketplace:t,actions:e(Me,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),c.length>z&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(c.length/z)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*z>=c.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Be=fe(function({query:c,onOpen:u}){let{t:g}=l(),a=i((n)=>n.marketplaces),v=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((x)=>({plugin:x,text:[x.name,T(x),X(x),x.interface?.developerName??"",...x.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(v);return m.map(({marketplace:x,entries:h})=>({marketplace:x,plugins:h.filter(({plugin:y,text:P})=>c===""?x.path!==null||n.has(y.id):P.includes(c)).map(({plugin:y})=>y)}))},[m,v,c]);return s(Z,{children:[r.map(({marketplace:n,plugins:x})=>e(ze,{marketplace:n,plugins:x,onOpen:u},JSON.stringify([n.name,n.path,c]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Te(){let{t}=l(),c=q(),u=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[v,m]=S(""),[r,n]=S(!1),[x,h]=S(!1),[y,P]=S(null),A=async()=>{let N=v.trim();if(!N||r)return;n(!0),P(null);try{await u({source:N}),m(""),h(!1)}catch(M){P(M instanceof Error?M.message:String(M))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(le,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:x,onOpenChange:(N)=>{if(!r)h(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c}),children:[e(U,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:v,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||v.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Ae({onOpen:t,query:c}){let u=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,v=ve(c.trim().toLowerCase());return e(f,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${E} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(re,{}):e(Be,{query:v,onOpen:t})]})})}function Bi({cwd:t,active:c,extensions:u,onOpenCatalog:g}){let{t:a}=l(),v=_e(),m=Se(v),r=i((o)=>o.refresh),n=i((o)=>o.loading),x=i((o)=>o.error),[h,y]=S("plugins"),[P,A]=S({plugins:"",skills:""}),N=h==="skills"?P.skills:P.plugins,M=(o)=>A((O)=>({...O,[h]:o})),ee=Oe((o)=>JSON.stringify([...new Set(o.sessionList.map((O)=>He(O.cwd,o.projectContext)).filter((O)=>O!==null))].toSorted())),H=JSON.stringify([...new Set([He(t,v.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),j=i((o)=>o.installed),V=a(h==="skills"?"plugins.skills.search":"plugins.search"),[w,G]=S(null),C=q();K(()=>{if(!c||!C)return;if(m.getState().loadedScope!==H)r(JSON.parse(H))},[c,C,r,H,m]),K(()=>{if(!C)return;return v.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,v]);let J=(o)=>{g?.(),y("plugins"),G(o)},_=(o)=>{g?.(),y(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(ct,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(p,{className:`${d} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(ae,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(p,{className:`${d} h-8 gap-2 px-2`,active:!u?.active&&h===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(de,{className:"size-4"}):e(ne,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(f,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(b,{children:!C||n&&j.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):j.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):j.map((o)=>s(p,{title:T(o.plugin),className:`${d} gap-2 px-2`,active:!u?.active&&w?.plugin.id===o.plugin.id,onClick:()=>J(o),children:[e(I,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(Z,{children:[w&&e(lt,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(se,{children:e(at,{title:a(`plugins.headings.${h}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>M(o.target.value),placeholder:V}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>M(""),children:e(ge,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),h==="plugins"&&e(Te,{})]})})}),(h==="plugins"||x)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[h==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),x&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",x]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Ae,{query:P.plugins,onOpen:J})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(st,{query:P.skills,ready:C,onOpenPlugin:J})})]})]})]})})]})}
|
|
3
|
+
export{Bi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{ct,
|
|
1
|
+
import{Ln}from"./chunk-10emnq39.js";import{jsx as o}from"react/jsx-runtime";function ct(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:Ln}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function En(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function I({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:En(t)})})}
|
|
2
|
+
export{ct,En,I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function Pi(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
+
export{Pi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-rezwwmw7.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function jr(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function Yo({blocks:e}){return s(hn,{files:jr(e)})}function hn({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{jr,Yo,hn};
|