@alwith/module-chat 0.6.22 → 0.6.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/activity-host.js +1 -1
- package/dist/agent/client.d.ts +25 -9
- 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.d.ts +4 -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-0a7vp0ph.js +2 -0
- package/dist/{chunk-09w80wgb.js → chunk-0bv3tw1m.js} +2 -2
- package/dist/chunk-0j5z842s.js +4 -0
- package/dist/{chunk-x6cfmt4y.js → chunk-0jj029k8.js} +2 -2
- package/dist/{chunk-xvmmndhs.js → chunk-0s2zcz5f.js} +2 -2
- package/dist/{chunk-xdmjwqgf.js → chunk-113maskf.js} +2 -2
- package/dist/{chunk-shk5mmmw.js → chunk-18xfysvb.js} +2 -2
- package/dist/{chunk-dgh0750h.js → chunk-1d29gnb2.js} +2 -2
- package/dist/{chunk-pkkw0fxs.js → chunk-1gr60c40.js} +2 -2
- package/dist/{chunk-t3enrsnt.js → chunk-26w51q10.js} +2 -2
- package/dist/{chunk-ywwfzgm6.js → chunk-27gr882d.js} +2 -2
- package/dist/{chunk-jv117dry.js → chunk-2kbp0pbe.js} +2 -2
- package/dist/{chunk-2wdvcx76.js → chunk-2rbaebnr.js} +3 -3
- package/dist/chunk-2w4kyd2a.js +4 -0
- package/dist/chunk-2wfgbxet.js +3 -0
- package/dist/{chunk-2q20937h.js → chunk-2x5m7g33.js} +2 -2
- package/dist/chunk-3q2zdv9e.js +2 -0
- package/dist/{chunk-kawq8f1z.js → chunk-3q8vw3wb.js} +2 -2
- package/dist/{chunk-7ekex790.js → chunk-3qy743j9.js} +3 -3
- package/dist/{chunk-jg4c3zg4.js → chunk-3tvq6xr2.js} +2 -2
- package/dist/chunk-3zsqg6wr.js +3 -0
- package/dist/{chunk-p521krn5.js → chunk-44r55va6.js} +2 -2
- package/dist/chunk-4cr144a7.js +2 -0
- package/dist/{chunk-8zrmp6dw.js → chunk-4e622bdk.js} +3 -3
- package/dist/{chunk-6cxa2jrx.js → chunk-4gftpery.js} +2 -2
- package/dist/{chunk-76r5v06g.js → chunk-4t0f01ec.js} +2 -2
- package/dist/{chunk-05eftctr.js → chunk-4vayk46h.js} +2 -2
- package/dist/{chunk-m9s9etss.js → chunk-51x80v4h.js} +2 -2
- package/dist/{chunk-x785yg93.js → chunk-52wrk1mh.js} +2 -2
- package/dist/{chunk-69eysg08.js → chunk-5c42mfat.js} +2 -2
- package/dist/{chunk-6j2q7qvk.js → chunk-5m2ydb9j.js} +2 -2
- package/dist/chunk-621eg04b.js +2 -0
- package/dist/{chunk-7n1v87h0.js → chunk-64apxzn7.js} +2 -2
- package/dist/chunk-6bbtfd0j.js +2 -0
- package/dist/{chunk-vtw1zmyd.js → chunk-6f06hbsk.js} +2 -2
- package/dist/{chunk-ckdkm4n7.js → chunk-6p4gk1zy.js} +2 -2
- package/dist/chunk-6qxd4jg9.js +2 -0
- package/dist/{chunk-nm8245ze.js → chunk-6z3fgkkp.js} +2 -2
- package/dist/{chunk-127rz9fe.js → chunk-7jk8s061.js} +2 -2
- package/dist/{chunk-egw95b1p.js → chunk-7m83dwzq.js} +2 -2
- package/dist/{chunk-bm1x011j.js → chunk-7tw7rn0m.js} +2 -2
- package/dist/{chunk-qbt8ahwr.js → chunk-809b75k1.js} +2 -2
- package/dist/{chunk-xmr3vcp8.js → chunk-84p483n0.js} +2 -2
- package/dist/{chunk-nefts0rn.js → chunk-84zzf0ys.js} +2 -2
- package/dist/{chunk-mptke00a.js → chunk-88ysxbdh.js} +2 -2
- package/dist/{chunk-9ys14ex1.js → chunk-89j37t04.js} +3 -3
- package/dist/{chunk-gzf6kzm0.js → chunk-8f5w2tnp.js} +2 -2
- package/dist/{chunk-mfs0b15q.js → chunk-8hygfx41.js} +2 -2
- package/dist/chunk-8qszap2n.js +2 -0
- package/dist/{chunk-9q5a0kwf.js → chunk-91kpcajz.js} +2 -2
- package/dist/chunk-952vsa4r.js +4 -0
- package/dist/chunk-9w1vcmbd.js +2 -0
- package/dist/chunk-a6ns5agq.js +2 -0
- package/dist/{chunk-dps8nnde.js → chunk-ad53zbdb.js} +2 -2
- package/dist/chunk-an3nh155.js +2 -0
- package/dist/chunk-ar1bwfn3.js +2 -0
- package/dist/{chunk-2w0grrzz.js → chunk-arm9x6kc.js} +2 -2
- package/dist/chunk-ax7c2kam.js +2 -0
- package/dist/{chunk-ygjcmhng.js → chunk-b6sfe0k7.js} +2 -2
- package/dist/{chunk-m0rznqwx.js → chunk-bcdmjgab.js} +2 -2
- package/dist/{chunk-mvebg1n7.js → chunk-beccgzp9.js} +2 -2
- package/dist/{chunk-7e9s642q.js → chunk-bf7sgpzq.js} +2 -2
- package/dist/{chunk-6cks2gn2.js → chunk-bgnxw313.js} +2 -2
- package/dist/{chunk-w308wr7v.js → chunk-brv52tgj.js} +2 -2
- package/dist/chunk-bve6cykn.js +2 -0
- package/dist/chunk-bw1m6407.js +2 -0
- package/dist/{chunk-fdmtynmq.js → chunk-bw3bpr6m.js} +2 -2
- package/dist/chunk-byvw0vam.js +2 -0
- package/dist/chunk-c06k7g9n.js +2 -0
- package/dist/{chunk-10ar0368.js → chunk-c13rnm7b.js} +2 -2
- package/dist/chunk-c2ez86jz.js +2 -0
- package/dist/{chunk-1dkd8jt0.js → chunk-c2r7xpjf.js} +2 -2
- package/dist/{chunk-6hgcxkwd.js → chunk-cf85zhvf.js} +2 -2
- package/dist/{chunk-2gp33sx4.js → chunk-cq3j51m2.js} +2 -2
- package/dist/chunk-d06382wz.js +2 -0
- package/dist/chunk-d0nrbf80.js +2 -0
- package/dist/{chunk-acprqt2h.js → chunk-d0s10qy5.js} +2 -2
- package/dist/{chunk-nrk4aa7a.js → chunk-dba0ttve.js} +2 -2
- package/dist/{chunk-g98m1se7.js → chunk-dheg4bs2.js} +2 -2
- package/dist/{chunk-rv3gpjgk.js → chunk-dnrcx75n.js} +2 -2
- package/dist/{chunk-bbwxqt7p.js → chunk-dr5swvaa.js} +2 -2
- package/dist/{chunk-rr2cjfcz.js → chunk-dxwbgg69.js} +2 -2
- package/dist/{chunk-zr6xrady.js → chunk-e00dz09f.js} +2 -2
- package/dist/{chunk-zsbsypka.js → chunk-e13mpwt8.js} +2 -2
- package/dist/chunk-e1fzfaqj.js +2 -0
- package/dist/{chunk-ky2p8zyg.js → chunk-e3bpr3yx.js} +2 -2
- package/dist/chunk-e8p4wkbg.js +2 -0
- package/dist/{chunk-v77kjbkb.js → chunk-ee7a5gft.js} +2 -2
- package/dist/{chunk-4cnm37fs.js → chunk-er7ewrf2.js} +3 -3
- package/dist/{chunk-zq7p8m7g.js → chunk-ert67qk1.js} +2 -2
- package/dist/{chunk-q6f0e289.js → chunk-etvdqkvb.js} +2 -2
- package/dist/{chunk-b17rwepe.js → chunk-f54k9xxv.js} +2 -2
- package/dist/chunk-f7d0hs1y.js +2 -0
- package/dist/{chunk-jzqvhnq5.js → chunk-ftsnryz8.js} +2 -2
- package/dist/{chunk-5r5dc363.js → chunk-fwghjmd1.js} +2 -2
- package/dist/{chunk-nvh0e8y1.js → chunk-fyxetwxv.js} +2 -2
- package/dist/{chunk-3rew4bcf.js → chunk-g4qwh2sx.js} +2 -2
- package/dist/chunk-gdtpwbqn.js +1 -0
- package/dist/{chunk-29jan02g.js → chunk-gpv1dc5y.js} +2 -2
- package/dist/{chunk-z0z3xfn3.js → chunk-gttw4rmx.js} +3 -3
- package/dist/{chunk-dq7zxw47.js → chunk-gxb9n7g7.js} +4 -4
- package/dist/{chunk-yqjmqa0t.js → chunk-gxx5yh45.js} +2 -2
- package/dist/{chunk-fgec4g5x.js → chunk-h5mdgrq6.js} +2 -2
- package/dist/{chunk-cbx30sf1.js → chunk-h82jte5p.js} +2 -2
- package/dist/{chunk-yk72yvcd.js → chunk-ha9n1k24.js} +2 -2
- package/dist/{chunk-xtn9bw6a.js → chunk-hmy4snze.js} +2 -2
- package/dist/{chunk-8ysh4mx1.js → chunk-hyhp5ytm.js} +2 -2
- package/dist/{chunk-71fhan3p.js → chunk-j1frpcqd.js} +2 -2
- package/dist/{chunk-37p8zdb1.js → chunk-j2k2mc13.js} +2 -2
- package/dist/chunk-j5dqww4h.js +2 -0
- package/dist/{chunk-6qh7fvgs.js → chunk-ja7x2gvb.js} +3 -3
- package/dist/{chunk-7narmchf.js → chunk-jgqt7k0h.js} +2 -2
- package/dist/{chunk-pphkxw72.js → chunk-jn8b4qrh.js} +2 -2
- package/dist/{chunk-z90zckkv.js → chunk-jp4xjks0.js} +2 -2
- package/dist/chunk-jv327stj.js +2 -0
- package/dist/{chunk-2y13vckf.js → chunk-jy0jrht0.js} +2 -2
- package/dist/{chunk-00vd1yaz.js → chunk-jzbg0cx9.js} +2 -2
- package/dist/chunk-k2nbrerw.js +2 -0
- package/dist/{chunk-k86843av.js → chunk-k5nd3vyq.js} +2 -2
- package/dist/chunk-k7z0pgrt.js +2 -0
- package/dist/chunk-kbax1frf.js +2 -0
- package/dist/{chunk-gjdeaqy2.js → chunk-khs8cfkd.js} +2 -2
- package/dist/chunk-knxes674.js +2 -0
- package/dist/{chunk-96wvztgv.js → chunk-kvc3ghat.js} +2 -2
- package/dist/{chunk-mch9hd8q.js → chunk-m0r0v983.js} +5 -5
- package/dist/{chunk-yey8qz6h.js → chunk-m799f2x5.js} +2 -2
- package/dist/{chunk-eraepgrh.js → chunk-ma7thf1j.js} +2 -2
- package/dist/{chunk-m08yer2f.js → chunk-masqfje4.js} +2 -2
- package/dist/{chunk-kj3re492.js → chunk-mc21sg7m.js} +2 -2
- package/dist/{chunk-f7bn0nd2.js → chunk-mvnze5ts.js} +2 -2
- package/dist/{chunk-dav36sjv.js → chunk-myjsfbp6.js} +2 -2
- package/dist/chunk-n32wra9r.js +2 -0
- package/dist/{chunk-0k6zg9s1.js → chunk-n6erf29r.js} +2 -2
- package/dist/chunk-n7y094nf.js +2 -0
- package/dist/chunk-na6b1fpn.js +2 -0
- package/dist/{chunk-b1yfr8gv.js → chunk-ncgwbdmj.js} +2 -2
- package/dist/{chunk-vkfz61d6.js → chunk-ne4b53kn.js} +2 -2
- package/dist/chunk-nfwa8qkt.js +2 -0
- package/dist/{chunk-pae53dz2.js → chunk-npkk2gzs.js} +2 -2
- package/dist/{chunk-ws4qt1sc.js → chunk-nqt9gyz9.js} +2 -2
- package/dist/{chunk-d7kcgxa2.js → chunk-nrpgmawz.js} +2 -2
- package/dist/chunk-nwyem2d7.js +3 -0
- package/dist/{chunk-e8dzp9xe.js → chunk-p3gawvqr.js} +2 -2
- package/dist/{chunk-nase48et.js → chunk-pqz2471h.js} +2 -2
- package/dist/{chunk-rcfjwyt4.js → chunk-pw22g3k1.js} +2 -2
- package/dist/{chunk-k025mmnv.js → chunk-pxr5snwm.js} +2 -2
- package/dist/chunk-pxv38ttf.js +2 -0
- package/dist/chunk-q1kb5z75.js +2 -0
- package/dist/chunk-q7jm6srr.js +2 -0
- package/dist/chunk-q9b2wsdg.js +2 -0
- package/dist/{chunk-d4edqxgc.js → chunk-qk1yqepm.js} +2 -2
- package/dist/chunk-r940xwxq.js +2 -0
- package/dist/chunk-rd9cgt8p.js +2 -0
- package/dist/chunk-rragk2vb.js +2 -0
- package/dist/chunk-rv3k0kfr.js +2 -0
- package/dist/{chunk-2b7fjev1.js → chunk-ry7bxdb6.js} +2 -2
- package/dist/chunk-s1nfyggb.js +2 -0
- package/dist/chunk-sjb5stzq.js +2 -0
- package/dist/{chunk-xde2hdrb.js → chunk-sjm9p42x.js} +2 -2
- package/dist/chunk-sn3sk1j0.js +2 -0
- package/dist/{chunk-j8jn2p7q.js → chunk-snrbgnwn.js} +1 -1
- package/dist/chunk-sqkdenb0.js +3 -0
- package/dist/chunk-stse5bdv.js +2 -0
- package/dist/chunk-stv8pr4v.js +2 -0
- package/dist/{chunk-vxkkzs4m.js → chunk-swqbbw8q.js} +2 -2
- package/dist/{chunk-atdygnc5.js → chunk-sxz82jq3.js} +2 -2
- package/dist/chunk-tc80kegm.js +2 -0
- package/dist/chunk-tcg99k9e.js +2 -0
- package/dist/{chunk-xnj05nc3.js → chunk-tcp7c2s0.js} +3 -3
- package/dist/{chunk-9bk8tg2w.js → chunk-vev9q4t4.js} +3 -3
- package/dist/{chunk-cxd1bwe7.js → chunk-vfszr27e.js} +2 -2
- package/dist/{chunk-ehp3p3t5.js → chunk-vhxavb92.js} +2 -2
- package/dist/{chunk-y3e10q18.js → chunk-vnwt4f99.js} +2 -2
- package/dist/{chunk-322m8vk4.js → chunk-vyzq2pbd.js} +2 -2
- package/dist/chunk-w5q2ygsa.js +2 -0
- package/dist/{chunk-484wg46e.js → chunk-w63mha8c.js} +2 -2
- package/dist/{chunk-r9vjpafx.js → chunk-wk26bzjj.js} +3 -3
- package/dist/{chunk-q16yvbsg.js → chunk-wm6zdp7w.js} +2 -2
- package/dist/{chunk-2a6bv4xm.js → chunk-wpacvdsv.js} +2 -2
- package/dist/chunk-x1aw1r1v.js +2 -0
- package/dist/{chunk-8jqaahna.js → chunk-x2wcwpw3.js} +2 -2
- package/dist/{chunk-0y8pnj16.js → chunk-x49qjrbk.js} +2 -2
- package/dist/{chunk-wsz4dh6m.js → chunk-x8rfc6wc.js} +3 -3
- package/dist/{chunk-s5fk9ywy.js → chunk-xpfy5g6z.js} +2 -2
- package/dist/{chunk-vvpagkya.js → chunk-xqb4thy8.js} +2 -2
- package/dist/chunk-xvg3d2z6.js +7 -0
- package/dist/{chunk-xj2qfepx.js → chunk-xx7t8r87.js} +2 -2
- package/dist/{chunk-tp7329ny.js → chunk-y3mx5sf0.js} +2 -2
- package/dist/{chunk-pvdm1v6g.js → chunk-yj42tq3z.js} +2 -2
- package/dist/chunk-yn6a84c7.js +2 -0
- package/dist/{chunk-r67qt2tt.js → chunk-yq4wz4n8.js} +2 -2
- package/dist/{chunk-hhnxwgz5.js → chunk-yryg27yy.js} +2 -2
- package/dist/chunk-ytdhstqx.js +2 -0
- package/dist/{chunk-nbch7nw2.js → chunk-z107z7dt.js} +2 -2
- package/dist/{chunk-wjazfhrm.js → chunk-z6x70w62.js} +2 -2
- package/dist/{chunk-jwsgt0d9.js → chunk-z76as4dt.js} +2 -2
- package/dist/chunk-zft4afb8.js +2 -0
- package/dist/{chunk-8x33007g.js → chunk-zgqrv879.js} +3 -3
- package/dist/chunk-zj7kjjdj.js +2 -0
- package/dist/chunk-zq26pxze.js +2 -0
- package/dist/{chunk-ggad6492.js → chunk-zv3bm3np.js} +2 -2
- package/dist/{chunk-hb22jn2e.js → chunk-zxfx7psd.js} +2 -2
- package/dist/chunk-zxkpemh4.js +2 -0
- package/dist/{chunk-v3dp0ay9.js → chunk-zyn0ys4m.js} +2 -2
- package/dist/client.d.ts +1 -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/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/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/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/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/pointer-centered-zoom.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.d.ts +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.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.d.ts +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/overflow-marquee.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/darwin-arm64/artifact.json +1 -1
- package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -7
- package/dist/agent/application-client.d.ts +0 -30
- package/dist/agent/application-client.js +0 -1
- package/dist/chunk-03mdvw7w.js +0 -2
- package/dist/chunk-04778wzq.js +0 -2
- package/dist/chunk-0ppwk6y9.js +0 -2
- package/dist/chunk-0yngh0w6.js +0 -2
- package/dist/chunk-1fnfd1yv.js +0 -2
- package/dist/chunk-1jd0p7b8.js +0 -2
- package/dist/chunk-2jkv90n6.js +0 -2
- package/dist/chunk-3c9se1ha.js +0 -2
- package/dist/chunk-3zr6f9nd.js +0 -4
- package/dist/chunk-43s8pmw9.js +0 -2
- package/dist/chunk-4r8pqg1h.js +0 -2
- package/dist/chunk-52y91amb.js +0 -2
- package/dist/chunk-5s0k93vr.js +0 -3
- package/dist/chunk-6aj4cgfs.js +0 -2
- package/dist/chunk-723kazw5.js +0 -2
- package/dist/chunk-79qh74jn.js +0 -2
- package/dist/chunk-7kxa1krk.js +0 -2
- package/dist/chunk-7xszqjre.js +0 -2
- package/dist/chunk-8at6403h.js +0 -2
- package/dist/chunk-90mq5g5a.js +0 -1
- package/dist/chunk-aazp5pw2.js +0 -2
- package/dist/chunk-adnpp676.js +0 -3
- package/dist/chunk-b5afm26d.js +0 -2
- package/dist/chunk-bbpjhe4e.js +0 -2
- package/dist/chunk-br1vyrce.js +0 -2
- package/dist/chunk-cc8cg69z.js +0 -4
- package/dist/chunk-csw1rzrc.js +0 -2
- package/dist/chunk-fdqfbhwd.js +0 -2
- package/dist/chunk-fjr7n326.js +0 -2
- package/dist/chunk-fwk2ayca.js +0 -2
- package/dist/chunk-g9vjpmrq.js +0 -2
- package/dist/chunk-gh1jdr70.js +0 -2
- package/dist/chunk-j420zak2.js +0 -2
- package/dist/chunk-mz8tjgre.js +0 -2
- package/dist/chunk-n2gm013f.js +0 -2
- package/dist/chunk-na5pcj57.js +0 -2
- package/dist/chunk-nvv8aheh.js +0 -2
- package/dist/chunk-nxnzrbrc.js +0 -2
- package/dist/chunk-pwsqw3mx.js +0 -2
- package/dist/chunk-q2v4hre7.js +0 -2
- package/dist/chunk-qhes5k0g.js +0 -2
- package/dist/chunk-qhj8374f.js +0 -2
- package/dist/chunk-rnxbtzg9.js +0 -2
- package/dist/chunk-rpzv6g89.js +0 -2
- package/dist/chunk-rqck9w0f.js +0 -2
- package/dist/chunk-sm16wn9x.js +0 -2
- package/dist/chunk-swq34ay7.js +0 -2
- package/dist/chunk-t12xpbtp.js +0 -3
- package/dist/chunk-t4vfpx6a.js +0 -2
- package/dist/chunk-t6z3khr5.js +0 -2
- package/dist/chunk-tac30kkh.js +0 -2
- package/dist/chunk-tdw5wrey.js +0 -2
- package/dist/chunk-thxz5zm6.js +0 -2
- package/dist/chunk-tvfmbabv.js +0 -2
- package/dist/chunk-twrdy8cb.js +0 -2
- package/dist/chunk-tz1redf7.js +0 -3
- package/dist/chunk-tzr6phth.js +0 -2
- package/dist/chunk-v066qn38.js +0 -2
- package/dist/chunk-v2m44e5f.js +0 -2
- package/dist/chunk-x5cv0bfc.js +0 -4
- package/dist/chunk-xdrwsxqy.js +0 -2
- package/dist/chunk-xx0hs7b3.js +0 -2
- package/dist/chunk-yaxe4yd4.js +0 -2
- package/dist/chunk-yfnnrm9g.js +0 -7
- package/dist/chunk-zfsbhwe1.js +0 -2
- package/dist/import.d.ts +0 -1
- package/dist/import.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ki,Un,Bn,Gn,zn,Wi,Zi,Qi,Ji}from"../chunk-jzbg0cx9.js";export{Wi as AlwithAccountLogo,Zi as ChatGPTLogo,Ki as ClaudeLogo,Un as DeepSeekLogo,Bn as GrokLogo,Qi as MiniMaxLogo,Gn as OpenRouterLogo,zn as QwenLogo,Ji as SeedreamLogo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ai,Ws,li,ci,di,Yn}from"../chunk-2rbaebnr.js";import"../chunk-5m2ydb9j.js";import"../chunk-wm6zdp7w.js";import"../chunk-sqkdenb0.js";import"../chunk-0s2zcz5f.js";import"../chunk-x2wcwpw3.js";import"../chunk-q9b2wsdg.js";import"../chunk-809b75k1.js";import"../chunk-gttw4rmx.js";import"../chunk-gxx5yh45.js";import"../chunk-w5q2ygsa.js";import"../chunk-m799f2x5.js";import"../chunk-npkk2gzs.js";import"../chunk-c2r7xpjf.js";import"../chunk-jzbg0cx9.js";import"../chunk-n32wra9r.js";import"../chunk-rragk2vb.js";import"../chunk-c13rnm7b.js";export{Yn as CustomProviderEditor,ai as ManagedProviderSection,di as ProviderRow,Ws as ProviderSection,li as ProviderTabs,ci as TestFeedback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fi,Oi,Pn,fa,In,Ue}from"../chunk-m799f2x5.js";import"../chunk-npkk2gzs.js";import"../chunk-c2r7xpjf.js";import"../chunk-jzbg0cx9.js";export{Fi as PROVIDERS_CHANGED,Oi as PROVIDERS_REVOKED,In as applyProvidersWhenIdle,fa as createManagedProvidersPort,Pn as createProvidersPort,Ue as useProviders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{R,bt,Ct,he,S,ya,se,Fn,On,xa,wt,ba}from"../chunk-c2r7xpjf.js";import"../chunk-jzbg0cx9.js";export{wt as MODEL_PRESENTATION,R as PROVIDERS,xa as customModelEffort,S as gatewayModelId,bt as isAccountModel,Ct as parseCustomModels,ba as presentModel,On as providerApplicationPending,he as providerGroups,Fn as providerKeyUrl,se as providerRegion,ya as resolveSessionModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$s,qs,Ks}from"../chunk-3q8vw3wb.js";export{$s as codexSettingsBridge,Ks as createSettingsBridgeClient,qs as serveSettingsBridge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$s,qs,Ks}from"../chunk-3q8vw3wb.js";import"../chunk-q9b2wsdg.js";import"../chunk-0s2zcz5f.js";import"../chunk-809b75k1.js";import"../chunk-x2wcwpw3.js";import"../chunk-gttw4rmx.js";import"../chunk-c13rnm7b.js";import"../chunk-rragk2vb.js";import"../chunk-n32wra9r.js";import"../chunk-sqkdenb0.js";import"../chunk-w5q2ygsa.js";import"../chunk-gxx5yh45.js";import{Jt}from"../chunk-wm6zdp7w.js";import{Zt,ui,Qt}from"../chunk-5m2ydb9j.js";import{Un,Bn,Gn,zn}from"../chunk-jzbg0cx9.js";import{R,bt,Ct,he,S,ya,se,Fn,On,xa,wt,ba}from"../chunk-c2r7xpjf.js";import"../chunk-npkk2gzs.js";import{Fi,Oi,Pn,fa,In,Ue}from"../chunk-m799f2x5.js";import{ai,Ws,li,ci,di,Yn}from"../chunk-2rbaebnr.js";import{pt,Xt,Yt}from"../chunk-bgnxw313.js";import{Zs}from"../chunk-mc21sg7m.js";export{Qt as CodexAccountCard,ui as CodexAccountSummary,Yn as CustomProviderEditor,Un as DeepSeekLogo,Bn as GrokLogo,Jt as LoginCard,pt as MODEL_ALIASES_KEY,wt as MODEL_PRESENTATION,ai as ManagedProviderSection,Zs as ModelAliasSettings,Gn as OpenRouterLogo,R as PROVIDERS,Fi as PROVIDERS_CHANGED,Oi as PROVIDERS_REVOKED,di as ProviderRow,Ws as ProviderSection,li as ProviderTabs,zn as QwenLogo,ci as TestFeedback,Zt as UsageLimitRow,In as applyProvidersWhenIdle,$s as codexSettingsBridge,fa as createManagedProvidersPort,Pn as createProvidersPort,Ks as createSettingsBridgeClient,xa as customModelEffort,S as gatewayModelId,bt as isAccountModel,Ct as parseCustomModels,ba as presentModel,On as providerApplicationPending,he as providerGroups,Fn as providerKeyUrl,se as providerRegion,ya as resolveSessionModel,Yt as saveModelAlias,qs as serveSettingsBridge,Xt as useModelAliases,Ue as useProviders};
|
|
Binary file
|
|
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.25",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -308,11 +308,6 @@
|
|
|
308
308
|
"import": "./dist/client.js",
|
|
309
309
|
"default": "./dist/client.js"
|
|
310
310
|
},
|
|
311
|
-
"./import": {
|
|
312
|
-
"types": "./dist/import.d.ts",
|
|
313
|
-
"import": "./dist/import.js",
|
|
314
|
-
"default": "./dist/import.js"
|
|
315
|
-
},
|
|
316
311
|
"./stage": {
|
|
317
312
|
"types": "./dist/stage.d.ts",
|
|
318
313
|
"import": "./dist/stage.js",
|
|
@@ -411,7 +406,7 @@
|
|
|
411
406
|
"@dnd-kit/sortable": "^10.0.0",
|
|
412
407
|
"@dnd-kit/utilities": "^3.2.2",
|
|
413
408
|
"@floating-ui/dom": "^1.8.0",
|
|
414
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
409
|
+
"@nyssance/codex-acp-v2": "^0.7.75",
|
|
415
410
|
"@nyssance/shadcn": "^4.23.4",
|
|
416
411
|
"@shadcn/react": "^0.3.1",
|
|
417
412
|
"@solar-icons/react": "^2.6.0",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Agent, type AgentRequest, type AppsInstalledParams, type ClientOptions as AdapterOptions, CodexClient as AdapterClient, type CodexClientState, type SessionOperation, type SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
|
|
2
|
-
import { type ApplicationTools, type ApplicationToolSelection } from "../application-tools";
|
|
3
|
-
export type ClientOptions = AdapterOptions & {
|
|
4
|
-
applicationTools?: ApplicationTools;
|
|
5
|
-
};
|
|
6
|
-
export declare class ApplicationClient<State extends CodexClientState = CodexClientState> extends AdapterClient<State> {
|
|
7
|
-
private readonly applicationRegistry;
|
|
8
|
-
private readonly toolSelection;
|
|
9
|
-
constructor(openPort: ConstructorParameters<typeof AdapterClient>[0], options: ClientOptions, extraState?: Omit<State, keyof CodexClientState>);
|
|
10
|
-
protected applicationToolsFor(selection: ApplicationToolSelection): Promise<readonly import("../application-tools").ApplicationTool[]> | readonly import("../application-tools").ApplicationTool[];
|
|
11
|
-
protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<AdapterClient<State>["requestContext"]>;
|
|
12
|
-
protected acceptsPendingRequest(request: AgentRequest): boolean;
|
|
13
|
-
protected handleNotification(method: string, params: unknown): boolean;
|
|
14
|
-
protected handleAgentRequest(agent: Agent, request: AgentRequest): boolean;
|
|
15
|
-
protected onDisconnected(): void;
|
|
16
|
-
protected onSessionDropped(id: string): void;
|
|
17
|
-
cancel(id: string): Promise<void>;
|
|
18
|
-
close(id: string): Promise<void>;
|
|
19
|
-
stopSession(id: string): Promise<void>;
|
|
20
|
-
installedApps(params?: AppsInstalledParams): Promise<{
|
|
21
|
-
apps: {
|
|
22
|
-
id: string;
|
|
23
|
-
runtimeName: string | null;
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
callable: boolean;
|
|
26
|
-
iconUrl?: string | null | undefined;
|
|
27
|
-
iconUrlDark?: string | null | undefined;
|
|
28
|
-
}[];
|
|
29
|
-
}>;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ho}from"../chunk-pwsqw3mx.js";import"../chunk-dps8nnde.js";import"../chunk-nm8245ze.js";export{ho as ApplicationClient};
|
package/dist/chunk-03mdvw7w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-xdrwsxqy.js";import{ft}from"./chunk-yfnnrm9g.js";import{wi}from"./chunk-acprqt2h.js";import{R}from"./chunk-6cxa2jrx.js";import{so}from"./chunk-zq7p8m7g.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as E}from"react/jsx-runtime";function C({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(R,{block:e.content},`${n.id}:${l}`))]})}var io=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(so),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...wi(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(E,{children:[s(ft,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(C,{item:o},o.id))]})});
|
|
2
|
-
export{io};
|
package/dist/chunk-04778wzq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ht}from"./chunk-69eysg08.js";import{n}from"./chunk-xdrwsxqy.js";import{e,w}from"./chunk-tac30kkh.js";import{ee,C,te}from"./chunk-2jkv90n6.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:b,defaultGroup:I={id:"models",name:"Models"},catalog:x=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=n((o)=>Boolean(o.configPending[l])),p=F({sessionId:l,model:!0}),O=P&&(p.current.sessionId!==l||p.current.model),k=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=C(u,"model"),a=C(u,"thought_level"),v=u.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),_=v.filter(A),m=v.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(o,r)=>{if(r===o.currentValue)return Promise.resolve();p.current={sessionId:l,model:o===t};let d=b?b(o.configId,r):N.setConfig(l,o.configId,r);return w(c,d),d},g=a?ee(a):[],z=g.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),R=t?te(t):i("composer.model"),S=(o)=>({api_id:o.value,label:o.name}),V=x(t&&q(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(S)})):[{...I,models:t?ee(t).map(S):[]}]),y=V.flatMap((o)=>o.models),M=y.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return B(ht,{disabled:G||O||k,switching:O,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:y,showModelList:Boolean(t),onChange:(o)=>{if(o.api_id===t?.currentValue)return;if(h)h(o.api_id);else if(t)f(t,o.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:(o)=>f(a,o)}:void 0,selectOptions:_.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:ee(o).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(o,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((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:m.find((E)=>E.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);f(d,r)}})}var Qt=D(H);
|
|
2
|
-
export{Qt};
|
package/dist/chunk-0ppwk6y9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Nr}from"./chunk-pkkw0fxs.js";import{e,w}from"./chunk-tac30kkh.js";import{ee,C}from"./chunk-2jkv90n6.js";import{createLucideIcon as k,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":y,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=e(),{t:r}=l,s=C(m,"mode");if(!s)return null;let o=s.currentValue,p=ee(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),h=p.find((n)=>n.value===o),M=d[o]??a,I=(n)=>{if(n===o)return;w(l,c?c(s.configId,n):f.setConfig(u,s.configId,n))};return t(Nr,{value:o,warning:o==="agent-full-access",currentName:h?.name??o,icon:t(M,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:g,label:r("composer.switchPermissionMode"),onValueChange:I,options:p.map((n)=>{let i=d[n.value]??a,v=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":v?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Zt=O(N);
|
|
2
|
-
export{Zt};
|
package/dist/chunk-0yngh0w6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s}from"./chunk-tzr6phth.js";import{Wn}from"./chunk-z90zckkv.js";import{U}from"./chunk-mfs0b15q.js";import{Kn,Ge}from"./chunk-t6z3khr5.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as E}from"lucide-react";import{useEffect as g,useState as A}from"react";import{Input as D}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as w}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function Ht(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Be({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Ge(),y=Kn();g(()=>{f(n)},[n,f]);let[I,p]=A(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?Ht(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Wn,{title:n?o(D,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(U,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(E,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(w,{}),a]}):void 0})}
|
|
2
|
-
export{Ht,Be};
|
package/dist/chunk-1fnfd1yv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createStore as I}from"@alwith/api/client";function k(t){return t instanceof Error?t.message:String(t)}function R(t){return t.interface?.displayName??t.name}function v(t){let u={},i=new Map,l=new Map;for(let c of t.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let m=u[c.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[c.cwd]=m}for(let o of c.errors)l.set(o.path,o)}return{skills:[...i.values()],errors:[...l.values()],projects:u}}function A(t){let u=[];for(let i of t.marketplaces)for(let l of i.plugins)if(l.installed)u.push({plugin:l,marketplace:i});return u.toSorted((i,l)=>(l.plugin.installedAt??0)-(i.plugin.installedAt??0))}function jr(t){let{plugin:u,marketplace:i}=t;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?u.remotePluginId??u.name:u.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(t){let{plugin:u,marketplace:i}=t;return{pluginName:i.path===null?u.remotePluginId??u.name:u.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function Pn(t,u){let i=u??{t:(e)=>e},l=(e,r)=>i.t(e,r),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},m=null,b=null,g=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>g((n)=>{let s={...n.busyIds};if(r===null)delete s[e];else s[e]=r;return{busyIds:s}}),h=(e,r)=>g((n)=>{let s={...n.busyMarketplaces};if(r)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),M=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{let n=r.forceRefetch===!0||m?.forceRefetch===!0,s=r.catalog!==!1||n||m?.catalog===!0;if(m={cwds:e,forceRefetch:n,catalog:s},g({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let a=m;m=null,g({error:null});try{let[d,p,E]=await Promise.all([t.listSkills(a.cwds,a.forceRefetch),a.catalog?t.listPlugins({...a.cwds.length>0?{cwds:a.cwds}:{},...a.forceRefetch?{forceRefetch:!0}:{}}):null,t.installedPlugins(a.cwds)]);if(m)continue;let w=v(d);g({loadedScope:JSON.stringify(a.cwds),skills:w.skills,skillProjects:w.projects,skillErrors:w.errors,...p?{marketplaces:p.marketplaces,marketplaceLoadErrors:p.marketplaceLoadErrors,featuredPluginIds:p.featuredPluginIds}:{},installed:A(E)})}catch(d){if(!m)g({error:k(d)})}}})().finally(()=>{b=null,g({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=R(e.plugin);f(e.plugin.id,"installing");try{let n=await t.installPlugin(jr(e));return await y(),f(e.plugin.id,null),c(l("plugins.toast.installed",{pluginName:r})),n}catch(n){throw o(`${l("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let n=(a)=>g((d)=>({installed:d.installed.map((p)=>p.plugin.id===e.id?{...p,plugin:{...p.plugin,enabled:a}}:p)}));n(r);let s=e.enabled;try{let a=e.source.type==="remote"?e.remotePluginId:void 0;if(a===null)throw Error("Remote plugin ID is missing");let d=await t.setPluginEnabled(e.id,r,a);s=d.enabled,n(d.enabled),await y();let p=P().installed.find((E)=>E.plugin.id===e.id);if(p)s=p.plugin.enabled;if(!p||s!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),c(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:R(e)}))}catch(a){n(s),o(`${l("plugins.toast.toggleError")}: ${k(a)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=R(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await t.uninstallPlugin(n),await y(),P().installed.some((s)=>s.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),c(l("plugins.toast.uninstalled",{pluginName:r}))}catch(n){o(`${l("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await t.readPlugin(N(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;g((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),g((s)=>({skills:s.skills.map((a)=>a.path===e.path?{...a,enabled:r}:a)}));let n=e.interface?.displayName??e.name;try{let s=await t.setSkillEnabled({path:e.path,enabled:r});if(g((a)=>({skills:a.skills.map((d)=>d.path===e.path?{...d,enabled:s.effectiveEnabled}:d)})),s.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}c(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){g((a)=>({skills:a.skills.map((d)=>d.path===e.path?{...d,enabled:e.enabled}:d)})),o(`${l("plugins.skills.toggleError")}: ${k(s)}`)}finally{g((s)=>{let a={...s.busySkills};return delete a[e.path],{busySkills:a}})}},addMarketplace:async(e)=>{let r=await t.addMarketplace(e);return await y(!0),c(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await t.removeMarketplace(e),await y(),h(e,!1),c(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await t.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((n)=>n.message).join("; ")}`);else c(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;g({upgrading:!0});try{let e=await t.upgradeMarketplaces();if(await y(!0),g({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else c(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{g({upgrading:!1})}}}),S=Object.assign(M,{bindHost:(e)=>{i=e}});return S}
|
|
2
|
-
export{jr,Pn};
|
package/dist/chunk-1jd0p7b8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Y}from"./chunk-0k6zg9s1.js";import{gt}from"./chunk-q6f0e289.js";var me={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:gt,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 Y(o),o},routePrompt(e){return e.image()}};
|
|
2
|
-
export{me};
|
package/dist/chunk-2jkv90n6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function ee(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function C(e,t){return e.find((n)=>n.category===t&&o(n))}function te(e){return ee(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{ee,C,te};
|
package/dist/chunk-3c9se1ha.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Kr,Y}from"./chunk-0k6zg9s1.js";import{ho}from"./chunk-pwsqw3mx.js";import{go}from"./chunk-zsbsypka.js";import{un}from"./chunk-d7kcgxa2.js";import{Zi,fo}from"./chunk-wsz4dh6m.js";import{Ki}from"./chunk-bbpjhe4e.js";import{dn}from"./chunk-pphkxw72.js";import{me}from"./chunk-1jd0p7b8.js";import{Je,Ie}from"./chunk-n2gm013f.js";import{mo}from"./chunk-fdmtynmq.js";import{pe,cn}from"./chunk-bm1x011j.js";import{configRevisionOf as M,isBooleanOption as w,isGroupedSelect as v,isImage as O,isSelectOption as f,mergeMeta as g,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 $i extends ho{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?Ki(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=dn(s,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=t.inputConfig;if(i&&Je(i.mode)){if(Ie(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,me.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 Ie(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,s,{...t,meta:g(t.meta,{alwith:{imageIntent:null,applicationContext:Ie("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,s,t)})}promptImage(e,s,t){if(!this.imageService)throw Error("Image service is not connected");fo(t.meta?.alwith?.imageAspectRatio);let i=t.meta?.alwith?.imageSelection;if(i!==void 0)Y(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};Y(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:g(t.meta,{alwith:{imageSelection:o,imageRequestId:a,applicationContext:me.applicationContext(t.meta?.alwith?.imageIntent??"generate",Zi),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(Kr(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=fo((s.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:t,references:i,...n?{aspect:n}:{}})}return mo(super.promptMeta(e,s))}promptImages=new Map;promptWithImages(e,s,t={}){return this.prompt(e,s,{...t,meta:g({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);let s=this.state.draftSessions[e];if(s===void 0)return super.stopSession(e);await this.changeDraft([s],()=>this.state.draftSessions[e]?super.close(e):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=go(o);if(!a)return;let r=n.configOptions.find((p)=>p.category==="thought_level"&&f(p)),c,d;if(r&&f(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:g(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=Ie(n),a=mo(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:g(y(r),t.meta)})}async recoverReplay(e,s,t,i){let n=pe(t);if(!n&&!cn(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||!pe(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)&&go(h(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((S)=>S.configId===l.configId);if(!u||u.currentValue===l.currentValue)continue;if(w(l)&&w(u))await this.setConfig(p,l.configId,l.currentValue);else if(f(l)&&f(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:g(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,un(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&&f(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&&f(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,$i};
|
package/dist/chunk-3zr6f9nd.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Sn}from"./chunk-mvebg1n7.js";import{he}from"./chunk-egw95b1p.js";import{sr}from"./chunk-ywwfzgm6.js";import{b,Pt}from"./chunk-52y91amb.js";import{t}from"./chunk-xdrwsxqy.js";import{yi,xi}from"./chunk-m08yer2f.js";import{R}from"./chunk-6cxa2jrx.js";import{ue}from"./chunk-zq7p8m7g.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as h,isText as v}from"@nyssance/codex-acp-v2/client";import{memo as y}from"react";import{jsx as i,jsxs as q}from"react/jsx-runtime";var li=y(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=xi(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):ue(n),l=n.content.filter(x),d=new Set(Pt(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(h(e)){let s=b(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(v).map((e)=>{let s=yi(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return q("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(R,{block:e},`${n.id}:${s}`))}),i(Sn,{value:{names:u,icon:p.skillIcon},children:i(sr,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(he,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
-
export{li};
|
package/dist/chunk-43s8pmw9.js
DELETED
package/dist/chunk-4r8pqg1h.js
DELETED
package/dist/chunk-52y91amb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ve}from"./chunk-bbwxqt7p.js";function b(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Pt(e){if(!e.includes("app://"))return[];let n=ve(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=b(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Ws(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function zr(e,n){return[Ws(n),e.trim()].filter(Boolean).join(" ")}function Vr(e,n){let r=Ws(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
-
export{b,Pt,Ws,zr,Vr};
|
package/dist/chunk-5s0k93vr.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ts}from"./chunk-xvmmndhs.js";import{ns}from"./chunk-qbt8ahwr.js";import{is}from"./chunk-8jqaahna.js";import{Rt}from"./chunk-z0z3xfn3.js";import{n}from"./chunk-xdrwsxqy.js";import{e}from"./chunk-tac30kkh.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 it(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
-
`)}function T({subject:t,requestTitle:o}){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!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain 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(Rt,{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,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(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:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(ts,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,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 Et({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=n((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(ns,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:r.t,onRespond:l})}function De({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:o,onRespond:s});if(it(t))return a(Et,{action:t,total:o??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(is,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{it,Et,De};
|
package/dist/chunk-6aj4cgfs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-tzr6phth.js";import{je,ne,Ce}from"./chunk-cxd1bwe7.js";import{useEffect as S,useMemo as f}from"react";function ya(s){let c=ne((i)=>i.activityOrder),a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&je(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=ne((i)=>i.activitySeen),r=Ce();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
|
-
export{ya};
|
package/dist/chunk-723kazw5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ri}from"./chunk-v77kjbkb.js";import{qo,Fe,t,Oe,n,re}from"./chunk-xdrwsxqy.js";import{Si,pt,ao,Ii,Ti}from"./chunk-zq7p8m7g.js";import{dt}from"./chunk-jzqvhnq5.js";import{ri}from"./chunk-8zrmp6dw.js";import{ai}from"./chunk-29jan02g.js";import{ui,pi}from"./chunk-96wvztgv.js";import{fi,hi}from"./chunk-xde2hdrb.js";import{mi}from"./chunk-7n1v87h0.js";import{ci}from"./chunk-xmr3vcp8.js";import{li}from"./chunk-3zr6f9nd.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as qe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as De}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as Te,useMemo as K,useRef as b,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 o,jsxs as E}from"react/jsx-runtime";var xe=24;function Ke(e){let f=Math.max(0,e.turnTopPx-xe),v=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),c=f-v;return{scrollTopPx:f,spacerPx:c>0?e.spacerPx+c:e.spacerPx}}function Ue({viewportRef:e,viewportProps:f,children:v}){return o("div",{ref:e,...f,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function _e({sessionId:e,turnId:f,root:v,error:c,connected:S}){let z=b(null),V=Oe(),{t:w}=t(),k=M(()=>{V.loadHistoryTurn(e,f).catch(()=>{})},[V,e,f]);return H(()=>{if(!v||!z.current||!S||c)return;let R=new IntersectionObserver((_)=>{if(_.some((g)=>g.isIntersecting))R.disconnect(),k()},{root:v,rootMargin:"800px 0px"});return R.observe(z.current),()=>R.disconnect()},[v,S,c,k]),o("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":f,"data-markdown-pending":!0,children:c?E("div",{className:"flex flex-col items-center gap-2",children:[o("p",{role:"alert",className:"text-destructive text-xs",children:c}),o(Y,{variant:"outline",size:"sm",onClick:k,disabled:!S,children:w("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":w("timeline.navigationLoading"),className:"space-y-3",children:[o("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),o("div",{className:"bg-muted h-3 w-4/5 rounded"}),o("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function We(e,f){let v=b([]),c=b(null);if(c.current?.items!==e.items||c.current.state!==e.state||c.current.ended!==e.turnEndedAt||c.current.usage!==e.turnUsage||c.current.historyOrder!==f)c.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:f,turns:Si(e,v.current,f)};let S=c.current.turns;return v.current=S,S}function ct(e){return o(Fe,{host:e.host,client:e.client,children:o(qo,{value:e.session.cwd,children:o($e,{...e})})})}function $e({session:e,leading:f,afterTurn:v,turnWork:c,answerActions:S,turnFooter:z,renderUserMessage:V,insert:w,navigation:k,anchorNewTurn:R=!1,Viewport:_=Ue}){let g=Oe(),L=t(),T=n((r)=>r.historyNavigation[e.id]),he=K(()=>e.commands.map((r)=>r.name),[e.commands]),m=We(e,T?.turns),A=m.at(-1)?.key,be=Ii(e,m),y=e.state==="running"||e.state==="requires_action",W=K(()=>ai(m,T),[m,T]),Z=K(()=>W.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[W]),we=K(()=>k===void 0?[]:ui(m,e.turnUsage,T),[k,m,e.turnUsage,T]),ee=w&&w.afterItemId!==null?m.findIndex((r)=>r.items.some((u)=>u.id===w.afterItemId)):-1,j=b(m);j.current=m;let[l,Re]=U(null),x=n((r)=>r.historyPages[e.id]),P=n((r)=>r.connection==="ready"),Se=n((r)=>ze(r.agent).sessionRetry),te=x!==void 0;H(()=>{if(P&&te&&!e.restoring)g.loadHistoryNavigation(e.id).catch(()=>{})},[g,P,te,e.id,e.restoring]);let[ke,Pe]=U(!1),q=b(null),[Ie,ne]=U(!1),ie=b(0),X=b({key:A,running:y});X.current={key:A,running:y};let[oe,F]=U(0),I=b(0),N=b(null);I.current=oe;let Ne=M(()=>{if(N.current!==null)N.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:G,stopFollowing:B,schedulePin:le,contentResized:ae,beginLocate:ue,cancelLocation:se}=ci(l,y,Ne),ce=M(()=>{if(l===null||!y)return;let r=m.at(-1)?.key;if(r===void 0)return;let u=ue(!0),d=()=>u.isCurrent()&&X.current.running&&X.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!d())return;let a=l.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(a===null)return;let s=l.scrollTop+a.getBoundingClientRect().top-l.getBoundingClientRect().top,p=Ke({turnTopPx:s,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=p.spacerPx>0?{element:a,heightPx:a.getBoundingClientRect().height+p.spacerPx,keepTop:!0}:null,ye(()=>F(p.spacerPx)),requestAnimationFrame(()=>{if(d())u.finish(p.scrollTopPx)})})),h=q.current;if(h===null)return;h.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(d())i()})},[ue,y,l,m]);Te(()=>{if(!R||y)return;se(),N.current=null,I.current=0,F(0)},[R,se,y]);let J=M(()=>{B(),g.loadOlderHistory(e.id).catch(()=>{})},[g,e.id,B]);H(()=>{if(l===null)return;let r=()=>{let u=l.scrollTop<600;if(Pe(u),u&&!T?.complete&&P&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)J()};return r(),l.addEventListener("scroll",r,{passive:!0}),()=>l.removeEventListener("scroll",r)},[P,x,C,J,l,e.restoring,T?.complete]),H(()=>{fi({sessionId:e.id,turns:Z,api:q.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>hi(e.id),[e.id]);let He=M(async(r,u)=>{let d=++ie.current;ne(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await g.loadHistoryTurn(e.id,r.nativeTurnId),await new Promise((s)=>requestAnimationFrame(()=>s()));if(!u())return null;let i=j.current.find((s)=>s.user?.id===(r.messageId??r.id))??j.current.find((s)=>s.user!==null&&r.nativeTurnId!==void 0&&s.items.some((p)=>ge(p)===r.nativeTurnId));if(!i?.user)return null;let h=i.user.id,a=q.current;if(a===null)throw Error("Virtual timeline is not mounted");return await a.scrollToKey(i.key,(s)=>s.querySelector(`[data-content-search-unit-key="${CSS.escape(h)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(h)}"]`)}finally{if(ie.current===d)ne(!1)}},[g,e.id]),Ee=M(async(r)=>{if(r.nativeTurnId!==void 0)await g.previewHistoryTurn(e.id,r.nativeTurnId)},[g,e.id]);H(()=>{if(l===null)return;let r=l.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let a=N.current,s=null;if(a!==null){let p=Math.max(0,a.heightPx-a.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||a.keepTop)){if(I.current=p,ye(()=>F(p)),p===0)N.current=null}if(p>0&&a.keepTop)s=l.scrollTop+a.element.getBoundingClientRect().top-l.getBoundingClientRect().top-xe}ae(s)});u.observe(r),u.observe(l);let d=null,i=()=>{let a=A===void 0?null:r.querySelector(`[data-codex-turn="${CSS.escape(A)}"]`);if(a===d)return;if(d!==null)u.unobserve(d);if(d=a,d!==null)u.observe(d)};i();let h=new MutationObserver(i);return h.observe(r,{childList:!0,subtree:!0}),()=>{h.disconnect(),u.disconnect()}},[ae,A,l]),H(()=>{if(e.items.length===0)return;le()},[le,e.items]);let de=b(null);Te(()=>{if(l===null)return;let r=m.at(-1),u=de.current;if(de.current=r===void 0?null:{key:r.key,running:y},r===void 0||u===null||r.user===null||r.replayed)return;if(R){if(y&&e.turnEndedAt[r.user.id]===void 0&&(r.key!==u.key||!u.running))N.current=null,I.current=0,F(0),ce()}else if(r.key!==u.key)G()},[ce,R,y,G,l,e.turnEndedAt,m]);let Le=(r,u)=>{let d=r,i=d.turn;if(i===void 0){if(d.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return o(_e,{sessionId:e.id,turnId:d.nativeTurnId,root:l,error:T?.turnErrors[d.nativeTurnId],connected:P&&!C&&!Ie})}let h=m.indexOf(i),a=i.key===be,s=Ti(e,m,h),p=!a&&s.continued,D=i.key===A,O=i.errors.at(-1),me=O===void 0?null:Ve(O),Q=O===void 0?null:ge(O),Ae=!e.subagent&&D&&!a&&P&&Se&&e.attached&&!e.readOnly&&!e.restoring&&O===e.items.at(-1)&&me!==null&&qe(me).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",fe=z?.(i)??null,pe=c?.(i)??null,Ce=pe!==null||i.work.length>0||i.final.length>0||i.errors.length>0||a||fe!==null||pt(i)||ao(i)||D&&(e.error!==null||e.lastStopReason==="cancelled"),ve=i.user===null?null:dt(i);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(V===void 0?o(li,{item:i.user,messageTime:ve,skillNames:he}):V(i.user,ve)),Ce&&o(ri,{sessionId:e.id,turn:i,terminals:e.terminals,active:a,blocked:e.state==="requires_action",continued:p,edits:s.edits,activityItems:s.items,workStartedAt:s.startedAt,isLast:D,error:e.error,retrying:a?Be(e._meta)??void 0:void 0,retry:Ae?{turnId:Q,delaySeconds:mi(m),run:(Me)=>g.retrySession(e.id,Q,Me)}:void 0,interrupted:ao(i)||!a&&D&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:S?.(i),footer:fe}),u===ee&&w?.node,v?.(i)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[o(_,{viewportRef:Re,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":L.t("timeline.label")},children:o("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:[w&&ee===-1&&w.node,o(Ri,{ref:q,entries:W,renderTurn:Le,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:f===void 0?void 0:o("div",{className:"pt-3",children:f})}),R&&o("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:oe}}),o("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),o("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&o("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:o(Y,{variant:"outline",size:"sm",disabled:!P,title:T.error,onClick:()=>{g.loadHistoryNavigation(e.id).catch(()=>{})},children:L.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:[o(Y,{variant:"outline",size:"sm",disabled:!P||e.restoring||x.loading,onClick:J,children:x.loading?L.t("timeline.loadingEarlier"):L.t("timeline.loadEarlier")}),x.error&&o("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),k!==void 0&&o(pi,{items:we,audio:k.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ee,onRevealError:(r)=>re(L,r),targetTopMarginPx:16},e.id),o("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":L.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"})]}):o(De,{})})]})}
|
|
2
|
-
export{ct};
|
package/dist/chunk-79qh74jn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-xdrwsxqy.js";import{e,w}from"./chunk-tac30kkh.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as j}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as x}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as r,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(t){return t.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||t}function _s({cwd:t,onChange:u,preparing:b=!1,recentProjects:g}){let{host:i,client:p}=e(),{t:l}=i,v=n((o)=>o.projectContext),h=n((o)=>o.sessionList),y=R(()=>g??[...new Set([...h].toSorted((o,f)=>(f.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[g,h]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let o=!0;return w(i,p.refreshProjectContext(!0).then((f)=>{if(o)N(f.chatDirectory)})),()=>{o=!1}},[i,p]);let D=[...t!==null?[t]:[],...y.filter((o)=>o!==t)].filter((o)=>o!==c&&(!v||z(v,{cwd:o}).id!==I)),a=t!==null&&t!==c,P=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":b,className:j("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(C,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:P,children:[r(m,{className:"size-4 group-hover/project:opacity-0"}),r("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:r(x,{className:"size-3"})})]}),s(_,{render:r(C,{variant:"ghost",size:"sm",className:j("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&r(m,{className:"size-4"}),r("span",{className:"truncate",children:a?M(t):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[D.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:t??"",onValueChange:u,children:D.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(m,{}),r("span",{className:"truncate",children:M(o)})]},o))})}),(d!==void 0||a)&&r(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{w(i,d(t).then((o)=>{if(o!==null)u(o)}))},children:[r(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:P,children:[r(x,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
-
export{_s};
|
package/dist/chunk-7kxa1krk.js
DELETED
package/dist/chunk-7xszqjre.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,o}from"./chunk-tzr6phth.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function qn(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
|
|
2
|
-
export{qn};
|
package/dist/chunk-8at6403h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{L}from"./chunk-10ar0368.js";import{ge}from"./chunk-vxkkzs4m.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function di({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(L,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ge,{entries:t.entries})}
|
|
2
|
-
export{di};
|
package/dist/chunk-90mq5g5a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ve}from"./chunk-nxnzrbrc.js";import{U}from"./chunk-mfs0b15q.js";import{cn as n}from"cn";import{Item as i,ItemActions as Z,ItemContent as Q,ItemDescription as ye,ItemMedia as J,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function X({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function Le({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Ve,"data-[active=true]:font-medium",e),...r})}function _n({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(U,{children:t})})}export{Z,Q,ye,J,X,Le,_n};
|
package/dist/chunk-aazp5pw2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{kt}from"./chunk-dq7zxw47.js";import{d,ot}from"./chunk-zfsbhwe1.js";import{I}from"./chunk-d4edqxgc.js";import{MoreHorizontalIcon as N}from"lucide-react";import{useEffect as y,useState as p}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as D,DropdownMenuContent as P,DropdownMenuItem as g,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function Ar(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function z(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function C(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function Ne({path:n,renderHeader:s,description:t}){let e=d(),{t:l}=e,c=e.readFile,[a,f]=p(null),[v,w]=p(null),[h,M]=p(0);y(()=>{let r=!1;return f(null),w(null),(n===null||!c?Promise.resolve(t??""):c(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,h,c]);let k=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(D,{children:[o(b,{render:o(x,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(N,{})}),i(P,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void ot(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void ot(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)ot(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(k):o("div",{className:"flex justify-end",children:k}),o(I,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(x,{variant:"outline",size:"sm",onClick:()=>M((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(kt,{text:Ar(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:C(`${z(n)}/${r}`))}})})]})}
|
|
2
|
-
export{Ar,Ne};
|
package/dist/chunk-adnpp676.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{s,a,o}from"./chunk-tzr6phth.js";import{st,be,ae}from"./chunk-7kxa1krk.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as de,FolderIcon as Q,ListFilterIcon as ue,SearchIcon as me,Trash2Icon as U}from"lucide-react";import{useEffect as pe,useRef as he,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as fe,DialogContent as ve,DialogDescription as ge,DialogFooter as xe,DialogHeader as Se,DialogTitle as ye}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Le}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ne,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as n}from"react/jsx-runtime";function M({className:u,...i}){return t(Ne,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function Ce({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function ca({Scroll:u=Ce}){let{t:i,i18n:A}=s(),m=a(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=he(!1),[D,f]=d(null),[O,b]=d(null),[se,G]=d(!1);pe(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let r=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(r.has(v))throw Error("Archive pagination returned a repeated cursor");r.add(v),await m.listArchived()}}catch(r){if(!e)F(E(r))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ie=[...new Set(S.filter((e)=>l&&j(l,e).id!==ae).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),ne=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=l?j(l,e).id:null,r=c===ae;return L(e).toLocaleLowerCase(A.language).includes(ne)&&(y==="all"||(y==="quick"?r:!r))&&(p==="all"||(p==="quick"?r:c===p))}),re=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function le(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function oe(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let r of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===r.sessionId))continue;try{await m.delete(r.sessionId)}catch(v){e.push(r),c.push(`${L(r)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
-
`));else f(null)}finally{h.current=!1,w(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),n(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[t(me,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Le,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),n(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[n(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(ue,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),n(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),n(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");Z(e)},children:[n(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):be(p,l??void 0)})]}),n(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ie.map((e)=>t(x,{value:e,title:e,children:be(e,l??void 0)},e))]})]})]}),n(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:n(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>te((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(de,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(l?st(K,l):[]).filter(([,e])=>e.length>0).map(([e,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===ae?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===ae?i("sessionList.archives.noProject"):be(e,l??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((r)=>n("article",{"aria-label":L(r),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(r),children:L(r)}),r.updatedAt!==null&&t("time",{dateTime:r.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:re.format(new Date(r.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([r])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void le(r),children:i("sessionList.archives.unarchive")})]})]},r.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(fe,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:n(ve,{showCloseButton:!C,children:[n(Se,{children:[t(ye,{children:i("sessionList.archives.deleteTitle")}),t(ge,{children:i(se?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),n(xe,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),n(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void oe(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{ca};
|
package/dist/chunk-b5afm26d.js
DELETED
package/dist/chunk-bbpjhe4e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gn}from"./chunk-nm8245ze.js";import{jo,Y}from"./chunk-0k6zg9s1.js";import{Qi}from"./chunk-wsz4dh6m.js";function Ki(d,a){return gn({...jo.definitions[0],revision:jo.revision,autoApprove:(i)=>a(i)!==void 0,parse(i){let e=i;if(!e||typeof e!=="object"||Array.isArray(e)||typeof e.prompt!=="string"||!e.prompt.trim()||Object.keys(e).some((n)=>n!=="prompt"&&n!=="references")||e.references!==void 0&&(!Array.isArray(e.references)||e.references.some((n)=>typeof n!=="string")))throw Error("Invalid image instructions or references");return{prompt:e.prompt,references:e.references}},async execute(i,{sessionId:e,toolCallId:n,signal:c,agent:l}){let t=a(e);if(!t)throw Error("Image request is no longer active");let g=i.references,m=(g??[...t.references.keys()].filter((r)=>r.startsWith("attachment:"))).map((r)=>{let s=t.references.get(r);if(!s)throw Error(`Unknown image reference: ${r}`);return s}),o=Y(t.selection);if(m.length>o.maxReferences)throw Error(`This model supports ${o.maxReferences} references`);let f=Qi(i.prompt,t.aspect),p=o.provider==="chatgpt"?await l.request("_codex/images/generate",{prompt:f,images:m},{cancellationSignal:c}):await d.generateExternal(t.selection,f,m,c);if(c.throwIfAborted(),a(e)!==t)throw Error("Image request was cancelled or replaced");return p.images.forEach((r,s)=>t.references.set(`${String(n)}:${s+1}`,`data:${r.mimeType};base64,${r.data}`)),{success:!0,contentItems:[{type:"text",text:JSON.stringify({kind:"alwith.image",version:1,model:o.id,size:t.selection.size,displayed:!0,message:"The application already displays these images and provides downloads. Finish with the returned image reference; do not regenerate, echo image data or write files to deliver this result.",references:g??[],images:p.images.map((r,s)=>({reference:`${String(n)}:${s+1}`}))})},...p.images.map((r)=>({type:"image",...r}))]}}})}
|
|
2
|
-
export{Ki};
|
package/dist/chunk-br1vyrce.js
DELETED
package/dist/chunk-cc8cg69z.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{H}from"./chunk-05eftctr.js";import{Ao,u,_,vn,Eo,yt}from"./chunk-2b7fjev1.js";import{Sr,Mo,_r,No}from"./chunk-xnj05nc3.js";import{Ct,wt,yn}from"./chunk-fwk2ayca.js";import{fe,g}from"./chunk-atdygnc5.js";import{cn as J}from"cn";import{forwardRef as q,useImperativeHandle as z,useLayoutEffect as O,useRef as d}from"react";import{jsx as j}from"react/jsx-runtime";var U=(r,E)=>r.text===E.text&&JSON.stringify(r.apps)===JSON.stringify(E.apps),To=q((r,E)=>{let I=fe(),L=g(),s=d(null),N=d(null),a=d(_(u({text:I.textInput.value,apps:r.applications}))),f=d({start:r.initialCaret??u(a.current).length,end:r.initialCaret??u(a.current).length}),h=d(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),S=d([]),R=d(""),A=d(r.skillIcon),b=d(!1),x=d(!1),P=d(null),c=d({props:r,controller:I,attachments:L});c.current={props:r,controller:I,attachments:L};let m=()=>{if(s.current&&document.activeElement===s.current)f.current=_r(s.current,a.current.apps,f.current);return f.current},w=()=>{let e=s.current;if(!e)return;let t={...f.current};e.focus(),f.current=t,No(e,t)},T=()=>({...a.current,selection:m()}),D=(e,t)=>{if(!s.current)return;if(Sr(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),A.current=c.current.props.skillIcon,R.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),f.current=t,document.activeElement===s.current)No(s.current,t)},C=(e,t,n=!0,l=!0)=>{if(l&&!U(a.current,e)){if(h.current.push(P.current??T()),h.current.length>100)h.current.shift();S.current=[]}if(P.current=null,a.current=e,f.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},y=(e)=>{let t=m(),n=u(a.current),l=u(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((k)=>typeof k==="string"?[]:[k.id])),p=l.filter((k)=>typeof k==="string"||!i.has(k.id)),o=_([...n.slice(0,t.start),...p,...n.slice(t.end)]),M=t.start+p.length;C(o,{start:M,end:M})},K=(e)=>{let n=(e?h.current:S.current).pop();if(!n)return;(e?S.current:h.current).push(T()),C({text:n.text,apps:n.apps},n.selection,!0,!1)},v=()=>{if(!s.current)return;let e=_(Mo(s.current,a.current.apps)),t=m();if(b.current)return;let n=yn(e.text),l=n===e.text?e:_(u({text:n,apps:e.apps}));C(l,t,n!==e.text)};O(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=_(u({text:i,apps:a.current.apps})),D(a.current,f.current)}},selectionStart:{configurable:!0,get:()=>vn(u(a.current),m().start)},selectionEnd:{configurable:!0,get:()=>vn(u(a.current),m().end)},setSelectionRange:{configurable:!0,value:(i,p)=>{let o=u(a.current);f.current={start:Eo(o,i),end:Eo(o,p)},D(a.current,f.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),N.current=e,D(a.current,f.current),w();let n=()=>{m()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(b.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),K(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),y({text:`
|
|
2
|
-
`,apps:[]});else P.current=T()};return e.addEventListener("beforeinput",l),e.addEventListener("change",v),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",v),document.removeEventListener("selectionchange",n),N.current=null}},[]),O(()=>{if(b.current)return;let e=_(u({text:I.textInput.value,apps:r.applications}));if(U(e,a.current)&&R.current===JSON.stringify(r.skillNames??[])&&A.current===r.skillIcon)return;let t=m();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),z(E,()=>({focus:w,getTextarea:()=>N.current,isComposing:()=>b.current||x.current,resetHeight:()=>{h.current=[],S.current=[]},insertInvocation:(e)=>{w(),y({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(w(),a.current.apps.some((t)=>t.id===e.id))return;y({text:"",apps:[{...e,offset:0}]})}}),[]);let F=(e)=>{if(b.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),K(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)y({text:`
|
|
3
|
-
`,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=m(),n=u(a.current);if(t.start!==t.end){e.preventDefault(),y({text:"",apps:[]});return}let l=vn(n,t.start),i=H(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);C(_([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let p=e.key==="Backspace"?t.start-1:t.start;if(p>=0&&p<n.length&&typeof n[p]!=="string")e.preventDefault(),C(_([...n.slice(0,p),...n.slice(p+1)]),{start:p,end:p});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o)e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},B=(e)=>{let t=m();if(t.start===t.end)return;let n=u(a.current).slice(t.start,t.end),l=_(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(Ao,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)y({text:"",apps:[]})};return j("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:J("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:v,onKeyDown:F,onCompositionStart:()=>{P.current=T(),b.current=!0,x.current=!1},onCompositionEnd:()=>{b.current=!1,v(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=Ct(e.clipboardData.items);if(e.preventDefault(),t.length){L.add(t);return}if(n&&!wt(e.clipboardData.items))return;y(yt(e.clipboardData)??{text:yn(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:B,onCut:B,onDrop:(e)=>{e.preventDefault()}})});To.displayName="PromptInputInline";
|
|
4
|
-
export{To};
|
package/dist/chunk-csw1rzrc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-nxnzrbrc.js";import{s}from"./chunk-tzr6phth.js";import{y,f}from"./chunk-t6z3khr5.js";import{Ot}from"./chunk-09w80wgb.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 u,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 xa({onCollapseAll:i}){let{t:n}=s();return w(c,{children:[o(g,{render:o(Ot,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(u,{align:"end",className:"w-52",children:o(d,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function ba({screen:i,onSwitch:n}){let{t:e}=s(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(f,{className:r(m,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(y,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
|
-
export{xa,ba};
|
package/dist/chunk-fdqfbhwd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d,i}from"./chunk-zfsbhwe1.js";import{I}from"./chunk-d4edqxgc.js";import{z}from"./chunk-jv117dry.js";import{Ne}from"./chunk-aazp5pw2.js";import{W,Ae,Ee}from"./chunk-nase48et.js";import{ExternalLinkIcon as M,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as k}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as D}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function Cn({entry:o,onBack:p}){let u=d(),{t:l}=u,S=i((a)=>a.readPlugin),P=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,C]=k(null),[w,B]=k(null),[j,R]=k(0),[r,U]=k(null);q(()=>{let a=!0;return B(null),C(null),S(o).then((g)=>{if(a)C(g)},(g)=>{if(a)B(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,S,j]);let m=n?.summary??o.plugin,c=P?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=c.availability!=="AVAILABLE"||c.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(Ee,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(z,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:P?s(O,{children:[e(X,{checked:c.enabled,disabled:!!v||b,"aria-label":l(c.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(c,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(c),children:v?e(D,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(D,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(I,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${W} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(c.localVersion??c.version)&&e(x,{label:l("plugins.detail.version"),children:c.localVersion??c.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(y,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!w&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(D,{}),l("plugins.detail.loading")]}),w&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",w]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(z,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>U(a),children:[e(z,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(y,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(y,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(y,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(F,{open:r!==null,onOpenChange:(a)=>{if(!a)U(null)},children:e(G,{className:Ae,children:r&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(z,{name:r.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]}),e(Ne,{path:r.path,description:r.description},r.path??r.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function y({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
|
-
export{Cn};
|
package/dist/chunk-fjr7n326.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,Zn,o,h}from"./chunk-tzr6phth.js";import{j}from"./chunk-z90zckkv.js";import{ze}from"./chunk-t6z3khr5.js";import{Ue}from"./chunk-ws4qt1sc.js";import{Ht,Be}from"./chunk-0yngh0w6.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function Zo({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=s(),{t:f,i18n:S}=t,k=a(),l=o((i)=>i.runStates[e.sessionId]),I=Zn(),u=()=>m(e);return n(ze,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:p,onClick:u,onKeyDown:(i)=>{if(i.key==="Enter"||i.key===" ")i.preventDefault(),u()},media:t.SessionMedia?n(t.SessionMedia,{sessionId:e.sessionId,state:l?.state}):void 0,state:l?.state,interruption:l?.interruption??null,title:e.title??f("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(B,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:d}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ht(e.updatedAt,S.language)}):void 0,actions:l!=null?n(Ue,{title:f("sessionList.stop"),onStop:()=>h(t,k.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:p,onForked:m,actions:v}){let c=s(),{t:d}=c,t=a(),f=o((r)=>F(r.agent)),S=o((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,u]=y(!1),i=R(!1);return n(Be,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)h(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&n(j,{icon:n(H,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?n(j,{icon:n(x,{}),label:d("sessionList.unarchive"),onClick:()=>void h(c,t.unarchive(e.sessionId))}):b(C,{children:[n(j,{icon:n(A,{}),label:d("sessionList.fork"),disabled:!S||I,onClick:()=>{if(i.current)return;i.current=!0,u(!0),h(c,t.fork(e.sessionId,e.cwd).then((r)=>{let g=t.state.sessionList.find((L)=>L.sessionId===r);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{i.current=!1,u(!1)}))}}),n(j,{icon:n(D,{}),label:d("sessionList.archive"),onClick:()=>void h(c,t.archive(e.sessionId))})]}),n(j,{variant:"destructive",icon:n(N,{}),label:d("sessionList.delete"),onClick:p})]})})}
|
|
2
|
-
export{Zo};
|
package/dist/chunk-fwk2ayca.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Ha(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 Ct(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(Ha(t,o))}return{imageFiles:n,sawNonImageFile:i}}function wt(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function yn(e){return e.replace(s,"")}function qs(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 xn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=yn(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-qs(n,i)),r=Math.max(0,o-qs(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{Ha,Ct,wt,yn,qs,xn};
|
package/dist/chunk-g9vjpmrq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-nxnzrbrc.js";import{a,o}from"./chunk-tzr6phth.js";import{F,y,f,le}from"./chunk-t6z3khr5.js";import{N,de,ii}from"./chunk-twrdy8cb.js";import{lt}from"./chunk-6hgcxkwd.js";import{B,oe}from"./chunk-zr6xrady.js";import{we,ce}from"./chunk-71fhan3p.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as V,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as De,useSortable as re,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as se}from"@dnd-kit/utilities";import{cn as G}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as ae,StarIcon as be,Trash2Icon as me}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as L}from"react";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as ee,DialogFooter as te,DialogHeader as ne,DialogTitle as ie}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:x}){let{attributes:v,listeners:I,setNodeRef:i,transform:p,transition:u,isDragging:M}=re({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:se.Transform.toString(p),transition:u},className:G("w-full min-w-0",M&&"opacity-50"),...v,...I,role:"group",children:x})}function Be({collection:l,children:C,onEdit:x,onConfirm:v,onNewChat:I}){let{t:i}=N(),p=ce(),u=de(),{attributes:M,listeners:d,setNodeRef:h,transform:R,transition:P,isDragging:z}=re({id:l.id,disabled:{draggable:l.id===B,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:se.Transform.toString(R),transition:P},className:G("w-full min-w-0",z&&"opacity-50"),children:e(le,{open:!l.collapsed,onOpenChange:(c)=>u(p({type:"collapse",id:l.id,collapsed:!c})),label:oe(l,i),count:l.sessionIds.length,leading:l.id===B?e(be,{className:"size-3.5"}):e(lt,{emoji:l.emoji,onChange:(c)=>u(p({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(w,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:oe(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==B&&s(H,{onClick:x,children:[e(he,{}),i("collection.rename")]}),s(H,{onClick:I,children:[e(ae,{}),i("collection.newChat")]}),s(H,{onClick:()=>v("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==B&&s(H,{variant:"destructive",onClick:()=>v("delete"),children:[e(me,{}),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 Ts({renderRow:l,onSelect:C,onNewChat:x,Scroll:v=He}){let I=N(),{t:i}=I,p=ce(),u=de(),M=a(),{collections:d,order:h}=we(),R=o((t)=>t.sessionList),P=o((t)=>t.archivedSessions),z=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...P,...R].map((t)=>[t.sessionId,t])),[P,R]),_=I.isMac??ii(),[S,E]=L(null),[k,K]=L(""),[q,O]=L(""),[D,T]=L(null),[g,J]=L(!1),pe=Se(V(ye,{activationConstraint:{distance:5}}),V(Ce,{coordinateGetter:De})),j=h.flatMap((t)=>d[t].collapsed?[]:d[t].sessionIds.flatMap((n)=>{let r=U.get(n);return r&&!r.archived?[r]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(_?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(n.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;n.preventDefault(),C(j[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[j,_,C]);let ue=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,b=n.data.current;if(r?.type==="session"&&b!==void 0){let Q=b.type==="session"?String(b.collectionId):String(n.id);u(p({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Q,sessionId:String(r.sessionId),index:b.type==="session"?d[Q].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(n.id)!==B)u(p({type:"reorder",id:String(t.id),index:h.indexOf(String(n.id))}))},A=(t,n)=>{J(!0),u(t.then(n).finally(()=>J(!1)))};return s(ze,{children:[e(v,{children:s(F,{children:[s(f,{className:G(m,"font-normal"),onClick:()=>{E("new"),K(""),O("")},children:[e(y,{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(w,{variant:"ghost",onClick:()=>u(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:pe,collisionDetection:ge,onDragEnd:ue,children:e(W,{items:h,strategy:X,children:e(F,{children:h.map((t)=>e(Be,{collection:d[t],onNewChat:()=>x(t),onEdit:()=>{E(t),K(d[t].name),O(d[t].emoji??"")},onConfirm:(n)=>T({id:t,type:n}),children:e(W,{items:d[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:X,children:d[t].sessionIds.map((n)=>{let r=U.get(n);if(r?.archived)return null;if(!r)return z?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(y,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(w,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>u(p({type:"remove",sessionId:n,collectionId:t})),children:e(me,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(Y,{open:S!==null,onOpenChange:(t)=>{if(!t&&!g)E(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(S==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(t)=>{if(t.preventDefault(),S===null||!k.trim()||g)return;let n=S==="new"?`collection-${crypto.randomUUID()}`:S;A(p([S==="new"?{type:"create",id:n,name:k}:{type:"rename",id:n,name:k},{type:"emoji",id:n,emoji:q}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(t)=>K(t.target.value),disabled:g}),S!=="new"&&e(lt,{emoji:q,onChange:O}),s(te,{children:[e(w,{type:"button",variant:"outline",disabled:g,onClick:()=>E(null),children:i("collection.cancel")}),e(w,{type:"submit",disabled:g||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:D!==null,onOpenChange:(t)=>{if(!t&&!g)T(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(D?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:D===null?"":oe(d[D.id],i)})})]}),s(te,{children:[e(w,{variant:"outline",disabled:g,onClick:()=>T(null),children:i("collection.cancel")}),e(w,{disabled:g,onClick:()=>{if(D!==null)A(p({type:D.type,id:D.id}),()=>T(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{Ts};
|
package/dist/chunk-gh1jdr70.js
DELETED
package/dist/chunk-j420zak2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{k}from"./chunk-mz8tjgre.js";import{n}from"./chunk-xdrwsxqy.js";import{ct}from"./chunk-723kazw5.js";import{C,te}from"./chunk-2jkv90n6.js";import{e}from"./chunk-tac30kkh.js";import{Xn}from"./chunk-f7bn0nd2.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 v}from"react";import{Button as z}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as ns}from"react/jsx-runtime";function Jn(s,l){let d=n((u)=>u.sessions),r=n((u)=>u.actions),[y,m]=v(()=>new Set);return(u)=>{let c=l?.(u)??null,i=Xn(s.id,u,d,r,s);if(i.length===0)return c;let x=`${s.id}:${u.key}`;return{active:c?.active===!0||i.some((o)=>o.status==="running"||o.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||y.has(x),content:p(ns,{children:[t(ei,{sessionId:s.id,turn:u,parent:s,tasks:i,onExpand:()=>m((o)=>o.has(x)?o:new Set([...o,x]))}),c?.content]})}}}function ei({sessionId:s,turn:l,parent:d,tasks:r,onExpand:y}){let{host:m}=e(),u=n((a)=>a.sessions),c=n((a)=>a.actions),i=r??Xn(s,l,u,c,d),x=i.some((a)=>a.status==="running"),o=i.some((a)=>a.status==="running"||a.status==="requires_action"),[f,N]=k(`subagents:${s}:${l.key}`,o,!0),w=J();if(i.length===0)return null;let g=new Map;for(let a of i)g.set(a.status,(g.get(a.status)??0)+1);let S=[...g].map(([a,I])=>`${m.t(`subagents.${a}`)} ${I}`).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(z,{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)y?.();N(!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")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:S})]}),t("div",{id:w,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(es,{task:a,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${a.key}`,onRead:()=>{y?.(),N(!0)}},a.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:y}){let{client:m,host:u}=e(),{t:c}=u,i=s.session,x=n((h)=>h.connection==="ready"),[o,f]=k(`subagent:${d}`,!1),[N,w]=v(!1),[g,S]=v(null),[a,I]=v(null),[R,Q]=v(null),[B,P]=v(!1),q=L(!1),_=L(!1),j=J(),W=i&&C(i.configOptions,"model"),T=s.title??c("subagents.untitled"),H=a?O(a,i):i,U=x&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),M=s.threadId,D=i?.cwd??l,E=Z(async(h)=>{if(!m.readSubagentHistory||M===null||q.current)return;_.current=!0,q.current=!0,P(!0),S(null);try{let b=await m.readSubagentHistory(M,D,h);I((K)=>K===null?b.session:O(b.session,K)),Q(b.cursor)}catch(b){S(b instanceof Error?b.message:String(b))}finally{q.current=!1,P(!1)}},[m,M,D]);ss(()=>{if(r&&o&&!_.current)E(null)},[r,o,E]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");w(!0),S(null);try{await m.cancel(i.id)}catch(h){S(h instanceof Error?h.message:String(h))}finally{w(!1)}};return p("section",{"aria-label":T,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(z,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${T} · ${c(`subagents.${s.status}`)}`,"aria-expanded":o,"aria-controls":j,onClick:()=>{if(!o)y();f(!o)},children:[o?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:T}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),U&&t(z,{variant:"ghost",size:"icon-sm",disabled:N,"aria-label":c("subagents.cancel",{name:T}),onClick:()=>{V()},children:N?t(F,{className:"size-3.5 animate-spin"}):t(Y,{className:"size-3.5"})})]}),g&&!o&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!o,className:"min-w-0 ps-4",children:[(s.description||W)&&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}),W&&t("span",{className:"shrink-0",children:te(W)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(z,{variant:"ghost",size:"sm",onClick:()=>{E(a===null?null:R)},children:c("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),R&&t(z,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{E(R)},children:c("timeline.loadEarlier")}),r&&o&&(H&&H.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ts,{session:H})}):!B&&!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=Jn(s);return t(ct,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
-
export{Jn,ei};
|
package/dist/chunk-mz8tjgre.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as r,useState as x}from"react";var t=new Map;function k(o,e,a=!1){let[p,S]=x(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let b=r((c)=>{S((s)=>{let f=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(f):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,b]}
|
|
2
|
-
export{k};
|
package/dist/chunk-n2gm013f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Wi}from"./chunk-b5afm26d.js";import{me}from"./chunk-1jd0p7b8.js";var t={chat:Wi,image:me};function Je(n){return Object.hasOwn(t,n)}function Ie(n){if(!Je(n))throw Error(`Unsupported input mode: ${n}`);return t[n]}function Vs(n){if(n===null)return"chat";let o=n.mode;if(!Je(o))throw Error(`Unsupported input mode: ${o}`);return t[o].parseConfig(n.config),o}
|
|
2
|
-
export{Je,Ie,Vs};
|
package/dist/chunk-na5pcj57.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A,xo,nr,hn,or,bo,ir}from"./chunk-7ekex790.js";import{t,Oe,v,n}from"./chunk-xdrwsxqy.js";import{ke}from"./chunk-y3e10q18.js";import{createStore as M}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=M({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function O(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...bo(s._meta),...s.content.filter(k).flatMap((i)=>bo(i._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:r,item:e,question:s,index:a}){let i=Oe(),{t:l}=t(),m=xo(e.id,a),c=JSON.stringify([r,m]),u=v(b,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),h=n((o)=>o.connection==="ready"),f=u?.draft??nr(s),q=d===void 0?u?.accepted:O(d,m)??u?.accepted,D=d!==void 0&&x(d,e),C=!d?.subagent&&h&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!D?"closed":!C?"unavailable":"pending",E=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=hn(s,f);if(!S.trim())return;let w={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:or(w),_meta:{codex:{questionReply:w}}}]),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(ir,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function eo({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=A(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return y(ke,{content:e.content.some((i)=>!k(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.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((i,l)=>y(R,{sessionId:r,item:e,question:i,index:l},xo(e.id,l)))})}
|
|
2
|
-
export{eo};
|
package/dist/chunk-nvv8aheh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j}from"./chunk-z90zckkv.js";import{Ge}from"./chunk-t6z3khr5.js";import{N,de}from"./chunk-twrdy8cb.js";import{B,oe}from"./chunk-zr6xrady.js";import{we,ce}from"./chunk-71fhan3p.js";import{cn as G}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as E,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as M}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as z,DropdownMenuContent as L,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function ti({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:O=n?"none":void 0,allowRemove:R=!0,submenu:g=!1,className:x,onOpenChange:A}){let{t}=N(),c=ce(),T=de(),H=Ge(),{collections:s,order:C}=we(),i=C.find((o)=>s[o].sessionIds.includes(l)),[P,F]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(F(o),H(o),A?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),T(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(z,{modal:!1,open:P,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(J,{disabled:r,"data-hover-background":O,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(M,{variant:"ghost",size:"icon-sm",className:x,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:G(i!==void 0&&"fill-current")})})}),a(L,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===B?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:oe(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),R&&i!==void 0&&a(k,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(Q,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(M,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Ms({sessionId:l,allowRemove:f=!0}){let{t:n}=N();return e(ti,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(j,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
|
|
2
|
-
export{ti,Ms};
|
package/dist/chunk-nxnzrbrc.js
DELETED