@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
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{s,a,n}from"./chunk-ytdhstqx.js";import{Qe,ue,oe}from"./chunk-zft4afb8.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as de,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as r}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function Us({Scroll:u=we}){let{t:i,i18n:A}=s(),m=a(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[se,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ie=[...new Set(S.filter((e)=>o&&j(o,e).id!==oe).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),ne=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===oe;return L(e).toLocaleLowerCase(A.language).includes(ne)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),ae=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function re(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function le(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
+
`));else f(null)}finally{h.current=!1,w(!1)}}return r("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[r("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[r("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),r(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),r("div",{className:"flex shrink-0 flex-wrap gap-3",children:[r("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),r(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[r(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),r(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");Z(e)},children:[r(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):ue(p,o??void 0)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ie.map((e)=>t(x,{value:e,title:e,children:ue(e,o??void 0)},e))]})]})]}),r(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?r("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:r(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>te((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?r("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(de,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(o?Qe(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>r("section",{className:"flex flex-col gap-3",children:[r("div",{className:"flex items-center justify-between gap-3",children:[r("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===oe?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===oe?i("sessionList.archives.noProject"):ue(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>r("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[r("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:ae.format(new Date(l.updatedAt))})]}),r("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void re(l),children:i("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:r(ge,{showCloseButton:!C,children:[r(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(se?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),r(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),r(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void le(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
+
export{Us};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ft}from"./chunk-26w51q10.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function pr({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Ft({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{pr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var Q="toolbox-content pb-8",_e="toolbox-detail flex max-h-[85dvh] flex-col gap-6 overflow-hidden rounded-2xl p-6 sm:max-w-3xl";function Pe({children:e}){return o("div",{className:"toolbox-content shrink-0 pt-8",children:o("div",{className:"toolbox-toolbar flex min-h-9 items-center [&>header]:w-full [&>nav]:w-full","data-plugin-page-header":"",children:e})})}
|
|
2
|
+
export{Q,_e,Pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{g}from"./chunk-sxz82jq3.js";import{e}from"./chunk-n32wra9r.js";import{yt}from"./chunk-x1aw1r1v.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ai({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=g(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>yt(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
|
|
2
|
+
export{Ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function
|
|
2
|
-
export{
|
|
1
|
+
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function un(t,o=50){return t.slice(0,o).map((e)=>{let r=a(e);return{key:r,label:e.path,payload:r,description:e.match_type==="directory"?"/":""}})}
|
|
2
|
+
export{un};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useCallback as f,useState as r}from"react";var t=new Map;function M(o,e,a=!1){let[p,S]=r(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
|
|
2
|
+
export{M};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ce}from"./chunk-dr5swvaa.js";function w(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ut(e){if(!e.includes("app://"))return[];let n=Ce(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=w(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function _a(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function ms(e,n){return[_a(n),e.trim()].filter(Boolean).join(" ")}function gs(e,n){let r=_a(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
+
export{w,Ut,_a,ms,gs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Rn}from"./chunk-6z3fgkkp.js";import{uo,te}from"./chunk-n6erf29r.js";import{Vi}from"./chunk-x8rfc6wc.js";function Gi(d,a){return Rn({...uo.definitions[0],revision:uo.revision,autoApprove:(i)=>a(i)!==void 0,parse(i){let e=i;if(!e||typeof e!=="object"||Array.isArray(e)||typeof e.prompt!=="string"||!e.prompt.trim()||Object.keys(e).some((n)=>n!=="prompt"&&n!=="references")||e.references!==void 0&&(!Array.isArray(e.references)||e.references.some((n)=>typeof n!=="string")))throw Error("Invalid image instructions or references");return{prompt:e.prompt,references:e.references}},async execute(i,{sessionId:e,toolCallId:n,signal:c,agent:l}){let t=a(e);if(!t)throw Error("Image request is no longer active");let g=i.references,m=(g??[...t.references.keys()].filter((r)=>r.startsWith("attachment:"))).map((r)=>{let s=t.references.get(r);if(!s)throw Error(`Unknown image reference: ${r}`);return s}),o=te(t.selection);if(m.length>o.maxReferences)throw Error(`This model supports ${o.maxReferences} references`);let f=Vi(i.prompt,t.aspect),p=o.provider==="chatgpt"?await l.request("_codex/images/generate",{prompt:f,images:m},{cancellationSignal:c}):await d.generateExternal(t.selection,f,m,c);if(c.throwIfAborted(),a(e)!==t)throw Error("Image request was cancelled or replaced");return p.images.forEach((r,s)=>t.references.set(`${String(n)}:${s+1}`,`data:${r.mimeType};base64,${r.data}`)),{success:!0,contentItems:[{type:"text",text:JSON.stringify({kind:"alwith.image",version:1,model:o.id,size:t.selection.size,displayed:!0,message:"The application already displays these images and provides downloads. Finish with the returned image reference; do not regenerate, echo image data or write files to deliver this result.",references:g??[],images:p.images.map((r,s)=>({reference:`${String(n)}:${s+1}`}))})},...p.images.map((r)=>({type:"image",...r}))]}}})}
|
|
2
|
+
export{Gi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var aa={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function _i(e){return[...e].toSorted((o,n)=>(aa[o.kind]??99)-(aa[n.kind]??99))}function ja(e){return e==="allow_once"||e==="allow_always"}function $a(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{aa,_i,ja,$a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function k({nativeScroll:f=!1,className:t,viewportClassName:n,viewportRef:i,onScroll:s,viewportProps:a,children:c,...m}){let[p,l]=v(!1);if(f)return e("div",{className:o("relative flex min-h-0 flex-1",t),...m,children:e("div",{ref:i,onScroll:s,...a,className:o("min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",n,a?.className),children:c})});return u(r.Root,{"data-slot":"scroll-area",className:o("relative min-h-0 flex-1 pe-[var(--app-scrollbar-track-size)]",t),...m,children:[e(r.Viewport,{ref:i,onScroll:s,"data-slot":"scroll-area-viewport",...a,className:o("size-full rounded-[inherit] pe-2 outline-none",n,a?.className),children:c}),e(r.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":"vertical",orientation:"vertical","data-dragging":p?"":void 0,onPointerDownCapture:(d)=>{if(d.button===0)l(!0)},onPointerUpCapture:()=>l(!1),onPointerCancelCapture:()=>l(!1),onLostPointerCapture:()=>l(!1),className:"flex h-full w-[var(--app-scrollbar-track-size)] touch-none px-[var(--app-scrollbar-edge-gap)] select-none",children:e(r.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}),e(r.Corner,{})]})}
|
|
2
|
+
export{k};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./chunk-rragk2vb.js";import{Rt}from"./chunk-xvg3d2z6.js";import{Dr}from"./chunk-d0s10qy5.js";import{D}from"./chunk-4gftpery.js";import{zo}from"./chunk-ert67qk1.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(D,{block:e.content},`${n.id}:${l}`))]})}var Eo=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(zo),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...Dr(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(Rt,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
+
export{Eo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{te}from"./chunk-n6erf29r.js";import{xt}from"./chunk-etvdqkvb.js";var fe={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:xt,parseConfig(e){if(typeof e.model!=="string"||typeof e.size!=="string"||Object.keys(e).some((t)=>t!=="model"&&t!=="size"))throw Error("Invalid image input config");let o={model:e.model,size:e.size};return te(o),o},routePrompt(e){return e.image()}};
|
|
2
|
+
export{fe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ws}from"./chunk-c13rnm7b.js";import{createContext as s,useContext as i,useSyncExternalStore as m}from"react";import{jsx as l}from"react/jsx-runtime";var u=s(null),c=s(null),$o=s(null);function ae(){return i($o)}function $e({host:e,client:n,children:r}){return l(ws,{host:e,children:l(u,{value:e,children:l(c,{value:n,children:r})})})}function t(){let e=i(u);if(e===null)throw Error("Timeline host is missing");return e}function qe(){let e=i(c);if(e===null)throw Error("Timeline client is missing");return e}function y(e,n){return m((r)=>e.subscribe(r),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=qe();return y(n.store,e)}function qo(){return i(u)!==null}function le(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
+
export{$o,ae,$e,t,qe,y,o,qo,le};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{w}from"./chunk-q1kb5z75.js";var yo="application/x-alwith-app-references+json";function m(n){let r=[],t=n.apps.map((e,o)=>({app:e,order:o,offset:Math.max(0,Math.min(n.text.length,e.offset??0))})).sort((e,o)=>e.offset-o.offset||e.order-o.order),i=0;for(let{app:e,offset:o}of t)r.push(...n.text.slice(i,o).split(""),e),i=o;return r.push(...n.text.slice(i).split("")),r}function _(n){let r="",t=[],i=new Set;for(let e of n)if(typeof e==="string")r+=e;else if(!i.has(e.id))i.add(e.id),t.push({...e,offset:r.length});return{text:r,apps:t}}function jn(n,r){return n.slice(0,r).filter((t)=>typeof t==="string").length}function xo(n,r){let t=0;for(let i=0;i<n.length;i++){if(typeof n[i]!=="string")continue;if(t===r)return i;t++}return n.length}function _t(n){let r=n.getData(yo);if(!r)return null;let t;try{t=JSON.parse(r)}catch{return null}if(typeof t!=="object"||t===null||!("version"in t)||t.version!==1||!("text"in t)||typeof t.text!=="string"||!("apps"in t)||!Array.isArray(t.apps))return null;let i=[];for(let e of t.apps){if(typeof e!=="object"||e===null||typeof e.id!=="string"||w(`app://${e.id}`)!==e.id||typeof e.name!=="string"||!e.name.trim()||!Number.isInteger(e.offset)||e.offset<0||e.offset>t.text.length)return null;if(e.iconUrl!=null&&typeof e.iconUrl!=="string"||e.iconUrlDark!=null&&typeof e.iconUrlDark!=="string")return null;i.push({id:e.id,name:e.name,offset:e.offset,...e.iconUrl?{iconUrl:e.iconUrl}:{},...e.iconUrlDark?{iconUrlDark:e.iconUrlDark}:{}})}return _(m({text:t.text,apps:i}))}
|
|
2
|
+
export{yo,m,_,jn,xo,_t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function*_o(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function xr(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of _o(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
+
export{_o,xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as r}from"@alwith/api/client";var at=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function es(e){at.setState({...e,terminals:e.terminals??{}})}function ts(e){if(at.getState().sessionId===e)at.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function ns(e,n,t){let i=at.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
|
|
2
|
+
export{at,es,ts,ns};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-ytdhstqx.js";import{Me,J,de}from"./chunk-vfszr27e.js";import{useEffect as S,useMemo as f}from"react";function Ms(s){let c=J((i)=>i.activityOrder),a=n((i)=>{let o=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&Me(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(o)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=J((i)=>i.activitySeen),r=de();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,o])=>u.get(i)!==o)}
|
|
2
|
+
export{Ms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t,
|
|
1
|
+
import{t,le}from"./chunk-rragk2vb.js";import{jo}from"./chunk-4gftpery.js";import{Uo,Jr}from"./chunk-6f06hbsk.js";import{Qr}from"./chunk-brv52tgj.js";import{Code as P,Copy as I,Download as k,Eye as B,Maximize2 as L,MoreHorizontal as H,X as O}from"lucide-react";import{useEffect as R,useId as V,useMemo as _,useRef as F,useState as u}from"react";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as A,DialogClose as U,DialogContent as X}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as j,DropdownMenuContent as q,DropdownMenuItem as y,DropdownMenuTrigger as G}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as l,Fragment as K}from"react/jsx-runtime";function J(m){let r=getComputedStyle(m),e=document.createElement("canvas").getContext("2d");if(!e)throw Error("Unable to resolve diagram colors");let i=(p)=>{e.clearRect(0,0,1,1),e.fillStyle=r.backgroundColor,e.fillRect(0,0,1,1),e.fillStyle=p,e.fillRect(0,0,1,1);let[n,s,d]=e.getImageData(0,0,1,1).data;return`#${[n,s,d].map((f)=>f.toString(16).padStart(2,"0")).join("")}`};return{background:i(r.backgroundColor),primaryColor:i(r.getPropertyValue("--muted").trim()),primaryTextColor:i(r.color),primaryBorderColor:i(r.getPropertyValue("--border").trim()),lineColor:i(r.getPropertyValue("--muted-foreground").trim())}}function Ho({source:m}){let r=t(),{t:e,theme:i}=r,p=`mermaid-${V().replaceAll(":","")}`,[n,s]=u(null),[d,f]=u(!1),[h,b]=u(!1),[v,C]=u(!1),[x,z]=u(!1),c=F(null),g=_(()=>n===null?null:Uo(n),[n]);R(()=>{let a=!1;return s(null),(async()=>{try{let M=await import("mermaid");if(a||c.current===null)return;let S=M.default;S.initialize({startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,theme:"base",themeVariables:{...J(c.current),darkMode:i==="dark"}});let N=await S.render(p,m);if(!a)s(N.svg)}catch{if(!a)s(null)}})(),()=>{a=!0}},[p,i,m]);let T=async()=>{try{await(r.copyText?r.copyText(m):navigator.clipboard.writeText(m))}catch(a){if(r.onCopyError)r.onCopyError(a);else le(r,a)}},D=async()=>{if(n===null||c.current===null||v)return;C(!0);try{let a=await Jr(n,getComputedStyle(c.current).backgroundColor);if(r.saveFile)await r.saveFile("mermaid.png",a);else jo("mermaid.png",`data:image/png;base64,${a}`)}catch(a){le(r,a)}finally{C(!1)}},E=o(w,{variant:"ghost",size:"icon-sm","aria-label":e("mermaid.downloadPng"),title:e("mermaid.downloadPng"),disabled:n===null||v,onClick:()=>void D(),children:o(k,{className:"size-4"})});return l("div",{ref:c,className:"group/mermaid bg-background relative my-3 min-w-0 rounded-lg",children:[l("div",{"data-open":x,className:"absolute top-2 right-2 z-10 flex gap-1 opacity-0 transition-opacity group-focus-within/mermaid:opacity-100 group-hover/mermaid:opacity-100 data-[open=true]:opacity-100 [@media(hover:none)]:opacity-100",children:[l(j,{open:x,onOpenChange:z,children:[o(G,{"aria-label":e("mermaid.options"),title:e("mermaid.options"),render:o(w,{variant:"ghost",size:"icon-sm"}),children:o(H,{className:"size-4"})}),l(q,{align:"end",className:"w-40",children:[l(y,{disabled:n===null,onClick:()=>f((a)=>!a),children:[d?o(B,{}):o(P,{}),d?e("mermaid.viewDiagram"):e("mermaid.viewSource")]}),l(y,{onClick:()=>void T(),children:[o(I,{}),e("mermaid.copySource")]}),l(y,{disabled:n===null||v,onClick:()=>void D(),children:[o(k,{}),e("mermaid.downloadPng")]})]})]}),o(w,{variant:"ghost",size:"icon-sm","aria-label":e("mermaid.expand"),title:e("mermaid.expand"),disabled:n===null,onClick:()=>b(!0),children:o(L,{className:"size-4"})})]}),d||n===null?o("pre",{className:"bg-muted/30 overflow-x-auto rounded-lg p-3 pt-11 text-xs",children:o("code",{children:m})}):o("div",{className:"overflow-x-auto rounded-lg px-3 pt-10 pb-3 [&_svg]:mx-auto [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:n}}),o(A,{open:h&&g!==null,onOpenChange:b,children:o(X,{showCloseButton:!1,className:"bg-background flex h-[calc(100dvh-clamp(1.5rem,10dvh,6rem))] w-[calc(100vw-clamp(1.5rem,10vw,8rem))] max-w-none flex-col gap-2 overflow-hidden p-2 sm:max-w-none sm:p-4",children:h&&g&&o(Qr,{image:g,t:e,actions:l(K,{children:[E,o(U,{"aria-label":e("mermaid.closePreview"),title:e("mermaid.closePreview"),render:o(w,{variant:"ghost",size:"icon-sm"}),children:o(O,{className:"size-4"})})]})},g.src)})})]})}
|
|
2
2
|
export{Ho};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{ki}from"./chunk-0s2zcz5f.js";import{Pi}from"./chunk-809b75k1.js";import{Si}from"./chunk-x2wcwpw3.js";import{vt}from"./chunk-gttw4rmx.js";import{o}from"./chunk-rragk2vb.js";import{e}from"./chunk-n32wra9r.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function et(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
|
|
2
|
+
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(vt,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(ki,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function ht({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Pi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function Fe({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(et(t))return a(ht,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Si,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
+
export{et,ht,Fe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,n}from"./chunk-ytdhstqx.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Wt(e,o){let s=a(),c=n((t)=>t.connection),r=n((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=n((t)=>v(t.sessions[e]?.items)),f=n((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||r)return;let t=!1,l,i=0,m=async()=>{try{let d=await s.activityReply(e);if(i=0,!t)y(d??void 0)}catch{i++}finally{if(!t&&(o==="running"||i>0&&i<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,r,o]),r?u:p??u}
|
|
2
|
+
export{Wt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function ye({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
|
|
2
|
+
export{ye};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as I,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as I,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),bo=d(null);function Ya(){return i(bo)}var Co=d(null);function el(){return i(Co)}var Tt=d(null);function ve(){let r=i(F);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var Mt=()=>i(F);function tl(){let r=i(Tt);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i(Tt);function fr({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:A,attachmentPolicy:f,value:R,onValueChange:y,attachments:U,onAttachmentsChange:L,children:B}){let S=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),T=R!==void 0,[G,J]=z(r),p=R??G,o=I({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let W=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,T)y?.(t);else J(t)},[T,y]),h=n(()=>P(""),[P]),x=U!==void 0,[K,N]=z([]),v=U??K,b=I(v);b.current=v;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(x)L?.(e);else N(e)},[x,L]),j=I(null),w=I(()=>{}),O=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let _=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:S(u),filename:u.name,size:u.size,lastModified:u.lastModified,..._===void 0?{}:{sourcePath:_}}})]})},[f,S,s]),M=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),A?.()},[A,s]),E=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(x)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let k=n(()=>{w.current?.()},[]),C=q(()=>({files:v,add:O,remove:M,clear:E,openFileDialog:k,fileInputRef:j}),[v,O,M,E,k]),H=n((t,e)=>{j.current=t.current,w.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:P,clear:h,getRevision:W,clearSubmitted:c??h},attachments:C,__registerFileInput:H}),[p,P,h,W,c,C,H]);return D(F.Provider,{value:Q,children:D(Tt.Provider,{value:C,children:B})})}var wo=d(null);function g(){let r=X(),l=i(wo),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
+
export{bo,Ya,Co,el,Tt,ve,Mt,tl,fr,wo,g};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{F,Wo,fs,Wn,hs,Zo,vs}from"./chunk-3qy743j9.js";import{t,qe,y,o}from"./chunk-rragk2vb.js";import{je}from"./chunk-vnwt4f99.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var v=E({entries:{}});function p(i,e){v.setState((n)=>({entries:{...n.entries,[i]:e}}))}function x(i,e){let n=b(e),a=i.items.findLast((s)=>b(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&b(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...Zo(n._meta),...n.content.filter(k).flatMap((s)=>Zo(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=qe(),{t:l}=t(),S=Wo(e.id,a),c=JSON.stringify([i,S]),u=y(v,(r)=>r.entries[c]),d=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??fs(n),q=d===void 0?u?.accepted:M(d,S)??u?.accepted,h=d!==void 0&&x(d,e),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!x(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Wn(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};p(c,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:hs(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:I})}catch(Q){p(c,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(g==="closed")return null;return m(vs,{question:n,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(c,{draft:r}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function Fo({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=F(e._meta);if(n===void 0||n.subagent!==void 0||n.readOnly||!x(n,e))return m(je,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,l)=>m(O,{sessionId:i,item:e,question:s,index:l},Wo(e.id,l)))})}
|
|
2
|
+
export{Fo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d,i}from"./chunk-j5dqww4h.js";import{k}from"./chunk-qk1yqepm.js";import{B}from"./chunk-2kbp0pbe.js";import{Se}from"./chunk-d06382wz.js";import{Q,_e,Pe}from"./chunk-pqz2471h.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as F,DialogDescription as G,DialogHeader as J,DialogTitle as K}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function jt({entry:o,onBack:p}){let u=d(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,U]=y(null),[D,I]=y(null),[j,R]=y(0),[c,z]=y(null);_(()=>{let a=!0;return I(null),U(null),P(o).then((g)=>{if(a)U(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,j]);let m=n?.summary??o.plugin,r=C?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=r.availability!=="AVAILABLE"||r.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(Pe,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(B,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(O,{children:[r.source.type==="remote"?null:e(X,{checked:r.enabled,disabled:!!v||b,"aria-label":l(r.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(r,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(r),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(r.localVersion??r.version)&&e(x,{label:l("plugins.detail.version"),children:r.localVersion??r.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(B,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(B,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(F,{className:_e,children:c&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(B,{name:c.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(J,{className:"gap-3",children:[e(K,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(G,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(Se,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
|
+
export{jt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{U,Bt,xs}from"./chunk-4vayk46h.js";import{m}from"./chunk-ry7bxdb6.js";function f(o,d,r){let s=document.createElement("span");if(s.contentEditable="false",s.setAttribute("aria-label",o),s.className=Bt,r){let t=document.createElement("img");t.src=r,t.alt="",t.draggable=!1,t.setAttribute("aria-hidden","true"),t.className="size-3.5 shrink-0 self-center object-contain";let l=document.createElement("span");return l.textContent=o,s.append(t,l),s}let a=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[t,l]of Object.entries({viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))a.setAttribute(t,l);a.setAttribute("class","size-3.5 shrink-0 self-center");for(let[t,l]of xs[d]){let e=document.createElementNS("http://www.w3.org/2000/svg",t);for(let[i,c]of Object.entries(l))e.setAttribute(i,c);a.append(e)}let n=document.createElement("span");return n.textContent=o,s.append(a,n),s}function mr(o,d,r=[],s){let a=document.createDocumentFragment(),n="",t=()=>{let e=0;for(let i of U(n,r)){a.append(document.createTextNode(n.slice(e,i.start)));let c=f(i.name.slice(1),i.kind,i.kind==="skill"?s?.(i.name.slice(1)):void 0);if(i.kind==="skill")c.dataset.inlineSkill=i.name;else c.dataset.inlineCommand=i.name;a.append(c);let u=document.createElement("span");u.dataset.inlineAnchor="",u.textContent="",a.append(u),e=i.end}if(n.slice(e))a.append(document.createTextNode(n.slice(e)));n=""};for(let e of m(d)){if(typeof e==="string"){n+=e;continue}t();let i=f(e.name,"app");i.dataset.inlineApp=e.id,a.append(i);let c=document.createElement("span");c.dataset.inlineAnchor="",c.textContent="",a.append(c)}t();let l=document.createElement("br");l.dataset.inlineCaret="",a.append(l),o.replaceChildren(a)}function ho(o,d){let r=[],s=new Map(d.map((n)=>[n.id,n])),a=(n)=>{if(n.nodeType===Node.TEXT_NODE){r.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){r.push(...(n.textContent??"").replace("","").split(""));return}let t=n.dataset.inlineSkill??n.dataset.inlineCommand;if(t!==void 0){r.push(...t.split(""));return}let l=n.dataset.inlineApp;if(l!==void 0){let i=s.get(l);if(i)r.push(i);return}if(n.tagName==="BR"){r.push(`
|
|
2
2
|
`);return}if((n.tagName==="DIV"||n.tagName==="P")&&r.length&&r.at(-1)!==`
|
|
3
3
|
`)r.push(`
|
|
4
|
-
`)}for(let t of n.childNodes)a(t)};for(let n of o.childNodes)a(n);return r}function
|
|
5
|
-
export{
|
|
4
|
+
`)}for(let t of n.childNodes)a(t)};for(let n of o.childNodes)a(n);return r}function gr(o,d,r){let s=window.getSelection();if(!s?.rangeCount)return r;let a=s.getRangeAt(0);if(!o.contains(a.startContainer)||!o.contains(a.endContainer))return r;let n=(t,l)=>{let e=document.createRange();return e.selectNodeContents(o),e.setEnd(t,l),ho(e.cloneContents(),d).length};return{start:n(a.startContainer,a.startOffset),end:n(a.endContainer,a.endOffset)}}function vo(o,d){let r=(n)=>{let t=Math.max(0,n);for(let[l,e]of[...o.childNodes].entries())if(e.nodeType===Node.TEXT_NODE){let i=e.textContent?.length??0;if(t<=i)return[e,t];t-=i}else if(e instanceof HTMLElement&&e.hasAttribute("data-inline-anchor")){let i=e.firstChild,c=(e.textContent??"").replace("","").length;if(i&&t<=c)return[i,t+(i.textContent?.startsWith("")?1:0)];t-=c}else if(e instanceof HTMLElement&&(e.dataset.inlineSkill!==void 0||e.dataset.inlineCommand!==void 0)){let i=(e.dataset.inlineSkill??e.dataset.inlineCommand).length;if(t<i)return[o,l];t-=i}else if(e instanceof HTMLElement&&e.dataset.inlineApp!==void 0){if(t===0)return[o,l];t--}else if(e instanceof HTMLElement&&e.tagName==="BR")return[o,l];return[o,o.childNodes.length]},s=document.createRange();s.setStart(...r(d.start)),s.setEnd(...r(d.end));let a=window.getSelection();a?.removeAllRanges(),a?.addRange(s)}
|
|
5
|
+
export{mr,ho,gr,vo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var rl=["full","compact","codexUI"];function Rr(t){return t==="compact"||t==="codexUI"}var Oa=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function ne(t){let o=Oa.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function sl(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{rl,Rr,Oa,ne,sl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{a}from"./chunk-ytdhstqx.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function Me(t,n){let e=t.runStates[n];return e!==void 0&&(!e.reusableDraft||t.drafts[n]!==void 0)}function d(t,n,e){let r=t.filter((s)=>Me(e,s)),S=new Set(r),c=e.runStates!==n.runStates&&l(e.runStates)==="event";for(let[s,i]of Object.entries(e.runStates)){if(S.has(s)||!Me(e,s))continue;let o=n.runStates[s],g=!o||i.state!==o.state||i.since!==o.since||i.lastActivityAt!==o.lastActivityAt||i.interruption!==o.interruption;if(i.reusableDraft&&e.drafts[s]!==void 0||c&&g&&(!o||i.state!=="idle")&&i.interruption!=="runtime restarted")r.push(s)}return r.length===t.length&&r.every((s,i)=>s===t[i])?t:r}var u=new WeakMap;function v(t){return{view:"sessions",activityOrder:d([],t.state,t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function Jn(t){let n=u.get(t);if(n)return n;let e=v(t),r=new Set,S=(i)=>{e={...e,...i};for(let o of r)o()},c=t.state;t.store.subscribe(()=>{let i=t.store.getState(),o=d(e.activityOrder,c,i);if(c=i,o!==e.activityOrder)S({activityOrder:o})});let s={get:()=>e,set:S,subscribe:(i)=>(r.add(i),()=>r.delete(i))};return u.set(t,s),s}function Bs(t){u.get(t)?.set(v(t))}function J(t){let n=Jn(a());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function de(){return Jn(a()).set}function Gs(){let t=J((e)=>e.view),n=de();return[t,(e)=>n({view:e})]}
|
|
2
|
+
export{Me,Jn,Bs,J,de,Gs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{c}from"./chunk-c13rnm7b.js";import{Ot,Xr}from"./chunk-jy0jrht0.js";import{ae}from"./chunk-rragk2vb.js";import{Kn,D}from"./chunk-4gftpery.js";import{useEffect as g,useState as d}from"react";import{jsx as o,jsxs as y}from"react/jsx-runtime";var l=/\.(?:png|jpe?g|gif|webp|bmp|svg|pdf|docx?|xlsx?|pptx?|csv|tsv|zip|tar|gz|mp[34]|wav|ogg|webm|mov)(?:[?#].*)?$/i,u=/\.(?:png|jpe?g|gif|webp|bmp|svg)(?:[?#].*)?$/i;function Wr(e){if(e.type!=="link"&&e.type!=="image"||e.href===void 0)return!1;let r=e.href;return!/^www\.|^\/\//i.test(r)&&!/^[a-z][a-z\d+.-]*:/i.test(r.replace(/^file:/i,""))&&l.test(r)}function h({uri:e,directory:r}){let t=c(),[i,s]=d(),n=Ot(e,r),p=n!==null&&t.loadImage!==void 0&&Xr(r,n);if(g(()=>{if(!p||n===null||t.loadImage===void 0)return;let m=!1;return t.loadImage(n).then((a)=>{let f=/^data:([^;,]+);base64,(.*)$/s.exec(a);if(!f)throw Error("The image preview is not a data URL");if(!m)s({uri:e,mimeType:f[1],data:f[2]})},(a)=>{if(!m)s({uri:e,error:a instanceof Error?a.message:String(a)})}),()=>{m=!0}},[t,n,p,e]),i?.uri!==e)return null;if("error"in i)return o("div",{role:"alert",className:"text-muted-foreground text-xs",children:i.error});return o(D,{block:{type:"image",uri:e,data:i.data,mimeType:i.mimeType}})}function Zr({links:e}){let r=ae();return o("div",{className:"flex min-w-0 flex-col gap-2","data-wide-markdown-block":"true",children:e.map((t,i)=>{let s=t.text||Kn(t.href);return y("div",{className:"min-w-0",children:[r!==null&&u.test(t.href)&&o(h,{uri:t.href,directory:r}),o(D,{block:{type:"resource_link",uri:t.href,name:s}})]},`${i}-${t.href}`)})})}
|
|
2
|
+
export{Wr,Zr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{O}from"./chunk-c13rnm7b.js";import{t}from"./chunk-rragk2vb.js";import{D}from"./chunk-4gftpery.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(O,{text:e.text,streaming:o})})}if(i.isImage(e))return n(D,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(D,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function je({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{je};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{c}from"./chunk-c13rnm7b.js";import{Yr}from"./chunk-jy0jrht0.js";import{ae}from"./chunk-rragk2vb.js";import{M}from"./chunk-pxv38ttf.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as T,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function st(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function B(e){let s=[];for(let[n,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=ae(),[g,y]=v({}),[x,I]=v(0),h=JSON.stringify(e);T(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(Yr(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let k=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((d)=>d+1),children:r(R,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(k,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Lr({blocks:e}){let{t:s}=c(),a=e.flatMap(B),[n,l]=M(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(S,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(C,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(E,{images:a})]})}
|
|
2
|
+
export{st,Lr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function Y(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function x(e,t){return e.find((n)=>n.category===t&&o(n))}function ee(e){return Y(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
+
export{Y,x,ee};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var ol=280;function Cr({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function rt({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function Po({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function wr({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function kr({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function Sr({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{ol,Cr,rt,Po,wr,kr,Sr};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{w,gs}from"./chunk-q1kb5z75.js";import{isResourceLink as g,isText as v}from"@nyssance/codex-acp-v2/client";import{useRef as h}from"react";function Mi(o,m,x,y=!1){let i=h(null);return(t)=>{if(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;let n=t.currentTarget;if(n.selectionStart!==n.selectionEnd)return;let e=i.current;if(e&&(e.sessionId!==o.id||e.value!==n.value))i.current=null,e=null;let s=t.key==="ArrowUp";if(s?n.value.slice(0,n.selectionStart).includes(`
|
|
2
2
|
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
3
|
`))return;if(!e){if(!s||n.value!==""||y)return;let u=o.items.flatMap((a)=>{if(a.kind!=="user")return[];let f=a.content.filter(v).map((l)=>l.text).join(`
|
|
4
|
-
`),p=a.content.filter(g).flatMap((l)=>{let d=
|
|
5
|
-
export{
|
|
4
|
+
`),p=a.content.filter(g).flatMap((l)=>{let d=w(l.uri);return d===null?[]:[{id:d,name:l.name}]});return f.trim()||p.length?[{text:gs(f,p),apps:p}]:[]});if(!u.length)return;e={sessionId:o.id,entries:u,index:u.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(s?-1:1)));let c=e.entries[e.index],r=c?.text??"";if(x?.(c?.apps??[]),e.value=r,m(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
+
export{Mi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-n32wra9r.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function Jt({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
|
|
2
|
+
export{Jt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function yr({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=N(null);B(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),z(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(E,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(h,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(b,{className:"size-3.5"})})]})}
|
|
2
|
+
export{yr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{He}from"./chunk-dheg4bs2.js";import{r,X,gn}from"./chunk-6p4gk1zy.js";var Ei=5000;function tt(t){return"pastedText"in t}function yt(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;X(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":He(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),gn(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function mn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Ei)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};X(e,(i)=>[...i,o]),yt(e,o,n)}
|
|
2
|
+
export{Ei,tt,yt,mn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Si({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(c,{size:"sm",children:[e(m,{children:[a(p,{children:i("approval.needed")}),a(v,{children:r})]}),a(s,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(d,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(C,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
|
|
2
|
+
export{Si};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Yi(e,t){if(t===0)return null;let r=t-1;while(r>=0){let n=e[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":e[r-1],a=r===0||i===`
|
|
3
3
|
`||i===" "||i==="\t",s=a||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i??"");if(n==="/"?s&&!/[/\\]/.test(e.slice(r+1,t)):a)return{kind:n==="/"?"slash":"at",start:r,end:t,query:e.slice(r+1,t)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{Yi};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var a=["auto","1:1","3:4","9:16","4:3","16:9"],
|
|
1
|
+
var a=["auto","1:1","3:4","9:16","4:3","16:9"],zi=["For image generation and editing, use the application generate_image tool. The host owns the selected image model and credentials. Use attached images as references. Do not substitute another image tool or call provider endpoints yourself.","The application already renders, stores and provides downloads for every successful image result. These are image requests, not coding or filesystem tasks. Do not read imagegen skill files, run shell/Python commands, write Base64 or PNG files, or create download links merely to deliver an image. A request for a PNG or transparent background does not request a filesystem export.","Call generate_image once for the requested image or variant batch. After success, finish the turn using the returned image reference, for example . Do not regenerate a successful result to change its display or packaging. If a capability is unsupported, explain briefly rather than starting another generation or coding task.","In code mode, the tool result may be a string containing JSON metadata followed by image data URIs, rather than an object with a content property. If necessary, output only its first JSON metadata line to obtain the image reference. Do not echo, inspect, decode or write the image data: the host already displays it."].join(`
|
|
2
2
|
|
|
3
|
-
`);function
|
|
3
|
+
`);function lo(e){if(e===void 0)return;if(!a.includes(e))throw Error("Invalid image aspect ratio");return e}function Vi(e,t){return t&&t!=="auto"?`${e}
|
|
4
4
|
|
|
5
5
|
Produce the image with an aspect ratio of ${t}. Preserve subject proportions without stretching.`:e}
|
|
6
|
-
export{
|
|
6
|
+
export{zi,lo,Vi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{d,i}from"./chunk-j5dqww4h.js";import{q,K,ce,W,Z,ke}from"./chunk-gdtpwbqn.js";import{we}from"./chunk-2x5m7g33.js";import{k}from"./chunk-qk1yqepm.js";import{Se}from"./chunk-d06382wz.js";import{Q,_e}from"./chunk-pqz2471h.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function oe({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function zt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(ke,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(ce,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(we,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:_e,children:o&&n(S,{children:[t(Se,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(oe,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
|
+
export{zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Ar(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{Ar};
|