@alwith/module-chat 0.6.7 → 0.6.8
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-hd2kda2r.js → chunk-02jpgxy7.js} +2 -2
- package/dist/{chunk-n9ar9a13.js → chunk-0eewkw7t.js} +2 -2
- package/dist/{chunk-rz0a3frq.js → chunk-0y1c3v1b.js} +1 -1
- package/dist/{chunk-q2c4s74c.js → chunk-18z4wmhb.js} +2 -2
- package/dist/{chunk-vn4sh2ka.js → chunk-1bfxezrb.js} +2 -2
- package/dist/{chunk-dzbshq7w.js → chunk-1fh3vvpe.js} +3 -3
- package/dist/{chunk-qs98a0nv.js → chunk-1zypzzje.js} +1 -1
- package/dist/{chunk-p0dmhkv6.js → chunk-24kpx8fg.js} +2 -2
- package/dist/{chunk-4ryn6szh.js → chunk-29jan02g.js} +2 -2
- package/dist/{chunk-as95eeg6.js → chunk-2kjbas8a.js} +2 -2
- package/dist/{chunk-5nj4s3yr.js → chunk-2kz2z86n.js} +2 -2
- package/dist/chunk-2tc8kgsa.js +2 -0
- package/dist/{chunk-wj827bts.js → chunk-32s8dn1a.js} +2 -2
- package/dist/{chunk-rykrhmfm.js → chunk-36mdfph1.js} +2 -2
- package/dist/{chunk-ebvemv72.js → chunk-3m59n5gr.js} +2 -2
- package/dist/chunk-3twka9f7.js +2 -0
- package/dist/{chunk-v4krtt1x.js → chunk-3v39hqex.js} +2 -2
- package/dist/{chunk-r75kvhw0.js → chunk-3zwbr9xs.js} +2 -2
- package/dist/{chunk-dfa9098c.js → chunk-4cb0c8ae.js} +2 -2
- package/dist/{chunk-cvtkr08t.js → chunk-4j6gy4me.js} +2 -2
- package/dist/{chunk-bj6eyqv2.js → chunk-4nnyn9b2.js} +2 -2
- package/dist/{chunk-j9x200w4.js → chunk-5f5jfr40.js} +2 -2
- package/dist/{chunk-v7rxdd8y.js → chunk-5f889j6j.js} +2 -2
- package/dist/{chunk-d1petgqq.js → chunk-5t8zx5e4.js} +3 -3
- package/dist/{chunk-kjdjp3jp.js → chunk-5v8f2sbp.js} +2 -2
- package/dist/chunk-5yq8k08p.js +2 -0
- package/dist/{chunk-7n2gvnvs.js → chunk-658y6xth.js} +2 -2
- package/dist/{chunk-s751tfxa.js → chunk-6pnsagt4.js} +2 -2
- package/dist/{chunk-3n6qcrpw.js → chunk-6z36709h.js} +2 -2
- package/dist/{chunk-0d8j19ff.js → chunk-70bm3f7n.js} +2 -2
- package/dist/{chunk-n40p1vh6.js → chunk-70j4ee5r.js} +2 -2
- package/dist/{chunk-4ezp99mv.js → chunk-75ve01mr.js} +2 -2
- package/dist/{chunk-b701cxvn.js → chunk-7egc2evj.js} +2 -2
- package/dist/{chunk-tx6tcn2h.js → chunk-7jmqq7b5.js} +3 -3
- package/dist/{chunk-my1tpky9.js → chunk-7qwbxdyb.js} +2 -2
- package/dist/{chunk-9npcs7m3.js → chunk-7x150rqz.js} +2 -2
- package/dist/{chunk-19xcrm2x.js → chunk-80a1fdx8.js} +1 -1
- package/dist/{chunk-0wzxv15n.js → chunk-80r0jch1.js} +2 -2
- package/dist/{chunk-w2nh2etf.js → chunk-8428vfp3.js} +2 -2
- package/dist/{chunk-cpn28aqq.js → chunk-84gk74hf.js} +2 -2
- package/dist/{chunk-3yqs97b3.js → chunk-8504eft8.js} +3 -3
- package/dist/chunk-8689y4n5.js +2 -0
- package/dist/chunk-8an4t4kh.js +2 -0
- package/dist/{chunk-pxh60cr0.js → chunk-8d86yqzq.js} +2 -2
- package/dist/{chunk-hq54ncad.js → chunk-8rpen55z.js} +3 -3
- package/dist/{chunk-9c8j12m0.js → chunk-958qyr8g.js} +2 -2
- package/dist/{chunk-n3418t16.js → chunk-9e6rv193.js} +2 -2
- package/dist/{chunk-36m8zstj.js → chunk-9p1jvznr.js} +2 -2
- package/dist/chunk-9rt2pfsm.js +2 -0
- package/dist/{chunk-782289vj.js → chunk-9wk2xp6v.js} +3 -3
- package/dist/{chunk-s8w2vm5j.js → chunk-a8gzs651.js} +2 -2
- package/dist/{chunk-zth1sf5n.js → chunk-a8j61zs9.js} +2 -2
- package/dist/{chunk-xv7xzr7h.js → chunk-acnqnrqb.js} +2 -2
- package/dist/{chunk-c843be1k.js → chunk-ajjd22hb.js} +3 -3
- package/dist/{chunk-0ne9v3vr.js → chunk-akvpgx43.js} +2 -2
- package/dist/{chunk-hy5ansma.js → chunk-bpenajbp.js} +2 -2
- package/dist/{chunk-jnsxjybz.js → chunk-brfr0m5g.js} +2 -2
- package/dist/{chunk-6sbyy3f4.js → chunk-bt0t1pev.js} +2 -2
- package/dist/{chunk-8x6gswg0.js → chunk-bxmgvyfe.js} +2 -2
- package/dist/chunk-c47xfjk4.js +2 -0
- package/dist/{chunk-qrdsdky0.js → chunk-c61yvpy3.js} +2 -2
- package/dist/{chunk-xb655337.js → chunk-c7p3vpyx.js} +2 -2
- package/dist/{chunk-y0y9yzzc.js → chunk-ckhw0gr5.js} +2 -2
- package/dist/{chunk-we4hjktj.js → chunk-d0ta9y85.js} +2 -2
- package/dist/{chunk-rcfykx93.js → chunk-d9mmpjrr.js} +2 -2
- package/dist/{chunk-kxyckd4b.js → chunk-dz5ymd3t.js} +2 -2
- package/dist/{chunk-qj1k56ag.js → chunk-e0c8pmjc.js} +3 -3
- package/dist/{chunk-14d60z29.js → chunk-ek3v1g24.js} +2 -2
- package/dist/{chunk-j8vz3m75.js → chunk-eq7vpgn7.js} +2 -2
- package/dist/{chunk-x52rbm87.js → chunk-ewjh6s2b.js} +2 -2
- package/dist/{chunk-73099pzj.js → chunk-f1r8wh4e.js} +2 -2
- package/dist/{chunk-jahh3cp4.js → chunk-f2a9rqfz.js} +2 -2
- package/dist/{chunk-xfgwp480.js → chunk-fbmbc4wt.js} +2 -2
- package/dist/{chunk-x3nfa92z.js → chunk-fd8x014y.js} +2 -2
- package/dist/chunk-fgr2g610.js +3 -0
- package/dist/{chunk-nnfx4e2r.js → chunk-fnw16wjx.js} +2 -2
- package/dist/chunk-fqgz93sy.js +2 -0
- package/dist/{chunk-0q9y4dw0.js → chunk-fw2jj4hh.js} +2 -2
- package/dist/{chunk-wttarxt9.js → chunk-fzgra242.js} +2 -2
- package/dist/{chunk-jphjekr9.js → chunk-g0gq72z9.js} +2 -2
- package/dist/{chunk-wmew350q.js → chunk-g79y6q3f.js} +2 -2
- package/dist/{chunk-e8349nct.js → chunk-gfrzmgz4.js} +2 -2
- package/dist/{chunk-197rc8qr.js → chunk-gkp0e28t.js} +2 -2
- package/dist/{chunk-b935g3j2.js → chunk-grgq7twf.js} +2 -2
- package/dist/{chunk-m6wwrjjq.js → chunk-gwa7hbzr.js} +1 -1
- package/dist/{chunk-jtxcskjs.js → chunk-h4adycra.js} +2 -2
- package/dist/{chunk-heqqsp62.js → chunk-h9ywpga2.js} +3 -3
- package/dist/{chunk-pbv2j86k.js → chunk-ha2f2cwz.js} +2 -2
- package/dist/{chunk-bdsqfsmw.js → chunk-hbm3sgw7.js} +2 -2
- package/dist/{chunk-5p4kx6nx.js → chunk-hkjj3prp.js} +2 -2
- package/dist/{chunk-expcd42p.js → chunk-j18830g5.js} +2 -2
- package/dist/{chunk-23b01zzq.js → chunk-jg6r0ckn.js} +2 -2
- package/dist/{chunk-rmhgmrdk.js → chunk-jwzwz2wr.js} +2 -2
- package/dist/{chunk-ryh1rjgt.js → chunk-jxgtgpa9.js} +2 -2
- package/dist/{chunk-sbd8f63t.js → chunk-jzaxy8af.js} +2 -2
- package/dist/{chunk-p0jeje65.js → chunk-k10kbwqc.js} +2 -2
- package/dist/{chunk-67t9pyqt.js → chunk-kctrzc57.js} +2 -2
- package/dist/{chunk-xrrsxjst.js → chunk-kjt77brz.js} +2 -2
- package/dist/chunk-kmeccf75.js +2 -0
- package/dist/{chunk-ybmvk9bj.js → chunk-kxw57gdb.js} +2 -2
- package/dist/{chunk-2g2ydnbw.js → chunk-m1adrey8.js} +2 -2
- package/dist/{chunk-tv8k9r9m.js → chunk-m7wse5yk.js} +2 -2
- package/dist/{chunk-ea6cx4zd.js → chunk-n3d2mv93.js} +3 -3
- package/dist/{chunk-stcp2kyv.js → chunk-njre3ygs.js} +2 -2
- package/dist/{chunk-d9c5361b.js → chunk-nm4dtceb.js} +2 -2
- package/dist/{chunk-jhhvtcp8.js → chunk-np76wm1k.js} +2 -2
- package/dist/{chunk-eyqnxv1e.js → chunk-nsy1ne51.js} +2 -2
- package/dist/{chunk-cawd39p2.js → chunk-p38vws4a.js} +2 -2
- package/dist/{chunk-xzhxg3fn.js → chunk-p5mfv6t6.js} +2 -2
- package/dist/{chunk-yf4cr44n.js → chunk-p6gwrqjp.js} +2 -2
- package/dist/{chunk-mg2js52j.js → chunk-pdrz9qs1.js} +2 -2
- package/dist/{chunk-mwre38v3.js → chunk-pks7f314.js} +5 -5
- package/dist/{chunk-fwjdx5an.js → chunk-pza08wvz.js} +2 -2
- package/dist/{chunk-0xtdc07w.js → chunk-q0bwkhpy.js} +2 -2
- package/dist/{chunk-nsackhh2.js → chunk-q5fn378d.js} +2 -2
- package/dist/{chunk-eaps0vme.js → chunk-q9h89nv1.js} +2 -2
- package/dist/{chunk-fytmxmdj.js → chunk-qm649qdv.js} +2 -2
- package/dist/{chunk-bj7hfsbz.js → chunk-rfahybr0.js} +1 -1
- package/dist/{chunk-gkvc394d.js → chunk-s4m2h876.js} +1 -1
- package/dist/chunk-s8xpf179.js +2 -0
- package/dist/{chunk-bypzxwxt.js → chunk-stqqrke0.js} +2 -2
- package/dist/{chunk-5tfyyc5a.js → chunk-stzsxdpp.js} +2 -2
- package/dist/{chunk-pd8hv1z9.js → chunk-t1zw5wrq.js} +2 -2
- package/dist/{chunk-t8n1ny7h.js → chunk-tptx1zs3.js} +2 -2
- package/dist/{chunk-q7aqfe35.js → chunk-tqz7csrk.js} +2 -2
- package/dist/{chunk-fm2z743r.js → chunk-v0mbfaqw.js} +2 -2
- package/dist/{chunk-e159yyzf.js → chunk-v5mb5c61.js} +2 -2
- package/dist/{chunk-9fxfprgs.js → chunk-vttgk30b.js} +2 -2
- package/dist/chunk-w65d6934.js +2 -0
- package/dist/chunk-w7p443ya.js +1 -0
- package/dist/{chunk-me3wzsyg.js → chunk-wbhxpwm7.js} +2 -2
- package/dist/chunk-wr5r2t2m.js +2 -0
- package/dist/{chunk-vngx7fht.js → chunk-wwq7d7qm.js} +1 -1
- package/dist/{chunk-382tg8fq.js → chunk-wyr7zv2j.js} +2 -2
- package/dist/{chunk-t5hxmkmk.js → chunk-x6yxbndc.js} +2 -2
- package/dist/{chunk-n2bzp8tm.js → chunk-xbqvb31f.js} +2 -2
- package/dist/{chunk-hgar92ae.js → chunk-xgcwrqpw.js} +2 -2
- package/dist/{chunk-7phr0tnr.js → chunk-xgyb00qq.js} +2 -2
- package/dist/{chunk-3wv9dsht.js → chunk-xrbydq2j.js} +2 -2
- package/dist/{chunk-fzfmg9pk.js → chunk-yftn8cw0.js} +2 -2
- package/dist/{chunk-pj2cv8fz.js → chunk-yfws137b.js} +2 -2
- package/dist/{chunk-85vqfa42.js → chunk-ym6h1x3a.js} +1 -1
- package/dist/{chunk-1xsfk3pf.js → chunk-yvr086m7.js} +2 -2
- package/dist/{chunk-fd3p9rqe.js → chunk-z5c4njqk.js} +2 -2
- package/dist/{chunk-28737pjc.js → chunk-zae7p9pm.js} +2 -2
- package/dist/{chunk-3axrv16v.js → chunk-zfag3ne0.js} +2 -2
- package/dist/{chunk-b5wvtzdr.js → chunk-zjevkw68.js} +2 -2
- package/dist/{chunk-3365b0ne.js → chunk-zk2hwm10.js} +2 -2
- package/dist/{chunk-47zq7h2n.js → chunk-zmbf0v0n.js} +2 -2
- package/dist/chunk-zqe4mjgy.js +2 -0
- 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/patch-view.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/completion-trigger.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.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.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.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -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.js +1 -1
- 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.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/conversation/subagent-tasks.js +1 -1
- package/dist/generated/commands.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/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/locales.d.ts +13 -0
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-header.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/plugins/toolbox-layout.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.d.ts +5 -0
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.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/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-dot.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/sidebar-overlay.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-image-references.d.ts +3 -0
- package/dist/session-timeline/assistant-image-references.js +1 -0
- 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/image-generation-progress.d.ts +4 -0
- package/dist/session-timeline/image-generation-progress.js +1 -0
- 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-2f8t38fg.js +0 -2
- package/dist/chunk-5akfmr5g.js +0 -2
- package/dist/chunk-6h3yegwm.js +0 -2
- package/dist/chunk-8c0f9agv.js +0 -2
- package/dist/chunk-8ckxhxqq.js +0 -2
- package/dist/chunk-9gnce8bk.js +0 -2
- package/dist/chunk-a59zda76.js +0 -2
- package/dist/chunk-g8nphzck.js +0 -2
- package/dist/chunk-qhgn09vf.js +0 -1
- package/dist/chunk-v07v13k1.js +0 -2
- package/dist/chunk-v2qd3fcr.js +0 -2
- package/dist/chunk-vssh28er.js +0 -3
- package/dist/chunk-z441gmv3.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t,
|
|
2
|
-
export{
|
|
1
|
+
import{t,ct}from"./chunk-f1r8wh4e.js";import{isEmbeddedResource as B,isImage as h,isResourceLink as E}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as T,FileIcon as N,ImageOffIcon as L,LoaderCircleIcon as F}from"lucide-react";import{useState as y}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function jr(e){let s=e.split(/[\\/]/).at(-1)??e;if(e.startsWith("file:")||/^https?:/.test(e))s=new URL(e).pathname.split("/").at(-1)??"";try{return decodeURIComponent(s)||"attachment"}catch(a){if(a instanceof URIError)return s||"attachment";throw a}}function U(e,s){let a=document.createElement("a");a.href=s,a.download=e,a.click()}function Y({block:e,generated:s=!1}){let a=t(),[p,d]=y(!1),[I,C]=y(null);if(E(e)){if(e.uri==="codex-image:unavailable")return o("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[n(L,{className:"size-4"}),a.t("timeline.imageUnavailable")]});let c=jr(e.uri);return o(u,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":e.title??e.name,title:e.uri,onClick:()=>a.openLink(e.uri),children:[n(N,{}),o("span",{className:"min-w-0 flex-1 text-start",children:[n("span",{className:"block truncate",children:e.title??e.name}),o("span",{className:"text-muted-foreground block truncate text-xs",children:[(e.title??e.name)!==c&&`${c} · `,e.mimeType??c.split(".").at(-1)?.toUpperCase()]})]})]})}if(!B(e)&&!h(e))return null;let i=h(e)?{uri:e.uri??`image.${e.mimeType.split("/")[1]??"png"}`,mimeType:e.mimeType,blob:e.data}:e.resource,r=jr(i.uri);if("text"in i)return o("div",{className:"min-w-0",children:[n("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:i.text}),o(u,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:i.uri,onClick:()=>a.openLink(i.uri),children:[n(N,{}),n("span",{className:"truncate",children:r})]})]});let l=`data:${i.mimeType??"application/octet-stream"};base64,${i.blob}`,f=i.mimeType?.toLowerCase().startsWith("image/")&&I!==l,{openImage:g,openImageGallery:w}=a,x=w?()=>w([{src:l,alt:r,uri:i.uri}],0):g&&(()=>g(l)),m=s&&f,R=async()=>{d(!0);try{if(a.saveFile)await a.saveFile(r,i.blob);else U(r,l)}catch(c){ct(a,c)}finally{d(!1)}},v=n("img",{src:l,alt:"",className:s?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(l)});return o("div",{className:m?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:n(u,{variant:"ghost",className:s?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":a.t("timeline.viewImage"),onClick:x,children:v})),o(u,{variant:m?"secondary":"link",size:m?"icon":"sm",className:m?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:a.t("timeline.download",{name:r}),"aria-label":a.t("timeline.download",{name:r}),onClick:()=>{R()},children:[p?n(F,{className:"motion-safe:animate-spin"}):n(T,{}),!m&&n("span",{className:"truncate",children:r})]})]})}
|
|
2
|
+
export{jr,Y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{Pe,
|
|
1
|
+
import{ft}from"./chunk-4cb0c8ae.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Pe(e){let t=r.get(e);if(!t)t=ft(e),r.set(e,t);return t}function Xi({host:e,client:t,children:n}){let s=Pe(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Te(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Be(e){let t=Te();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Pe(Te());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Ie(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
+
export{Pe,Xi,l,Te,Be,i,Ie};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{be}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{be}from"./chunk-c47xfjk4.js";import{zo,N}from"./chunk-75ve01mr.js";import{Lo,Ro,Fo,Do,Ho,R}from"./chunk-p38vws4a.js";import{t,o}from"./chunk-f1r8wh4e.js";import{e}from"./chunk-6pnsagt4.js";import{$o}from"./chunk-nm4dtceb.js";import{Io}from"./chunk-1bfxezrb.js";import{xo}from"./chunk-8428vfp3.js";import{vo,yo}from"./chunk-7egc2evj.js";import{un}from"./chunk-h9ywpga2.js";import{vn}from"./chunk-s8xpf179.js";import{s,Vo,z,qt}from"./chunk-xrbydq2j.js";import{zt}from"./chunk-ewjh6s2b.js";import{Re,$t}from"./chunk-hkjj3prp.js";import{Wt,Qt}from"./chunk-9rt2pfsm.js";import{Ko}from"./chunk-jwzwz2wr.js";import{jt}from"./chunk-70j4ee5r.js";import{Po}from"./chunk-t1zw5wrq.js";import{Yt}from"./chunk-h4adycra.js";import{Vt}from"./chunk-fw2jj4hh.js";import{To}from"./chunk-ckhw0gr5.js";import{Eo}from"./chunk-6z36709h.js";import{Ao}from"./chunk-zk2hwm10.js";import{Gt}from"./chunk-brfr0m5g.js";import{hasFuzzyFileSearch as Nt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as St}from"lucide-react";import{useCallback as O,useEffect as kt,useLayoutEffect as Z,useMemo as tt,useRef as V,useState as F}from"react";import{jsx as i,jsxs as v,Fragment as Bt}from"react/jsx-runtime";var Ot=["image/png","image/jpeg","image/webp","image/gif"],et=[];async function Ft(r){let h=await(await fetch(r.url)).blob();return new Promise((l,C)=>{let T=new FileReader;T.onerror=()=>C(T.error),T.onload=()=>{let U=T.result;l(U.slice(U.indexOf(",")+1))},T.readAsDataURL(h)})}function Dt(r){let{t:h}=t(),l=N();return i(R,{"aria-label":h("composer.attachImage"),title:h("composer.attachImage"),onClick:()=>l.openFileDialog(),...r,children:i(St,{className:"size-4"})})}function Ut({session:r,onSubmit:h,onShellCommand:l,onHandOff:C,modelSelector:T,modelMenu:U,inputHeader:rt,actions:ft,leadingTools:ht,agentControls:X=!0,placeholder:gt,children:xt,attachmentPolicy:yt,predictions:Pt=!0,disabled:bt=!1,preparing:ot=!1,allowPendingInput:vt=!1}){let{host:D,client:E}=e(),{t:p}=D,B=O((n)=>{if(D.reportError)D.reportError(n);else console.error(n)},[D]),[nt,_]=F(()=>({text:s.get(r.id)?.text??"",revision:0})),{text:d}=nt,[A,wt]=F(()=>s.get(r.id)?.attachments??et),[g,H]=F(()=>s.get(r.id)?.mentions??[]),q=A.some((n)=>Re(n)&&n.pastedText.status!=="ready"),[M,at]=F(!1),[K,It]=F(!1),[J,it]=F(!1),u=V(null),ct=V(null),a=V(nt),S=O((n)=>{ct.current?.(),a.current={text:n,revision:a.current.revision+1},_(a.current)},[]),Tt=To(r,S),st=tt(()=>({read:()=>{let c=u.current?.getTextarea(),x=c===null||c===void 0?[a.current.text.length,a.current.text.length]:[c.selectionStart,c.selectionEnd];return{target:r.id,...a.current,selection:x}},compareAndSet(c,x,w){if(c.target!==r.id||c.revision!==a.current.revision)return null;a.current={text:x,revision:a.current.revision+1},_(a.current);let y=u.current?.getTextarea();if(y!==null&&y!==void 0)y.value=x,y.setSelectionRange(w[0],w[1]);return{target:r.id,...a.current,selection:w}}}),[r.id]),L=V(null),mt=O((n)=>(L.current=n,()=>{if(L.current===n)L.current=null}),[]),W=r.state!=="idle",P=l!==void 0&&d.startsWith("!"),f=!bt&&!ot&&r.attached&&!r.restoring&&!r.readOnly,k=!r.readOnly&&(vt||f),j=Vt(r,f&&!M&&!K&&!q&&!J,d.length>0||A.length>0||g.length>0,Pt&&!P),pt=j.invalidate;Z(()=>{s.set(r.id,{text:d,attachments:A,mentions:g,modelId:s.get(r.id)?.modelId??null})},[r.id,d,A,g]),Z(()=>Vo(r.id,wt),[r.id]),Z(()=>qt(r.id,(n)=>{if(!k||M)throw Error("The composer cannot take text now; try again later");if(d.length||A.length||g.length)throw Error("The composer already has a draft; send or clear it first");S(n)}),[r.id,k,M,d,A,g,S]);let lt=o((n)=>Nt(n.agent)),At=tt(()=>lt&&f?async(n)=>zt((await E.fuzzyFileSearch({query:n,roots:[r.cwd],cancellationToken:null})).files):void 0,[E,lt,f,r.cwd]),Q=O((n)=>{H((c)=>c.includes(n)?c:[...c,n])},[]);kt(()=>{u.current?.focus()},[]);let dt=O(async({text:n,files:c})=>{let x=l!==void 0&&n.startsWith("!")?n.slice(1):null;if(x!==null){if(x.trim().length===0)return;if(c.length||g.length)throw Error("Shell commands cannot include file references or attachments");if(r.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let w=n.trim();if(w.length===0&&c.length===0&&g.length===0)return;let y=L.current;at(!0);let I=s.get(r.id),Rt=a.current.revision,G=null;try{let b=$o(w);for(let m of g){let Y={kind:"file",absPath:m};b.push({type:"resource_link",uri:Wt(Y),name:Qt(Y)})}if(w.length>0)b.push({type:"text",text:w});for(let m of c)if(Re(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");b.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else b.push({type:"image",data:await Ft(m),mimeType:m.mediaType});if(a.current.revision===Rt&&s.get(r.id)===I)a.current={text:"",revision:a.current.revision+1},G=a.current.revision,_(a.current),H([]),z(r.id,()=>et),s.set(r.id,{text:"",attachments:et,mentions:[],modelId:I?.modelId??null}),u.current?.resetHeight();if(x!==null&&l)await l(x);else if(h)if(y===null)await h(b);else await h(b,(m)=>{if(y.signal.aborted||L.current!==y)return;y.accept(m),C?.(r.id,m)});else if(y===null)await E.prompt(r.id,b);else{let m=await E.prompt(r.id,b);y.accept(m)}pt();for(let m of I?.attachments??[])if(m.url.startsWith("blob:")&&!s.get(r.id)?.attachments.some((Y)=>Y.id===m.id))URL.revokeObjectURL(m.url)}catch(b){if(I&&G!==null&&a.current.revision===G&&s.get(r.id)?.attachments.length===0&&s.get(r.id)?.mentions.length===0)a.current={text:I.text,revision:G+1},_(a.current),H(I.mentions),s.set(r.id,I),z(r.id,()=>I.attachments);throw b}finally{at(!1),u.current?.focus()}},[E,r.id,r.state,g,h,l,C,pt]),Mt=()=>{E.cancel(r.id).catch(B)},Ct=O((n)=>{let c=n.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:be})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});B(c)},[B,p]),Et=tt(()=>({session:r,ready:f,inputReady:k,sending:M,textareaRef:u,draft:st,interruptRef:ct,observeReceipts:mt,addMention:Q,setAdding:It,shellMode:P,handsFree:!P&&(h===void 0||C!==void 0)}),[r,f,k,M,st,mt,Q,h,C,P]),ut=D.writeTextAttachment;return i(vn,{value:Et,children:i("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[rt&&i("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:rt}),v(zo,{attachmentPolicy:yt,value:d,revision:a.current.revision,onValueChange:S,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},_(a.current)},attachments:A,onAttachmentsChange:(n)=>z(r.id,()=>n),children:[X&&i(xo,{bashMode:l!==void 0,handleRef:u,commands:r.commands,searchFiles:At,onMention:Q,onSearchError:B,forcedOpen:J,onForcedOpenChange:it,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),v(Lo,{"data-shell-mode":P||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Ot.join(","),onError:Ct,onSubmit:dt,onSubmitAsync:dt,onSubmitError:B,canSubmit:()=>f&&!M&&!K&&!q&&(!P||!W&&d.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[xt,v(Fo,{className:"px-3 pt-3 pb-0 empty:hidden",children:[K&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),i(Ko,{mentions:g,onRemove:(n)=>H((c)=>c.filter((x)=>x!==n))}),i(yo,{children:(n)=>Re(n)?i(Po,{data:n,sessionId:r.id}):i(vo,{data:n,t:p})})]}),v(Ro,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(n)=>{if(!j.text||u.current?.isComposing()||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||n.shiftKey||n.ctrlKey||n.altKey||n.metaKey||n.target!==u.current?.getTextarea())return;if(n.key==="Tab")n.preventDefault(),n.stopPropagation(),S(j.text)},children:[P&&i("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),i(un,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,onKeyDown:Tt,bashMode:l!==void 0,disabled:!k,onPasteCapture:ut?(n)=>$t(n,r.id,p("composer.pastedTextFilename"),ut):void 0,placeholder:P?"! command":j.text||gt||(W?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),i(Do,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[i(Dt,{className:"text-foreground",disabled:!k}),ht,X&&v(Bt,{children:[i(Eo,{textareaRef:u,menuOpen:J,onOpenChange:it,disabled:!f||r.commands.length===0}),i(Io,{disabled:!f||P,onSelect:(n)=>{S(`${d}${d&&!/\s$/.test(d)?" ":""}${n} `),u.current?.getTextarea()?.focus()}}),i(Yt,{sessionId:r.id,options:r.configOptions,disabled:!f})]})]}),v(Ho,{className:"w-full min-w-0 items-center justify-end gap-1",children:[X&&i(Gt,{session:r}),T??i(jt,{...U,sessionId:r.id,options:r.configOptions,disabled:!f}),ft,i(Ao,{active:W,sending:M||ot||K,ready:f&&!q&&(!P||!W&&d.slice(1).trim().length>0),hasMentions:g.length>0,onStop:Mt})]})]})})]})]})]})})})}
|
|
2
|
+
export{Ut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{S}from"./chunk-958qyr8g.js";import{r,p}from"./chunk-a8gzs651.js";import{m,u}from"./chunk-3m59n5gr.js";import{GlobeIcon as G,LogOutIcon as R}from"lucide-react";import{useRef as k,useState as l}from"react";import{Avatar as T,AvatarFallback as B,AvatarImage as E}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as g,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as f,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function wr(e){return o(g,{...e})}function kr(e){return o(f,{...e})}function so({className:e,...a}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...a})}function Sr({languages:e,value:a,onChange:c}){let s=r();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(G,{className:"text-muted-foreground"}),s.t("sessionList.language")]}),o(_,{children:o(z,{value:a,onValueChange:(t)=>void p(s,Promise.resolve(c(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function _r({user:e,children:a,onSignOut:c,busy:s=!1}){let t=r(),{t:N}=t,[M,C]=l(!1),[L,w]=l(!1),b=k(null),[v,O]=l({width:0,offset:0}),P=(h)=>{if(h){let d=b.current,i=d?.closest("[data-sidebar-footer-row]");if(!d||!i)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=i.getBoundingClientRect(),A=d.getBoundingClientRect(),I=getComputedStyle(i).direction==="rtl";O({width:i.clientWidth,offset:I?y.right-A.right:A.left-y.left})}C(h)};S(M);let D=s||L,x=n(T,{className:"size-[18px] after:border-0",children:[o(E,{src:e.avatar??void 0,alt:""}),o(B,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:M,onOpenChange:P,children:[n(J,{ref:b,render:o(u,{disabled:D,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(m,{children:x}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-v.offset,sideOffset:8,style:{width:v.width},children:[n(g,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(m,{children:x}),n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(f,{})]}),a,a!=null&&o(f,{}),o(g,{children:n(so,{disabled:D,onClick:()=>{w(!0),p(t,c()).finally(()=>w(!1))},children:[o(R,{}),N("sessionList.signOut")]})})]})]})}
|
|
2
|
+
export{wr,kr,so,Sr,_r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ki(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function Si(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
|
|
2
|
+
export{ki,Si};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T}from"./chunk-
|
|
1
|
+
import{T}from"./chunk-32s8dn1a.js";import{t}from"./chunk-f1r8wh4e.js";import{Y}from"./chunk-g0gq72z9.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(T,{text:e.text,streaming:o})})}if(i.isImage(e))return n(Y,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(Y,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function ke({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
2
|
export{ke};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{qo}from"./chunk-3v39hqex.js";import{e,f}from"./chunk-6pnsagt4.js";import{j,g}from"./chunk-w0dfvr05.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":y,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:h,onConfigChange:c}){let{host:l,client:M}=e(),{t:r}=l,s=g(m,"mode");if(!s)return null;let o=s.currentValue,p=j(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),I=p.find((n)=>n.value===o),C=d[o]??a,v=(n)=>{if(n===o)return;f(l,c?c(s.configId,n):M.setConfig(u,s.configId,n))};return t(qo,{value:o,warning:o==="agent-full-access",currentName:I?.name??o,icon:t(C,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:h,label:r("composer.switchPermissionMode"),onValueChange:v,options:p.map((n)=>{let i=d[n.value]??a,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Yt=O(N);
|
|
2
|
+
export{Yt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Co,wo,Bt}from"./chunk-kmeccf75.js";import{Xe,N}from"./chunk-75ve01mr.js";import{cn as D}from"cn";import{forwardRef as M,useCallback as R,useEffect as x,useImperativeHandle as F,useRef as d}from"react";import{InputGroupTextarea as K}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,L=()=>!1,un=M(({onChange:c,onKeyDown:T,onCompositionStart:b,onCompositionEnd:y,className:E,placeholder:I,bashMode:C=!1,isSendShortcut:H=z,isNewlineShortcut:S=L,...h},P)=>{let n=Xe(),p=N(),u=d(!1),i=d(!1),a=d(null),l=d(null),o=R(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);x(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([s])=>{if(s&&s.contentRect.width!==t)t=s.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),x(o,[o,n?.textInput.value,h.value]);let f=C&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||i.current)return;if(T?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
2
|
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(f&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(S(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:s,value:m}=t,g=`${m.slice(0,r)}
|
|
3
|
-
${m.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},k=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:s}=
|
|
4
|
-
export{
|
|
3
|
+
${m.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},k=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:s}=Co(t),m=wo(t);if(r.length>0)e.preventDefault(),p.add(r);else if(s&&!m)e.preventDefault()},A=n?{value:u.current&&a.current?a.current.value:f?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:Bt(e.currentTarget);n.textInput.setInput(f?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)Bt(e.currentTarget);o(),c?.(e)}};return F(P,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||i.current,getTextarea:()=>a.current}),[]),q(K,{"data-chat-input":!0,ref:a,rows:3,className:D("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=Bt(e.currentTarget);n?.textInput.setInput(f?`!${t}`:t),o(),y?.(e),i.current=!0,requestAnimationFrame(()=>{i.current=!1})},onCompositionStart:(e)=>{i.current=!1,u.current=!0,b?.(e)},onKeyDown:w,onPaste:k,placeholder:I,...h,...A})});un.displayName="PromptInputTextarea";
|
|
4
|
+
export{un};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{xi}from"./chunk-v5mb5c61.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function yi(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return xi(a,r)}
|
|
2
|
+
export{yi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{At}from"./chunk-wr5r2t2m.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function vr({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(At,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
|
|
2
|
+
export{vr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ce}from"./chunk-qdw6bkg1.js";import{s,z
|
|
2
|
-
export{
|
|
1
|
+
import{Ce}from"./chunk-qdw6bkg1.js";import{s,z,Kt}from"./chunk-xrbydq2j.js";var Mo=5000;function Re(t){return"pastedText"in t}function Ze(t,e,o){let i=(r,n)=>{for(let[a,x]of s){if(!x.attachments.some((p)=>p.id===e.id))continue;z(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:n===void 0?"":Ce(n),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!s.get(t)?.attachments.some((r)=>r.id===e.id))return;i("pending"),Kt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>i("ready",r)).catch(()=>i("error")))}function $t(t,e,o,i){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Mo)return;t.preventDefault(),t.stopPropagation();let n={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};z(e,(a)=>[...a,n]),Ze(e,n,i)}
|
|
2
|
+
export{Mo,Re,Ze,$t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r,a,n}from"./chunk-
|
|
1
|
+
import{r,a,n}from"./chunk-a8gzs651.js";import{Ae,ne,Z}from"./chunk-5yq8k08p.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function M({className:u,...s}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...s,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function xr({Scroll:u=we}){let{t:s,i18n:A}=r(),m=a(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,ee]=d("all"),[te,se]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,te]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??s("sessionList.untitled"),ae=[...new Set(S.filter((e)=>o&&j(o,e).id!==Z).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===Z;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
2
|
`));else f(null)}finally{h.current=!1,w(!1)}}return i("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":s("sessionList.archives.title"),children:[i("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[i("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:s("sessionList.archives.title")}),i(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),s("sessionList.archives.deleteAll")]})]}),i("div",{className:"flex shrink-0 flex-wrap gap-3",children:[i("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":s("sessionList.archives.search"),placeholder:s("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),i(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[i(R,{"aria-label":s("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:s(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),i(M,{children:[t(x,{value:"all",children:s("sessionList.archives.allChats")}),t(x,{value:"quick",children:s("sessionList.archives.quickChats")}),t(x,{value:"project",children:s("sessionList.archives.projectChats")})]})]}),i(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[i(R,{"aria-label":s("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?s("sessionList.archives.allProjects"):p==="quick"?s("sessionList.archives.noProject"):ne(p,o??void 0)})]}),i(M,{children:[t(x,{value:"all",children:s("sessionList.archives.allProjects")}),t(x,{value:"quick",children:s("sessionList.archives.noProject")}),ae.map((e)=>t(x,{value:e,title:e,children:ne(e,o??void 0)},e))]})]})]}),i(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:s("sessionList.archives.connecting")}):q?i("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),s("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:i(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>se((e)=>e+1),children:s("sessionList.archives.retry")})]})}):S.length===0?i("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:s("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:s("sessionList.archives.noResults")}):(o?Ae(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>i("section",{className:"flex flex-col gap-3",children:[i("div",{className:"flex items-center justify-between gap-3",children:[i("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===Z?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===Z?s("sessionList.archives.noProject"):ne(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:s("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>i("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[i("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:s("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(l.updatedAt))})]}),i("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":s("sessionList.delete"),title:s("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(l),children:s("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:i(ge,{showCloseButton:!C,children:[i(ye,{children:[t(Le,{children:s("sessionList.archives.deleteTitle")}),t(xe,{children:s(ie?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),i(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:s("sessionList.cancel")}),i(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(J,{}),s("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{
|
|
3
|
+
export{xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l,i}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{l,i}from"./chunk-g79y6q3f.js";import{h}from"./chunk-9cqpn67f.js";import{M}from"./chunk-f2a9rqfz.js";import{de}from"./chunk-8d86yqzq.js";import{U,le,ce}from"./chunk-yftn8cw0.js";import{ExternalLinkIcon as W,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}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 O}from"react/jsx-runtime";function mt({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)),v=i((a)=>a.busyIds[r.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,I]=y(null),[j,R]=y(0),[c,z]=y(null);q(()=>{let a=!0;return I(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,j]);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",E=s?.longDescription??o?.description??s?.shortDescription,A=[...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(ce,{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(f,{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(M,{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(O,{children:[e(X,{checked:m.enabled,disabled:!!v||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void V(m,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(m),children:v?e(S,{}):t("plugins.detail.uninstall")})]}):e(f,{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:!!v||k,onClick:()=>void T({...r,plugin:d}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(h,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${U} 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(L,{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(x,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(x,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(x,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(x,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(x,{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(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:t("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].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(N,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(N,{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(M,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(N,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(f,{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(M,{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(N,{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(N,{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:le,children:c&&n(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(M,{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(de,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({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 N({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(f,{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
|
+
export{mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-f1r8wh4e.js";import{Zt}from"./chunk-9rt2pfsm.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Ko({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:Zt(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:Zt(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
|
|
2
|
+
export{Ko};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function
|
|
2
|
-
export{
|
|
1
|
+
import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function tr(t){return{agent:()=>{let n=t.state.agent;if(t.state.connection!=="ready"||!n?.info)return null;return{name:n.info.title??n.info.name,version:n.info.version,authMethods:n.authMethods??[],actions:t.state.actions.filter((o)=>o.sessionId===null)}},subscribe:(n)=>t.store.subscribe(n),logout:()=>t.logout(),login:(n,o)=>t.login(n,o),respond:(n,o)=>t.respond(n,o),account:async()=>{if(t.state.connection!=="ready"||!x(t.state.agent))return null;let[n,o]=await Promise.all([t.readAccount(),t.readRateLimits().catch(()=>null)]);return{account:n,rateLimits:o}},onRateLimits:(n)=>t.onRateLimits(n)}}function nr(t,n){let{listen:o,emitTo:u}=n,g=t.agent(),l=()=>{let s=t.agent();if(u(p,w,s),g===null!==(s===null))c();g=s},i=null,r=0,a=!1,c=async()=>{let s=++r;try{let d=await t.account();if(a||s!==r)return;i=d,await u(p,h,i)}catch(d){if(a||s!==r)return;await u(p,P,v(d))}},e=t.subscribe(l),m=t.onRateLimits((s)=>{if(i===null)return;i={...i,rateLimits:s},u(p,h,i)}),b=Promise.all([o(y,l),o(T,()=>void c()),o(E,({payload:s})=>void(async()=>{try{switch(s.action){case"login":await t.login(s.methodId,s.extra),await c();break;case"logout":await t.logout(),await c();break;case"respond":t.respond(s.actionId,s.answer);break}await u(p,A,{id:s.id,error:null})}catch(d){await u(p,A,{id:s.id,error:v(d)})}})())]);return()=>{a=!0,r++,e(),m(),b.then((s)=>{for(let d of s)d()})}}function or(t,n=console.error){let{listen:o,emitTo:u}=t,g;async function l(i){let r,a=new Promise((e)=>{r=e}),c=await o(A,(e)=>{if(e.payload.id===i.id)r(e.payload)});try{await u(f,E,i);let{error:e}=await a;if(e!==null)throw Error(e)}finally{c()}}return{useSettingsAccount(){let[i,r]=S(()=>g);return R(()=>{let a=!1,c=Promise.all([o(h,(e)=>{if(a)return;g=e.payload,r(e.payload)}),o(P,(e)=>{if(a)return;if(g===void 0)r(null),n(e.payload);else console.error("Account refresh failed",e.payload)})]);return c.then(()=>{if(!a)return u(f,T)}),()=>{a=!0,c.then((e)=>{for(let m of e)m()})}},[]),i},useSettingsAgent(){let[i,r]=S(void 0);return R(()=>{let a=!1,c=o(w,(e)=>{if(!a)r(e.payload)});return c.then(()=>{if(!a)return u(f,y)}),()=>{a=!0,c.then((e)=>e())}},[]),i},requestSignOut:()=>l({id:crypto.randomUUID(),action:"logout"}),requestSignIn:(i,r)=>l({id:crypto.randomUUID(),action:"login",methodId:i,extra:r}),requestActionResponse:(i,r)=>l({id:crypto.randomUUID(),action:"respond",actionId:i,answer:r})}}
|
|
2
|
+
export{tr,nr,or};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-6pnsagt4.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function Rr({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
|
|
2
|
+
export{Rr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{dn,
|
|
1
|
+
import{pn,So}from"./chunk-xgyb00qq.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function dn(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=pn(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function pa(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return So(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
|
|
2
|
+
export{dn,pa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ki}from"./chunk-2tc8kgsa.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function On(t,r,e={}){let o=r.trim();if(o.length===0)return[];return Ki(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
|
|
2
|
+
export{On};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function bo(t,e){if(e===0)return null;let r=e-1;while(r>=0){let n=t[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":t[r-1],s=r===0||i===`
|
|
3
3
|
`;if(n==="/"?s&&!/[/\\]/.test(t.slice(r+1,e)):s||i===" "||i==="\t")return{kind:n==="/"?"slash":"at",start:r,end:e,query:t.slice(r+1,e)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{bo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Qr(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 Co(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(Qr(t,o))}return{imageFiles:n,sawNonImageFile:i}}function wo(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Yr(e){return e.replace(s,"")}function Dr(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 Bt(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Yr(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-Dr(n,i)),r=Math.max(0,o-Dr(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
+
export{Qr,Co,wo,Yr,Dr,Bt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function Nn(n){if(n.kind!=="tool")return!1;let t=n._meta?.codex;return typeof t==="object"&&t!==null&&"commandSource"in t&&t.commandSource==="userShell"}function hi(n,t,r){if(n.kind!=="tool"){let o=p(n.content),d=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(o);return{type:"thinking",id:n.id,thinking:d?d[1]:o,isComplete:!r}}if(n.name==="subagent"){let o=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:g(o.agentPath,n.id),threadId:f(o.agentThreadId,"agentThreadId",n.id),activity:y(o.activity,n.id),model:l(o.model,"model",n.id),reasoningEffort:l(o.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let o=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof o.tool!=="string"||!Array.isArray(o.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:o.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:o.agents}}let a=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},i=u(n,t);if(Array.isArray(a.command))a.command=a.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof a.command!=="string"){let o=i?.command??n.title;if(o!==null)a.command=o}let e=n.rawOutput;if(typeof e==="object"&&e!==null&&"output"in e&&typeof e.output==="string")e=e.output;if(i!==null&&i.output.length>0)e=i.output;let c=i?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:a,rawOutput:e,...Nn(n)?{userShell:!0}:{},...typeof c==="number"?{exitCode:c}:{}}}function s(n,t){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${t} is missing an object codex-acp-v2 always sends`);return n}function l(n,t,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${t}`)}function g(n,t){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${t} has no agent path`);return r}function f(n,t,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${t}`)}function y(n,t){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${t} has an unknown activity ${String(n)}`)}
|
|
2
|
+
export{Nn,hi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function fe(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function
|
|
2
|
-
export{fe,
|
|
1
|
+
function fe(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function uo(a){if(a.shiftKey||a.altKey)return!1;return fe()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
|
|
2
|
+
export{fe,uo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{a,n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{c}from"./chunk-k7y6dqf2.js";import{a,n}from"./chunk-a8gzs651.js";import{k,m,u,Q}from"./chunk-3m59n5gr.js";import{w,te,io}from"./chunk-w65d6934.js";import{je}from"./chunk-1zypzzje.js";import{A,W}from"./chunk-3zwbr9xs.js";import{ue,ee}from"./chunk-q0bwkhpy.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as X,useSensors as De}from"@dnd-kit/core";import{SortableContext as Y,sortableKeyboardCoordinates as we,useSortable as ae,verticalListSortingStrategy as Z}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as G}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as de,StarIcon as be,Trash2Icon as me}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as oe,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:y,children:x}){let{attributes:N,listeners:I,setNodeRef:i,transform:g,transition:f,isDragging:M}=ae({id:JSON.stringify([l,y]),data:{type:"session",collectionId:l,sessionId:y}});return e("div",{ref:i,style:{transform:ce.Transform.toString(g),transition:f},className:G("w-full min-w-0",M&&"opacity-50"),...N,...I,role:"group",children:x})}function Be({collection:l,children:y,onEdit:x,onConfirm:N,onNewChat:I}){let{t:i}=w(),g=ee(),f=te(),{attributes:M,listeners:p,setNodeRef:h,transform:P,transition:T,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===A,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:ce.Transform.toString(P),transition:T},className:G("w-full min-w-0",z&&"opacity-50"),children:e(Q,{open:!l.collapsed,onOpenChange:(d)=>f(g({type:"collapse",id:l.id,collapsed:!d})),label:W(l,i),count:l.sessionIds.length,leading:l.id===A?e(be,{className:"size-3.5"}):e(je,{emoji:l.emoji,onChange:(d)=>f(g({type:"emoji",id:l.id,emoji:d}))}),wrapHeader:(d)=>e("div",{...M,...p,role:"group",children:d}),actions:s(Ee,{children:[e(Re,{onClick:(d)=>d.stopPropagation(),onPointerDown:(d)=>d.stopPropagation(),render:e(v,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:W(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==A&&s(H,{onClick:x,children:[e(he,{}),i("collection.rename")]}),s(H,{onClick:I,children:[e(de,{}),i("collection.newChat")]}),s(H,{onClick:()=>N("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==A&&s(H,{variant:"destructive",onClick:()=>N("delete"),children:[e(me,{}),i("collection.deleteCollection")]})]})})]}),children:y})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function dr({renderRow:l,onSelect:y,onNewChat:x,Scroll:N=He}){let I=w(),{t:i}=I,g=ee(),f=te(),M=a(),{collections:p,order:h}=ue(),P=n((o)=>o.sessionList),T=n((o)=>o.archivedSessions),z=n((o)=>o.sessionListLoaded),d=n((o)=>o.sessionListError),F=Me(()=>new Map([...T,...P].map((o)=>[o.sessionId,o])),[T,P]),U=I.isMac??io(),[S,E]=R(null),[L,K]=R(""),[_,O]=R(""),[D,B]=R(null),[C,q]=R(!1),pe=De(X(Se,{activationConstraint:{distance:5}}),X(ye,{coordinateGetter:we})),j=h.flatMap((o)=>p[o].collapsed?[]:p[o].sessionIds.flatMap((t)=>{let r=F.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(U?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;t.preventDefault(),y(j[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[j,U,y]);let ge=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let V=b.type==="session"?String(b.collectionId):String(t.id);f(g({type:"move",sourceCollectionId:String(r.collectionId),collectionId:V,sessionId:String(r.sessionId),index:b.type==="session"?p[V].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==A)f(g({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},J=(o,t)=>{q(!0),f(o.then(t).finally(()=>q(!1)))};return s(ze,{children:[e(N,{children:s(k,{children:[s(u,{className:G(c,"font-normal"),onClick:()=>{E("new"),K(""),O("")},children:[e(m,{children:e(de,{})}),e("span",{children:i("collection.newCollection")})]}),d&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:d}),e(v,{variant:"ghost",onClick:()=>f(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:pe,collisionDetection:fe,onDragEnd:ge,children:e(Y,{items:h,strategy:Z,children:e(k,{children:h.map((o)=>e(Be,{collection:p[o],onNewChat:()=>x(o),onEdit:()=>{E(o),K(p[o].name),O(p[o].emoji??"")},onConfirm:(t)=>B({id:o,type:t}),children:e(Y,{items:p[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:Z,children:p[o].sessionIds.map((t)=>{let r=F.get(t);if(r?.archived)return null;if(!r)return z?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(m,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(v,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>f(g({type:"remove",sessionId:t,collectionId:o})),children:e(me,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(oe,{open:S!==null,onOpenChange:(o)=>{if(!o&&!C)E(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(S==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(o)=>{if(o.preventDefault(),S===null||!L.trim()||C)return;let t=S==="new"?`collection-${crypto.randomUUID()}`:S;J(g([S==="new"?{type:"create",id:t,name:L}:{type:"rename",id:t,name:L},{type:"emoji",id:t,emoji:_}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(o)=>K(o.target.value),disabled:C}),S!=="new"&&e(je,{emoji:_,onChange:O}),s(le,{children:[e(v,{type:"button",variant:"outline",disabled:C,onClick:()=>E(null),children:i("collection.cancel")}),e(v,{type:"submit",disabled:C||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(oe,{open:D!==null,onOpenChange:(o)=>{if(!o&&!C)B(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(D?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:D===null?"":W(p[D.id],i)})})]}),s(le,{children:[e(v,{variant:"outline",disabled:C,onClick:()=>B(null),children:i("collection.cancel")}),e(v,{disabled:C,onClick:()=>{if(D!==null)J(g({type:D.type,id:D.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{dr};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function P(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
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function P(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 Fn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function Bi(e){return{selected:e.options?.length?0:null,text:""}}function Jt(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function Gi(e){return`<send_user_message_question_reply>
|
|
2
2
|
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function
|
|
4
|
-
export{P,
|
|
3
|
+
</send_user_message_question_reply>`}function Dn(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 zi({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:C,t:u}){let g=v(),h=b(!1),a=b(null);N(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",A=o==="answered"||o==="skipped",f=e.options??[],w=l&&Jt(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:A?c(S,{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(R,{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&&Jt(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(k,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(k,{size:"sm",variant:"ghost"}),disabled:!l,onClick:C,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{P,Fn,Bi,Jt,Gi,Dn,zi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var Ca=280;function ti({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function De({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function xn({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function ni({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function oi({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function ii({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{Ca,ti,De,xn,ni,oi,ii};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function jo(n){return`[$${(n.runtimeName||n.id).replace(/[\[\]\\\r\n]/g," ").trim()}](app://${n.id})`}function $o(n){let e=new Set;return[...n.matchAll(/\[\$([^\]\r\n]+)\]\((app:\/\/[^/?#\s)]+)\)/g)].flatMap((i)=>{let[,r,t]=i;if(!r||!t||e.has(t))return[];return e.add(t),[{type:"resource_link",name:r,uri:t}]})}
|
|
2
|
+
export{jo,$o};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-f1r8wh4e.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function Pn({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function Tn({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(Pn,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{Pn,Tn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function Go(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
|
|
2
|
+
export{Go};
|