@alwith/module-chat 0.5.22 → 0.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/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.d.ts +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-0p6y2t9b.js +2 -0
- package/dist/{chunk-dya74vts.js → chunk-0pzyavch.js} +2 -2
- package/dist/{chunk-xgjkj9j8.js → chunk-0wa9yjg3.js} +2 -2
- package/dist/chunk-1e0e41vw.js +2 -0
- package/dist/{chunk-r9dt4bs3.js → chunk-1k21j77z.js} +2 -2
- package/dist/chunk-1kbxsxft.js +2 -0
- package/dist/chunk-1mn2t6ga.js +2 -0
- package/dist/{chunk-2tce3pc5.js → chunk-1qyxrh0n.js} +3 -3
- package/dist/{chunk-2f1qx13s.js → chunk-1rg3nab3.js} +2 -2
- package/dist/{chunk-xrs7x5ah.js → chunk-1vf83jdk.js} +2 -2
- package/dist/{chunk-1ppfn0e1.js → chunk-2f9vjmxz.js} +2 -2
- package/dist/chunk-2rkrmpa7.js +2 -0
- package/dist/{chunk-8hte6dh7.js → chunk-36m8zstj.js} +2 -2
- package/dist/chunk-3bsk6xcf.js +2 -0
- package/dist/{chunk-0mp7tyea.js → chunk-3cssygmg.js} +2 -2
- package/dist/{chunk-9sq2etjk.js → chunk-3e6wcamp.js} +2 -2
- package/dist/{chunk-8t36vprh.js → chunk-3ka3bt0t.js} +2 -2
- package/dist/{chunk-xmstt6hh.js → chunk-3s94ekrs.js} +2 -2
- package/dist/{chunk-dv65h7z5.js → chunk-3vkkmyjm.js} +2 -2
- package/dist/{chunk-23rjsm3a.js → chunk-3yxjh7b1.js} +2 -2
- package/dist/{chunk-8jxcdap5.js → chunk-42atrgm1.js} +2 -2
- package/dist/{chunk-mg2mkzkk.js → chunk-48fj5m0p.js} +2 -2
- package/dist/{chunk-156m3888.js → chunk-4a46cpnm.js} +3 -3
- package/dist/{chunk-1e6x0018.js → chunk-4bb6dzzs.js} +2 -2
- package/dist/chunk-4r7j0ymq.js +2 -0
- package/dist/{chunk-e9ntencj.js → chunk-509kwzxq.js} +2 -2
- package/dist/{chunk-m2b8kzpk.js → chunk-5a6xc345.js} +2 -2
- package/dist/chunk-5ap6fvrp.js +2 -0
- package/dist/chunk-60neqgfx.js +2 -0
- package/dist/{chunk-nxp1b8ny.js → chunk-667z0pac.js} +2 -2
- package/dist/chunk-6dbswsek.js +2 -0
- package/dist/{chunk-3jcmv5qf.js → chunk-6t5war9h.js} +2 -2
- package/dist/chunk-6trv0snh.js +2 -0
- package/dist/{chunk-mcjwwxa1.js → chunk-7170hbdr.js} +2 -2
- package/dist/{chunk-f28hhbf4.js → chunk-74qvpvzv.js} +2 -2
- package/dist/{chunk-jm6zja6h.js → chunk-76a04a6j.js} +2 -2
- package/dist/{chunk-0gy6ngda.js → chunk-7absxkjt.js} +2 -2
- package/dist/chunk-7k64wn19.js +4 -0
- package/dist/{chunk-k7k6qsqh.js → chunk-7z4gtfkd.js} +2 -2
- package/dist/{chunk-nq7gg9vg.js → chunk-855w49k0.js} +2 -2
- package/dist/chunk-8dbx6g7q.js +2 -0
- package/dist/{chunk-a8p82wp7.js → chunk-8hf11jas.js} +2 -2
- package/dist/{chunk-xyvqcpjx.js → chunk-92xxp77d.js} +2 -2
- package/dist/{chunk-0fs2k5fe.js → chunk-95mynf7q.js} +2 -2
- package/dist/{chunk-memvzzc6.js → chunk-988sgbn9.js} +2 -2
- package/dist/chunk-99fh3f1v.js +2 -0
- package/dist/{chunk-p4bb313p.js → chunk-9j9rx57q.js} +3 -3
- package/dist/chunk-9tn2n7xv.js +2 -0
- package/dist/chunk-9tp0z23q.js +2 -0
- package/dist/chunk-a1czzft3.js +2 -0
- package/dist/chunk-a4apcx3e.js +3 -0
- package/dist/{chunk-77j8n5k5.js → chunk-a63k8tht.js} +2 -2
- package/dist/{chunk-ap0vmczf.js → chunk-acb8t4jt.js} +2 -2
- package/dist/{chunk-2nvsvw67.js → chunk-agqnt7xq.js} +2 -2
- package/dist/{chunk-8c042xya.js → chunk-apyfztsv.js} +2 -2
- package/dist/chunk-ar4a6nyv.js +2 -0
- package/dist/{chunk-aza82m2p.js → chunk-azfmr99x.js} +2 -2
- package/dist/{chunk-0vhkv9ax.js → chunk-b12v22de.js} +2 -2
- package/dist/chunk-b13pahat.js +2 -0
- package/dist/{chunk-w9dh298r.js → chunk-bg03czcx.js} +2 -2
- package/dist/chunk-bmey8et5.js +2 -0
- package/dist/{chunk-5cdr7q6f.js → chunk-bnbc6q4p.js} +3 -3
- package/dist/{chunk-n3xhh6ch.js → chunk-btanfat4.js} +2 -2
- package/dist/{chunk-67hrx4kg.js → chunk-bvgqsaey.js} +2 -2
- package/dist/chunk-c32z3wjq.js +2 -0
- package/dist/{chunk-1q2cykp4.js → chunk-ckyat78p.js} +2 -2
- package/dist/chunk-cqnqwa54.js +2 -0
- package/dist/{chunk-aqvy57zs.js → chunk-cw76pj9b.js} +2 -2
- package/dist/{chunk-40bcp4pa.js → chunk-d8q2qv1m.js} +2 -2
- package/dist/{chunk-vyk4zh1m.js → chunk-ddk8v2g9.js} +7 -7
- package/dist/{chunk-vs02ry2r.js → chunk-ddv00vjf.js} +2 -2
- package/dist/{chunk-m7wn4z9x.js → chunk-drhzcs6e.js} +2 -2
- package/dist/{chunk-nqw4deag.js → chunk-dte0n4kf.js} +2 -2
- package/dist/chunk-dy92pv7q.js +2 -0
- package/dist/{chunk-63kxepkh.js → chunk-ececn091.js} +2 -2
- package/dist/chunk-f1gj3yzt.js +2 -0
- package/dist/{chunk-0gersbj0.js → chunk-f1x483c9.js} +2 -2
- package/dist/{chunk-dyrgfdxz.js → chunk-f2w2sct6.js} +2 -2
- package/dist/{chunk-mgm1x3de.js → chunk-f5gsffbv.js} +2 -2
- package/dist/{chunk-00eytt1z.js → chunk-fmjez7xp.js} +2 -2
- package/dist/{chunk-vcy5vyp7.js → chunk-fnpf84rf.js} +2 -2
- package/dist/{chunk-3aq5c12k.js → chunk-g2qcyqc6.js} +2 -2
- package/dist/chunk-g2zznfan.js +2 -0
- package/dist/{chunk-hv1ejvhg.js → chunk-g44hhdha.js} +2 -2
- package/dist/{chunk-z2v008kc.js → chunk-gha517v4.js} +2 -2
- package/dist/{chunk-fke98cj0.js → chunk-gsfgdnfp.js} +2 -2
- package/dist/chunk-h9v3pks1.js +1 -0
- package/dist/{chunk-x334e7wb.js → chunk-hdw3mwmb.js} +3 -3
- package/dist/{chunk-8w22ck92.js → chunk-heyqzkxq.js} +2 -2
- package/dist/{chunk-xktybk48.js → chunk-hxtxrtpm.js} +2 -2
- package/dist/chunk-j0m35s05.js +2 -0
- package/dist/{chunk-4s6gx750.js → chunk-j322kgxf.js} +2 -2
- package/dist/{chunk-k5rkpqbh.js → chunk-jgd6dcgy.js} +2 -2
- package/dist/chunk-jhzs9ab0.js +2 -0
- package/dist/chunk-jm6zxy9h.js +2 -0
- package/dist/chunk-jmb8r6aj.js +2 -0
- package/dist/{chunk-42nhwnbe.js → chunk-jwt7q6yx.js} +4 -4
- package/dist/{chunk-983gkw32.js → chunk-jxntqarp.js} +2 -2
- package/dist/{chunk-6dn3j8a2.js → chunk-k7ye738q.js} +2 -2
- package/dist/{chunk-72x7rae0.js → chunk-kc56dhwd.js} +2 -2
- package/dist/{chunk-42hkbpey.js → chunk-kmdag4vy.js} +2 -2
- package/dist/{chunk-n929wkw7.js → chunk-kz1kjzmq.js} +2 -2
- package/dist/{chunk-z2fjwkmt.js → chunk-m0834n5y.js} +2 -2
- package/dist/{chunk-qwfwxfhn.js → chunk-m271yxxm.js} +2 -2
- package/dist/{chunk-zxkvvecz.js → chunk-mj7094yh.js} +2 -2
- package/dist/{chunk-j86x2rn0.js → chunk-mnzqtg7h.js} +2 -2
- package/dist/{chunk-nn25kjm4.js → chunk-mvs2dzyt.js} +2 -2
- package/dist/chunk-mz8a6292.js +2 -0
- package/dist/{chunk-sy5tq3y6.js → chunk-n2e3a7n4.js} +2 -2
- package/dist/{chunk-n0khj68q.js → chunk-n625g0h1.js} +2 -2
- package/dist/{chunk-1f628zap.js → chunk-n66yy1m1.js} +2 -2
- package/dist/chunk-nj9y0bwb.js +2 -0
- package/dist/chunk-nwtambg5.js +2 -0
- package/dist/{chunk-82xjggwn.js → chunk-p7dd93e5.js} +2 -2
- package/dist/chunk-pbf73n1s.js +3 -0
- package/dist/chunk-pk2rvqd0.js +2 -0
- package/dist/{chunk-1tkzxktd.js → chunk-pmkk6e5x.js} +2 -2
- package/dist/{chunk-7wk3d01c.js → chunk-pprt7ntb.js} +4 -4
- package/dist/{chunk-ns5rnxdj.js → chunk-pwjz3yxb.js} +2 -2
- package/dist/chunk-pz0v5f2k.js +2 -0
- package/dist/{chunk-z71pp1mb.js → chunk-pzjag1mt.js} +3 -3
- package/dist/chunk-q9zawfn1.js +2 -0
- package/dist/{chunk-141kppzb.js → chunk-qd1z91fm.js} +1 -1
- package/dist/{chunk-k5wgf59a.js → chunk-qdg5zphd.js} +2 -2
- package/dist/{chunk-2tkeevm0.js → chunk-qmzb07jg.js} +2 -2
- package/dist/chunk-qn6ppn0r.js +2 -0
- package/dist/{chunk-v4t0p6pp.js → chunk-qtp1xer1.js} +2 -2
- package/dist/{chunk-8ch9444t.js → chunk-qwfw4xpn.js} +2 -2
- package/dist/{chunk-b2wczqtd.js → chunk-r19q0w11.js} +2 -2
- package/dist/{chunk-x2yc5748.js → chunk-rbv1scqm.js} +2 -2
- package/dist/{chunk-xf36kt74.js → chunk-rjw63t34.js} +3 -3
- package/dist/{chunk-33620ca6.js → chunk-rr36dnn9.js} +2 -2
- package/dist/{chunk-mwpchd85.js → chunk-sqjgh9e2.js} +3 -3
- package/dist/{chunk-b614gnnv.js → chunk-swpy2b9a.js} +2 -2
- package/dist/{chunk-s55n9cby.js → chunk-t2q8cxnh.js} +2 -2
- package/dist/{chunk-c38t8809.js → chunk-t6vcdf4j.js} +2 -2
- package/dist/{chunk-7p1r1ha9.js → chunk-t7drk9ja.js} +2 -2
- package/dist/chunk-tgskd2p2.js +2 -0
- package/dist/chunk-tpbqg729.js +2 -0
- package/dist/{chunk-t97yjy4f.js → chunk-ttqy9d4r.js} +2 -2
- package/dist/{chunk-w6rwngm3.js → chunk-tv0fwt2g.js} +2 -2
- package/dist/{chunk-y7xcync7.js → chunk-v5mzxjzc.js} +2 -2
- package/dist/{chunk-w0hpztj7.js → chunk-vfhxerxt.js} +2 -2
- package/dist/chunk-vnsgjnp3.js +2 -0
- package/dist/{chunk-59957gfy.js → chunk-vt6cyes7.js} +2 -2
- package/dist/chunk-wb8sf2ww.js +2 -0
- package/dist/{chunk-g73f62qm.js → chunk-wgrmjfyp.js} +2 -2
- package/dist/chunk-wm0jty6e.js +2 -0
- package/dist/{chunk-h5m2fpp4.js → chunk-wvry7t79.js} +2 -2
- package/dist/chunk-x2jd9bpn.js +3 -0
- package/dist/{chunk-x6nz6eyb.js → chunk-x3y5htkt.js} +2 -2
- package/dist/{chunk-cbwya2ss.js → chunk-yakar0e2.js} +2 -2
- package/dist/{chunk-3yvd77ph.js → chunk-yg3xhn5m.js} +2 -2
- package/dist/{chunk-dyqvhn6y.js → chunk-ypk1gwzc.js} +5 -5
- package/dist/{chunk-et8rcxw6.js → chunk-z3nybrbb.js} +2 -2
- package/dist/{chunk-rcbb4ke2.js → chunk-z7sswh39.js} +2 -2
- package/dist/chunk-zxp0mb14.js +2 -0
- 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.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/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-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/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/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.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/locales.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/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/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.d.ts +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-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/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.d.ts +3 -3
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.d.ts +3 -3
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +3 -3
- package/rust/Cargo.lock +484 -10
- package/rust/Cargo.toml +16 -1
- package/rust/src/__tests__/native_network.rs +406 -0
- package/rust/src/lib.rs +3 -0
- package/rust/src/native_network.rs +302 -0
- package/rust/src/native_network_diagnostics.rs +220 -0
- package/rust/src/providers/tests.rs +4 -1
- package/rust/src/system_proxy.rs +257 -0
- package/dist/chunk-14exd146.js +0 -2
- package/dist/chunk-2ce8gd89.js +0 -2
- package/dist/chunk-3n47hknp.js +0 -2
- package/dist/chunk-52p7kyam.js +0 -2
- package/dist/chunk-59exzf5n.js +0 -2
- package/dist/chunk-5nc3dtyt.js +0 -2
- package/dist/chunk-78s6h7r4.js +0 -2
- package/dist/chunk-80ckz04b.js +0 -2
- package/dist/chunk-85ffkcch.js +0 -2
- package/dist/chunk-8qw8erv6.js +0 -2
- package/dist/chunk-908ndb9r.js +0 -2
- package/dist/chunk-9g67z1b4.js +0 -2
- package/dist/chunk-9n79tr1q.js +0 -2
- package/dist/chunk-ajpxjj5m.js +0 -2
- package/dist/chunk-b3jg6nzv.js +0 -3
- package/dist/chunk-c1b8z8pa.js +0 -2
- package/dist/chunk-c9nbavk0.js +0 -2
- package/dist/chunk-cg8ekwka.js +0 -2
- package/dist/chunk-ec9rgnt3.js +0 -2
- package/dist/chunk-efrn25h9.js +0 -2
- package/dist/chunk-emcefs0g.js +0 -2
- package/dist/chunk-f3924gdb.js +0 -2
- package/dist/chunk-f8zy35gz.js +0 -2
- package/dist/chunk-f98at4r5.js +0 -2
- package/dist/chunk-g242n3dt.js +0 -2
- package/dist/chunk-h1bhhqtq.js +0 -2
- package/dist/chunk-kc5k5e59.js +0 -3
- package/dist/chunk-kvc6ewkt.js +0 -4
- package/dist/chunk-kxmajv0m.js +0 -3
- package/dist/chunk-myrdfa3s.js +0 -2
- package/dist/chunk-nacjea1s.js +0 -2
- package/dist/chunk-py837qjk.js +0 -1
- package/dist/chunk-q7nn5xe5.js +0 -2
- package/dist/chunk-qjhkzdhm.js +0 -2
- package/dist/chunk-qxcnyvps.js +0 -2
- package/dist/chunk-r3qrftds.js +0 -2
- package/dist/chunk-r8rre2zb.js +0 -2
- package/dist/chunk-rbqn4725.js +0 -2
- package/dist/chunk-rekc1q3m.js +0 -2
- package/dist/chunk-rwkkqdcv.js +0 -2
- package/dist/chunk-rwnz06kr.js +0 -2
- package/dist/chunk-sxh0pd3y.js +0 -2
- package/dist/chunk-t0cr21e3.js +0 -2
- package/dist/chunk-vkrgdqnm.js +0 -2
- package/dist/chunk-wvdncbrt.js +0 -2
- package/dist/chunk-ye9tsdhn.js +0 -2
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
//! One per-URL Windows proxy decision for HTTP and WebSocket upgrades.
|
|
2
|
+
use super::diagnostics::Trace;
|
|
3
|
+
use reqwest::Url;
|
|
4
|
+
const ERROR: &str = "NATIVE_PROXY_RESOLUTION_FAILED";
|
|
5
|
+
#[cfg(not(windows))]
|
|
6
|
+
pub(super) fn resolve(_: &Url, _: &Trace) -> Result<Option<String>, &'static str> {
|
|
7
|
+
Err(ERROR)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#[cfg(any(windows, test))]
|
|
11
|
+
fn wildcard(pattern: &str, text: &str) -> bool {
|
|
12
|
+
let (p, t) = (pattern.as_bytes(), text.as_bytes());
|
|
13
|
+
let (mut i, mut j, mut star, mut retry) = (0, 0, None, 0);
|
|
14
|
+
while j < t.len() {
|
|
15
|
+
if i < p.len() && (p[i] == b'?' || p[i] == t[j]) {
|
|
16
|
+
i += 1;
|
|
17
|
+
j += 1;
|
|
18
|
+
} else if i < p.len() && p[i] == b'*' {
|
|
19
|
+
star = Some(i);
|
|
20
|
+
i += 1;
|
|
21
|
+
retry = j;
|
|
22
|
+
} else if let Some(s) = star {
|
|
23
|
+
retry += 1;
|
|
24
|
+
j = retry;
|
|
25
|
+
i = s + 1;
|
|
26
|
+
} else {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
while i < p.len() && p[i] == b'*' {
|
|
31
|
+
i += 1;
|
|
32
|
+
}
|
|
33
|
+
i == p.len()
|
|
34
|
+
}
|
|
35
|
+
#[cfg(any(windows, test))]
|
|
36
|
+
fn bypass(list: &str, url: &Url) -> bool {
|
|
37
|
+
let host = url.host_str().unwrap_or("").to_ascii_lowercase();
|
|
38
|
+
let authority = format!("{}:{}", host, url.port_or_known_default().unwrap_or(0));
|
|
39
|
+
list.split(|c: char| c == ';' || c == ',' || c.is_whitespace()).filter(|s| !s.is_empty()).any(|entry| {
|
|
40
|
+
let entry = entry.to_ascii_lowercase();
|
|
41
|
+
if entry == "<local>" {
|
|
42
|
+
return !host.contains('.') && !host.contains(':');
|
|
43
|
+
}
|
|
44
|
+
let entry = entry.strip_prefix("http://").or_else(|| entry.strip_prefix("https://")).unwrap_or(&entry);
|
|
45
|
+
wildcard(entry, &host) || wildcard(entry, &authority)
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
#[cfg(any(windows, test))]
|
|
49
|
+
fn proxy(list: &str, url: &Url) -> Result<Option<String>, &'static str> {
|
|
50
|
+
let entries: Vec<_> = list.split(|c: char| c == ';' || c.is_whitespace()).filter(|x| !x.is_empty()).collect();
|
|
51
|
+
if entries.is_empty() {
|
|
52
|
+
return Err(ERROR);
|
|
53
|
+
}
|
|
54
|
+
let selected = entries
|
|
55
|
+
.iter()
|
|
56
|
+
.find_map(|entry| {
|
|
57
|
+
entry
|
|
58
|
+
.split_once('=')
|
|
59
|
+
.filter(|(scheme, _)| scheme.eq_ignore_ascii_case(url.scheme()))
|
|
60
|
+
.map(|(_, value)| value)
|
|
61
|
+
})
|
|
62
|
+
.or_else(|| entries.iter().find(|entry| !entry.contains('=')).copied());
|
|
63
|
+
// A per-scheme Windows mapping can intentionally leave another scheme direct.
|
|
64
|
+
let Some(selected) = selected else {
|
|
65
|
+
return if entries.iter().any(|entry| {
|
|
66
|
+
entry
|
|
67
|
+
.split_once('=')
|
|
68
|
+
.is_some_and(|(scheme, _)| scheme.eq_ignore_ascii_case("http") || scheme.eq_ignore_ascii_case("https"))
|
|
69
|
+
}) {
|
|
70
|
+
Ok(None)
|
|
71
|
+
} else {
|
|
72
|
+
Err(ERROR)
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
if selected.eq_ignore_ascii_case("DIRECT") {
|
|
76
|
+
return Ok(None);
|
|
77
|
+
}
|
|
78
|
+
let value = if selected.contains("://") { selected.to_owned() } else { format!("http://{selected}") };
|
|
79
|
+
let parsed = Url::parse(&value).map_err(|_| ERROR)?;
|
|
80
|
+
if !matches!(parsed.scheme(), "http" | "https" | "socks5" | "socks5h")
|
|
81
|
+
|| parsed.host_str().is_none()
|
|
82
|
+
|| !parsed.username().is_empty()
|
|
83
|
+
|| parsed.password().is_some()
|
|
84
|
+
{
|
|
85
|
+
return Err(ERROR);
|
|
86
|
+
}
|
|
87
|
+
Ok(Some(value))
|
|
88
|
+
}
|
|
89
|
+
#[cfg(windows)]
|
|
90
|
+
mod windows {
|
|
91
|
+
use super::*;
|
|
92
|
+
use std::{ffi::c_void, ptr};
|
|
93
|
+
use windows_sys::Win32::{
|
|
94
|
+
Foundation::{ERROR_FILE_NOT_FOUND, GetLastError, GlobalFree},
|
|
95
|
+
Networking::WinHttp::*,
|
|
96
|
+
};
|
|
97
|
+
struct Session(*mut c_void);
|
|
98
|
+
impl Drop for Session {
|
|
99
|
+
fn drop(&mut self) {
|
|
100
|
+
unsafe {
|
|
101
|
+
WinHttpCloseHandle(self.0);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// WinHTTP returns GlobalAlloc-owned UTF-16 strings; release them on every path.
|
|
106
|
+
struct Wide(*mut u16);
|
|
107
|
+
impl Wide {
|
|
108
|
+
fn text(&self) -> String {
|
|
109
|
+
if self.0.is_null() {
|
|
110
|
+
return String::new();
|
|
111
|
+
}
|
|
112
|
+
unsafe {
|
|
113
|
+
let mut n = 0;
|
|
114
|
+
while *self.0.add(n) != 0 {
|
|
115
|
+
n += 1;
|
|
116
|
+
}
|
|
117
|
+
String::from_utf16_lossy(std::slice::from_raw_parts(self.0, n))
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
impl Drop for Wide {
|
|
122
|
+
fn drop(&mut self) {
|
|
123
|
+
if !self.0.is_null() {
|
|
124
|
+
unsafe {
|
|
125
|
+
GlobalFree(self.0.cast());
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
fn wide(s: &str) -> Vec<u16> {
|
|
131
|
+
s.encode_utf16().chain(Some(0)).collect()
|
|
132
|
+
}
|
|
133
|
+
fn decision(raw: WINHTTP_PROXY_INFO, url: &Url) -> Result<Option<String>, &'static str> {
|
|
134
|
+
let server = Wide(raw.lpszProxy);
|
|
135
|
+
let exceptions = Wide(raw.lpszProxyBypass);
|
|
136
|
+
if raw.dwAccessType == WINHTTP_ACCESS_TYPE_NO_PROXY || bypass(&exceptions.text(), url) {
|
|
137
|
+
return Ok(None);
|
|
138
|
+
}
|
|
139
|
+
if raw.dwAccessType != WINHTTP_ACCESS_TYPE_NAMED_PROXY {
|
|
140
|
+
return Err(ERROR);
|
|
141
|
+
}
|
|
142
|
+
proxy(&server.text(), url)
|
|
143
|
+
}
|
|
144
|
+
pub(super) fn automatic(url: &Url, pac: Option<&str>) -> Result<Option<String>, u32> {
|
|
145
|
+
let agent = wide("ALwith native network");
|
|
146
|
+
let raw = unsafe { WinHttpOpen(agent.as_ptr(), WINHTTP_ACCESS_TYPE_NO_PROXY, ptr::null(), ptr::null(), 0) };
|
|
147
|
+
if raw.is_null() {
|
|
148
|
+
return Err(unsafe { GetLastError() });
|
|
149
|
+
}
|
|
150
|
+
let session = Session(raw);
|
|
151
|
+
unsafe {
|
|
152
|
+
WinHttpSetTimeouts(session.0, 5000, 5000, 5000, 5000);
|
|
153
|
+
}
|
|
154
|
+
let pac = pac.map(wide);
|
|
155
|
+
let mut options = WINHTTP_AUTOPROXY_OPTIONS {
|
|
156
|
+
dwFlags: if pac.is_some() { WINHTTP_AUTOPROXY_CONFIG_URL } else { WINHTTP_AUTOPROXY_AUTO_DETECT },
|
|
157
|
+
dwAutoDetectFlags: if pac.is_some() {
|
|
158
|
+
0
|
|
159
|
+
} else {
|
|
160
|
+
WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A
|
|
161
|
+
},
|
|
162
|
+
lpszAutoConfigUrl: pac.as_ref().map_or(ptr::null(), |p| p.as_ptr()),
|
|
163
|
+
lpvReserved: ptr::null_mut(),
|
|
164
|
+
dwReserved: 0,
|
|
165
|
+
fAutoLogonIfChallenged: 0,
|
|
166
|
+
};
|
|
167
|
+
let target = wide(url.as_str());
|
|
168
|
+
let mut info = WINHTTP_PROXY_INFO::default();
|
|
169
|
+
if unsafe { WinHttpGetProxyForUrl(session.0, target.as_ptr(), &mut options, &mut info) } == 0 {
|
|
170
|
+
return Err(unsafe { GetLastError() });
|
|
171
|
+
}
|
|
172
|
+
decision(info, url).map_err(|_| ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT)
|
|
173
|
+
}
|
|
174
|
+
pub(super) fn resolve(url: &Url, trace: &Trace) -> Result<Option<String>, &'static str> {
|
|
175
|
+
trace.proxy_source("windows-user");
|
|
176
|
+
let mut config = WINHTTP_CURRENT_USER_IE_PROXY_CONFIG::default();
|
|
177
|
+
if unsafe { WinHttpGetIEProxyConfigForCurrentUser(&mut config) } == 0 {
|
|
178
|
+
let code = unsafe { GetLastError() };
|
|
179
|
+
trace.proxy_error(code);
|
|
180
|
+
if code != ERROR_FILE_NOT_FOUND {
|
|
181
|
+
return Err(ERROR);
|
|
182
|
+
}
|
|
183
|
+
trace.proxy_source("windows-machine");
|
|
184
|
+
let mut machine = WINHTTP_PROXY_INFO::default();
|
|
185
|
+
if unsafe { WinHttpGetDefaultProxyConfiguration(&mut machine) } == 0 {
|
|
186
|
+
trace.proxy_error(unsafe { GetLastError() });
|
|
187
|
+
return Err(ERROR);
|
|
188
|
+
}
|
|
189
|
+
return decision(machine, url);
|
|
190
|
+
}
|
|
191
|
+
let pac = Wide(config.lpszAutoConfigUrl);
|
|
192
|
+
let server = Wide(config.lpszProxy);
|
|
193
|
+
let exceptions = Wide(config.lpszProxyBypass);
|
|
194
|
+
let pac = pac.text();
|
|
195
|
+
// Explicit PAC is authoritative. Failure must never silently bypass it.
|
|
196
|
+
if !pac.is_empty() {
|
|
197
|
+
trace.proxy_source("windows-pac");
|
|
198
|
+
return automatic(url, Some(&pac)).map_err(|code| {
|
|
199
|
+
trace.proxy_error(code);
|
|
200
|
+
ERROR
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if config.fAutoDetect != 0 {
|
|
204
|
+
trace.proxy_source("windows-auto");
|
|
205
|
+
match automatic(url, None) {
|
|
206
|
+
Ok(route) => return Ok(route),
|
|
207
|
+
Err(ERROR_WINHTTP_AUTODETECTION_FAILED) => {}
|
|
208
|
+
Err(code) => {
|
|
209
|
+
trace.proxy_error(code);
|
|
210
|
+
return Err(ERROR);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
trace.proxy_source("windows-manual");
|
|
215
|
+
if bypass(&exceptions.text(), url) {
|
|
216
|
+
return Ok(None);
|
|
217
|
+
}
|
|
218
|
+
let server = server.text();
|
|
219
|
+
if server.is_empty() {
|
|
220
|
+
trace.proxy_source("windows-direct");
|
|
221
|
+
Ok(None)
|
|
222
|
+
} else {
|
|
223
|
+
proxy(&server, url)
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
#[cfg(windows)]
|
|
228
|
+
pub(super) fn resolve(url: &Url, trace: &Trace) -> Result<Option<String>, &'static str> {
|
|
229
|
+
windows::resolve(url, trace)
|
|
230
|
+
}
|
|
231
|
+
#[cfg(test)]
|
|
232
|
+
mod tests {
|
|
233
|
+
use super::*;
|
|
234
|
+
#[test]
|
|
235
|
+
fn scheme_mapping_and_bypass() {
|
|
236
|
+
let https = Url::parse("https://example.org/v1").unwrap();
|
|
237
|
+
let http = Url::parse("http://example.org/v1").unwrap();
|
|
238
|
+
assert_eq!(
|
|
239
|
+
proxy("http=127.0.0.1:8080;https=127.0.0.1:9090", &https).unwrap(),
|
|
240
|
+
Some("http://127.0.0.1:9090".into())
|
|
241
|
+
);
|
|
242
|
+
assert_eq!(proxy("http=127.0.0.1:8080", &https).unwrap(), None);
|
|
243
|
+
assert_eq!(proxy("http=127.0.0.1:8080", &http).unwrap(), Some("http://127.0.0.1:8080".into()));
|
|
244
|
+
assert!(bypass("*.org;localhost", &https));
|
|
245
|
+
assert!(bypass("example.org:443", &https));
|
|
246
|
+
assert!(!bypass("example.org:80", &https));
|
|
247
|
+
assert!(bypass("<local>", &Url::parse("https://intranet/").unwrap()));
|
|
248
|
+
assert!(!bypass("<local>", &https));
|
|
249
|
+
assert_eq!(proxy("DIRECT", &https).unwrap(), None);
|
|
250
|
+
assert!(proxy("ftp://bad:80", &https).is_err());
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
#[cfg(all(test, windows))]
|
|
255
|
+
pub(super) fn resolve_pac(url: &Url, pac: &str) -> Result<Option<String>, &'static str> {
|
|
256
|
+
windows::automatic(url, Some(pac)).map_err(|_| ERROR)
|
|
257
|
+
}
|
package/dist/chunk-14exd146.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Kr(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function zo(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(Kr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Vo(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function qr(t){return[...t].filter((e)=>!s(e)).join("")}function or(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function _t(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=qr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-or(e,o)),r=Math.max(0,i-or(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{Kr,zo,Vo,qr,or,_t};
|
package/dist/chunk-2ce8gd89.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{be}from"./chunk-3yvd77ph.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 Mi({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:be(t)}):null}function Ai({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Mi,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function qt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Ai,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{Mi,Ai,qt};
|
package/dist/chunk-3n47hknp.js
DELETED
package/dist/chunk-52p7kyam.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Fi}from"./chunk-80ckz04b.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Xi({host:o,children:t}){return s(n,{value:o,children:t})}function x(){let o=i(n),e={...Fi(),...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 zn(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function Y(){let o=x();return(t)=>zn(o,t)}function Vn(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{Xi,x,zn,Y,Vn};
|
package/dist/chunk-59exzf5n.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,o,u}from"./chunk-80ckz04b.js";import{M}from"./chunk-1ppfn0e1.js";import{k,W,xe}from"./chunk-5nc3dtyt.js";import{De,Z,ie}from"./chunk-rbqn4725.js";import{Oi}from"./chunk-f8zy35gz.js";import{he}from"./chunk-qwfwxfhn.js";import{ve}from"./chunk-n0khj68q.js";import{be}from"./chunk-3yvd77ph.js";import{Wt}from"./chunk-ec9rgnt3.js";import{Ei}from"./chunk-2f1qx13s.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as T}from"react/jsx-runtime";function K(i,d){return i.find((m)=>m.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Ar({selectedId:i,onSelect:d,isForeground:m,onOpen:w,accessory:R,rowActions:h}){let N=s(),{t:L}=N,p=o((t)=>t.runStates),v=o((t)=>t.drafts),l=o((t)=>t.sessionList),g=Z((t)=>t.activityOrder),f=C(()=>g.flatMap((t)=>{let e=p[t];return e&&De({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:K(l,e)}]:[]}),[g,p,v,l]),b=C(()=>{let t=new Map;for(let e of f){let r=e.sid===i||m?.(e.sid)?"foreground":"background",S=t.get(r)??[];S.push(e),t.set(r,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,m]),y=Z((t)=>t.activityCollapsedGroups),n=ie(),x=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(w?.(t))return;d(t)},D=Ei();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Oi(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let S=x[r-1];if(!S)return;e.preventDefault(),I(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(H,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&D?c(G,{children:be(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(k,{children:b.map((t)=>t.key==="foreground"?c(k,{children:t.rows.map(A)},t.key):c(W,{open:!y.has(t.key),onOpenChange:(e)=>{let r=new Set(y);if(e)r.delete(t.key);else r.add(t.key);n({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function H({sessionRow:i,state:d,interruption:m,active:w,tasks:R,listeningPorts:h,accessory:N,actions:L,onOpen:p,hint:v}){let l=s(),g=a(),{t:f}=l,b=i.title??f("sessionList.untitled"),y=Wt(i.sessionId,d);return P(T,{children:[c(xe,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(ve,{sessionRow:i,actions:L}),onClick:p,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),p()},state:d,interruption:m,title:b,preview:y,listeningPorts:h,onOpenPort:l.openLink&&((n)=>l.openLink?.(`http://localhost:${n}`)),accessory:N,hint:v,actions:c(he,{title:f("sessionList.stop"),onStop:()=>u(l,g.stopSession(i.sessionId))})}),R.map((n)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(M,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
-
export{Ar};
|
package/dist/chunk-5nc3dtyt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{we,d}from"./chunk-xyvqcpjx.js";import{T}from"./chunk-8jxcdap5.js";import{M}from"./chunk-1ppfn0e1.js";import{S}from"./chunk-8w22ck92.js";import{it,Fe,rt}from"./chunk-7p1r1ha9.js";import{PreviewCard as w}from"@base-ui/react/preview-card";import{cn as u}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as L,useContext as _,useLayoutEffect as D,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as p,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:u("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:u("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function P({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:u("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function g({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:u("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 W({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:h,headerChildren:v,wrapHeader:c,onHeaderClick:C,children:b}){let y=()=>{C?.(),t(!o)},m=u(it,"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=p(K,{children:[r!=null&&e(P,{children:r}),v??e(T,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(rt,{content:s!==void 0?e(Fe,{className:u("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:h})})]}),H=v==null?p("div",{"data-active":l?"":void 0,title:n,className:u(m,d),onClick:y,onKeyDown:(f)=>{if(f.target!==f.currentTarget)return;if(f.key!=="Enter"&&f.key!==" ")return;f.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:m,children:R});return p("div",{className:"text-[#1a1c1f] dark:text-white",children:[c===void 0?H:c(H),o&&e(k,{className:"mt-0.5",children:b})]})}var E=L(()=>{}),G=L(()=>{});function Zt(){return _(G)}function ye(){return _(E)}function xe({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:h,preview:v,listeningPorts:c,onOpenPort:C,accessory:b,meta:y,hint:m,actions:R,className:H,...f}){let O=p("div",{"data-slot":"navigation-session-item","data-active":o,className:u(it,we,"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]",(v||c!=null&&c.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...f,children:[e(P,{children:t!=null?e(M,{state:t,title:n??void 0}):i}),p("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(T,{className:u("leading-none",t==="done"&&"font-semibold"),children:s}),h!=null&&e(T,{className:"text-muted-foreground text-xs",children:h}),v&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:v}),c!=null&&c.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:c.map((x)=>C?p("button",{type:"button",className:"underline",onPointerDown:(N)=>N.stopPropagation(),onKeyDown:(N)=>N.stopPropagation(),onClick:(N)=>{N.stopPropagation(),C(x)},children:[":",x]},x):p("span",{children:[":",x]},x))})]}),p("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(rt,{content:b!=null?e(Fe,{children:b}):y??e(Fe,{}),actions:R}),m!=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:m})]})]});if(a==null)return O;return e(q,{row:O,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(E.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return S(o),p(w.Root,{open:o,onOpenChange:t,children:[e(w.Trigger,{render:n,delay:700,closeDelay:100}),e(w.Portal,{children:e(w.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(w.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,P,g,W,Zt,ye,xe};
|
package/dist/chunk-78s6h7r4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var r=new Map,i=new Map,f=new Map;function Hn(t,e){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,e),()=>{if(i.get(t)===e)i.delete(t)}}function E(t,e){let o=r.get(t);if(!o)return;let n=e(o.attachments);r.set(t,{...o,attachments:n}),i.get(t)?.(n)}function vt(t,e){f.set(t,e),e.finally(()=>{if(f.get(t)===e)f.delete(t)})}async function ji(t){for(;;){let n=r.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!n.length)break;await Promise.all(n)}let e=r.get(t);if(!e)return null;let o=await Promise.all(e.attachments.map(async(n)=>{if(!n.url.startsWith("blob:"))return n;let c=await fetch(n.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let a=new FileReader;a.onload=()=>g(a.result),a.onerror=()=>p(a.error),a.readAsDataURL(m)});return{...n,url:l}}));return{text:e.text,mentions:[...e.mentions],attachments:o,modelId:e.modelId}}function $i(t,e){if(e===null)r.delete(t);else r.set(t,e)}var s=new Map;function yt(t,e){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,e),()=>{if(s.get(t)===e)s.delete(t)}}function Ki(t,e){if(typeof e!=="string"||!e.trim())throw Error("The draft is empty");let o=s.get(t);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(t);if(n&&(n.text.length||n.attachments.length||n.mentions.length))throw Error("The composer already has a draft; send or clear it first");o(e),r.set(t,{text:e,attachments:[],mentions:[],modelId:n?.modelId??null})}
|
|
2
|
-
export{r,Hn,E,vt,ji,$i,yt,Ki};
|
package/dist/chunk-80ckz04b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-8w22ck92.js";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as D,DialogContent as L,DialogDescription as y,DialogFooter as h,DialogHeader as w,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{createContext as m,useContext as p,useState as H,useSyncExternalStore as R}from"react";import{jsx as i,jsxs as c}from"react/jsx-runtime";var g=m(null),v=m(null),f=m(null);function Rr({host:e,client:t,children:n}){let[r,l]=H(null);S(r!==null);let{t:d}=e;return i(g,{value:e,children:i(v,{value:t,children:c(f,{value:l,children:[n,i(D,{open:r!==null,onOpenChange:(x)=>!x&&l(null),children:c(L,{children:[c(w,{children:[i(P,{children:d("sessionList.deleteTitle")}),i(y,{children:d("sessionList.deleteDescription")})]}),c(h,{children:[i(C,{variant:"outline",onClick:()=>l(null),children:d("sessionList.cancel")}),i(C,{onClick:()=>{if(r)u(e,t.delete(r.sessionId));l(null)},children:d("sessionList.delete")})]})]})})]})})})}function s(){let e=p(g);if(e===null)throw Error("Session list host is missing");return e}function Fi(){return p(g)}function a(){let e=p(v);if(e===null)throw Error("Session list client is missing");return e}function Yt(){let e=p(f);if(e===null)throw Error("Session list provider is missing");return e}function o(e){let t=a();return R((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function u(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Rr,s,Fi,a,Yt,o,u};
|
package/dist/chunk-85ffkcch.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*dn(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 bo(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 dn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{dn,bo};
|
package/dist/chunk-8qw8erv6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,i}from"./chunk-t0cr21e3.js";import{v}from"./chunk-r9dt4bs3.js";import{N}from"./chunk-h5m2fpp4.js";import{le}from"./chunk-mcjwwxa1.js";import{F,ce,de}from"./chunk-w6rwngm3.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as w}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as P}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as O}from"react/jsx-runtime";function It({entry:r,onBack:p}){let u=l(),{t}=u,C=i((a)=>a.readPlugin),B=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),x=i((a)=>a.busyIds[r.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[o,U]=w(null),[S,I]=w(null),[j,R]=w(0),[c,z]=w(null);_(()=>{let a=!0;return I(null),U(null),C(r).then((g)=>{if(a)U(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,C,j]);let d=o?.summary??r.plugin,m=B?.plugin??d,s=d.interface,k=s?.displayName??d.name,y=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",E=s?.longDescription??o?.description??s?.shortDescription,A=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(de,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:k})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(N,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:k})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:B?n(O,{children:[e(X,{checked:m.enabled,disabled:!!x||y,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:k}),onCheckedChange:(a)=>void V(m,a)}),e(f,{variant:"outline",size:"sm",disabled:!!x,onClick:()=>void H(m),children:x?e(P,{}):t("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(y?"plugins.detail.unavailable":"plugins.detail.install"),title:t(y?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!x||y,onClick:()=>void T({...r,plugin:d}).catch(()=>{}),children:x?e(P,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(v,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${F} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(h,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(h,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(h,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(h,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(h,{label:t("plugins.detail.website"),children:e(D,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!S&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(P,{}),t("plugins.detail.loading")]}),S&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",S]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:t("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:k,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(b,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(b,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(N,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(b,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(N,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(b,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(D,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(b,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(D,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(D,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(G,{className:ce,children:c&&n(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(N,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(le,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function h({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function b({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function D({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
|
-
export{It};
|
package/dist/chunk-908ndb9r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-ye9tsdhn.js";import{e,m}from"./chunk-f3924gdb.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 r,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(t){let i=t.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop();return i?i:t}function Gi({cwd:t,onChange:i,preparing:b=!1,recentProjects:w}){let{host:l,client:d}=e(),{t:c}=l,v=n((o)=>o.projectContext),h=n((o)=>o.sessionList),y=R(()=>w??[...new Set([...h].toSorted((o,f)=>(f.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[w,h]),[u,N]=S(null);O(()=>{if(!d.refreshProjectContext)return;let o=!0;return m(l,d.refreshProjectContext(!0).then((f)=>{if(o)N(f.chatDirectory)})),()=>{o=!1}},[l,d]);let D=[...t!==null?[t]:[],...y.filter((o)=>o!==t)].filter((o)=>o!==u&&(!v||z(v,{cwd:o}).id!==I)),a=t!==null&&t!==u,P=()=>{if(u===null)throw Error("The default draft directory is not ready");i(null)},p=l.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":c("conversation.draft.workOutsideProject"),title:c("conversation.draft.workOutsideProject"),disabled:u===null,onClick:P,children:[r(g,{className:"size-4 group-hover/project:opacity-0"}),r("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:r(x,{className:"size-3"})})]}),s(_,{render:r(C,{variant:"ghost",size:"sm",className:j("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&r(g,{className:"size-4"}),r("span",{className:"truncate",children:a?M(t):c("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[D.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:t??"",onValueChange:i,children:D.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(g,{}),r("span",{className:"truncate",children:M(o)})]},o))})}),(p||a)&&r(U,{})]}),(p||a)&&s(T,{children:[p&&s(k,{onClick:()=>{m(l,p(t).then((o)=>{if(o!==null)i(o)}))},children:[r(G,{}),c("conversation.draft.newProject")]}),u!==null&&a&&s(k,{onClick:P,children:[r(x,{}),c("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
-
export{Gi};
|
package/dist/chunk-9g67z1b4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-ye9tsdhn.js";import{Be}from"./chunk-v4t0p6pp.js";import{e,m}from"./chunk-f3924gdb.js";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as y}from"@nyssance/shadcn/vega/components/ui/empty";import{Loader2Icon as x}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function at({session:t,timeline:f}){let{host:s,client:a}=e(),{t:i}=s,u=n((h)=>h.historyPages[t.id]?.cursor!=null),E=()=>m(s,a.open(t.id,t.cwd)),p=o(Be,{...f,session:t,client:a,host:s});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(x,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return r(c,{className:"flex-1",children:[r(d,{children:[o(y,{children:i("conversation.reopen")}),o(l,{children:i("conversation.detached")})]}),o(v,{onClick:E,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(c,{className:"flex-1",children:r(d,{children:[o(y,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{at};
|
package/dist/chunk-9n79tr1q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{w}from"./chunk-zxkvvecz.js";import{ee}from"./chunk-jm6zja6h.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function qn({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(w,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ee,{entries:t.entries})}
|
|
2
|
-
export{qn};
|
package/dist/chunk-ajpxjj5m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-80ckz04b.js";import{De,Z,ie}from"./chunk-rbqn4725.js";import{useEffect as u,useMemo as S}from"react";function Tr(s){let a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>(t.state==="done"||t.state==="requires_action")&&De(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=S(()=>new Map(JSON.parse(a)),[a]),c=Z((i)=>i.activitySeen),r=ie();return u(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>c.get(i)!==n)}
|
|
2
|
-
export{Tr};
|
package/dist/chunk-b3jg6nzv.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-xyvqcpjx.js";import{k,g}from"./chunk-5nc3dtyt.js";import{Tt}from"./chunk-67hrx4kg.js";import{Ie,l,Ne,Qe,i}from"./chunk-t0cr21e3.js";import{D,H,ne,O,U,pe,Mt}from"./chunk-py837qjk.js";import{ue}from"./chunk-j86x2rn0.js";import{We}from"./chunk-82xjggwn.js";import{v}from"./chunk-r9dt4bs3.js";import{Nt,N}from"./chunk-h5m2fpp4.js";import{F,de}from"./chunk-w6rwngm3.js";import{It}from"./chunk-8qw8erv6.js";import{Pt}from"./chunk-qxcnyvps.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as se,CircleArrowUpIcon as ie,MoreVerticalIcon as le,PlusIcon as Q,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as me,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as _,useMemo as K,useState as S}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as ke,DialogHeader as ye,DialogTitle as be,DialogTrigger as Pe}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as we,DropdownMenuContent as Ce,DropdownMenuItem as Se,DropdownMenuTrigger as De}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Me}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 Z}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function Ee({plugin:t,marketplace:c}){let{t:u}=l(),p=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((x)=>x.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=u(p?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!p)return e(se,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(b,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:p||a||m,"aria-label":r,title:m?u("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:c}).catch(()=>{}),children:p?e(B,{"aria-hidden":"true"}):e(Q,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function ze({plugin:t,marketplace:c,actions:u,onOpen:p}){let a=X(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(pe,{className:"toolbox-row relative",children:[e(b,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>p({plugin:t,marketplace:c})}),e(O,{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(N,{name:t.name})})}),s(H,{className:"pointer-events-none relative min-w-0",children:[e(Mt,{className:"mb-0.5",children:T(t)}),e(ne,{className:"line-clamp-1",title:a,children:a||c.interface?.displayName||c.name}),r&&e(ne,{"data-toolbox-metadata":"",children:r})]}),e(D,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function J(){return Qe((t)=>t.connection==="ready"&&ee(t.agent))}var E=48;function Oe({marketplace:t,plugins:c,onOpen:u}){let{t:p}=l(),a=i((n)=>n.removeMarketplace),[f,m]=S(0),r=Math.min(f,Math.max(0,Math.ceil(c.length/E)-1));if(c.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:c.length}),t.path!==null&&s(we,{children:[e(De,{render:e(b,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":p("plugins.pageActions")}),children:e(le,{})}),e(Ce,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Se,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(me,{className:"size-3.5"}),p("plugins.marketplace.remove")]})})]})]}),e(U,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:c.slice(r*E,(r+1)*E).map((n)=>e(ze,{onOpen:u,plugin:n,marketplace:t,actions:e(Ee,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),c.length>E&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(b,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:p("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(c.length/E)]}),e(b,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*E>=c.length,onClick:()=>m(r+1),children:p("plugins.nextPage")})]})]},t.name)}var Be=fe(function({query:c,onOpen:u}){let{t:p}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=K(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((x)=>({plugin:x,text:[x.name,T(x),X(x),x.interface?.developerName??"",...x.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=K(()=>{let n=new Set(f);return m.map(({marketplace:x,entries:h})=>({marketplace:x,plugins:h.filter(({plugin:P,text:w})=>c===""?x.path!==null||n.has(P.id):w.includes(c)).map(({plugin:P})=>P)}))},[m,f,c]);return s(Z,{children:[r.map(({marketplace:n,plugins:x})=>e(Oe,{marketplace:n,plugins:x,onOpen:u},JSON.stringify([n.name,n.path,c]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("plugins.empty")})]})});function Te(){let{t}=l(),c=J(),u=i((y)=>y.addMarketplace),p=i((y)=>y.upgradeAll),a=i((y)=>y.upgrading),[f,m]=S(""),[r,n]=S(!1),[x,h]=S(!1),[P,w]=S(null),A=async()=>{let y=f.trim();if(!y||r)return;n(!0),w(null);try{await u({source:y}),m(""),h(!1)}catch(M){w(M instanceof Error?M.message:String(M))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(b,{size:"sm",className:"h-9",variant:"outline",disabled:!c||a,"aria-busy":a,onClick:()=>void p(),children:[a?e(B,{}):e(ie,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:x,onOpenChange:(y)=>{if(!r)h(y)},children:[s(Pe,{render:e(b,{size:"sm",className:"h-9",variant:"outline",disabled:!c}),children:[e(Q,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ye,{children:[e(be,{children:t("plugins.marketplace.addTitle")}),e(ke,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(y)=>{y.preventDefault(),A()},children:[e(Me,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:r,onChange:(y)=>m(y.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),P&&e("p",{role:"alert",className:"text-destructive text-sm",children:P}),s("div",{className:"flex justify-end gap-2",children:[e(b,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(b,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Ae({onOpen:t,query:c}){let u=J(),p=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,f=ve(c.trim().toLowerCase());return e(v,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${F} flex flex-col gap-8`,children:[p.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(ue,{}):e(Be,{query:f,onOpen:t})]})})}function ir({cwd:t,active:c,extensions:u,onOpenCatalog:p}){let{t:a}=l(),f=Ne(),m=Ie(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),x=i((o)=>o.error),[h,P]=S("plugins"),[w,A]=S({plugins:"",skills:""}),y=h==="skills"?w.skills:w.plugins,M=(o)=>A((z)=>({...z,[h]:o})),Y=Qe((o)=>JSON.stringify([...new Set(o.sessionList.map((z)=>We(z.cwd,o.projectContext)).filter((z)=>z!==null))].toSorted())),L=JSON.stringify([...new Set([We(t,f.state.projectContext),...JSON.parse(Y)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),q=a(h==="skills"?"plugins.skills.search":"plugins.search"),[C,V]=S(null),I=J();_(()=>{if(!c||!I)return;if(m.getState().loadedScope!==L)r(JSON.parse(L))},[c,I,r,L,m]),_(()=>{if(!I)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[I,r,f]);let j=(o)=>{p?.(),P("plugins"),V(o)},G=(o)=>{p?.(),P(o),V(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(Nt,{}),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:[u&&s(g,{className:`${d} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(g,{className:`${d} h-8 gap-2 px-2`,active:!u?.active&&h===o&&C===null,onClick:()=>G(o),children:[o==="plugins"?e(oe,{className:"size-4"}):e(ae,{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(v,{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:!I||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(g,{title:T(o.plugin),className:`${d} gap-2 px-2`,active:!u?.active&&C?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(N,{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:u?.active?u.content:s(Z,{children:[C&&e(It,{entry:C,onBack:()=>G("plugins")},JSON.stringify([C.marketplace.name,C.marketplace.path,C.plugin.id,t])),s("div",{hidden:C!==null,className:C?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(de,{children:e(Tt,{title:a(`plugins.headings.${h}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":q,value:y,onChange:(o)=>M(o.target.value),placeholder:q}),y&&e(b,{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:()=>M(""),children:e(ge,{})})]}),e(b,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!I||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(re,{})}),h==="plugins"&&e(Te,{})]})})}),(h==="plugins"||x)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[h==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),x&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",x]}),e(b,{size:"sm",className:"h-9",variant:"outline",disabled:n||!I,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Ae,{query:w.plugins,onOpen:j})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Pt,{query:w.skills,ready:I,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
-
export{ir};
|
package/dist/chunk-c1b8z8pa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,o}from"./chunk-80ckz04b.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function Pr(i){let t=a(),e=o((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=o((s)=>s.sessionList),d=o((s)=>s.connection),r=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&n===null)t.listSessions().catch(()=>{return})},[t,d,r,n]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,u,r,n,c,e]),retry:f}}
|
|
2
|
-
export{Pr};
|
package/dist/chunk-c9nbavk0.js
DELETED
package/dist/chunk-cg8ekwka.js
DELETED
package/dist/chunk-ec9rgnt3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,o}from"./chunk-80ckz04b.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Wt(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
|
|
2
|
-
export{Wt};
|
package/dist/chunk-efrn25h9.js
DELETED
package/dist/chunk-emcefs0g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var mr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function xi(e){return[...e].toSorted((o,n)=>(mr[o.kind]??99)-(mr[n.kind]??99))}function ma(e){return e==="allow_once"||e==="allow_always"}function ga(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{mr,xi,ma,ga};
|
package/dist/chunk-f3924gdb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ge}from"./chunk-ye9tsdhn.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 Kt({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(ge,{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 m(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{Kt,e,m};
|
package/dist/chunk-f8zy35gz.js
DELETED
package/dist/chunk-f98at4r5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,Yt,o,u}from"./chunk-80ckz04b.js";import{A}from"./chunk-nxp1b8ny.js";import{xe}from"./chunk-5nc3dtyt.js";import{he}from"./chunk-qwfwxfhn.js";import{ot,ve}from"./chunk-n0khj68q.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as H,PencilIcon as N,Trash2Icon as R}from"lucide-react";import{useRef as B,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function Nn({sessionRow:e,active:v,onSelect:f,onForked:S=f,onHoverCardOpenChange:c,actions:l}){let r=s(),{t:p,i18n:k}=r,h=a(),d=o((t)=>t.runStates[e.sessionId]),I=Yt(),m=()=>f(e);return n(xe,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:m,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),m()},state:d?.state,interruption:d?.interruption??null,title:e.title??p("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(E,{sessionRow:e,onDelete:()=>I(e),onForked:S,actions:l}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:ot(e.updatedAt,k.language)}):void 0,actions:d!=null?n(he,{title:p("sessionList.stop"),onStop:()=>u(r,h.stopSession(e.sessionId))}):void 0})}function E({sessionRow:e,onDelete:v,onForked:f,actions:S}){let c=s(),{t:l}=c,r=a(),p=o((i)=>F(i.agent)),k=o((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,d]=y(!1),[I,m]=y(!1),t=B(!1);return n(ve,{sessionRow:e,renaming:h,onRename:(i)=>{if(d(!1),i!==null)u(c,r.renameSession(e.sessionId,i))},actions:b(C,{children:[p&&n(A,{icon:n(N,{}),label:l("sessionList.rename"),onClick:()=>d(!0)}),S,e.archived?n(A,{icon:n(x,{}),label:l("sessionList.unarchive"),onClick:()=>void u(c,r.unarchive(e.sessionId))}):b(C,{children:[n(A,{icon:n(H,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,m(!0),u(c,r.fork(e.sessionId,e.cwd).then((i)=>{let g=r.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");f(g)}).finally(()=>{t.current=!1,m(!1)}))}}),n(A,{icon:n(D,{}),label:l("sessionList.archive"),onClick:()=>void u(c,r.archive(e.sessionId))})]}),n(A,{variant:"destructive",icon:n(R,{}),label:l("sessionList.delete"),onClick:v})]})})}
|
|
2
|
-
export{Nn};
|
package/dist/chunk-g242n3dt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,E,vt}from"./chunk-78s6h7r4.js";var Dn=5000;function ke(t){return"pastedText"in t}function Fr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function He(t,e,o){let n=(a,s)=>{for(let[i,x]of r){if(!x.attachments.some((p)=>p.id===e.id))continue;E(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Fr(s),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),vt(e.id,o("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function ht(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Dn)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:a,status:"pending"}};E(e,(i)=>[...i,s]),He(e,s,n)}
|
|
2
|
-
export{Dn,ke,Fr,He,ht};
|
package/dist/chunk-h1bhhqtq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-ye9tsdhn.js";import{e}from"./chunk-f3924gdb.js";import{codexExtensionCapabilities as T,codexTurnId as w,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function ft(r,g,c,y){let{client:S}=e(),R=n((t)=>T(t.agent).composerPredictions),k=r.items.findLast((t)=>t.kind==="user"),i=w(k?._meta),O=r.configOptions.flatMap((t)=>F(t)||B(t)?[[t.configId,t.currentValue]]:[]).sort(([t],[u])=>String(t).localeCompare(String(u))),o=JSON.stringify([r.id,i,O]),s=j(r._meta),d=r._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&r.state==="idle"&&r.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===o||l.current?.key===o||i===null)return;let t={key:o,previousResult:m};l.current=t,x(null),S.requestPrediction(r.id,i).catch((u)=>{if(f.current&&l.current===t)x({key:o,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,o,m,r.id,i]);let I=p&&!c&&a!==o&&l.current?.key===o&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&r.state==="idle"&&!c&&a!==o?v?.key===o?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(o)}}}
|
|
2
|
-
export{ft};
|
package/dist/chunk-kc5k5e59.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Ci,Je}from"./chunk-xf36kt74.js";import{t,Le}from"./chunk-ye9tsdhn.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 ct(e){c.setState({request:{path:e.path,patch:En(e.patch,e.path)}})}function En(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 dt(){let{t:e,theme:a}=t(),n=Le(c,(o)=>o.request),s=n===null?null:Ci(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(Je,{patch:n.patch,theme:a})})]})})}
|
|
3
|
-
export{ct,En,dt};
|
package/dist/chunk-kvc6ewkt.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Mo}from"./chunk-59957gfy.js";import{t}from"./chunk-ye9tsdhn.js";import{eo,to}from"./chunk-k5rkpqbh.js";import{j}from"./chunk-x6nz6eyb.js";import{J}from"./chunk-q7nn5xe5.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 Jn=p(function({item:s,messageTime:c}){let l=t(),o=to(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):J(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=eo(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(j,{block:e},`${s.id}:${n}`))}),r(Mo,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
-
export{Jn};
|
package/dist/chunk-kxmajv0m.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{gn,fn}from"./chunk-x334e7wb.js";import{b}from"./chunk-z71pp1mb.js";import{an}from"./chunk-6dn3j8a2.js";import{t}from"./chunk-ye9tsdhn.js";import{ao,J,ze,lo}from"./chunk-q7nn5xe5.js";import{rn}from"./chunk-dv65h7z5.js";import{ae}from"./chunk-sy5tq3y6.js";import{tn}from"./chunk-vkrgdqnm.js";import{oo}from"./chunk-dyqvhn6y.js";import{qn}from"./chunk-9n79tr1q.js";import{Wn}from"./chunk-aza82m2p.js";import{nn,on}from"./chunk-63kxepkh.js";import{Ge}from"./chunk-z2v008kc.js";import{codexMessageError as z,codexTurnError as U,isContentEntry as oe,isEmbeddedResource as X,isImage as Y,isResourceLink as me,isText as le,nativeTurnId as de}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as ce,SparklesIcon as ge}from"lucide-react";import{Fragment as ue,memo as pe,useEffect as fe,useState as ye}from"react";import{jsx as s,jsxs as m,Fragment as N}from"react/jsx-runtime";function q(i){if(Y(i))return`${i.mimeType.toLowerCase()}:${i.data}`;if(X(i)&&"blob"in i.resource&&i.resource.mimeType?.toLowerCase().startsWith("image/"))return`${i.resource.mimeType.toLowerCase()}:${i.resource.blob}`;return null}function he({item:i}){let{t:n}=t(),l=i.status==="in_progress",[o,c]=ye(()=>Date.now()-i.at>=1e4);return fe(()=>{if(!l)return;let a=Math.max(0,i.at+1e4-Date.now());if(c(a===0),a===0)return;let f=setTimeout(()=>c(!0),a);return()=>clearTimeout(f)},[i.id,i.at,l]),m("div",{className:"codex-context-compaction",children:[s(ge,{"aria-hidden":"true"}),s("span",{children:i.status==="completed"?n("stream.codex.contextCompacted"):i.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function v({sessionId:i,entry:n,terminals:l,streaming:o,streamingThoughtId:c}){let{t:a}=t();switch(n.kind){case"activity":return s(rn,{sessionId:i,items:n.items,terminals:l,streamingThoughtId:c});case"text":return b(n.item._meta).length>0?s(tn,{sessionId:i,item:n.item}):s(ae,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(qn,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(nn,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return s(he,{item:n.item})}}function xe({sessionId:i,turn:n,terminals:l,active:o,blocked:c=!1,continued:a=!1,edits:f=n.edits,activityItems:M=n.items,workStartedAt:Z=n.startedAt,isLast:W,error:y,interrupted:F,retry:L,retrying:u,answerActions:K,footer:ee}){let{t:d}=t(),E=n.errors.map((e)=>{let r=z(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let I=L?.turnId===de(e)?L:void 0;return s(on,{error:r,retry:I},`${e.id}:${I?.delaySeconds??"manual"}`)});if(W&&y!==null&&!n.errors.some((e)=>{let r=z(e);return r!==null&&r.stopReason===y.stopReason&&U(r).message===U(y).message}))E.push(s(on,{error:y},"current-run-error"));let h=E.length>0?s("div",{className:"codex-turn-errors",children:E}):null,C=n.items.filter(an);if(C.length>0&&C.length===n.items.length)return m(N,{children:[s(rn,{sessionId:i,items:C,terminals:l,streamingThoughtId:null}),h]});let x=n.work,k=x.length>0&&x.every((e)=>e.kind==="compaction");if(ao(n)||k&&n.final.length===0)return m(N,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(v,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),h]});let O=ze(n),P=n.final.filter((e)=>b(e._meta).length===0).map(J).join(`
|
|
2
|
-
`),T=o?null:Ge(n,"assistant"),D=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(q).filter((r)=>r!==null))),A=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((r,I)=>{let g=r.content,ie=e.name==="image_generation"&&Y(g),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(me(g)||X(g)&&("blob"in g.resource));if(!ie&&!re)return[];let _=q(g);if(_!==null){if(G.has(_))return[];G.add(_)}return[{key:`${e.id}:${I}`,block:g}]})}),R=n.final.some((e)=>b(e._meta).length===0&&e.content.some((r)=>!le(r)||r.text.trim().length>0)),te=D.length>0||A.length>0||k||R||n.final.some((e)=>b(e._meta).length>0),w=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),B=x.filter((e)=>w===-1||S(e)<w),ne=x.filter((e)=>w!==-1&&S(e)>w),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...ne.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,r)=>e.index-r.index),H=!o&&!a&&(P.trim().length>0?s(gn,{text:P,isMostRecentTurn:W,time:T,afterCopy:K}):m("div",{className:"flex items-center gap-0.5",children:[K,T&&s("span",{className:"codex-user-time ms-1",title:T.full,children:T.short})]})),p=Wn({...n,items:M},{running:o,blocked:c,retrying:u!==void 0}),Q=p.kind==="reasoning"?p.ownerKey??null:null,V=p.kind==="thinking",j=lo({...n,items:M});return m(N,{children:[s(fn,{stateKey:JSON.stringify([i,n.replayed?"history":"live",n.key]),active:o&&!R,defaultExpanded:o&&!R||!n.replayed&&(F||O),...j,startedAt:j.startedAt??Z,loading:(V||p.kind==="working")&&n.work.length===0,loadingLabel:p.kind==="working"?d("stream.codex.working"):void 0,work:a||k?[]:B.map((e)=>s(v,{sessionId:i,entry:e,terminals:l,streaming:o,streamingThoughtId:Q},e.key)),answer:te||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||k)&&B.map((e)=>s(v,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(v,{sessionId:i,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Q},e.entry.key);let r=e.item;return m(ue,{children:[b(r._meta).length>0?s(tn,{sessionId:i,item:r}):s(ae,{content:r.content,messageId:r.id,streaming:o}),r===n.final.at(-1)&&H]},r.id)}),D.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(ce,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),A.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:A.map((e)=>s(ae,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&H]}):null,footer:m(N,{children:[V&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),ee,f.length>0&&!o&&!a&&s(oo,{items:f}),F&&!O&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&h]})}),o&&u!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:u.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(u.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():u.message}),o&&h]})}var Kn=pe(xe);
|
|
3
|
-
export{Kn};
|
package/dist/chunk-myrdfa3s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn}from"./chunk-dyrgfdxz.js";import{vo}from"./chunk-aqvy57zs.js";import{X,Xn}from"./chunk-rwkkqdcv.js";import{e}from"./chunk-f3924gdb.js";import{useCallback as s,useSyncExternalStore as E}from"react";import"@alwith/module-chat/search.css";import{jsx as w}from"react/jsx-runtime";var h="alwith-chat:find";function zi(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function lt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=E(X.subscribe,X.getState,X.getState),y=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),m=s((r)=>u.sessionId===t?cn(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>Xn(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 w("div",{className:"absolute inset-x-0 top-0 z-30",children:w(vo,{placement:"body",getViewport:y,findSourceMatches:m,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{zi,lt};
|
package/dist/chunk-nacjea1s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-8w22ck92.js";import{s,u}from"./chunk-80ckz04b.js";import{P,g}from"./chunk-5nc3dtyt.js";import{GlobeIcon as b,LogOutIcon as x}from"lucide-react";import{useState as M}from"react";import{Avatar as A,AvatarFallback as N,AvatarImage as y}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as h,DropdownMenuContent as C,DropdownMenuGroup as i,DropdownMenuItem as L,DropdownMenuLabel as I,DropdownMenuRadioGroup as O,DropdownMenuRadioItem as G,DropdownMenuSeparator as c,DropdownMenuSub as k,DropdownMenuSubContent as R,DropdownMenuSubTrigger as T,DropdownMenuTrigger as U}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function br(e){return o(i,{...e})}function Cr(e){return o(c,{...e})}function Ii({className:e,...r}){return o(L,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function wr({languages:e,value:r,onChange:p}){let a=s();return n(k,{children:[n(T,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(b,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(R,{children:o(O,{value:r,onValueChange:(t)=>void u(a,Promise.resolve(p(t))),children:e.map((t)=>o(G,{value:t.code,children:t.label},t.code))})})]})}function kr({user:e,children:r,onSignOut:p,busy:a=!1}){let t=s(),{t:w}=t,[d,v]=M(!1),[D,m]=M(!1);S(d);let l=a||D,f=n(A,{className:"size-[18px] after:border-0",children:[o(y,{src:e.avatar??void 0,alt:""}),o(N,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(h,{open:d,onOpenChange:v,children:[n(U,{render:o(g,{disabled:l,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(P,{children:f}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(C,{side:"top",align:"start",sideOffset:8,className:"w-[calc(var(--anchor-width)+36px)]",children:[n(i,{children:[n(I,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[f,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(c,{})]}),r,r!=null&&o(c,{}),o(i,{children:n(Ii,{disabled:l,onClick:()=>{m(!0),u(t,p()).finally(()=>m(!1))},children:[o(x,{}),w("sessionList.signOut")]})})]})]})}
|
|
2
|
-
export{br,Cr,Ii,wr,kr};
|
package/dist/chunk-py837qjk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{we}from"./chunk-xyvqcpjx.js";import{T}from"./chunk-8jxcdap5.js";import{cn as n}from"cn";import{Item as i,ItemActions as D,ItemContent as H,ItemDescription as ne,ItemMedia as O,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function U({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function pe({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(we,"data-[active=true]:font-medium",e),...r})}function Mt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(T,{children:t})})}export{D,H,ne,O,U,pe,Mt};
|
package/dist/chunk-q7nn5xe5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b}from"./chunk-z71pp1mb.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Br(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function ao(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function M(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=b(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(b(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function so(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Br(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(sn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,g)=>j(x,c,g<v,a[g-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function sn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function J(t){return S(t.content)}function ze(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function ln(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function lo(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function co(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function uo(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!co(t,e[n-1],o))break;n--}return e[n]?.key}function po(t,e,n){let o=n,s=n;while(o>0&&co(t,e[o-1],e[o]))o--;while(s+1<e.length&&co(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
-
export{Br,ao,so,sn,J,ze,ln,lo,co,uo,po};
|
package/dist/chunk-qjhkzdhm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{te}from"./chunk-4s6gx750.js";import{t}from"./chunk-ye9tsdhn.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function On({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(te,{"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{On};
|
package/dist/chunk-qxcnyvps.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,i}from"./chunk-t0cr21e3.js";import{D,H,ne,O,U,pe}from"./chunk-py837qjk.js";import{ue}from"./chunk-j86x2rn0.js";import{v}from"./chunk-r9dt4bs3.js";import{le}from"./chunk-mcjwwxa1.js";import{F,ce}from"./chunk-w6rwngm3.js";import{CheckIcon as V,SparklesIcon as X,XIcon as _}from"lucide-react";import{useDeferredValue as J,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as K,DialogClose as Q,DialogContent as R,DialogDescription as W,DialogHeader as Y,DialogTitle as Z}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ie,TabsList as oe,TabsTrigger as re}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]=y(!1),o=c.interface?.iconSmall,h=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:h&&!u?t("img",{src:h,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(te,{className:"text-muted-foreground size-3.5"}),t(ae,{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 Pt({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),h=i((e)=>e.skillErrors),j=i((e)=>e.loading)||!m,z=i((e)=>e.installed),M=i((e)=>e.skillProjects),[E,L]=y(null),[k,B]=y(!1),[G,C]=y(null),b=J(c.trim().toLowerCase()),r=o.find((e)=>e.path===G),x=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(b)).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||b?p:p.slice(0,6),I=(e)=>t(U,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(pe,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(O,{className:"pointer-events-none relative translate-none! self-center!",children:t(P,{skill:a})}),n(H,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(ne,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(D,{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(v,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${F} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),j?t(ue,{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(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&p.length>6&&t(N,{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(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")L(e)},className:"gap-6",children:[t(oe,{"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(re,{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(ie,{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(K,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(R,{showCloseButton:!1,className:ce,children:r&&n(S,{children:[t(le,{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(Q,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(_,{})})]})]}),n(Y,{className:"gap-3",children:[t(Z,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),t(W,{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")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):r.pluginId]})]})})})]})}
|
|
2
|
-
export{Pt};
|
package/dist/chunk-r3qrftds.js
DELETED
package/dist/chunk-r8rre2zb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-ye9tsdhn.js";import{Kt,e,m}from"./chunk-f3924gdb.js";import{ut}from"./chunk-rekc1q3m.js";import{at}from"./chunk-9g67z1b4.js";import{lt}from"./chunk-myrdfa3s.js";import{ct,dt}from"./chunk-kc5k5e59.js";import{st}from"./chunk-n3xhh6ch.js";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as H,EmptyDescription as k,EmptyHeader as O,EmptyTitle as S}from"@nyssance/shadcn/vega/components/ui/empty";import{LockIcon as M,UnplugIcon as P}from"lucide-react";import{useMemo as z,useRef as B}from"react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Ui({host:t,client:c,...s}){let d=z(()=>t.openDiff?t:{...t,openDiff:ct},[t]);return r(Kt,{host:d,client:c,children:[o(I,{...s}),!t.openDiff&&o(dt,{})]})}function I({session:t,header:c,overlay:s,timeline:d,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:p,client:R}=e(),f=B(null),b=(a)=>{if(f.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:i}=p,v=n((a)=>a.connection==="ready"),y=n((a)=>a.historyPages[t.id]?.error),u=()=>m(p,R.open(t.id,t.cwd)),x=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return r("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,r("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!x&&o(lt,{sessionId:t.id,rootRef:f}),s,v&&!t.attached&&!t.restoring&&!t.readOnly&&o("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:r(C,{children:[o(P,{}),o(h,{children:i("conversation.stopped")}),o(N,{children:o(w,{size:"sm",variant:"outline",onClick:u,children:i("conversation.reconnect")})})]})}),x?E??o(H,{className:"flex-1",children:r(O,{children:[o(S,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(k,{children:i("conversation.welcomeDescription")})]})}):o(at,{session:t,timeline:d}),o(st,{sessionId:t.id}),t.readOnly?o("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:r(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[r("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),r("div",{className:"min-w-0 space-y-1",children:[o(h,{children:i("conversation.readOnlyTitle")}),o(N,{children:i("conversation.readOnlyDescription")}),y&&o("p",{role:"alert",className:"text-destructive break-words",children:y})]})]}),r("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[o(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:u,disabled:!v||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??o(ut,{session:t})]}),T]})}
|
|
2
|
-
export{Ui};
|