@alwith/module-chat 0.6.7 → 0.6.9
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/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -2
- 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
package/dist/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qi,d,T}from"./chunk-32s8dn1a.js";export{Qi as ActivityHostProvider,T as ActivityMarkdown,d as useActivityHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jn,nn,Ne,ht}from"../chunk-d0ta9y85.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?jn(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Ne(i)){let c=ht(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Ne(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Ne(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=ht(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=ht(r),m=Ne(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:nn(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:nn(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jn,nn,Ne,ht}from"../chunk-d0ta9y85.js";export{jn as elicitationFields,nn as elicitationLabels,ht as elicitationOptions,Ne as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vr,Yo,xa,ba}from"../chunk-3twka9f7.js";export{Vr as PERMISSION_KIND_GROUP_ORDER,xa as isAllowKind,ba as isAlwaysKind,Yo as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qo}from"../chunk-qm649qdv.js";import"../chunk-3twka9f7.js";export{Qo as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Xr,zr,Jr,Wo}from"../chunk-x6yxbndc.js";export{Wo as SchemaElicitationForm,Xr as elicitationFields,zr as initialValues,Jr as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Zo}from"../chunk-bt0t1pev.js";export{Zo as UrlElicitationCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-f1r8wh4e.js";import{tt}from"./chunk-s4m2h876.js";import{e,f}from"./chunk-6pnsagt4.js";import{yn}from"./chunk-p5mfv6t6.js";import{Loader2Icon as x}from"lucide-react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as u}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function Xt({session:t,timeline:s}){let{host:m,client:a}=e(),{t:n}=m,y=o((v)=>v.historyPages[t.id]?.cursor!=null),E=yn(t,s?.turnWork),h=()=>f(m,a.open(t.id,t.cwd)),p=r(tt,{...s,session:t,client:a,host:m,turnWork:E});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[r(x,{className:"size-4 animate-spin","aria-hidden":"true"}),n("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[r(u,{children:n("conversation.reopen")}),r(l,{children:n("conversation.detached")})]}),r(g,{onClick:h,children:n("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!y)return r(c,{className:"flex-1",children:i(d,{children:[r(u,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
+
export{Xt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function ri(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
|
|
2
|
+
export{ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ot}from"./chunk-
|
|
1
|
+
import{ot}from"./chunk-wwq7d7qm.js";import{hi}from"./chunk-kxw57gdb.js";import{t}from"./chunk-f1r8wh4e.js";import{Y}from"./chunk-g0gq72z9.js";import{Ln}from"./chunk-658y6xth.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,s)=>l(Y,{block:o.content},`${n.id}:${s}`))]})}var wn=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(Ln),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...hi(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l(ot,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
|
|
2
2
|
export{wn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-f1r8wh4e.js";import{e}from"./chunk-6pnsagt4.js";import{Fe,Je,we}from"./chunk-fd8x014y.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function Ot({sessionId:s}){let n=o((t)=>t.sessions),{host:u}=e(),d=o((t)=>t.actions),a=d.some((t)=>m(n,s,t.sessionId))?d.filter((t)=>m(n,s,t.sessionId)):p,i=a.filter(Fe).filter((t)=>{if(t.sessionId!==s||n[s]?.subagent!==void 0)return!0;let r=t.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((t)=>!Fe(t));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((t)=>f("div",{children:[t.sessionId!==s&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":n[t.sessionId]?.title??u.t("subagents.untitled")}),l(we,{action:t})]},t.id))}),i[0]!==void 0&&l(Je,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
+
export{Ot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{R}from"./chunk-p38vws4a.js";import{e}from"./chunk-6pnsagt4.js";import{jo}from"./chunk-nm4dtceb.js";import{BlocksIcon as I}from"lucide-react";import{useRef as h,useState as a}from"react";import{DropdownMenu as k,DropdownMenuContent as A,DropdownMenuGroup as C,DropdownMenuItem as i,DropdownMenuTrigger as v}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as B}from"react/jsx-runtime";function Io({disabled:b,onSelect:w}){let{client:l,host:r}=e(),[M,D]=a(!1),[d,y]=a([]),[u,t]=a("loading"),p=h(0),m=l.installedApps?.bind(l);if(!m)return null;let c=(n)=>{D(n);let f=++p.current;if(!n)return;t("loading"),m().then(({apps:s})=>{if(f!==p.current)return;y(s.filter((g)=>g.enabled&&g.callable)),t("ready")},(s)=>{if(f!==p.current)return;t("error"),r.reportError?.(s)})};return B(k,{open:M,onOpenChange:c,children:[o(v,{render:o(R,{disabled:b,"aria-label":r.t("composer.apps"),title:r.t("composer.apps"),children:o(I,{})})}),o(A,{align:"start",side:"top",className:"max-h-72 min-w-48 overflow-y-auto",children:o(C,{children:u!=="ready"?o(i,{disabled:!0,children:r.t(u==="loading"?"composer.appsLoading":"composer.appsFailed")}):d.length===0?o(i,{disabled:!0,children:r.t("composer.appsEmpty")}):d.map((n)=>o(i,{onClick:()=>{w(jo(n)),c(!1)},children:n.runtimeName||n.id},n.id))})})]})}
|
|
2
|
+
export{Io};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var ka=["full","compact","codexUI"];function pi(t){return t==="compact"||t==="codexUI"}var ea=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function V(t){let o=ea.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function Sa(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{ka,pi,ea,V,Sa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w}from"./chunk-
|
|
1
|
+
import{w}from"./chunk-w65d6934.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as b}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function je({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=w();return n(x,{open:m,onOpenChange:r,children:[o(b,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
|
|
2
2
|
export{je};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-f1r8wh4e.js";import{tn,e,f}from"./chunk-6pnsagt4.js";import{Ut}from"./chunk-gfrzmgz4.js";import{Xt}from"./chunk-02jpgxy7.js";import{en}from"./chunk-p6gwrqjp.js";import{Dt,Ht}from"./chunk-8rpen55z.js";import{Ot}from"./chunk-18z4wmhb.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function Fr({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:Dt},[t]);return i(tn,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r(Ht,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,v=o((a)=>a.connection==="ready"),y=o((a)=>a.historyPages[t.id]?.error),u=()=>f(d,R.open(t.id,t.cwd)),x=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!x&&r(en,{sessionId:t.id,rootRef:p}),s,v&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(C,{children:[r(k,{}),r(h,{children:n("conversation.stopped")}),r(N,{children:r(w,{size:"sm",variant:"outline",onClick:u,children:n("conversation.reconnect")})})]})}),x?E??r(M,{className:"flex-1",children:i(z,{children:[r(B,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(P,{children:n("conversation.welcomeDescription")})]})}):r(Xt,{session:t,timeline:m}),r(Ot,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(h,{children:n("conversation.readOnlyTitle")}),r(N,{children:n("conversation.readOnlyDescription")}),y&&r("p",{role:"alert",className:"text-destructive break-words",children:y})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:u,disabled:!v||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??r(Ut,{session:t})]}),T]})}
|
|
2
|
+
export{Fr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function ai(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
+
export{ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,a,n,p}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{r,a,n,p}from"./chunk-a8gzs651.js";import{L}from"./chunk-xbqvb31f.js";import{k,Q,ye}from"./chunk-3m59n5gr.js";import{he,G,oe}from"./chunk-c7p3vpyx.js";import{uo}from"./chunk-m1adrey8.js";import{me}from"./chunk-h4r8cx37.js";import{pe}from"./chunk-80a1fdx8.js";import{ge}from"./chunk-akvpgx43.js";import{Lt}from"./chunk-5f5jfr40.js";import{lo}from"./chunk-wbhxpwm7.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as K,useMemo as P}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(o,d){return o.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Tr({selectedId:o,onSelect:d,isForeground:l,onOpen:w,accessory:R,rowActions:h}){let N=r(),{t:x}=N,m=n((t)=>t.runStates),v=n((t)=>t.drafts),u=n((t)=>t.sessionList),g=G((t)=>t.activityOrder),f=P(()=>g.flatMap((t)=>{let e=m[t];return e&&he({runStates:m,drafts:v},t)?[{sid:t,record:e,sessionRow:H(u,e)}]:[]}),[g,m,v,u]),b=P(()=>{let t=new Map;for(let e of f){let i=e.sid===o||l?.(e.sid)?"foreground":"background",S=t.get(i)??[];S.push(e),t.set(i,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,o,l]),y=G((t)=>t.activityCollapsedGroups),s=oe(),I=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),A=(t)=>{if(w?.(t))return;d(t)},O=lo();K(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!uo(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let i=Number(e.key);if(!Number.isInteger(i)||i<1||i>9)return;let S=I[i-1];if(!S)return;e.preventDefault(),A(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let C=(t)=>{let e=I.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===o,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>A(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&O?c(M,{children:ge(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(k,{children:b.map((t)=>t.key==="foreground"?c(k,{children:t.rows.map(C)},t.key):c(Q,{open:!y.has(t.key),onOpenChange:(e)=>{let i=new Set(y);if(e)i.delete(t.key);else i.add(t.key);s({activityCollapsedGroups:i})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:x("sessionList.background"),count:t.rows.length,children:t.rows.map(C)},t.key))})}function T({sessionRow:o,state:d,interruption:l,active:w,tasks:R,listeningPorts:h,accessory:N,actions:x,onOpen:m,hint:v}){let u=r(),g=a(),{t:f}=u,b=o.title??f("sessionList.untitled"),y=Lt(o.sessionId,d);return D(q,{children:[c(ye,{"data-session-id":o.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(pe,{sessionRow:o,actions:x}),onClick:m,onKeyDown:(s)=>{if(s.target!==s.currentTarget)return;if(s.key==="Enter"||s.key===" ")s.preventDefault(),m()},state:d,interruption:l,title:b,preview:y,listeningPorts:h,onOpenPort:u.openLink&&((s)=>u.openLink?.(`http://localhost:${s}`)),accessory:N,hint:v,actions:c(me,{title:f("sessionList.stop"),onStop:()=>p(u,g.stopSession(o.sessionId))})}),R.map((s)=>D("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(L,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:s.title,children:s.title})]},s.id))]})}
|
|
2
|
+
export{Tr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";function dt({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
|
|
2
|
+
export{dt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function*Un(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Ki(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Un(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
+
export{Un,Ki};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function Qi({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function d(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function T(t){let{Markdown:o}=d();return e(o,{...t})}
|
|
2
|
+
export{Qi,d,T};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{rt}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{rt}from"./chunk-8504eft8.js";import{Ni,Mi,Ai}from"./chunk-5f889j6j.js";import{Ti}from"./chunk-3jfkrwjq.js";import{t}from"./chunk-f1r8wh4e.js";import{re}from"./chunk-658y6xth.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function aa(i,n){return{installUnlock:n==="none"?()=>()=>{}:Mi,preload:()=>{if(n!=="none")Ni(i)},playSequence:(a,d,l)=>Ai(a,d,l,i,n)}}function _i(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:re(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(rt,{text:i.response,host:a})})]})}function Pi(i){return r(Ti,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
+
export{aa,_i,Pi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{xe,c}from"./chunk-k7y6dqf2.js";import{I}from"./chunk-qcj6f1rq.js";import{L}from"./chunk-
|
|
2
|
-
export{k,m,u,Q,
|
|
1
|
+
import{xe,c}from"./chunk-k7y6dqf2.js";import{I}from"./chunk-qcj6f1rq.js";import{L}from"./chunk-xbqvb31f.js";import{S}from"./chunk-958qyr8g.js";import{Ke,Ee,qe}from"./chunk-gbsqs904.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as _,useContext as E,useLayoutEffect as M,useState as T}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function k(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function m({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function u({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function Q({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:g,wrapHeader:f,onHeaderClick:b,children:P}){let y=()=>{b?.(),t(!o)},x=p(Ke,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),R=d(K,{children:[r!=null&&e(m,{children:r}),g??e(I,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(qe,{content:s!==void 0?e(Ee,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),H=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,c),onClick:y,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),y()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),R]}):e("div",{"data-active":l?"":void 0,className:x,children:R});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?H:f(H),o&&e(k,{className:"mt-0.5",children:P})]})}var G=_(()=>{}),z=_(()=>{});function Rt(){return E(z)}function ve(){return E(G)}function ye({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:g,listeningPorts:f,onOpenPort:b,accessory:P,meta:y,hint:x,actions:R,className:H,...v}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Ke,xe,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...v,children:[e(m,{children:t!=null?e(L,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(I,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(I,{className:"text-muted-foreground text-xs",children:C}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(qe,{content:P!=null?e(Ee,{children:P}):y??e(Ee,{}),actions:R}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return O;return e(q,{row:O,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=T(!1),[s,a]=T(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(G.Provider,{value:a,children:e(z.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return S(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
+
export{k,m,u,Q,Rt,ve,ye};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Vr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Yo(e){return[...e].toSorted((o,n)=>(Vr[o.kind]??99)-(Vr[n.kind]??99))}function xa(e){return e==="allow_once"||e==="allow_always"}function ba(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{Vr,Yo,xa,ba};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_}from"./chunk-4jh2wk80.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{_}from"./chunk-4jh2wk80.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function qo({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(_,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var A="collection-default";function W(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Me(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function
|
|
2
|
-
export{A,W,Me,
|
|
1
|
+
var A="collection-default";function W(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Me(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Mt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function gr(o,e=Me()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{A,W,Me,Mt,gr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function Vn(a){let{plugin:u,marketplace:n}=a;return{installAttemptId:crypto.randomUUID(),pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function A(a){let{plugin:u,marketplace:n}=a;return{pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function ft(a,u){let n=u??{t:(e)=>e},l=(e,r)=>n.t(e,r),p=(e)=>n.notify?.(e),o=(e)=>{if(n.reportError)n.reportError(Error(e));else console.error(e)},m=null,b=null,d=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>d((s)=>{let t={...s.busyIds};if(r===null)delete t[e];else t[e]=r;return{busyIds:t}}),h=(e,r)=>d((s)=>{let t={...s.busyMarketplaces};if(r)t[e]=!0;else delete t[e];return{busyMarketplaces:t}}),w=M({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{if(m={cwds:e,forceRefetch:r.forceRefetch===!0||m?.forceRefetch===!0},d({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let s=m;m=null,d({error:null});try{let[t,i,g]=await Promise.all([a.listSkills(s.cwds,s.forceRefetch),a.listPlugins({...s.cwds.length>0?{cwds:s.cwds}:{},...s.forceRefetch?{forceRefetch:!0}:{}}),a.installedPlugins(s.cwds)]);if(m)continue;let c=I(t);d({loadedScope:JSON.stringify(s.cwds),skills:c.skills,skillProjects:c.projects,skillErrors:c.errors,marketplaces:i.marketplaces,marketplaceLoadErrors:i.marketplaceLoadErrors,featuredPluginIds:i.featuredPluginIds,installed:v(g)})}catch(t){if(!m)d({error:k(t)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=E(e.plugin);f(e.plugin.id,"installing");try{let s=await a.installPlugin(Vn(e));return await y(),f(e.plugin.id,null),p(l("plugins.toast.installed",{pluginName:r})),s}catch(s){throw o(`${l("plugins.toast.installError")}: ${k(s)}`),s}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let s=(i)=>d((g)=>({installed:g.installed.map((c)=>c.plugin.id===e.id?{...c,plugin:{...c.plugin,enabled:i}}:c)}));s(r);let t=e.enabled;try{let i=e.source.type==="remote"?e.remotePluginId:void 0;if(i===null)throw Error("Remote plugin ID is missing");let g=await a.setPluginEnabled(e.id,r,i);t=g.enabled,s(g.enabled),await y();let c=P().installed.find((R)=>R.plugin.id===e.id);if(c)t=c.plugin.enabled;if(!c||t!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),p(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:E(e)}))}catch(i){s(t),o(`${l("plugins.toast.toggleError")}: ${k(i)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=E(e);f(e.id,"uninstalling");try{let s=e.source.type==="remote"?e.remotePluginId:e.id;if(!s)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(s),await y(),P().installed.some((t)=>t.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),p(l("plugins.toast.uninstalled",{pluginName:r}))}catch(s){o(`${l("plugins.toast.uninstallError")}: ${k(s)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(A(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;d((t)=>({busySkills:{...t.busySkills,[e.path]:!0}})),d((t)=>({skills:t.skills.map((i)=>i.path===e.path?{...i,enabled:r}:i)}));let s=e.interface?.displayName??e.name;try{let t=await a.setSkillEnabled({path:e.path,enabled:r});if(d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:t.effectiveEnabled}:g)})),t.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}p(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:s}))}catch(t){d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:e.enabled}:g)})),o(`${l("plugins.skills.toggleError")}: ${k(t)}`)}finally{d((t)=>{let i={...t.busySkills};return delete i[e.path],{busySkills:i}})}},addMarketplace:async(e)=>{let r=await a.addMarketplace(e);return await y(!0),p(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),p(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((s)=>s.message).join("; ")}`);else p(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else p(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(w,{bindHost:(e)=>{n=e}});return S}
|
|
2
|
+
export{Vn,ft};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{S}from"./chunk-958qyr8g.js";import{r}from"./chunk-a8gzs651.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Cr({children:l}){let{t:n}=r(),[o,u]=p(!1),t=c(null),[a,d]=p();return S(o),M(h,{open:o,onOpenChange:(i)=>{if(i){let s=t.current?.parentElement;if(!s)throw Error("Help trigger must be mounted in its footer row");d(s.clientWidth)}u(i)},children:[e(w,{render:e(f,{ref:t,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{Cr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function ln({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{ln};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{a,n}from"./chunk-a8gzs651.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Lt(e,o){let s=a(),c=n((t)=>t.connection),r=n((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=n((t)=>v(t.sessions[e]?.items)),f=n((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||r)return;let t=!1,l,i=0,m=async()=>{try{let d=await s.activityReply(e);if(i=0,!t)y(d??void 0)}catch{i++}finally{if(!t&&(o==="running"||i>0&&i<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,r,o]),r?u:p??u}
|
|
2
|
+
export{Lt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function
|
|
2
|
-
export{
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Ni(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function _a(){c()}function Mi(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function Ai(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return $r(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function Pa(e,n,t,i,o,a){if(a==="none")return;_(o,[$r(e,n,t,i,a)])}function $r(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return sa(t,i);return Kr(e,n)}function sa(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function Kr(e,n){return y+la(e,n)}function Ta(e,n){return D(Kr(e,n))}function la(e,n){if(n<=l)return ca(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function ca(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function Ia(){return r.context?.state}function Na(e){return g(e).ready}
|
|
2
|
+
export{Ni,_a,Mi,Ai,Pa,$r,sa,Kr,Ta,la,ca,Ia,Na};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{k,u}from"./chunk-
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>d===""?v.path!==null||n.has(b.id):P.includes(d)).map(({plugin:b})=>b)}))},[m,f,d]);return s(Y,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Ae(){let{t}=l(),d=q(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,x]=I(!1),[b,P]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),P(null);try{await p({source:N}),m(""),x(!1)}catch(S){P(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(oe,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)x(N)},children:[s(be,{render:e(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(W,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(X,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),b&&e("p",{role:"alert",className:"text-destructive text-sm",children:b}),s("div",{className:"flex justify-end gap-2",children:[e(y,{type:"button",variant:"ghost",disabled:r,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(y,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Le({onOpen:t,query:d}){let p=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(d.trim().toLowerCase());return e(h,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-k7y6dqf2.js";import{k,u}from"./chunk-3m59n5gr.js";import{dt}from"./chunk-2kz2z86n.js";import{Pe,l,Te,Be,i}from"./chunk-g79y6q3f.js";import{F,D,J,H,O,se,pt}from"./chunk-w7p443ya.js";import{ae}from"./chunk-rfahybr0.js";import{Ue}from"./chunk-snd4q8wg.js";import{h}from"./chunk-9cqpn67f.js";import{gt,M}from"./chunk-f2a9rqfz.js";import{U,ce}from"./chunk-yftn8cw0.js";import{mt}from"./chunk-jg6r0ckn.js";import{ut}from"./chunk-dz5ymd3t.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ne,BookOpenIcon as ie,CheckIcon as le,CircleArrowUpIcon as oe,MoreVerticalIcon as re,PlusIcon as W,PuzzleIcon as de,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as we,DropdownMenuContent as Ce,DropdownMenuItem as Ie,DropdownMenuTrigger as Se}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as X}from"@nyssance/shadcn/vega/components/ui/input";import{Label as De}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Y}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function Z(t){return t.interface?.shortDescription??""}function Me({plugin:t,marketplace:d}){let{t:p}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(le,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(y,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?p("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Ee({plugin:t,marketplace:d,actions:p,onOpen:g}){let a=Z(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(se,{className:"toolbox-row relative",children:[e(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(H,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(M,{name:t.name})})}),s(D,{className:"pointer-events-none relative min-w-0",children:[e(pt,{className:"mb-0.5",children:T(t)}),e(J,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(J,{"data-toolbox-metadata":"",children:r})]}),e(F,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function q(){return Be((t)=>t.connection==="ready"&&te(t.agent))}var E=48;function ze({marketplace:t,plugins:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/E)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(we,{children:[e(Se,{render:e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(re,{})}),e(Ce,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ie,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(O,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*E,(r+1)*E).map((n)=>e(Ee,{onOpen:p,plugin:n,marketplace:t,actions:e(Me,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>E&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(y,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/E)]}),e(y,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*E>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Oe=fe(function({query:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),Z(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>d===""?v.path!==null||n.has(b.id):P.includes(d)).map(({plugin:b})=>b)}))},[m,f,d]);return s(Y,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Ae(){let{t}=l(),d=q(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,x]=I(!1),[b,P]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),P(null);try{await p({source:N}),m(""),x(!1)}catch(S){P(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(oe,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)x(N)},children:[s(be,{render:e(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(W,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(X,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),b&&e("p",{role:"alert",className:"text-destructive text-sm",children:b}),s("div",{className:"flex justify-end gap-2",children:[e(y,{type:"button",variant:"ghost",disabled:r,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(y,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Le({onOpen:t,query:d}){let p=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(d.trim().toLowerCase());return e(h,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${U} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(ae,{}):e(Oe,{query:f,onOpen:t})]})})}function Yi({cwd:t,active:d,extensions:p,onOpenCatalog:g}){let{t:a}=l(),f=Te(),m=Pe(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[x,b]=I("plugins"),[P,A]=I({plugins:"",skills:""}),N=x==="skills"?P.skills:P.plugins,S=(o)=>A((z)=>({...z,[x]:o})),ee=Be((o)=>JSON.stringify([...new Set(o.sessionList.map((z)=>Ue(z.cwd,o.projectContext)).filter((z)=>z!==null))].toSorted())),L=JSON.stringify([...new Set([Ue(t,f.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),V=a(x==="skills"?"plugins.skills.search":"plugins.search"),[w,G]=I(null),C=q();K(()=>{if(!d||!C)return;if(m.getState().loadedScope!==L)r(JSON.parse(L))},[d,C,r,L,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),b("plugins"),G(o)},_=(o)=>{g?.(),b(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(gt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(u,{className:`${c} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(ne,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(u,{className:`${c} h-8 gap-2 px-2`,active:!p?.active&&x===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(de,{className:"size-4"}):e(ie,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(h,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(k,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(u,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!p?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(M,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Y,{children:[w&&e(mt,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(ce,{children:e(dt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(X,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>S(o.target.value),placeholder:V}),N&&e(y,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ge,{})})]}),e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),x==="plugins"&&e(Ae,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(y,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Le,{query:P.plugins,onOpen:j})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(ut,{query:P.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
+
export{Yi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function ji({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=N(null);B(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),z(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(E,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(h,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(b,{className:"size-3.5"})})]})}
|
|
2
|
+
export{ji};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{P}from"./chunk-n3d2mv93.js";import{codexMessageError as v,nativeTurnId as m,textOf as A,turns as S}from"@nyssance/codex-acp-v2/client";function da(t){return t.kind==="tool"&&t.name==="mcp_startup"}function _(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Ri(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function E(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(v(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=_(e),i=e._meta?.codex,d=P(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(P(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function Fi(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!da(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>S({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&j(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(Ln),items:a},M=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>E(x,c,b<M,a[b-1])),x})}function j(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Ln(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function re(t){return A(t.content)}function st(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Rn(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Di(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Hi(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function Oi(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!Hi(t,e[n-1],o))break;n--}return e[n]?.key}function Ui(t,e,n){let o=n,s=n;while(o>0&&Hi(t,e[o-1],e[o]))o--;while(s+1<e.length&&Hi(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{da,Ri,Fi,Ln,re,st,Rn,Di,Hi,Oi,Ui};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Se}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Se}from"./chunk-f1r8wh4e.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function tn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Se,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function f(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{tn,e,f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{R}from"./chunk-p38vws4a.js";import{t}from"./chunk-f1r8wh4e.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Eo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(R,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
+
export{Eo};
|