@alwith/module-chat 0.6.9 → 0.6.12
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 +30 -1
- package/assets/catalogs/anthropic/models.json +308 -0
- package/assets/provider-catalog.json +29 -0
- package/dist/activity-host.js +1 -1
- package/dist/app-reference.d.ts +9 -0
- package/dist/app-reference.js +1 -0
- 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-xgcwrqpw.js → chunk-06yzz0yx.js} +2 -2
- package/dist/chunk-0aqnqk7b.js +2 -0
- package/dist/{chunk-v5mb5c61.js → chunk-0d0bfb8e.js} +2 -2
- package/dist/chunk-0r4b11t4.js +2 -0
- package/dist/chunk-0srja8yh.js +2 -0
- package/dist/{chunk-4jh2wk80.js → chunk-0xmj4d4z.js} +2 -2
- package/dist/chunk-1647cyqx.js +2 -0
- package/dist/{chunk-wwq7d7qm.js → chunk-19yjze8m.js} +5 -5
- package/dist/{chunk-8428vfp3.js → chunk-1axvr26t.js} +2 -2
- package/dist/{chunk-8fnjpx11.js → chunk-1bt8a25d.js} +2 -2
- package/dist/chunk-1g54ee1j.js +2 -0
- package/dist/{chunk-bxmgvyfe.js → chunk-1mf3b58j.js} +2 -2
- package/dist/{chunk-kxw57gdb.js → chunk-1sxmqb44.js} +2 -2
- package/dist/{chunk-q0bwkhpy.js → chunk-1tb3d2x4.js} +2 -2
- package/dist/chunk-1ye5ygbk.js +2 -0
- package/dist/chunk-24dqkjvg.js +2 -0
- package/dist/chunk-26bm75r2.js +2 -0
- package/dist/{chunk-f2a9rqfz.js → chunk-2761tcb3.js} +2 -2
- package/dist/{chunk-q5fn378d.js → chunk-290e7g1q.js} +2 -2
- package/dist/chunk-2s5598rk.js +2 -0
- package/dist/{chunk-p38vws4a.js → chunk-2wex96dp.js} +2 -2
- package/dist/{chunk-z5c4njqk.js → chunk-3ab38s9g.js} +2 -2
- package/dist/{chunk-j18830g5.js → chunk-3ddgyzhz.js} +3 -3
- package/dist/chunk-3kzmec3f.js +2 -0
- package/dist/{chunk-qdw6bkg1.js → chunk-3pcbgsm6.js} +2 -2
- package/dist/{chunk-grgq7twf.js → chunk-3tsy36rq.js} +2 -2
- package/dist/chunk-4gstmex3.js +2 -0
- package/dist/chunk-52tcfvz0.js +2 -0
- package/dist/{chunk-18j37y1m.js → chunk-53ptmmsx.js} +2 -2
- package/dist/chunk-5q0kb3yb.js +2 -0
- package/dist/{chunk-29jan02g.js → chunk-5s85tvas.js} +2 -2
- package/dist/chunk-5y5b3w22.js +2 -0
- package/dist/{chunk-nsy1ne51.js → chunk-5ykpe629.js} +2 -2
- package/dist/{chunk-fgr2g610.js → chunk-5zq0s9fd.js} +3 -3
- package/dist/chunk-677dyzb1.js +4 -0
- package/dist/chunk-6cbj9r2x.js +2 -0
- package/dist/{chunk-4nnyn9b2.js → chunk-6fvrhr9x.js} +2 -2
- package/dist/chunk-6g5z3pff.js +2 -0
- package/dist/chunk-6tkjdrnj.js +2 -0
- package/dist/chunk-6z3nch41.js +1 -0
- package/dist/{chunk-njre3ygs.js → chunk-782x5ryb.js} +2 -2
- package/dist/chunk-799h4586.js +2 -0
- package/dist/{chunk-76a04a6j.js → chunk-7cj104ba.js} +2 -2
- package/dist/chunk-7m08m4m1.js +2 -0
- package/dist/chunk-7p3nx5bx.js +2 -0
- package/dist/chunk-7qmj50a2.js +2 -0
- package/dist/{chunk-jxgtgpa9.js → chunk-7wgt5rjw.js} +2 -2
- package/dist/{chunk-jg6r0ckn.js → chunk-7wj3dcpj.js} +2 -2
- package/dist/chunk-7xc69d48.js +2 -0
- package/dist/chunk-844s61q1.js +2 -0
- package/dist/chunk-87br10bq.js +2 -0
- package/dist/chunk-88j29hzx.js +2 -0
- package/dist/chunk-8a1th59e.js +2 -0
- package/dist/{chunk-e0c8pmjc.js → chunk-8c7x6vrs.js} +3 -3
- package/dist/{chunk-d9mmpjrr.js → chunk-8jgstab4.js} +2 -2
- package/dist/{chunk-k7y6dqf2.js → chunk-8pdapsc7.js} +2 -2
- package/dist/{chunk-kctrzc57.js → chunk-8t1brzbh.js} +2 -2
- package/dist/chunk-8wydj0hv.js +2 -0
- package/dist/{chunk-fd8x014y.js → chunk-8xn58z0x.js} +3 -3
- package/dist/{chunk-8d86yqzq.js → chunk-9he6963p.js} +2 -2
- package/dist/chunk-9n2wwk4g.js +2 -0
- package/dist/{chunk-a8j61zs9.js → chunk-a953k2dj.js} +3 -3
- package/dist/chunk-aardrb6e.js +2 -0
- package/dist/{chunk-n3d2mv93.js → chunk-acmc2r2s.js} +3 -3
- package/dist/chunk-akk3k2sc.js +4 -0
- package/dist/chunk-b0bd8abz.js +2 -0
- package/dist/{chunk-ek3v1g24.js → chunk-b5jq0ken.js} +2 -2
- package/dist/{chunk-hx3mqvkw.js → chunk-b8c460mr.js} +2 -2
- package/dist/{chunk-5f889j6j.js → chunk-ba4fa6fc.js} +2 -2
- package/dist/{chunk-9e6rv193.js → chunk-bp6f5tv8.js} +2 -2
- package/dist/chunk-bqdnxftw.js +2 -0
- package/dist/{chunk-9cqpn67f.js → chunk-btrg3ywt.js} +2 -2
- package/dist/chunk-bv175dn9.js +2 -0
- package/dist/{chunk-xgyb00qq.js → chunk-cctw9m9a.js} +2 -2
- package/dist/{chunk-958qyr8g.js → chunk-cdgfr4n0.js} +2 -2
- package/dist/chunk-cqskn18r.js +2 -0
- package/dist/chunk-crg1ttkp.js +2 -0
- package/dist/{chunk-v0mbfaqw.js → chunk-cx1sg5dt.js} +2 -2
- package/dist/{chunk-eq7vpgn7.js → chunk-d51rg15n.js} +2 -2
- package/dist/chunk-der9jtk9.js +2 -0
- package/dist/{chunk-8689y4n5.js → chunk-djk0ebpk.js} +2 -2
- package/dist/{chunk-1fh3vvpe.js → chunk-eeqppv9j.js} +3 -3
- package/dist/chunk-eg9c12vk.js +2 -0
- package/dist/{chunk-x6yxbndc.js → chunk-ehhzhjyb.js} +2 -2
- package/dist/{chunk-h4r8cx37.js → chunk-ex20n22v.js} +2 -2
- package/dist/{chunk-jwzwz2wr.js → chunk-f2wy8jza.js} +2 -2
- package/dist/{chunk-18z4wmhb.js → chunk-f8tv9m81.js} +2 -2
- package/dist/{chunk-stqqrke0.js → chunk-fgre64ge.js} +2 -2
- package/dist/chunk-fkmka3v9.js +2 -0
- package/dist/{chunk-4cb0c8ae.js → chunk-fnvjemhq.js} +2 -2
- package/dist/chunk-fp3rp1qc.js +2 -0
- package/dist/{chunk-snd4q8wg.js → chunk-ggkjq8rk.js} +2 -2
- package/dist/{chunk-rfahybr0.js → chunk-gnpvd7wg.js} +2 -2
- package/dist/{chunk-yftn8cw0.js → chunk-h1embxgj.js} +2 -2
- package/dist/chunk-h9rwby5r.js +2 -0
- package/dist/chunk-hhdeh622.js +2 -0
- package/dist/chunk-hqdbv5hw.js +2 -0
- package/dist/chunk-j5trhvx8.js +4 -0
- package/dist/{chunk-bt0t1pev.js → chunk-j71h60r0.js} +2 -2
- package/dist/{chunk-pdrz9qs1.js → chunk-j7w4jr8y.js} +2 -2
- package/dist/{chunk-9wk2xp6v.js → chunk-jgseey5x.js} +3 -3
- package/dist/{chunk-36mdfph1.js → chunk-jpm15hcd.js} +2 -2
- package/dist/{chunk-3jfkrwjq.js → chunk-jzyj96ws.js} +1 -1
- package/dist/{chunk-fnw16wjx.js → chunk-k5cjaeza.js} +2 -2
- package/dist/{chunk-3zwbr9xs.js → chunk-kgjdh49d.js} +2 -2
- package/dist/{chunk-pks7f314.js → chunk-m7exm1n3.js} +5 -5
- package/dist/{chunk-80r0jch1.js → chunk-mdp2zdqm.js} +2 -2
- package/dist/{chunk-5f5jfr40.js → chunk-mmywt5fq.js} +2 -2
- package/dist/{chunk-fqgz93sy.js → chunk-mxh0vcye.js} +2 -2
- package/dist/chunk-mz8tjgre.js +2 -0
- package/dist/{chunk-tqz7csrk.js → chunk-mzwwsacy.js} +2 -2
- package/dist/{chunk-ewjh6s2b.js → chunk-n13y99dj.js} +2 -2
- package/dist/chunk-nktaekpq.js +2 -0
- package/dist/chunk-nrvd7njv.js +2 -0
- package/dist/{chunk-24kpx8fg.js → chunk-nxjr0z23.js} +2 -2
- package/dist/chunk-p95ndy0b.js +3 -0
- package/dist/{chunk-5v8f2sbp.js → chunk-pfqz31kk.js} +2 -2
- package/dist/{chunk-yfws137b.js → chunk-pjgym6rx.js} +2 -2
- package/dist/{chunk-ha2f2cwz.js → chunk-pnavf2zs.js} +2 -2
- package/dist/{chunk-7egc2evj.js → chunk-pr5wv14q.js} +2 -2
- package/dist/{chunk-fw2jj4hh.js → chunk-q2z9w661.js} +2 -2
- package/dist/{chunk-0eewkw7t.js → chunk-q4f8zazc.js} +2 -2
- package/dist/chunk-qyj4d255.js +5 -0
- package/dist/chunk-r29b0ap8.js +2 -0
- package/dist/{chunk-7x150rqz.js → chunk-r6b9fdnm.js} +2 -2
- package/dist/{chunk-3v39hqex.js → chunk-r9ny4bqk.js} +2 -2
- package/dist/{chunk-vttgk30b.js → chunk-r9szj8sp.js} +2 -2
- package/dist/{chunk-tv1frh1m.js → chunk-rb4p3h5b.js} +2 -2
- package/dist/{chunk-658y6xth.js → chunk-rge2pazt.js} +2 -2
- package/dist/chunk-rgn6pdaa.js +2 -0
- package/dist/chunk-rhcpe6m6.js +2 -0
- package/dist/{chunk-1zypzzje.js → chunk-rhxyb55x.js} +2 -2
- package/dist/{chunk-qm649qdv.js → chunk-rq7t6qry.js} +2 -2
- package/dist/{chunk-7qwbxdyb.js → chunk-rtdjp07m.js} +2 -2
- package/dist/{chunk-gbsqs904.js → chunk-rvbbb9rf.js} +2 -2
- package/dist/chunk-rvjfb004.js +2 -0
- package/dist/{chunk-s4m2h876.js → chunk-rwh1yvqn.js} +2 -2
- package/dist/chunk-s267ztm1.js +2 -0
- package/dist/{chunk-ajjd22hb.js → chunk-s4v10afm.js} +3 -3
- package/dist/{chunk-xbqvb31f.js → chunk-sjes4cxr.js} +2 -2
- package/dist/chunk-snee6rb9.js +5 -0
- package/dist/{chunk-hbm3sgw7.js → chunk-st0gd22t.js} +2 -2
- package/dist/{chunk-brfr0m5g.js → chunk-sygx6n0s.js} +2 -2
- package/dist/chunk-t3sqxded.js +2 -0
- package/dist/chunk-tbv1mfdg.js +3 -0
- package/dist/{chunk-wbhxpwm7.js → chunk-tme1d6xh.js} +2 -2
- package/dist/{chunk-zae7p9pm.js → chunk-v28fv6c4.js} +2 -2
- package/dist/chunk-vdc46qt2.js +2 -0
- package/dist/{chunk-pza08wvz.js → chunk-vk7kqa6a.js} +2 -2
- package/dist/{chunk-t1zw5wrq.js → chunk-vkbaa74h.js} +2 -2
- package/dist/{chunk-9p1jvznr.js → chunk-vpzjhbfa.js} +2 -2
- package/dist/chunk-vxexg361.js +2 -0
- package/dist/chunk-vxn8gfy4.js +2 -0
- package/dist/{chunk-1341xyde.js → chunk-wj2xjzds.js} +2 -2
- package/dist/{chunk-np76wm1k.js → chunk-wz6a2j26.js} +2 -2
- package/dist/chunk-x2ayy0ys.js +7 -0
- package/dist/{chunk-wyr7zv2j.js → chunk-xary32dg.js} +2 -2
- package/dist/{chunk-kjt77brz.js → chunk-xvfvxjyp.js} +2 -2
- package/dist/{chunk-1940kkcm.js → chunk-xw2zfj4c.js} +2 -2
- package/dist/{chunk-70bm3f7n.js → chunk-xztxaq9k.js} +2 -2
- package/dist/{chunk-jzaxy8af.js → chunk-y3mk12gg.js} +2 -2
- package/dist/{chunk-k10kbwqc.js → chunk-y7gzr914.js} +2 -2
- package/dist/{chunk-84gk74hf.js → chunk-y8md080p.js} +2 -2
- package/dist/{chunk-zk2hwm10.js → chunk-y8sc8n3j.js} +2 -2
- package/dist/{chunk-ym6h1x3a.js → chunk-ycj91akv.js} +2 -2
- package/dist/chunk-ym0pvy7y.js +2 -0
- package/dist/{chunk-2kz2z86n.js → chunk-yzhqbz2p.js} +2 -2
- package/dist/chunk-z8ymt0ny.js +2 -0
- package/dist/{chunk-tptx1zs3.js → chunk-z94nsbnw.js} +2 -2
- package/dist/chunk-z9ch23p0.js +2 -0
- package/dist/chunk-z9q7rgbf.js +2 -0
- package/dist/chunk-zfjpfj30.js +2 -0
- package/dist/{chunk-akvpgx43.js → chunk-zntkqbcv.js} +2 -2
- package/dist/{chunk-fbmbc4wt.js → chunk-zxwvq5f4.js} +2 -2
- package/dist/chunk-zyznsm1p.js +2 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/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.d.ts +3 -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.d.ts +12 -0
- package/dist/composer/inline-document.js +1 -0
- package/dist/composer/inline-dom.d.ts +10 -0
- package/dist/composer/inline-dom.js +1 -0
- 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.d.ts +20 -0
- package/dist/composer/prompt-input-inline.js +1 -0
- package/dist/composer/prompt-input-textarea.d.ts +3 -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.d.ts +4 -2
- package/dist/conversation/composer/apps-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.d.ts +2 -0
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.d.ts +2 -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.d.ts +3 -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/conversation/types.d.ts +2 -0
- 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.d.ts +12 -0
- package/dist/lib/app-reference.js +1 -0
- package/dist/lib/application-metadata.d.ts +6 -0
- package/dist/lib/application-metadata.js +1 -0
- 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/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/oauth/claude-login.d.ts +16 -0
- package/dist/oauth/claude-login.js +1 -0
- package/dist/oauth.d.ts +2 -0
- package/dist/oauth.js +1 -0
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.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.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/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.d.ts +1 -0
- 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.d.ts +1 -0
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +7 -2
- package/dist/chunk-02jpgxy7.js +0 -2
- package/dist/chunk-0y1c3v1b.js +0 -2
- package/dist/chunk-1bfxezrb.js +0 -2
- package/dist/chunk-2kjbas8a.js +0 -2
- package/dist/chunk-2tc8kgsa.js +0 -2
- package/dist/chunk-32s8dn1a.js +0 -2
- package/dist/chunk-3m59n5gr.js +0 -2
- package/dist/chunk-3twka9f7.js +0 -2
- package/dist/chunk-4j6gy4me.js +0 -2
- package/dist/chunk-57p1s7hy.js +0 -2
- package/dist/chunk-5t8zx5e4.js +0 -3
- package/dist/chunk-5yq8k08p.js +0 -2
- package/dist/chunk-6pnsagt4.js +0 -2
- package/dist/chunk-6z36709h.js +0 -2
- package/dist/chunk-70j4ee5r.js +0 -2
- package/dist/chunk-75ve01mr.js +0 -2
- package/dist/chunk-7jmqq7b5.js +0 -4
- package/dist/chunk-80a1fdx8.js +0 -2
- package/dist/chunk-8504eft8.js +0 -7
- package/dist/chunk-8an4t4kh.js +0 -2
- package/dist/chunk-8rpen55z.js +0 -3
- package/dist/chunk-9rt2pfsm.js +0 -2
- package/dist/chunk-a8gzs651.js +0 -2
- package/dist/chunk-acnqnrqb.js +0 -2
- package/dist/chunk-bpenajbp.js +0 -2
- package/dist/chunk-c47xfjk4.js +0 -2
- package/dist/chunk-c61yvpy3.js +0 -2
- package/dist/chunk-c7p3vpyx.js +0 -2
- package/dist/chunk-ckhw0gr5.js +0 -5
- package/dist/chunk-d0ta9y85.js +0 -2
- package/dist/chunk-dz5ymd3t.js +0 -2
- package/dist/chunk-f1r8wh4e.js +0 -2
- package/dist/chunk-fzgra242.js +0 -2
- package/dist/chunk-g0gq72z9.js +0 -2
- package/dist/chunk-g79y6q3f.js +0 -2
- package/dist/chunk-gfrzmgz4.js +0 -2
- package/dist/chunk-gkp0e28t.js +0 -2
- package/dist/chunk-gwa7hbzr.js +0 -2
- package/dist/chunk-h4adycra.js +0 -2
- package/dist/chunk-h9ywpga2.js +0 -4
- package/dist/chunk-hkjj3prp.js +0 -2
- package/dist/chunk-jkyepwr1.js +0 -2
- package/dist/chunk-kmeccf75.js +0 -2
- package/dist/chunk-m1adrey8.js +0 -2
- package/dist/chunk-m7wse5yk.js +0 -2
- package/dist/chunk-nm4dtceb.js +0 -2
- package/dist/chunk-p5mfv6t6.js +0 -2
- package/dist/chunk-p6gwrqjp.js +0 -2
- package/dist/chunk-q9h89nv1.js +0 -2
- package/dist/chunk-qcj6f1rq.js +0 -2
- package/dist/chunk-s8xpf179.js +0 -2
- package/dist/chunk-stzsxdpp.js +0 -2
- package/dist/chunk-w0dfvr05.js +0 -2
- package/dist/chunk-w65d6934.js +0 -2
- package/dist/chunk-w7p443ya.js +0 -1
- package/dist/chunk-wr5r2t2m.js +0 -2
- package/dist/chunk-xrbydq2j.js +0 -2
- package/dist/chunk-yvr086m7.js +0 -2
- package/dist/chunk-zfag3ne0.js +0 -2
- package/dist/chunk-zjevkw68.js +0 -2
- package/dist/chunk-zmbf0v0n.js +0 -2
- package/dist/chunk-zqe4mjgy.js +0 -2
package/dist/chunk-0y1c3v1b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ot}from"./chunk-wwq7d7qm.js";import{hi}from"./chunk-kxw57gdb.js";import{t}from"./chunk-f1r8wh4e.js";import{Y}from"./chunk-g0gq72z9.js";import{Ln}from"./chunk-658y6xth.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,s)=>l(Y,{block:o.content},`${n.id}:${s}`))]})}var wn=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(Ln),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...hi(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l(ot,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
|
|
2
|
-
export{wn};
|
package/dist/chunk-1bfxezrb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{R}from"./chunk-p38vws4a.js";import{e}from"./chunk-6pnsagt4.js";import{jo}from"./chunk-nm4dtceb.js";import{BlocksIcon as I}from"lucide-react";import{useRef as h,useState as a}from"react";import{DropdownMenu as k,DropdownMenuContent as A,DropdownMenuGroup as C,DropdownMenuItem as i,DropdownMenuTrigger as v}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as B}from"react/jsx-runtime";function Io({disabled:b,onSelect:w}){let{client:l,host:r}=e(),[M,D]=a(!1),[d,y]=a([]),[u,t]=a("loading"),p=h(0),m=l.installedApps?.bind(l);if(!m)return null;let c=(n)=>{D(n);let f=++p.current;if(!n)return;t("loading"),m().then(({apps:s})=>{if(f!==p.current)return;y(s.filter((g)=>g.enabled&&g.callable)),t("ready")},(s)=>{if(f!==p.current)return;t("error"),r.reportError?.(s)})};return B(k,{open:M,onOpenChange:c,children:[o(v,{render:o(R,{disabled:b,"aria-label":r.t("composer.apps"),title:r.t("composer.apps"),children:o(I,{})})}),o(A,{align:"start",side:"top",className:"max-h-72 min-w-48 overflow-y-auto",children:o(C,{children:u!=="ready"?o(i,{disabled:!0,children:r.t(u==="loading"?"composer.appsLoading":"composer.appsFailed")}):d.length===0?o(i,{disabled:!0,children:r.t("composer.appsEmpty")}):d.map((n)=>o(i,{onClick:()=>{w(jo(n)),c(!1)},children:n.runtimeName||n.id},n.id))})})]})}
|
|
2
|
-
export{Io};
|
package/dist/chunk-2kjbas8a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,a,n,p}from"./chunk-a8gzs651.js";import{L}from"./chunk-xbqvb31f.js";import{k,Q,ye}from"./chunk-3m59n5gr.js";import{he,G,oe}from"./chunk-c7p3vpyx.js";import{uo}from"./chunk-m1adrey8.js";import{me}from"./chunk-h4r8cx37.js";import{pe}from"./chunk-80a1fdx8.js";import{ge}from"./chunk-akvpgx43.js";import{Lt}from"./chunk-5f5jfr40.js";import{lo}from"./chunk-wbhxpwm7.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as K,useMemo as P}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(o,d){return o.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Tr({selectedId:o,onSelect:d,isForeground:l,onOpen:w,accessory:R,rowActions:h}){let N=r(),{t:x}=N,m=n((t)=>t.runStates),v=n((t)=>t.drafts),u=n((t)=>t.sessionList),g=G((t)=>t.activityOrder),f=P(()=>g.flatMap((t)=>{let e=m[t];return e&&he({runStates:m,drafts:v},t)?[{sid:t,record:e,sessionRow:H(u,e)}]:[]}),[g,m,v,u]),b=P(()=>{let t=new Map;for(let e of f){let i=e.sid===o||l?.(e.sid)?"foreground":"background",S=t.get(i)??[];S.push(e),t.set(i,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,o,l]),y=G((t)=>t.activityCollapsedGroups),s=oe(),I=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),A=(t)=>{if(w?.(t))return;d(t)},O=lo();K(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!uo(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let i=Number(e.key);if(!Number.isInteger(i)||i<1||i>9)return;let S=I[i-1];if(!S)return;e.preventDefault(),A(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let C=(t)=>{let e=I.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===o,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>A(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&O?c(M,{children:ge(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(k,{children:b.map((t)=>t.key==="foreground"?c(k,{children:t.rows.map(C)},t.key):c(Q,{open:!y.has(t.key),onOpenChange:(e)=>{let i=new Set(y);if(e)i.delete(t.key);else i.add(t.key);s({activityCollapsedGroups:i})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:x("sessionList.background"),count:t.rows.length,children:t.rows.map(C)},t.key))})}function T({sessionRow:o,state:d,interruption:l,active:w,tasks:R,listeningPorts:h,accessory:N,actions:x,onOpen:m,hint:v}){let u=r(),g=a(),{t:f}=u,b=o.title??f("sessionList.untitled"),y=Lt(o.sessionId,d);return D(q,{children:[c(ye,{"data-session-id":o.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(pe,{sessionRow:o,actions:x}),onClick:m,onKeyDown:(s)=>{if(s.target!==s.currentTarget)return;if(s.key==="Enter"||s.key===" ")s.preventDefault(),m()},state:d,interruption:l,title:b,preview:y,listeningPorts:h,onOpenPort:u.openLink&&((s)=>u.openLink?.(`http://localhost:${s}`)),accessory:N,hint:v,actions:c(me,{title:f("sessionList.stop"),onStop:()=>p(u,g.stopSession(o.sessionId))})}),R.map((s)=>D("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(L,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:s.title,children:s.title})]},s.id))]})}
|
|
2
|
-
export{Tr};
|
package/dist/chunk-2tc8kgsa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Un(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Ki(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Un(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Un,Ki};
|
package/dist/chunk-32s8dn1a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function Qi({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function d(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function T(t){let{Markdown:o}=d();return e(o,{...t})}
|
|
2
|
-
export{Qi,d,T};
|
package/dist/chunk-3m59n5gr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{xe,c}from"./chunk-k7y6dqf2.js";import{I}from"./chunk-qcj6f1rq.js";import{L}from"./chunk-xbqvb31f.js";import{S}from"./chunk-958qyr8g.js";import{Ke,Ee,qe}from"./chunk-gbsqs904.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as _,useContext as E,useLayoutEffect as M,useState as T}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function k(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function m({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function u({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function Q({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:g,wrapHeader:f,onHeaderClick:b,children:P}){let y=()=>{b?.(),t(!o)},x=p(Ke,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),R=d(K,{children:[r!=null&&e(m,{children:r}),g??e(I,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(qe,{content:s!==void 0?e(Ee,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),H=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,c),onClick:y,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),y()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),R]}):e("div",{"data-active":l?"":void 0,className:x,children:R});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?H:f(H),o&&e(k,{className:"mt-0.5",children:P})]})}var G=_(()=>{}),z=_(()=>{});function Rt(){return E(z)}function ve(){return E(G)}function ye({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:g,listeningPorts:f,onOpenPort:b,accessory:P,meta:y,hint:x,actions:R,className:H,...v}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Ke,xe,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...v,children:[e(m,{children:t!=null?e(L,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(I,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(I,{className:"text-muted-foreground text-xs",children:C}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(qe,{content:P!=null?e(Ee,{children:P}):y??e(Ee,{}),actions:R}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return O;return e(q,{row:O,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=T(!1),[s,a]=T(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(G.Provider,{value:a,children:e(z.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return S(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
-
export{k,m,u,Q,Rt,ve,ye};
|
package/dist/chunk-3twka9f7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Vr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Yo(e){return[...e].toSorted((o,n)=>(Vr[o.kind]??99)-(Vr[n.kind]??99))}function xa(e){return e==="allow_once"||e==="allow_always"}function ba(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{Vr,Yo,xa,ba};
|
package/dist/chunk-4j6gy4me.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-958qyr8g.js";import{r}from"./chunk-a8gzs651.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Cr({children:l}){let{t:n}=r(),[o,u]=p(!1),t=c(null),[a,d]=p();return S(o),M(h,{open:o,onOpenChange:(i)=>{if(i){let s=t.current?.parentElement;if(!s)throw Error("Help trigger must be mounted in its footer row");d(s.clientWidth)}u(i)},children:[e(w,{render:e(f,{ref:t,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
-
export{Cr};
|
package/dist/chunk-57p1s7hy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as r,useState as x}from"react";var t=new Map;function b(o,e,a=!1){let[p,S]=x(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=r((c)=>{S((s)=>{let f=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(f):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
|
|
2
|
-
export{b};
|
package/dist/chunk-5t8zx5e4.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{k,u}from"./chunk-3m59n5gr.js";import{dt}from"./chunk-2kz2z86n.js";import{Pe,l,Te,Be,i}from"./chunk-g79y6q3f.js";import{F,D,J,H,O,se,pt}from"./chunk-w7p443ya.js";import{ae}from"./chunk-rfahybr0.js";import{Ue}from"./chunk-snd4q8wg.js";import{h}from"./chunk-9cqpn67f.js";import{gt,M}from"./chunk-f2a9rqfz.js";import{U,ce}from"./chunk-yftn8cw0.js";import{mt}from"./chunk-jg6r0ckn.js";import{ut}from"./chunk-dz5ymd3t.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ne,BookOpenIcon as ie,CheckIcon as le,CircleArrowUpIcon as oe,MoreVerticalIcon as re,PlusIcon as W,PuzzleIcon as de,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as we,DropdownMenuContent as Ce,DropdownMenuItem as Ie,DropdownMenuTrigger as Se}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as X}from"@nyssance/shadcn/vega/components/ui/input";import{Label as De}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Y}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function Z(t){return t.interface?.shortDescription??""}function Me({plugin:t,marketplace:d}){let{t:p}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(le,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(y,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?p("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Ee({plugin:t,marketplace:d,actions:p,onOpen:g}){let a=Z(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(se,{className:"toolbox-row relative",children:[e(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(H,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(M,{name:t.name})})}),s(D,{className:"pointer-events-none relative min-w-0",children:[e(pt,{className:"mb-0.5",children:T(t)}),e(J,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(J,{"data-toolbox-metadata":"",children:r})]}),e(F,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function q(){return Be((t)=>t.connection==="ready"&&te(t.agent))}var E=48;function ze({marketplace:t,plugins:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/E)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(we,{children:[e(Se,{render:e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(re,{})}),e(Ce,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ie,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(O,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*E,(r+1)*E).map((n)=>e(Ee,{onOpen:p,plugin:n,marketplace:t,actions:e(Me,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>E&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(y,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/E)]}),e(y,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*E>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Oe=fe(function({query:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),Z(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>d===""?v.path!==null||n.has(b.id):P.includes(d)).map(({plugin:b})=>b)}))},[m,f,d]);return s(Y,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Ae(){let{t}=l(),d=q(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,x]=I(!1),[b,P]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),P(null);try{await p({source:N}),m(""),x(!1)}catch(S){P(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(oe,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)x(N)},children:[s(be,{render:e(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(W,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(X,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),b&&e("p",{role:"alert",className:"text-destructive text-sm",children:b}),s("div",{className:"flex justify-end gap-2",children:[e(y,{type:"button",variant:"ghost",disabled:r,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(y,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Le({onOpen:t,query:d}){let p=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(d.trim().toLowerCase());return e(h,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${U} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(ae,{}):e(Oe,{query:f,onOpen:t})]})})}function Yi({cwd:t,active:d,extensions:p,onOpenCatalog:g}){let{t:a}=l(),f=Te(),m=Pe(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[x,b]=I("plugins"),[P,A]=I({plugins:"",skills:""}),N=x==="skills"?P.skills:P.plugins,S=(o)=>A((z)=>({...z,[x]:o})),ee=Be((o)=>JSON.stringify([...new Set(o.sessionList.map((z)=>Ue(z.cwd,o.projectContext)).filter((z)=>z!==null))].toSorted())),L=JSON.stringify([...new Set([Ue(t,f.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),V=a(x==="skills"?"plugins.skills.search":"plugins.search"),[w,G]=I(null),C=q();K(()=>{if(!d||!C)return;if(m.getState().loadedScope!==L)r(JSON.parse(L))},[d,C,r,L,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),b("plugins"),G(o)},_=(o)=>{g?.(),b(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(gt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(u,{className:`${c} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(ne,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(u,{className:`${c} h-8 gap-2 px-2`,active:!p?.active&&x===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(de,{className:"size-4"}):e(ie,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(h,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(k,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(u,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!p?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(M,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Y,{children:[w&&e(mt,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(ce,{children:e(dt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(X,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>S(o.target.value),placeholder:V}),N&&e(y,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ge,{})})]}),e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),x==="plugins"&&e(Ae,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(y,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Le,{query:P.plugins,onOpen:j})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(ut,{query:P.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
-
export{Yi};
|
package/dist/chunk-5yq8k08p.js
DELETED
package/dist/chunk-6pnsagt4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Se}from"./chunk-f1r8wh4e.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function tn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Se,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function f(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{tn,e,f};
|
package/dist/chunk-6z36709h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{R}from"./chunk-p38vws4a.js";import{t}from"./chunk-f1r8wh4e.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Eo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(R,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{Eo};
|
package/dist/chunk-70j4ee5r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{No}from"./chunk-fnw16wjx.js";import{o}from"./chunk-f1r8wh4e.js";import{e,f}from"./chunk-6pnsagt4.js";import{j,g,K}from"./chunk-w0dfvr05.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as B}from"react/jsx-runtime";function H({sessionId:l,options:p,disabled:G,onModelChange:b,onConfigChange:O,defaultGroup:I={id:"models",name:"Models"},catalog:x=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),M=F({sessionId:l,model:!0}),v=P&&(M.current.sessionId!==l||M.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=g(p,"model"),a=g(p,"thought_level"),_=p.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),S=_.filter(A),m=_.filter(U);if(!t&&!a&&S.length===0&&m.length===0)return null;let u=(n,r)=>{if(r===n.currentValue)return Promise.resolve();M.current={sessionId:l,model:n===t};let d=O?O(n.configId,r):N.setConfig(l,n.configId,r);return f(c,d),d},h=a?j(a):[],z=h.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?K(t):i("composer.model"),V=(n)=>({api_id:n.value,label:n.name}),y=x(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(V)})):[{...I,models:t?j(t).map(V):[]}]),w=y.flatMap((n)=>n.models),C=w.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return B(No,{disabled:G||v||k,switching:v,value:{...C,label:C.shortLabel??C.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(b)b(n.api_id);else if(t)u(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:y,t:i,effortConfig:a&&h.length>0?{name:"Effort",value:a.currentValue,levels:h,sizer:z,onChange:(n)=>u(a,n)}:void 0,selectOptions:S.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:j(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>u(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:B(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);u(d,r)}})}var jt=D(H);
|
|
2
|
-
export{jt};
|
package/dist/chunk-75ve01mr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as _,useRef as I,useState as q}from"react";import{jsx as z}from"react/jsx-runtime";var C=d(null),gn=d(null);function ha(){return i(gn)}var fn=d(null);function va(){return i(fn)}var Qe=d(null);function Ye(){let r=i(C);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var Xe=()=>i(C);function ya(){let r=i(Qe);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i(Qe);function zo({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:F,attachmentPolicy:f,value:A,onValueChange:R,attachments:y,onAttachmentsChange:U,children:D}){let L=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""},[]),S=A!==void 0,[B,G]=q(r),p=A??B,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 T=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,S)R?.(t);else G(t)},[S,R]),g=n(()=>P(""),[P]),x=y!==void 0,[J,K]=q([]),v=y??J,h=I(v);h.current=v;let s=n((t)=>{let e=typeof t==="function"?t(h.current):t;if(x)U?.(e);else K(e)},[x,U]),W=I(null),j=I(()=>{}),w=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 H=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:L(u),filename:u.name,size:u.size,lastModified:u.lastModified,...H===void 0?{}:{sourcePath:H}}})]})},[f,L,s]),O=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)}),F?.()},[F,s]),M=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 h.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let E=n(()=>{j.current?.()},[]),b=_(()=>({files:v,add:w,remove:O,clear:M,openFileDialog:E,fileInputRef:W}),[v,w,O,M,E]),k=n((t,e)=>{W.current=t.current,j.current=e},[]),Q=_(()=>({textInput:{value:p,setInput:P,clear:g,getRevision:T,clearSubmitted:c??g},attachments:b,__registerFileInput:k}),[p,P,g,T,c,b,k]);return z(C.Provider,{value:Q,children:z(Qe.Provider,{value:b,children:D})})}var hn=d(null);function N(){let r=X(),l=i(hn),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
-
export{gn,ha,fn,va,Qe,Ye,Xe,ya,zo,hn,N};
|
package/dist/chunk-7jmqq7b5.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ci}from"./chunk-zfag3ne0.js";import{t}from"./chunk-f1r8wh4e.js";import{ki,Si}from"./chunk-grgq7twf.js";import{Y}from"./chunk-g0gq72z9.js";import{re}from"./chunk-658y6xth.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var bi=p(function({item:s,messageTime:c}){let l=t(),o=Si(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):re(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=ki(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(Y,{block:e},`${s.id}:${n}`))}),r(Ci,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
-
export{bi};
|
package/dist/chunk-80a1fdx8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r}from"./chunk-a8gzs651.js";import{Et}from"./chunk-7x150rqz.js";import{I}from"./chunk-qcj6f1rq.js";import{Rt,ve}from"./chunk-3m59n5gr.js";import{formatDistanceToNowStrict as H}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:L,"zh-CN":z};function $e(t,a){let i=a==="zh-CN"?S["zh-CN"]:S.en;return H(new Date(t),{locale:i})}function pe({sessionRow:t,actions:a,shortcut:i,renaming:n=!1,onRename:m}){let{t:s,i18n:C,PathAction:u}=r(),f=ve(),y=Rt();g(()=>{f(n)},[n,f]);let[x,p]=D(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?s("sessionList.archived"):t.updatedAt!==null?$e(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(E,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Et,{title:n?o(w,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":s("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(I,{className:"min-w-0 flex-1",children:t.title??s("sessionList.untitled")})}),i]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(O,{children:[l,l&&a!==void 0&&o(M,{}),a]}):void 0})}
|
|
2
|
-
export{$e,pe};
|
package/dist/chunk-8504eft8.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{Ei}from"./chunk-ek3v1g24.js";import{An,Li}from"./chunk-eq7vpgn7.js";import{En}from"./chunk-stqqrke0.js";import{decodeHTMLAttribute as C,decodeHTMLStrict as R}from"entities";import oe from"katex";import{CheckIcon as z,ChevronLeftIcon as ae,ChevronRightIcon as se,CopyIcon as ie,DownloadIcon as ce,FileIcon as de,LinkIcon as le,MailIcon as ue,XIcon as me}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as ge,createElement as U,memo as B,startTransition as fe,useContext as he,useEffect as k,useLayoutEffect as D,useMemo as X,useRef as w,useState as p}from"react";import{jsx as a,jsxs as f,Fragment as te}from"react/jsx-runtime";var G=ge(null);function y(){let e=he(G);if(e===null)throw Error("Markdown host is missing");return e}var pe=80,A=/\[([^\]\n]+)\]\(([^)\n]+)$/,ke=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,we=/\uE200[^\uE201]*$/,be=4,xe=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function N(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function J(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Te(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)&&!J(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ve(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!N(e,t)&&!J(e,t,n))return t;return-1}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e){return Ce(e,"```")%2===1}function V(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!N(e,t))n+=1;t+=1}return n%2===1}function Ne(e){return e.endsWith(`
|
|
2
|
-
`)?`${e}\`\`\``:`${e}
|
|
3
|
-
\`\`\``}function H(e,n){if(!e.includes(n)||Te(e,n)%2===0)return e;let t=ve(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
|
-
`)||V(r))return e;return`${e}${n}`}function Me(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Z(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ee(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Z(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>be&&!xe.has(u))return!1}return!0}function Le(e){let{path:n}=Z(e);if(Me(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Ie(e){let n=e.match(A);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ee(t)||Le(t)?e.replace(A,"$1"):`${e})`}function $e(e){let n=e.replace(we,"");if(n.length===0||n.includes("`")&&V(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&ye(n))return{isCodeFenceOpen:!0,markdown:Ne(n)};if(n.includes(")n=Ie(n);return n=H(n,"**"),n=H(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Re(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function _(e){return Re(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Y(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Y(t.tokens);if(!_(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!_(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function O(e){return{type:"text",raw:e,text:e}}function Pe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function I(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[O(s)]:[O(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Pe(o):o);I(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))I(n.tokens)}}function Se(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function Fe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function Ae(e){let n=Fe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function He({href:e}){let n=X(()=>Ae(e),[e]),[t,r]=p(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ue:o?de:le;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function _e({children:e,href:n,title:t}){let r=y();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Se(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(He,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Oe({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=w(null),[c,d]=p(null),[u,h]=p(null),[M,b]=p(!1);if(k(()=>{let g=Ei(d,h);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let x=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:M?a(z,{}):a(ie,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function je({code:e,language:n}){return y().preview?a("span",{children:e}):a(We,{code:e,language:n})}function We({code:e,language:n}){let t=w(null),[r,o]=p(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(Oe,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function qe(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ke({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(ae,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(ce,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(se,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(me,{})})]})]})}function ze(e){return y().preview?a(te,{children:e.alt}):a(Ue,{...e})}function Ue({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=p();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(te,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(qe(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ke,{preview:s,setPreview:i})})]})}function Be({value:e,display:n}){let t=w(null);return D(()=>{if(t.current===null)throw Error("Codex math root is not mounted");oe.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var De=150,v=null;function j(e,n){let t=v;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function Q(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function W(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,pe)}function Xe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${W(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return W(e.text);default:return""}}function ee(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${Q(Xe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ee(r),s=t.get(o)??0;return t.set(o,s+1),ne(r,`${n}-${o}-${s}`)})}function Ge(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function Je(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function q(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return U(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ve(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>q(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=Q(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>q(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=C(e.href);if(!En(r))return null;return a(ze,{src:r,alt:R(e.text),title:e.title==null?void 0:C(e.title),allowWide:t},n)}function ne(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return U(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>K(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?j(R(t.text),n):m(t.tokens,n)}case"escape":return j(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=C(t.href);return En(o)?a(_e,{href:o,title:t.title==null?void 0:C(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(je,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Je(e,n);case"list_item":return Ge(e,n);case"table":return Ve(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Be,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function T(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?R(n.text):n.tokens.map(T).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(T).join("");case"list":return e.items.map(T).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(T).join("")).join("")).join("")}default:return""}}function Ze({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=v;try{return v={cursor:t,runs:r,generation:o},ne(e,n)}finally{v=s}}var Ye=B(function({result:n}){let{text:t,isStreaming:r}=n,o=X(()=>{let l=n.tokens;if(n.source.includes("!["))Y(l);I(l);let g=new Map,P=0;return l.map((E)=>{let L=ee(E),S=g.get(L)??0;g.set(L,S+1);let F=T(E),re={token:E,tokenKey:`root-${L}-${S}`,offset:P,visibleText:F};return P+=F.length,re})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,h=performance.now(),M=r&&d?c.runs.filter((l)=>h-l.firstSeenAtMs<De):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:M.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)x.runs.push({start:u,end:s.length,firstSeenAtMs:h});return D(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Ze,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:x.runs,generation:b},l.tokenKey))})}),Qe=B(function({text:n,isStreaming:t}){let r=w(null),[o,s]=p(()=>An(n,t)),i=w(o!==null),[c,d]=p(null);if(k(()=>{let u=Li((h)=>{if(!i.current)i.current=!0,s(h);else fe(()=>s(h))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let h=t?$e(n).markdown:n;u.update({source:h,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(Ye,{result:o})});function rt({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=p(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(G.Provider,{value:t,children:a(Qe,{text:r?o:e,isStreaming:r})})}
|
|
7
|
-
export{rt};
|
package/dist/chunk-8an4t4kh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,a,Ft,n,p}from"./chunk-a8gzs651.js";import{E}from"./chunk-7x150rqz.js";import{ye}from"./chunk-3m59n5gr.js";import{me}from"./chunk-h4r8cx37.js";import{$e,pe}from"./chunk-80a1fdx8.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as M,useState as y}from"react";import{jsx as o,jsxs as b,Fragment as C}from"react/jsx-runtime";function sn({sessionRow:e,active:S,onSelect:m,onForked:v=m,onHoverCardOpenChange:d,actions:l}){let s=r(),{t:f,i18n:k}=s,h=a(),c=n((t)=>t.runStates[e.sessionId]),I=Ft(),u=()=>m(e);return o(ye,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:S,onClick:u,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),u()},media:s.SessionMedia?o(s.SessionMedia,{sessionId:e.sessionId,state:c?.state}):void 0,state:c?.state==="idle"&&s.SessionMedia?void 0:c?.state,interruption:c?.interruption??null,title:e.title??f("sessionList.untitled"),onHoverCardOpenChange:d,hoverCard:o(R,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:l}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:$e(e.updatedAt,k.language)}):void 0,actions:c!=null?o(me,{title:f("sessionList.stop"),onStop:()=>p(s,h.stopSession(e.sessionId))}):void 0})}function R({sessionRow:e,onDelete:S,onForked:m,actions:v}){let d=r(),{t:l}=d,s=a(),f=n((i)=>F(i.agent)),k=n((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,c]=y(!1),[I,u]=y(!1),t=M(!1);return o(pe,{sessionRow:e,renaming:h,onRename:(i)=>{if(c(!1),i!==null)p(d,s.renameSession(e.sessionId,i))},actions:b(C,{children:[f&&o(E,{icon:o(H,{}),label:l("sessionList.rename"),onClick:()=>c(!0)}),v,e.archived?o(E,{icon:o(x,{}),label:l("sessionList.unarchive"),onClick:()=>void p(d,s.unarchive(e.sessionId))}):b(C,{children:[o(E,{icon:o(A,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,u(!0),p(d,s.fork(e.sessionId,e.cwd).then((i)=>{let g=s.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{t.current=!1,u(!1)}))}}),o(E,{icon:o(D,{}),label:l("sessionList.archive"),onClick:()=>void p(d,s.archive(e.sessionId))})]}),o(E,{variant:"destructive",icon:o(N,{}),label:l("sessionList.delete"),onClick:S})]})})}
|
|
2
|
-
export{sn};
|
package/dist/chunk-8rpen55z.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Xo,et}from"./chunk-a8j61zs9.js";import{t,X}from"./chunk-f1r8wh4e.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function Dt(e){c.setState({request:{path:e.path,patch:ho(e.patch,e.path)}})}function ho(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function Ht(){let{t:e,theme:a}=t(),n=X(c,(o)=>o.request),s=n===null?null:Xo(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(et,{patch:n.patch,theme:a})})]})})}
|
|
3
|
-
export{Dt,ho,Ht};
|
package/dist/chunk-9rt2pfsm.js
DELETED
package/dist/chunk-a8gzs651.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-958qyr8g.js";import{createContext as m,useContext as c,useState as y,useSyncExternalStore as D}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as L,DialogContent as h,DialogDescription as w,DialogFooter as P,DialogHeader as H,DialogTitle as R}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as o,jsxs as d}from"react/jsx-runtime";var g=m(null),v=m(null),f=m(null);function Er({host:e,client:t,children:i}){let[s,l]=y(null);S(s!==null);let{t:u}=e;return o(g,{value:e,children:o(v,{value:t,children:d(f,{value:l,children:[i,o(L,{open:s!==null,onOpenChange:(x)=>!x&&l(null),children:d(h,{children:[d(H,{children:[o(R,{children:u("sessionList.deleteTitle")}),o(w,{children:u("sessionList.deleteDescription")})]}),d(P,{children:[o(C,{variant:"outline",onClick:()=>l(null),children:u("sessionList.cancel")}),o(C,{onClick:()=>{if(s)p(e,t.delete(s.sessionId));l(null)},children:u("sessionList.delete")})]})]})})]})})})}function r(){let e=c(g);if(e===null)throw Error("Session list host is missing");return e}function po(){return c(g)}function a(){let e=c(v);if(e===null)throw Error("Session list client is missing");return e}function Ft(){let e=c(f);if(e===null)throw Error("Session list provider is missing");return e}function n(e){let t=a();return D((i)=>t.store.subscribe(i),()=>e(t.store.getState()),()=>e(t.store.getState()))}function p(e,t){return t.then(()=>{},(i)=>{if(e.reportError)e.reportError(i);else console.error(i)})}
|
|
2
|
-
export{Er,r,po,a,Ft,n,p};
|
package/dist/chunk-acnqnrqb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{T}from"./chunk-32s8dn1a.js";import{ie}from"./chunk-76a04a6j.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function vi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(T,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ie,{entries:t.entries})}
|
|
2
|
-
export{vi};
|
package/dist/chunk-bpenajbp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C,rn}from"./chunk-70bm3f7n.js";import{bt}from"./chunk-84gk74hf.js";import{useEffect as p,useRef as P,useState as u}from"react";var Zn="providers:changed",Qn="providers:managed-revoked",i=(e)=>e;function rr(){return{read:()=>i(C.providersRead()),save:(e,r,t)=>i(C.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(C.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(C.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>C.providersTest({providerId:e}),apply:()=>i(C.providersApply()),onChanged:(e)=>rn[Zn].listen((r)=>e(r.payload))}}function ar(){return{bind:(e)=>C.providersAccountBind({account:e}),refresh:(e,r)=>i(C.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await C.providersClearManaged()},onRevoked:(e)=>rn[Qn].listen((r)=>e(r.payload.sessionIds))}}async function vt(e){try{return await e.apply()}catch(r){if(!bt(r))throw r;return e.read()}}function yt(e,r=console.error){let[t,d]=u(null),a=P(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
-
export{Zn,Qn,rr,ar,vt,yt};
|
package/dist/chunk-c47xfjk4.js
DELETED
package/dist/chunk-c61yvpy3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-a8gzs651.js";import{he,G,oe}from"./chunk-c7p3vpyx.js";import{useEffect as S,useMemo as f}from"react";function hr(s){let c=G((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")&&he(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=G((i)=>i.activitySeen),r=oe();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,o])=>u.get(i)!==o)}
|
|
2
|
-
export{hr};
|
package/dist/chunk-c7p3vpyx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-a8gzs651.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function he(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)=>he(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)||!he(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 cn(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 Ir(t){u.get(t)?.set(v(t))}function G(t){let n=cn(a());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function oe(){return cn(a()).set}function Nr(){let t=G((e)=>e.view),n=oe();return[t,(e)=>n({view:e})]}
|
|
2
|
-
export{he,cn,Ir,G,oe,Nr};
|
package/dist/chunk-ckhw0gr5.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{isText as f}from"@nyssance/codex-acp-v2/client";import{useRef as p}from"react";function To(l,c){let i=p(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!==l.id||e.value!==n.value))i.current=null,e=null;let u=t.key==="ArrowUp";if(u?n.value.slice(0,n.selectionStart).includes(`
|
|
2
|
-
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
|
-
`))return;if(!e){if(!u||n.value!=="")return;let s=l.items.flatMap((o)=>{if(o.kind!=="user")return[];let a=o.content.filter(f).map((d)=>d.text).join(`
|
|
4
|
-
`);return a.trim()?[a]:[]});if(!s.length)return;e={sessionId:l.id,entries:s,index:s.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(u?-1:1)));let r=e.entries[e.index]??"";if(e.value=r,c(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
-
export{To};
|
package/dist/chunk-d0ta9y85.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function jn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function nn(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ne(t){return t.type==="array"}function ht(t){return(Ne(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{jn,nn,Ne,ht};
|
package/dist/chunk-dz5ymd3t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,i}from"./chunk-g79y6q3f.js";import{F,D,J,H,O,se}from"./chunk-w7p443ya.js";import{ae}from"./chunk-rfahybr0.js";import{h}from"./chunk-9cqpn67f.js";import{de}from"./chunk-8d86yqzq.js";import{U,le}from"./chunk-yftn8cw0.js";import{CheckIcon as V,SparklesIcon as X,XIcon as _}from"lucide-react";import{useDeferredValue as K,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Q,DialogClose as R,DialogContent as W,DialogDescription as Y,DialogHeader as Z,DialogTitle as ee}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as te}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as ne}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ie}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as oe,TabsContent as re,TabsList as ce,TabsTrigger as pe}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function P({skill:c}){let{assetUrl:m}=l(),[u,s]=v(!1),o=c.interface?.iconSmall,b=o&&m?m(o):c.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:b&&!u?t("img",{src:b,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(X,{className:"text-muted-foreground size-6"})})}function me({skill:c}){let{t:m}=l(),u=i((o)=>o.setSkillEnabled),s=i((o)=>(c.path in o.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(ne,{className:"text-muted-foreground size-3.5"}),t(ie,{checked:c.enabled,disabled:s,"aria-label":`${m(c.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${c.interface?.displayName??c.name}`,onCheckedChange:(o)=>void u(c,o)})]})}function ut({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),b=i((e)=>e.skillErrors),j=i((e)=>e.loading)||!m,z=i((e)=>e.installed),M=i((e)=>e.skillProjects),[E,L]=v(null),[k,B]=v(!1),[G,C]=v(null),x=K(c.trim().toLowerCase()),r=o.find((e)=>e.path===G),N=z.find(({plugin:e})=>e.id===r?.pluginId),p=o.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=o.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(M).flatMap(([e,a])=>{if(!o.some((T)=>T.scope==="repo"&&a.includes(T.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],q=d.map((e)=>e.label);for(let e of d)if(e.path&&q.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===E)??d[0],w=g?p.filter((e)=>g.paths.has(e.path)):[],A=k||x?p:p.slice(0,6),I=(e)=>t(O,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(se,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(H,{className:"pointer-events-none relative translate-none! self-center!",children:t(P,{skill:a})}),n(D,{className:"pointer-events-none relative min-w-0",children:[t(te,{className:"block truncate",children:a.interface?.displayName??a.name}),t(J,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(F,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(V,{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(h,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${U} space-y-8 pt-6`,children:[b.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),j?t(ae,{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:p.length})})]}),p.length?I(A):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>B((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(oe,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")L(e)},className:"gap-6",children:[t(ce,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(pe,{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))}),d.map((e)=>t(re,{value:e.id,children:e.id===g.id&&(w.length?I(w):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(Q,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(W,{showCloseButton:!1,className:le,children:r&&n(S,{children:[t(de,{path:r.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(P,{skill:r}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(me,{skill:r}),e,t(R,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(_,{})})]})]}),n(Z,{className:"gap-3",children:[t(ee,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),t(Y,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]})]})},r.path),r.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):r.pluginId]})]})})})]})}
|
|
2
|
-
export{ut};
|
package/dist/chunk-f1r8wh4e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Qi}from"./chunk-32s8dn1a.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function Se({host:e,client:n,children:i}){return r(Qi,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function _e(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function X(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=_e();return X(n.store,e)}function ct(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{Se,t,_e,X,o,ct};
|
package/dist/chunk-fzgra242.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{r}from"./chunk-a8gzs651.js";import{m,u}from"./chunk-3m59n5gr.js";import{We}from"./chunk-fbmbc4wt.js";import{cn as s}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as d,DropdownMenuContent as g,DropdownMenuItem as f,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as L}from"react/jsx-runtime";function Mr({onCollapseAll:i}){let{t:n}=r();return L(d,{children:[o(w,{render:o(We,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(g,{align:"end",className:"w-52",children:o(f,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Ar({screen:i,onSwitch:n}){let{t:e}=r(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(u,{className:s(c,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(m,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
|
-
export{Mr,Ar};
|
package/dist/chunk-g0gq72z9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t,ct}from"./chunk-f1r8wh4e.js";import{isEmbeddedResource as B,isImage as h,isResourceLink as E}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as T,FileIcon as N,ImageOffIcon as L,LoaderCircleIcon as F}from"lucide-react";import{useState as y}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function jr(e){let s=e.split(/[\\/]/).at(-1)??e;if(e.startsWith("file:")||/^https?:/.test(e))s=new URL(e).pathname.split("/").at(-1)??"";try{return decodeURIComponent(s)||"attachment"}catch(a){if(a instanceof URIError)return s||"attachment";throw a}}function U(e,s){let a=document.createElement("a");a.href=s,a.download=e,a.click()}function Y({block:e,generated:s=!1}){let a=t(),[p,d]=y(!1),[I,C]=y(null);if(E(e)){if(e.uri==="codex-image:unavailable")return o("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[n(L,{className:"size-4"}),a.t("timeline.imageUnavailable")]});let c=jr(e.uri);return o(u,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":e.title??e.name,title:e.uri,onClick:()=>a.openLink(e.uri),children:[n(N,{}),o("span",{className:"min-w-0 flex-1 text-start",children:[n("span",{className:"block truncate",children:e.title??e.name}),o("span",{className:"text-muted-foreground block truncate text-xs",children:[(e.title??e.name)!==c&&`${c} · `,e.mimeType??c.split(".").at(-1)?.toUpperCase()]})]})]})}if(!B(e)&&!h(e))return null;let i=h(e)?{uri:e.uri??`image.${e.mimeType.split("/")[1]??"png"}`,mimeType:e.mimeType,blob:e.data}:e.resource,r=jr(i.uri);if("text"in i)return o("div",{className:"min-w-0",children:[n("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:i.text}),o(u,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:i.uri,onClick:()=>a.openLink(i.uri),children:[n(N,{}),n("span",{className:"truncate",children:r})]})]});let l=`data:${i.mimeType??"application/octet-stream"};base64,${i.blob}`,f=i.mimeType?.toLowerCase().startsWith("image/")&&I!==l,{openImage:g,openImageGallery:w}=a,x=w?()=>w([{src:l,alt:r,uri:i.uri}],0):g&&(()=>g(l)),m=s&&f,R=async()=>{d(!0);try{if(a.saveFile)await a.saveFile(r,i.blob);else U(r,l)}catch(c){ct(a,c)}finally{d(!1)}},v=n("img",{src:l,alt:"",className:s?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(l)});return o("div",{className:m?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:n(u,{variant:"ghost",className:s?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":a.t("timeline.viewImage"),onClick:x,children:v})),o(u,{variant:m?"secondary":"link",size:m?"icon":"sm",className:m?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:a.t("timeline.download",{name:r}),"aria-label":a.t("timeline.download",{name:r}),onClick:()=>{R()},children:[p?n(F,{className:"motion-safe:animate-spin"}):n(T,{}),!m&&n("span",{className:"truncate",children:r})]})]})}
|
|
2
|
-
export{jr,Y};
|
package/dist/chunk-g79y6q3f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ft}from"./chunk-4cb0c8ae.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Pe(e){let t=r.get(e);if(!t)t=ft(e),r.set(e,t);return t}function Xi({host:e,client:t,children:n}){let s=Pe(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Te(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Be(e){let t=Te();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Pe(Te());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Ie(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Pe,Xi,l,Te,Be,i,Ie};
|
package/dist/chunk-gfrzmgz4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{be}from"./chunk-c47xfjk4.js";import{zo,N}from"./chunk-75ve01mr.js";import{Lo,Ro,Fo,Do,Ho,R}from"./chunk-p38vws4a.js";import{t,o}from"./chunk-f1r8wh4e.js";import{e}from"./chunk-6pnsagt4.js";import{$o}from"./chunk-nm4dtceb.js";import{Io}from"./chunk-1bfxezrb.js";import{xo}from"./chunk-8428vfp3.js";import{vo,yo}from"./chunk-7egc2evj.js";import{un}from"./chunk-h9ywpga2.js";import{vn}from"./chunk-s8xpf179.js";import{s,Vo,z,qt}from"./chunk-xrbydq2j.js";import{zt}from"./chunk-ewjh6s2b.js";import{Re,$t}from"./chunk-hkjj3prp.js";import{Wt,Qt}from"./chunk-9rt2pfsm.js";import{Ko}from"./chunk-jwzwz2wr.js";import{jt}from"./chunk-70j4ee5r.js";import{Po}from"./chunk-t1zw5wrq.js";import{Yt}from"./chunk-h4adycra.js";import{Vt}from"./chunk-fw2jj4hh.js";import{To}from"./chunk-ckhw0gr5.js";import{Eo}from"./chunk-6z36709h.js";import{Ao}from"./chunk-zk2hwm10.js";import{Gt}from"./chunk-brfr0m5g.js";import{hasFuzzyFileSearch as Nt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as St}from"lucide-react";import{useCallback as O,useEffect as kt,useLayoutEffect as Z,useMemo as tt,useRef as V,useState as F}from"react";import{jsx as i,jsxs as v,Fragment as Bt}from"react/jsx-runtime";var Ot=["image/png","image/jpeg","image/webp","image/gif"],et=[];async function Ft(r){let h=await(await fetch(r.url)).blob();return new Promise((l,C)=>{let T=new FileReader;T.onerror=()=>C(T.error),T.onload=()=>{let U=T.result;l(U.slice(U.indexOf(",")+1))},T.readAsDataURL(h)})}function Dt(r){let{t:h}=t(),l=N();return i(R,{"aria-label":h("composer.attachImage"),title:h("composer.attachImage"),onClick:()=>l.openFileDialog(),...r,children:i(St,{className:"size-4"})})}function Ut({session:r,onSubmit:h,onShellCommand:l,onHandOff:C,modelSelector:T,modelMenu:U,inputHeader:rt,actions:ft,leadingTools:ht,agentControls:X=!0,placeholder:gt,children:xt,attachmentPolicy:yt,predictions:Pt=!0,disabled:bt=!1,preparing:ot=!1,allowPendingInput:vt=!1}){let{host:D,client:E}=e(),{t:p}=D,B=O((n)=>{if(D.reportError)D.reportError(n);else console.error(n)},[D]),[nt,_]=F(()=>({text:s.get(r.id)?.text??"",revision:0})),{text:d}=nt,[A,wt]=F(()=>s.get(r.id)?.attachments??et),[g,H]=F(()=>s.get(r.id)?.mentions??[]),q=A.some((n)=>Re(n)&&n.pastedText.status!=="ready"),[M,at]=F(!1),[K,It]=F(!1),[J,it]=F(!1),u=V(null),ct=V(null),a=V(nt),S=O((n)=>{ct.current?.(),a.current={text:n,revision:a.current.revision+1},_(a.current)},[]),Tt=To(r,S),st=tt(()=>({read:()=>{let c=u.current?.getTextarea(),x=c===null||c===void 0?[a.current.text.length,a.current.text.length]:[c.selectionStart,c.selectionEnd];return{target:r.id,...a.current,selection:x}},compareAndSet(c,x,w){if(c.target!==r.id||c.revision!==a.current.revision)return null;a.current={text:x,revision:a.current.revision+1},_(a.current);let y=u.current?.getTextarea();if(y!==null&&y!==void 0)y.value=x,y.setSelectionRange(w[0],w[1]);return{target:r.id,...a.current,selection:w}}}),[r.id]),L=V(null),mt=O((n)=>(L.current=n,()=>{if(L.current===n)L.current=null}),[]),W=r.state!=="idle",P=l!==void 0&&d.startsWith("!"),f=!bt&&!ot&&r.attached&&!r.restoring&&!r.readOnly,k=!r.readOnly&&(vt||f),j=Vt(r,f&&!M&&!K&&!q&&!J,d.length>0||A.length>0||g.length>0,Pt&&!P),pt=j.invalidate;Z(()=>{s.set(r.id,{text:d,attachments:A,mentions:g,modelId:s.get(r.id)?.modelId??null})},[r.id,d,A,g]),Z(()=>Vo(r.id,wt),[r.id]),Z(()=>qt(r.id,(n)=>{if(!k||M)throw Error("The composer cannot take text now; try again later");if(d.length||A.length||g.length)throw Error("The composer already has a draft; send or clear it first");S(n)}),[r.id,k,M,d,A,g,S]);let lt=o((n)=>Nt(n.agent)),At=tt(()=>lt&&f?async(n)=>zt((await E.fuzzyFileSearch({query:n,roots:[r.cwd],cancellationToken:null})).files):void 0,[E,lt,f,r.cwd]),Q=O((n)=>{H((c)=>c.includes(n)?c:[...c,n])},[]);kt(()=>{u.current?.focus()},[]);let dt=O(async({text:n,files:c})=>{let x=l!==void 0&&n.startsWith("!")?n.slice(1):null;if(x!==null){if(x.trim().length===0)return;if(c.length||g.length)throw Error("Shell commands cannot include file references or attachments");if(r.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let w=n.trim();if(w.length===0&&c.length===0&&g.length===0)return;let y=L.current;at(!0);let I=s.get(r.id),Rt=a.current.revision,G=null;try{let b=$o(w);for(let m of g){let Y={kind:"file",absPath:m};b.push({type:"resource_link",uri:Wt(Y),name:Qt(Y)})}if(w.length>0)b.push({type:"text",text:w});for(let m of c)if(Re(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");b.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else b.push({type:"image",data:await Ft(m),mimeType:m.mediaType});if(a.current.revision===Rt&&s.get(r.id)===I)a.current={text:"",revision:a.current.revision+1},G=a.current.revision,_(a.current),H([]),z(r.id,()=>et),s.set(r.id,{text:"",attachments:et,mentions:[],modelId:I?.modelId??null}),u.current?.resetHeight();if(x!==null&&l)await l(x);else if(h)if(y===null)await h(b);else await h(b,(m)=>{if(y.signal.aborted||L.current!==y)return;y.accept(m),C?.(r.id,m)});else if(y===null)await E.prompt(r.id,b);else{let m=await E.prompt(r.id,b);y.accept(m)}pt();for(let m of I?.attachments??[])if(m.url.startsWith("blob:")&&!s.get(r.id)?.attachments.some((Y)=>Y.id===m.id))URL.revokeObjectURL(m.url)}catch(b){if(I&&G!==null&&a.current.revision===G&&s.get(r.id)?.attachments.length===0&&s.get(r.id)?.mentions.length===0)a.current={text:I.text,revision:G+1},_(a.current),H(I.mentions),s.set(r.id,I),z(r.id,()=>I.attachments);throw b}finally{at(!1),u.current?.focus()}},[E,r.id,r.state,g,h,l,C,pt]),Mt=()=>{E.cancel(r.id).catch(B)},Ct=O((n)=>{let c=n.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:be})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});B(c)},[B,p]),Et=tt(()=>({session:r,ready:f,inputReady:k,sending:M,textareaRef:u,draft:st,interruptRef:ct,observeReceipts:mt,addMention:Q,setAdding:It,shellMode:P,handsFree:!P&&(h===void 0||C!==void 0)}),[r,f,k,M,st,mt,Q,h,C,P]),ut=D.writeTextAttachment;return i(vn,{value:Et,children:i("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[rt&&i("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:rt}),v(zo,{attachmentPolicy:yt,value:d,revision:a.current.revision,onValueChange:S,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},_(a.current)},attachments:A,onAttachmentsChange:(n)=>z(r.id,()=>n),children:[X&&i(xo,{bashMode:l!==void 0,handleRef:u,commands:r.commands,searchFiles:At,onMention:Q,onSearchError:B,forcedOpen:J,onForcedOpenChange:it,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),v(Lo,{"data-shell-mode":P||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Ot.join(","),onError:Ct,onSubmit:dt,onSubmitAsync:dt,onSubmitError:B,canSubmit:()=>f&&!M&&!K&&!q&&(!P||!W&&d.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[xt,v(Fo,{className:"px-3 pt-3 pb-0 empty:hidden",children:[K&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),i(Ko,{mentions:g,onRemove:(n)=>H((c)=>c.filter((x)=>x!==n))}),i(yo,{children:(n)=>Re(n)?i(Po,{data:n,sessionId:r.id}):i(vo,{data:n,t:p})})]}),v(Ro,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(n)=>{if(!j.text||u.current?.isComposing()||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||n.shiftKey||n.ctrlKey||n.altKey||n.metaKey||n.target!==u.current?.getTextarea())return;if(n.key==="Tab")n.preventDefault(),n.stopPropagation(),S(j.text)},children:[P&&i("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),i(un,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,onKeyDown:Tt,bashMode:l!==void 0,disabled:!k,onPasteCapture:ut?(n)=>$t(n,r.id,p("composer.pastedTextFilename"),ut):void 0,placeholder:P?"! command":j.text||gt||(W?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),i(Do,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[i(Dt,{className:"text-foreground",disabled:!k}),ht,X&&v(Bt,{children:[i(Eo,{textareaRef:u,menuOpen:J,onOpenChange:it,disabled:!f||r.commands.length===0}),i(Io,{disabled:!f||P,onSelect:(n)=>{S(`${d}${d&&!/\s$/.test(d)?" ":""}${n} `),u.current?.getTextarea()?.focus()}}),i(Yt,{sessionId:r.id,options:r.configOptions,disabled:!f})]})]}),v(Ho,{className:"w-full min-w-0 items-center justify-end gap-1",children:[X&&i(Gt,{session:r}),T??i(jt,{...U,sessionId:r.id,options:r.configOptions,disabled:!f}),ft,i(Ao,{active:W,sending:M||ot||K,ready:f&&!q&&(!P||!W&&d.slice(1).trim().length>0),hasMentions:g.length>0,onStop:Mt})]})]})})]})]})]})})})}
|
|
2
|
-
export{Ut};
|
package/dist/chunk-gkp0e28t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-958qyr8g.js";import{r,p}from"./chunk-a8gzs651.js";import{m,u}from"./chunk-3m59n5gr.js";import{GlobeIcon as G,LogOutIcon as R}from"lucide-react";import{useRef as k,useState as l}from"react";import{Avatar as T,AvatarFallback as B,AvatarImage as E}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as g,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as f,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function wr(e){return o(g,{...e})}function kr(e){return o(f,{...e})}function so({className:e,...a}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...a})}function Sr({languages:e,value:a,onChange:c}){let s=r();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(G,{className:"text-muted-foreground"}),s.t("sessionList.language")]}),o(_,{children:o(z,{value:a,onValueChange:(t)=>void p(s,Promise.resolve(c(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function _r({user:e,children:a,onSignOut:c,busy:s=!1}){let t=r(),{t:N}=t,[M,C]=l(!1),[L,w]=l(!1),b=k(null),[v,O]=l({width:0,offset:0}),P=(h)=>{if(h){let d=b.current,i=d?.closest("[data-sidebar-footer-row]");if(!d||!i)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=i.getBoundingClientRect(),A=d.getBoundingClientRect(),I=getComputedStyle(i).direction==="rtl";O({width:i.clientWidth,offset:I?y.right-A.right:A.left-y.left})}C(h)};S(M);let D=s||L,x=n(T,{className:"size-[18px] after:border-0",children:[o(E,{src:e.avatar??void 0,alt:""}),o(B,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:M,onOpenChange:P,children:[n(J,{ref:b,render:o(u,{disabled:D,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(m,{children:x}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-v.offset,sideOffset:8,style:{width:v.width},children:[n(g,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(m,{children:x}),n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(f,{})]}),a,a!=null&&o(f,{}),o(g,{children:n(so,{disabled:D,onClick:()=>{w(!0),p(t,c()).finally(()=>w(!1))},children:[o(R,{}),N("sessionList.signOut")]})})]})]})}
|
|
2
|
-
export{wr,kr,so,Sr,_r};
|
package/dist/chunk-gwa7hbzr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{T}from"./chunk-32s8dn1a.js";import{t}from"./chunk-f1r8wh4e.js";import{Y}from"./chunk-g0gq72z9.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(T,{text:e.text,streaming:o})})}if(i.isImage(e))return n(Y,{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(Y,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function ke({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
-
export{ke};
|
package/dist/chunk-h4adycra.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{qo}from"./chunk-3v39hqex.js";import{e,f}from"./chunk-6pnsagt4.js";import{j,g}from"./chunk-w0dfvr05.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":y,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:h,onConfigChange:c}){let{host:l,client:M}=e(),{t:r}=l,s=g(m,"mode");if(!s)return null;let o=s.currentValue,p=j(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),I=p.find((n)=>n.value===o),C=d[o]??a,v=(n)=>{if(n===o)return;f(l,c?c(s.configId,n):M.setConfig(u,s.configId,n))};return t(qo,{value:o,warning:o==="agent-full-access",currentName:I?.name??o,icon:t(C,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:h,label:r("composer.switchPermissionMode"),onValueChange:v,options:p.map((n)=>{let i=d[n.value]??a,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Yt=O(N);
|
|
2
|
-
export{Yt};
|
package/dist/chunk-h9ywpga2.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Co,wo,Bt}from"./chunk-kmeccf75.js";import{Xe,N}from"./chunk-75ve01mr.js";import{cn as D}from"cn";import{forwardRef as M,useCallback as R,useEffect as x,useImperativeHandle as F,useRef as d}from"react";import{InputGroupTextarea as K}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,L=()=>!1,un=M(({onChange:c,onKeyDown:T,onCompositionStart:b,onCompositionEnd:y,className:E,placeholder:I,bashMode:C=!1,isSendShortcut:H=z,isNewlineShortcut:S=L,...h},P)=>{let n=Xe(),p=N(),u=d(!1),i=d(!1),a=d(null),l=d(null),o=R(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);x(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([s])=>{if(s&&s.contentRect.width!==t)t=s.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),x(o,[o,n?.textInput.value,h.value]);let f=C&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||i.current)return;if(T?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
|
-
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(f&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(S(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:s,value:m}=t,g=`${m.slice(0,r)}
|
|
3
|
-
${m.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},k=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:s}=Co(t),m=wo(t);if(r.length>0)e.preventDefault(),p.add(r);else if(s&&!m)e.preventDefault()},A=n?{value:u.current&&a.current?a.current.value:f?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:Bt(e.currentTarget);n.textInput.setInput(f?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)Bt(e.currentTarget);o(),c?.(e)}};return F(P,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||i.current,getTextarea:()=>a.current}),[]),q(K,{"data-chat-input":!0,ref:a,rows:3,className:D("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=Bt(e.currentTarget);n?.textInput.setInput(f?`!${t}`:t),o(),y?.(e),i.current=!0,requestAnimationFrame(()=>{i.current=!1})},onCompositionStart:(e)=>{i.current=!1,u.current=!0,b?.(e)},onKeyDown:w,onPaste:k,placeholder:I,...h,...A})});un.displayName="PromptInputTextarea";
|
|
4
|
-
export{un};
|
package/dist/chunk-hkjj3prp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ce}from"./chunk-qdw6bkg1.js";import{s,z,Kt}from"./chunk-xrbydq2j.js";var Mo=5000;function Re(t){return"pastedText"in t}function Ze(t,e,o){let i=(r,n)=>{for(let[a,x]of s){if(!x.attachments.some((p)=>p.id===e.id))continue;z(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:n===void 0?"":Ce(n),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!s.get(t)?.attachments.some((r)=>r.id===e.id))return;i("pending"),Kt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>i("ready",r)).catch(()=>i("error")))}function $t(t,e,o,i){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Mo)return;t.preventDefault(),t.stopPropagation();let n={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};z(e,(a)=>[...a,n]),Ze(e,n,i)}
|
|
2
|
-
export{Mo,Re,Ze,$t};
|
package/dist/chunk-jkyepwr1.js
DELETED
package/dist/chunk-kmeccf75.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Qr(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function Co(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Qr(t,o))}return{imageFiles:n,sawNonImageFile:i}}function wo(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Yr(e){return e.replace(s,"")}function Dr(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Bt(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Yr(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-Dr(n,i)),r=Math.max(0,o-Dr(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{Qr,Co,wo,Yr,Dr,Bt};
|
package/dist/chunk-m1adrey8.js
DELETED
package/dist/chunk-m7wse5yk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{a,n}from"./chunk-a8gzs651.js";import{k,m,u,Q}from"./chunk-3m59n5gr.js";import{w,te,io}from"./chunk-w65d6934.js";import{je}from"./chunk-1zypzzje.js";import{A,W}from"./chunk-3zwbr9xs.js";import{ue,ee}from"./chunk-q0bwkhpy.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as X,useSensors as De}from"@dnd-kit/core";import{SortableContext as Y,sortableKeyboardCoordinates as we,useSortable as ae,verticalListSortingStrategy as Z}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as G}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as de,StarIcon as be,Trash2Icon as me}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as oe,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:y,children:x}){let{attributes:N,listeners:I,setNodeRef:i,transform:g,transition:f,isDragging:M}=ae({id:JSON.stringify([l,y]),data:{type:"session",collectionId:l,sessionId:y}});return e("div",{ref:i,style:{transform:ce.Transform.toString(g),transition:f},className:G("w-full min-w-0",M&&"opacity-50"),...N,...I,role:"group",children:x})}function Be({collection:l,children:y,onEdit:x,onConfirm:N,onNewChat:I}){let{t:i}=w(),g=ee(),f=te(),{attributes:M,listeners:p,setNodeRef:h,transform:P,transition:T,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===A,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:ce.Transform.toString(P),transition:T},className:G("w-full min-w-0",z&&"opacity-50"),children:e(Q,{open:!l.collapsed,onOpenChange:(d)=>f(g({type:"collapse",id:l.id,collapsed:!d})),label:W(l,i),count:l.sessionIds.length,leading:l.id===A?e(be,{className:"size-3.5"}):e(je,{emoji:l.emoji,onChange:(d)=>f(g({type:"emoji",id:l.id,emoji:d}))}),wrapHeader:(d)=>e("div",{...M,...p,role:"group",children:d}),actions:s(Ee,{children:[e(Re,{onClick:(d)=>d.stopPropagation(),onPointerDown:(d)=>d.stopPropagation(),render:e(v,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:W(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==A&&s(H,{onClick:x,children:[e(he,{}),i("collection.rename")]}),s(H,{onClick:I,children:[e(de,{}),i("collection.newChat")]}),s(H,{onClick:()=>N("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==A&&s(H,{variant:"destructive",onClick:()=>N("delete"),children:[e(me,{}),i("collection.deleteCollection")]})]})})]}),children:y})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function dr({renderRow:l,onSelect:y,onNewChat:x,Scroll:N=He}){let I=w(),{t:i}=I,g=ee(),f=te(),M=a(),{collections:p,order:h}=ue(),P=n((o)=>o.sessionList),T=n((o)=>o.archivedSessions),z=n((o)=>o.sessionListLoaded),d=n((o)=>o.sessionListError),F=Me(()=>new Map([...T,...P].map((o)=>[o.sessionId,o])),[T,P]),U=I.isMac??io(),[S,E]=R(null),[L,K]=R(""),[_,O]=R(""),[D,B]=R(null),[C,q]=R(!1),pe=De(X(Se,{activationConstraint:{distance:5}}),X(ye,{coordinateGetter:we})),j=h.flatMap((o)=>p[o].collapsed?[]:p[o].sessionIds.flatMap((t)=>{let r=F.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(U?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;t.preventDefault(),y(j[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[j,U,y]);let ge=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let V=b.type==="session"?String(b.collectionId):String(t.id);f(g({type:"move",sourceCollectionId:String(r.collectionId),collectionId:V,sessionId:String(r.sessionId),index:b.type==="session"?p[V].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==A)f(g({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},J=(o,t)=>{q(!0),f(o.then(t).finally(()=>q(!1)))};return s(ze,{children:[e(N,{children:s(k,{children:[s(u,{className:G(c,"font-normal"),onClick:()=>{E("new"),K(""),O("")},children:[e(m,{children:e(de,{})}),e("span",{children:i("collection.newCollection")})]}),d&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:d}),e(v,{variant:"ghost",onClick:()=>f(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:pe,collisionDetection:fe,onDragEnd:ge,children:e(Y,{items:h,strategy:Z,children:e(k,{children:h.map((o)=>e(Be,{collection:p[o],onNewChat:()=>x(o),onEdit:()=>{E(o),K(p[o].name),O(p[o].emoji??"")},onConfirm:(t)=>B({id:o,type:t}),children:e(Y,{items:p[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:Z,children:p[o].sessionIds.map((t)=>{let r=F.get(t);if(r?.archived)return null;if(!r)return z?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(m,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(v,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>f(g({type:"remove",sessionId:t,collectionId:o})),children:e(me,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(oe,{open:S!==null,onOpenChange:(o)=>{if(!o&&!C)E(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(S==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(o)=>{if(o.preventDefault(),S===null||!L.trim()||C)return;let t=S==="new"?`collection-${crypto.randomUUID()}`:S;J(g([S==="new"?{type:"create",id:t,name:L}:{type:"rename",id:t,name:L},{type:"emoji",id:t,emoji:_}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(o)=>K(o.target.value),disabled:C}),S!=="new"&&e(je,{emoji:_,onChange:O}),s(le,{children:[e(v,{type:"button",variant:"outline",disabled:C,onClick:()=>E(null),children:i("collection.cancel")}),e(v,{type:"submit",disabled:C||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(oe,{open:D!==null,onOpenChange:(o)=>{if(!o&&!C)B(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(D?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:D===null?"":W(p[D.id],i)})})]}),s(le,{children:[e(v,{variant:"outline",disabled:C,onClick:()=>B(null),children:i("collection.cancel")}),e(v,{disabled:C,onClick:()=>{if(D!==null)J(g({type:D.type,id:D.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{dr};
|
package/dist/chunk-nm4dtceb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function jo(n){return`[$${(n.runtimeName||n.id).replace(/[\[\]\\\r\n]/g," ").trim()}](app://${n.id})`}function $o(n){let e=new Set;return[...n.matchAll(/\[\$([^\]\r\n]+)\]\((app:\/\/[^/?#\s)]+)\)/g)].flatMap((i)=>{let[,r,t]=i;if(!r||!t||e.has(t))return[];return e.add(t),[{type:"resource_link",name:r,uri:t}]})}
|
|
2
|
-
export{jo,$o};
|
package/dist/chunk-p5mfv6t6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b}from"./chunk-57p1s7hy.js";import{o}from"./chunk-f1r8wh4e.js";import{tt}from"./chunk-s4m2h876.js";import{g,K}from"./chunk-w0dfvr05.js";import{e}from"./chunk-6pnsagt4.js";import{Hn}from"./chunk-wyr7zv2j.js";import{ChevronDownIcon as G,ChevronRightIcon as F,GitBranchIcon as Y,Loader2Icon as J,SquareIcon as Z}from"lucide-react";import{useCallback as ss,useEffect as es,useId as Q,useRef as O,useState as k}from"react";import{Button as z}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as as}from"react/jsx-runtime";function yn(s,l){let d=o((u)=>u.sessions),r=o((u)=>u.actions),[v,m]=k(()=>new Set);return(u)=>{let c=l?.(u)??null,a=Hn(s.id,u,d,r,s);if(a.length===0)return c;let h=`${s.id}:${u.key}`;return{active:c?.active===!0||a.some((i)=>i.status==="running"||i.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||v.has(h),content:p(as,{children:[t(Jo,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(h)?i:new Set([...i,h]))}),c?.content]})}}}function Jo({sessionId:s,turn:l,parent:d,tasks:r,onExpand:v}){let{host:m}=e(),u=o((n)=>n.sessions),c=o((n)=>n.actions),a=r??Hn(s,l,u,c,d),h=a.some((n)=>n.status==="running"),i=a.some((n)=>n.status==="running"||n.status==="requires_action"),[x,w]=b(`subagents:${s}:${l.key}`,i,!0),C=Q();if(a.length===0)return null;let f=new Map;for(let n of a)f.set(n.status,(f.get(n.status)??0)+1);let N=[...f].map(([n,I])=>`${m.t(`subagents.${n}`)} ${I}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(z,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":x,"aria-controls":C,onClick:()=>{if(!x)v?.();w(!x)},children:[x?t(G,{className:"size-3.5 shrink-0"}):t(F,{className:"size-3.5 shrink-0"}),h?t(J,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(Y,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",a.length]}),t("span",{className:"truncate",role:"status",children:N})]}),t("div",{id:C,hidden:!x,className:"border-border ms-3 min-w-0 border-s ps-2",children:a.map((n)=>t(ts,{task:n,cwd:d?.cwd??u[s]?.cwd??"",visible:x,stateKey:`${s}:${l.key}:${n.key}`,onRead:()=>{v?.(),w(!0)}},n.key))})]})}function A(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function ts({task:s,cwd:l,stateKey:d,visible:r,onRead:v}){let{client:m,host:u}=e(),{t:c}=u,a=s.session,h=o((y)=>y.connection==="ready"),[i,x]=b(`subagent:${d}`,!1),[w,C]=k(!1),[f,N]=k(null),[n,I]=k(null),[R,U]=k(null),[B,P]=k(!1),q=O(!1),_=O(!1),j=Q(),W=a&&g(a.configOptions,"model"),T=s.title??c("subagents.untitled"),H=n?A(n,a):a,V=h&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),M=s.threadId,D=a?.cwd??l,E=ss(async(y)=>{if(!m.readSubagentHistory||M===null||q.current)return;_.current=!0,q.current=!0,P(!0),N(null);try{let S=await m.readSubagentHistory(M,D,y);I((L)=>L===null?S.session:A(S.session,L)),U(S.cursor)}catch(S){N(S instanceof Error?S.message:String(S))}finally{q.current=!1,P(!1)}},[m,M,D]);es(()=>{if(r&&i&&!_.current)E(null)},[r,i,E]);let X=async()=>{if(!a)throw Error("A live child session is required for cancellation");C(!0),N(null);try{await m.cancel(a.id)}catch(y){N(y instanceof Error?y.message:String(y))}finally{C(!1)}};return p("section",{"aria-label":T,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(z,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${T} · ${c(`subagents.${s.status}`)}`,"aria-expanded":i,"aria-controls":j,onClick:()=>{if(!i)v();x(!i)},children:[i?t(G,{className:"size-3.5 shrink-0"}):t(F,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:T}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),V&&t(z,{variant:"ghost",size:"icon-sm",disabled:w,"aria-label":c("subagents.cancel",{name:T}),onClick:()=>{X()},children:w?t(J,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),f&&!i&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:f}),p("div",{id:j,hidden:!i,className:"min-w-0 ps-4",children:[(s.description||W)&&p("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:K(W)})]}),f&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[f," ",s.threadId&&t(z,{variant:"ghost",size:"sm",onClick:()=>{E(n===null?null:R)},children:c("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),R&&t(z,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{E(R)},children:c("timeline.loadEarlier")}),r&&i&&(H&&H.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:H})}):!B&&!f&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:l,host:d}=e(),r=yn(s);return t(tt,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
-
export{yn,Jo};
|
package/dist/chunk-p6gwrqjp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{On}from"./chunk-kctrzc57.js";import{Vi}from"./chunk-pdrz9qs1.js";import{X}from"./chunk-f1r8wh4e.js";import{Oe,Zi}from"./chunk-v0mbfaqw.js";import{e}from"./chunk-6pnsagt4.js";import{useCallback as s}from"react";import"@alwith/module-chat/search.css";import{jsx as m}from"react/jsx-runtime";var h="alwith-chat:find";function qr(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function en({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=X(Oe,(r)=>r),w=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),y=s((r)=>u.sessionId===t?On(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>Zi(t,r,i),[t]),b=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,g=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return m("div",{className:"absolute inset-x-0 top-0 z-30",children:m(Vi,{placement:"body",getViewport:w,findSourceMatches:y,revealTurn:S,prepareSource:b,subscribeOpen:g,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
|
|
2
|
-
export{qr,en};
|
package/dist/chunk-q9h89nv1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E}from"./chunk-7x150rqz.js";import{ve}from"./chunk-3m59n5gr.js";import{w,te}from"./chunk-w65d6934.js";import{A,W}from"./chunk-3zwbr9xs.js";import{ue,ee}from"./chunk-q0bwkhpy.js";import{cn as G}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function to({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:O=n?"none":void 0,allowRemove:R=!0,submenu:g=!1,className:x,onOpenChange:B}){let{t}=w(),c=ee(),T=te(),H=ve(),{collections:s,order:C}=ue(),i=C.find((o)=>s[o].sessionIds.includes(l)),[P,F]=d(!1),[D,b]=d(!1),[m,h]=d(""),[r,v]=d(!1),I=(o)=>{if(F(o),H(o),B?.(o),!o)b(!1),h("")},p=(o)=>{v(!0),T(o.then(()=>{I(!1)}).finally(()=>v(!1)))};return a(L,{modal:!1,open:P,onOpenChange:(o,M)=>{if(!o&&D&&M.reason==="trigger-hover"){M.cancel();return}I(o)},children:[e(J,{disabled:r,"data-hover-background":O,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(N,{variant:"ghost",size:"icon-sm",className:x,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:G(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===A?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:W(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>b(!0),children:[e(z,{}),t("collection.newCollection")]}),R&&i!==void 0&&a(k,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),D&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(Q,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>h(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(N,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function ur({sessionId:l,allowRemove:f=!0}){let{t:n}=w();return e(to,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(E,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
|
|
2
|
-
export{to,ur};
|
package/dist/chunk-qcj6f1rq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function I({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
|
|
2
|
-
export{I};
|
package/dist/chunk-s8xpf179.js
DELETED
package/dist/chunk-stzsxdpp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f1r8wh4e.js";import{e,f}from"./chunk-6pnsagt4.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as j}from"cn";import{FolderClosedIcon as g,FolderPlusIcon as G,XIcon as x}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(n){return n.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||n}function Gr({cwd:n,onChange:u,preparing:b=!1,recentProjects:w}){let{host:i,client:p}=e(),{t:l}=i,v=o((r)=>r.projectContext),h=o((r)=>r.sessionList),y=R(()=>w??[...new Set([...h].toSorted((r,m)=>(m.updatedAt??"").localeCompare(r.updatedAt??"")).map((r)=>r.cwd))],[w,h]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let r=!0;return f(i,p.refreshProjectContext(!0).then((m)=>{if(r)N(m.chatDirectory)})),()=>{r=!1}},[i,p]);let D=[...n!==null?[n]:[],...y.filter((r)=>r!==n)].filter((r)=>r!==c&&(!v||z(v,{cwd:r}).id!==I)),a=n!==null&&n!==c,P=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":b,className:j("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(C,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:P,children:[t(g,{className:"size-4 group-hover/project:opacity-0"}),t("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:t(x,{className:"size-3"})})]}),s(_,{render:t(C,{variant:"ghost",size:"sm",className:j("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&t(g,{className:"size-4"}),t("span",{className:"truncate",children:a?M(n):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[D.length>0&&s(H,{children:[t("div",{className:"max-h-64 overflow-y-auto",children:t(B,{value:n??"",onValueChange:u,children:D.map((r)=>s(E,{value:r,title:r,closeOnClick:!0,children:[t(g,{}),t("span",{className:"truncate",children:M(r)})]},r))})}),(d!==void 0||a)&&t(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{f(i,d(n).then((r)=>{if(r!==null)u(r)}))},children:[t(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:P,children:[t(x,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
-
export{Gr};
|
package/dist/chunk-w0dfvr05.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function j(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function g(e,t){return e.find((n)=>n.category===t&&o(n))}function K(e){return j(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{j,g,K};
|
package/dist/chunk-w65d6934.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{po}from"./chunk-a8gzs651.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function fr({host:o,children:t}){return s(n,{value:o,children:t})}function w(){let o=i(n),e={...po(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function oo(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function te(){let o=w();return(t)=>oo(o,t)}function io(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{fr,w,oo,te,io};
|
package/dist/chunk-w7p443ya.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{xe}from"./chunk-k7y6dqf2.js";import{I}from"./chunk-qcj6f1rq.js";import{cn as n}from"cn";import{Item as i,ItemActions as F,ItemContent as D,ItemDescription as J,ItemMedia as H,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function O({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function se({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(xe,"data-[active=true]:font-medium",e),...r})}function pt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(I,{children:t})})}export{F,D,J,H,O,se,pt};
|
package/dist/chunk-wr5r2t2m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ge}from"./chunk-akvpgx43.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function ro({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:ge(t)}):null}function ao({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(ro,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function At({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(ao,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{ro,ao,At};
|
package/dist/chunk-xrbydq2j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var s=new Map,a=new Map,f=new Map;function Vo(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function z(t,r){let n=s.get(t);if(!n)return;let e=r(n.attachments);s.set(t,{...n,attachments:e}),a.get(t)?.(e)}function Kt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function Hr(t){for(;;){let e=s.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=s.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Or(t,r){if(r===null)s.delete(t);else s.set(t,r)}var i=new Map;function qt(t,r){if(i.has(t))throw Error("A composer is already registered for this session");return i.set(t,r),()=>{if(i.get(t)===r)i.delete(t)}}function Ur(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=i.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=s.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),s.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
|
|
2
|
-
export{s,Vo,z,Kt,Hr,Or,qt,Ur};
|