@alwith/module-chat 0.5.19 → 0.5.20
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 +240 -1
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/assets/catalogs/alwith/models.json +72 -0
- package/assets/catalogs/custom/models.json +604 -0
- package/assets/catalogs/custom/sources.json +168 -0
- package/assets/catalogs/deepseek/models.json +139 -0
- package/assets/catalogs/openrouter/models.json +231 -0
- package/assets/catalogs/qwen/models.json +253 -0
- package/assets/catalogs/xai/models.json +129 -0
- package/assets/provider-catalog.json +127 -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-0643swd4.js +2 -0
- package/dist/chunk-06zh85wp.js +3 -0
- package/dist/chunk-0p6y2t9b.js +2 -0
- package/dist/{chunk-tzyc5myt.js → chunk-0wa9yjg3.js} +2 -2
- package/dist/chunk-0whxm2f0.js +2 -0
- package/dist/chunk-11484wvv.js +2 -0
- package/dist/{chunk-5n4mefej.js → chunk-1fggcrvs.js} +2 -2
- package/dist/chunk-1k21j77z.js +2 -0
- package/dist/chunk-1k697ncv.js +2 -0
- package/dist/chunk-1mn2t6ga.js +2 -0
- package/dist/chunk-1qyxrh0n.js +3 -0
- package/dist/chunk-1r25anvg.js +2 -0
- package/dist/chunk-1rg3nab3.js +2 -0
- package/dist/chunk-20k9syde.js +1 -0
- package/dist/chunk-28f3zv6v.js +2 -0
- package/dist/{chunk-h3antqdd.js → chunk-2f9vjmxz.js} +2 -2
- package/dist/{chunk-k9mbpf0g.js → chunk-2t9j90mw.js} +2 -2
- package/dist/{chunk-2hk04fh3.js → chunk-36m8zstj.js} +2 -2
- package/dist/chunk-3gk86w24.js +2 -0
- package/dist/chunk-3ka3bt0t.js +2 -0
- package/dist/{chunk-210b2kk6.js → chunk-3s94ekrs.js} +2 -2
- package/dist/chunk-3vsc49pt.js +2 -0
- package/dist/{chunk-9ej4c7a8.js → chunk-3yxjh7b1.js} +2 -2
- package/dist/{chunk-dj4e0q7k.js → chunk-42atrgm1.js} +2 -2
- package/dist/{chunk-fgzq0ktw.js → chunk-48fj5m0p.js} +2 -2
- package/dist/{chunk-jx1cngyb.js → chunk-4bb6dzzs.js} +2 -2
- package/dist/chunk-4d853988.js +2 -0
- package/dist/chunk-4gyd9hx9.js +2 -0
- package/dist/chunk-4p6svs37.js +2 -0
- package/dist/chunk-4ygyb91q.js +2 -0
- package/dist/{chunk-ekd97p2x.js → chunk-581e33tz.js} +2 -2
- package/dist/{chunk-m2hpfdch.js → chunk-5a6xc345.js} +2 -2
- package/dist/chunk-5ap6fvrp.js +2 -0
- package/dist/chunk-5m7vc4s6.js +2 -0
- package/dist/{chunk-yjhypkmc.js → chunk-615a0yhh.js} +2 -2
- package/dist/chunk-62jm1gct.js +2 -0
- package/dist/{chunk-6p41wmgs.js → chunk-667z0pac.js} +2 -2
- package/dist/chunk-6syhjege.js +2 -0
- package/dist/{chunk-jt8h82c2.js → chunk-6t5war9h.js} +2 -2
- package/dist/{chunk-4xhvh2dn.js → chunk-7z4gtfkd.js} +2 -2
- package/dist/{chunk-f8wzz84b.js → chunk-855w49k0.js} +2 -2
- package/dist/chunk-8akwfgkq.js +2 -0
- package/dist/chunk-8c8ncw1m.js +2 -0
- package/dist/chunk-8mgypdap.js +2 -0
- package/dist/chunk-95mynf7q.js +1289 -0
- package/dist/chunk-9jp5t3qq.js +5 -0
- package/dist/chunk-9mky3b7v.js +2 -0
- package/dist/chunk-a63k8tht.js +2 -0
- package/dist/chunk-acb8t4jt.js +2 -0
- package/dist/chunk-adk7aeyt.js +2 -0
- package/dist/{chunk-0vy6cqmw.js → chunk-agqnt7xq.js} +2 -2
- package/dist/chunk-annzfgfq.js +4 -0
- package/dist/{chunk-9ebnn34t.js → chunk-azfmr99x.js} +2 -2
- package/dist/chunk-b12v22de.js +2 -0
- package/dist/{chunk-fcy4sv9f.js → chunk-b18zr059.js} +2 -2
- package/dist/chunk-bbyscgdd.js +2 -0
- package/dist/chunk-bfhfbrzt.js +2 -0
- package/dist/{chunk-jc52024g.js → chunk-bg03czcx.js} +2 -2
- package/dist/chunk-bvgqsaey.js +2 -0
- package/dist/chunk-c32z3wjq.js +2 -0
- package/dist/{chunk-ww223tm5.js → chunk-ckyat78p.js} +2 -2
- package/dist/chunk-cvz3k5gk.js +2 -0
- package/dist/chunk-d0vhdr07.js +2 -0
- package/dist/chunk-d257n8gj.js +2 -0
- package/dist/chunk-dfgak1md.js +2 -0
- package/dist/{chunk-e44hny11.js → chunk-drhzcs6e.js} +2 -2
- package/dist/{chunk-a4wrn6ep.js → chunk-dte0n4kf.js} +2 -2
- package/dist/chunk-erjscd1r.js +4 -0
- package/dist/{chunk-kjswq0tx.js → chunk-f1x483c9.js} +2 -2
- package/dist/chunk-f2w2sct6.js +2 -0
- package/dist/{chunk-0zp04d1m.js → chunk-f5gsffbv.js} +2 -2
- package/dist/chunk-feg5rp9g.js +2 -0
- package/dist/chunk-ffspd86m.js +2 -0
- package/dist/chunk-fh3pjhe6.js +2 -0
- package/dist/{chunk-rsfwc38x.js → chunk-fnpf84rf.js} +3 -3
- package/dist/chunk-g2qcyqc6.js +2 -0
- package/dist/chunk-g44hhdha.js +2 -0
- package/dist/chunk-g9t2d8hg.js +2 -0
- package/dist/chunk-g9yg36dh.js +3 -0
- package/dist/{chunk-nkqe2e8s.js → chunk-gha517v4.js} +2 -2
- package/dist/chunk-grr1k5zn.js +2 -0
- package/dist/chunk-gsfgdnfp.js +2 -0
- package/dist/chunk-h491shsg.js +2 -0
- package/dist/chunk-ha46rhzj.js +2 -0
- package/dist/chunk-hd7bk591.js +2 -0
- package/dist/{chunk-a9s3m9fs.js → chunk-heyqzkxq.js} +2 -2
- package/dist/chunk-hp4a0e8c.js +2 -0
- package/dist/{chunk-qmc18ejg.js → chunk-j69t1f4a.js} +2 -2
- package/dist/chunk-j8v3sfpv.js +2 -0
- package/dist/{chunk-z5tstgsh.js → chunk-jgd6dcgy.js} +2 -2
- package/dist/chunk-jmb8r6aj.js +2 -0
- package/dist/chunk-jwt7q6yx.js +4 -0
- package/dist/chunk-jxntqarp.js +2 -0
- package/dist/chunk-k64wvbbc.js +2 -0
- package/dist/{chunk-eeq8d3x7.js → chunk-k7ye738q.js} +2 -2
- package/dist/chunk-kbeme4w0.js +3 -0
- package/dist/{chunk-cdrmg9jj.js → chunk-kc56dhwd.js} +2 -2
- package/dist/{chunk-9xkp5x7h.js → chunk-kmdag4vy.js} +2 -2
- package/dist/chunk-kq48hbd5.js +2 -0
- package/dist/chunk-ktvh4yb5.js +2 -0
- package/dist/{chunk-c2h76vnt.js → chunk-kz1kjzmq.js} +2 -2
- package/dist/{chunk-eyf9bxyx.js → chunk-m271yxxm.js} +2 -2
- package/dist/chunk-mj7094yh.js +2 -0
- package/dist/chunk-mr6k70s4.js +2 -0
- package/dist/chunk-mv51zgj1.js +2 -0
- package/dist/{chunk-gcx4fk1a.js → chunk-mvs2dzyt.js} +2 -2
- package/dist/chunk-mz8a6292.js +2 -0
- package/dist/chunk-n5v1h0sk.js +2 -0
- package/dist/{chunk-01rfnabj.js → chunk-n66yy1m1.js} +2 -2
- package/dist/chunk-n9gq2wbz.js +3 -0
- package/dist/chunk-nxyrrmz8.js +2 -0
- package/dist/chunk-p7dd93e5.js +2 -0
- package/dist/chunk-p8g927x6.js +2 -0
- package/dist/chunk-pk2rvqd0.js +2 -0
- package/dist/{chunk-hwh88n0v.js → chunk-pprt7ntb.js} +4 -4
- package/dist/{chunk-gr1nnczz.js → chunk-pwjz3yxb.js} +2 -2
- package/dist/{chunk-sf1z4r7v.js → chunk-px1ehzwc.js} +2 -2
- package/dist/chunk-pzjag1mt.js +4 -0
- package/dist/chunk-q2gfd4jk.js +2 -0
- package/dist/chunk-q9ef9n7b.js +2 -0
- package/dist/chunk-q9zawfn1.js +2 -0
- package/dist/{chunk-b53ky6rb.js → chunk-qd1z91fm.js} +2 -2
- package/dist/chunk-qdg5zphd.js +2 -0
- package/dist/chunk-qn6ppn0r.js +2 -0
- package/dist/{chunk-09r35ts9.js → chunk-qwfw4xpn.js} +2 -2
- package/dist/chunk-r7s7kx38.js +3 -0
- package/dist/chunk-r9sweaq4.js +2 -0
- package/dist/chunk-rbv1scqm.js +2 -0
- package/dist/{chunk-yjtq166b.js → chunk-rjkpe1fw.js} +3 -3
- package/dist/{chunk-0zph0gwq.js → chunk-rjw63t34.js} +3 -3
- package/dist/chunk-rkfq0c0p.js +2 -0
- package/dist/chunk-rq5e0922.js +2 -0
- package/dist/chunk-s4wjckd1.js +7 -0
- package/dist/chunk-s8s65pj2.js +2 -0
- package/dist/chunk-ssxbxanb.js +2 -0
- package/dist/{chunk-qy2prx7m.js → chunk-swpy2b9a.js} +2 -2
- package/dist/chunk-t7drk9ja.js +2 -0
- package/dist/chunk-tpbqg729.js +2 -0
- package/dist/chunk-ttn8ss6b.js +2 -0
- package/dist/chunk-tv0fwt2g.js +2 -0
- package/dist/chunk-v5pbaf9x.js +2 -0
- package/dist/chunk-vbab9hc4.js +2 -0
- package/dist/{chunk-5nj2fjej.js → chunk-vfhxerxt.js} +2 -2
- package/dist/chunk-vnsgjnp3.js +2 -0
- package/dist/{chunk-kvx8fv1e.js → chunk-vt6cyes7.js} +2 -2
- package/dist/chunk-vzgv360q.js +2 -0
- package/dist/{chunk-5e10bzg2.js → chunk-wccx911q.js} +2 -2
- package/dist/{chunk-q4q4f03j.js → chunk-wgrmjfyp.js} +2 -2
- package/dist/chunk-wvry7t79.js +2 -0
- package/dist/chunk-x2nemdjf.js +2 -0
- package/dist/chunk-x99fyd88.js +2 -0
- package/dist/chunk-xdm2are3.js +2 -0
- package/dist/chunk-xft0s40a.js +3 -0
- package/dist/chunk-y0q6jwq4.js +2 -0
- package/dist/chunk-y6kzbbya.js +2 -0
- package/dist/chunk-y97ne5kj.js +2 -0
- package/dist/chunk-yakar0e2.js +2 -0
- package/dist/chunk-yg3xhn5m.js +2 -0
- package/dist/chunk-z3nybrbb.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.d.ts +4 -0
- package/dist/collections/collection-emoji.js +1 -0
- package/dist/collections/collection-menu.d.ts +15 -0
- package/dist/collections/collection-menu.js +1 -0
- package/dist/collections/collection-panel.d.ts +11 -0
- package/dist/collections/collection-panel.js +1 -0
- package/dist/collections/collections.d.ts +6 -0
- package/dist/collections/collections.js +1 -0
- package/dist/collections/host.d.ts +19 -0
- package/dist/collections/host.js +1 -0
- package/dist/collections/locales.d.ts +71 -0
- package/dist/collections/locales.js +1 -0
- package/dist/collections/model.d.ts +95 -0
- package/dist/collections/model.js +1 -0
- package/dist/collections/store.d.ts +30 -0
- package/dist/collections/store.js +1 -0
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.d.ts +8 -0
- package/dist/conversation/connection-notice.js +1 -0
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.d.ts +8 -0
- package/dist/conversation/conversation-search.js +1 -0
- package/dist/conversation/conversation-view.d.ts +1 -0
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.d.ts +3 -0
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.d.ts +7 -0
- package/dist/conversation/draft-project-picker.js +1 -0
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/types.d.ts +6 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +1914 -0
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-header.d.ts +6 -0
- package/dist/plugins/catalog-header.js +1 -0
- package/dist/plugins/catalog-skeleton.d.ts +3 -0
- package/dist/plugins/catalog-skeleton.js +1 -0
- package/dist/plugins/host.d.ts +49 -0
- package/dist/plugins/host.js +1 -0
- package/dist/plugins/locales.d.ts +1136 -0
- package/dist/plugins/locales.js +1 -0
- package/dist/plugins/new-chat-directory.d.ts +2 -0
- package/dist/plugins/new-chat-directory.js +1 -0
- package/dist/plugins/pane.d.ts +12 -0
- package/dist/plugins/pane.js +1 -0
- package/dist/plugins/panel-item.d.ts +8 -0
- package/dist/plugins/panel-item.js +1 -0
- package/dist/plugins/plugin-detail-page.d.ts +5 -0
- package/dist/plugins/plugin-detail-page.js +1 -0
- package/dist/plugins/plugin-icon.d.ts +7 -0
- package/dist/plugins/plugin-icon.js +1 -0
- package/dist/plugins/plugin-icons.d.ts +1 -0
- package/dist/plugins/plugin-icons.js +1 -0
- package/dist/plugins/plugins-page.d.ts +12 -0
- package/dist/plugins/plugins-page.js +1 -0
- package/dist/plugins/plugins.css +199 -0
- package/dist/plugins/plugins.d.ts +14 -0
- package/dist/plugins/plugins.js +1 -0
- package/dist/plugins/read-skill-document.d.ts +2 -0
- package/dist/plugins/read-skill-document.js +1 -0
- package/dist/plugins/skill-document.d.ts +7 -0
- package/dist/plugins/skill-document.js +1 -0
- package/dist/plugins/skills-tab.d.ts +6 -0
- package/dist/plugins/skills-tab.js +1 -0
- package/dist/plugins/store.d.ts +62 -0
- package/dist/plugins/store.js +1 -0
- package/dist/plugins/toolbox-layout.d.ts +7 -0
- package/dist/plugins/toolbox-layout.js +1 -0
- package/dist/search/chat-search.css +9 -0
- package/dist/search/chat-search.d.ts +1 -0
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.d.ts +4 -0
- package/dist/search/codex-source-matches.js +1 -0
- 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.d.ts +26 -0
- package/dist/session-list/account-menu.js +1 -0
- package/dist/session-list/activity-list.d.ts +11 -0
- package/dist/session-list/activity-list.js +1 -0
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.d.ts +5 -0
- package/dist/session-list/help-menu.js +1 -0
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.d.ts +2 -0
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.d.ts +91 -0
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-header.d.ts +14 -0
- package/dist/session-list/navigation-header.js +1 -0
- package/dist/session-list/navigation-store.d.ts +19 -0
- package/dist/session-list/navigation-store.js +1 -0
- package/dist/session-list/navigation-tabs.d.ts +20 -0
- package/dist/session-list/navigation-tabs.js +1 -0
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.d.ts +2 -0
- package/dist/session-list/platform.js +1 -0
- 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.d.ts +10 -0
- 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.d.ts +14 -0
- package/dist/session-list/shortcut-hint.js +1 -0
- package/dist/session-list/shortcut.d.ts +2 -0
- package/dist/session-list/shortcut.js +1 -0
- 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.d.ts +1 -0
- package/dist/session-list/use-activity-notification.js +1 -0
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.d.ts +1 -0
- package/dist/session-list/use-cmd-held.js +1 -0
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.d.ts +18 -0
- package/dist/settings/codex-account-card.js +1 -0
- package/dist/settings/login-card.d.ts +6 -0
- package/dist/settings/login-card.js +1 -0
- package/dist/settings/model-alias-settings.d.ts +6 -0
- package/dist/settings/model-alias-settings.js +1 -0
- package/dist/settings/model-aliases.d.ts +17 -0
- package/dist/settings/model-aliases.js +1 -0
- package/dist/settings/provider-logos.d.ts +5 -0
- package/dist/settings/provider-logos.js +1 -0
- package/dist/settings/provider-section.d.ts +52 -0
- package/dist/settings/provider-section.js +1 -0
- package/dist/settings/providers-port.d.ts +32 -0
- package/dist/settings/providers-port.js +1 -0
- package/dist/settings/providers.d.ts +92 -0
- package/dist/settings/providers.js +1 -0
- package/dist/settings/settings-bridge.d.ts +39 -0
- package/dist/settings/settings-bridge.js +1 -0
- package/dist/settings/settings.d.ts +9 -0
- package/dist/settings/settings.js +1 -0
- package/dist/stage.d.ts +1 -0
- package/dist/stage.js +1 -1
- package/emojibase/LICENSE +21 -0
- package/emojibase/en/data.json +51183 -0
- package/emojibase/en/messages.json +124 -0
- package/emojibase/zh/data.json +48992 -0
- package/emojibase/zh/messages.json +124 -0
- package/licenses/_dnd-kit_core-LICENSE +21 -0
- package/licenses/_dnd-kit_sortable-LICENSE +21 -0
- package/licenses/_dnd-kit_utilities-LICENSE +21 -0
- package/licenses/_solar-icons_react-LICENSE +11 -0
- package/licenses/_solar-icons_react-LICENSE-THIRD-PARTY +14 -0
- package/licenses/frimousse-LICENSE +21 -0
- package/package.json +35 -3
- package/rust/Cargo.lock +3844 -0
- package/rust/Cargo.toml +29 -0
- package/rust/build.rs +16 -0
- package/rust/permissions/autogenerated/reference.md +296 -0
- package/rust/permissions/default.toml +20 -0
- package/rust/permissions/schemas/schema.json +292 -0
- package/rust/src/lib.rs +79 -0
- package/rust/src/providers/managed.rs +801 -0
- package/rust/src/providers/tests.rs +681 -0
- package/rust/src/providers.rs +984 -0
- package/rust/src/skills.rs +130 -0
- package/dist/chunk-04mj5ftg.js +0 -7
- package/dist/chunk-0jvfabsq.js +0 -2
- package/dist/chunk-107y8e8x.js +0 -2
- package/dist/chunk-22h5rh2h.js +0 -2
- package/dist/chunk-31yt34hy.js +0 -2
- package/dist/chunk-3hp5t5wf.js +0 -2
- package/dist/chunk-3jcx1ns0.js +0 -2
- package/dist/chunk-3jjc06nd.js +0 -3
- package/dist/chunk-3z8ajtxp.js +0 -2
- package/dist/chunk-4b3g7acq.js +0 -2
- package/dist/chunk-4jkg9p4g.js +0 -2
- package/dist/chunk-4xmbve71.js +0 -4
- package/dist/chunk-50mckd2p.js +0 -2
- package/dist/chunk-54qxv3er.js +0 -2
- package/dist/chunk-5bz1bzsw.js +0 -2
- package/dist/chunk-5dk4xga8.js +0 -2
- package/dist/chunk-5my9w4vd.js +0 -2
- package/dist/chunk-5tqygmg9.js +0 -2
- package/dist/chunk-7dd374an.js +0 -2
- package/dist/chunk-7s7txz2j.js +0 -2
- package/dist/chunk-8hbwf0qe.js +0 -2
- package/dist/chunk-8yj3q7n2.js +0 -2
- package/dist/chunk-9eqezb4k.js +0 -2
- package/dist/chunk-9xfv8jdn.js +0 -2
- package/dist/chunk-a3s36z4s.js +0 -3
- package/dist/chunk-a414w7ah.js +0 -3
- package/dist/chunk-am6tss41.js +0 -2
- package/dist/chunk-b65w6x23.js +0 -2
- package/dist/chunk-cv2j9sjp.js +0 -2
- package/dist/chunk-d1trg76g.js +0 -2
- package/dist/chunk-d6c0mnth.js +0 -2
- package/dist/chunk-dgm4gxkj.js +0 -2
- package/dist/chunk-e6ddpdxn.js +0 -2
- package/dist/chunk-e92r4g3v.js +0 -2
- package/dist/chunk-e9znmqdj.js +0 -2
- package/dist/chunk-eyfdn4p3.js +0 -2
- package/dist/chunk-fcqwzmkd.js +0 -2
- package/dist/chunk-fkwafga0.js +0 -2
- package/dist/chunk-gap8n0vv.js +0 -5
- package/dist/chunk-j5rd55qs.js +0 -3
- package/dist/chunk-j9q2s4kq.js +0 -2
- package/dist/chunk-jnena0v6.js +0 -2
- package/dist/chunk-kkps1qd4.js +0 -4
- package/dist/chunk-mpnv2rht.js +0 -2
- package/dist/chunk-mtydzse4.js +0 -2
- package/dist/chunk-mw9k08ky.js +0 -3
- package/dist/chunk-px6nrr87.js +0 -2
- package/dist/chunk-pzmd5d3m.js +0 -2
- package/dist/chunk-q5az5kp2.js +0 -4
- package/dist/chunk-qqm07rfv.js +0 -2
- package/dist/chunk-qv7kkv47.js +0 -2
- package/dist/chunk-rq04p6pn.js +0 -3
- package/dist/chunk-rx9sdjtn.js +0 -2
- package/dist/chunk-s0b5g8nc.js +0 -2
- package/dist/chunk-syp06z39.js +0 -2
- package/dist/chunk-t6cfjn19.js +0 -2
- package/dist/chunk-vsff9djs.js +0 -2
- package/dist/chunk-vvq50011.js +0 -2
- package/dist/chunk-wkvm8f2e.js +0 -2
- package/dist/chunk-x0tbzjqc.js +0 -2
- package/dist/chunk-x480gyp7.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c}from"./chunk-mj7094yh.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function qr(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function pi({blocks:e}){return s(yn,{files:qr(e)})}function yn({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{qr,pi,yn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{k}from"./chunk-pzjag1mt.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Zr(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function bi(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function M(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=k(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(k(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function Ci(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Zr(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,I=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&I!==null&&a!==I||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")I=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let h=`turn:${l.kind}:${l.id}`,x=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(h);if(y!==void 0&&K(y.items,a)&&y.endedAt===x)return y;let b={key:h,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:x,replayed:a.every(wn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,g)=>j(b,c,g<v,a[g-1])),b})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function wn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ne(t){return S(t.content)}function nt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function kn(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function wi(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function ki(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function Si(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!ki(t,e[n-1],o))break;n--}return e[n]?.key}function _i(t,e,n){let o=n,s=n;while(o>0&&ki(t,e[o-1],e[o]))o--;while(s+1<e.length&&ki(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{Zr,bi,Ci,wn,ne,nt,kn,wi,ki,Si,_i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ge}from"./chunk-jmb8r6aj.js";import{useEffect as s,useState as w}from"react";function eo(){let[i,e]=w(!1);return s(()=>{let t=ge()?"Meta":"Control",o=(n)=>{if(n.key===t)e(!0)},r=(n)=>{if(n.key===t)e(!1)},d=()=>e(!1);return window.addEventListener("keydown",o),window.addEventListener("keyup",r),window.addEventListener("blur",d),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",r),window.removeEventListener("blur",d)}},[]),i}
|
|
2
|
+
export{eo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ve}from"./chunk-d257n8gj.js";import{P}from"./chunk-42atrgm1.js";import{cn as n}from"cn";import{Item as i,ItemActions as L,ItemContent as R,ItemDescription as Q,ItemMedia as F,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function D({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function ce({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(ve,"data-[active=true]:font-medium",e),...r})}function dt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(P,{children:t})})}export{L,R,Q,F,D,ce,dt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d}from"./chunk-d257n8gj.js";import{cn as a}from"cn";import{motion as g}from"motion/react";import{jsx as i,jsxs as u}from"react/jsx-runtime";function no({active:t,expanded:r=!1,highlight:s=!0,className:o,...l}){return i("button",{type:"button","data-active":t?"":void 0,"aria-current":t?"page":void 0,className:a(s&&d,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height)] min-w-[var(--navigation-row-height)]":"size-[var(--navigation-row-height)]",o),...l})}function lr({tabs:t,view:r,onViewChange:s,onReset:o,notifications:l,className:p}){return i("div",{className:a("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",p),children:i("div",{role:"tablist",className:`${d} bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-full flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]`,children:t.map((e)=>{let n=r===e.key;return u(no,{role:"tab",active:n,expanded:n,highlight:!1,"aria-selected":n,title:e.title,onClick:()=>s(e.key),onDoubleClick:o&&(()=>o(e.key)),className:a("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-4 [&_svg]:shrink-0",n?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[n&&i(g.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-blue-500 pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:a("relative z-10 grid",n?"ms-2 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})})})}
|
|
2
|
+
export{no,lr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var ao={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},so={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function A({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=ao[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",so.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{ao,so,A};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-mv51zgj1.js";import{e}from"./chunk-y6kzbbya.js";import{codexExtensionCapabilities as T,codexTurnId as w,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function Kt(r,g,c,y){let{client:S}=e(),R=n((t)=>T(t.agent).composerPredictions),k=r.items.findLast((t)=>t.kind==="user"),i=w(k?._meta),O=r.configOptions.flatMap((t)=>F(t)||B(t)?[[t.configId,t.currentValue]]:[]).sort(([t],[u])=>String(t).localeCompare(String(u))),o=JSON.stringify([r.id,i,O]),s=j(r._meta),d=r._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&r.state==="idle"&&r.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===o||l.current?.key===o||i===null)return;let t={key:o,previousResult:m};l.current=t,x(null),S.requestPrediction(r.id,i).catch((u)=>{if(f.current&&l.current===t)x({key:o,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,o,m,r.id,i]);let I=p&&!c&&a!==o&&l.current?.key===o&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&r.state==="idle"&&!c&&a!==o?v?.key===o?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(o)}}}
|
|
2
|
+
export{Kt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function xi({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{xi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Do}from"./chunk-ckyat78p.js";import{n}from"./chunk-mv51zgj1.js";import{e,g}from"./chunk-y6kzbbya.js";import{U,m,B}from"./chunk-p8g927x6.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{useRef as H}from"react";import{jsx as G}from"react/jsx-runtime";function qt({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=n((o)=>Boolean(o.configPending[l])),M=H({sessionId:l,model:!0}),_=k&&(M.current.sessionId!==l||M.current.model),z=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=m(p,"model"),a=m(p,"thought_level"),v=p.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),S=v.filter(D),f=v.filter(A);if(!t&&!a&&S.length===0&&f.length===0)return null;let u=(o,r)=>{if(r===o.currentValue)return Promise.resolve();M.current={sessionId:l,model:o===t};let d=O?O(o.configId,r):P.setConfig(l,o.configId,r);return g(c,d),d},h=a?U(a):[],R=h.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),E=t?B(t):i("composer.model"),V=(o)=>({api_id:o.value,label:o.name}),y=L(t&&Z(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(V)})):[{...x,models:t?U(t).map(V):[]}]),w=y.flatMap((o)=>o.models),C=w.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:E},s=f.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return G(Do,{disabled:I||_||z,switching:_,value:{...C,label:C.shortLabel??C.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(o)=>{if(o.api_id===t?.currentValue)return;if(b)b(o.api_id);else if(t)u(t,o.api_id)},header:{name:t?.name??i("composer.model"),action:N},modelGroups:y,t:i,effortConfig:a&&h.length>0?{name:"Effort",value:a.currentValue,levels:h,sizer:R,onChange:(o)=>u(a,o)}:void 0,selectOptions:S.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:U(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"})},...f.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:f.find((q)=>q.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);u(d,r)}})}
|
|
2
|
+
export{qt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var Ue="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function ht(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(Ue))n()}),[e]);return d(t,()=>o(e.get(Ue)))}async function vt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[Ue])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[Ue]:i}})}
|
|
2
|
+
export{Ue,ht,vt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function pn({name:p,value:M,levels:h,disabled:c,onChange:P}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=100,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
+
export{pn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Eo,T}from"./chunk-rbv1scqm.js";import{po}from"./chunk-fnpf84rf.js";import{ye}from"./chunk-8c8ncw1m.js";import{Co,wo,ko,So,_o,te}from"./chunk-ktvh4yb5.js";import{co,uo}from"./chunk-qdg5zphd.js";import{rn}from"./chunk-jwt7q6yx.js";import{t,n}from"./chunk-mv51zgj1.js";import{e}from"./chunk-y6kzbbya.js";import{un}from"./chunk-0p6y2t9b.js";import{a,Lo,O,Gt}from"./chunk-y97ne5kj.js";import{Ut}from"./chunk-3yxjh7b1.js";import{Ee,Ot}from"./chunk-fh3pjhe6.js";import{zt,jt}from"./chunk-q9zawfn1.js";import{Ro}from"./chunk-62jm1gct.js";import{qt}from"./chunk-3gk86w24.js";import{Mo}from"./chunk-k64wvbbc.js";import{$t}from"./chunk-dfgak1md.js";import{Kt}from"./chunk-2t9j90mw.js";import{bo}from"./chunk-grr1k5zn.js";import{xo}from"./chunk-bbyscgdd.js";import{Ht}from"./chunk-0643swd4.js";import{hasFuzzyFileSearch as At}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Mt}from"lucide-react";import{useCallback as S,useEffect as Ct,useLayoutEffect as J,useMemo as Q,useRef as Y,useState as F}from"react";import{jsx as c,jsxs as w}from"react/jsx-runtime";var Et=["image/png","image/jpeg","image/webp","image/gif"],Z=[];async function Rt(r){let d=await(await fetch(r.url)).blob();return new Promise((l,E)=>{let I=new FileReader;I.onerror=()=>E(I.error),I.onload=()=>{let L=I.result;l(L.slice(L.indexOf(",")+1))},I.readAsDataURL(d)})}function Nt(r){let{t:d}=t(),l=T();return c(te,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>l.openFileDialog(),...r,children:c(Mt,{className:"size-4"})})}function Ft({session:r,onSubmit:d,onShellCommand:l,onHandOff:E,modelSelector:I,modelMenu:L,inputHeader:tt,actions:dt,children:ut,attachmentPolicy:ft,predictions:ht=!0,disabled:gt=!1,preparing:et=!1,allowPendingInput:xt=!1}){let{host:k,client:R}=e(),{t:p}=k,D=S((o)=>{if(k.reportError)k.reportError(o);else console.error(o)},[k]),[rt,B]=F(()=>({text:a.get(r.id)?.text??"",revision:0})),{text:P}=rt,[A,yt]=F(()=>a.get(r.id)?.attachments??Z),[u,z]=F(()=>a.get(r.id)?.mentions??[]),V=A.some((o)=>Ee(o)&&o.pastedText.status!=="ready"),[M,nt]=F(!1),[U,Pt]=F(!1),[X,ot]=F(!1),f=Y(null),at=Y(null),i=Y(rt),W=S((o)=>{at.current?.(),i.current={text:o,revision:i.current.revision+1},B(i.current)},[]),it=Q(()=>({read:()=>{let s=f.current?.getTextarea(),g=s===null||s===void 0?[i.current.text.length,i.current.text.length]:[s.selectionStart,s.selectionEnd];return{target:r.id,...i.current,selection:g}},compareAndSet(s,g,C){if(s.target!==r.id||s.revision!==i.current.revision)return null;i.current={text:g,revision:i.current.revision+1},B(i.current);let x=f.current?.getTextarea();if(x!==null&&x!==void 0)x.value=g,x.setSelectionRange(C[0],C[1]);return{target:r.id,...i.current,selection:C}}}),[r.id]),_=Y(null),ct=S((o)=>(_.current=o,()=>{if(_.current===o)_.current=null}),[]),j=r.state!=="idle",b=l!==void 0&&P.startsWith("!"),h=!gt&&!et&&r.attached&&!r.restoring&&!r.readOnly,N=!r.readOnly&&(xt||h),H=Kt(r,h&&!M&&!U&&!V&&!X,P.length>0||A.length>0||u.length>0,ht&&!b),st=H.invalidate;J(()=>{a.set(r.id,{text:P,attachments:A,mentions:u,modelId:a.get(r.id)?.modelId??null})},[r.id,P,A,u]),J(()=>Lo(r.id,yt),[r.id]),J(()=>Gt(r.id,(o)=>{if(!N||M)throw Error("The composer cannot take text now; try again later");if(P.length||A.length||u.length)throw Error("The composer already has a draft; send or clear it first");W(o)}),[r.id,N,M,P,A,u,W]);let mt=n((o)=>At(o.agent)),bt=Q(()=>mt&&h?async(o)=>Ut((await R.fuzzyFileSearch({query:o,roots:[r.cwd]})).files):void 0,[R,mt,h,r.cwd]),q=S((o)=>{z((s)=>s.includes(o)?s:[...s,o])},[]);Ct(()=>{f.current?.focus()},[]);let pt=S(async({text:o,files:s})=>{let g=l!==void 0&&o.startsWith("!")?o.slice(1):null;if(g!==null){if(g.trim().length===0)return;if(s.length||u.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 C=o.trim();if(C.length===0&&s.length===0&&u.length===0)return;let x=_.current;nt(!0);let v=a.get(r.id),Tt=i.current.revision,K=null;try{let y=[];for(let m of u){let G={kind:"file",absPath:m};y.push({type:"resource_link",uri:zt(G),name:jt(G)})}if(C.length>0)y.push({type:"text",text:C});for(let m of s)if(Ee(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");y.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else y.push({type:"image",data:await Rt(m),mimeType:m.mediaType});if(i.current.revision===Tt&&a.get(r.id)===v)i.current={text:"",revision:i.current.revision+1},K=i.current.revision,B(i.current),z([]),O(r.id,()=>Z),a.set(r.id,{text:"",attachments:Z,mentions:[],modelId:v?.modelId??null}),f.current?.resetHeight();if(g!==null&&l)await l(g);else if(d)if(x===null)await d(y);else await d(y,(m)=>{if(x.signal.aborted||_.current!==x)return;x.accept(m),E?.(r.id,m)});else if(x===null)await R.prompt(r.id,y);else{let m=await R.prompt(r.id,y);x.accept(m)}st();for(let m of v?.attachments??[])if(m.url.startsWith("blob:")&&!a.get(r.id)?.attachments.some((G)=>G.id===m.id))URL.revokeObjectURL(m.url)}catch(y){if(v&&K!==null&&i.current.revision===K&&a.get(r.id)?.attachments.length===0&&a.get(r.id)?.mentions.length===0)i.current={text:v.text,revision:K+1},B(i.current),z(v.mentions),a.set(r.id,v),O(r.id,()=>v.attachments);throw y}finally{nt(!1),f.current?.focus()}},[R,r.id,r.state,u,d,l,E,st]),vt=()=>{R.cancel(r.id).catch(D)},wt=S((o)=>{let s=o.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:ye})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});D(s)},[D,p]),It=Q(()=>({session:r,ready:h,inputReady:N,sending:M,textareaRef:f,draft:it,interruptRef:at,observeReceipts:ct,addMention:q,setAdding:Pt,shellMode:b,handsFree:!b&&(d===void 0||E!==void 0)}),[r,h,N,M,it,ct,q,d,E,b]),lt=k.writeTextAttachment;return c(un,{value:It,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:w("div",{className:"relative",children:[tt&&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:tt}),w(Eo,{attachmentPolicy:ft,value:P,revision:i.current.revision,onValueChange:W,onSubmittedClear:()=>{i.current={text:"",revision:i.current.revision+1},B(i.current)},attachments:A,onAttachmentsChange:(o)=>O(r.id,()=>o),children:[c(po,{bashMode:l!==void 0,handleRef:f,commands:r.commands,searchFiles:bt,onMention:q,onSearchError:D,forcedOpen:X,onForcedOpenChange:ot,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),w(Co,{"data-shell-mode":b||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Et.join(","),onError:wt,onSubmit:pt,onSubmitAsync:pt,onSubmitError:D,canSubmit:()=>h&&!M&&!U&&!V&&(!b||!j&&P.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[ut,w(ko,{className:"px-3 pt-3 pb-0 empty:hidden",children:[U&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),c(Ro,{mentions:u,onRemove:(o)=>z((s)=>s.filter((g)=>g!==o))}),c(uo,{children:(o)=>Ee(o)?c(Mo,{data:o,sessionId:r.id}):c(co,{data:o,t:p})})]}),w(wo,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(o)=>{if(!H.text||f.current?.isComposing()||o.nativeEvent.isComposing||o.nativeEvent.keyCode===229||o.shiftKey||o.ctrlKey||o.altKey||o.metaKey||o.target!==f.current?.getTextarea())return;if(o.key==="Tab")o.preventDefault(),o.stopPropagation(),W(H.text)},children:[b&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(rn,{className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,bashMode:l!==void 0,disabled:!N,onPasteCapture:lt?(o)=>Ot(o,r.id,p("composer.pastedTextFilename"),lt):void 0,placeholder:b?"! command":H.text||(j?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),c(So,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:w("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[w("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Nt,{className:"text-foreground",disabled:!N}),c(bo,{textareaRef:f,menuOpen:X,onOpenChange:ot,disabled:!h||r.commands.length===0}),c($t,{sessionId:r.id,options:r.configOptions,disabled:!h})]}),w(_o,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(Ht,{session:r}),I??c(qt,{...L,sessionId:r.id,options:r.configOptions,disabled:!h}),dt,c(xo,{active:j,sending:M||et||U,ready:h&&!V&&(!b||!j&&P.slice(1).trim().length>0),hasMentions:u.length>0,onStop:vt})]})]})})]})]})]})})})}
|
|
2
|
+
export{Ft};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function
|
|
2
|
-
export{
|
|
1
|
+
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function Ut(t,o=50){return t.slice(0,o).map((e)=>{let r=a(e);return{key:r,label:e.path,payload:r,description:e.match_type==="directory"?"/":""}})}
|
|
2
|
+
export{Ut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function P({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
|
|
2
|
+
export{P};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function si(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
+
export{si};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{vo}from"./chunk-drhzcs6e.js";import{Dialog as E,DialogClose as X,DialogContent as _,DialogTitle as L}from"@nyssance/shadcn/vega/components/ui/dialog";import{cn as v}from"cn";import{XIcon as j}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as A,useRef as N,useState as b}from"react";import{jsx as i,jsxs as F}from"react/jsx-runtime";function ho({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=A(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(E,{open:l,onOpenChange:y,children:F(_,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(L,{className:"sr-only",children:M||"Image preview"}),i(X,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(j,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?vo({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{ho};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s,r,o,u}from"./chunk-1mn2t6ga.js";import{A}from"./chunk-2f9vjmxz.js";import{b,W,he}from"./chunk-1k697ncv.js";import{Ne,q,ee}from"./chunk-ssxbxanb.js";import{to}from"./chunk-jmb8r6aj.js";import{me}from"./chunk-m271yxxm.js";import{ue}from"./chunk-4gyd9hx9.js";import{pe}from"./chunk-yg3xhn5m.js";import{Nt}from"./chunk-tpbqg729.js";import{eo}from"./chunk-1rg3nab3.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as G,useMemo as P}from"react";import{Kbd as K}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as T}from"react/jsx-runtime";function M(i,d){return i.find((m)=>m.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function sr({selectedId:i,onSelect:d,isForeground:m,onOpen:k,accessory:R,rowActions:h}){let N=s(),{t:L}=N,p=o((t)=>t.runStates),v=o((t)=>t.drafts),l=o((t)=>t.sessionList),g=q((t)=>t.activityOrder),f=P(()=>g.flatMap((t)=>{let e=p[t];return e&&Ne({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:M(l,e)}]:[]}),[g,p,v,l]),w=P(()=>{let t=new Map;for(let e of f){let a=e.sid===i||m?.(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,m]),y=q((t)=>t.activityCollapsedGroups),n=ee(),x=w.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(k?.(t))return;d(t)},O=eo();G(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!to(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 C=(t)=>{let e=x.indexOf(t);return c(H,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&O?c(K,{children:pe(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(b,{children:w.map((t)=>t.key==="foreground"?c(b,{children:t.rows.map(C)},t.key):c(W,{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:L("sessionList.background"),count:t.rows.length,children:t.rows.map(C)},t.key))})}function H({sessionRow:i,state:d,interruption:m,active:k,tasks:R,listeningPorts:h,accessory:N,actions:L,onOpen:p,hint:v}){let l=s(),g=r(),{t:f}=l,w=i.title??f("sessionList.untitled"),y=Nt(i.sessionId,d);return D(T,{children:[c(he,{"data-session-id":i.sessionId,active:k,role:"button",tabIndex:0,hoverCard:c(ue,{sessionRow:i,actions:L}),onClick:p,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),p()},state:d,interruption:m,title:w,preview:y,listeningPorts:h,onOpenPort:l.openLink&&((n)=>l.openLink?.(`http://localhost:${n}`)),accessory:N,hint:v,actions:c(me,{title:f("sessionList.stop"),onStop:()=>u(l,g.stopSession(i.sessionId))})}),R.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(A,{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{sr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s}from"./chunk-1mn2t6ga.js";import{It}from"./chunk-667z0pac.js";import{P}from"./chunk-42atrgm1.js";import{Mt,fe}from"./chunk-1k697ncv.js";import{Input as x}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as H}from"@nyssance/shadcn/vega/components/ui/separator";import{formatDistanceToNowStrict as L}from"date-fns";import{enUS as z,zhCN as E}from"date-fns/locale";import{ClockIcon as A,MessageSquareIcon as D}from"lucide-react";import{useEffect as g,useState as w}from"react";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:z,"zh-CN":E};function Ve(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return L(new Date(t),{locale:r})}function ue({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=fe(),y=Mt();g(()=>{f(n)},[n,f]);let[I,p]=w(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?Ve(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(A,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(It,{title:n?o(x,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(P,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(D,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(H,{}),a]}):void 0})}
|
|
2
|
+
export{Ve,ue};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ut}from"./chunk-g44hhdha.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 ke(e){let t=r.get(e);if(!t)t=ut(e),r.set(e,t);return t}function Gi({host:e,client:t,children:n}){let s=ke(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 Se(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Oe(e){let t=Se();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=ke(Se());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function _e(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
+
export{ke,Gi,l,Se,Oe,i,_e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{zo}from"./chunk-z3nybrbb.js";import{Ce,t,we,n,rt}from"./chunk-mv51zgj1.js";import{Ci,nt,kn,Si,_i}from"./chunk-1r25anvg.js";import{ot}from"./chunk-gha517v4.js";import{ci}from"./chunk-xft0s40a.js";import{si}from"./chunk-48fj5m0p.js";import{Yo,Xo}from"./chunk-kq48hbd5.js";import{Fi,Di}from"./chunk-px1ehzwc.js";import{qo}from"./chunk-dte0n4kf.js";import{li}from"./chunk-kc56dhwd.js";import{Wo}from"./chunk-erjscd1r.js";import{Button as Q}from"@nyssance/shadcn/vega/components/ui/button";import{codexExtensionCapabilities as Le,codexMessageError as Me,codexRetryNotice as ze,codexTurnError as Ve,nativeTurnId as fe}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Be}from"lucide-react";import{useCallback as z,useEffect as E,useLayoutEffect as pe,useMemo as J,useRef as h,useState as U}from"react";import{flushSync as ge}from"react-dom";import{jsx as o,jsxs as A}from"react/jsx-runtime";var ve=24;function qe(e){let d=Math.max(0,e.turnTopPx-ve),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Oe({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 Fe({sessionId:e,turnId:d,root:g,error:s,connected:R}){let L=h(null),b=we(),{t:H}=t(),w=z(()=>{b.loadHistoryTurn(e,d).catch(()=>{})},[b,e,d]);return E(()=>{if(!g||!L.current||!R||s)return;let V=new IntersectionObserver((v)=>{if(v.some((S)=>S.isIntersecting))V.disconnect(),w()},{root:g,rootMargin:"800px 0px"});return V.observe(L.current),()=>V.disconnect()},[g,R,s,w]),o("div",{ref:L,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?A("div",{className:"flex flex-col items-center gap-2",children:[o("p",{role:"alert",className:"text-destructive text-xs",children:s}),o(Q,{variant:"outline",size:"sm",onClick:w,disabled:!R,children:H("timeline.navigationRetry")})]}):A("div",{role:"status","aria-label":H("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 Ke(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:Ci(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function Je(e){return o(Ce,{host:e.host,client:e.client,children:o(Ue,{...e})})}function Ue({session:e,leading:d,afterTurn:g,answerActions:s,turnFooter:R,renderUserMessage:L,insert:b,navigation:H,anchorNewTurn:w=!1,Viewport:V=Oe}){let v=we(),S=t(),T=n((r)=>r.historyNavigation[e.id]),c=Ke(e,T?.turns),C=c.at(-1)?.key,Te=Si(e,c),y=e.state==="running"||e.state==="requires_action",_=J(()=>si(c,T),[c,T]),Y=J(()=>_.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[_]),ye=J(()=>H===void 0?[]:Yo(c,e.turnUsage,T),[H,c,e.turnUsage,T]),Z=b&&b.afterItemId!==null?c.findIndex((r)=>r.items.some((l)=>l.id===b.afterItemId)):-1,D=h(c);D.current=c;let[a,xe]=U(null),x=n((r)=>r.historyPages[e.id]),P=n((r)=>r.connection==="ready"),he=n((r)=>Le(r.agent).sessionRetry),ee=x!==void 0;E(()=>{if(P&&ee&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,P,ee,e.id,e.restoring]);let[be,Re]=U(!1),O=h(null),[Se,te]=U(!1),ne=h(0),j=h({key:C,running:y});j.current={key:C,running:y};let[re,F]=U(0),N=h(0),k=h(null);N.current=re;let Pe=z(()=>{if(k.current!==null)k.current.keepTop=!1},[]),{isFollowing:M,scrollToBottom:W,stopFollowing:B,schedulePin:ie,contentResized:oe,beginLocate:ae,cancelLocation:le}=li(a,y,Pe),ue=z(()=>{if(a===null||!y)return;let r=c.at(-1)?.key;if(r===void 0)return;let l=ae(!0),u=()=>l.isCurrent()&&j.current.running&&j.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let p=a.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(p===null)return;let m=a.scrollTop+p.getBoundingClientRect().top-a.getBoundingClientRect().top,I=qe({turnTopPx:m,scrollHeightPx:a.scrollHeight,viewportHeightPx:a.clientHeight,spacerPx:N.current});k.current=I.spacerPx>0?{element:p,heightPx:p.getBoundingClientRect().height+I.spacerPx,keepTop:!0}:null,ge(()=>F(I.spacerPx)),requestAnimationFrame(()=>{if(u())l.finish(I.scrollTopPx)})})),f=O.current;if(f===null)return;f.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(u())i()})},[ae,y,a,c]);pe(()=>{if(!w||y)return;le(),k.current=null,N.current=0,F(0)},[w,le,y]);let X=z(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);E(()=>{if(a===null)return;let r=()=>{let l=a.scrollTop<600;if(Re(l),l&&!T?.complete&&P&&!e.restoring&&!M&&x?.cursor&&!x.loading&&!x.error)X()};return r(),a.addEventListener("scroll",r,{passive:!0}),()=>a.removeEventListener("scroll",r)},[P,x,M,X,a,e.restoring,T?.complete]),E(()=>{Fi({sessionId:e.id,turns:Y,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Y,B]),E(()=>()=>Di(e.id),[e.id]);let Ie=z(async(r,l)=>{let u=++ne.current;te(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,r.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!l())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((I)=>fe(I)===r.nativeTurnId));if(!i?.user)return null;let f=i.user.id,p=O.current;if(p===null)throw Error("Virtual timeline is not mounted");return await p.scrollToKey(i.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(f)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(f)}"]`)}finally{if(ne.current===u)te(!1)}},[v,e.id]),He=z(async(r)=>{if(r.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,r.nativeTurnId)},[v,e.id]);E(()=>{if(a===null)return;let r=a.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let l=new ResizeObserver(()=>{let u=k.current,i=null;if(u!==null){let f=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(f!==N.current&&(f<N.current||u.keepTop)){if(N.current=f,ge(()=>F(f)),f===0)k.current=null}if(f>0&&u.keepTop)i=a.scrollTop+u.element.getBoundingClientRect().top-a.getBoundingClientRect().top-ve}oe(i)});if(l.observe(r),l.observe(a),C!==void 0){let u=a.querySelector(`[data-codex-turn="${CSS.escape(C)}"]`);if(u===null)throw Error("Latest turn is not mounted");l.observe(u)}return()=>l.disconnect()},[oe,C,a]),E(()=>{if(e.items.length===0)return;ie()},[ie,e.items]);let se=h(null);pe(()=>{if(a===null)return;let r=c.at(-1),l=se.current;if(se.current=r===void 0?null:{key:r.key,running:y},r===void 0||l===null||r.user===null||r.replayed)return;if(w){if(y&&e.turnEndedAt[r.user.id]===void 0&&(r.key!==l.key||!l.running))k.current=null,N.current=0,F(0),ue()}else if(r.key!==l.key)W()},[ue,w,y,W,a,e.turnEndedAt,c]);let Ne=(r,l)=>{let u=r,i=u.turn;if(i===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${l}`);return o(Fe,{sessionId:e.id,turnId:u.nativeTurnId,root:a,error:T?.turnErrors[u.nativeTurnId],connected:P&&!M&&!Se})}let f=c.indexOf(i),p=i.key===Te,m=_i(e,c,f),I=!p&&m.continued,K=i.key===C,q=i.errors.at(-1),ce=q===void 0?null:Me(q),G=q===void 0?null:fe(q),ke=!e.subagent&&K&&!p&&P&&he&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&ce!==null&&Ve(ce).category==="overloaded"&&G!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",de=R?.(i)??null,Ee=i.work.length>0||i.final.length>0||i.errors.length>0||p||de!==null||nt(i)||kn(i)||K&&(e.error!==null||e.lastStopReason==="cancelled"),me=i.user===null?null:ot(i);return A("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(L===void 0?o(Wo,{item:i.user,messageTime:me}):L(i.user,me)),Ee&&o(ci,{sessionId:e.id,turn:i,terminals:e.terminals,active:p,blocked:e.state==="requires_action",continued:I,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:p?ze(e._meta)??void 0:void 0,retry:ke?{turnId:G,delaySeconds:qo(c),run:(Ae)=>v.retrySession(e.id,G,Ae)}:void 0,interrupted:kn(i)||!p&&K&&e.lastStopReason==="cancelled",answerActions:s?.(i),footer:de}),l===Z&&b?.node,g?.(i)]})};return A("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[o(V,{viewportRef:xe,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":S.t("timeline.label")},children:o("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:A("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&Z===-1&&b.node,o(zo,{ref:O,entries:_,renderTurn:Ne,scrollElement:a,sessionKey:e.id,preserveViewport:!M,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:re}}),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(Q,{variant:"outline",size:"sm",disabled:!P,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:S.t("timeline.navigationRetry")})}),be&&x?.cursor&&!T?.complete&&A("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[o(Q,{variant:"outline",size:"sm",disabled:!P||e.restoring||x.loading,onClick:X,children:x.loading?S.t("timeline.loadingEarlier"):S.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})]}),H!==void 0&&o(Xo,{items:ye,audio:H.audio,scrollRoot:a,beforeReveal:B,ensureItemMounted:Ie,onPreviewItem:He,onRevealError:(r)=>rt(S,r),targetTopMarginPx:16},e.id),o("button",{type:"button",className:M?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:M?-1:void 0,onClick:W,"aria-label":S.t("timeline.scrollToBottom"),children:y?A("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(Be,{})})]})}
|
|
2
|
+
export{Je};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as O}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as w,DialogContent as D,DialogDescription as S,DialogFooter as A,DialogHeader as C,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as N,FieldDescription as f,FieldGroup as V,FieldLabel as R,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as q}from"@nyssance/shadcn/vega/components/ui/input";import{Label as P}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as L,RadioGroupItem as G}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as I}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as B}from"@nyssance/shadcn/vega/components/ui/textarea";import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as K,isStringProperty as T}from"@nyssance/codex-acp-v2/client";import{useEffect as j,useMemo as H,useState as M}from"react";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!T(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function
|
|
2
|
-
export{
|
|
1
|
+
import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as O}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as w,DialogContent as D,DialogDescription as S,DialogFooter as A,DialogHeader as C,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as N,FieldDescription as f,FieldGroup as V,FieldLabel as R,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as q}from"@nyssance/shadcn/vega/components/ui/input";import{Label as P}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as L,RadioGroupItem as G}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as I}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as B}from"@nyssance/shadcn/vega/components/ui/textarea";import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as K,isStringProperty as T}from"@nyssance/codex-acp-v2/client";import{useEffect as j,useMemo as H,useState as M}from"react";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!T(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Or(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function Ir(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function Ur(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(P,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(O,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(L,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(G,{value:o.value,id:l})},o.value)})})]});return s(N,{children:[r(R,{htmlFor:n,children:e.title}),k(e.property)?r(I,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):K(e.property)?r(q,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(B,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Bo({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=H(()=>Or(e),[e]),[m,u]=M(()=>Ir(c));j(()=>u(Ir(c)),[n,c]);let g=c.every((a)=>Ur(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(w,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(D,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(C,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(E,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(S,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(V,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(A,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
|
|
2
|
+
export{Or,Ir,Ur,Bo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=new Map;var a=0;function
|
|
2
|
-
export{
|
|
1
|
+
var t=new Map;var a=0;function fn(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=fn(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function ai(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
+
export{fn,ai};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{pe}from"./chunk-yg3xhn5m.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 Yn({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:pe(t)}):null}function Xn({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Yn,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Tt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Xn,{label:t,shortcut:o}):t})]})}
|
|
2
|
+
export{Yn,Xn,Tt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o}from"./chunk-1mn2t6ga.js";import{Ne,q,ee}from"./chunk-ssxbxanb.js";import{useEffect as u,useMemo as S}from"react";function rr(s){let a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>(t.state==="done"||t.state==="requires_action")&&Ne(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=S(()=>new Map(JSON.parse(a)),[a]),c=q((i)=>i.activitySeen),r=ee();return u(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>c.get(i)!==n)}
|
|
2
|
+
export{rr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-mv51zgj1.js";import{Je}from"./chunk-4ygyb91q.js";import{e,g}from"./chunk-y6kzbbya.js";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as p,EmptyDescription as c,EmptyHeader as l,EmptyTitle as d}from"@nyssance/shadcn/vega/components/ui/empty";import{Loader2Icon as v}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Wt({session:t,timeline:y}){let{host:m,client:s}=e(),{t:i}=m,f=n((E)=>E.historyPages[t.id]?.cursor!=null),u=()=>g(m,s.open(t.id,t.cwd)),a=o(Je,{...y,session:t,client:s,host:m});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):a;if(!t.attached&&t.items.length===0)return r(p,{className:"flex-1",children:[r(l,{children:[o(d,{children:i("conversation.reopen")}),o(c,{children:i("conversation.detached")})]}),o(h,{onClick:u,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!f)return o(p,{className:"flex-1",children:r(l,{children:[o(d,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(c,{className:"truncate font-mono",children:t.cwd})]})});return a}
|
|
2
|
+
export{Wt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./chunk-mv51zgj1.js";import{Vt}from"./chunk-q9zawfn1.js";import{Badge as i}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{FileIcon as r,XIcon as l}from"lucide-react";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Ro({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(i,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(r,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:Vt(e)}),o(m,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:Vt(e)}),onClick:()=>n(e),children:o(l,{className:"size-3"})})]},e))})}
|
|
2
|
+
export{Ro};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function It({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function M({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
|
|
2
|
+
export{It,M};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-mv51zgj1.js";import{Yt,e,g}from"./chunk-y6kzbbya.js";import{Ft}from"./chunk-3vsc49pt.js";import{Wt}from"./chunk-615a0yhh.js";import{Qt}from"./chunk-j8v3sfpv.js";import{Et,Lt}from"./chunk-n9gq2wbz.js";import{Rt}from"./chunk-ha46rhzj.js";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as H,EmptyDescription as k,EmptyHeader as O,EmptyTitle as S}from"@nyssance/shadcn/vega/components/ui/empty";import{LockIcon as M,UnplugIcon as P}from"lucide-react";import{useMemo as z,useRef as B}from"react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function br({host:t,client:c,...s}){let m=z(()=>t.openDiff?t:{...t,openDiff:Et},[t]);return r(Yt,{host:m,client:c,children:[o(I,{...s}),!t.openDiff&&o(Lt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=B(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:i}=d,f=n((a)=>a.connection==="ready"),v=n((a)=>a.historyPages[t.id]?.error),y=()=>g(d,R.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return r("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,r("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!u&&o(Qt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&o("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:r(x,{children:[o(P,{}),o(N,{children:i("conversation.stopped")}),o(C,{children:o(h,{size:"sm",variant:"outline",onClick:y,children:i("conversation.reconnect")})})]})}),u?E??o(H,{className:"flex-1",children:r(O,{children:[o(S,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(k,{children:i("conversation.welcomeDescription")})]})}):o(Wt,{session:t,timeline:m}),o(Rt,{sessionId:t.id}),t.readOnly?o("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:r(x,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[r("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),r("div",{className:"min-w-0 space-y-1",children:[o(N,{children:i("conversation.readOnlyTitle")}),o(C,{children:i("conversation.readOnlyDescription")}),v&&o("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),r("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[o(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??o(Ft,{session:t})]}),T]})}
|
|
2
|
+
export{br};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function nn({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{nn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Ho({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(d,{size:"sm",children:[e(C,{children:[a(s,{children:i("approval.needed")}),a(m,{children:r})]}),a(c,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(v,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(p,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
|
|
2
|
+
export{Ho};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function vi(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{vi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-mv51zgj1.js";import{Je}from"./chunk-4ygyb91q.js";import{m,B}from"./chunk-p8g927x6.js";import{e}from"./chunk-y6kzbbya.js";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{inSessionTree as z}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as q,ChevronRightIcon as E,GitBranchIcon as O,Loader2Icon as R,SquareIcon as T}from"lucide-react";import{useId as j,useState as p}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function Qe({sessionId:t}){let r=n((a)=>a.sessions),c=Object.values(r).filter((a)=>a.subagent?.parentId===t);if(c.length===0)return null;return s("div",{"data-subagent-sessions":!0,className:"min-w-0",children:c.map((a)=>s(D,{session:a},a.id))})}function D({session:t}){let{client:r,host:c}=e(),{t:a}=c,v=n((i)=>i.actions),w=n((i)=>i.sessions),I=n((i)=>i.connection==="ready"),d=v.filter((i)=>z(w,t.id,i.sessionId)).length,[l,S]=p(!1),[g,f]=p(!1),[x,h]=p(null),b=j(),u=m(t.configOptions,"model"),k=!t.attached?"detached":d>0?"requires_action":t.state==="unknown"?"unknown":t.error?"failed":t.state,y=I&&t.attached&&t.subagent?.capabilities?.cancel!=null&&t.state!=="idle",C=async()=>{f(!0),h(null);try{await r.cancel(t.id)}catch(i){h(i instanceof Error?i.message:String(i))}finally{f(!1)}};return o("section",{"aria-label":t.title??a("subagents.untitled"),className:"min-w-0",children:[o("div",{className:"flex min-w-0 items-center gap-1",children:[o(N,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":l,"aria-controls":b,onClick:()=>S(!l),children:[l?s(q,{className:"size-3.5 shrink-0"}):s(E,{className:"size-3.5 shrink-0"}),s(O,{className:"text-muted-foreground size-3.5 shrink-0"}),s("span",{className:"truncate",children:t.title??a("subagents.untitled")}),o("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[a(`subagents.${k}`),d>0?` · ${d}`:""]})]}),y&&s(N,{variant:"ghost",size:"icon-sm",disabled:g,"aria-label":a("subagents.cancel",{name:t.title??a("subagents.untitled")}),onClick:()=>{C()},children:g?s(R,{className:"size-3.5 animate-spin"}):s(T,{className:"size-3.5"})})]}),x&&s("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:x}),l&&o("div",{id:b,className:"min-w-0 ps-4",children:[(t.subagent?.description||u)&&o("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:t.subagent?.description??void 0,children:t.subagent?.description}),u&&s("span",{className:"shrink-0",children:B(u)})]}),t.items.length>0?s("div",{className:"flex max-h-72 min-h-0 flex-col",children:s(Je,{session:t,client:r,host:c})}):s("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:a("subagents.noMessages")}),s(Qe,{sessionId:t.id})]})]})}
|
|
2
|
+
export{Qe};
|