@alwith/module-chat 0.6.19 → 0.6.21
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/agent/application-client.js +1 -1
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.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-w1wr14da.js → chunk-05zhvfrp.js} +1 -1
- package/dist/chunk-0faa9z99.js +2 -0
- package/dist/{chunk-vg1y693r.js → chunk-0n26qaxb.js} +3 -3
- package/dist/{chunk-qma11tpm.js → chunk-0ne2mz2q.js} +3 -3
- package/dist/{chunk-8q5zwkry.js → chunk-0xshzqb6.js} +2 -2
- package/dist/{chunk-6f06hbsk.js → chunk-1e83qr49.js} +2 -2
- package/dist/{chunk-3tzh25vq.js → chunk-1smyy9mt.js} +2 -2
- package/dist/chunk-200zk66j.js +2 -0
- package/dist/{chunk-81n37a11.js → chunk-2fx3qhyb.js} +2 -2
- package/dist/chunk-2q1xxs3t.js +2 -0
- package/dist/{chunk-y3mx5sf0.js → chunk-2qs1ss40.js} +2 -2
- package/dist/{chunk-xwwjj45a.js → chunk-2sc2z6g5.js} +2 -2
- package/dist/chunk-36ttr22w.js +2 -0
- package/dist/{chunk-bw3bpr6m.js → chunk-3a5sn0v8.js} +2 -2
- package/dist/{chunk-rg9ckzpr.js → chunk-3ek4vddd.js} +1 -1
- package/dist/chunk-3mm1d99e.js +2 -0
- package/dist/chunk-3vzbqfsh.js +2 -0
- package/dist/{chunk-5gn8xw58.js → chunk-3z5zyra7.js} +2 -2
- package/dist/{chunk-n811d65m.js → chunk-4dp24aja.js} +3 -3
- package/dist/chunk-4gxpna3p.js +2 -0
- package/dist/{chunk-kn792h8n.js → chunk-4h9ee02f.js} +2 -2
- package/dist/{chunk-f78jd8xh.js → chunk-4ntxjy8v.js} +2 -2
- package/dist/{chunk-pc11a2w0.js → chunk-50eym2q3.js} +3 -3
- package/dist/{chunk-xspnhgq6.js → chunk-542c9tpr.js} +2 -2
- package/dist/chunk-5cf6ny70.js +2 -0
- package/dist/chunk-5d138vq3.js +1 -0
- package/dist/chunk-5dgmqyg1.js +4 -0
- package/dist/{chunk-hqt5j789.js → chunk-5kje89r8.js} +2 -2
- package/dist/{chunk-dd9k5bbt.js → chunk-5pmr5dby.js} +2 -2
- package/dist/{chunk-74b70n1g.js → chunk-5pyvgshe.js} +2 -2
- package/dist/chunk-5wqbhb7a.js +2 -0
- package/dist/{chunk-64apxzn7.js → chunk-5xe89qwh.js} +2 -2
- package/dist/{chunk-j39bhfsp.js → chunk-5ygqjna0.js} +2 -2
- package/dist/{chunk-er5wxkt2.js → chunk-689vpcc9.js} +2 -2
- package/dist/{chunk-arm9x6kc.js → chunk-6cjjwry2.js} +2 -2
- package/dist/{chunk-xyffk47k.js → chunk-6e9wwjgv.js} +2 -2
- package/dist/{chunk-4wm5emgf.js → chunk-6r5nzsw8.js} +2 -2
- package/dist/{chunk-mahb3t97.js → chunk-76c0cx40.js} +2 -2
- package/dist/{chunk-mf0k3xd4.js → chunk-76smt4zv.js} +3 -3
- package/dist/{chunk-xx7t8r87.js → chunk-79pvfyd0.js} +2 -2
- package/dist/{chunk-thaa1n4f.js → chunk-7a70nd7e.js} +2 -2
- package/dist/chunk-7cab9zy0.js +2 -0
- package/dist/{chunk-h7xjw0p4.js → chunk-7e86wygk.js} +2 -2
- package/dist/{chunk-8rb896tq.js → chunk-7s3f142h.js} +2 -2
- package/dist/{chunk-113maskf.js → chunk-7v7wc7k5.js} +2 -2
- package/dist/{chunk-ma7thf1j.js → chunk-7wd0kfqr.js} +2 -2
- package/dist/{chunk-nbgw51b6.js → chunk-7wpcdwan.js} +2 -2
- package/dist/chunk-7xvrsw7x.js +2 -0
- package/dist/{chunk-q1yz3t9z.js → chunk-81hv0s07.js} +2 -2
- package/dist/{chunk-337hq36y.js → chunk-81hxr15a.js} +2 -2
- package/dist/{chunk-z6x70w62.js → chunk-859359n0.js} +2 -2
- package/dist/{chunk-97pn8v17.js → chunk-8a0fd2f5.js} +2 -2
- package/dist/{chunk-88ysxbdh.js → chunk-8ew2e3y7.js} +2 -2
- package/dist/{chunk-1d29gnb2.js → chunk-8h4e3654.js} +2 -2
- package/dist/chunk-8rtjn0tg.js +2 -0
- package/dist/{chunk-ne4b53kn.js → chunk-8v53bkyr.js} +2 -2
- package/dist/{chunk-2aw505xv.js → chunk-94gqvrk7.js} +2 -2
- package/dist/{chunk-fwqpwbd8.js → chunk-9hjfc08t.js} +2 -2
- package/dist/chunk-9ts08sma.js +2 -0
- package/dist/{chunk-90847w64.js → chunk-9zgkpv8m.js} +2 -2
- package/dist/chunk-a8r3mggj.js +2 -0
- package/dist/{chunk-q4c6f84f.js → chunk-ag8696fb.js} +2 -2
- package/dist/chunk-ayt0bzr9.js +2 -0
- package/dist/{chunk-x2wcwpw3.js → chunk-az3g3a94.js} +2 -2
- package/dist/chunk-b42vv8f2.js +2 -0
- package/dist/{chunk-kj2zk46g.js → chunk-bdrcreqs.js} +2 -2
- package/dist/{chunk-cydnp9mm.js → chunk-bh0h7fz7.js} +2 -2
- package/dist/chunk-bsnmj69j.js +2 -0
- package/dist/{chunk-bg0vkt53.js → chunk-c092x92d.js} +2 -2
- package/dist/{chunk-rhe4w638.js → chunk-ca4vetrh.js} +2 -2
- package/dist/chunk-capkej8s.js +2 -0
- package/dist/{chunk-h82jte5p.js → chunk-cc6x7r61.js} +2 -2
- package/dist/chunk-cfpm71vd.js +2 -0
- package/dist/{chunk-x4jm2eh9.js → chunk-cfx5s6fz.js} +4 -4
- package/dist/{chunk-1gr60c40.js → chunk-ck2ax5f6.js} +2 -2
- package/dist/{chunk-xfzmxq3g.js → chunk-cn07a5nh.js} +2 -2
- package/dist/chunk-cq7bbgcg.js +2 -0
- package/dist/chunk-d29xbf16.js +2 -0
- package/dist/{chunk-psndz2rs.js → chunk-dp1nnwk2.js} +2 -2
- package/dist/chunk-dpfjxym1.js +2 -0
- package/dist/chunk-dtxc0x7y.js +2 -0
- package/dist/{chunk-k4a3p16c.js → chunk-dxsjz3re.js} +2 -2
- package/dist/{chunk-gttw4rmx.js → chunk-dypeezvv.js} +3 -3
- package/dist/{chunk-pqz2471h.js → chunk-e04g26qm.js} +2 -2
- package/dist/chunk-e5mn6ern.js +2 -0
- package/dist/{chunk-xqb4thy8.js → chunk-e641842r.js} +2 -2
- package/dist/{chunk-esbgn8q0.js → chunk-e6ya95ee.js} +2 -2
- package/dist/chunk-exkacmay.js +3 -0
- package/dist/{chunk-nn30qzhx.js → chunk-f1awp8vf.js} +2 -2
- package/dist/{chunk-6e84zbgs.js → chunk-f7bn0nd2.js} +2 -2
- package/dist/{chunk-z107z7dt.js → chunk-fe83mqnb.js} +2 -2
- package/dist/{chunk-dheg4bs2.js → chunk-ffs5nkt0.js} +2 -2
- package/dist/chunk-fn68kh69.js +2 -0
- package/dist/{chunk-fdmbfq9g.js → chunk-ft7k6n4g.js} +2 -2
- package/dist/{chunk-73e9vpm9.js → chunk-g4devj8d.js} +2 -2
- package/dist/{chunk-dr5swvaa.js → chunk-g751pxzk.js} +2 -2
- package/dist/{chunk-rp7tnbss.js → chunk-gak8579e.js} +2 -2
- package/dist/{chunk-84p483n0.js → chunk-gec6q1jb.js} +2 -2
- package/dist/{chunk-wpacvdsv.js → chunk-grxjvm9h.js} +2 -2
- package/dist/{chunk-tdvx2n5m.js → chunk-h8r785ne.js} +2 -2
- package/dist/{chunk-fvxxzgrc.js → chunk-hcat58sr.js} +2 -2
- package/dist/{chunk-nqt9gyz9.js → chunk-heqa4swe.js} +2 -2
- package/dist/{chunk-zw2x5ztr.js → chunk-hgtbhvyh.js} +2 -2
- package/dist/{chunk-fkkk1fza.js → chunk-hp0eqd8x.js} +2 -2
- package/dist/{chunk-ch8e8a32.js → chunk-j64839nf.js} +2 -2
- package/dist/{chunk-wbjf9maj.js → chunk-jcyv1q0x.js} +2 -2
- package/dist/{chunk-3tvq6xr2.js → chunk-jg4c3zg4.js} +2 -2
- package/dist/{chunk-ynxb5xqz.js → chunk-jj5y2js2.js} +3 -3
- package/dist/chunk-jjgwfpmp.js +2 -0
- package/dist/{chunk-gpv1dc5y.js → chunk-js3nhatr.js} +2 -2
- package/dist/{chunk-sp2ny9ak.js → chunk-jw1c8r97.js} +2 -2
- package/dist/{chunk-n96z8etk.js → chunk-jydhbkm8.js} +2 -2
- package/dist/{chunk-x49qjrbk.js → chunk-kbfe7gqw.js} +2 -2
- package/dist/{chunk-k5nd3vyq.js → chunk-kj3a1k2q.js} +2 -2
- package/dist/{chunk-84zzf0ys.js → chunk-kk9dbwd1.js} +2 -2
- package/dist/{chunk-s9mejb9v.js → chunk-m6080rsp.js} +2 -2
- package/dist/{chunk-15m908ph.js → chunk-m8tt5bf9.js} +2 -2
- package/dist/{chunk-p3gawvqr.js → chunk-m9ttf96p.js} +2 -2
- package/dist/{chunk-eynwjzqp.js → chunk-mbsmb8jn.js} +2 -2
- package/dist/{chunk-yb5yhh8t.js → chunk-mc40zb3c.js} +2 -2
- package/dist/{chunk-e1zsnc8z.js → chunk-mc5668pn.js} +2 -2
- package/dist/{chunk-zxfx7psd.js → chunk-mgmv8kap.js} +2 -2
- package/dist/{chunk-hfghqddp.js → chunk-mvd124vs.js} +2 -2
- package/dist/{chunk-ak196z4y.js → chunk-mwthxh95.js} +2 -2
- package/dist/{chunk-xnc0175v.js → chunk-n0q8e6sq.js} +2 -2
- package/dist/{chunk-bba9qej8.js → chunk-n9jaz2pd.js} +2 -2
- package/dist/{chunk-j6000jts.js → chunk-nbaxn7jx.js} +2 -2
- package/dist/{chunk-etvdqkvb.js → chunk-nh56sb8e.js} +2 -2
- package/dist/{chunk-51x80v4h.js → chunk-nhstvqjy.js} +2 -2
- package/dist/chunk-njwb0rbw.js +3 -0
- package/dist/{chunk-scdj02m8.js → chunk-nmtz0797.js} +3 -3
- package/dist/chunk-npev9ffr.js +2 -0
- package/dist/chunk-nvgnan7w.js +2 -0
- package/dist/{chunk-7g11pcm4.js → chunk-nypr6qtz.js} +3 -3
- package/dist/chunk-p781sb6h.js +2 -0
- package/dist/{chunk-g1nck6pp.js → chunk-pnh5t6pc.js} +2 -2
- package/dist/{chunk-evpjxbzm.js → chunk-pr36m3qx.js} +2 -2
- package/dist/{chunk-jgqt7k0h.js → chunk-q01vmp9m.js} +2 -2
- package/dist/{chunk-44r55va6.js → chunk-q4nx04sy.js} +2 -2
- package/dist/chunk-q73jne25.js +2 -0
- package/dist/{chunk-pxzj3ae7.js → chunk-qdyyvd2w.js} +2 -2
- package/dist/{chunk-7p7fxgdb.js → chunk-qe4nwsn7.js} +2 -2
- package/dist/{chunk-wq47c4ws.js → chunk-qghq84r4.js} +2 -2
- package/dist/{chunk-xx29efrs.js → chunk-qkv8wzq1.js} +3 -3
- package/dist/{chunk-jpr5ewnh.js → chunk-qv23mh24.js} +2 -2
- package/dist/chunk-qwet39v5.js +2 -0
- package/dist/{chunk-wew3t005.js → chunk-qxssxzws.js} +2 -2
- package/dist/chunk-r3hsjwjn.js +2 -0
- package/dist/{chunk-gwskdhaw.js → chunk-r7paw6ba.js} +2 -2
- package/dist/{chunk-ftsnryz8.js → chunk-rb4p3h5b.js} +2 -2
- package/dist/{chunk-brv52tgj.js → chunk-rff6c87z.js} +2 -2
- package/dist/{chunk-j78kgyff.js → chunk-rn5bqc82.js} +5 -5
- package/dist/{chunk-phee3jn9.js → chunk-rqa21qrv.js} +2 -2
- package/dist/{chunk-3g9n4bk2.js → chunk-rzxnxj25.js} +2 -2
- package/dist/{chunk-0jpzztpz.js → chunk-s0z838qq.js} +2 -2
- package/dist/{chunk-r7hwgk2v.js → chunk-s2k0g1hc.js} +2 -2
- package/dist/chunk-sdv06e2k.js +2 -0
- package/dist/chunk-sgbn37kz.js +2 -0
- package/dist/{chunk-tftgnw1w.js → chunk-sjqhtpzr.js} +2 -2
- package/dist/{chunk-7d1wnjw5.js → chunk-stc4ctrx.js} +2 -2
- package/dist/{chunk-6g553fkh.js → chunk-t3m57q06.js} +2 -2
- package/dist/chunk-tfj6v7y4.js +2 -0
- package/dist/{chunk-vg9p0hvk.js → chunk-tsdb5jnj.js} +2 -2
- package/dist/{chunk-5c42mfat.js → chunk-tyka859b.js} +2 -2
- package/dist/{chunk-2ncdext6.js → chunk-v0h0jqej.js} +2 -2
- package/dist/{chunk-4sfxcw58.js → chunk-v581r9vt.js} +3 -3
- package/dist/{chunk-6j1x3gny.js → chunk-v78f93yn.js} +2 -2
- package/dist/{chunk-rz9fnphz.js → chunk-v9jqk03c.js} +2 -2
- package/dist/{chunk-q7rq46qc.js → chunk-vbbndjfd.js} +2 -2
- package/dist/{chunk-ath5nv2w.js → chunk-vsh9vh4s.js} +2 -2
- package/dist/{chunk-d0s10qy5.js → chunk-vx6shb4g.js} +2 -2
- package/dist/{chunk-zjk12jjm.js → chunk-w2xjhfm2.js} +3 -3
- package/dist/{chunk-ma6ycen5.js → chunk-w4bye56s.js} +2 -2
- package/dist/chunk-wd82qz3x.js +2 -0
- package/dist/{chunk-7b5ryhwh.js → chunk-wdph90qk.js} +2 -2
- package/dist/{chunk-1fadxh2z.js → chunk-wf7kfk3p.js} +2 -2
- package/dist/{chunk-dsf2x63w.js → chunk-wrfs7q9f.js} +3 -3
- package/dist/{chunk-t5ff3cn7.js → chunk-wsyfhh7y.js} +2 -2
- package/dist/{chunk-zyn0ys4m.js → chunk-wwj743gm.js} +2 -2
- package/dist/{chunk-agdkhyaj.js → chunk-wz6765xb.js} +3 -3
- package/dist/{chunk-d9mj74pb.js → chunk-x4enakra.js} +2 -2
- package/dist/{chunk-bf7sgpzq.js → chunk-x621s275.js} +2 -2
- package/dist/{chunk-7evd34gw.js → chunk-x6m7zsg1.js} +3 -3
- package/dist/{chunk-2gwegefd.js → chunk-xadfbbwt.js} +2 -2
- package/dist/{chunk-ex063jn9.js → chunk-xdcp8tj9.js} +2 -2
- package/dist/{chunk-zzjth6f2.js → chunk-xk0dt0es.js} +2 -2
- package/dist/chunk-xk306vq1.js +2 -0
- package/dist/{chunk-ane53rqa.js → chunk-xqpdvq05.js} +2 -2
- package/dist/{chunk-p5hk14fk.js → chunk-xre7g1gy.js} +2 -2
- package/dist/chunk-xw6rsyvx.js +7 -0
- package/dist/{chunk-m087n233.js → chunk-y93q3v30.js} +3 -3
- package/dist/{chunk-9k58vckd.js → chunk-ymgc4317.js} +2 -2
- package/dist/chunk-ymk7ampx.js +2 -0
- package/dist/{chunk-fyxetwxv.js → chunk-z8sheg2r.js} +2 -2
- package/dist/{chunk-hj05zh7h.js → chunk-zm6b6zyr.js} +2 -2
- package/dist/{chunk-k883x8fv.js → chunk-zsrjzx7g.js} +2 -2
- package/dist/chunk-ztb6vjcg.js +2 -0
- package/dist/{chunk-34mq2dbm.js → chunk-ztnq7bts.js} +2 -2
- package/dist/{chunk-02qwd1yq.js → chunk-zwyd2bhy.js} +2 -2
- package/dist/{chunk-bqhbksy2.js → chunk-zz582m73.js} +2 -2
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.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.d.ts +1 -0
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/styles.css +26 -0
- 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/locales.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/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-radio.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-inline.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-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.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/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.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/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/mermaid/diagram.js +1 -1
- package/dist/mermaid/export.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/mermaid/preview.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.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/new-chat-directory.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/reference-projection.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/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.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/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-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/trailing-swap.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.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.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-052wfeys.js +0 -2
- package/dist/chunk-06wtwk7b.js +0 -2
- package/dist/chunk-0z7gy762.js +0 -2
- package/dist/chunk-1npqxk6m.js +0 -2
- package/dist/chunk-2hkj5qxh.js +0 -2
- package/dist/chunk-30a5fgk9.js +0 -2
- package/dist/chunk-3tp8fe70.js +0 -2
- package/dist/chunk-4jp1d558.js +0 -2
- package/dist/chunk-4sa0m3w5.js +0 -2
- package/dist/chunk-5jq3xg3q.js +0 -2
- package/dist/chunk-7pwdjhg8.js +0 -2
- package/dist/chunk-80sbwjrr.js +0 -2
- package/dist/chunk-816tez3v.js +0 -2
- package/dist/chunk-9x08kyf6.js +0 -2
- package/dist/chunk-ajp19sh9.js +0 -2
- package/dist/chunk-bve6cykn.js +0 -2
- package/dist/chunk-c2h4wr7g.js +0 -7
- package/dist/chunk-d6cfxqzx.js +0 -2
- package/dist/chunk-e1fzfaqj.js +0 -2
- package/dist/chunk-f9xtcxfb.js +0 -2
- package/dist/chunk-gs0b02g2.js +0 -2
- package/dist/chunk-hnkde8me.js +0 -2
- package/dist/chunk-jpr2y0y3.js +0 -2
- package/dist/chunk-kkqrxb9w.js +0 -3
- package/dist/chunk-kqvgmkvr.js +0 -2
- package/dist/chunk-nhkm2gr7.js +0 -1
- package/dist/chunk-ph7srp7q.js +0 -2
- package/dist/chunk-qmcr5f9k.js +0 -2
- package/dist/chunk-rkqptd9w.js +0 -2
- package/dist/chunk-rv3k0kfr.js +0 -2
- package/dist/chunk-s6medm3z.js +0 -2
- package/dist/chunk-sfgegn3p.js +0 -2
- package/dist/chunk-sjb5stzq.js +0 -2
- package/dist/chunk-stv8pr4v.js +0 -2
- package/dist/chunk-swkcmtme.js +0 -2
- package/dist/chunk-sz993t5e.js +0 -2
- package/dist/chunk-ta6rbxh5.js +0 -3
- package/dist/chunk-tc6d0v1y.js +0 -2
- package/dist/chunk-tyrzaz6c.js +0 -2
- package/dist/chunk-vm81n2c0.js +0 -2
- package/dist/chunk-vt7dkgtx.js +0 -2
- package/dist/chunk-x3v10a71.js +0 -2
- package/dist/chunk-xnx8p8c0.js +0 -4
- package/dist/chunk-ye7ecnej.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{As,Es,Rs}from"../chunk-dxsjz3re.js";import"../chunk-4gxpna3p.js";import"../chunk-9ts08sma.js";import"../chunk-2fx3qhyb.js";import"../chunk-az3g3a94.js";import"../chunk-dypeezvv.js";import"../chunk-wf7kfk3p.js";import"../chunk-g4devj8d.js";import"../chunk-e6ya95ee.js";import"../chunk-njwb0rbw.js";import"../chunk-p781sb6h.js";import"../chunk-npev9ffr.js";import{Qt}from"../chunk-3ek4vddd.js";import{Wt,li,Zt}from"../chunk-5pyvgshe.js";import{Tn,Mn,Nn,An}from"../chunk-5pmr5dby.js";import{A,yt,xt,me,S,Js,ie,Pn,In,Xs,bt,Ys}from"../chunk-h8r785ne.js";import"../chunk-jydhbkm8.js";import{$i,qi,bn,qs,Cn,Ee}from"../chunk-7xvrsw7x.js";import{ii,Ms,ri,si,ai,eo}from"../chunk-4dp24aja.js";import{ct,qt,Kt}from"../chunk-81hv0s07.js";import{Ns}from"../chunk-ag8696fb.js";export{Zt as CodexAccountCard,li as CodexAccountSummary,eo as CustomProviderEditor,Tn as DeepSeekLogo,Mn as GrokLogo,Qt as LoginCard,ct as MODEL_ALIASES_KEY,bt as MODEL_PRESENTATION,ii as ManagedProviderSection,Ns as ModelAliasSettings,Nn as OpenRouterLogo,A as PROVIDERS,$i as PROVIDERS_CHANGED,qi as PROVIDERS_REVOKED,ai as ProviderRow,Ms as ProviderSection,ri as ProviderTabs,An as QwenLogo,si as TestFeedback,Wt as UsageLimitRow,Cn as applyProvidersWhenIdle,As as codexSettingsBridge,qs as createManagedProvidersPort,bn as createProvidersPort,Rs as createSettingsBridgeClient,Xs as customModelEffort,S as gatewayModelId,yt as isAccountModel,xt as parseCustomModels,Ys as presentModel,In as providerApplicationPending,me as providerGroups,Pn as providerKeyUrl,ie as providerRegion,Js as resolveSessionModel,Kt as saveModelAlias,Es as serveSettingsBridge,qt as useModelAliases,Ee as useProviders};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
"@dnd-kit/sortable": "^10.0.0",
|
|
412
412
|
"@dnd-kit/utilities": "^3.2.2",
|
|
413
413
|
"@floating-ui/dom": "^1.8.0",
|
|
414
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
414
|
+
"@nyssance/codex-acp-v2": "^0.7.71",
|
|
415
415
|
"@nyssance/shadcn": "^4.23.4",
|
|
416
416
|
"@shadcn/react": "^0.3.1",
|
|
417
417
|
"@solar-icons/react": "^2.6.0",
|
package/dist/chunk-052wfeys.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-bba9qej8.js";import{Me,J,ce}from"./chunk-phee3jn9.js";import{useEffect as S,useMemo as f}from"react";function Ns(s){let c=J((i)=>i.activityOrder),a=n((i)=>{let o=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&Me(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(o)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=J((i)=>i.activitySeen),r=ce();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,o])=>u.get(i)!==o)}
|
|
2
|
-
export{Ns};
|
package/dist/chunk-06wtwk7b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{kt}from"./chunk-5c42mfat.js";import{o}from"./chunk-73e9vpm9.js";import{e,b}from"./chunk-esbgn8q0.js";import{Y,y,ee}from"./chunk-rkqptd9w.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as B}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:G,onModelChange:h,onConfigChange:C,defaultGroup:I={id:"models",name:"Models"},catalog:x=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),p=F({sessionId:l,model:!0}),O=P&&(p.current.sessionId!==l||p.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=y(u,"model"),a=y(u,"thought_level"),v=u.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),_=v.filter(A),m=v.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(n,r)=>{if(r===n.currentValue)return Promise.resolve();p.current={sessionId:l,model:n===t};let d=C?C(n.configId,r):N.setConfig(l,n.configId,r);return b(c,d),d},g=a?Y(a):[],z=g.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?ee(t):i("composer.model"),S=(n)=>({api_id:n.value,label:n.name}),V=x(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(S)})):[{...I,models:t?Y(t).map(S):[]}]),w=V.flatMap((n)=>n.models),M=w.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return B(kt,{disabled:G||O||k,switching:O,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(h)h(n.api_id);else if(t)f(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:V,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(n)=>f(a,n)}:void 0,selectOptions:_.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:Y(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:B(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);f(d,r)}})}var Cn=D(H);
|
|
2
|
-
export{Cn};
|
package/dist/chunk-0z7gy762.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u}from"./chunk-stv8pr4v.js";import{s}from"./chunk-bba9qej8.js";import{v,f}from"./chunk-s6medm3z.js";import{ut}from"./chunk-xnc0175v.js";import{cn as r}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as m,DropdownMenuItem as d,DropdownMenuTrigger as g}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as w}from"react/jsx-runtime";function Fs({onCollapseAll:i}){let{t:n}=s();return w(c,{children:[o(g,{render:o(ut,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(m,{align:"end",className:"w-52",children:o(d,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Os({screen:i,onSwitch:n}){let{t:e}=s(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(f,{className:r(u,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(v,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
|
-
export{Fs,Os};
|
package/dist/chunk-1npqxk6m.js
DELETED
package/dist/chunk-2hkj5qxh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{yi}from"./chunk-bba9qej8.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function na({host:o,children:t}){return s(n,{value:o,children:t})}function A(){let o=i(n),e={...yi(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function hi(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function pe(){let o=A();return(t)=>hi(o,t)}function vi(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{na,A,hi,pe,vi};
|
package/dist/chunk-30a5fgk9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{te}from"./chunk-fwqpwbd8.js";import{xt}from"./chunk-etvdqkvb.js";var ge={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:xt,parseConfig(e){if(typeof e.model!=="string"||typeof e.size!=="string"||Object.keys(e).some((t)=>t!=="model"&&t!=="size"))throw Error("Invalid image input config");let o={model:e.model,size:e.size};return te(o),o},routePrompt(e){return e.image()}};
|
|
2
|
-
export{ge};
|
package/dist/chunk-3tp8fe70.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,n,h}from"./chunk-bba9qej8.js";import{z}from"./chunk-fyxetwxv.js";import{N,ie,Re}from"./chunk-s6medm3z.js";import{Me,J,ce}from"./chunk-phee3jn9.js";import{si}from"./chunk-bve6cykn.js";import{Ie}from"./chunk-nqt9gyz9.js";import{Te}from"./chunk-8rb896tq.js";import{Ne}from"./chunk-zxfx7psd.js";import{Kt}from"./chunk-cydnp9mm.js";import{ni}from"./chunk-51x80v4h.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Ds({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let R=s(),{t:L}=R,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=J((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&Me({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=J((t)=>t.activityCollapsedGroups),o=ce(),x=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),I=(t)=>{if(b?.(t))return;d(t)},D=ni();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!si(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=x[r-1];if(!y)return;e.preventDefault(),I(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&D?c(G,{children:Ne(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(N,{children:g.map((t)=>t.key==="foreground"?c(N,{children:t.rows.map(A)},t.key):c(ie,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:R,actions:L,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=Kt(i.sessionId,d);return P(H,{children:[c(Re,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Te,{sessionRow:i,actions:L}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:R,hint:S,actions:c(Ie,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((o)=>P("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(z,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
-
export{Ds};
|
package/dist/chunk-4jp1d558.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_i}from"./chunk-jpr2y0y3.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function ki({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=_i(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
-
export{ki};
|
package/dist/chunk-4sa0m3w5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M}from"./chunk-pxv38ttf.js";import{o}from"./chunk-73e9vpm9.js";import{At}from"./chunk-80sbwjrr.js";import{y,ee}from"./chunk-rkqptd9w.js";import{e}from"./chunk-esbgn8q0.js";import{no}from"./chunk-6e84zbgs.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Y}from"lucide-react";import{useCallback as Z,useEffect as ss,useId as J,useRef as L,useState as N}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as ns}from"react/jsx-runtime";function to(s,l){let d=o((u)=>u.sessions),r=o((u)=>u.actions),[S,m]=N(()=>new Set);return(u)=>{let c=l?.(u)??null,a=no(s.id,u,d,r,s);if(a.length===0)return c;let x=`${s.id}:${u.key}`;return{active:c?.active===!0||a.some((i)=>i.status==="running"||i.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||S.has(x),content:p(ns,{children:[t(wi,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(x)?i:new Set([...i,x]))}),c?.content]})}}}function wi({sessionId:s,turn:l,parent:d,tasks:r,onExpand:S}){let{host:m}=e(),u=o((n)=>n.sessions),c=o((n)=>n.actions),a=r??no(s,l,u,c,d),x=a.some((n)=>n.status==="running"),i=a.some((n)=>n.status==="running"||n.status==="requires_action"),[f,k]=M(`subagents:${s}:${l.key}`,i,!0),w=J();if(a.length===0)return null;let g=new Map;for(let n of a)g.set(n.status,(g.get(n.status)??0)+1);let v=[...g].map(([n,E])=>`${m.t(`subagents.${n}`)} ${E}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":f,"aria-controls":w,onClick:()=>{if(!f)S?.();k(!f)},children:[f?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),x?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",a.length]}),t("span",{className:"truncate",role:"status",children:v})]}),t("div",{id:w,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:a.map((n)=>t(es,{task:n,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${n.key}`,onRead:()=>{S?.(),k(!0)}},n.key))})]})}function O(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function es({task:s,cwd:l,stateKey:d,visible:r,onRead:S}){let{client:m,host:u}=e(),{t:c}=u,a=s.session,x=o((h)=>h.connection==="ready"),[i,f]=M(`subagent:${d}`,!1),[k,w]=N(!1),[g,v]=N(null),[n,E]=N(null),[I,Q]=N(null),[R,P]=N(!1),B=L(!1),_=L(!1),j=J(),q=a&&y(a.configOptions,"model"),z=s.title??c("subagents.untitled"),W=n?O(n,a):a,U=x&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=a?.cwd??l,T=Z(async(h)=>{if(!m.readSubagentHistory||H===null||B.current)return;_.current=!0,B.current=!0,P(!0),v(null);try{let b=await m.readSubagentHistory(H,D,h);E((K)=>K===null?b.session:O(b.session,K)),Q(b.cursor)}catch(b){v(b instanceof Error?b.message:String(b))}finally{B.current=!1,P(!1)}},[m,H,D]);ss(()=>{if(r&&i&&!_.current)T(null)},[r,i,T]);let V=async()=>{if(!a)throw Error("A live child session is required for cancellation");w(!0),v(null);try{await m.cancel(a.id)}catch(h){v(h instanceof Error?h.message:String(h))}finally{w(!1)}};return p("section",{"aria-label":z,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${c(`subagents.${s.status}`)}`,"aria-expanded":i,"aria-controls":j,onClick:()=>{if(!i)S();f(!i)},children:[i?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:z}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:k,"aria-label":c("subagents.cancel",{name:z}),onClick:()=>{V()},children:k?t(F,{className:"size-3.5 animate-spin"}):t(Y,{className:"size-3.5"})})]}),g&&!i&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!i,className:"min-w-0 ps-4",children:[(s.description||q)&&p("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),q&&t("span",{className:"shrink-0",children:ee(q)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{T(n===null?null:I)},children:c("timeline.retry")})]}),R&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),I&&t(C,{variant:"ghost",size:"sm",disabled:R,onClick:()=>{T(I)},children:c("timeline.loadEarlier")}),r&&i&&(W&&W.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ts,{session:W})}):!R&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ts({session:s}){let{client:l,host:d}=e(),r=to(s);return t(At,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
-
export{to,wi};
|
package/dist/chunk-5jq3xg3q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p,ro}from"./chunk-n96z8etk.js";import{Fn}from"./chunk-tdvx2n5m.js";import{useEffect as P,useRef as u,useState as m}from"react";var Fi="providers:changed",Oi="providers:managed-revoked",i=(e)=>e;function _n(){return{read:()=>i(p.providersRead()),save:(e,r,t)=>i(p.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(p.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(p.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>p.providersTest({providerId:e}),apply:()=>i(p.providersApply()),onChanged:(e)=>ro[Fi].listen((r)=>e(r.payload))}}function ha(){return{bind:(e)=>p.providersAccountBind({account:e}),refresh:(e,r)=>i(p.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await p.providersClearManaged()},onRevoked:(e)=>ro[Oi].listen((r)=>e(r.payload.sessionIds))}}async function Pn(e){try{return await e.apply()}catch(r){if(!Fn(r))throw r;return e.read()}}function Ue(e,r=console.error){let[t,d]=m(null),a=u(r);return a.current=r,P(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
-
export{Fi,Oi,_n,ha,Pn,Ue};
|
package/dist/chunk-7pwdjhg8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{F,Wo,hs,Kn,vs,Zo,ys}from"./chunk-pc11a2w0.js";import{t,qe,w,o}from"./chunk-73e9vpm9.js";import{je}from"./chunk-ane53rqa.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(i,e){b.setState((n)=>({entries:{...n.entries,[i]:e}}))}function v(i,e){let n=Q(e),a=i.items.findLast((s)=>Q(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&Q(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...Zo(n._meta),...n.content.filter(k).flatMap((s)=>Zo(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=qe(),{t:l}=t(),m=Wo(e.id,a),c=JSON.stringify([i,m]),u=w(b,(r)=>r.entries[c]),d=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??hs(n),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,h=d!==void 0&&v(d,e),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!v(r,e)||!r.attached||r.readOnly||r.restoring)return;let S=Kn(n,f);if(!S.trim())return;let q={questionItemId:m,question:n.title,answer:S};p(c,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:vs(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(ys,{question:n,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(c,{draft:r}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function Fo({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=F(e._meta);if(n===void 0||n.subagent!==void 0||n.readOnly||!v(n,e))return y(je,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,l)=>y(O,{sessionId:i,item:e,question:s,index:l},Wo(e.id,l)))})}
|
|
2
|
-
export{Fo};
|
package/dist/chunk-80sbwjrr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{br}from"./chunk-wew3t005.js";import{$o,$e,t,qe,o,ae}from"./chunk-73e9vpm9.js";import{cs,Ot,Vo,ps,ms}from"./chunk-7d1wnjw5.js";import{Lt}from"./chunk-ftsnryz8.js";import{_r}from"./chunk-vg1y693r.js";import{Hr}from"./chunk-gpv1dc5y.js";import{Ur,Br}from"./chunk-xfzmxq3g.js";import{ts,ns}from"./chunk-mahb3t97.js";import{Fr}from"./chunk-64apxzn7.js";import{Or}from"./chunk-84p483n0.js";import{rs}from"./chunk-xx29efrs.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as Oe,nativeTurnId as ve}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as Te,useMemo as K,useRef as h,useState as U}from"react";import{flushSync as ye}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var xe=24;function De(e){let d=Math.max(0,e.turnTopPx-xe),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ke({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function Ue({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=qe(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return H(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((_)=>{if(_.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function _e(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:cs(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function At(e){return i($e,{host:e.host,client:e.client,children:i($o,{value:e.session.cwd,children:i(We,{...e})})})}function We({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=Ke}){let v=qe(),A=t(),T=o((n)=>n.historyNavigation[e.id]),he=K(()=>e.commands.map((n)=>n.name),[e.commands]),c=_e(e,T?.turns),L=c.at(-1)?.key,be=ps(e,c),y=e.state==="running"||e.state==="requires_action",W=K(()=>Hr(c,T),[c,T]),Z=K(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),we=K(()=>S===void 0?[]:Ur(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,j=h(c);j.current=c;let[l,Re]=U(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),Se=o((n)=>ze(n.agent).sessionRetry),te=x!==void 0;H(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[ke,Pe]=U(!1),O=h(null),[Ie,ne]=U(!1),re=h(0),X=h({key:L,running:y});X.current={key:L,running:y};let[ie,F]=U(0),I=h(0),N=h(null);I.current=ie;let Ne=M(()=>{if(N.current!==null)N.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:G,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ue,cancelLocation:se}=Or(l,y,Ne),ce=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ue(!0),u=()=>a.isCurrent()&&X.current.running&&X.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let p=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(p===null)return;let m=l.scrollTop+p.getBoundingClientRect().top-l.getBoundingClientRect().top,P=De({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=P.spacerPx>0?{element:p,heightPx:p.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,ye(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),f=O.current;if(f===null)return;f.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ue,y,l,c]);Te(()=>{if(!w||y)return;se(),N.current=null,I.current=0,F(0)},[w,se,y]);let J=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);H(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(Pe(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)J()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,J,l,e.restoring,T?.complete]),H(()=>{ts({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>ns(e.id),[e.id]);let He=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=j.current.find((m)=>m.user?.id===(n.messageId??n.id))??j.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ve(P)===n.nativeTurnId));if(!r?.user)return null;let f=r.user.id,p=O.current;if(p===null)throw Error("Virtual timeline is not mounted");return await p.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(f)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(f)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),Ee=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);H(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=N.current,r=null;if(u!==null){let f=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(f!==I.current&&(f<I.current||u.keepTop)){if(I.current=f,ye(()=>F(f)),f===0)N.current=null}if(f>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-xe}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),H(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let de=h(null);Te(()=>{if(l===null)return;let n=c.at(-1),a=de.current;if(de.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))N.current=null,I.current=0,F(0),ce()}else if(n.key!==a.key)G()},[ce,w,y,G,l,e.turnEndedAt,c]);let Ae=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(Ue,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Ie})}let f=c.indexOf(r),p=r.key===be,m=ms(e,c,f),P=!p&&m.continued,D=r.key===L,q=r.errors.at(-1),me=q===void 0?null:Ve(q),Q=q===void 0?null:ve(q),Le=!e.subagent&&D&&!p&&k&&Se&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&me!==null&&Oe(me).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",fe=z?.(r)??null,pe=s?.(r)??null,Ce=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||p||fe!==null||Ot(r)||Vo(r)||D&&(e.error!==null||e.lastStopReason==="cancelled"),ge=r.user===null?null:Lt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(rs,{item:r.user,messageTime:ge,skillNames:he}):V(r.user,ge)),Ce&&i(_r,{sessionId:e.id,turn:r,terminals:e.terminals,active:p,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:D,error:e.error,retrying:p?Be(e._meta)??void 0:void 0,retry:Le?{turnId:Q,delaySeconds:Fr(c),run:(Me)=>v.retrySession(e.id,Q,Me)}:void 0,interrupted:Vo(r)||!p&&D&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:fe}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(_,{viewportRef:Re,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(br,{ref:O,entries:W,renderTurn:Ae,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),ke&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:J,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(Br,{items:we,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ee,onRevealError:(n)=>ae(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:G,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Fe,{})})]})}
|
|
2
|
-
export{At};
|
package/dist/chunk-816tez3v.js
DELETED
package/dist/chunk-9x08kyf6.js
DELETED
package/dist/chunk-ajp19sh9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Ea(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function Pt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Ea(t,o))}return{imageFiles:n,sawNonImageFile:i}}function It(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function jn(e){return e.replace(s,"")}function wa(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function $n(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=jn(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-wa(n,i)),r=Math.max(0,o-wa(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{Ea,Pt,It,jn,wa,$n};
|
package/dist/chunk-bve6cykn.js
DELETED
package/dist/chunk-c2h4wr7g.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{xs}from"./chunk-ath5nv2w.js";import{xe}from"./chunk-d9mj74pb.js";import{Ko}from"./chunk-dr5swvaa.js";import{C}from"./chunk-swkcmtme.js";import{Bo}from"./chunk-k883x8fv.js";import{be,qo}from"./chunk-73e9vpm9.js";import{Ho}from"./chunk-w1wr14da.js";import{Wr,Zr}from"./chunk-rz9fnphz.js";import{Kr}from"./chunk-4wm5emgf.js";import{Oo,qr}from"./chunk-hj05zh7h.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as v}from"entities";import ce from"katex";import{CheckIcon as z,ChevronLeftIcon as de,ChevronRightIcon as le,CopyIcon as ue,DownloadIcon as me,FileIcon as ge,LinkIcon as fe,MailIcon as pe,XIcon as he}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as B,createElement as D,memo as X,startTransition as ke,useContext as G,useEffect as k,useLayoutEffect as J,useMemo as V,useRef as w,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as se}from"react/jsx-runtime";var Z=B(!1),Y=B(null);function y(){let e=G(Y);if(e===null)throw Error("Markdown host is missing");return e}var we=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,Te=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,ve=/\uE200[^\uE201]*$/,Ce=4,ye=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function L(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function Q(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Me(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)&&!Q(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function Ne(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!L(e,t)&&!Q(e,t,n))return t;return-1}function Le(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Ee(e){return Le(e,"```")%2===1}function ee(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!L(e,t))n+=1;t+=1}return n%2===1}function Ie(e){return e.endsWith(`
|
|
2
|
-
`)?`${e}\`\`\``:`${e}
|
|
3
|
-
\`\`\``}function _(e,n){if(!e.includes(n)||Me(e,n)%2===0)return e;let t=Ne(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
|
-
`)||ee(r))return e;return`${e}${n}`}function $e(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function ne(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Re(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=ne(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>Ce&&!ye.has(u))return!1}return!0}function Pe(e){let{path:n}=ne(e);if($e(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Se(e){let n=e.match(H);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Re(t)||Pe(t)?e.replace(H,"$1"):`${e})`}function Ae(e){let n=e.replace(ve,"");if(n.length===0||n.includes("`")&&ee(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Ee(n))return{isCodeFenceOpen:!0,markdown:Ie(n)};if(n.includes(")n=Se(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Fe(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return Fe(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function te(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))te(t.tokens);if(!O(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!O(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function He(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?He(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function _e(e,n){let t;try{t=Bo(e,n)}catch{return}try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}function Oe({links:e,children:n}){let t=y(),r=qo();if(t.preview||!r)return a("p",{className:"codex-markdown-paragraph",children:n});return a(Zr,{links:e})}function je(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function We(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function qe(e){let n=We(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Ke({href:e}){let n=V(()=>qe(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?pe:o?ge:fe;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function Ue({children:e,href:n,title:t}){let r=y(),o=be();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:_e(n,o)??t,onClick:(s)=>je(s,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(Ke,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function ze({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=w(null),[c,d]=h(null),[u,p]=h(null),[E,b]=h(!1);if(k(()=>{let g=Kr(d,p);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let x=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:E?a(z,{}):a(ue,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function Be({code:e,language:n}){let t=y(),r=G(Z),o=qo();if(t.preview)return a("span",{children:e});if(!r&&o&&n?.toLowerCase()==="mermaid")return a(Ho,{source:e});return a(De,{code:e,language:n})}function De({code:e,language:n}){let t=w(null),[r,o]=h(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(ze,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function Xe(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ge({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(de,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(me,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(le,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(he,{})})]})]})}function Je(e){return y().preview?a(se,{children:e.alt}):a(Ve,{...e})}function Ve({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=h();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(se,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(Xe(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ge,{preview:s,setPreview:i})})]})}function Ze({value:e,display:n}){let t=w(null);return J(()=>{if(t.current===null)throw Error("Codex math root is not mounted");ce.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var Ye=150,M=null;function W(e,n){let t=M;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function re(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function q(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Qe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function oe(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${re(Qe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=oe(r),s=t.get(o)??0;return t.set(o,s+1),ae(r,`${n}-${o}-${s}`)})}function en(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function nn(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return D(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function tn(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=re(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function U(e,n,t){let r=N(e.href);if(!Ko(r))return null;return a(Je,{src:r,alt:v(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function ae(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return D(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((c)=>c.type!=="space"&&c.type!=="br"),o=t.tokens.filter((c)=>c.type!=="text"||c.raw.trim().length>0);if(o.length>0&&o.every(Wr))return a(Oe,{links:o,children:m(t.tokens,n)},n);let s=r.length>0&&r.every((c)=>c.type==="image"),i=s&&r.length>1;return a("p",{className:`codex-markdown-paragraph${s?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${i?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":i?"true":void 0,"data-wide-markdown-block":s?"true":void 0,"data-wide-markdown-block-kind":s?"image":void 0,children:s?r.map((c,d)=>U(c,`${n}-image-${d}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(xs,{text:v(t.text),children:W(v(t.text),n)},n):m(t.tokens,n)}case"escape":return W(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=N(t.href),s=C(o);if(s!==null)return a(xe,{app:{id:s,name:v(t.text).replace(/^\$/,"")}},n);return Ko(o)?a(Ue,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return U(e,n,!1);case"code":{let t=e;return a(Be,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return nn(e,n);case"list_item":return en(e,n);case"table":return tn(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Ze,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function T(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?v(n.text):n.tokens.map(T).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(T).join("");case"list":return e.items.map(T).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(T).join("")).join("")).join("")}default:return""}}function rn({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=M;try{return M={cursor:t,runs:r,generation:o},ae(e,n)}finally{M=s}}var on=X(function({result:n}){let{text:t,isStreaming:r}=n,o=V(()=>{let l=n.tokens;if(n.source.includes("!["))te(l);P(l);let g=new Map,S=0;return l.map((I)=>{let R=oe(I),A=g.get(R)??0;g.set(R,A+1);let F=T(I),ie={token:I,tokenKey:`root-${R}-${A}`,offset:S,visibleText:F};return S+=F.length,ie})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,p=performance.now(),E=r&&d?c.runs.filter((l)=>p-l.firstSeenAtMs<Ye):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:E.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)x.runs.push({start:u,end:s.length,firstSeenAtMs:p});return J(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(rn,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:x.runs,generation:b},l.tokenKey))})}),an=X(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>Oo(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let u=qr((p)=>{if(!i.current)i.current=!0,s(p);else ke(()=>s(p))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let p=t?Ae(n).markdown:n;u.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(on,{result:o})});function Dt({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(Y.Provider,{value:t,children:a(Z.Provider,{value:r,children:a(an,{text:r?o:e,isStreaming:r})})})}
|
|
7
|
-
export{Dt};
|
package/dist/chunk-d6cfxqzx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ne}from"./chunk-zxfx7psd.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function oi({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:Ne(t)}):null}function ii({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(oi,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function qt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(ii,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{oi,ii,qt};
|
package/dist/chunk-e1fzfaqj.js
DELETED
package/dist/chunk-f9xtcxfb.js
DELETED
package/dist/chunk-gs0b02g2.js
DELETED
package/dist/chunk-hnkde8me.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-1fadxh2z.js";import{ve}from"./chunk-15m908ph.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function is({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(O,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ve,{entries:t.entries})}
|
|
2
|
-
export{is};
|
package/dist/chunk-jpr2y0y3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var la={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function _i(e){return[...e].toSorted((o,n)=>(la[o.kind]??99)-(la[n.kind]??99))}function $a(e){return e==="allow_once"||e==="allow_always"}function qa(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{la,_i,$a,qa};
|
package/dist/chunk-kkqrxb9w.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{u}from"./chunk-stv8pr4v.js";import{N,f}from"./chunk-s6medm3z.js";import{Bt}from"./chunk-8q5zwkry.js";import{Ke,d,We,lt,i}from"./chunk-kqvgmkvr.js";import{q,K,le,W,Z,ke,zt}from"./chunk-nhkm2gr7.js";import{we}from"./chunk-7p7fxgdb.js";import{ct}from"./chunk-ne4b53kn.js";import{k}from"./chunk-qk1yqepm.js";import{jt,B}from"./chunk-5gn8xw58.js";import{Q,Pe}from"./chunk-pqz2471h.js";import{Vt}from"./chunk-fdmbfq9g.js";import{Gt}from"./chunk-0jpzztpz.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as ne,CircleArrowUpIcon as se,MoreVerticalIcon as ie,PlusIcon as _,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as de,XIcon as me}from"lucide-react";import{memo as ue,useDeferredValue as pe,useEffect as V,useMemo as G,useState as I}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ge,DialogContent as fe,DialogDescription as ve,DialogHeader as xe,DialogTitle as he,DialogTrigger as Ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as ye,DropdownMenuContent as be,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as U}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Se}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as E}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as X}from"react/jsx-runtime";function z(t){return t.interface?.displayName??t.name}function F(t){return t.interface?.shortDescription??""}function De({plugin:t,marketplace:r}){let{t:m}=d(),p=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),g=i((n)=>n.install),c=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",o=m(p?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!p)return e(ne,{className:"text-muted-foreground size-4 shrink-0","aria-label":o});return e(y,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:p||a||c,"aria-label":o,title:c?m("plugins.disabledReason.unknown"):o,onClick:()=>void g({plugin:t,marketplace:r}).catch(()=>{}),children:p?e(E,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Me({plugin:t,marketplace:r,actions:m,onOpen:p}){let a=F(t),g=t.interface?.developerName,c=t.localVersion??t.version,o=[g,c?`v${c}`:null].filter(Boolean).join(" · ");return s(ke,{className:"toolbox-row relative",children:[e(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":z(t),onClick:()=>p({plugin:t,marketplace:r})}),e(W,{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(B,{name:t.name})})}),s(K,{className:"pointer-events-none relative min-w-0",children:[e(zt,{className:"mb-0.5",children:z(t)}),e(le,{className:"line-clamp-1",title:a,children:a||r.interface?.displayName||r.name}),o&&e(le,{"data-toolbox-metadata":"",children:o})]}),e(q,{className:"relative w-8 shrink-0 justify-center",children:m})]})}function H(){return lt((t)=>t.connection==="ready"&&ee(t.agent))}var D=48;function Ee({marketplace:t,plugins:r,onOpen:m}){let{t:p}=d(),a=i((n)=>n.removeMarketplace),[g,c]=I(0),o=Math.min(g,Math.max(0,Math.ceil(r.length/D)-1));if(r.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:r.length}),t.path!==null&&s(ye,{children:[e(Ie,{render:e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":p("plugins.pageActions")}),children:e(ie,{})}),e(be,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),p("plugins.marketplace.remove")]})})]})]}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:r.slice(o*D,(o+1)*D).map((n)=>e(Me,{onOpen:m,plugin:n,marketplace:t,actions:e(De,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),r.length>D&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(y,{variant:"outline",size:"sm",className:"h-9",disabled:o===0,onClick:()=>c(o-1),children:p("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[o+1," / ",Math.ceil(r.length/D)]}),e(y,{variant:"outline",size:"sm",className:"h-9",disabled:(o+1)*D>=r.length,onClick:()=>c(o+1),children:p("plugins.nextPage")})]})]},t.name)}var ze=ue(function({query:r,onOpen:m}){let{t:p}=d(),a=i((n)=>n.marketplaces),g=i((n)=>n.featuredPluginIds),c=G(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,z(v),F(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),o=G(()=>{let n=new Set(g);return c.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>r===""?v.path!==null||n.has(b.id):P.includes(r)).map(({plugin:b})=>b)}))},[c,g,r]);return s(X,{children:[o.map(({marketplace:n,plugins:v})=>e(Ee,{marketplace:n,plugins:v,onOpen:m},JSON.stringify([n.name,n.path,r]))),o.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("plugins.empty")})]})});function Oe(){let{t}=d(),r=H(),m=i((h)=>h.addMarketplace),p=i((h)=>h.upgradeAll),a=i((h)=>h.upgrading),[g,c]=I(""),[o,n]=I(!1),[v,x]=I(!1),[b,P]=I(null),O=async()=>{let h=g.trim();if(!h||o)return;n(!0),P(null);try{await m({source:h}),c(""),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:!r||a,"aria-busy":a,onClick:()=>void p(),children:[a?e(E,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(ge,{open:v,onOpenChange:(h)=>{if(!o)x(h)},children:[s(Ne,{render:e(y,{size:"sm",className:"h-9",variant:"outline",disabled:!r}),children:[e(_,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(fe,{children:[s(xe,{children:[e(he,{children:t("plugins.marketplace.addTitle")}),e(ve,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(h)=>{h.preventDefault(),O()},children:[e(Se,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(U,{id:"marketplace-source",value:g,disabled:o,onChange:(h)=>c(h.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:o,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(y,{type:"submit",disabled:o||g.trim()==="",children:[o&&e(E,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Be({onOpen:t,query:r}){let m=H(),p=i((c)=>c.marketplaceLoadErrors),a=i((c)=>c.loading)||!m,g=pe(r.trim().toLowerCase());return e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} flex flex-col gap-8`,children:[p.map((c)=>s("p",{className:"text-destructive px-2 text-xs",children:[c.marketplacePath,": ",c.message]},c.marketplacePath)),a?e(we,{}):e(ze,{query:g,onOpen:t})]})})}function Is({cwd:t,active:r,extensions:m,onOpenCatalog:p}){let{t:a}=d(),g=We(),c=Ke(g),o=i((l)=>l.refresh),n=i((l)=>l.loading),v=i((l)=>l.error),[x,b]=I("plugins"),[P,O]=I({plugins:"",skills:""}),h=x==="skills"?P.skills:P.plugins,S=(l)=>O((M)=>({...M,[x]:l})),Y=lt((l)=>JSON.stringify([...new Set(l.sessionList.map((M)=>ct(M.cwd,l.projectContext)).filter((M)=>M!==null))].toSorted())),T=JSON.stringify([...new Set([ct(t,g.state.projectContext),...JSON.parse(Y)].filter((l)=>l!==null))].toSorted()),A=i((l)=>l.installed),R=a(x==="skills"?"plugins.skills.search":"plugins.search"),[w,j]=I(null),C=H();V(()=>{if(!r||!C)return;if(c.getState().loadedScope!==T)o(JSON.parse(T))},[r,C,o,T,c]),V(()=>{if(!C)return;return g.onSkillsChanged(()=>void o(void 0,{background:!0,catalog:!1}))},[C,o,g]);let L=(l)=>{p?.(),b("plugins"),j(l)},J=(l)=>{p?.(),b(l),j(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(jt,{}),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:[m&&s(f,{className:`${u} h-8 gap-2 px-2`,active:m.active,onClick:m.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((l)=>s(f,{className:`${u} h-8 gap-2 px-2`,active:!m?.active&&x===l&&w===null,onClick:()=>J(l),children:[l==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${l}`)})]},l))]}),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(k,{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(N,{children:!C||n&&A.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(E,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):A.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):A.map((l)=>s(f,{title:z(l.plugin),className:`${u} gap-2 px-2`,active:!m?.active&&w?.plugin.id===l.plugin.id,onClick:()=>L(l),children:[e(B,{name:l.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:z(l.plugin)})]},l.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:m?.active?m.content:s(X,{children:[w&&e(Vt,{entry:w,onBack:()=>J("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(Pe,{children:e(Bt,{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(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(U,{className:"h-9 rounded-full ps-9 pe-9","aria-label":R,value:h,onChange:(l)=>S(l.target.value),placeholder:R}),h&&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(me,{})})]}),e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void o(void 0,{forceRefetch:!0}),children:n?e(E,{}):e(re,{})}),x==="plugins"&&e(Oe,{})]})})}),(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 o(),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(Be,{query:P.plugins,onOpen:L})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Gt,{query:P.skills,ready:C,onOpenPlugin:L})})]})]})]})})]})}
|
|
3
|
-
export{Is};
|
package/dist/chunk-kqvgmkvr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$t}from"./chunk-7b5ryhwh.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function Ke(e){let t=r.get(e);if(!t)t=$t(e),r.set(e,t);return t}function Ts({host:e,client:t,children:n}){let s=Ke(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function We(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function lt(e){let t=We();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ke(We());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Ze(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Ke,Ts,d,We,lt,i,Ze};
|
package/dist/chunk-nhkm2gr7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Le}from"./chunk-stv8pr4v.js";import{H}from"./chunk-8hygfx41.js";import{cn as n}from"cn";import{Item as i,ItemActions as q,ItemContent as K,ItemDescription as le,ItemMedia as W,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function Z({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function ke({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Le,"data-[active=true]:font-medium",e),...r})}function zt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(H,{children:t})})}export{q,K,le,W,Z,ke,zt};
|
package/dist/chunk-ph7srp7q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function bi(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function eo(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ye(t){return t.type==="array"}function on(t){return(Ye(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{bi,eo,Ye,on};
|
package/dist/chunk-qmcr5f9k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{me}from"./chunk-gwskdhaw.js";import{x}from"./chunk-vm81n2c0.js";import{w}from"./chunk-73e9vpm9.js";import{fn}from"./chunk-816tez3v.js";import{Oe}from"./chunk-xnx8p8c0.js";import{_n}from"./chunk-5jq3xg3q.js";import{Be}from"./chunk-sz993t5e.js";import{ze}from"./chunk-p5hk14fk.js";import{Sn}from"./chunk-h7xjw0p4.js";import{wn,kn}from"./chunk-337hq36y.js";import{jsx as t,jsxs as d,Fragment as f}from"react/jsx-runtime";var n;function C(){return n??=_n(),n}function P(){let o=fn();return t(kn,{sessionId:o.session.id,enabled:o.inputReady&&!o.sending&&!o.shellMode,onMention:o.addMention,onBusyChange:o.setAdding})}function pa({client:o,providers:m,catalog:i,shellCommands:p=!0,modelMenu:l,children:a,...s}){let{session:e}=s,c=w(o.store,(r)=>r.modelRecovery[e.id]??!1);return d(f,{children:[c&&!me(e.error?.error)&&t(Sn,{client:o,session:e,providers:m??C(),catalog:i},e.id),d(Oe,{modelMenu:l??{defaultGroup:x,catalog:(r)=>Be(r,i),headerAction:t(ze,{})},...s,attachmentPolicy:wn,onShellCommand:p?(r)=>o.executeShell(e.id,r):void 0,children:[t(P,{}),a]})]})}
|
|
2
|
-
export{pa};
|
package/dist/chunk-rkqptd9w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function Y(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function y(e,t){return e.find((n)=>n.category===t&&o(n))}function ee(e){return Y(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{Y,y,ee};
|
package/dist/chunk-rv3k0kfr.js
DELETED
package/dist/chunk-s6medm3z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Le,u}from"./chunk-stv8pr4v.js";import{H}from"./chunk-8hygfx41.js";import{z}from"./chunk-fyxetwxv.js";import{E}from"./chunk-44r55va6.js";import{gt,Je,ft}from"./chunk-jgqt7k0h.js";import{PreviewCard as C}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as M,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function N(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 v({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 f({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 ie({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:b,headerChildren:g,wrapHeader:c,onHeaderClick:P,children:y}){let R=()=>{P?.(),t(!o)},x=p(gt,"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)]"),S=d(K,{children:[r!=null&&e(v,{children:r}),g??e(H,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(ft,{content:s!==void 0?e(Je,{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:b})})]}),k=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,u),onClick:R,onKeyDown:(m)=>{if(m.target!==m.currentTarget)return;if(m.key!=="Enter"&&m.key!==" ")return;m.preventDefault(),R()},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]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[c===void 0?k:c(k),o&&e(N,{className:"mt-0.5",children:y})]})}var _=T(()=>{}),G=T(()=>{});function en(){return L(G)}function Ee(){return L(_)}function Re({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:b,preview:g,listeningPorts:c,onOpenPort:P,accessory:y,meta:R,hint:x,actions:S,className:k,...m}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(gt,Le,"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||c!=null&&c.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...m,children:[e(v,{children:t!=null?e(z,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(H,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),b!=null&&e(H,{className:"text-muted-foreground text-xs",children:b}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),c!=null&&c.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:c.map((w)=>P?d("button",{type:"button",className:"underline",onPointerDown:(h)=>h.stopPropagation(),onKeyDown:(h)=>h.stopPropagation(),onClick:(h)=>{h.stopPropagation(),P(w)},children:[":",w]},w):d("span",{children:[":",w]},w))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(ft,{content:y!=null?e(Je,{children:y}):R??e(Je,{}),actions:S}),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]=I(!1),[s,a]=I(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(_.Provider,{value:a,children:e(G.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 E(o),d(C.Root,{open:o,onOpenChange:t,children:[e(C.Trigger,{render:n,delay:700,closeDelay:100}),e(C.Portal,{children:e(C.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(C.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{N,v,f,ie,en,Ee,Re};
|
package/dist/chunk-sfgegn3p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u}from"./chunk-stv8pr4v.js";import{a,n}from"./chunk-bba9qej8.js";import{N,v,f,ie}from"./chunk-s6medm3z.js";import{A,pe,vi}from"./chunk-2hkj5qxh.js";import{mt}from"./chunk-thaa1n4f.js";import{V,re}from"./chunk-rp7tnbss.js";import{De,ue}from"./chunk-f78jd8xh.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as Q,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as we,useSortable as le,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as se}from"@dnd-kit/utilities";import{cn as j}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as ae,StarIcon as be,Trash2Icon as ce}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as L}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as ee,DialogFooter as oe,DialogHeader as te,DialogTitle as ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as B,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:x}){let{attributes:w,listeners:I,setNodeRef:i,transform:m,transition:p,isDragging:M}=le({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:se.Transform.toString(m),transition:p},className:j("w-full min-w-0",M&&"opacity-50"),...w,...I,role:"group",children:x})}function Be({collection:l,children:C,onEdit:x,onConfirm:w,onNewChat:I}){let{t:i}=A(),m=ue(),p=pe(),{attributes:M,listeners:d,setNodeRef:h,transform:R,transition:P,isDragging:H}=le({id:l.id,disabled:{draggable:l.id===V,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:se.Transform.toString(R),transition:P},className:j("w-full min-w-0",H&&"opacity-50"),children:e(ie,{open:!l.collapsed,onOpenChange:(c)=>p(m({type:"collapse",id:l.id,collapsed:!c})),label:re(l,i),count:l.sessionIds.length,leading:l.id===V?e(be,{className:"size-3.5"}):e(mt,{emoji:l.emoji,onChange:(c)=>p(m({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...d,role:"group",children:c}),actions:s(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:re(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==V&&s(B,{onClick:x,children:[e(he,{}),i("collection.rename")]}),s(B,{onClick:I,children:[e(ae,{}),i("collection.newChat")]}),s(B,{onClick:()=>w("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==V&&s(B,{variant:"destructive",onClick:()=>w("delete"),children:[e(ce,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Xs({renderRow:l,onSelect:C,onNewChat:x,Scroll:w=He}){let I=A(),{t:i}=I,m=ue(),p=pe(),M=a(),{collections:d,order:h}=De(),R=n((o)=>o.sessionList),P=n((o)=>o.archivedSessions),H=n((o)=>o.sessionListLoaded),c=n((o)=>o.sessionListError),G=Me(()=>new Map([...P,...R].map((o)=>[o.sessionId,o])),[P,R]),F=I.isMac??vi(),[y,E]=L(null),[k,z]=L(""),[U,K]=L(""),[S,T]=L(null),[g,_]=L(!1),de=Se(Q(ye,{activationConstraint:{distance:5}}),Q(Ce,{coordinateGetter:we})),O=h.flatMap((o)=>d[o].collapsed?[]:d[o].sessionIds.flatMap((t)=>{let r=G.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(F?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!O[r])return;t.preventDefault(),C(O[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[O,F,C]);let me=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let J=b.type==="session"?String(b.collectionId):String(t.id);p(m({type:"move",sourceCollectionId:String(r.collectionId),collectionId:J,sessionId:String(r.sessionId),index:b.type==="session"?d[J].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==V)p(m({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},q=(o,t)=>{_(!0),p(o.then(t).finally(()=>_(!1)))};return s(ze,{children:[e(w,{children:s(N,{children:[s(f,{className:j(u,"font-normal"),onClick:()=>{E("new"),z(""),K("")},children:[e(v,{children:e(ae,{})}),e("span",{children:i("collection.newCollection")})]}),c&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>p(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:de,collisionDetection:ge,onDragEnd:me,children:e(W,{items:h,strategy:X,children:e(N,{children:h.map((o)=>e(Be,{collection:d[o],onNewChat:()=>x(o),onEdit:()=>{E(o),z(d[o].name),K(d[o].emoji??"")},onConfirm:(t)=>T({id:o,type:t}),children:e(W,{items:d[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:X,children:d[o].sessionIds.map((t)=>{let r=G.get(t);if(r?.archived)return null;if(!r)return H?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(v,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>p(m({type:"remove",sessionId:t,collectionId:o})),children:e(ce,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(Y,{open:y!==null,onOpenChange:(o)=>{if(!o&&!g)E(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(o)=>{if(o.preventDefault(),y===null||!k.trim()||g)return;let t=y==="new"?`collection-${crypto.randomUUID()}`:y;q(m([y==="new"?{type:"create",id:t,name:k}:{type:"rename",id:t,name:k},{type:"emoji",id:t,emoji:U}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(o)=>z(o.target.value),disabled:g}),y!=="new"&&e(mt,{emoji:U,onChange:K}),s(oe,{children:[e(D,{type:"button",variant:"outline",disabled:g,onClick:()=>E(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:g||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:S!==null,onOpenChange:(o)=>{if(!o&&!g)T(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:S===null?"":re(d[S.id],i)})})]}),s(oe,{children:[e(D,{variant:"outline",disabled:g,onClick:()=>T(null),children:i("collection.cancel")}),e(D,{disabled:g,onClick:()=>{if(S!==null)q(m({type:S.type,id:S.id}),()=>T(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{Xs};
|
package/dist/chunk-sjb5stzq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*_o(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 xr(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 _o(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{_o,xr};
|
package/dist/chunk-stv8pr4v.js
DELETED
package/dist/chunk-swkcmtme.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ce}from"./chunk-dr5swvaa.js";function C(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ht(e){if(!e.includes("app://"))return[];let n=Ce(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=C(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function gs(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function fs(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
-
export{C,Ht,Pa,gs,fs};
|
package/dist/chunk-sz993t5e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{x}from"./chunk-vm81n2c0.js";import{Wi,Zi,Qi,Ji}from"./chunk-dd9k5bbt.js";import{Ln,R,bt,S,wt}from"./chunk-tdvx2n5m.js";import{Bot as p}from"lucide-react";import{jsx as l}from"react/jsx-runtime";var r={"alwith-account":Wi,chatgpt:Zi,minimax:Qi,seedream:Ji};function Hi({provider:o,className:i,...a}){let e=Object.hasOwn(r,o)?r[o]:R.find((n)=>n.id===o)?.logo??p;return l(e,{"aria-hidden":"true",...a,className:["size-4 shrink-0",i].filter(Boolean).join(" ")})}var s=new Map(Ln.filter((o)=>o.source==="account").flatMap((o)=>o.models.map((i)=>[S(o.id,i.id),i.label]))),d=new Map([...Ln.map((o)=>[o.id,o.source==="account"?1:2]),[x.id,0]]);function Tn(o){return o.shortLabel??o.label}function Be(o,i={}){return o.toSorted((e,n)=>(d.get(e.id)??3)-(d.get(n.id)??3)).map((e)=>{let n=e.id===x.id;return{...e,models:e.models.map((t)=>({...t,label:s.get(t.api_id)??t.label,shortLabel:t.shortLabel??wt[t.api_id]?.shortLabel,icon:i.providerIcon?.(e.id,t.api_id)??l(Hi,{provider:n?"chatgpt":e.id==="litellm"||e.id==="alwith-managed-litellm"||bt(t.api_id)?"alwith-account":e.id})}))}})}
|
|
2
|
-
export{Hi,Tn,Be};
|
package/dist/chunk-ta6rbxh5.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ki}from"./chunk-4jp1d558.js";import{Pi}from"./chunk-81n37a11.js";import{Si}from"./chunk-x2wcwpw3.js";import{vt}from"./chunk-gttw4rmx.js";import{o}from"./chunk-73e9vpm9.js";import{e}from"./chunk-esbgn8q0.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function et(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
|
|
2
|
-
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(vt,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(ki,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function ht({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Pi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function Fe({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(et(t))return a(ht,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Si,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{et,ht,Fe};
|
package/dist/chunk-tc6d0v1y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{qi}from"./chunk-e1fzfaqj.js";import{ge}from"./chunk-30a5fgk9.js";var t={chat:qi,image:ge};function ot(n){return Object.hasOwn(t,n)}function Ge(n){if(!ot(n))throw Error(`Unsupported input mode: ${n}`);return t[n]}function ya(n){if(n===null)return"chat";let o=n.mode;if(!ot(o))throw Error(`Unsupported input mode: ${o}`);return t[o].parseConfig(n.config),o}
|
|
2
|
-
export{ot,Ge,ya};
|
package/dist/chunk-tyrzaz6c.js
DELETED
package/dist/chunk-vm81n2c0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$i,te}from"./chunk-fwqpwbd8.js";import{lo}from"./chunk-j6000jts.js";import{so}from"./chunk-eynwjzqp.js";import{An}from"./chunk-tftgnw1w.js";import{Gi,ao}from"./chunk-4sfxcw58.js";import{Bi}from"./chunk-vg9p0hvk.js";import{Mn}from"./chunk-sp2ny9ak.js";import{ge}from"./chunk-30a5fgk9.js";import{ot,Ge}from"./chunk-tc6d0v1y.js";import{co}from"./chunk-bw3bpr6m.js";import{me,Nn}from"./chunk-gwskdhaw.js";import{configRevisionOf as M,isBooleanOption as S,isGroupedSelect as v,isImage as O,isSelectOption as g,mergeMeta as f,runStateSource as R}from"@nyssance/codex-acp-v2/client";var x={id:"chatgpt",name:"ChatGPT"};function y(e){return e===null?void 0:{alwith:{model:e}}}function h(e){let s=e.find((t)=>t.category==="model"&&t.type==="select");return s?.type==="select"&&typeof s.currentValue==="string"?s.currentValue:null}class Ui extends lo{async executeShell(e,s){let t=this.session(e);if(!t.attached||t.restoring||t.readOnly||t.state!=="idle")throw Error("The session is not ready for a shell command");await this.codexCapabilities.executeShell(e,s),this.materializeDraft(e)}modelListeners=new Set;confirmedModelListeners=new Set;savedModels={main:null,chat:null};slotModels={main:null,chat:null};slotTargets={main:null,chat:null};slotVersions={main:0,chat:0};draftDirectoryIntents=new Map;draftOperations=new Map;gatewayModels=new Map;configOwners=new Map;openingOwners=new Map;schedulingConfig=new Set;replayRepairs=new Map;accountRevocations=new Map;accountRecoveries=new Map;resolveModelOption;constructor(e,s){let{resolveModel:t,imageService:i,...n}=s;super(e,n,{sessionWindows:{},draftSessions:{},modelRecovery:{},nativeModels:[]});this.resolveModelOption=t,this.imageService=i,this.imageTool=i?Bi(i,(o)=>this.imageRequests.get(o)):void 0}imageTool;imageService;inputModes=new Map;inputSelections=new Map;async readInputConfig(e){let s=this.live(),t=await s.request("_codex/session_input_config_get",{sessionId:e});if(s!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,t)}async writeInputConfig(e,s){let t=this.live(),i=await t.request("_codex/session_input_config_set",{sessionId:e,inputConfig:s});if(t!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,i)}acceptInputConfig(e,s){let t=Mn(s,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=t.inputConfig;if(i&&ot(i.mode)){if(Ge(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,ge.parseConfig(i.config))}return t}imageRequests=new Map;prompt(e,s,t={}){if(!this.imageService)return super.prompt(e,s,t);if(!this.inputModes.has(e))return this.imageService.inputMode(e).then((i)=>(this.inputModes.set(e,i),this.prompt(e,s,t)));return Ge(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageIntent:null,applicationContext:Ge("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,s,t)})}promptImage(e,s,t){if(!this.imageService)throw Error("Image service is not connected");ao(t.meta?.alwith?.imageAspectRatio);let i=t.meta?.alwith?.imageSelection;if(i!==void 0)te(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};te(o);let a=crypto.randomUUID();return this.promptImages.set(a,new Map(s.flatMap((r,c)=>O(r)?[[`attachment:${c}`,`data:${r.mimeType};base64,${r.data}`]]:[]))),super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageSelection:o,imageRequestId:a,applicationContext:ge.applicationContext(t.meta?.alwith?.imageIntent??"generate",Gi),imageIntent:t.meta?.alwith?.imageIntent??"generate"}})}).finally(()=>this.promptImages.delete(a))}promptMeta(e,s){let t=s.meta?.alwith?.imageSelection;if(this.inputModes.get(e)==="image"&&t&&this.imageService&&(this.session(e).state==="idle"||!this.imageRequests.has(e))){let i=new Map($i(this.session(e)).map((o)=>[o.id,o.src]));for(let[o,a]of this.promptImages.get((s.meta?.alwith).imageRequestId)??[])i.set(o,a);let n=ao((s.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:t,references:i,...n?{aspect:n}:{}})}return co(super.promptMeta(e,s))}promptImages=new Map;promptWithImages(e,s,t={}){return this.prompt(e,s,{...t,meta:f({alwith:{imageIntent:"generate"}},t.meta)})}async applicationToolsFor(e){let s=await super.applicationToolsFor(e),t=e.options.meta?.alwith;return[...s,...t?.nativeTools?.imageGeneration===!1&&this.imageTool?[this.imageTool]:[]]}releaseImages(e){this.imageRequests.delete(e)}onDisconnected(){for(let e of this.imageRequests.keys())this.releaseImages(e);this.promptImages.clear(),super.onDisconnected(),this.setApp({nativeModels:[]})}async cancel(e){this.releaseImages(e),await super.cancel(e)}async close(e){this.releaseImages(e),await super.close(e)}async stopSession(e){this.releaseImages(e),await super.stopSession(e)}setApp(e){this.store.setState(e)}applyRunStates(e,s="event"){let t=this.state.runStates,i=e.map((n)=>{let o=t[n.sessionId];return o&&JSON.stringify(o)===JSON.stringify(n)?o:n});if(R(t)===s&&i.length===Object.keys(t).length&&i.every((n)=>n===t[n.sessionId]))return;super.applyRunStates(i,s)}enqueueSession(e,s,t=!0){let i=!t&&!this.schedulingConfig.has(e);return super.enqueueSession(e,()=>{let n=()=>{let r=this.holds(e)?h(this.session(e).configOptions):null;return s().then(async(c)=>{if(this.holds(e)&&h(this.session(e).configOptions)!==r)await this.normalizeCustomEffort(e,!0);return c})},o=()=>{let r=i?this.normalizeCustomEffort(e,!1):void 0;return r?r.then(n):n()},a=t?void 0:this.replayRepairs.get(e)?.promise;return a?a.then(o):o()},t)}customEffortChange(e,s,t=!1,i){if(!this.holds(e))return;let n=this.session(e);if(!n.attached||n.readOnly)return;let o=h(n.configOptions),a=so(o);if(!a)return;let r=n.configOptions.find((p)=>p.category==="thought_level"&&g(p)),c,d;if(r&&g(r)){let p=v(r.options)?r.options.flatMap((l)=>l.options):r.options;if(r.currentValue===a.value||!s&&p.some((l)=>l.value===r.currentValue))return;if(!p.some((l)=>l.value===a.value))throw Error(`The model does not advertise its default effort: ${o}`);c=r.configId,d=!s&&i!==void 0&&p.some((l)=>l.value===i)?i:a.value}else{if(!a.hidden||!t||o===null)return;let p=n.configOptions.find((l)=>l.category==="model");if(!p)throw Error("The custom model has no model option");c=p.configId,d=o}return{configId:c,value:d}}normalizeCustomEffort(e,s,t=!1,i){let n=this.customEffortChange(e,s,t,i);return n?this.writeCustomEffort(e,n.configId,n.value):void 0}async writeCustomEffort(e,s,t){let i=this.live(),n=this.lifecycle.capture(e),o=await i.request("session/set_config_option",{sessionId:e,configId:s,type:"id",value:t});if(i!==this.agent||!this.lifecycle.isCurrent(n))throw Error("Effort configuration belongs to a retired session");this.publishSession({...this.session(e),configOptions:o.configOptions,configRevision:M(o)??this.session(e).configRevision})}async afterSessionCreated(e){await super.afterSessionCreated(e);try{await super.enqueueSession(e,async()=>this.normalizeCustomEffort(e,!0,!0),!1)}catch(s){try{await this.delete(e)}catch(t){throw AggregateError([s,t],"Failed to initialize and clean up the custom model session",{cause:t})}throw s}}replay(e,s,t){let i=this.replayRepairs.get(e);if(i?.cwd===s)return i.promise;let n=this.replayWithEffort(e,s,t);this.replayRepairs.set(e,{cwd:s,promise:n});let o=()=>{if(this.replayRepairs.get(e)?.promise===n)this.replayRepairs.delete(e)};return n.then(o,o),n}async replayWithEffort(e,s,t){let i=this.holds(e)?this.session(e).configOptions:[],n=i.find((a)=>a.category==="thought_level")?.currentValue;await super.replay(e,s,t);let o=this.lifecycle.capture(e);try{await this.normalizeCustomEffort(e,!1,!0,h(i)===h(this.session(e).configOptions)&&typeof n==="string"?n:void 0)}catch(a){if(this.holds(e)&&this.lifecycle.isCurrent(o))this.publishSession({...this.session(e),attached:!1,restoring:!1});throw a}}async connect(){if(await super.connect(),this.state.projectContext===null)await this.refreshProjectContext()}async listProjectSessions(e){await this.listSessions();let s=this.projectPath(e),t=this.sessionGroup({cwd:s}).id;return this.state.sessionList.filter((i)=>this.sessionGroup(i).id===t)}async newSession(e,s=null,t="main"){if(s!==null&&typeof s==="object")return super.newSession(e,s);let i=++this.slotVersions[t],n=await this.createNativeSession(e,await this.resolveModel(s),null);return this.activateSlot(t,n,i),n}async createNativeSession(e,s,t,i="chat"){let n=await super.newSession(e,{draft:t!==null,meta:f(y(s),this.imageService||t!==null?{alwith:{...this.imageService?{inputMode:i}:{},...t===null?{}:{draft:!0}}}:void 0)});if(t!==null)this.draftDirectoryIntents.set(n,e),this.setApp((o)=>({draftSessions:{...o.draftSessions,[n]:t}}));return this.noteModel(this.session(n)),n}async open(e,s,t="main"){if(typeof t!=="string")return super.open(e,s,t);if(t==="chat"&&this.imageService&&(this.inputModes.get(e)??await this.imageService.inputMode(e))==="image")throw Error("Image conversations must be opened in the main window");this.bindSlot(t,e),++this.slotVersions[t];let i=this.holds(e)?this.session(e):void 0;if(i?.attached&&(!this.imageService||this.inputModes.has(e))&&!i.restoring&&!i.readOnly&&!this.lifecycle.operations.busy(e)&&!this.replayRepairs.has(e)){this.followModel(t,i);return}await this.replayForOwner(e,s,t)}async replayForOwner(e,s,t){this.openingOwners.set(e,t);try{await this.replay(e,s)}finally{if(this.openingOwners.get(e)===t)this.openingOwners.delete(e)}}async requestContext(e,s,t){if(this.imageService){let i=s.kind==="resume"?s.sessionId:s.kind==="fork"?s.sourceSessionId:null,n=i===null?t.meta?.alwith?.inputMode??"chat":await this.imageService.inputMode(i),o=Ge(n),a=co(t.meta),r={...a?.alwith,nativeTools:o.nativeTools};delete r.tools;let c=await this.requestModelContext(e,s,{...t,meta:{...a,alwith:r}});return{...c,bind:async(d)=>{await c.bind?.(d),this.inputModes.set(d,n)}}}return this.requestModelContext(e,s,t)}async requestModelContext(e,s,t){if(s.kind!=="resume"||t.meta?.alwith?.model!==void 0)return super.requestContext(e,s,t);let i=s.sessionId,n=this.holds(i)?this.session(i):void 0,o=(n?h(n.configOptions):null)??this.gatewayModels.get(i)??null,a=await this.resolveModel(o),r=o===null?null:a;return super.requestContext(e,s,{...t,meta:f(y(r),t.meta)})}async recoverReplay(e,s,t,i){let n=me(t);if(!n&&!Nn(t))return super.recoverReplay(e,s,t,i);try{await super.afterResume(e,s,i)}catch(o){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;this.setApp((a)=>({historyPages:{...a.historyPages,[e]:{cursor:null,loading:!1,error:o instanceof Error?o.message:String(o)}}}))}if(n){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:t.reason??t.message,data:t.data},meta:null}}),!0}if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.accountRevocations.set(e,(this.accountRevocations.get(e)??0)+1),this.setApp((o)=>({modelRecovery:{...o.modelRecovery,[e]:!0}})),this.publishSession({...this.session(e),cwd:s,attached:!1,restoring:!1,readOnly:!0}),!0}markAccountModelsUnavailable(e){this.setApp((s)=>({modelRecovery:{...s.modelRecovery,...Object.fromEntries(e.map((t)=>[t,!0]))}}));for(let s of e){if(this.accountRevocations.set(s,(this.accountRevocations.get(s)??0)+1),!this.holds(s))continue;this.publishSession({...this.session(s),attached:!1,readOnly:!0})}}async resumeModel(e,s){let t=this.session(e);if(!this.state.modelRecovery[e]&&(t.attached||!me(t.error?.error)))throw Error("Model recovery is not required");if(!s)throw Error("Select a model before continuing");let i=this.accountRevocations.get(e)??0,n=await this.resolveModel(s);if(!n)throw Error("The selected provider connection or model is unavailable");if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");this.accountRecoveries.set(e,i);try{await this.replay(e,t.cwd,{meta:{alwith:{model:n,accountModelSelection:!0}}})}catch(a){if(this.holds(e)&&this.state.modelRecovery[e])this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!0});throw a}finally{this.accountRecoveries.delete(e)}if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");let o=this.session(e);if(!o.attached||o.readOnly)throw Error(o.error?.error?.message??"Cannot resume this conversation");this.accountRevocations.delete(e),this.setApp((a)=>{let{[e]:r,...c}=a.modelRecovery;return{modelRecovery:c}}),this.confirmModel(this.state.sessionWindows[e]??"main",o)}setConfig(e,s,t,i="main"){this.configOwners.set(`${e}:${s}`,i),this.schedulingConfig.add(e);try{return super.setConfig(e,s,t)}finally{this.schedulingConfig.delete(e)}}onConfigChanged(e,s,t){super.onConfigChanged(e,s,t),this.noteModel(this.session(e));let i=this.configOwners.get(`${e}:${s}`)??"main";if(this.configOwners.delete(`${e}:${s}`),t.configOptions.some((n)=>n.configId===s&&n.category==="model"))this.confirmModel(i,this.session(e))}changeDraft(e,s){let t=Promise.allSettled(e.map((i)=>this.draftOperations.get(i)).filter((i)=>i!==void 0)).then(s);for(let i of e)this.draftOperations.set(i,t);return t}prepareDraft(e,s,t=null,i=!1,n="chat"){if(e==="chat"&&n!=="chat")throw Error("The floating chat only supports chat input");let o=++this.slotVersions[e];return this.changeDraft([e],async()=>{let a=s??(await this.refreshProjectContext(!0)).chatDirectory,r=Object.keys(this.state.draftSessions).find((l)=>this.state.draftSessions[l]===e);if(r)await this.lifecycle.admission.pending(r);let c=t??(r?h(this.session(r).configOptions):this.savedModels[e]??this.slotModels[e]),d=i?null:await this.resolveModel(c,t===null?"draft":"session");if(r&&(this.inputModes.get(r)??"chat")===n&&this.session(r).cwd===a&&(!this.draftDirectoryIntents.has(r)||this.draftDirectoryIntents.get(r)===s)&&!i&&!this.state.modelRecovery[r]&&(d===null?!h(this.session(r).configOptions)?.startsWith("gateway:"):h(this.session(r).configOptions)===d)){if(this.activateSlot(e,r,o),!this.session(r).attached)await this.replayForOwner(r,a,e);if(t!==null)this.confirmModel(e,this.session(r));return r}let p=await this.createNativeSession(s,d,e,n);try{if(r&&this.session(r).cwd===a)for(let l of this.session(r).configOptions){if(l.category==="model")continue;if(l.category==="thought_level"&&h(this.session(r).configOptions)!==h(this.session(p).configOptions)&&so(h(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((w)=>w.configId===l.configId);if(!u||u.currentValue===l.currentValue)continue;if(S(l)&&S(u))await this.setConfig(p,l.configId,l.currentValue);else if(g(l)&&g(u)){if((v(u.options)?u.options.flatMap((m)=>m.options):u.options).some((m)=>m.value===l.currentValue))await this.setConfig(p,l.configId,l.currentValue)}}if(r)await this.deleteEmptyDraft(r)}catch(l){throw await this.deleteEmptyDraft(p),l}if(this.activateSlot(e,p,o),t!==null||i||c!==null&&c!==d)this.confirmModel(e,this.session(p));return p})}discardDraft(e){if(e!=="main"&&e!=="chat")return super.discardDraft(e);return this.changeDraft([e],async()=>{for(let[s,t]of Object.entries(this.state.draftSessions))if(t===e)await this.deleteEmptyDraft(s)})}transferDraft(e,s){return this.changeDraft(["main","chat"],async()=>{if(s==="chat"&&this.inputModes.get(e)==="image")throw Error("Image conversations must remain in the main window");if(!this.state.draftSessions[e]||this.state.draftSessions[e]===s)return;for(let[t,i]of Object.entries(this.state.draftSessions))if(i===s)await this.deleteEmptyDraft(t);this.setApp((t)=>t.draftSessions[e]?{draftSessions:{...t.draftSessions,[e]:s}}:{})})}deleteEmptyDraft(e){return this.enqueueSession(e,async()=>{if(!this.state.draftSessions[e])return;await this.delete(e),this.gatewayModels.delete(e)})}onDraftMaterialized(e){super.onDraftMaterialized(e),this.draftDirectoryIntents.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions;return{draftSessions:i}}),this.noteModel(this.session(e))}onSessionDropped(e){super.onSessionDropped(e),this.inputModes.delete(e),this.inputSelections.delete(e),this.draftDirectoryIntents.delete(e),this.gatewayModels.delete(e),this.accountRevocations.delete(e),this.accountRecoveries.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions,{[e]:n,...o}=s.sessionWindows,{[e]:a,...r}=s.modelRecovery;return{draftSessions:i,sessionWindows:o,modelRecovery:r}})}fork(e,s,t){let i=typeof t==="object"?t:t===void 0?{}:{lastTurnId:t};return super.fork(e,s,i)}async forkInternal(e,s,t){let n=[...(await Promise.all([this.indexSessions(),this.indexSessions(void 0,!0)])).flat(),...this.state.sessionList,...this.state.archivedSessions],o=(this.holds(e)?this.session(e).title:null)??n.find((c)=>c.sessionId===e)?.title,a=await super.forkInternal(e,s,{...t,meta:f(y(this.gatewayModels.get(e)??null),t.meta)});await super.enqueueSession(a,async()=>this.normalizeCustomEffort(a,!1,!0),!1);let r=o??this.session(a).title;if(r)await this.renameSession(a,An(r,n.flatMap((c)=>c.title?[c.title]:[])));return a}onForked(e,s){super.onForked(e,s),this.noteModel(this.session(e))}onReplayed(e,s){super.onReplayed(e,s);let t=this.accountRevocations.get(e);if(t!==void 0&&this.accountRecoveries.get(e)!==t)this.markAccountModelsUnavailable([e]);this.noteModel(this.session(e))}setModelSelections(e){this.savedModels={...e},this.slotModels={...e}}onConfirmedModel(e){return this.confirmedModelListeners.add(e),()=>this.confirmedModelListeners.delete(e)}onSessionChanged(e){super.onSessionChanged(e);let s=this.accountRevocations.get(e.id);if(s!==void 0&&this.accountRecoveries.get(e.id)!==s&&(e.attached||!e.readOnly)){this.publishSession({...e,attached:!1,readOnly:!0});return}this.followModel("main",e),this.followModel("chat",e)}followModel(e,s){if(this.slotTargets[e]!==s.id||!s.attached||s.restoring)return;let t=h(s.configOptions);if(t!==null)this.slotModels[e]=t}activateSlot(e,s,t){if(this.slotVersions[e]!==t)return;this.bindSlot(e,s),this.followModel(e,this.session(s))}bindSlot(e,s){let t=e==="main"?"chat":"main";if(this.slotTargets[t]===s)this.slotTargets[t]=null,++this.slotVersions[t];this.slotTargets[e]=s,this.setApp((i)=>({sessionWindows:{...i.sessionWindows,[s]:e}}))}confirmModel(e,s){let t=h(s.configOptions);if(t===null)throw Error("Model selection did not return the current model");this.followModel(e,s),this.savedModels[e]=t;for(let i of this.confirmedModelListeners)i(e,t)}resolveModel(e,s="session"){return this.resolveModelOption?this.resolveModelOption(e,s):Promise.resolve(e)}onSessionModel(e){return this.modelListeners.add(e),()=>this.modelListeners.delete(e)}noteModel(e){let s=h(e.configOptions);if(s===null)return;let t=e.configOptions.find((n)=>n.category==="model"&&n.type==="select");if(t&&g(t)){let o=(v(t.options)?t.options.find((a)=>a.groupId===x.id)?.options??[]:t.options.filter((a)=>!a.value.startsWith("gateway:"))).map((a)=>({id:a.value,label:a.name}));if(JSON.stringify(o)!==JSON.stringify(this.state.nativeModels))this.setApp({nativeModels:o})}let i=t!==void 0&&g(t)&&t.options.some((n)=>("groupId"in n)&&n.groupId!==x.id&&n.options.some((o)=>o.value===s));if(i)this.gatewayModels.set(e.id,s);else this.gatewayModels.delete(e.id);if(!this.state.draftSessions[e.id])for(let n of this.modelListeners)n(e.id,s,i)}}
|
|
2
|
-
export{x,Ui};
|
package/dist/chunk-vt7dkgtx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{x}from"./chunk-vm81n2c0.js";import{kt}from"./chunk-5c42mfat.js";import{e}from"./chunk-esbgn8q0.js";import{fe,S}from"./chunk-tdvx2n5m.js";import{Tn,Be}from"./chunk-sz993t5e.js";import{ze}from"./chunk-p5hk14fk.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function In({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:x.id,name:x.name,models:t===void 0?[{api_id:"",label:x.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:fe(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:S(o.id,i.id),label:i.label??i.id}))}))],p=Be(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(kt,{value:{...m,label:Tn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(ze,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
|
|
2
|
-
export{In};
|
package/dist/chunk-x3v10a71.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-73e9vpm9.js";import{e}from"./chunk-esbgn8q0.js";import{y,ee}from"./chunk-rkqptd9w.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let n=Math.min(100,a/t*100),p=n>=90?"text-destructive":n>=70?"text-foreground":"text-muted-foreground";return{pct:n,className:p}}function G(a){let t=y(a.configOptions,"model");return t===void 0?void 0:ee(t)}function nt(a,t){let n=a.windowDurationMins;if(n===null)return t("usage.usage");if(n%1440===0)return t("usage.windowDays",{count:n/1440});return t("usage.windowHours",{count:Math.round(n/60)})}function P(a){let{client:t}=e(),n=o((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!n){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[n,t]),n?p:null}function _({session:a}){let{t}=e().host,n=y(a.configOptions,"model"),p=n!==void 0&&(L(n.options)?n.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((v)=>v.value===n.currentValue)):!n.currentValue.startsWith("gateway:")&&n.options.some((i)=>i.value===n.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,x=7,b=2*Math.PI*x,h=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||h+k+g+w,R=h+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(h)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],N=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[N!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:N,children:N})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,v])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:v})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:nt(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var hn=W(_);
|
|
2
|
-
export{nt,hn};
|
package/dist/chunk-xnx8p8c0.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{fr}from"./chunk-zzjth6f2.js";import{Xi}from"./chunk-7g11pcm4.js";import{gs}from"./chunk-swkcmtme.js";import{m,_,_t}from"./chunk-ch8e8a32.js";import{Ve}from"./chunk-gs0b02g2.js";import{tr,nr,or,ir,rr}from"./chunk-hqt5j789.js";import{dr,ur}from"./chunk-ex063jn9.js";import{U}from"./chunk-xspnhgq6.js";import{fo}from"./chunk-x4jm2eh9.js";import{mo}from"./chunk-zjk12jjm.js";import{o}from"./chunk-73e9vpm9.js";import{e}from"./chunk-esbgn8q0.js";import{oo,Li}from"./chunk-nn30qzhx.js";import{io}from"./chunk-816tez3v.js";import{r,Ri,X,gn}from"./chunk-3g9n4bk2.js";import{dn}from"./chunk-j3g21ext.js";import{tt,pn}from"./chunk-3tzh25vq.js";import{vn,xn}from"./chunk-f9xtcxfb.js";import{Ni}from"./chunk-rhe4w638.js";import{Cn}from"./chunk-06wtwk7b.js";import{Ai}from"./chunk-hfghqddp.js";import{bn}from"./chunk-6j1x3gny.js";import{un}from"./chunk-g1nck6pp.js";import{Mi}from"./chunk-ynxb5xqz.js";import{Di}from"./chunk-e1zsnc8z.js";import{hn}from"./chunk-x3v10a71.js";import{hasFuzzyFileSearch as jt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as qt,useLayoutEffect as nt,useMemo as pt,useRef as k,useState as M}from"react";import{jsx as s,jsxs as R}from"react/jsx-runtime";var Gt=["image/png","image/jpeg","image/webp","image/gif"],st=[];async function Qt(n){let T=await(await fetch(n.url)).blob();return new Promise((I,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Oe({session:n,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:mt,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:Dt,attachmentPolicy:Nt,predictions:kt=!0,disabled:St=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[ut,H]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[C,Ot]=M(()=>r.get(n.id)?.attachments??st),[y,Q]=M(()=>r.get(n.id)?.mentions??[]),[d,L]=M(()=>r.get(n.id)?.apps??[]),[ft,K]=M(()=>(r.get(n.id)?.apps?.length??0)>0||U(v,n.commands.map((t)=>t.name)).length>0),W=k(void 0),z=k(void 0);nt(()=>{if(d.length>0)K(!0)},[d.length]);let ot=C.some((t)=>tt(t)&&t.pastedText.status!=="ready"),[D,ht]=M(!1),[Y,Lt]=M(!1),[it,Wt]=M(!1),at=k(null),f=k(null),gt=k(null),c=k(ut),P=w((t)=>{gt.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),xt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),$t=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,lt=`${a.slice(0,l)}${t} ${a.slice(h)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(lt),K(!0)},[P]),yt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),Ut=Mi(n,P,L,d.length>0||y.length>0||C.length>0),bt=pt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},H(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:n.id,...c.current,selection:u}}}),[n.id]),j=k(null),vt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=n.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),J=(ft||d.length>0)&&!x,b=!St&&!dt&&n.attached&&!n.restoring&&!n.readOnly,N=!n.readOnly&&(Ft||b),Z=un(n,b&&!D&&!Y&&!ot&&!it,v.length>0||C.length>0||y.length>0||d.length>0,kt&&!x),Pt=Z.invalidate;nt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,d]),nt(()=>Ri(n.id,Ot),[n.id]),nt(()=>gn(n.id,(t)=>{if(!N||D)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||d.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,N,D,v,C,y,d,P]);let It=o((t)=>jt(t.agent)),zt=pt(()=>It&&b?async(t)=>dn((await O.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[O,It,b,n.cwd]),ct=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);qt(()=>{f.current?.focus()},[]);let At=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ht(!0);let h=r.get(n.id),lt=c.current.revision,et=null;try{let A=d.map((p)=>({type:"resource_link",name:p.name,uri:`app://${p.id}`}));for(let p of y){let rt={kind:"file",absPath:p};A.push({type:"resource_link",uri:vn(rt),name:xn(rt)})}let Ct=gs(u,d);if(Ct.length>0)A.push({type:"text",text:Ct});for(let p of i)if(tt(p)){if(p.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:p.url,name:p.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Qt(p),mimeType:p.mediaType});if(c.current.revision===lt&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},et=c.current.revision,H(c.current),Q([]),L([]),W.current=void 0,z.current=void 0,X(n.id,()=>st),r.set(n.id,{text:"",attachments:st,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(p)=>{if(l.signal.aborted||j.current!==l)return;l.accept(p),S?.(n.id,p)});else if(l===null)await O.prompt(n.id,A);else{let p=await O.prompt(n.id,A);l.accept(p)}Pt();for(let p of h?.attachments??[])if(p.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((rt)=>rt.id===p.id))URL.revokeObjectURL(p.url)}catch(A){if(h&&et!==null&&c.current.revision===et&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:et+1},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(n.id,h),X(n.id,()=>h.attachments);throw A}finally{ht(!1),f.current?.focus()}},[O,n.id,n.state,y,d,T,I,S,Pt]),Bt=()=>{O.cancel(n.id).catch(B)},Ht=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Ve})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Kt=pt(()=>({session:n,ready:b,inputReady:N,sending:D,textareaRef:f,draft:bt,interruptRef:gt,observeReceipts:vt,addMention:ct,setAdding:Lt,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[n,b,N,D,bt,vt,ct,T,S,x]),wt=F.writeTextAttachment,Tt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:Ut,bashMode:I!==void 0,disabled:!N,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!J&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=_t(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=m(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(wt)pn(t,n.id,g("composer.pastedTextFilename"),wt)}};return s(io,{value:Kt,children:s("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[mt&&s("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:mt}),s(fr,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>X(n.id,()=>t),children:R("div",{ref:at,className:"relative",children:[G&&!it&&s(Xi,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>s(oo,{anchorRef:at,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!N,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>$t(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>xt(i)),focusInput:yt}),searchFiles:zt,onMention:ct,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},J?"inline":"textarea"),R(tr,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:Gt.join(","),onError:Ht,onSubmit:At,onSubmitAsync:At,onSubmitError:B,canSubmit:()=>b&&!D&&!Y&&!ot&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,R(or,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&s("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),s(Ni,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),s(ur,{children:(t)=>tt(t)?s(Ai,{data:t,sessionId:n.id}):s(dr,{data:t,t:g})})]}),R(nr,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&s("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),J?s(fo,{...Tt,skillIcon:F.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):s(mo,{...Tt,autoFocus:ft&&x})]}),s(ir,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[s(Li,{anchorRef:at,commands:n.commands,disabled:!N,agentDisabled:!b||x,agentControls:G,open:it,onOpenChange:Wt,focusInput:yt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
-
`)?i:`${i}
|
|
3
|
-
`,u=t.startsWith("$")?t:`/${t}`,l=`${a}${u} `;if(!J)z.current={text:i,apps:[]},W.current=l.length,K(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:xt}),Rt,G&&s(bn,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),R(rr,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&s(hn,{session:n}),E??s(Cn,{...q,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,s(Di,{active:V,sending:D||dt||Y,ready:b&&!ot&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:Bt})]})]})})]})]})})]})})})}
|
|
4
|
-
export{Oe};
|
package/dist/chunk-ye7ecnej.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-73e9vpm9.js";import{zn,e,b}from"./chunk-esbgn8q0.js";import{Oe}from"./chunk-xnx8p8c0.js";import{cn}from"./chunk-97pn8v17.js";import{sn}from"./chunk-fkkk1fza.js";import{an,ln}from"./chunk-m087n233.js";import{rn}from"./chunk-2aw505xv.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}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 sa({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:an},[t]);return i(zn,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r(ln,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,welcome:g,children:E,rootRef:l,search:T=!0}){let{host:d,client:A}=e(),p=S(null),R=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),y=()=>b(d,A.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:R,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:[T&&!u&&r(sn,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(x,{children:[r(k,{}),r(N,{children:n("conversation.stopped")}),r(C,{children:r(h,{size:"sm",variant:"outline",onClick:y,children:n("conversation.reconnect")})})]})}),u?g??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(cn,{session:t,timeline:m}),r(rn,{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(x,{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(N,{children:n("conversation.readOnlyTitle")}),r(C,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??r(Oe,{session:t})]}),E]})}
|
|
2
|
-
export{sa};
|