@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,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function Or(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
|
|
2
|
+
export{Or};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var I={ar:{untitled:"دردشة جديدة",signOut:"تسجيل الخروج",help:"مساعدة",language:"اللغة",foreground:"المقدمة",background:"الخلفية",chats:"الدردشات",activity:"نشاط",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة",filter:"تصفية",collapseAllGroups:"طي كل المجموعات",openLeading:"فتح الشاشة -1",backToMain:"العودة إلى الشاشة الرئيسية"},de:{untitled:"Neuer Chat",signOut:"Abmelden",help:"Hilfe",language:"Sprache",foreground:"Vordergrund",background:"Hintergrund",chats:"Chats",activity:"Aktivität",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert",filter:"Filtern",collapseAllGroups:"Alle Gruppen einklappen",openLeading:"Bildschirm -1 öffnen",backToMain:"Zurück zum Hauptbildschirm"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",signOut:"Sign out",help:"Help",language:"Language",foreground:"Foreground",background:"Background",chats:"Chats",activity:"Activity",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"},filter:"Filter",collapseAllGroups:"Collapse all groups",openLeading:"Open -1 screen",backToMain:"Back to main screen"},es:{untitled:"Nuevo chat",signOut:"Cerrar sesión",help:"Ayuda",language:"Idioma",foreground:"Primer plano",background:"Fondo",chats:"Chats",activity:"Actividad",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados",filter:"Filtrar",collapseAllGroups:"Contraer todos los grupos",openLeading:"Abrir la pantalla -1",backToMain:"Volver a la pantalla principal"},fr:{untitled:"Nouveau chat",signOut:"Se déconnecter",help:"Aide",language:"Langue",foreground:"Premier plan",background:"Arrière-plan",chats:"Discussions",activity:"Activité",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées",filter:"Filtrer",collapseAllGroups:"Réduire tous les groupes",openLeading:"Ouvrir l’écran -1",backToMain:"Revenir à l’écran principal"},hi:{untitled:"नई चैट",signOut:"साइन आउट",help:"सहायता",language:"भाषा",foreground:"अग्रभूमि",background:"पृष्ठभूमि",chats:"चैट",activity:"गतिविधि",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत",filter:"फ़िल्टर",collapseAllGroups:"सभी समूह संक्षिप्त करें",openLeading:"-1 स्क्रीन खोलें",backToMain:"मुख्य स्क्रीन पर लौटें"},id:{untitled:"Obrolan baru",signOut:"Keluar",help:"Bantuan",language:"Bahasa",foreground:"Depan",background:"Latar",chats:"Obrolan",activity:"Aktivitas",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan",filter:"Filter",collapseAllGroups:"Ciutkan semua grup",openLeading:"Buka layar -1",backToMain:"Kembali ke layar utama"},it:{untitled:"Nuova chat",signOut:"Esci",help:"Aiuto",language:"Lingua",foreground:"Primo piano",background:"Sfondo",chats:"Chat",activity:"Attività",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate",filter:"Filtra",collapseAllGroups:"Comprimi tutti i gruppi",openLeading:"Apri la schermata -1",backToMain:"Torna alla schermata principale"},ja:{untitled:"新しいチャット",signOut:"サインアウト",help:"ヘルプ",language:"言語",foreground:"フォアグラウンド",background:"背景",chats:"チャット",activity:"アクティビティ",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み",filter:"フィルター",collapseAllGroups:"すべてのグループを折りたたむ",openLeading:"-1 画面を開く",backToMain:"メイン画面に戻る"},ko:{untitled:"새 채팅",signOut:"로그아웃",help:"도움말",language:"언어",foreground:"포그라운드",background:"배경",chats:"채팅",activity:"활동",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨",filter:"필터",collapseAllGroups:"모든 그룹 접기",openLeading:"-1 화면 열기",backToMain:"메인 화면으로 돌아가기"},"pt-BR":{untitled:"Novo chat",signOut:"Sair",help:"Ajuda",language:"Idioma",foreground:"Primeiro plano",background:"Fundo",chats:"Chats",activity:"Atividade",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas",filter:"Filtrar",collapseAllGroups:"Recolher todos os grupos",openLeading:"Abrir a tela -1",backToMain:"Voltar à tela principal"},ru:{untitled:"Новый чат",signOut:"Выйти",help:"Справка",language:"Язык",foreground:"Передний план",background:"Фон",chats:"Чаты",activity:"Активность",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве",filter:"Фильтр",collapseAllGroups:"Свернуть все группы",openLeading:"Открыть экран -1",backToMain:"На главный экран"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",signOut:"退出登录",help:"帮助",language:"语言",foreground:"前台",background:"后台",chats:"聊天",activity:"活动",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"},filter:"筛选",collapseAllGroups:"折叠全部分组",openLeading:"进入 -1 屏",backToMain:"返回主屏"}};
|
|
2
|
+
export{I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function lr(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
|
|
2
|
+
export{lr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-c13rnm7b.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function Fa(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function Mr({blocks:e}){return s(Ao,{files:Fa(e)})}function Ao({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{Fa,Mr,Ao};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{cr,Ve}from"./chunk-s1nfyggb.js";import{ar}from"./chunk-z6x70w62.js";import{bo,Co,Tt,Mt,wo}from"./chunk-sxz82jq3.js";import{cn as P}from"cn";import{ArrowUpIcon as ge,Loader2Icon as be,SquareIcon as ve,XIcon as he}from"lucide-react";import{Children as Y,useCallback as h,useEffect as F,useMemo as Pe,useRef as M,useState as Ie}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as xe,InputGroupAddon as ee,InputGroupButton as te}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Le}from"react/jsx-runtime";function Z(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var tr=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:re,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:ne,children:oe,...se})=>{let s=Mt(),l=!!s,ie=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ae,D]=Ie([]),c=l?s.attachments.files:ae,U=M(c);U.current=c;let ue=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),le=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let Q=[];for(let T of _){let V=I?.sourcePath(T);Q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...V===void 0?{}:{sourcePath:V}})}return[...i,...Q]})},[I,O,B,z,H,b]),pe=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),me=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:le,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(cr(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${Ve}MB.`});return}}W(r)},[c,W,b]),G=l?s.attachments.remove:pe,N=l?s.attachments.clear:me,q=l?s.attachments.openFileDialog:ue;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let ce=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},X=Pe(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:G,clear:N,openFileDialog:q,fileInputRef:x}),[c,L,G,N,q]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let J=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Z(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Z(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await ar(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await ne({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},de=(e)=>{e.preventDefault(),J(e).catch(y)},fe=h((e)=>{if(!e.trim())return;if(l&&s)ye(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),K=a(Co.Provider,{value:()=>J(null),children:Le(bo.Provider,{value:fe,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:re,onChange:ce,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:de,ref:A,"data-tour":"chat-input",...se,children:a(xe,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ie&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:oe})})]})});return l?a(Tt.Provider,{value:X,children:K}):a(wo.Provider,{value:X,children:K})};function nr({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function or({className:u,...o}){return a(ee,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function ir({className:u,...o}){return a(ee,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function rr({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var j=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||Y.count(y.children)<=1?"icon-xs":"xs";return a(te,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||Y.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},sr=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ge,{className:"size-4"});if(d==="submitted")g=a(be,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(ve,{className:"size-3 fill-current"});else if(d==="error")g=a(he,{className:"size-4"});return a(te,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
|
|
2
|
+
export{tr,nr,or,ir,rr,j,sr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function H({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
|
|
2
|
+
export{H};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u}from"./chunk-stv8pr4v.js";import{a,n}from"./chunk-ytdhstqx.js";import{N,v,f,ie}from"./chunk-c2ez86jz.js";import{A,me,vi}from"./chunk-yn6a84c7.js";import{mt}from"./chunk-cf85zhvf.js";import{V,re}from"./chunk-e00dz09f.js";import{De,pe}from"./chunk-j1frpcqd.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as Q,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as we,useSortable as le,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as se}from"@dnd-kit/utilities";import{cn as j}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as ae,StarIcon as be,Trash2Icon as ce}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as L}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as ee,DialogFooter as oe,DialogHeader as te,DialogTitle as ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as B,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:x}){let{attributes:w,listeners:I,setNodeRef:i,transform:m,transition:p,isDragging:M}=le({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:se.Transform.toString(m),transition:p},className:j("w-full min-w-0",M&&"opacity-50"),...w,...I,role:"group",children:x})}function Be({collection:l,children:C,onEdit:x,onConfirm:w,onNewChat:I}){let{t:i}=A(),m=pe(),p=me(),{attributes:M,listeners:d,setNodeRef:h,transform:R,transition:P,isDragging:H}=le({id:l.id,disabled:{draggable:l.id===V,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:se.Transform.toString(R),transition:P},className:j("w-full min-w-0",H&&"opacity-50"),children:e(ie,{open:!l.collapsed,onOpenChange:(c)=>p(m({type:"collapse",id:l.id,collapsed:!c})),label:re(l,i),count:l.sessionIds.length,leading:l.id===V?e(be,{className:"size-3.5"}):e(mt,{emoji:l.emoji,onChange:(c)=>p(m({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...d,role:"group",children:c}),actions:s(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:re(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==V&&s(B,{onClick:x,children:[e(he,{}),i("collection.rename")]}),s(B,{onClick:I,children:[e(ae,{}),i("collection.newChat")]}),s(B,{onClick:()=>w("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==V&&s(B,{variant:"destructive",onClick:()=>w("delete"),children:[e(ce,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Js({renderRow:l,onSelect:C,onNewChat:x,Scroll:w=He}){let I=A(),{t:i}=I,m=pe(),p=me(),M=a(),{collections:d,order:h}=De(),R=n((o)=>o.sessionList),P=n((o)=>o.archivedSessions),H=n((o)=>o.sessionListLoaded),c=n((o)=>o.sessionListError),G=Me(()=>new Map([...P,...R].map((o)=>[o.sessionId,o])),[P,R]),F=I.isMac??vi(),[y,E]=L(null),[k,z]=L(""),[U,K]=L(""),[S,T]=L(null),[g,_]=L(!1),de=Se(Q(ye,{activationConstraint:{distance:5}}),Q(Ce,{coordinateGetter:we})),O=h.flatMap((o)=>d[o].collapsed?[]:d[o].sessionIds.flatMap((t)=>{let r=G.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(F?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!O[r])return;t.preventDefault(),C(O[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[O,F,C]);let ue=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let J=b.type==="session"?String(b.collectionId):String(t.id);p(m({type:"move",sourceCollectionId:String(r.collectionId),collectionId:J,sessionId:String(r.sessionId),index:b.type==="session"?d[J].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==V)p(m({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},q=(o,t)=>{_(!0),p(o.then(t).finally(()=>_(!1)))};return s(ze,{children:[e(w,{children:s(N,{children:[s(f,{className:j(u,"font-normal"),onClick:()=>{E("new"),z(""),K("")},children:[e(v,{children:e(ae,{})}),e("span",{children:i("collection.newCollection")})]}),c&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>p(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:de,collisionDetection:ge,onDragEnd:ue,children:e(W,{items:h,strategy:X,children:e(N,{children:h.map((o)=>e(Be,{collection:d[o],onNewChat:()=>x(o),onEdit:()=>{E(o),z(d[o].name),K(d[o].emoji??"")},onConfirm:(t)=>T({id:o,type:t}),children:e(W,{items:d[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:X,children:d[o].sessionIds.map((t)=>{let r=G.get(t);if(r?.archived)return null;if(!r)return H?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(v,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>p(m({type:"remove",sessionId:t,collectionId:o})),children:e(ce,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(Y,{open:y!==null,onOpenChange:(o)=>{if(!o&&!g)E(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(o)=>{if(o.preventDefault(),y===null||!k.trim()||g)return;let t=y==="new"?`collection-${crypto.randomUUID()}`:y;q(m([y==="new"?{type:"create",id:t,name:k}:{type:"rename",id:t,name:k},{type:"emoji",id:t,emoji:U}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(o)=>z(o.target.value),disabled:g}),y!=="new"&&e(mt,{emoji:U,onChange:K}),s(oe,{children:[e(D,{type:"button",variant:"outline",disabled:g,onClick:()=>E(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:g||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:S!==null,onOpenChange:(o)=>{if(!o&&!g)T(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:S===null?"":re(d[S.id],i)})})]}),s(oe,{children:[e(D,{variant:"outline",disabled:g,onClick:()=>T(null),children:i("collection.cancel")}),e(D,{disabled:g,onClick:()=>{if(S!==null)q(m({type:S.type,id:S.id}),()=>T(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{Js};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-rragk2vb.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function Mo({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function No({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(Mo,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{Mo,No};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{fr}from"./chunk-sxz82jq3.js";import{Xi}from"./chunk-ja7x2gvb.js";import{ms}from"./chunk-q1kb5z75.js";import{m,_,_t}from"./chunk-ry7bxdb6.js";import{Ve}from"./chunk-s1nfyggb.js";import{tr,nr,or,ir,rr}from"./chunk-8f5w2tnp.js";import{dr,ur}from"./chunk-khs8cfkd.js";import{U}from"./chunk-4vayk46h.js";import{fo}from"./chunk-2w4kyd2a.js";import{mo}from"./chunk-zgqrv879.js";import{o}from"./chunk-rragk2vb.js";import{e}from"./chunk-n32wra9r.js";import{io,Li}from"./chunk-cq3j51m2.js";import{ro}from"./chunk-jv327stj.js";import{r,Ri,X,fn}from"./chunk-6p4gk1zy.js";import{un}from"./chunk-pxr5snwm.js";import{tt,mn}from"./chunk-x1aw1r1v.js";import{yn,bn}from"./chunk-ax7c2kam.js";import{Ni}from"./chunk-0jj029k8.js";import{wn}from"./chunk-an3nh155.js";import{Ai}from"./chunk-pw22g3k1.js";import{Cn}from"./chunk-n7y094nf.js";import{pn}from"./chunk-yryg27yy.js";import{Mi}from"./chunk-wk26bzjj.js";import{Di}from"./chunk-myjsfbp6.js";import{vn}from"./chunk-gxx5yh45.js";import{hasFuzzyFileSearch as jt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as qt,useLayoutEffect as nt,useMemo as pt,useRef as N,useState as M}from"react";import{jsx as s,jsxs as R}from"react/jsx-runtime";var Gt=["image/png","image/jpeg","image/webp","image/gif"],st=[];async function Qt(n){let T=await(await fetch(n.url)).blob();return new Promise((I,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Oe({session:n,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:mt,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:kt,attachmentPolicy:Dt,predictions:Nt=!0,disabled:St=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[ut,H]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[C,Ot]=M(()=>r.get(n.id)?.attachments??st),[y,Q]=M(()=>r.get(n.id)?.mentions??[]),[d,L]=M(()=>r.get(n.id)?.apps??[]),[ft,K]=M(()=>(r.get(n.id)?.apps?.length??0)>0||U(v,n.commands.map((t)=>t.name)).length>0),W=N(void 0),z=N(void 0);nt(()=>{if(d.length>0)K(!0)},[d.length]);let ot=C.some((t)=>tt(t)&&t.pastedText.status!=="ready"),[k,ht]=M(!1),[Y,Lt]=M(!1),[it,Wt]=M(!1),at=N(null),f=N(null),gt=N(null),c=N(ut),P=w((t)=>{gt.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),xt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),$t=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,lt=`${a.slice(0,l)}${t} ${a.slice(h)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(lt),K(!0)},[P]),yt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),Ut=Mi(n,P,L,d.length>0||y.length>0||C.length>0),bt=pt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},H(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:n.id,...c.current,selection:u}}}),[n.id]),j=N(null),vt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=n.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),J=(ft||d.length>0)&&!x,b=!St&&!dt&&n.attached&&!n.restoring&&!n.readOnly,D=!n.readOnly&&(Ft||b),Z=pn(n,b&&!k&&!Y&&!ot&&!it,v.length>0||C.length>0||y.length>0||d.length>0,Nt&&!x),Pt=Z.invalidate;nt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,d]),nt(()=>Ri(n.id,Ot),[n.id]),nt(()=>fn(n.id,(t)=>{if(!D||k)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||d.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,D,k,v,C,y,d,P]);let It=o((t)=>jt(t.agent)),zt=pt(()=>It&&b?async(t)=>un((await O.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[O,It,b,n.cwd]),ct=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);qt(()=>{f.current?.focus()},[]);let At=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ht(!0);let h=r.get(n.id),lt=c.current.revision,et=null;try{let A=d.map((p)=>({type:"resource_link",name:p.name,uri:`app://${p.id}`}));for(let p of y){let rt={kind:"file",absPath:p};A.push({type:"resource_link",uri:yn(rt),name:bn(rt)})}let Ct=ms(u,d);if(Ct.length>0)A.push({type:"text",text:Ct});for(let p of i)if(tt(p)){if(p.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:p.url,name:p.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Qt(p),mimeType:p.mediaType});if(c.current.revision===lt&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},et=c.current.revision,H(c.current),Q([]),L([]),W.current=void 0,z.current=void 0,X(n.id,()=>st),r.set(n.id,{text:"",attachments:st,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(p)=>{if(l.signal.aborted||j.current!==l)return;l.accept(p),S?.(n.id,p)});else if(l===null)await O.prompt(n.id,A);else{let p=await O.prompt(n.id,A);l.accept(p)}Pt();for(let p of h?.attachments??[])if(p.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((rt)=>rt.id===p.id))URL.revokeObjectURL(p.url)}catch(A){if(h&&et!==null&&c.current.revision===et&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:et+1},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(n.id,h),X(n.id,()=>h.attachments);throw A}finally{ht(!1),f.current?.focus()}},[O,n.id,n.state,y,d,T,I,S,Pt]),Bt=()=>{O.cancel(n.id).catch(B)},Ht=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Ve})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Kt=pt(()=>({session:n,ready:b,inputReady:D,sending:k,textareaRef:f,draft:bt,interruptRef:gt,observeReceipts:vt,addMention:ct,setAdding:Lt,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[n,b,D,k,bt,vt,ct,T,S,x]),wt=F.writeTextAttachment,Tt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:Ut,bashMode:I!==void 0,disabled:!D,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!J&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=_t(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=m(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(wt)mn(t,n.id,g("composer.pastedTextFilename"),wt)}};return s(ro,{value:Kt,children:s("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[mt&&s("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:mt}),s(fr,{attachmentPolicy:Dt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>X(n.id,()=>t),children:R("div",{ref:at,className:"relative",children:[G&&!it&&s(Xi,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>s(io,{anchorRef:at,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!D,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>$t(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>xt(i)),focusInput:yt}),searchFiles:zt,onMention:ct,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},J?"inline":"textarea"),R(tr,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:Gt.join(","),onError:Ht,onSubmit:At,onSubmitAsync:At,onSubmitError:B,canSubmit:()=>b&&!k&&!Y&&!ot&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[kt,R(or,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&s("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),s(Ni,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),s(ur,{children:(t)=>tt(t)?s(Ai,{data:t,sessionId:n.id}):s(dr,{data:t,t:g})})]}),R(nr,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab"||t.key==="ArrowRight"||t.key==="Enter")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&s("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),J?s(fo,{...Tt,skillIcon:F.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):s(mo,{...Tt,autoFocus:ft&&x})]}),s(ir,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[s(Li,{anchorRef:at,commands:n.commands,disabled:!D,agentDisabled:!b||x,agentControls:G,open:it,onOpenChange:Wt,focusInput:yt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
+
`)?i:`${i}
|
|
3
|
+
`,u=t.startsWith("$")?t:`/${t}`,l=`${a}${u} `;if(!J)z.current={text:i,apps:[]},W.current=l.length,K(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:xt}),Rt,G&&s(Cn,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),R(rr,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&s(vn,{session:n}),E??s(wn,{...q,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,s(Di,{active:V,sending:k||dt||Y,ready:b&&!ot&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:Bt})]})]})})]})]})})]})})})}
|
|
4
|
+
export{Oe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b}from"./chunk-kbax1frf.js";import{Wi,Zi,Qi,Ji}from"./chunk-jzbg0cx9.js";import{Dn,R,bt,S,wt}from"./chunk-c2r7xpjf.js";import{Bot as p}from"lucide-react";import{jsx as l}from"react/jsx-runtime";var r={"alwith-account":Wi,chatgpt:Zi,minimax:Qi,seedream:Ji};function Hi({provider:o,className:i,...a}){let e=Object.hasOwn(r,o)?r[o]:R.find((n)=>n.id===o)?.logo??p;return l(e,{"aria-hidden":"true",...a,className:["size-4 shrink-0",i].filter(Boolean).join(" ")})}var s=new Map(Dn.filter((o)=>o.source==="account").flatMap((o)=>o.models.map((i)=>[S(o.id,i.id),i.label]))),d=new Map([...Dn.map((o)=>[o.id,o.source==="account"?1:2]),[b.id,0]]);function Mn(o){return o.shortLabel??o.label}function Be(o,i={}){return o.toSorted((e,n)=>(d.get(e.id)??3)-(d.get(n.id)??3)).map((e)=>{let n=e.id===b.id;return{...e,models:e.models.map((t)=>({...t,label:s.get(t.api_id)??t.label,shortLabel:t.shortLabel??wt[t.api_id]?.shortLabel,icon:i.providerIcon?.(e.id,t.api_id)??l(Hi,{provider:n?"chatgpt":e.id==="litellm"||e.id==="alwith-managed-litellm"||bt(t.api_id)?"alwith-account":e.id})}))}})}
|
|
2
|
+
export{Hi,Mn,Be};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Aa(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function Pt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Aa(t,o))}return{imageFiles:n,sawNonImageFile:i}}function It(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function $n(e){return e.replace(s,"")}function Ca(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 qn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=$n(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-Ca(n,i)),r=Math.max(0,o-Ca(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
+
export{Aa,Pt,It,$n,Ca,qn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function Bi(e,t,i){let o=new Map;for(let a=0;a<t.length;a+=100){let r=await e("_codex/apps_read",{appIds:t.slice(a,a+100),...i?{threadId:i}:{},includeTools:!1});if(!r||typeof r!=="object"||!("apps"in r)||!Array.isArray(r.apps))throw Error("Invalid application metadata response");for(let n of r.apps){if(!n||typeof n.id!=="string"||n.iconUrl!==null&&typeof n.iconUrl!=="string"||n.iconUrlDark!==null&&typeof n.iconUrlDark!=="string")throw Error("Invalid application icon metadata");o.set(n.id,{iconUrl:n.iconUrl,iconUrlDark:n.iconUrlDark})}}return o}
|
|
2
|
+
export{Bi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{kt}from"./chunk-5c42mfat.js";import{o}from"./chunk-rragk2vb.js";import{e,C}from"./chunk-n32wra9r.js";import{Y,x,ee}from"./chunk-w5q2ygsa.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 w}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:B,onModelChange:h,onConfigChange:b,defaultGroup:G={id:"models",name:"Models"},catalog:I=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),p=F({sessionId:l,model:!0}),O=P&&(p.current.sessionId!==l||p.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=x(u,"model"),a=x(u,"thought_level"),v=u.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),_=v.filter(A),m=v.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(n,r)=>{if(r===n.currentValue)return Promise.resolve();p.current={sessionId:l,model:n===t};let d=b?b(n.configId,r):N.setConfig(l,n.configId,r);return C(c,d),d},g=a?Y(a):[],z=g.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?ee(t):i("composer.model"),S=(n)=>({api_id:n.value,label:n.name}),V=I(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(S)})):[{...G,models:t?Y(t).map(S):[]}]),y=V.flatMap((n)=>n.models),M=y.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return w(kt,{disabled:B||O||k,switching:O,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:y,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(h)h(n.api_id);else if(t)f(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:V,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(n)=>f(a,n)}:void 0,selectOptions:_.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:Y(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:w(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);f(d,r)}})}var wn=D(H);
|
|
2
|
+
export{wn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o}from"./chunk-rragk2vb.js";import{e}from"./chunk-n32wra9r.js";import{et,ht,Fe}from"./chunk-sqkdenb0.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function sn({sessionId:s}){let n=o((t)=>t.sessions),{host:u}=e(),d=o((t)=>t.actions),a=d.some((t)=>m(n,s,t.sessionId))?d.filter((t)=>m(n,s,t.sessionId)):p,i=a.filter(et).filter((t)=>{if(t.sessionId!==s||n[s]?.subagent!==void 0)return!0;let r=t.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((t)=>!et(t));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((t)=>f("div",{children:[t.sessionId!==s&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":n[t.sessionId]?.title??u.t("subagents.untitled")}),l(Fe,{action:t})]},t.id))}),i[0]!==void 0&&l(ht,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
+
export{sn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function go(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function St(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=go(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{go,St};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function Xn({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{Xn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-n32wra9r.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function ia({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
|
|
2
|
+
export{ia};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{U,Bt}from"./chunk-4vayk46h.js";import{BlocksIcon as l,BookOpenIcon as m,SquareSlashIcon as d}from"lucide-react";import{createContext as p,useContext as i}from"react";import{jsx as o,jsxs as f}from"react/jsx-runtime";var Zn=p({names:[]});function Qo({kind:n,name:r}){let{icon:c}=i(Zn),s=n==="skill"?c?.(r):void 0;return f("span",{className:Bt,children:[s?o("img",{src:s,alt:"","aria-hidden":"true",className:"size-3.5 shrink-0 self-center object-contain"}):o(n==="skill"?m:n==="command"?d:l,{className:"size-3.5 shrink-0 self-center","aria-hidden":"true"}),o("span",{children:r})]})}function ys({text:n,children:r}){let{names:c}=i(Zn),s=U(n,c);if(!s.length)return r;let t=[],a=0;for(let e of s)t.push(n.slice(a,e.start)),t.push(o("span",{"data-skill-reference":e.kind==="skill"?e.name:void 0,"data-command-reference":e.kind==="command"?e.name:void 0,children:o(Qo,{kind:e.kind,name:e.name.slice(1)})},e.start)),a=e.end;return t.push(n.slice(a)),t}
|
|
2
|
+
export{Zn,Qo,ys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function $r({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
|
|
2
|
+
export{$r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var pt="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function Xt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(pt))n()}),[e]);return d(t,()=>o(e.get(pt)))}async function Yt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[pt])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[pt]:i}})}
|
|
2
|
+
export{pt,Xt,Yt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ft}from"./chunk-26w51q10.js";import{Maximize2 as I,Minus as F,Plus as K}from"lucide-react";import{useCallback as O,useEffect as W,useEffectEvent as S,useLayoutEffect as B,useRef as z,useState as k}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as a,jsxs as C,Fragment as G}from"react/jsx-runtime";function Qr({image:u,actions:P,t:o}){let[n,R]=k(null),m=z(null),[d,Y]=k({width:0,height:0}),[X,E]=k(1),g=z(null),y=z(()=>{}),w=d.width&&d.height?Math.min(d.width/u.width,d.height/u.height):1,i=X??w,x=Math.min(0.1,w),M=Math.max(8,w);B(()=>{if(!n)return;let e=()=>Y({width:n.clientWidth,height:n.clientHeight});e();let r=new ResizeObserver(e);return r.observe(n),()=>r.disconnect()},[n]);let h=O((e,r)=>{if(!n||!m.current)return;let l=Math.min(M,Math.max(x,e));if(l===i)return;let s=n.getBoundingClientRect(),c=m.current.getBoundingClientRect(),f=Ft({container:n,target:m.current,clientX:r?.x??s.left+n.clientWidth/2,clientY:r?.y??s.top+n.clientHeight/2,currentScale:i,nextScale:l});g.current=f&&{...f,centerX:c.left-s.left+n.scrollLeft+c.width/2,centerY:c.top-s.top+n.scrollTop+c.height/2},E(l)},[M,x,i,n]);B(()=>{let e=g.current;if(!e||!n||!m.current)return;g.current=null;let r=n.getBoundingClientRect(),l=m.current.getBoundingClientRect();n.scrollLeft=e.left+l.left-r.left+n.scrollLeft+l.width/2-e.centerX,n.scrollTop=e.top+l.top-r.top+n.scrollTop+l.height/2-e.centerY});let L=S(()=>i),v=S((e,r)=>h(e,r));W(()=>{if(!n)return;let e=0,r=0,l=null,s=null,c={x:0,y:0},f=()=>{cancelAnimationFrame(e),e=0,r=0,l=null,s=null};y.current=f;let H=()=>{e=0,v(l??L()*Math.exp(-r/200),c),r=0,l=null},T=()=>{if(!e)e=requestAnimationFrame(H)},D=(t)=>{if(!t.ctrlKey&&!t.metaKey)return;if(t.preventDefault(),t.stopPropagation(),s!==null)return;r+=t.deltaY*(t.deltaMode===1?16:t.deltaMode===2?n.clientHeight:1),c={x:t.clientX,y:t.clientY},T()},N=(t)=>{if(!("scale"in t)||typeof t.scale!=="number"||!Number.isFinite(t.scale)||t.scale<=0)return;if(t.preventDefault(),t.stopPropagation(),t.type==="gesturestart")f(),s=L()/t.scale**2;if(s===null)return;if("clientX"in t&&typeof t.clientX==="number"&&"clientY"in t&&typeof t.clientY==="number")c={x:t.clientX,y:t.clientY};if(l=s*t.scale**2,T(),t.type==="gestureend")s=null};n.addEventListener("wheel",D,{passive:!1});for(let t of["gesturestart","gesturechange","gestureend"])n.addEventListener(t,N,{passive:!1});return()=>{f(),y.current=()=>{},n.removeEventListener("wheel",D);for(let t of["gesturestart","gesturechange","gestureend"])n.removeEventListener(t,N)}},[n]);let p=(e)=>{if(y.current(),g.current=null,E(e),n)n.scrollLeft=0,n.scrollTop=0};return C(G,{children:[a(A,{className:"sr-only",children:o("mermaid.diagram")}),a("div",{className:"flex shrink-0 items-center justify-end gap-1",children:P}),a("section",{ref:R,"aria-label":o("mermaid.preview"),tabIndex:0,className:"focus-visible:ring-ring min-h-0 min-w-0 flex-1 overflow-scroll overscroll-contain outline-none focus-visible:ring-2",onKeyDown:(e)=>{if(e.key==="+"||e.key==="=")e.preventDefault(),e.stopPropagation(),h(i*1.25);else if(e.key==="-")e.preventDefault(),e.stopPropagation(),h(i/1.25);else if(e.key==="0")e.preventDefault(),e.stopPropagation(),p(1)},children:a("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.ceil(u.width*i),height:Math.ceil(u.height*i)},children:a("img",{ref:m,src:u.src,alt:o("mermaid.diagram"),draggable:!1,onDoubleClick:()=>p(1),className:"block max-w-none select-none",style:{width:u.width*i,height:u.height*i}})})}),C("div",{className:"flex shrink-0 items-center justify-center gap-1",children:[a(b,{variant:"ghost",size:"icon-sm","aria-label":o("mermaid.zoomOut"),title:o("mermaid.zoomOut"),disabled:i<=x,onClick:()=>h(i/1.25),children:a(F,{})}),C(b,{variant:"ghost",className:"min-w-16 tabular-nums","aria-label":o("mermaid.actualSize"),title:o("mermaid.actualSize"),onClick:()=>p(1),children:[Math.round(i*100),"%"]}),a(b,{variant:"ghost",size:"icon-sm","aria-label":o("mermaid.zoomIn"),title:o("mermaid.zoomIn"),disabled:i>=M,onClick:()=>h(i*1.25),children:a(K,{})}),a(b,{variant:"ghost",size:"icon-sm","aria-label":o("mermaid.fit"),title:o("mermaid.fit"),onClick:()=>p(null),children:a(I,{})})]})]})}
|
|
2
|
+
export{Qr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s,a,on,n,h}from"./chunk-ytdhstqx.js";import{G}from"./chunk-jp4xjks0.js";import{Re}from"./chunk-c2ez86jz.js";import{Ie}from"./chunk-nqt9gyz9.js";import{dt,Te}from"./chunk-na6b1fpn.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 o,jsxs as b,Fragment as C}from"react/jsx-runtime";function Qn({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=s(),{t:f,i18n:S}=t,k=a(),l=n((i)=>i.runStates[e.sessionId]),I=on(),u=()=>m(e);return o(Re,{"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?o(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:o(B,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:d}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:dt(e.updatedAt,S.language)}):void 0,actions:l!=null?o(Ie,{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=n((r)=>F(r.agent)),S=n((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,u]=y(!1),i=R(!1);return o(Te,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)h(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&o(G,{icon:o(H,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?o(G,{icon:o(x,{}),label:d("sessionList.unarchive"),onClick:()=>void h(c,t.unarchive(e.sessionId))}):b(C,{children:[o(G,{icon:o(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)}))}}),o(G,{icon:o(D,{}),label:d("sessionList.archive"),onClick:()=>void h(c,t.archive(e.sessionId))})]}),o(G,{variant:"destructive",icon:o(N,{}),label:d("sessionList.delete"),onClick:p})]})})}
|
|
2
|
+
export{Qn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function
|
|
2
|
-
export{
|
|
1
|
+
var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function co(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
|
|
2
|
+
export{co};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function bi(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function to(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ye(t){return t.type==="array"}function rn(t){return(Ye(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{bi,to,Ye,rn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s,a,n,h}from"./chunk-ytdhstqx.js";import{z}from"./chunk-fyxetwxv.js";import{N,ie,Re}from"./chunk-c2ez86jz.js";import{Me,J,de}from"./chunk-vfszr27e.js";import{si}from"./chunk-bve6cykn.js";import{Ie}from"./chunk-nqt9gyz9.js";import{Te}from"./chunk-na6b1fpn.js";import{Ne}from"./chunk-zxfx7psd.js";import{Wt}from"./chunk-stse5bdv.js";import{ni}from"./chunk-51x80v4h.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Ls({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let R=s(),{t:L}=R,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=J((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&Me({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=J((t)=>t.activityCollapsedGroups),o=de(),x=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),I=(t)=>{if(b?.(t))return;d(t)},D=ni();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!si(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=x[r-1];if(!y)return;e.preventDefault(),I(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&D?c(G,{children:Ne(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(N,{children:g.map((t)=>t.key==="foreground"?c(N,{children:t.rows.map(A)},t.key):c(ie,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:R,actions:L,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=Wt(i.sessionId,d);return P(H,{children:[c(Re,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Te,{sessionRow:i,actions:L}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:R,hint:S,actions:c(Ie,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((o)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(z,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
+
export{Ls};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function ws({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function c(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function O(t){let{Markdown:o}=c();return e(o,{...t})}
|
|
2
|
+
export{ws,c,O};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Le,u}from"./chunk-stv8pr4v.js";import{H}from"./chunk-8hygfx41.js";import{z}from"./chunk-fyxetwxv.js";import{E}from"./chunk-44r55va6.js";import{gt,Je,ft}from"./chunk-jgqt7k0h.js";import{PreviewCard as C}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as M,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function N(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function v({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function f({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function ie({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:b,headerChildren:g,wrapHeader:c,onHeaderClick:P,children:y}){let R=()=>{P?.(),t(!o)},x=p(gt,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),S=d(K,{children:[r!=null&&e(v,{children:r}),g??e(H,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(ft,{content:s!==void 0?e(Je,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:b})})]}),k=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,u),onClick:R,onKeyDown:(m)=>{if(m.target!==m.currentTarget)return;if(m.key!=="Enter"&&m.key!==" ")return;m.preventDefault(),R()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[c===void 0?k:c(k),o&&e(N,{className:"mt-0.5",children:y})]})}var _=T(()=>{}),G=T(()=>{});function tn(){return L(G)}function Ee(){return L(_)}function Re({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:b,preview:g,listeningPorts:c,onOpenPort:P,accessory:y,meta:R,hint:x,actions:S,className:k,...m}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(gt,Le,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||c!=null&&c.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...m,children:[e(v,{children:t!=null?e(z,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(H,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),b!=null&&e(H,{className:"text-muted-foreground text-xs",children:b}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),c!=null&&c.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:c.map((w)=>P?d("button",{type:"button",className:"underline",onPointerDown:(h)=>h.stopPropagation(),onKeyDown:(h)=>h.stopPropagation(),onClick:(h)=>{h.stopPropagation(),P(w)},children:[":",w]},w):d("span",{children:[":",w]},w))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(ft,{content:y!=null?e(Je,{children:y}):R??e(Je,{}),actions:S}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return O;return e(q,{row:O,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(_.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return E(o),d(C.Root,{open:o,onOpenChange:t,children:[e(C.Trigger,{render:n,delay:700,closeDelay:100}),e(C.Portal,{children:e(C.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(C.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
+
export{N,v,f,ie,tn,Ee,Re};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ki,Un,Bn,Gn,zn}from"./chunk-jzbg0cx9.js";import{Hn}from"./chunk-7jk8s061.js";var Dn=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",webSearch:"deepseek",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var a=Dn,p={anthropic:Ki,deepseek:Un,openrouter:Gn,qwen:zn,xai:Bn};function c(e){let n=p[e];if(!n)throw Error(`Provider ${e} has no logo`);return n}var R=a.filter((e)=>e.source!=="account").map(({source:e,...n})=>({...n,logo:c(n.id)}));function bt(e){return e!=null&&a.some((n)=>n.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(n.id)}:`))}function Ct(e){let n=JSON.parse(e);if(!Array.isArray(n)||n.length===0)throw Error("Add at least one model");let t=new Set;return n.map((i)=>{if(typeof i!=="object"||i===null||Array.isArray(i))throw Error("Each model must be an object");let o=i,s=typeof o.label==="string"?o.label.trim():"",r=typeof o.api_id==="string"?o.api_id.trim():"";if(s===""||r==="")throw Error("Model label and API ID cannot be empty");if(t.has(r))throw Error("Model IDs must be unique");if(t.add(r),o.contextWindow!==void 0&&o.contextWindow!==null&&(!Number.isSafeInteger(o.contextWindow)||o.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(o.description!==void 0&&typeof o.description!=="string")throw Error("Model description must be a string");return{label:s,api_id:r,...o.contextWindow===void 0?{}:{contextWindow:o.contextWindow},...o.description===void 0?{}:{description:o.description}}})}function he(e){return[...R.filter((n)=>e.providers[n.id]!==void 0).map((n)=>({id:n.id,name:n.name,models:n.models})),...[...e.customProviders,...e.managedProviders??[]].map((n)=>({id:n.id,name:n.name,models:n.models.map((t)=>({id:t.api_id,label:t.label,...t.description==null?{}:{description:t.description}}))}))]}function S(e,n){let t=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(i)=>i.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(t)}:${encodeURIComponent(n)}`}function ya(e,n,t="session",i=bt){let o=he(n).flatMap((s)=>s.models.map((r)=>S(s.id,r.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(e!==null&&t==="session")throw Error(i(e)?"The selected ALwith account model is unavailable. Select another model before sending.":"The selected model connection is unavailable. Select another model before sending.");return o[0]??null}function se(e,n){if(!e.regions)return null;let t=e.regions.find((i)=>i.id===n)??e.regions[0];if(!t)throw Error(`Provider ${e.id} declares no regions`);return t}function Fn(e,n){return se(e,n)?.keyUrl??e.keyUrl??null}function On(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function xa(e){let n=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!n)return null;let t=decodeURIComponent(n[1]),i=Hn.models.find((o)=>o.slug===t);return i?{value:i.default_reasoning_level,hidden:i.supported_reasoning_levels.length===0}:null}var wt=l;function ba(e){return wt[e]??{}}
|
|
2
|
+
export{Dn,R,bt,Ct,he,S,ya,se,Fn,On,xa,wt,ba};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{A}from"./chunk-yn6a84c7.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as b}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function mt({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=A();return n(x,{open:m,onOpenChange:r,children:[o(b,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
|
|
2
|
+
export{mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{St}from"./chunk-arm9x6kc.js";import{it}from"./chunk-z76as4dt.js";import{l}from"./chunk-6283nzqs.js";import{g}from"./chunk-sxz82jq3.js";import{j}from"./chunk-8f5w2tnp.js";import{e}from"./chunk-n32wra9r.js";import{BlocksIcon as Q,BookOpenIcon as Y,PaperclipIcon as Z,PlusIcon as q,SquareSlashIcon as ee}from"lucide-react";import{useEffect as z,useLayoutEffect as te,useRef as S,useState as M}from"react";import{createPortal as ne}from"react-dom";import{Button as se}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as I,Fragment as oe}from"react/jsx-runtime";function io({anchorRef:r,commands:k,disabled:i,agentDisabled:c,open:a,onCommand:E,onApp:h,focusInput:L,includeAttachment:f,query:y="",onClose:p,triggerRef:B}){let{client:v,host:N}=e(),{t:d}=N,G=g(),P=S(null),[D,C]=M(null),x=`${a}:${f}:${y}`,[X,U]=M(x);if(X!==x)U(x),C(null);let[F,H]=M([]),[O,T]=M("loading");z(()=>{if(!a||c||!v.installedApps)return;let t=!0;return T("loading"),H([]),v.installedApps().then(({apps:s})=>{if(!t)return;H(s.filter((u)=>u.enabled&&u.callable)),T("ready")},(s)=>{if(!t)return;T("error"),N.reportError?.(s)}),()=>{t=!1}},[a,c,v,N]);let K=(t)=>{if(t.disabled)return;p(),t.run(),L()},W=it(k,y,Number.MAX_SAFE_INTEGER),_=(t)=>({key:`command:${t.key}`,label:t.payload.startsWith("$")?t.label.slice(1):t.label,description:t.description,skillName:t.payload.startsWith("$")?t.payload.slice(1):void 0,disabled:i||c,run:()=>E(t.payload)}),V=St(F,y,(t)=>t.runtimeName||t.id,Number.MAX_SAFE_INTEGER).map(({item:t})=>t),R=[{id:"commands",label:d(f?"composer.attachmentsAndCommands":"composer.commands"),entries:[...f?[{key:"attachment",label:d("composer.addAttachment"),disabled:i,run:()=>G.openFileDialog()}]:[],...W.filter((t)=>!t.payload.startsWith("$")).map(_)],status:void 0},{id:"skills",label:d("composer.skills"),entries:W.filter((t)=>t.payload.startsWith("$")).map(_),status:void 0},{id:"apps",label:d("composer.apps"),entries:V.map((t)=>({key:`app:${t.id}`,label:t.runtimeName||t.id,disabled:i||c,run:()=>h({id:t.id,name:t.runtimeName||t.id})})),status:O==="loading"?d("composer.appsLoading"):O==="error"?d("composer.appsFailed"):F.length===0&&!y.trim()?d("composer.appsEmpty"):void 0}].filter((t)=>(t.id!=="apps"||!c&&Boolean(v.installedApps))&&(!y.trim()||t.entries.length>0||t.status)),m=R.flatMap((t)=>t.entries).filter((t)=>!t.disabled),b=m.some((t)=>t.key===D)?D:m[0]?.key;if(z(()=>{if(!a)return;let t=L();if(!t)throw Error("The composer input is missing");let s=(n)=>{if(n.target instanceof Node&&!P.current?.contains(n.target)&&!B?.current?.contains(n.target)&&!t.contains(n.target))p()},u=(n)=>{if(n.isComposing||n.keyCode===229)return;if(n.key==="Escape")n.preventDefault(),n.stopPropagation(),p();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault(),n.stopPropagation();let w=m.findIndex((J)=>J.key===b),A=Math.max(0,Math.min(m.length-1,w+(n.key==="ArrowDown"?1:-1)));if(m[A])C(m[A].key)}else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let w=m.find((A)=>A.key===b);if(w)K(w)}};if(t.addEventListener("keydown",u,!0),f)t.addEventListener("input",p);return t.addEventListener("blur",p),document.addEventListener("pointerdown",s,!0),()=>{t.removeEventListener("keydown",u,!0),t.removeEventListener("input",p),t.removeEventListener("blur",p),document.removeEventListener("pointerdown",s,!0)}},[a,b,m,L,p,f,B]),te(()=>{if(a)P.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})},[a,b]),!a)return null;if(!r.current)throw Error("The composer menu anchor is missing");return ne(o("div",{className:l.position,children:o("div",{ref:P,role:"listbox","aria-label":d(f?"composer.add":"composer.commands"),onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:I("div",{className:l.list,children:[R.length===0&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:d("composer.addEmpty")}),R.map((t)=>I("div",{role:"group","aria-label":t.label,children:[o("div",{className:l.group,children:t.label}),t.entries.map((s)=>{let u=s.key==="attachment"?Z:t.id==="skills"?Y:t.id==="apps"?Q:ee,n=s.skillName===void 0?void 0:N.skillIcon?.(s.skillName);return I(se,{type:"button",variant:"ghost",role:"option",disabled:s.disabled,"aria-selected":s.key===b,onMouseEnter:()=>{if(!s.disabled)C(s.key)},onClick:()=>K(s),className:`${l.row}${s.key===b?` ${l.selected}`:""}`,children:[n?o("img",{src:n,alt:"","aria-hidden":"true",className:`${l.icon} object-contain`}):o(u,{className:l.icon}),o("span",{className:l.label,children:s.label}),s.description&&o("span",{"data-slot":"description",className:l.description,children:s.description})]},s.key)}),t.status&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:t.status})]},t.id))]})})}),r.current)}function Li({agentControls:r,onOpenChange:k,...i}){let{host:c}=e(),a=g(),E=S(null),h=S(!1);return I(oe,{children:[o(j,{ref:E,disabled:i.disabled,"aria-label":c.t(r?"composer.add":"composer.attachImage"),title:c.t(r?"composer.add":"composer.attachImage"),"aria-haspopup":r?"listbox":void 0,"aria-expanded":r?i.open:void 0,className:"text-foreground",onPointerDown:()=>{h.current=i.open},onClick:()=>{if(r)k(!h.current),i.focusInput();else a.openFileDialog()},children:o(q,{className:"size-4"})}),r&&i.open&&o(io,{...i,includeAttachment:!0,onClose:()=>k(!1),triggerRef:E})]})}
|
|
2
|
+
export{io,Li};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Dt}from"./chunk-gxb9n7g7.js";import{d,Ze}from"./chunk-j5dqww4h.js";import{k}from"./chunk-qk1yqepm.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}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 Yo(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(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 Se({path:n,renderHeader:s,description:t}){let e=d(),{t:l}=e,c=e.readFile,[a,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{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,M,c]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(y,{})}),i(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Ze(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Ze(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)Ze(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(x):o("div",{className:"flex justify-end",children:x}),o(k,{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(h,{variant:"outline",size:"sm",onClick:()=>N((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(Dt,{text:Yo(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
|
+
export{Yo,Se};
|