@alwith/module-chat 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- 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.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-x1gdzj12.js → chunk-07srtfz3.js} +2 -2
- package/dist/{chunk-wk0w29fc.js → chunk-0ag4ewq9.js} +2 -2
- package/dist/{chunk-g9q3ktfj.js → chunk-0fmepk2y.js} +3 -3
- package/dist/{chunk-a63k8tht.js → chunk-1341xyde.js} +2 -2
- package/dist/{chunk-tp3gzh0b.js → chunk-18j37y1m.js} +2 -2
- package/dist/{chunk-ccn44b81.js → chunk-1b2jsf2v.js} +2 -2
- package/dist/{chunk-wrfxjyt2.js → chunk-2bbspcb4.js} +2 -2
- package/dist/chunk-2z1cpz8a.js +2 -0
- package/dist/{chunk-jtc52w45.js → chunk-31t5ap7s.js} +3 -3
- package/dist/{chunk-n9234ftx.js → chunk-35z0nr4v.js} +2 -2
- package/dist/{chunk-qem8a6w1.js → chunk-3aadhvbj.js} +2 -2
- package/dist/{chunk-v2kz1m1e.js → chunk-3mrdv5yq.js} +2 -2
- package/dist/{chunk-3adsd6wf.js → chunk-3stf1tm2.js} +2 -2
- package/dist/{chunk-ekq4d1bs.js → chunk-41nq4hjc.js} +2 -2
- package/dist/{chunk-dxgha4a2.js → chunk-4jh2wk80.js} +2 -2
- package/dist/{chunk-6j09pkr4.js → chunk-4xjzvwg4.js} +2 -2
- package/dist/{chunk-0neph1kr.js → chunk-4xp0q7vs.js} +3 -3
- package/dist/{chunk-g6k07w9b.js → chunk-53k7yvr8.js} +2 -2
- package/dist/chunk-57p1s7hy.js +2 -0
- package/dist/{chunk-k4kdxztk.js → chunk-5azv8vz6.js} +2 -2
- package/dist/{chunk-ws07yjfe.js → chunk-5vh4z4yp.js} +2 -2
- package/dist/{chunk-spez62xj.js → chunk-601kr76a.js} +3 -3
- package/dist/{chunk-vsney1vb.js → chunk-67x8znmk.js} +2 -2
- package/dist/{chunk-pvx9s60k.js → chunk-6d5c94rn.js} +2 -2
- package/dist/chunk-6hxa1n8n.js +2 -0
- package/dist/{chunk-kf9zjtr3.js → chunk-6pwy0ncf.js} +2 -2
- package/dist/chunk-6wtrmxev.js +3 -0
- package/dist/{chunk-k1wjbbcq.js → chunk-6wv99fdt.js} +2 -2
- package/dist/{chunk-73gtwm77.js → chunk-6zcjn8ra.js} +2 -2
- package/dist/chunk-753z0tkd.js +2 -0
- package/dist/{chunk-67vzyv97.js → chunk-76a04a6j.js} +2 -2
- package/dist/{chunk-p1z376qx.js → chunk-7bcm8mpx.js} +2 -2
- package/dist/chunk-7eq01k20.js +3 -0
- package/dist/chunk-7jx2k96e.js +2 -0
- package/dist/{chunk-fhkmhxks.js → chunk-7nb0qea6.js} +3 -3
- package/dist/{chunk-rh5zgmh5.js → chunk-7xe2v72q.js} +2 -2
- package/dist/{chunk-6vtcbh85.js → chunk-7zcr1wzv.js} +2 -2
- package/dist/{chunk-0qy6n5bv.js → chunk-8fnjpx11.js} +2 -2
- package/dist/{chunk-pzsx1s8z.js → chunk-8hen6y4t.js} +2 -2
- package/dist/chunk-8hgrrycr.js +2 -0
- package/dist/{chunk-0717ykjj.js → chunk-8t3hyxk4.js} +2 -2
- package/dist/{chunk-41t41g5h.js → chunk-8wdkc41j.js} +2 -2
- package/dist/{chunk-yr5y9dp6.js → chunk-9c8cyz7r.js} +2 -2
- package/dist/{chunk-btrg3ywt.js → chunk-9cqpn67f.js} +2 -2
- package/dist/{chunk-8h8zr2s0.js → chunk-9ff3htdp.js} +2 -2
- package/dist/chunk-9g7qvbhx.js +2 -0
- package/dist/{chunk-kxv78gj0.js → chunk-9hskky1n.js} +2 -2
- package/dist/{chunk-wgph2nb9.js → chunk-9k4f13c1.js} +2 -2
- package/dist/{chunk-kj1xdw76.js → chunk-9n028hnr.js} +2 -2
- package/dist/{chunk-ek1c345m.js → chunk-9qvnrc1p.js} +2 -2
- package/dist/chunk-9rgrb198.js +3 -0
- package/dist/{chunk-p73qyyrt.js → chunk-9w4fg6bn.js} +2 -2
- package/dist/{chunk-0n01x7fz.js → chunk-9yrctk84.js} +2 -2
- package/dist/{chunk-xr3sd5r7.js → chunk-a45jg9xv.js} +6 -6
- package/dist/{chunk-f1ha808d.js → chunk-aarpb5np.js} +2 -2
- package/dist/{chunk-e8t49fma.js → chunk-abjr18n6.js} +4 -4
- package/dist/chunk-az434tgy.js +2 -0
- package/dist/chunk-azrmn4x1.js +2 -0
- package/dist/{chunk-w8d5b5ta.js → chunk-b5ywqwnr.js} +2 -2
- package/dist/{chunk-2c6ewztm.js → chunk-bb1y2fy7.js} +2 -2
- package/dist/{chunk-h2sk8xmm.js → chunk-be7ja8gh.js} +3 -3
- package/dist/{chunk-btrhrh42.js → chunk-bjfcyfp5.js} +2 -2
- package/dist/chunk-bk80xpsy.js +2 -0
- package/dist/{chunk-7x2hqdxv.js → chunk-brqgdzhr.js} +2 -2
- package/dist/chunk-bt01an6h.js +2 -0
- package/dist/{chunk-t83h0z1y.js → chunk-bydgccyt.js} +2 -2
- package/dist/{chunk-fnhcyga2.js → chunk-c11c29rv.js} +5 -5
- package/dist/{chunk-njq7f390.js → chunk-c2a0x69n.js} +2 -2
- package/dist/{chunk-x0dn6sdq.js → chunk-c4dk6j2h.js} +2 -2
- package/dist/{chunk-bdt3y6w6.js → chunk-ce3wg766.js} +2 -2
- package/dist/chunk-cm5rcd9q.js +2 -0
- package/dist/{chunk-b3jjd5nv.js → chunk-cn9g220k.js} +2 -2
- package/dist/chunk-d1pc0mrb.js +2 -0
- package/dist/{chunk-npqa1nz9.js → chunk-d67ypca2.js} +2 -2
- package/dist/{chunk-mw9586vr.js → chunk-db0g8rr1.js} +2 -2
- package/dist/{chunk-m2b57yqn.js → chunk-dj8e2ymr.js} +2 -2
- package/dist/chunk-e4h6f6dh.js +2 -0
- package/dist/chunk-e8jfja20.js +2 -0
- package/dist/{chunk-qvbaga5z.js → chunk-eb12xkn0.js} +2 -2
- package/dist/{chunk-arzgbze4.js → chunk-ehcpnhfw.js} +2 -2
- package/dist/chunk-enr3j794.js +2 -0
- package/dist/{chunk-jq1mmpqr.js → chunk-eryds6y3.js} +2 -2
- package/dist/{chunk-9271avsa.js → chunk-ezhzktjg.js} +2 -2
- package/dist/{chunk-dwbc8r1m.js → chunk-fzfmg9pk.js} +2 -2
- package/dist/chunk-g3snk3nb.js +2 -0
- package/dist/{chunk-wyyazt81.js → chunk-g4frp0r0.js} +2 -2
- package/dist/{chunk-cyb27m7n.js → chunk-ggqv2qpg.js} +2 -2
- package/dist/{chunk-z2v008kc.js → chunk-gha517v4.js} +2 -2
- package/dist/chunk-gjg213m6.js +2 -0
- package/dist/chunk-gvwmyxwf.js +2 -0
- package/dist/{chunk-yms6983x.js → chunk-gyps0vc5.js} +4 -4
- package/dist/{chunk-ngmgp7a4.js → chunk-h3hzsg0s.js} +2 -2
- package/dist/{chunk-jyg1gsqg.js → chunk-h4r8cx37.js} +2 -2
- package/dist/{chunk-3fxbypd3.js → chunk-hbtv1mp0.js} +2 -2
- package/dist/{chunk-ewf8fb64.js → chunk-hfzt777k.js} +2 -2
- package/dist/{chunk-aq0reck8.js → chunk-hp1w7xrp.js} +2 -2
- package/dist/{chunk-82xjggwn.js → chunk-hp9h8njw.js} +2 -2
- package/dist/chunk-hrgtpvkw.js +2 -0
- package/dist/{chunk-gan9srhm.js → chunk-j5engcds.js} +2 -2
- package/dist/chunk-j6mkqhey.js +2 -0
- package/dist/{chunk-qafx5yjp.js → chunk-k20e64v3.js} +2 -2
- package/dist/chunk-k7y6dqf2.js +2 -0
- package/dist/chunk-k8xqzrg6.js +2 -0
- package/dist/{chunk-dbc5121m.js → chunk-km20c9ey.js} +2 -2
- package/dist/{chunk-js9y1x0n.js → chunk-ksyb8hyt.js} +2 -2
- package/dist/{chunk-drrram2y.js → chunk-m33eg346.js} +2 -2
- package/dist/chunk-m9mvh1gy.js +2 -0
- package/dist/{chunk-hacpxv1k.js → chunk-maa70rv4.js} +2 -2
- package/dist/{chunk-er0nrf55.js → chunk-mfnq8nnd.js} +3 -3
- package/dist/chunk-mhnhkg65.js +2 -0
- package/dist/{chunk-5w96v6hf.js → chunk-mmm1rq2a.js} +2 -2
- package/dist/chunk-mz18hxbn.js +2 -0
- package/dist/chunk-n50n6k74.js +2 -0
- package/dist/{chunk-j6svz91p.js → chunk-n6dbc0md.js} +2 -2
- package/dist/{chunk-6ra6vmy1.js → chunk-n9fwnebe.js} +2 -2
- package/dist/{chunk-3wxx62gz.js → chunk-nk266xxm.js} +2 -2
- package/dist/{chunk-m66tt5vt.js → chunk-npsgbfh2.js} +2 -2
- package/dist/{chunk-jxcvqmrk.js → chunk-nx701kdw.js} +2 -2
- package/dist/{chunk-152mrdb6.js → chunk-p0egvanw.js} +2 -2
- package/dist/chunk-p5by0hbk.js +2 -0
- package/dist/chunk-p9ra3xxb.js +2 -0
- package/dist/{chunk-wdfh0xr6.js → chunk-pp9fngkx.js} +2 -2
- package/dist/chunk-q92p35wp.js +2 -0
- package/dist/{chunk-0t3g2phv.js → chunk-qcj6f1rq.js} +2 -2
- package/dist/chunk-qexqjw6k.js +2 -0
- package/dist/chunk-qez4ygej.js +2 -0
- package/dist/chunk-qyp7c0j8.js +1 -0
- package/dist/{chunk-cgbjtg32.js → chunk-qznyjv2c.js} +2 -2
- package/dist/{chunk-ar81v2x8.js → chunk-r0v0wxn7.js} +2 -2
- package/dist/chunk-r1sdshyw.js +2 -0
- package/dist/{chunk-wej76mmp.js → chunk-rch4xpj1.js} +2 -2
- package/dist/{chunk-97z2dafr.js → chunk-rg5jhh45.js} +2 -2
- package/dist/{chunk-n7y86xxv.js → chunk-sqwscqfk.js} +2 -2
- package/dist/chunk-stghje2t.js +2 -0
- package/dist/{chunk-egzt0en6.js → chunk-t8n1ny7h.js} +2 -2
- package/dist/chunk-teg61ef5.js +2 -0
- package/dist/chunk-tjjqaf65.js +2 -0
- package/dist/{chunk-8q6wpmar.js → chunk-v3jehrgj.js} +2 -2
- package/dist/{chunk-z0e6twca.js → chunk-v4cf374m.js} +2 -2
- package/dist/{chunk-qdh9z547.js → chunk-v5wqxqrh.js} +2 -2
- package/dist/chunk-v7dyjpv3.js +2 -0
- package/dist/{chunk-rrb47vhw.js → chunk-vkc6mwyb.js} +2 -2
- package/dist/chunk-vpm5ddtt.js +4 -0
- package/dist/{chunk-r03bbt2f.js → chunk-vwzkw97t.js} +2 -2
- package/dist/{chunk-36han2kw.js → chunk-w0dfvr05.js} +2 -2
- package/dist/{chunk-hvm4b6n2.js → chunk-wnsk4tw5.js} +2 -2
- package/dist/chunk-wyjzpncq.js +2 -0
- package/dist/{chunk-xjx9aw6t.js → chunk-x4qnkn8f.js} +2 -2
- package/dist/{chunk-e6r2sx79.js → chunk-xecs5c6a.js} +2 -2
- package/dist/chunk-xhtpqc8p.js +2 -0
- package/dist/{chunk-x9eeb7ns.js → chunk-xvzz0xh6.js} +2 -2
- package/dist/{chunk-8qkhwpmk.js → chunk-y2g8d94r.js} +2 -2
- package/dist/chunk-y7v0ghc9.js +2 -0
- package/dist/{chunk-wg6yp27g.js → chunk-yd6ae6py.js} +2 -2
- package/dist/{chunk-j2zx58ja.js → chunk-yf39xswe.js} +2 -2
- package/dist/{chunk-505zj2bz.js → chunk-yjk5a037.js} +2 -2
- package/dist/{chunk-jsjyrkcq.js → chunk-yq55kqn1.js} +2 -2
- package/dist/{chunk-tpppzcvp.js → chunk-yr6ar090.js} +2 -2
- package/dist/chunk-z49yf5bx.js +2 -0
- package/dist/{chunk-n25773ea.js → chunk-z4nv1j97.js} +2 -2
- package/dist/chunk-zb14ervr.js +2 -0
- package/dist/{chunk-gfx3hvr5.js → chunk-zd40j8qb.js} +2 -2
- package/dist/chunk-zghk9mth.js +3 -0
- package/dist/{chunk-4ae0few5.js → chunk-zn9xn0pj.js} +2 -2
- package/dist/chunk-zr2a9z0m.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/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/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/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-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/types.d.ts +2 -2
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -2
- package/dist/chunk-1qm96wyd.js +0 -2
- package/dist/chunk-1xz7zmz5.js +0 -2
- package/dist/chunk-228cdk3n.js +0 -2
- package/dist/chunk-234jnd72.js +0 -2
- package/dist/chunk-23k0jcxd.js +0 -2
- package/dist/chunk-2gwj90sw.js +0 -2
- package/dist/chunk-2n86qe6v.js +0 -3
- package/dist/chunk-30tynyrt.js +0 -2
- package/dist/chunk-3rvvac37.js +0 -2
- package/dist/chunk-4chswhrw.js +0 -2
- package/dist/chunk-5hp37r8q.js +0 -3
- package/dist/chunk-5k7rhfkh.js +0 -2
- package/dist/chunk-5kv1p9nd.js +0 -2
- package/dist/chunk-7pv05p7j.js +0 -2
- package/dist/chunk-7vpy078b.js +0 -2
- package/dist/chunk-9pcbtreq.js +0 -2
- package/dist/chunk-ambjth0x.js +0 -2
- package/dist/chunk-bptqs82k.js +0 -2
- package/dist/chunk-by0ecrb5.js +0 -2
- package/dist/chunk-c3neqj3h.js +0 -2
- package/dist/chunk-c9d65ta8.js +0 -2
- package/dist/chunk-cg8ekwka.js +0 -2
- package/dist/chunk-cpcfd1a1.js +0 -2
- package/dist/chunk-d499mw7g.js +0 -2
- package/dist/chunk-d7evpw1z.js +0 -2
- package/dist/chunk-etpnhtgg.js +0 -4
- package/dist/chunk-ewctpsb4.js +0 -2
- package/dist/chunk-ff987rah.js +0 -2
- package/dist/chunk-h1z98eg8.js +0 -2
- package/dist/chunk-h51hfb0t.js +0 -2
- package/dist/chunk-jfa9vg5s.js +0 -2
- package/dist/chunk-jqvp4gfc.js +0 -2
- package/dist/chunk-me85j3xg.js +0 -2
- package/dist/chunk-nthrcswc.js +0 -2
- package/dist/chunk-rdx8hc3g.js +0 -2
- package/dist/chunk-rxpytgjq.js +0 -3
- package/dist/chunk-smwn4wrd.js +0 -2
- package/dist/chunk-t67m7g8q.js +0 -2
- package/dist/chunk-w30rf96r.js +0 -2
- package/dist/chunk-xq196p3v.js +0 -2
- package/dist/chunk-xqe0qa9f.js +0 -2
- package/dist/chunk-y4ewhx9t.js +0 -2
- package/dist/chunk-ydqnz0pb.js +0 -2
- package/dist/chunk-yxtr7x25.js +0 -2
- package/dist/chunk-yyzxpnm0.js +0 -2
- package/dist/chunk-z3xg96j6.js +0 -3
- package/dist/chunk-z8bbv8qd.js +0 -2
- package/dist/chunk-zd2c750t.js +0 -2
- package/dist/chunk-zz3wm06f.js +0 -1
package/dist/chunk-23k0jcxd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{le}from"./chunk-rdx8hc3g.js";import{ui,I}from"./chunk-y4ewhx9t.js";import{Uo,Bo,Go,zo,Vo,A}from"./chunk-kf9zjtr3.js";import{n,t}from"./chunk-2gwj90sw.js";import{e}from"./chunk-e6r2sx79.js";import{Wn}from"./chunk-6j09pkr4.js";import{Vn}from"./chunk-3adsd6wf.js";import{Oo}from"./chunk-4ae0few5.js";import{ri,ai}from"./chunk-2c6ewztm.js";import{hn}from"./chunk-e8t49fma.js";import{tn}from"./chunk-ambjth0x.js";import{a,Kn,F,kt}from"./chunk-ydqnz0pb.js";import{yt}from"./chunk-bdt3y6w6.js";import{_e,vt}from"./chunk-234jnd72.js";import{xt,Ct}from"./chunk-cg8ekwka.js";import{$n}from"./chunk-wk0w29fc.js";import{ft}from"./chunk-h1z98eg8.js";import{Bn}from"./chunk-js9y1x0n.js";import{gt}from"./chunk-gan9srhm.js";import{ht}from"./chunk-b3jjd5nv.js";import{On}from"./chunk-cgbjtg32.js";import{zn}from"./chunk-5kv1p9nd.js";import{Un}from"./chunk-z0e6twca.js";import{Ut}from"./chunk-n7y86xxv.js";import{hasFuzzyFileSearch as zt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Ht}from"lucide-react";import{useCallback as O,useEffect as Kt,useLayoutEffect as Z,useMemo as tt,useRef as V,useState as D}from"react";import{jsx as c,jsxs as v,Fragment as Gt}from"react/jsx-runtime";var Wt=["image/png","image/jpeg","image/webp","image/gif"],et=[];async function jt(r){let h=await(await fetch(r.url)).blob();return new Promise((l,R)=>{let M=new FileReader;M.onerror=()=>R(M.error),M.onload=()=>{let U=M.result;l(U.slice(U.indexOf(",")+1))},M.readAsDataURL(h)})}function $t(r){let{t:h}=n(),l=I();return c(A,{"aria-label":h("composer.attachImage"),title:h("composer.attachImage"),onClick:()=>l.openFileDialog(),...r,children:c(Ht,{className:"size-4"})})}function mt({session:r,onSubmit:h,onShellCommand:l,onHandOff:R,modelSelector:M,modelMenu:U,inputHeader:rt,actions:bt,leadingTools:wt,agentControls:X=!0,placeholder:It,children:Tt,attachmentPolicy:At,predictions:Mt=!0,disabled:Et=!1,preparing:ot=!1,allowPendingInput:Rt=!1}){let{host:B,client:N}=e(),{t:p}=B,_=O((o)=>{if(B.reportError)B.reportError(o);else console.error(o)},[B]),[nt,L]=D(()=>({text:a.get(r.id)?.text??"",revision:0})),{text:d}=nt,[C,Nt]=D(()=>a.get(r.id)?.attachments??et),[g,H]=D(()=>a.get(r.id)?.mentions??[]),q=C.some((o)=>_e(o)&&o.pastedText.status!=="ready"),[E,at]=D(!1),[K,St]=D(!1),[J,it]=D(!1),u=V(null),ct=V(null),i=V(nt),S=O((o)=>{ct.current?.(),i.current={text:o,revision:i.current.revision+1},L(i.current)},[]),Ot=On(r,S),st=tt(()=>({read:()=>{let s=u.current?.getTextarea(),x=s===null||s===void 0?[i.current.text.length,i.current.text.length]:[s.selectionStart,s.selectionEnd];return{target:r.id,...i.current,selection:x}},compareAndSet(s,x,w){if(s.target!==r.id||s.revision!==i.current.revision)return null;i.current={text:x,revision:i.current.revision+1},L(i.current);let y=u.current?.getTextarea();if(y!==null&&y!==void 0)y.value=x,y.setSelectionRange(w[0],w[1]);return{target:r.id,...i.current,selection:w}}}),[r.id]),z=V(null),pt=O((o)=>(z.current=o,()=>{if(z.current===o)z.current=null}),[]),W=r.state!=="idle",P=l!==void 0&&d.startsWith("!"),f=!Et&&!ot&&r.attached&&!r.restoring&&!r.readOnly,k=!r.readOnly&&(Rt||f),j=ht(r,f&&!E&&!K&&!q&&!J,d.length>0||C.length>0||g.length>0,Mt&&!P),lt=j.invalidate;Z(()=>{a.set(r.id,{text:d,attachments:C,mentions:g,modelId:a.get(r.id)?.modelId??null})},[r.id,d,C,g]),Z(()=>Kn(r.id,Nt),[r.id]),Z(()=>kt(r.id,(o)=>{if(!k||E)throw Error("The composer cannot take text now; try again later");if(d.length||C.length||g.length)throw Error("The composer already has a draft; send or clear it first");S(o)}),[r.id,k,E,d,C,g,S]);let dt=t((o)=>zt(o.agent)),Ft=tt(()=>dt&&f?async(o)=>yt((await N.fuzzyFileSearch({query:o,roots:[r.cwd],cancellationToken:null})).files):void 0,[N,dt,f,r.cwd]),Q=O((o)=>{H((s)=>s.includes(o)?s:[...s,o])},[]);Kt(()=>{u.current?.focus()},[]);let ut=O(async({text:o,files:s})=>{let x=l!==void 0&&o.startsWith("!")?o.slice(1):null;if(x!==null){if(x.trim().length===0)return;if(s.length||g.length)throw Error("Shell commands cannot include file references or attachments");if(r.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let w=o.trim();if(w.length===0&&s.length===0&&g.length===0)return;let y=z.current;at(!0);let T=a.get(r.id),Lt=i.current.revision,G=null;try{let b=Wn(w);for(let m of g){let Y={kind:"file",absPath:m};b.push({type:"resource_link",uri:xt(Y),name:Ct(Y)})}if(w.length>0)b.push({type:"text",text:w});for(let m of s)if(_e(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");b.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else b.push({type:"image",data:await jt(m),mimeType:m.mediaType});if(i.current.revision===Lt&&a.get(r.id)===T)i.current={text:"",revision:i.current.revision+1},G=i.current.revision,L(i.current),H([]),F(r.id,()=>et),a.set(r.id,{text:"",attachments:et,mentions:[],modelId:T?.modelId??null}),u.current?.resetHeight();if(x!==null&&l)await l(x);else if(h)if(y===null)await h(b);else await h(b,(m)=>{if(y.signal.aborted||z.current!==y)return;y.accept(m),R?.(r.id,m)});else if(y===null)await N.prompt(r.id,b);else{let m=await N.prompt(r.id,b);y.accept(m)}lt();for(let m of T?.attachments??[])if(m.url.startsWith("blob:")&&!a.get(r.id)?.attachments.some((Y)=>Y.id===m.id))URL.revokeObjectURL(m.url)}catch(b){if(T&&G!==null&&i.current.revision===G&&a.get(r.id)?.attachments.length===0&&a.get(r.id)?.mentions.length===0)i.current={text:T.text,revision:G+1},L(i.current),H(T.mentions),a.set(r.id,T),F(r.id,()=>T.attachments);throw b}finally{at(!1),u.current?.focus()}},[N,r.id,r.state,g,h,l,R,lt]),Dt=()=>{N.cancel(r.id).catch(_)},Bt=O((o)=>{let s=o.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:le})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});_(s)},[_,p]),_t=tt(()=>({session:r,ready:f,inputReady:k,sending:E,textareaRef:u,draft:st,interruptRef:ct,observeReceipts:pt,addMention:Q,setAdding:St,shellMode:P,handsFree:!P&&(h===void 0||R!==void 0)}),[r,f,k,E,st,pt,Q,h,R,P]),Pt=B.writeTextAttachment;return c(tn,{value:_t,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[rt&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:rt}),v(ui,{attachmentPolicy:At,value:d,revision:i.current.revision,onValueChange:S,onSubmittedClear:()=>{i.current={text:"",revision:i.current.revision+1},L(i.current)},attachments:C,onAttachmentsChange:(o)=>F(r.id,()=>o),children:[X&&c(Oo,{bashMode:l!==void 0,handleRef:u,commands:r.commands,searchFiles:Ft,onMention:Q,onSearchError:_,forcedOpen:J,onForcedOpenChange:it,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),v(Uo,{"data-shell-mode":P||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Wt.join(","),onError:Bt,onSubmit:ut,onSubmitAsync:ut,onSubmitError:_,canSubmit:()=>f&&!E&&!K&&!q&&(!P||!W&&d.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Tt,v(Go,{className:"px-3 pt-3 pb-0 empty:hidden",children:[K&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),c($n,{mentions:g,onRemove:(o)=>H((s)=>s.filter((x)=>x!==o))}),c(ai,{children:(o)=>_e(o)?c(Bn,{data:o,sessionId:r.id}):c(ri,{data:o,t:p})})]}),v(Bo,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(o)=>{if(!j.text||u.current?.isComposing()||o.nativeEvent.isComposing||o.nativeEvent.keyCode===229||o.shiftKey||o.ctrlKey||o.altKey||o.metaKey||o.target!==u.current?.getTextarea())return;if(o.key==="Tab")o.preventDefault(),o.stopPropagation(),S(j.text)},children:[P&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(hn,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,onKeyDown:Ot,bashMode:l!==void 0,disabled:!k,onPasteCapture:Pt?(o)=>vt(o,r.id,p("composer.pastedTextFilename"),Pt):void 0,placeholder:P?"! command":j.text||It||(W?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),c(zo,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c($t,{className:"text-foreground",disabled:!k}),wt,X&&v(Gt,{children:[c(zn,{textareaRef:u,menuOpen:J,onOpenChange:it,disabled:!f||r.commands.length===0}),c(Vn,{disabled:!f||P,onSelect:(o)=>{S(`${d}${d&&!/\s$/.test(d)?" ":""}${o} `),u.current?.getTextarea()?.focus()}}),c(gt,{sessionId:r.id,options:r.configOptions,disabled:!f})]})]}),v(Vo,{className:"w-full min-w-0 items-center justify-end gap-1",children:[X&&c(Ut,{session:r}),M??c(ft,{...U,sessionId:r.id,options:r.configOptions,disabled:!f}),bt,c(Un,{active:W,sending:E||ot||K,ready:f&&!q&&(!P||!W&&d.slice(1).trim().length>0),hasMentions:g.length>0,onStop:Dt})]})]})})]})]})]})})})}
|
|
2
|
-
export{mt};
|
package/dist/chunk-2gwj90sw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ei}from"./chunk-d499mw7g.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function fe({host:e,client:i,children:o}){return r(Ei,{host:e,children:r(c,{value:e,children:r(u,{value:i,children:o})})})}function n(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function he(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function Z(e,i){return m((o)=>e.subscribe(o),()=>i(e.getState()),()=>i(e.getState()))}function t(e){let i=he();return Z(i.store,e)}function tt(e,i){if(e.reportError)e.reportError(i);else console.error(i)}
|
|
2
|
-
export{fe,n,he,Z,t,tt};
|
package/dist/chunk-2n86qe6v.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c,S}from"./chunk-d499mw7g.js";import{D}from"./chunk-spez62xj.js";import{Yo}from"./chunk-m2b57yqn.js";import{ne}from"./chunk-67vzyv97.js";import{ei,je}from"./chunk-xr3sd5r7.js";import{oi}from"./chunk-fhkmhxks.js";import{Cn}from"./chunk-btrhrh42.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(S,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(S,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(ne,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function ya({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(xn,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=Yo(t.content,"compact"),x=l.reduce((e,a,p)=>a.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&D(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return a.length===0?null:o(je,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?l.length:h;return o(bn,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(oi,{blocks:f}):y(f))})}function xn({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=c(),{t:u}=d;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Cn,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=c();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function bn({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(ei,{...d,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{ya,xn,bn};
|
package/dist/chunk-30tynyrt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{T}from"./chunk-73gtwm77.js";import{createContext as S,useContext as c,useState as x,useSyncExternalStore as D}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as L,DialogContent as y,DialogDescription as h,DialogFooter as w,DialogHeader as P,DialogTitle as H}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as d}from"react/jsx-runtime";var m=S(null),C=S(null),v=S(null);function $r({host:e,client:t,children:n}){let[l,a]=x(null);T(l!==null);let{t:u}=e;return i(m,{value:e,children:i(C,{value:t,children:d(v,{value:a,children:[n,i(L,{open:l!==null,onOpenChange:(f)=>!f&&a(null),children:d(y,{children:[d(P,{children:[i(H,{children:u("sessionList.deleteTitle")}),i(h,{children:u("sessionList.deleteDescription")})]}),d(w,{children:[i(g,{variant:"outline",onClick:()=>a(null),children:u("sessionList.cancel")}),i(g,{onClick:()=>{if(l)p(e,t.delete(l.sessionId));a(null)},children:u("sessionList.delete")})]})]})})]})})})}function r(){let e=c(m);if(e===null)throw Error("Session list host is missing");return e}function ji(){return c(m)}function s(){let e=c(C);if(e===null)throw Error("Session list client is missing");return e}function en(){let e=c(v);if(e===null)throw Error("Session list provider is missing");return e}function o(e){let t=s();return D((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function p(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{$r,r,ji,s,en,o,p};
|
package/dist/chunk-3rvvac37.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{w,vn,Wo,Tt,Zo,yn,Qo}from"./chunk-h2sk8xmm.js";import{n,he,Z,t}from"./chunk-2gwj90sw.js";import{se}from"./chunk-ngmgp7a4.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function v(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function M(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...yn(s._meta),...s.content.filter(k).flatMap((i)=>yn(i._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:r,item:e,question:s,index:a}){let i=he(),{t:l}=n(),m=vn(e.id,a),c=JSON.stringify([r,m]),u=Z(b,(o)=>o.entries[c]),d=t((o)=>o.sessions[r]),A=t((o)=>o.connection==="ready"),f=u?.draft??Wo(s),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,h=d!==void 0&&v(d,e),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!v(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Tt(s,f);if(!S.trim())return;let q={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Zo(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Qo,{question:s,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function sn({sessionId:r,item:e}){let s=t((i)=>i.sessions[r]),a=w(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!v(s,e))return y(se,{content:e.content.some((i)=>!k(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(O,{sessionId:r,item:e,question:i,index:l},vn(e.id,l)))})}
|
|
2
|
-
export{sn};
|
package/dist/chunk-4chswhrw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-d499mw7g.js";import{h}from"./chunk-yxtr7x25.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";function Me(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let n=[];for(let[r,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))n.push({key:`${e.id}:${r}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))n.push({key:`${e.id}:${r}`,path:i.uri,alt:i.name})}if(n.length)return n;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:n,openImageGallery:a,openImage:r,t:l}=c(),[i,g]=v({}),[x,I]=v(0),f=JSON.stringify(e);B(()=>{let t=!0,u=JSON.parse(f);g({});for(let o of u)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&n?n(o.path):Promise.reject(Error("Image loading is unavailable"))).then((d)=>{if(t)g((p)=>({...p,[o.key]:{src:d}}))},()=>{if(t)g((d)=>({...d,[o.key]:{error:!0}}))});return()=>{t=!1}},[f,n,x]);let k=e.flatMap((t)=>{let u=i[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return s("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let o=i[t.key];if(!o)return s("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:s(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((m)=>m+1),children:s(R,{"aria-hidden":"true"})},t.key);return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,u).filter((d)=>{let p=i[d.key];return p&&"src"in p}).length;if(a)a(k,m);else r?.(o.src)},children:s("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function ni({blocks:e}){let{t:n}=c(),a=e.flatMap(T),[r,l]=h(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":r,onClick:()=>l((i)=>!i),children:[y("span",{className:"codex-activity-label",children:[s(S,{className:"codex-activity-icon","aria-hidden":"true"}),s("span",{className:"codex-activity-leading",children:n("stream.codex.viewedImages",{count:a.length})})]}),s(C,{className:r?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),r&&s(E,{images:a})]})}
|
|
2
|
-
export{Me,ni};
|
package/dist/chunk-5hp37r8q.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r,s,o}from"./chunk-30tynyrt.js";import{De,ie,Y}from"./chunk-5k7rhfkh.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as n}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function Ir({Scroll:u=we}){let{t:i,i18n:A}=r(),m=s(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,X]=d(""),[y,Z]=d("all"),[p,ee]=d("all"),[te,se]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[ne,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let a=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(a.has(v))throw Error("Archive pagination returned a repeated cursor");a.add(v),await m.listArchived()}}catch(a){if(!e)F(E(a))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,te]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ae=[...new Set(S.filter((e)=>l&&j(l,e).id!==Y).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=l?j(l,e).id:null,a=c===Y;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?a:!a))&&(p==="all"||(p==="quick"?a:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let a of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===a.sessionId))continue;try{await m.delete(a.sessionId)}catch(v){e.push(a),c.push(`${L(a)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
-
`));else f(null)}finally{h.current=!1,w(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),n(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),n(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Z(e)},children:[n(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),n(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),n(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[n(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):ie(p,l??void 0)})]}),n(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ae.map((e)=>t(x,{value:e,title:e,children:ie(e,l??void 0)},e))]})]})]}),n(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:n(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>se((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(l?De(K,l):[]).filter(([,e])=>e.length>0).map(([e,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===Y?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===Y?i("sessionList.archives.noProject"):ie(e,l??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((a)=>n("article",{"aria-label":L(a),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(a),children:L(a)}),a.updatedAt!==null&&t("time",{dateTime:a.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(a.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([a])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(a),children:i("sessionList.archives.unarchive")})]})]},a.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:n(ge,{showCloseButton:!C,children:[n(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(ne?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),n(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),n(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{Ir};
|
package/dist/chunk-5k7rhfkh.js
DELETED
package/dist/chunk-5kv1p9nd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A}from"./chunk-kf9zjtr3.js";import{n}from"./chunk-2gwj90sw.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function zn({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=n(),t=l(!1);return r(A,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{t.current=e},onClick:()=>{p(!t.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{zn};
|
package/dist/chunk-7pv05p7j.js
DELETED
package/dist/chunk-7vpy078b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{R}from"./chunk-vsney1vb.js";import{xe}from"./chunk-1xz7zmz5.js";import{C,ee}from"./chunk-c3neqj3h.js";import{M,q}from"./chunk-njq7f390.js";import{ae,J}from"./chunk-hacpxv1k.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as k,DropdownMenuItem as O,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as Q,DropdownMenuTrigger as V}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Qn({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:x=n?"none":void 0,allowRemove:B=!0,submenu:g=!1,className:A,onOpenChange:T}){let{t}=C(),c=J(),H=ee(),P=xe(),{collections:s,order:w}=ae(),i=w.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[D,b]=d(!1),[m,h]=d(""),[r,v]=d(!1),I=(o)=>{if(G(o),P(o),T?.(o),!o)b(!1),h("")},p=(o)=>{v(!0),H(o.then(()=>{I(!1)}).finally(()=>v(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,N)=>{if(!o&&D&&N.reason==="trigger-hover"){N.cancel();return}I(o)},children:[e(V,{disabled:r,"data-hover-background":x,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(y,{variant:"ghost",size:"icon-sm",className:A,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(k,{children:e(_,{value:i??null,children:w.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===M?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:q(s[o],t)})]},o))})}),e(Q,{}),a(k,{children:[a(O,{disabled:r,closeOnClick:!1,onClick:()=>b(!0),children:[e(z,{}),t("collection.newCollection")]}),B&&i!==void 0&&a(O,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),D&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(W,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>h(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(y,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function nr({sessionId:l,allowRemove:f=!0}){let{t:n}=C();return e(Qn,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(R,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
|
|
2
|
-
export{Qn,nr};
|
package/dist/chunk-9pcbtreq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ke}from"./chunk-wgph2nb9.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 Ui({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:ke(t)}):null}function Bi({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Ui,{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(Bi,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{Ui,Bi,Qt};
|
package/dist/chunk-ambjth0x.js
DELETED
package/dist/chunk-bptqs82k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,s,en,o,p}from"./chunk-30tynyrt.js";import{R}from"./chunk-vsney1vb.js";import{be}from"./chunk-1xz7zmz5.js";import{ve}from"./chunk-jyg1gsqg.js";import{rt,ye}from"./chunk-xq196p3v.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as B,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function Rn({sessionRow:e,active:v,onSelect:m,onForked:S=m,onHoverCardOpenChange:c,actions:l}){let a=r(),{t:f,i18n:k}=a,h=s(),d=o((t)=>t.runStates[e.sessionId]),I=en(),u=()=>m(e);return n(be,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:u,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),u()},state:d?.state,interruption:d?.interruption??null,title:e.title??f("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:rt(e.updatedAt,k.language)}):void 0,actions:d!=null?n(ve,{title:f("sessionList.stop"),onStop:()=>p(a,h.stopSession(e.sessionId))}):void 0})}function E({sessionRow:e,onDelete:v,onForked:m,actions:S}){let c=r(),{t:l}=c,a=s(),f=o((i)=>F(i.agent)),k=o((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,d]=y(!1),[I,u]=y(!1),t=B(!1);return n(ye,{sessionRow:e,renaming:h,onRename:(i)=>{if(d(!1),i!==null)p(c,a.renameSession(e.sessionId,i))},actions:b(C,{children:[f&&n(R,{icon:n(H,{}),label:l("sessionList.rename"),onClick:()=>d(!0)}),S,e.archived?n(R,{icon:n(x,{}),label:l("sessionList.unarchive"),onClick:()=>void p(c,a.unarchive(e.sessionId))}):b(C,{children:[n(R,{icon:n(A,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,u(!0),p(c,a.fork(e.sessionId,e.cwd).then((i)=>{let g=a.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{t.current=!1,u(!1)}))}}),n(R,{icon:n(D,{}),label:l("sessionList.archive"),onClick:()=>void p(c,a.archive(e.sessionId))})]}),n(R,{variant:"destructive",icon:n(N,{}),label:l("sessionList.delete"),onClick:v})]})})}
|
|
2
|
-
export{Rn};
|
package/dist/chunk-by0ecrb5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{To}from"./chunk-p73qyyrt.js";import{fe,n,he,t,tt}from"./chunk-2gwj90sw.js";import{bo,Ve,gn,ko,So}from"./chunk-41t41g5h.js";import{Ge}from"./chunk-z2v008kc.js";import{oo}from"./chunk-rxpytgjq.js";import{eo}from"./chunk-wej76mmp.js";import{ao,so}from"./chunk-arzgbze4.js";import{co,uo}from"./chunk-w8d5b5ta.js";import{lo}from"./chunk-1qm96wyd.js";import{no}from"./chunk-505zj2bz.js";import{to}from"./chunk-etpnhtgg.js";import{codexExtensionCapabilities as ze,codexMessageError as qe,codexRetryNotice as Oe,codexTurnError as Fe,nativeTurnId as ve}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Ke}from"lucide-react";import{useCallback as M,useEffect as N,useLayoutEffect as Te,useMemo as Q,useRef as h,useState as U}from"react";import{flushSync as ye}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as E}from"react/jsx-runtime";var xe=24;function Ue(e){let d=Math.max(0,e.turnTopPx-xe),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function _e({viewportRef:e,viewportProps:d,children:g}){return o("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function We({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=he(),{t:b}=n(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return N(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((_)=>{if(_.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),o("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[o("p",{role:"alert",className:"text-destructive text-xs",children:s}),o(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[o("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),o("div",{className:"bg-muted h-3 w-4/5 rounded"}),o("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function $e(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:bo(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function Be(e){return o(fe,{host:e.host,client:e.client,children:o(De,{...e})})}function De({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=_e}){let v=he(),A=n(),T=t((r)=>r.historyNavigation[e.id]),c=$e(e,T?.turns),L=c.at(-1)?.key,be=ko(e,c),y=e.state==="running"||e.state==="requires_action",W=Q(()=>eo(c,T),[c,T]),Z=Q(()=>W.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[W]),we=Q(()=>S===void 0?[]:ao(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((r)=>r.items.some((a)=>a.id===b.afterItemId)):-1,D=h(c);D.current=c;let[l,Re]=U(null),x=t((r)=>r.historyPages[e.id]),k=t((r)=>r.connection==="ready"),Se=t((r)=>ze(r.agent).sessionRetry),te=x!==void 0;N(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[ke,Pe]=U(!1),O=h(null),[Ie,ne]=U(!1),re=h(0),j=h({key:L,running:y});j.current={key:L,running:y};let[ie,F]=U(0),I=h(0),H=h(null);I.current=ie;let He=M(()=>{if(H.current!==null)H.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:X,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=no(l,y,He),se=M(()=>{if(l===null||!y)return;let r=c.at(-1)?.key;if(r===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&j.current.running&&j.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Ue({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});H.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,ye(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(u())i()})},[ae,y,l,c]);Te(()=>{if(!w||y)return;ue(),H.current=null,I.current=0,F(0)},[w,ue,y]);let G=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);N(()=>{if(l===null)return;let r=()=>{let a=l.scrollTop<600;if(Pe(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)G()};return r(),l.addEventListener("scroll",r,{passive:!0}),()=>l.removeEventListener("scroll",r)},[k,x,C,G,l,e.restoring,T?.complete]),N(()=>{co({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),N(()=>()=>uo(e.id),[e.id]);let Ne=M(async(r,a)=>{let u=++re.current;ne(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,r.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let i=D.current.find((m)=>m.user?.id===(r.messageId??r.id))??D.current.find((m)=>m.user!==null&&r.nativeTurnId!==void 0&&m.items.some((P)=>ve(P)===r.nativeTurnId));if(!i?.user)return null;let p=i.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(i.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),Ee=M(async(r)=>{if(r.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,r.nativeTurnId)},[v,e.id]);N(()=>{if(l===null)return;let r=l.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=H.current,i=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,ye(()=>F(p)),p===0)H.current=null}if(p>0&&u.keepTop)i=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-xe}le(i)});if(a.observe(r),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),N(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);Te(()=>{if(l===null)return;let r=c.at(-1),a=ce.current;if(ce.current=r===void 0?null:{key:r.key,running:y},r===void 0||a===null||r.user===null||r.replayed)return;if(w){if(y&&e.turnEndedAt[r.user.id]===void 0&&(r.key!==a.key||!a.running))H.current=null,I.current=0,F(0),se()}else if(r.key!==a.key)X()},[se,w,y,X,l,e.turnEndedAt,c]);let Ae=(r,a)=>{let u=r,i=u.turn;if(i===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return o(We,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Ie})}let p=c.indexOf(i),f=i.key===be,m=So(e,c,p),P=!f&&m.continued,K=i.key===L,q=i.errors.at(-1),de=q===void 0?null:qe(q),J=q===void 0?null:ve(q),Le=!e.subagent&&K&&!f&&k&&Se&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&Fe(de).category==="overloaded"&&J!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(i)??null,pe=s?.(i)??null,Ce=pe!==null||i.work.length>0||i.final.length>0||i.errors.length>0||f||me!==null||Ve(i)||gn(i)||K&&(e.error!==null||e.lastStopReason==="cancelled"),ge=i.user===null?null:Ge(i);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(V===void 0?o(to,{item:i.user,messageTime:ge}):V(i.user,ge)),Ce&&o(oo,{sessionId:e.id,turn:i,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?Oe(e._meta)??void 0:void 0,retry:Le?{turnId:J,delaySeconds:lo(c),run:(Me)=>v.retrySession(e.id,J,Me)}:void 0,interrupted:gn(i)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(i),footer:me}),a===ee&&b?.node,g?.(i)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[o(_,{viewportRef:Re,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:o("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,o(To,{ref:O,entries:W,renderTurn:Ae,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:o("div",{className:"pt-3",children:d})}),w&&o("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),o("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),o("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&o("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:o(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),ke&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[o(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:G,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&o("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&o(so,{items:we,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:Ne,onPreviewItem:Ee,onRevealError:(r)=>tt(A,r),targetTopMarginPx:16},e.id),o("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:X,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"})]}):o(Ke,{})})]})}
|
|
2
|
-
export{Be};
|
package/dist/chunk-c3neqj3h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ji}from"./chunk-30tynyrt.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function ar({host:o,children:t}){return s(n,{value:o,children:t})}function C(){let o=i(n),e={...ji(),...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 Xn(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function ee(){let o=C();return(t)=>Xn(o,t)}function Jn(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{ar,C,Xn,ee,Jn};
|
package/dist/chunk-c9d65ta8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,i}from"./chunk-me85j3xg.js";import{O,U,oe,B,G,me}from"./chunk-zz3wm06f.js";import{pe}from"./chunk-tpppzcvp.js";import{x}from"./chunk-btrg3ywt.js";import{ue}from"./chunk-8q6wpmar.js";import{H,ce}from"./chunk-dwbc8r1m.js";import{CheckIcon as F,SparklesIcon as X,XIcon as _}from"lucide-react";import{useDeferredValue as J,useState as v}from"react";import{Button as y}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 ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:c}){let{assetUrl:m}=l(),[u,s]=v(!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 re({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 Mt({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!m,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=v(null),[k,L]=v(!1),[q,C]=v(null),b=J(c.trim().toLowerCase()),r=o.find((e)=>e.path===q),N=j.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(z).flatMap(([e,a])=>{if(!o.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],A=d.map((e)=>e.label);for(let e of d)if(e.path&&A.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===M)??d[0],D=g?p.filter((e)=>g.paths.has(e.path)):[],V=k||b?p:p.slice(0,6),w=(e)=>t(G,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(me,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(B,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(U,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(oe,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(O,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(F,{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(x,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${H} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(pe,{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?w(V):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(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>L((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")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(K,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(R,{showCloseButton:!1,className:ce,children:r&&n(S,{children:[t(ue,{path:r.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:r}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(re,{skill:r}),e,t(Q,{render:t(y,{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")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):r.pluginId]})]})})})]})}
|
|
2
|
-
export{Mt};
|
package/dist/chunk-cg8ekwka.js
DELETED
package/dist/chunk-cpcfd1a1.js
DELETED
package/dist/chunk-d499mw7g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function Ei({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function c(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function S(t){let{Markdown:o}=c();return e(o,{...t})}
|
|
2
|
-
export{Ei,c,S};
|
package/dist/chunk-d7evpw1z.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 vo(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,vo};
|
package/dist/chunk-etpnhtgg.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Xo}from"./chunk-btrhrh42.js";import{n}from"./chunk-2gwj90sw.js";import{mo,go}from"./chunk-j2zx58ja.js";import{W}from"./chunk-8qkhwpmk.js";import{te}from"./chunk-41t41g5h.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 to=p(function({item:t,messageTime:c}){let l=n(),o=go(t._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):te(t),a=t.content.filter(d),i=t.content.filter((e)=>f(e)||g(e)),u=o??t.content.filter(x).map((e)=>{let s=mo(e._meta);return s?{question:s.question,text:s.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":t.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,s)=>r(W,{block:e},`${t.id}:${s}`))}),r(Xo,{host:l,message:t,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
-
export{to};
|
package/dist/chunk-ewctpsb4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S}from"./chunk-d499mw7g.js";import{ne}from"./chunk-67vzyv97.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function io({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(S,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ne,{entries:t.entries})}
|
|
2
|
-
export{io};
|
package/dist/chunk-ff987rah.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,s,o,p}from"./chunk-30tynyrt.js";import{L}from"./chunk-pzsx1s8z.js";import{P,X,be}from"./chunk-1xz7zmz5.js";import{we,K,re}from"./chunk-yyzxpnm0.js";import{qi}from"./chunk-jqvp4gfc.js";import{ve}from"./chunk-jyg1gsqg.js";import{ye}from"./chunk-xq196p3v.js";import{ke}from"./chunk-wgph2nb9.js";import{Yt}from"./chunk-g6k07w9b.js";import{Gi}from"./chunk-x0dn6sdq.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as G,useMemo as C}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function zr({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=r(),{t:N}=h,m=o((t)=>t.runStates),v=o((t)=>t.drafts),u=o((t)=>t.sessionList),g=K((t)=>t.activityOrder),f=C(()=>g.flatMap((t)=>{let e=m[t];return e&&we({runStates:m,drafts:v},t)?[{sid:t,record:e,sessionRow:H(u,e)}]:[]}),[g,m,v,u]),b=C(()=>{let t=new Map;for(let e of f){let a=e.sid===i||l?.(e.sid)?"foreground":"background",S=t.get(a)??[];S.push(e),t.set(a,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,l]),y=K((t)=>t.activityCollapsedGroups),n=re(),x=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(w?.(t))return;d(t)},O=Gi();G(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!qi(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let a=Number(e.key);if(!Number.isInteger(a)||a<1||a>9)return;let S=x[a-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(T,{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:k?.(t.sid),actions:R?.(t.sessionRow),hint:e<9&&O?c(M,{children:ke(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(P,{children:b.map((t)=>t.key==="foreground"?c(P,{children:t.rows.map(A)},t.key):c(X,{open:!y.has(t.key),onOpenChange:(e)=>{let a=new Set(y);if(e)a.delete(t.key);else a.add(t.key);n({activityCollapsedGroups:a})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function T({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:m,hint:v}){let u=r(),g=s(),{t:f}=u,b=i.title??f("sessionList.untitled"),y=Yt(i.sessionId,d);return D(q,{children:[c(be,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(ye,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:b,preview:y,listeningPorts:R,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:h,hint:v,actions:c(ve,{title:f("sessionList.stop"),onStop:()=>p(u,g.stopSession(i.sessionId))})}),k.map((n)=>D("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(L,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
-
export{zr};
|
package/dist/chunk-h1z98eg8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{pi}from"./chunk-j6svz91p.js";import{t}from"./chunk-2gwj90sw.js";import{e,f}from"./chunk-e6r2sx79.js";import{z,g,V}from"./chunk-36han2kw.js";import{isBooleanOption as A,isGroupedSelect as Z,isSelectOption as D}from"@nyssance/codex-acp-v2/client";import{Zap as F}from"lucide-react";import{memo as H,useRef as J}from"react";import{jsx as G}from"react/jsx-runtime";function K({sessionId:l,options:p,disabled:I,onModelChange:b,onConfigChange:O,defaultGroup:x={id:"models",name:"Models"},catalog:L=(c)=>c,headerAction:N}){let{host:c,client:P}=e(),{t:i}=c,k=t((o)=>Boolean(o.configPending[l])),M=J({sessionId:l,model:!0}),v=k&&(M.current.sessionId!==l||M.current.model),R=t((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),n=g(p,"model"),a=g(p,"thought_level"),_=p.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==n&&o!==a)),S=_.filter(D),m=_.filter(A);if(!n&&!a&&S.length===0&&m.length===0)return null;let u=(o,r)=>{if(r===o.currentValue)return Promise.resolve();M.current={sessionId:l,model:o===n};let d=O?O(o.configId,r):P.setConfig(l,o.configId,r);return f(c,d),d},h=a?z(a):[],E=h.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),U=n?V(n):i("composer.model"),y=(o)=>({api_id:o.value,label:o.name}),w=L(n&&Z(n.options)?n.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(y)})):[{...x,models:n?z(n).map(y):[]}]),B=w.flatMap((o)=>o.models),C=B.find((o)=>o.api_id===n?.currentValue)??{api_id:n?.currentValue??"",label:U},s=m.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return G(pi,{disabled:I||v||R,switching:v,value:{...C,label:C.shortLabel??C.label},compactCatalog:!0,models:B,showModelList:Boolean(n),onChange:(o)=>{if(o.api_id===n?.currentValue)return;if(b)b(o.api_id);else if(n)u(n,o.api_id)},header:{name:n?.name??i("composer.model"),action:N},modelGroups:w,t:i,effortConfig:a&&h.length>0?{name:"Effort",value:a.currentValue,levels:h,sizer:E,onChange:(o)=>u(a,o)}:void 0,selectOptions:S.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:z(o).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>u(o,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:G(F,{className:"size-4","aria-hidden":"true"})},...m.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:m.find((q)=>q.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);u(d,r)}})}var ft=H(K);
|
|
2
|
-
export{ft};
|
package/dist/chunk-h51hfb0t.js
DELETED
package/dist/chunk-jfa9vg5s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-2gwj90sw.js";import{codexTurnError as C}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as k,useRef as u,useState as a}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as f}from"react/jsx-runtime";function Pt({children:i}){return f("div",{className:"codex-error-message",role:"alert",children:[t(R,{"aria-hidden":"true"}),t("div",{className:"min-w-0 flex-1",children:i})]})}function ln({error:i,retry:e}){let{t:p,renderTurnError:N}=n(),c=C(i),[l]=a(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[v,y]=a(e?.delaySeconds??null),[h,E]=a(!1),[g,x]=a(null),o=u(!1),w=u(!1),S=u(e?.run);S.current=e?.run;let T=u((b)=>{let s=S.current;if(o.current||s===void 0)return;o.current=!0,E(!0),x(null),s(b).catch((r)=>{w.current=!0,o.current=!1,y(null),E(!1),x(r instanceof Error?r.message:String(r))})}),d=N?.(c.message),m=d===void 0&&e!==void 0&&c.retryable;if(k(()=>{if(!m||l===null)return;let s=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(y(r),r===0)T.current("automatic")},1000);return()=>clearInterval(s)},[l,m]),d!==void 0)return t(Pt,{children:d});return f(Pt,{children:[f("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),m&&t(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>T.current("manual"),children:v===null?p("timeline.retry"):p("timeline.retryCountdown",{seconds:v})})]}),g!==null&&t("div",{className:"text-muted-foreground mt-2 text-sm",children:g})]})}
|
|
2
|
-
export{Pt,ln};
|
package/dist/chunk-jqvp4gfc.js
DELETED
package/dist/chunk-me85j3xg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Rt}from"./chunk-yr5y9dp6.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Ae(e){let t=r.get(e);if(!t)t=Rt(e),r.set(e,t);return t}function fr({host:e,client:t,children:n}){let s=Ae(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Ee(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Ye(e){let t=Ee();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ae(Ee());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Le(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Ae,fr,l,Ee,Ye,i,Le};
|
package/dist/chunk-nthrcswc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function oa(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function li(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(oa(t,o))}return{imageFiles:n,sawNonImageFile:i}}function ci(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function ia(e){return e.replace(s,"")}function pr(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function It(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=ia(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-pr(n,i)),r=Math.max(0,o-pr(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{oa,li,ci,ia,pr,It};
|
package/dist/chunk-rdx8hc3g.js
DELETED
package/dist/chunk-rxpytgjq.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{xn,bn}from"./chunk-2n86qe6v.js";import{w}from"./chunk-h2sk8xmm.js";import{Ze}from"./chunk-7pv05p7j.js";import{pn}from"./chunk-x9eeb7ns.js";import{n}from"./chunk-2gwj90sw.js";import{xo,te,Ve,Co}from"./chunk-41t41g5h.js";import{un}from"./chunk-n25773ea.js";import{se}from"./chunk-ngmgp7a4.js";import{sn}from"./chunk-3rvvac37.js";import{_o}from"./chunk-fnhcyga2.js";import{io}from"./chunk-ewctpsb4.js";import{ro}from"./chunk-wrfxjyt2.js";import{Pt,ln}from"./chunk-jfa9vg5s.js";import{Ge}from"./chunk-z2v008kc.js";import{codexMessageError as U,codexTurnError as q,isContentEntry as de,isEmbeddedResource as Z,isImage as ee,isResourceLink as ce,isText as ue,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as pe,SparklesIcon as fe}from"lucide-react";import{Fragment as X,memo as ye,useEffect as he,useState as ke}from"react";import{jsx as i,jsxs as l,Fragment as A}from"react/jsx-runtime";function Y(s){if(ee(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(Z(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function xe({item:s}){let{t}=n(),m=s.status==="in_progress",[o,u]=ke(()=>Date.now()-s.at>=1e4);return he(()=>{if(!m)return;let a=Math.max(0,s.at+1e4-Date.now());if(u(a===0),a===0)return;let y=setTimeout(()=>u(!0),a);return()=>clearTimeout(y)},[s.id,s.at,m]),l("div",{className:"codex-context-compaction",children:[i(fe,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?t("stream.codex.contextCompacted"):s.status==="cancelled"?t("timeline.interrupted"):t(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:s,entry:t,terminals:m,streaming:o,streamingThoughtId:u}){let{t:a}=n();switch(t.kind){case"activity":return i(un,{sessionId:s,items:t.items,terminals:m,streamingThoughtId:u});case"text":return w(t.item._meta).length>0?i(sn,{sessionId:s,item:t.item}):i(se,{content:t.item.content,messageId:t.item.id,streaming:o});case"plan":return i(io,{plan:t.item.plan});case"compaction":if(t.item.status==="failed")return l(Pt,{children:[i("div",{children:a("timeline.compactionFailed")}),t.item.error!==null&&i("div",{children:t.item.error})]});return i(xe,{item:t.item})}}function Te({sessionId:s,turn:t,terminals:m,active:o,blocked:u=!1,continued:a=!1,edits:y=t.edits,activityItems:F=t.items,workStartedAt:ne=t.startedAt,isLast:L,error:h,interrupted:O,retry:P,retrying:p,extraWork:d=null,answerActions:D,footer:ie}){let{t:c}=n(),b=t.errors.map((e)=>{let r=U(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let E=P?.turnId===ge(e)?P:void 0;return i(ln,{error:r,retry:E},`${e.id}:${E?.delaySeconds??"manual"}`)});if(L&&h!==null&&!t.errors.some((e)=>{let r=U(e);return r!==null&&r.stopReason===h.stopReason&&q(r).message===q(h).message}))b.push(i(ln,{error:h},"current-run-error"));let k=b.length>0?i("div",{className:"codex-turn-errors",children:b}):null,C=t.items.filter(pn);if(d===null&&C.length>0&&C.length===t.items.length)return l(A,{children:[i(un,{sessionId:s,items:C,terminals:m,streamingThoughtId:null}),k]});let x=t.work,T=x.length>0&&x.every((e)=>e.kind==="compaction");if(d===null&&(xo(t)||T&&t.final.length===0))return l(A,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:t.work.map((e)=>i(N,{sessionId:s,entry:e,terminals:m,streaming:!1,streamingThoughtId:null},e.key))}),k]});let W=Ve(t),B=t.final.filter((e)=>w(e._meta).length===0).map(te).join(`
|
|
2
|
-
`),I=o?null:Ge(t,"assistant"),G=t.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="alwith_client_generate_image")&&(e.status==="pending"||e.status==="in_progress")),H=new Set(t.final.flatMap((e)=>e.content.map(Y).filter((r)=>r!==null))),R=t.items.flatMap((e)=>{if(!Ze(e))return[];return e.content.filter(de).flatMap((r,E)=>{let g=r.content,le=ee(g),me=ce(g)||Z(g)&&"blob"in g.resource;if(!le&&!me)return[];let M=Y(g);if(M!==null){if(H.has(M))return[];H.add(M)}return[{key:`${e.id}:${E}`,block:g}]})}),K=t.final.some((e)=>w(e._meta).length===0&&e.content.some((r)=>!ue(r)||r.text.trim().length>0)),re=G.length>0||R.length>0||T||K||t.final.some((e)=>w(e._meta).length>0),v=t.items.findIndex((e)=>t.final.includes(e)),_=(e)=>t.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=x.filter((e)=>v===-1||_(e)<v),oe=x.filter((e)=>v!==-1&&_(e)>v),ae=[...t.final.map((e)=>({kind:"answer",item:e,index:t.items.indexOf(e)})),...oe.map((e)=>({kind:"work",entry:e,index:_(e)}))].toSorted((e,r)=>e.index-r.index),V=!o&&!a&&(B.trim().length>0?i(xn,{text:B,isMostRecentTurn:L,time:I,afterCopy:D}):l("div",{className:"flex items-center gap-0.5",children:[D,I&&i("span",{className:"codex-user-time ms-1",title:I.full,children:I.short})]})),f=ro({...t,items:F},{running:o,blocked:u,retrying:p!==void 0}),j=f.kind==="reasoning"?f.ownerKey??null:null,z=f.kind==="thinking",S=Co({...t,items:F}),J=o&&!K||d?.active===!0;return l(A,{children:[i(bn,{stateKey:JSON.stringify([s,t.replayed?"history":"live",t.key]),active:J,defaultExpanded:J||d?.defaultExpanded===!0||!t.replayed&&(O||W),...S,durationMs:d?.active?void 0:S.durationMs,startedAt:S.startedAt??ne,loading:(z||f.kind==="working")&&t.work.length===0&&d===null,loadingLabel:f.kind==="working"?c("stream.codex.working"):void 0,work:[...a||T?[]:Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:m,streaming:o,streamingThoughtId:j},e.key)),...d===null?[]:[i(X,{children:d.content},"additional-work")]],answer:re||a?l("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:m,streaming:!1,streamingThoughtId:null},e.key)),ae.map((e)=>{if(e.kind==="work")return i(N,{sessionId:s,entry:e.entry,terminals:m,streaming:o,streamingThoughtId:j},e.entry.key);let r=e.item;return l(X,{children:[w(r._meta).length>0?i(sn,{sessionId:s,item:r}):i(se,{content:r.content,messageId:r.id,streaming:o}),r===t.final.at(-1)&&V]},r.id)}),G.map((e)=>l("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),l("span",{className:"codex-image-generation-status",children:[o&&i(pe,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),!o&&c("timeline.imageStopped")]})]},e.id)),R.length>0&&i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:R.map((e)=>i(se,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),t.final.length===0&&V]}):null,footer:l(A,{children:[z&&t.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:c("message.thinking")})}),ie,y.length>0&&!o&&!a&&i(_o,{items:y}),O&&!W&&i("div",{className:"codex-interrupted-turn",role:"status",children:c("timeline.interrupted")}),!o&&k]})}),o&&p!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&k]})}var oo=ye(Te);
|
|
3
|
-
export{oo};
|
package/dist/chunk-smwn4wrd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var yr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Ni(e){return[...e].toSorted((o,n)=>(yr[o.kind]??99)-(yr[n.kind]??99))}function _a(e){return e==="allow_once"||e==="allow_always"}function Pa(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{yr,Ni,_a,Pa};
|
package/dist/chunk-t67m7g8q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-cpcfd1a1.js";import{r}from"./chunk-30tynyrt.js";import{m,u}from"./chunk-1xz7zmz5.js";import{it}from"./chunk-jxcvqmrk.js";import{cn as s}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as g,DropdownMenuItem as f,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as L}from"react/jsx-runtime";function Or({onCollapseAll:i}){let{t:n}=r();return L(c,{children:[o(w,{render:o(it,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(g,{align:"end",className:"w-52",children:o(f,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Ur({screen:i,onSwitch:n}){let{t:e}=r(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(u,{className:s(d,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(m,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
|
-
export{Or,Ur};
|
package/dist/chunk-w30rf96r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,o}from"./chunk-30tynyrt.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function Dr(c){let e=s(),n=o((t)=>t.projectContext),u=c===null?m:n?a(n,{cwd:e.projectPath(c)}).id:null,d=o((t)=>t.sessionList),l=o((t)=>t.connection),i=o((t)=>t.sessionListLoaded),r=o((t)=>t.sessionListError),f=()=>e.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&r===null)e.listSessions().catch(()=>{return})},[e,l,i,r]),{result:L(()=>{if(i&&n)return{status:"ready",sessionRows:d.filter((t)=>a(n,{...t,cwd:e.projectPath(t.cwd)}).id===u).toSorted((t,p)=>(p.updatedAt??"").localeCompare(t.updatedAt??""))};if(r!==null)return{status:"failed",error:r};return{status:"loading"}},[e,d,i,r,u,n]),retry:f}}
|
|
2
|
-
export{Dr};
|
package/dist/chunk-xq196p3v.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r}from"./chunk-30tynyrt.js";import{Jt}from"./chunk-vsney1vb.js";import{N}from"./chunk-0t3g2phv.js";import{Xt,xe}from"./chunk-1xz7zmz5.js";import{formatDistanceToNowStrict as H}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as A}from"lucide-react";import{useEffect as S,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as C,Fragment as O}from"react/jsx-runtime";var h={en:L,"zh-CN":z};function rt(t,a){let i=a==="zh-CN"?h["zh-CN"]:h.en;return H(new Date(t),{locale:i})}function ye({sessionRow:t,actions:a,shortcut:i,renaming:n=!1,onRename:m}){let{t:s,i18n:y,PathAction:u}=r(),f=xe(),I=Xt();S(()=>{f(n)},[n,f]);let[x,p]=D(t.title??"");S(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},v=t.archived?s("sessionList.archived"):t.updatedAt!==null?rt(t.updatedAt,y.language):null,g=[];if(v!==null)g.push({icon:o(E,{className:"size-3.5"}),text:v});let l=u&&o(u,{cwd:t.cwd,onOpened:I});return o(Jt,{title:n?o(w,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":s("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):C("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(N,{className:"min-w-0 flex-1",children:t.title??s("sessionList.untitled")})}),i]}),titleIcon:o(A,{className:"size-3.5"}),details:g,actions:l||a!==void 0?C(O,{children:[l,l&&a!==void 0&&o(M,{}),a]}):void 0})}
|
|
2
|
-
export{rt,ye};
|
package/dist/chunk-xqe0qa9f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-30tynyrt.js";import{we,K,re}from"./chunk-yyzxpnm0.js";import{useEffect as S,useMemo as f}from"react";function Hr(s){let c=K((i)=>i.activityOrder),a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&we(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=K((i)=>i.activitySeen),r=re();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
|
-
export{Hr};
|
package/dist/chunk-y4ewhx9t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as g,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),Pn=d(null);function wa(){return i(Pn)}var Tn=d(null);function ka(){return i(Tn)}var $e=d(null);function Ke(){let r=i(F);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var qe=()=>i(F);function Sa(){let r=i($e);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i($e);function ui({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:A,attachmentPolicy:f,value:R,onValueChange:y,attachments:U,onAttachmentsChange:L,children:B}){let S=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),T=R!==void 0,[G,J]=z(r),p=R??G,o=g({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let W=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,T)y?.(t);else J(t)},[T,y]),h=n(()=>P(""),[P]),x=U!==void 0,[K,N]=z([]),v=U??K,b=g(v);b.current=v;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(x)L?.(e);else N(e)},[x,L]),j=g(null),w=g(()=>{}),O=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let _=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:S(u),filename:u.name,size:u.size,lastModified:u.lastModified,..._===void 0?{}:{sourcePath:_}}})]})},[f,S,s]),M=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),A?.()},[A,s]),E=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(x)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let k=n(()=>{w.current?.()},[]),C=q(()=>({files:v,add:O,remove:M,clear:E,openFileDialog:k,fileInputRef:j}),[v,O,M,E,k]),H=n((t,e)=>{j.current=t.current,w.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:P,clear:h,getRevision:W,clearSubmitted:c??h},attachments:C,__registerFileInput:H}),[p,P,h,W,c,C,H]);return D(F.Provider,{value:Q,children:D($e.Provider,{value:C,children:B})})}var In=d(null);function I(){let r=X(),l=i(In),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
-
export{Pn,wa,Tn,ka,$e,Ke,qe,Sa,ui,In,I};
|
package/dist/chunk-ydqnz0pb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a=new Map,i=new Map,f=new Map;function Kn(t,r){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,r),()=>{if(i.get(t)===r)i.delete(t)}}function F(t,r){let n=a.get(t);if(!n)return;let e=r(n.attachments);a.set(t,{...n,attachments:e}),i.get(t)?.(e)}function wt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function Ji(t){for(;;){let e=a.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=a.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function er(t,r){if(r===null)a.delete(t);else a.set(t,r)}var s=new Map;function kt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function tr(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=a.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),a.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
|
|
2
|
-
export{a,Kn,F,wt,Ji,er,kt,tr};
|
package/dist/chunk-yxtr7x25.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as f,useState as r}from"react";var t=new Map;function h(o,e,a=!1){let[p,S]=r(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
|
|
2
|
-
export{h};
|
package/dist/chunk-yyzxpnm0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s}from"./chunk-30tynyrt.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function we(t,n){let e=t.runStates[n];return e!==void 0&&(!e.reusableDraft||t.drafts[n]!==void 0)}function d(t,n,e){let a=t.filter((o)=>we(e,o)),S=new Set(a),c=e.runStates!==n.runStates&&l(e.runStates)==="event";for(let[o,i]of Object.entries(e.runStates)){if(S.has(o)||!we(e,o))continue;let r=n.runStates[o],g=!r||i.state!==r.state||i.since!==r.since||i.lastActivityAt!==r.lastActivityAt||i.interruption!==r.interruption;if(i.reusableDraft&&e.drafts[o]!==void 0||c&&g&&(!r||i.state!=="idle")&&i.interruption!=="runtime restarted")a.push(o)}return a.length===t.length&&a.every((o,i)=>o===t[i])?t:a}var u=new WeakMap;function v(t){return{view:"sessions",activityOrder:d([],t.state,t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function Fn(t){let n=u.get(t);if(n)return n;let e=v(t),a=new Set,S=(i)=>{e={...e,...i};for(let r of a)r()},c=t.state;t.store.subscribe(()=>{let i=t.store.getState(),r=d(e.activityOrder,c,i);if(c=i,r!==e.activityOrder)S({activityOrder:r})});let o={get:()=>e,set:S,subscribe:(i)=>(a.add(i),()=>a.delete(i))};return u.set(t,o),o}function Vr(t){u.get(t)?.set(v(t))}function K(t){let n=Fn(s());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function re(){return Fn(s()).set}function jr(){let t=K((e)=>e.view),n=re();return[t,(e)=>n({view:e})]}
|
|
2
|
-
export{we,Fn,Vr,K,re,jr};
|
package/dist/chunk-z3xg96j6.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-cpcfd1a1.js";import{P,u}from"./chunk-1xz7zmz5.js";import{Nt}from"./chunk-ws07yjfe.js";import{Ae,l,Ee,Ye,i}from"./chunk-me85j3xg.js";import{O,U,oe,B,G,me,Lt}from"./chunk-zz3wm06f.js";import{pe}from"./chunk-tpppzcvp.js";import{We}from"./chunk-82xjggwn.js";import{x}from"./chunk-btrg3ywt.js";import{Et,E}from"./chunk-6vtcbh85.js";import{H,de}from"./chunk-dwbc8r1m.js";import{At}from"./chunk-rh5zgmh5.js";import{Mt}from"./chunk-c9d65ta8.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as ne,CircleArrowUpIcon as se,MoreVerticalIcon as ie,PlusIcon as F,PuzzleIcon as le,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as ue,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Se}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as z}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 De({plugin:t,marketplace:c}){let{t:p}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ne,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?p("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:c}).catch(()=>{}),children:g?e(z,{"aria-hidden":"true"}):e(F,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Me({plugin:t,marketplace:c,actions:p,onOpen:g}){let a=X(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(me,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:c})}),e(B,{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(E,{name:t.name})})}),s(U,{className:"pointer-events-none relative min-w-0",children:[e(Lt,{className:"mb-0.5",children:T(t)}),e(oe,{className:"line-clamp-1",title:a,children:a||c.interface?.displayName||c.name}),r&&e(oe,{"data-toolbox-metadata":"",children:r})]}),e(O,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function J(){return Ye((t)=>t.connection==="ready"&&ee(t.agent))}var D=48;function ze({marketplace:t,plugins:c,onOpen:p}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(c.length/D)-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(Pe,{children:[e(Ie,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(ie,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(ue,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(G,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:c.slice(r*D,(r+1)*D).map((n)=>e(Me,{onOpen:p,plugin:n,marketplace:t,actions:e(De,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),c.length>D&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(c.length/D)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*D>=c.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Oe=fe(function({query:c,onOpen:p}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),X(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:h})=>({marketplace:v,plugins:h.filter(({plugin:y,text:b})=>c===""?v.path!==null||n.has(y.id):b.includes(c)).map(({plugin:y})=>y)}))},[m,f,c]);return s(Z,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},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:g("plugins.empty")})]})});function Be(){let{t}=l(),c=J(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,h]=I(!1),[y,b]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),b(null);try{await p({source:N}),m(""),h(!1)}catch(S){b(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(z,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)h(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c}),children:[e(F,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(Se,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(z,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Te({onOpen:t,query:c}){let p=J(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(c.trim().toLowerCase());return e(x,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${H} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(pe,{}):e(Oe,{query:f,onOpen:t})]})})}function mr({cwd:t,active:c,extensions:p,onOpenCatalog:g}){let{t:a}=l(),f=Ee(),m=Ae(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[h,y]=I("plugins"),[b,A]=I({plugins:"",skills:""}),N=h==="skills"?b.skills:b.plugins,S=(o)=>A((M)=>({...M,[h]:o})),Y=Ye((o)=>JSON.stringify([...new Set(o.sessionList.map((M)=>We(M.cwd,o.projectContext)).filter((M)=>M!==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"),[w,V]=I(null),C=J();K(()=>{if(!c||!C)return;if(m.getState().loadedScope!==L)r(JSON.parse(L))},[c,C,r,L,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),y("plugins"),V(o)},_=(o)=>{g?.(),y(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(Et,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(u,{className:`${d} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(u,{className:`${d} h-8 gap-2 px-2`,active:!p?.active&&h===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(le,{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(x,{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(P,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(z,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(u,{title:T(o.plugin),className:`${d} gap-2 px-2`,active:!p?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(E,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Z,{children:[w&&e(At,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(de,{children:e(Nt,{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:N,onChange:(o)=>S(o.target.value),placeholder:q}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ge,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(z,{}):e(re,{})}),h==="plugins"&&e(Be,{})]})})}),(h==="plugins"||v)&&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")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Te,{query:b.plugins,onOpen:j})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Mt,{query:b.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
-
export{mr};
|
package/dist/chunk-z8bbv8qd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-cpcfd1a1.js";import{s,o}from"./chunk-30tynyrt.js";import{P,m,u,X}from"./chunk-1xz7zmz5.js";import{C,ee,Jn}from"./chunk-c3neqj3h.js";import{Ue}from"./chunk-qdh9z547.js";import{M,q}from"./chunk-njq7f390.js";import{ae,J}from"./chunk-hacpxv1k.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as Y,useSensors as De}from"@dnd-kit/core";import{SortableContext as Z,sortableKeyboardCoordinates as we,useSortable as ce,verticalListSortingStrategy as oe}from"@dnd-kit/sortable";import{CSS as de}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as me,StarIcon as be,Trash2Icon as pe}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as te,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as z,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:S,children:x}){let{attributes:N,listeners:I,setNodeRef:i,transform:g,transition:f,isDragging:E}=ce({id:JSON.stringify([l,S]),data:{type:"session",collectionId:l,sessionId:S}});return e("div",{ref:i,style:{transform:de.Transform.toString(g),transition:f},className:F("w-full min-w-0",E&&"opacity-50"),...N,...I,role:"group",children:x})}function Be({collection:l,children:S,onEdit:x,onConfirm:N,onNewChat:I}){let{t:i}=C(),g=J(),f=ee(),{attributes:E,listeners:p,setNodeRef:h,transform:T,transition:B,isDragging:K}=ce({id:l.id,disabled:{draggable:l.id===M,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:de.Transform.toString(T),transition:B},className:F("w-full min-w-0",K&&"opacity-50"),children:e(X,{open:!l.collapsed,onOpenChange:(c)=>f(g({type:"collapse",id:l.id,collapsed:!c})),label:q(l,i),count:l.sessionIds.length,leading:l.id===M?e(be,{className:"size-3.5"}):e(Ue,{emoji:l.emoji,onChange:(c)=>f(g({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...E,...p,role:"group",children:c}),actions:a(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(v,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:q(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:a(Le,{children:[l.id!==M&&a(z,{onClick:x,children:[e(he,{}),i("collection.rename")]}),a(z,{onClick:I,children:[e(me,{}),i("collection.newChat")]}),a(z,{onClick:()=>N("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==M&&a(z,{variant:"destructive",onClick:()=>N("delete"),children:[e(pe,{}),i("collection.deleteCollection")]})]})})]}),children:S})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function or({renderRow:l,onSelect:S,onNewChat:x,Scroll:N=He}){let I=C(),{t:i}=I,g=J(),f=ee(),E=s(),{collections:p,order:h}=ae(),T=o((t)=>t.sessionList),B=o((t)=>t.archivedSessions),K=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...B,...T].map((t)=>[t.sessionId,t])),[B,T]),_=I.isMac??Jn(),[D,k]=R(null),[L,O]=R(""),[A,j]=R(""),[w,H]=R(null),[y,Q]=R(!1),ue=De(Y(Se,{activationConstraint:{distance:5}}),Y(ye,{coordinateGetter:we})),G=h.flatMap((t)=>p[t].collapsed?[]:p[t].sessionIds.flatMap((n)=>{let r=U.get(n);return r&&!r.archived?[r]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(_?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(n.key)-1;if(!Number.isInteger(r)||r<0||r>8||!G[r])return;n.preventDefault(),S(G[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[G,_,S]);let ge=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,b=n.data.current;if(r?.type==="session"&&b!==void 0){let W=b.type==="session"?String(b.collectionId):String(n.id);f(g({type:"move",sourceCollectionId:String(r.collectionId),collectionId:W,sessionId:String(r.sessionId),index:b.type==="session"?p[W].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(n.id)!==M)f(g({type:"reorder",id:String(t.id),index:h.indexOf(String(n.id))}))},V=(t,n)=>{Q(!0),f(t.then(n).finally(()=>Q(!1)))};return a(ze,{children:[e(N,{children:a(P,{children:[a(u,{className:F(d,"font-normal"),onClick:()=>{k("new"),O(""),j("")},children:[e(m,{children:e(me,{})}),e("span",{children:i("collection.newCollection")})]}),c&&a("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(v,{variant:"ghost",onClick:()=>f(E.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:ue,collisionDetection:fe,onDragEnd:ge,children:e(Z,{items:h,strategy:oe,children:e(P,{children:h.map((t)=>e(Be,{collection:p[t],onNewChat:()=>x(t),onEdit:()=>{k(t),O(p[t].name),j(p[t].emoji??"")},onConfirm:(n)=>H({id:t,type:n}),children:e(Z,{items:p[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:oe,children:p[t].sessionIds.map((n)=>{let r=U.get(n);if(r?.archived)return null;if(!r)return K?a("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(m,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(v,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>f(g({type:"remove",sessionId:n,collectionId:t})),children:e(pe,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(te,{open:D!==null,onOpenChange:(t)=>{if(!t&&!y)k(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(D==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),a("form",{onSubmit:(t)=>{if(t.preventDefault(),D===null||!L.trim()||y)return;let n=D==="new"?`collection-${crypto.randomUUID()}`:D;V(g([D==="new"?{type:"create",id:n,name:L}:{type:"rename",id:n,name:L},{type:"emoji",id:n,emoji:A}]),()=>k(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(t)=>O(t.target.value),disabled:y}),D!=="new"&&e(Ue,{emoji:A,onChange:j}),a(le,{children:[e(v,{type:"button",variant:"outline",disabled:y,onClick:()=>k(null),children:i("collection.cancel")}),e(v,{type:"submit",disabled:y||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(te,{open:w!==null,onOpenChange:(t)=>{if(!t&&!y)H(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(w?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:w===null?"":q(p[w.id],i)})})]}),a(le,{children:[e(v,{variant:"outline",disabled:y,onClick:()=>H(null),children:i("collection.cancel")}),e(v,{disabled:y,onClick:()=>{if(w!==null)V(g({type:w.type,id:w.id}),()=>H(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{or};
|
package/dist/chunk-zd2c750t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Zn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function rn(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Pe(t){return t.type==="array"}function St(t){return(Pe(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{Zn,rn,Pe,St};
|
package/dist/chunk-zz3wm06f.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ce}from"./chunk-cpcfd1a1.js";import{N}from"./chunk-0t3g2phv.js";import{cn as n}from"cn";import{Item as i,ItemActions as O,ItemContent as U,ItemDescription as oe,ItemMedia as B,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function G({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function me({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Ce,"data-[active=true]:font-medium",e),...r})}function Lt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(N,{children:t})})}export{O,U,oe,B,G,me,Lt};
|