@alwith/module-chat 0.5.22 → 0.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.d.ts +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-0p6y2t9b.js +2 -0
- package/dist/{chunk-dya74vts.js → chunk-0pzyavch.js} +2 -2
- package/dist/{chunk-xgjkj9j8.js → chunk-0wa9yjg3.js} +2 -2
- package/dist/chunk-1e0e41vw.js +2 -0
- package/dist/{chunk-r9dt4bs3.js → chunk-1k21j77z.js} +2 -2
- package/dist/chunk-1kbxsxft.js +2 -0
- package/dist/chunk-1mn2t6ga.js +2 -0
- package/dist/{chunk-2tce3pc5.js → chunk-1qyxrh0n.js} +3 -3
- package/dist/{chunk-2f1qx13s.js → chunk-1rg3nab3.js} +2 -2
- package/dist/{chunk-xrs7x5ah.js → chunk-1vf83jdk.js} +2 -2
- package/dist/{chunk-1ppfn0e1.js → chunk-2f9vjmxz.js} +2 -2
- package/dist/chunk-2rkrmpa7.js +2 -0
- package/dist/{chunk-8hte6dh7.js → chunk-36m8zstj.js} +2 -2
- package/dist/chunk-3bsk6xcf.js +2 -0
- package/dist/{chunk-0mp7tyea.js → chunk-3cssygmg.js} +2 -2
- package/dist/{chunk-9sq2etjk.js → chunk-3e6wcamp.js} +2 -2
- package/dist/{chunk-8t36vprh.js → chunk-3ka3bt0t.js} +2 -2
- package/dist/{chunk-xmstt6hh.js → chunk-3s94ekrs.js} +2 -2
- package/dist/{chunk-dv65h7z5.js → chunk-3vkkmyjm.js} +2 -2
- package/dist/{chunk-23rjsm3a.js → chunk-3yxjh7b1.js} +2 -2
- package/dist/{chunk-8jxcdap5.js → chunk-42atrgm1.js} +2 -2
- package/dist/{chunk-mg2mkzkk.js → chunk-48fj5m0p.js} +2 -2
- package/dist/{chunk-156m3888.js → chunk-4a46cpnm.js} +3 -3
- package/dist/{chunk-1e6x0018.js → chunk-4bb6dzzs.js} +2 -2
- package/dist/chunk-4r7j0ymq.js +2 -0
- package/dist/{chunk-e9ntencj.js → chunk-509kwzxq.js} +2 -2
- package/dist/{chunk-m2b8kzpk.js → chunk-5a6xc345.js} +2 -2
- package/dist/chunk-5ap6fvrp.js +2 -0
- package/dist/chunk-60neqgfx.js +2 -0
- package/dist/{chunk-nxp1b8ny.js → chunk-667z0pac.js} +2 -2
- package/dist/chunk-6dbswsek.js +2 -0
- package/dist/{chunk-3jcmv5qf.js → chunk-6t5war9h.js} +2 -2
- package/dist/chunk-6trv0snh.js +2 -0
- package/dist/{chunk-mcjwwxa1.js → chunk-7170hbdr.js} +2 -2
- package/dist/{chunk-f28hhbf4.js → chunk-74qvpvzv.js} +2 -2
- package/dist/{chunk-jm6zja6h.js → chunk-76a04a6j.js} +2 -2
- package/dist/{chunk-0gy6ngda.js → chunk-7absxkjt.js} +2 -2
- package/dist/chunk-7k64wn19.js +4 -0
- package/dist/{chunk-k7k6qsqh.js → chunk-7z4gtfkd.js} +2 -2
- package/dist/{chunk-nq7gg9vg.js → chunk-855w49k0.js} +2 -2
- package/dist/chunk-8dbx6g7q.js +2 -0
- package/dist/{chunk-a8p82wp7.js → chunk-8hf11jas.js} +2 -2
- package/dist/{chunk-xyvqcpjx.js → chunk-92xxp77d.js} +2 -2
- package/dist/{chunk-0fs2k5fe.js → chunk-95mynf7q.js} +2 -2
- package/dist/{chunk-memvzzc6.js → chunk-988sgbn9.js} +2 -2
- package/dist/chunk-99fh3f1v.js +2 -0
- package/dist/{chunk-p4bb313p.js → chunk-9j9rx57q.js} +3 -3
- package/dist/chunk-9tn2n7xv.js +2 -0
- package/dist/chunk-9tp0z23q.js +2 -0
- package/dist/chunk-a1czzft3.js +2 -0
- package/dist/chunk-a4apcx3e.js +3 -0
- package/dist/{chunk-77j8n5k5.js → chunk-a63k8tht.js} +2 -2
- package/dist/{chunk-ap0vmczf.js → chunk-acb8t4jt.js} +2 -2
- package/dist/{chunk-2nvsvw67.js → chunk-agqnt7xq.js} +2 -2
- package/dist/{chunk-8c042xya.js → chunk-apyfztsv.js} +2 -2
- package/dist/chunk-ar4a6nyv.js +2 -0
- package/dist/{chunk-aza82m2p.js → chunk-azfmr99x.js} +2 -2
- package/dist/{chunk-0vhkv9ax.js → chunk-b12v22de.js} +2 -2
- package/dist/chunk-b13pahat.js +2 -0
- package/dist/{chunk-w9dh298r.js → chunk-bg03czcx.js} +2 -2
- package/dist/chunk-bmey8et5.js +2 -0
- package/dist/{chunk-5cdr7q6f.js → chunk-bnbc6q4p.js} +3 -3
- package/dist/{chunk-n3xhh6ch.js → chunk-btanfat4.js} +2 -2
- package/dist/{chunk-67hrx4kg.js → chunk-bvgqsaey.js} +2 -2
- package/dist/chunk-c32z3wjq.js +2 -0
- package/dist/{chunk-1q2cykp4.js → chunk-ckyat78p.js} +2 -2
- package/dist/chunk-cqnqwa54.js +2 -0
- package/dist/{chunk-aqvy57zs.js → chunk-cw76pj9b.js} +2 -2
- package/dist/{chunk-40bcp4pa.js → chunk-d8q2qv1m.js} +2 -2
- package/dist/{chunk-vyk4zh1m.js → chunk-ddk8v2g9.js} +7 -7
- package/dist/{chunk-vs02ry2r.js → chunk-ddv00vjf.js} +2 -2
- package/dist/{chunk-m7wn4z9x.js → chunk-drhzcs6e.js} +2 -2
- package/dist/{chunk-nqw4deag.js → chunk-dte0n4kf.js} +2 -2
- package/dist/chunk-dy92pv7q.js +2 -0
- package/dist/{chunk-63kxepkh.js → chunk-ececn091.js} +2 -2
- package/dist/chunk-f1gj3yzt.js +2 -0
- package/dist/{chunk-0gersbj0.js → chunk-f1x483c9.js} +2 -2
- package/dist/{chunk-dyrgfdxz.js → chunk-f2w2sct6.js} +2 -2
- package/dist/{chunk-mgm1x3de.js → chunk-f5gsffbv.js} +2 -2
- package/dist/{chunk-00eytt1z.js → chunk-fmjez7xp.js} +2 -2
- package/dist/{chunk-vcy5vyp7.js → chunk-fnpf84rf.js} +2 -2
- package/dist/{chunk-3aq5c12k.js → chunk-g2qcyqc6.js} +2 -2
- package/dist/chunk-g2zznfan.js +2 -0
- package/dist/{chunk-hv1ejvhg.js → chunk-g44hhdha.js} +2 -2
- package/dist/{chunk-z2v008kc.js → chunk-gha517v4.js} +2 -2
- package/dist/{chunk-fke98cj0.js → chunk-gsfgdnfp.js} +2 -2
- package/dist/chunk-h9v3pks1.js +1 -0
- package/dist/{chunk-x334e7wb.js → chunk-hdw3mwmb.js} +3 -3
- package/dist/{chunk-8w22ck92.js → chunk-heyqzkxq.js} +2 -2
- package/dist/{chunk-xktybk48.js → chunk-hxtxrtpm.js} +2 -2
- package/dist/chunk-j0m35s05.js +2 -0
- package/dist/{chunk-4s6gx750.js → chunk-j322kgxf.js} +2 -2
- package/dist/{chunk-k5rkpqbh.js → chunk-jgd6dcgy.js} +2 -2
- package/dist/chunk-jhzs9ab0.js +2 -0
- package/dist/chunk-jm6zxy9h.js +2 -0
- package/dist/chunk-jmb8r6aj.js +2 -0
- package/dist/{chunk-42nhwnbe.js → chunk-jwt7q6yx.js} +4 -4
- package/dist/{chunk-983gkw32.js → chunk-jxntqarp.js} +2 -2
- package/dist/{chunk-6dn3j8a2.js → chunk-k7ye738q.js} +2 -2
- package/dist/{chunk-72x7rae0.js → chunk-kc56dhwd.js} +2 -2
- package/dist/{chunk-42hkbpey.js → chunk-kmdag4vy.js} +2 -2
- package/dist/{chunk-n929wkw7.js → chunk-kz1kjzmq.js} +2 -2
- package/dist/{chunk-z2fjwkmt.js → chunk-m0834n5y.js} +2 -2
- package/dist/{chunk-qwfwxfhn.js → chunk-m271yxxm.js} +2 -2
- package/dist/{chunk-zxkvvecz.js → chunk-mj7094yh.js} +2 -2
- package/dist/{chunk-j86x2rn0.js → chunk-mnzqtg7h.js} +2 -2
- package/dist/{chunk-nn25kjm4.js → chunk-mvs2dzyt.js} +2 -2
- package/dist/chunk-mz8a6292.js +2 -0
- package/dist/{chunk-sy5tq3y6.js → chunk-n2e3a7n4.js} +2 -2
- package/dist/{chunk-n0khj68q.js → chunk-n625g0h1.js} +2 -2
- package/dist/{chunk-1f628zap.js → chunk-n66yy1m1.js} +2 -2
- package/dist/chunk-nj9y0bwb.js +2 -0
- package/dist/chunk-nwtambg5.js +2 -0
- package/dist/{chunk-82xjggwn.js → chunk-p7dd93e5.js} +2 -2
- package/dist/chunk-pbf73n1s.js +3 -0
- package/dist/chunk-pk2rvqd0.js +2 -0
- package/dist/{chunk-1tkzxktd.js → chunk-pmkk6e5x.js} +2 -2
- package/dist/{chunk-7wk3d01c.js → chunk-pprt7ntb.js} +4 -4
- package/dist/{chunk-ns5rnxdj.js → chunk-pwjz3yxb.js} +2 -2
- package/dist/chunk-pz0v5f2k.js +2 -0
- package/dist/{chunk-z71pp1mb.js → chunk-pzjag1mt.js} +3 -3
- package/dist/chunk-q9zawfn1.js +2 -0
- package/dist/{chunk-141kppzb.js → chunk-qd1z91fm.js} +1 -1
- package/dist/{chunk-k5wgf59a.js → chunk-qdg5zphd.js} +2 -2
- package/dist/{chunk-2tkeevm0.js → chunk-qmzb07jg.js} +2 -2
- package/dist/chunk-qn6ppn0r.js +2 -0
- package/dist/{chunk-v4t0p6pp.js → chunk-qtp1xer1.js} +2 -2
- package/dist/{chunk-8ch9444t.js → chunk-qwfw4xpn.js} +2 -2
- package/dist/{chunk-b2wczqtd.js → chunk-r19q0w11.js} +2 -2
- package/dist/{chunk-x2yc5748.js → chunk-rbv1scqm.js} +2 -2
- package/dist/{chunk-xf36kt74.js → chunk-rjw63t34.js} +3 -3
- package/dist/{chunk-33620ca6.js → chunk-rr36dnn9.js} +2 -2
- package/dist/{chunk-mwpchd85.js → chunk-sqjgh9e2.js} +3 -3
- package/dist/{chunk-b614gnnv.js → chunk-swpy2b9a.js} +2 -2
- package/dist/{chunk-s55n9cby.js → chunk-t2q8cxnh.js} +2 -2
- package/dist/{chunk-c38t8809.js → chunk-t6vcdf4j.js} +2 -2
- package/dist/{chunk-7p1r1ha9.js → chunk-t7drk9ja.js} +2 -2
- package/dist/chunk-tgskd2p2.js +2 -0
- package/dist/chunk-tpbqg729.js +2 -0
- package/dist/{chunk-t97yjy4f.js → chunk-ttqy9d4r.js} +2 -2
- package/dist/{chunk-w6rwngm3.js → chunk-tv0fwt2g.js} +2 -2
- package/dist/{chunk-y7xcync7.js → chunk-v5mzxjzc.js} +2 -2
- package/dist/{chunk-w0hpztj7.js → chunk-vfhxerxt.js} +2 -2
- package/dist/chunk-vnsgjnp3.js +2 -0
- package/dist/{chunk-59957gfy.js → chunk-vt6cyes7.js} +2 -2
- package/dist/chunk-wb8sf2ww.js +2 -0
- package/dist/{chunk-g73f62qm.js → chunk-wgrmjfyp.js} +2 -2
- package/dist/chunk-wm0jty6e.js +2 -0
- package/dist/{chunk-h5m2fpp4.js → chunk-wvry7t79.js} +2 -2
- package/dist/chunk-x2jd9bpn.js +3 -0
- package/dist/{chunk-x6nz6eyb.js → chunk-x3y5htkt.js} +2 -2
- package/dist/{chunk-cbwya2ss.js → chunk-yakar0e2.js} +2 -2
- package/dist/{chunk-3yvd77ph.js → chunk-yg3xhn5m.js} +2 -2
- package/dist/{chunk-dyqvhn6y.js → chunk-ypk1gwzc.js} +5 -5
- package/dist/{chunk-et8rcxw6.js → chunk-z3nybrbb.js} +2 -2
- package/dist/{chunk-rcbb4ke2.js → chunk-z7sswh39.js} +2 -2
- package/dist/chunk-zxp0mb14.js +2 -0
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.d.ts +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.d.ts +3 -3
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.d.ts +3 -3
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +3 -3
- package/rust/Cargo.lock +484 -10
- package/rust/Cargo.toml +16 -1
- package/rust/src/__tests__/native_network.rs +406 -0
- package/rust/src/lib.rs +3 -0
- package/rust/src/native_network.rs +302 -0
- package/rust/src/native_network_diagnostics.rs +220 -0
- package/rust/src/providers/tests.rs +4 -1
- package/rust/src/system_proxy.rs +257 -0
- package/dist/chunk-14exd146.js +0 -2
- package/dist/chunk-2ce8gd89.js +0 -2
- package/dist/chunk-3n47hknp.js +0 -2
- package/dist/chunk-52p7kyam.js +0 -2
- package/dist/chunk-59exzf5n.js +0 -2
- package/dist/chunk-5nc3dtyt.js +0 -2
- package/dist/chunk-78s6h7r4.js +0 -2
- package/dist/chunk-80ckz04b.js +0 -2
- package/dist/chunk-85ffkcch.js +0 -2
- package/dist/chunk-8qw8erv6.js +0 -2
- package/dist/chunk-908ndb9r.js +0 -2
- package/dist/chunk-9g67z1b4.js +0 -2
- package/dist/chunk-9n79tr1q.js +0 -2
- package/dist/chunk-ajpxjj5m.js +0 -2
- package/dist/chunk-b3jg6nzv.js +0 -3
- package/dist/chunk-c1b8z8pa.js +0 -2
- package/dist/chunk-c9nbavk0.js +0 -2
- package/dist/chunk-cg8ekwka.js +0 -2
- package/dist/chunk-ec9rgnt3.js +0 -2
- package/dist/chunk-efrn25h9.js +0 -2
- package/dist/chunk-emcefs0g.js +0 -2
- package/dist/chunk-f3924gdb.js +0 -2
- package/dist/chunk-f8zy35gz.js +0 -2
- package/dist/chunk-f98at4r5.js +0 -2
- package/dist/chunk-g242n3dt.js +0 -2
- package/dist/chunk-h1bhhqtq.js +0 -2
- package/dist/chunk-kc5k5e59.js +0 -3
- package/dist/chunk-kvc6ewkt.js +0 -4
- package/dist/chunk-kxmajv0m.js +0 -3
- package/dist/chunk-myrdfa3s.js +0 -2
- package/dist/chunk-nacjea1s.js +0 -2
- package/dist/chunk-py837qjk.js +0 -1
- package/dist/chunk-q7nn5xe5.js +0 -2
- package/dist/chunk-qjhkzdhm.js +0 -2
- package/dist/chunk-qxcnyvps.js +0 -2
- package/dist/chunk-r3qrftds.js +0 -2
- package/dist/chunk-r8rre2zb.js +0 -2
- package/dist/chunk-rbqn4725.js +0 -2
- package/dist/chunk-rekc1q3m.js +0 -2
- package/dist/chunk-rwkkqdcv.js +0 -2
- package/dist/chunk-rwnz06kr.js +0 -2
- package/dist/chunk-sxh0pd3y.js +0 -2
- package/dist/chunk-t0cr21e3.js +0 -2
- package/dist/chunk-vkrgdqnm.js +0 -2
- package/dist/chunk-wvdncbrt.js +0 -2
- package/dist/chunk-ye9tsdhn.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-jm6zxy9h.js";import{e}from"./chunk-j0m35s05.js";import{Le,Ye,be}from"./chunk-9j9rx57q.js";import{Qe}from"./chunk-ttqy9d4r.js";import{inSessionTree as c}from"@nyssance/codex-acp-v2/client";import{jsx as o,jsxs as u,Fragment as x}from"react/jsx-runtime";var p=[];function Rt({sessionId:s}){let i=n((t)=>t.sessions),{host:f}=e(),a=n((t)=>t.actions),d=a.some((t)=>c(i,s,t.sessionId))?a.filter((t)=>c(i,s,t.sessionId)):p,r=d.filter(Le).filter((t)=>{if(t.sessionId!==s||i[s]?.subagent!==void 0)return!0;let l=t.params._meta?.codex;return!(typeof l==="object"&&l!==null&&("delivery"in l)&&l.delivery==="async")}),m=d.filter((t)=>!Le(t));return u(x,{children:[o("div",{className:"mx-auto max-h-[50vh] w-full max-w-3xl shrink-0 overflow-y-auto px-3","data-subagent-shelf":!0,children:o(Qe,{sessionId:s})}),m.length>0&&o("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:m.map((t)=>u("div",{children:[t.sessionId!==s&&o("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":i[t.sessionId]?.title??f.t("subagents.untitled")}),o(be,{action:t})]},t.id))}),r[0]!==void 0&&o(Ye,{action:r[0],total:r.length},r[0].id)]})}
|
|
2
|
+
export{Rt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";function at({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
|
|
2
|
+
export{at};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Tr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Uo(e){return[...e].toSorted((o,n)=>(Tr[o.kind]??99)-(Tr[n.kind]??99))}function oa(e){return e==="allow_once"||e==="allow_always"}function ia(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{Tr,Uo,oa,ia};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{pn}from"./chunk-3s94ekrs.js";import{w}from"./chunk-b12v22de.js";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as W,DropdownMenuCheckboxItem as Z,DropdownMenuContent as q,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuLabel as L,DropdownMenuSeparator as u,DropdownMenuSub as C,DropdownMenuSubContent as T,DropdownMenuSubTrigger as O,DropdownMenuTrigger as H}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as ue}from"@nyssance/shadcn/vega/components/ui/switch";import{Tooltip as J,TooltipContent as K,TooltipTrigger as Q}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as r}from"cn";import{ArrowUpRight as pe,ChevronUp as X,Loader2Icon as Y,Zap as E}from"lucide-react";import{Fragment as ce,useState as ee}from"react";import{jsx as e,jsxs as a,Fragment as p}from"react/jsx-runtime";function Do({value:c,onChange:ne,models:v,modelGroups:V,compactCatalog:t,effortPresentation:j="slider",unavailableEffort:N,providerMenu:h,header:g,className:B,condensed:z,stripLabelPrefix:_,showDescription:ae,showModelList:se=!0,loading:ie,switching:G,isLoading:oe,effortConfig:s,booleanOptions:f,onBooleanChange:R,selectOptions:te=[],t:m,...d}){let[le,de]=ee(!1),[re,me]=ee(!1),l=f?.find((n)=>n.id==="fast_mode"),I=t?f?.filter((n)=>n!==l):f,P=(n)=>_&&n.startsWith(_)?n.slice(_.length):n;if(ie)return e("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:a(A,{variant:"ghost",disabled:!0,className:r("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",B),children:[e(Y,{className:"size-3 animate-spin"}),e("span",{className:"text-muted-foreground truncate",children:m("model.loadingModels")})]})});return a("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[h&&a(W,{open:le,onOpenChange:de,children:[a(J,{children:[e(Q,{render:e(H,{render:a(A,{"data-testid":"provider-trigger",variant:"ghost",disabled:d.disabled,className:r("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[h.icon,e(X,{className:"size-2.5 shrink-0 opacity-60"})]})})}),e(K,{children:m("model.switchProvider")})]}),a(q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((n,o)=>a(ce,{children:[o>0&&n.length>0&&e(u,{}),e(w,{value:h.value,onValueChange:h.onChange,options:n})]},o)),h.moreAction&&a(p,{children:[e(u,{}),a(k,{onClick:h.moreAction,className:"whitespace-nowrap",children:[e("span",{className:"min-w-0 flex-1 truncate",children:m("model.moreModels")}),e(pe,{className:"size-4"})]})]})]})]}),a(W,{open:re,onOpenChange:me,children:[a(J,{children:[e(Q,{render:e(H,{render:a(A,{"data-testid":"model-trigger","aria-busy":G,variant:"ghost",className:r("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",z&&"h-7 gap-1 px-1.5 text-[11px]",B),...d,children:[c.icon,f?.some((n)=>n.id==="fast_mode"&&n.currentValue&&!n.disabled)&&e(E,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),e("span",{className:r("min-w-0 flex-1 truncate text-start",z&&"text-[11px]"),children:P(c.label)||m("model.selectModel")}),s&&a("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[e("span",{className:"invisible col-start-1 row-start-1",children:s.sizer??s.levels.reduce((n,o)=>o.name.length>n.length?o.name:n,"")}),e("span",{className:"col-start-1 row-start-1",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),G?e(Y,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(X,{className:r("size-3 shrink-0",z&&"size-2.5")})]})})}),e(K,{children:m("model.switchModel")})]}),a(q,{side:"top",align:"end",sideOffset:4,className:r("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",t&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[t&&a(p,{children:[a(y,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-2 py-1",children:[s?j==="slider"?e("div",{role:"menuitem","aria-label":s.name,className:"min-w-0 flex-1 [&>div]:justify-between [&>div]:gap-3 [&>div]:px-0 [&>div]:py-1.5",children:e(pn,{...s,disabled:d.disabled})}):a(C,{children:[a(O,{disabled:d.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[e("span",{children:s.name}),e("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(T,{children:e(w,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):N?a(k,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[e("span",{children:N.name}),e("span",{className:"text-muted-foreground truncate text-xs",children:N.label})]}):e(L,{className:"min-w-0 flex-1 truncate",children:g?.name}),l&&e(Z,{"aria-label":l.name,title:l.title??l.name,disabled:d.disabled||l.disabled,checked:l.currentValue,closeOnClick:!1,onCheckedChange:(n)=>R?.(l.id,n),className:r("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ms-auto -me-2 size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",l.currentValue&&!l.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:l.icon??e(E,{className:"size-4","aria-hidden":"true"})})]}),e(u,{className:"shrink-0"})]}),g&&!t&&a(p,{children:[a("div",{className:"flex items-center gap-2 px-2 py-2",children:[g.icon,e("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:g.name}),g.action]}),e(u,{})]}),a(y,{"data-model-menu-list":t?"":void 0,className:t?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[se&&(oe?e(k,{disabled:!0,className:"text-muted-foreground",children:m("model.loadingModels")}):v.length===0?e(k,{disabled:!0,className:"text-muted-foreground",children:m("model.noModelsAvailable")}):(()=>{let n=v.filter((i)=>!i.more),o=v.filter((i)=>i.more),F=n.length>0&&o.length>0,M=(i,b)=>({disabled:d.disabled,icon:i.icon,value:i.api_id,label:P(i.label),description:b?.noDescription?void 0:ae?i.description:void 0}),D=(i)=>{let b=v.find((S)=>S.api_id===i);if(b)ne(b)};if(t)return e(w,{value:c.api_id,onValueChange:D,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:v.map((i)=>M(i))});return a(p,{children:[V?V.map((i)=>{let b=i.models.filter((x)=>!x.more),S=i.models.filter((x)=>x.more),U=b.length>0&&S.length>0;return a(y,{children:[e(L,{className:"text-muted-foreground text-xs font-normal",children:i.name}),e(w,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(U?b:i.models).map((x)=>M(x))}),U&&a(C,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(w,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:S.map((x)=>M(x,{noDescription:!0}))})})]})]},i.id)}):e(w,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(F?n:v).map((i)=>M(i))}),!V&&F&&a(C,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(w,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:o.map((i)=>M(i,{noDescription:!0}))})})]})]})})()),!t&&s&&a(p,{children:[e(u,{}),j==="menu"?a(C,{children:[a(O,{disabled:d.disabled,children:[e("span",{className:"flex-1",children:s.name}),e("span",{className:"text-muted-foreground",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(T,{children:e(w,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(pn,{...s,disabled:d.disabled})]}),!t&&!s&&N&&a(p,{children:[e(u,{}),a(k,{disabled:!0,children:[e("span",{className:"flex-1",children:N.name}),e("span",{children:N.label})]})]}),te.map((n)=>a(y,{children:[e(u,{}),e(L,{children:n.name}),e(w,{value:n.value,onValueChange:n.onChange,options:n.options,itemClassName:"whitespace-nowrap"})]},n.id)),I&&I.length>0&&a(p,{children:[!s&&e(u,{}),I.map((n)=>t?a(Z,{"aria-label":n.name,title:n.title,disabled:d.disabled||n.disabled,checked:n.currentValue,closeOnClick:!1,onCheckedChange:(o)=>R?.(n.id,o),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[a("span",{className:"flex items-center gap-2",children:[n.icon,n.name]}),e("span",{"aria-hidden":"true",className:r("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",n.currentValue?"bg-primary":"bg-input"),children:e("span",{className:r("bg-background size-3.5 rounded-full shadow-xs transition-transform",n.currentValue&&"translate-x-3.5")})})]},n.id):a("div",{title:n.title,className:r("flex items-center justify-between gap-3 px-2 py-2.5",n.disabled&&"opacity-50"),children:[a("span",{className:"flex items-center gap-2 text-sm font-medium",children:[n.icon,n.name]}),e(ue,{"aria-label":n.name,disabled:d.disabled||n.disabled,checked:n.currentValue,onCheckedChange:(o)=>R?.(n.id,o)})]},n.id))]})]}),t&&g?.action&&a(p,{children:[e(u,{className:"shrink-0"}),e(y,{"data-model-menu-footer":!0,className:"shrink-0",children:g.action})]})]})]})]})}
|
|
2
|
+
export{Do};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{C}from"./chunk-heyqzkxq.js";import{s,u}from"./chunk-1mn2t6ga.js";import{_,p}from"./chunk-a1czzft3.js";import{GlobeIcon as b,LogOutIcon as x}from"lucide-react";import{useState as M}from"react";import{Avatar as A,AvatarFallback as N,AvatarImage as y}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as h,DropdownMenuContent as S,DropdownMenuGroup as c,DropdownMenuItem as L,DropdownMenuLabel as P,DropdownMenuRadioGroup as I,DropdownMenuRadioItem as O,DropdownMenuSeparator as d,DropdownMenuSub as G,DropdownMenuSubContent as k,DropdownMenuSubTrigger as R,DropdownMenuTrigger as T}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function gr(e){return o(c,{...e})}function fr(e){return o(d,{...e})}function oo({className:e,...r}){return o(L,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function hr({languages:e,value:r,onChange:i}){let a=s();return n(G,{children:[n(R,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(b,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(k,{children:o(I,{value:r,onValueChange:(t)=>void u(a,Promise.resolve(i(t))),children:e.map((t)=>o(O,{value:t.code,children:t.label},t.code))})})]})}function vr({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:w}=t,[m,v]=M(!1),[D,l]=M(!1);C(m);let g=a||D,f=n(A,{className:"size-[18px] after:border-0",children:[o(y,{src:e.avatar??void 0,alt:""}),o(N,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(h,{open:m,onOpenChange:v,children:[n(T,{render:o(p,{disabled:g,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(_,{children:f}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(S,{side:"top",align:"start",sideOffset:8,className:"w-[calc(var(--anchor-width)+36px)]",children:[n(c,{children:[n(P,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[f,n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(d,{})]}),r,r!=null&&o(d,{}),o(c,{children:n(oo,{disabled:g,onClick:()=>{l(!0),u(t,i()).finally(()=>l(!1))},children:[o(x,{}),w("sessionList.signOut")]})})]})]})}
|
|
2
|
+
export{gr,fr,oo,hr,vr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Li}from"./chunk-kz1kjzmq.js";import{Ei,it}from"./chunk-wm0jty6e.js";import{Button as et}from"@nyssance/shadcn/vega/components/ui/button";import{cn as rt}from"cn";import{LoaderCircleIcon as nt,SearchIcon as ot}from"lucide-react";import{useCallback as _,useEffect as f,useMemo as J,useRef as b,useState as v}from"react";import{jsx as H,jsxs as q,Fragment as st}from"react/jsx-runtime";var V="chat-search",W="chat-search-current",X=150;function ga(o){let r=o??"";return[...document.querySelectorAll("[data-chat-scroll]")].find((l)=>l.dataset.chatScroll===r)??null}var lt=12;function Lr(o,r="center"){let l=o.closest("[data-chat-scroll]");if(!l)return;let g=o.getBoundingClientRect(),y=l.getBoundingClientRect(),m=r==="start"?lt:(l.clientHeight-g.height)/2;l.scrollTo({top:l.scrollTop+(g.top-y.top)-m,behavior:"smooth"})}function P(o){let r=o.startContainer.parentElement;if(!r)return;Lr(r)}var M=new Map;function Y(){if(typeof CSS>"u"||!("highlights"in CSS)||typeof Highlight>"u")return;if(M.size===0){CSS.highlights.delete(V),CSS.highlights.delete(W);return}let o=[...M.values()];CSS.highlights.set(V,new Highlight(...o.flatMap((r)=>r.all))),CSS.highlights.set(W,new Highlight(...o.flatMap((r)=>r.current?[r.current]:[])))}function ct(){let o=Symbol();return{clearHighlights:()=>{M.delete(o),Y()},applyHighlights:(r,l)=>{M.set(o,{all:r,current:l}),Y()}}}function Ai({getViewport:o,findSourceMatches:r,revealTurn:l,prepareSource:g,subscribeOpen:y,labels:m,placement:K="header"}){let{clearHighlights:s,applyHighlights:p}=J(ct,[]),S=r!==void 0,[c,R]=v(!1),[i,O]=v(""),[z,T]=v(!1),[D,L]=v(null),G=i.trim().length>0;f(()=>{if(!c||!G||g===void 0){T(!1),L(null);return}let e=new AbortController;return T(!0),L(null),g(e.signal).catch((t)=>{if(!e.signal.aborted)L(t instanceof Error?t.message:String(t))}).finally(()=>{if(!e.signal.aborted)T(!1)}),()=>e.abort()},[G,c,g]);let u=J(()=>c&&i.trim()&&r?r(i.trim()):[],[r,c,i]),[F,I]=v(0),[Z,E]=v(0),C=b([]),x=b(0),a=b(null),Q=b(null),U=b(null);f(()=>{if(!y)return;return y(()=>{R(!0);let t=U.current;if(t!==null)t.focus({preventScroll:!0}),t.select()})},[y]);let A=_(async(e,t)=>{let n=u[e];if(n===void 0)return;let h=o();if(h===null)throw Error("Chat scroll container is missing");if(l)await l(n.turnKey,t);if(t.aborted)return;let d=h.querySelector(`[data-turn-key="${CSS.escape(n.turnKey)}"]`);if(d===null)throw Error(`Codex turn is missing: ${n.turnKey}`);if(await Ei(d,t),t.aborted)return;if(!l)Lr(d,"start");if(await new Promise((tt)=>requestAnimationFrame(()=>tt())),t.aborted)return;let N=it(d,i.trim());C.current=N;let B=N[n.occurrenceInTurn];if(p(N,B??null),B!==void 0)P(B)},[p,u,o,i,l]),k=b(A);f(()=>{k.current=A},[A]);let w=_(()=>{R(!1),O(""),x.current=0,a.current?.abort(),a.current=null,s(),C.current=[]},[s]);f(()=>{if(!c)return;let e=(t)=>{if(t.key==="Escape"&&Q.current?.contains(document.activeElement))t.preventDefault(),w()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,w]),f(()=>{if(!c||!i.trim()){s(),C.current=[],I(0),E(0),x.current=0;return}let e=setTimeout(()=>{if(S)return;let t=o();if(!t)return;let n=it(t,i);if(C.current=n,I(n.length),E(0),p(n,n[0]??null),n[0])P(n[0])},X);return()=>{clearTimeout(e),s()}},[p,s,S,c,i,o]),f(()=>{if(!c||!S||!i.trim())return;let e=new AbortController;a.current?.abort(),a.current=e;let t=setTimeout(()=>{C.current=[],x.current=0,I(u.length),E(0),s(),k.current(0,e.signal)},X);return()=>{if(e.abort(),a.current===e)a.current=null;clearTimeout(t),s()}},[s,u.length,S,c,i]),f(()=>()=>{a.current?.abort(),s()},[s]),f(()=>{if(!c)s()},[s,c]);let j=_((e)=>{if(S){if(u.length===0)return;let n=(x.current+(e?-1:1)+u.length)%u.length;x.current=n,E(n),a.current?.abort();let h=new AbortController;a.current=h,k.current(n,h.signal);return}let t=C.current;if(!t.length)return;E((n)=>{let h=(n+(e?-1:1)+t.length)%t.length,d=t[h];return p(t,d),P(d),h})},[p,u.length,S]);return q(st,{children:[K==="header"&&H(et,{variant:"ghost",size:"icon-sm",title:m.search,onClick:()=>c?w():R(!0),children:H(ot,{})}),c&&q("div",{"data-chat-search":!0,"aria-busy":z||void 0,ref:Q,className:rt("bg-background border-b",K==="body"?"relative shrink-0":"absolute inset-x-0 top-full z-30"),children:[H(Li,{ref:U,value:i,onChange:O,onFind:j,onClose:w,placeholder:m.placeholder,prevTitle:m.previous,nextTitle:m.next}),i.trim()&&q("div",{className:"text-muted-foreground border-border border-t px-3 py-1 text-[11px]",children:[z?H(nt,{"aria-hidden":"true",className:"size-3 animate-spin"}):F===0?"0 / 0":`${Z+1} / ${F}`,D!==null&&H("span",{role:"alert",children:D})]})]})]})}
|
|
2
|
+
export{ga,Lr,Ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Do}from"./chunk-ckyat78p.js";import{n}from"./chunk-jm6zxy9h.js";import{e,g}from"./chunk-j0m35s05.js";import{B,m,G}from"./chunk-v5mzxjzc.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 I}from"react/jsx-runtime";function qt({sessionId:l,options:p,disabled:x,onModelChange:b,onConfigChange:O,defaultGroup:L={id:"models",name:"Models"},catalog:N=(c)=>c,headerAction:P}){let{host:c,client:k}=e(),{t:i}=c,z=n((o)=>Boolean(o.configPending[l])),M=H({sessionId:l,model:!0}),v=z&&(M.current.sessionId!==l||M.current.model),R=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=m(p,"model"),a=m(p,"thought_level"),_=p.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),S=_.filter(D),f=_.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):k.setConfig(l,o.configId,r);return g(c,d),d},h=a?B(a):[],E=h.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),U=t?G(t):i("composer.model"),V=(o)=>({api_id:o.value,label:o.name}),y=N(t&&Z(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(V)})):[{...L,models:t?B(t).map(V):[]}]),w=y.flatMap((o)=>o.models),C=w.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:U},s=f.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return I(Do,{disabled:x||v||R,switching:v,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:P},modelGroups:y,t:i,effortConfig:a&&h.length>0?{name:"Effort",value:a.currentValue,levels:h,sizer:E,onChange:(o)=>u(a,o)}:void 0,selectOptions:S.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:B(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:I(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};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{c,w}from"./chunk-zxkvvecz.js";import{vn}from"./chunk-ns5rnxdj.js";import{L}from"./chunk-156m3888.js";import{R}from"./chunk-s55n9cby.js";import{Te,Ro}from"./chunk-xrs7x5ah.js";import{ee}from"./chunk-jm6zja6h.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as O,useRef as U,useState as _}from"react";import{jsx as n,jsxs as p,Fragment as P}from"react/jsx-runtime";function W(e,t){let[a,o]=_(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var q=new WeakMap,z=1;function b(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=q.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=z;return z+=1,q.set(e,a),`${e.type}:${a}`}function T(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function M({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function K(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function te({block:e}){if(e.type!=="tool_use")return null;if(V(e))return n(K,{});let t=L(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(K,{})}function I(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function we(e){return L(e).target}function j(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function V(e){return j(e)||e.name==="dynamic_tool"}function ne(e,t){let{category:a}=L(e),o=we(e),i=T(e.status);if(V(e))return{leading:e.title};if(a==="execute"){let r=I(e,"command")?.split(`
|
|
2
|
-
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=
|
|
3
|
-
`).trim()}function be(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function
|
|
4
|
-
`)}function
|
|
5
|
-
`)),u(!0),setTimeout(()=>u(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(pe,{}):n(ge,{})})]}),m!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:m}):n(o,{text:m})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function
|
|
6
|
-
`),m=be(e.content),s=$e(e.content),[g,f]=R(`tool:${e.id}`,!1),C=W(`tool:${e.id}`,g),h=L(e),N=h.category,y=ne(e,t),k=N==="execute"?I(e,"command"):void 0;if(e.userShell&&k!==void 0)return n(J,{block:e,command:k});let A=k!==void 0||V(e)||m.length>0||s.length>0||Boolean(l)||u&&d!==void 0,E=!A&&!T(e.status)?h.filePath:void 0;if(N==="execute"&&!T(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(N==="read"&&T(e.status))return null;let S=p("span",{className:"codex-activity-label",children:[n(te,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:T(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(P,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(E!==void 0?p(P,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:E,onClick:()=>a(E),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[A?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[S,n(M,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:S}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(P,{children:[k!==void 0?n(J,{block:e,command:k}):o!==void 0&&l?n(o,{patch:l}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let B=`data:${x.mimeType};base64,${x.data}`,G=n("img",{src:B,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?G:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(B),children:G},B)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function ie({block:e}){if(e.type==="tool_use")return n(oe,{block:e});if(e.type==="thinking")return n(ue,{block:e});if(e.type==="collab")return n(le,{block:e});return n(re,{block:e})}function re({block:e}){let{t,openSession:a}=c(),o=T(e.status),[i,r]=R(`subagent:${e.id}`,o),u=U(o);O(()=>{if(o)r(!0);if(u.current&&!o)r(!1);u.current=o},[o,r]);let d=`${Se(e.activity,o,e.name,t)}${se(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Ee,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(l,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(l,e.name)},children:d})})]}),m&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(oe,{block:s},s.id);if(s.type==="thinking")return n(ue,{block:s},b(s));if(s.type==="subagent")return n(re,{block:s},s.id);if(s.type==="collab")return n(le,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(w,{text:s.text,streaming:!1})},b(s));if(s.type==="plan")return n(ee,{entries:s.entries},b(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},b(s));return null})})})})]})}var Ie=8;function Me(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Ie}function Ee({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Me(e),"aria-hidden":"true"})}function Se(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function se(e,t,a){if(e===null)return"";if(t===null)return` · ${vn(e)}`;let o=_e.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${vn(e)} · ${o}`}var Re={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function de(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=de(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Re[e.tool]}.${o}`)}function Fe(e){return e.agents.filter((t)=>t.nickname!==null)}function ce(e,t){let a=e.agents.length>0?e.agents.length:1;return`${H(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var F="\x01";function D(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${F}${r}${F}`]));return e(t,{...a,...i}).split(new RegExp(`${F}(\\w+)${F}`,"u")).map((r,u)=>n(fe,{children:u%2===1?o[r]:r},`${u}:${r}`))}function De({agent:e,showModel:t}){let{t:a,openSession:o}=c(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&se(e.model,e.reasoningEffort,a)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Pe(e,t){let a=e.prompt?.trim()?e.prompt:null,o=de(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=Fe(e),d=[];if(u.length===0)d.push({key:"generic",node:H(e,"row",t)});for(let l of u){let m=n(De,{agent:l,showModel:e.tool==="spawnAgent"});if(i)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:a})})})});else if(r)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(Q,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&l.state!==null&&l.state!==null?l.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${l.state.status}`),message:l.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${l.state.status}`)}):"";d.push({key:l.threadId,node:D(t,"stream.codex.collab.agentRow",{action:H(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:D(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function le({block:e}){let{t}=c(),[a,o]=R(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=T(e.status),r=ce(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[p("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(M,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Pe(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function ue({block:e}){let{t,i18n:a}=c(),o=Boolean(e.isComplete),[i,r]=R(`thinking:${b(e)}`,!1),u=U(null),d=e.thinking.trim().length>0;O(()=>{if(o||!d)return;let s=u.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let N=s.firstElementChild;if(N===f)return;if(f!==null)g.unobserve(f);if(f=N,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:Z(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?l:n("span",{className:"codex-activity-running",children:l})})}),d&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(w,{text:m,streaming:!o})})})})]})}function Oe(e){if(j(e))return"mcp";let t=L(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ue(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ve(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(j(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(V(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let l=Oe(d);if(!o.has(l))i.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=i.map((d,l)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ue(d.category,o.get(d.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function Eo({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:u,providerIcon:d,children:l}){let{t:m,i18n:s}=c(),[g,f]=R(`work:${e}`,i,!0),C=W(`work:${e}`,g||o),h=U(null),[N,y]=_(0);O(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let A=()=>{let S=h.current;if(S===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-S)};A();let E=window.setInterval(A,1000);return()=>window.clearInterval(E)},[o,r,t]);let k=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:Z(t,s.language)}):o&&N>=1000?m("stream.codex.workingFor",{duration:Z(N,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((A)=>!A),children:[u!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":u,"aria-hidden":"true",children:d}),n("span",{children:k}),n(M,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&l})})})]})}function Ze(e,t){if(e.type==="tool_use")return Le(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ce(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return T(e.status);return!1}function He(e,t,a=1000){let[o,i]=_({text:e,live:t}),r=U(Date.now());return O(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),d=Math.max(0,r.current+a-u);if(d===0||t!==o.live){r.current=u,i({text:e,live:t});return}let l=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function We({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=c(),i=e.some(X),r=b(e[0]),u=e.every((C)=>C.type==="tool_use"&&L(C).category==="execute"),[d,l]=R(`group:${r}`,t&&!u),m=W(`group:${r}`,d),s=e.findLast(X)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=He(i?Ze(s,a):Ve(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(te,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(M,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(ie,{block:C},b(C)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(ie,{block:e[0]});return n(We,{blocks:e,defaultExpanded:t})}function je({blocks:e,defaultExpanded:t}){if(!e.some(Te))return n(Y,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&Te(i[0])===Te(o))i.push(o);else a.push([o])}return n(P,{children:a.map((o)=>Te(o[0])?n(Ro,{blocks:o.filter(Te)},b(o[0])):n(Y,{blocks:o,defaultExpanded:t},b(o[0])))})}
|
|
7
|
-
export{
|
|
1
|
+
import{c,S}from"./chunk-mj7094yh.js";import{bn}from"./chunk-pwjz3yxb.js";import{V}from"./chunk-4a46cpnm.js";import{z}from"./chunk-t2q8cxnh.js";import{Fe,gi}from"./chunk-1vf83jdk.js";import{ie}from"./chunk-76a04a6j.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as D,useRef as P,useState as E}from"react";import{jsx as n,jsxs as p,Fragment as F}from"react/jsx-runtime";function H(e,t){let[a,o]=E(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var G=new WeakMap,q=1;function L(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=G.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=q;return q+=1,G.set(e,a),`${e.type}:${a}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function U(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function B({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function K(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;if(O(e))return n(K,{});let t=V(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(K,{})}function A(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function we(e){return V(e).target}function W(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function O(e){return W(e)||e.name==="dynamic_tool"}function te(e,t){let{category:a}=V(e),o=we(e),i=N(e.status);if(O(e))return{leading:e.title};if(a==="execute"){let r=A(e,"command")?.split(`
|
|
2
|
+
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=A(e,"pattern")??A(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=A(e,"query")??A(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function Le(e,t){let a=te(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function Ne(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
|
|
3
|
+
`).trim()}function be(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function Te(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="audio"?[{data:a.data,mimeType:a.mimeType}]:[]})}function $e(e){if(typeof e==="string"&&e.length>0)return e;return}function ke(e){return e.type==="diff"}function Ae(e){let t=e.content.find(ke);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
|
+
`)}function ne(e){let t=$e(e.rawOutput);if(t!==void 0)return t;let a=Ne(e.content);if(a.length>0)return a;return Ae(e)}function J({block:e,command:t}){let{t:a,Output:o,commandStatus:i}=c(),[r,u]=E(!1),[d,l]=E(!1),m=ne(e),s=i===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):i(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
|
|
5
|
+
`)),u(!0),setTimeout(()=>u(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(pe,{}):n(ge,{})})]}),m!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:m}):n(o,{text:m})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function ae({block:e}){let{t,openLink:a,Patch:o,openImage:i,commandStatus:r,expandToolOutput:u=!1}=c(),d=ne(e),l=o===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let k=x;return k.patch?.text?[k.patch.text]:[]}).join(`
|
|
6
|
+
`),m=be(e.content),s=Te(e.content),[g,f]=z(`tool:${e.id}`,!1),C=H(`tool:${e.id}`,g),h=V(e),w=h.category,y=te(e,t),b=w==="execute"?A(e,"command"):void 0;if(e.userShell&&b!==void 0)return n(J,{block:e,command:b});let T=b!==void 0||O(e)||m.length>0||s.length>0||Boolean(l)||u&&d!==void 0,I=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(w==="read"&&N(e.status))return null;let M=p("span",{className:"codex-activity-label",children:[n(ee,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(F,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(I!==void 0?p(F,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:I,onClick:()=>a(I),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[T?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[M,n(B,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:M}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(F,{children:[b!==void 0?n(J,{block:e,command:b}):o!==void 0&&l?n(o,{patch:l}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let k=`data:${x.mimeType};base64,${x.data}`,j=n("img",{src:k,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?j:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(k),children:j},k)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function oe({block:e}){if(e.type==="tool_use")return n(ae,{block:e});if(e.type==="thinking")return n(ue,{block:e});if(e.type==="collab")return n(le,{block:e});return n(re,{block:e})}function re({block:e}){let{t,openSession:a}=c(),o=N(e.status),[i,r]=z(`subagent:${e.id}`,o),u=P(o);D(()=>{if(o)r(!0);if(u.current&&!o)r(!1);u.current=o},[o,r]);let d=`${Ee(e.activity,o,e.name,t)}${se(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Me,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(l,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(l,e.name)},children:d})})]}),m&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ae,{block:s},s.id);if(s.type==="thinking")return n(ue,{block:s},L(s));if(s.type==="subagent")return n(re,{block:s},s.id);if(s.type==="collab")return n(le,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(S,{text:s.text,streaming:!1})},L(s));if(s.type==="plan")return n(ie,{entries:s.entries},L(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},L(s));return null})})})})]})}var Be=8;function Ie(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Be}function Me({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ie(e),"aria-hidden":"true"})}function Ee(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var Se=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function se(e,t,a){if(e===null)return"";if(t===null)return` · ${bn(e)}`;let o=Se.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${bn(e)} · ${o}`}var _e={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function de(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=de(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${_e[e.tool]}.${o}`)}function Re(e){return e.agents.filter((t)=>t.nickname!==null)}function ce(e,t){let a=e.agents.length>0?e.agents.length:1;return`${Z(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var _="\x01";function R(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${_}${r}${_}`]));return e(t,{...a,...i}).split(new RegExp(`${_}(\\w+)${_}`,"u")).map((r,u)=>n(fe,{children:u%2===1?o[r]:r},`${u}:${r}`))}function De({agent:e,showModel:t}){let{t:a,openSession:o}=c(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&se(e.model,e.reasoningEffort,a)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Pe(e,t){let a=e.prompt?.trim()?e.prompt:null,o=de(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=Re(e),d=[];if(u.length===0)d.push({key:"generic",node:Z(e,"row",t)});for(let l of u){let m=n(De,{agent:l,showModel:e.tool==="spawnAgent"});if(i)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:R(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:a})})})});else if(r)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:R(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(Q,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&l.state!==null&&l.state!==null?l.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${l.state.status}`),message:l.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${l.state.status}`)}):"";d.push({key:l.threadId,node:R(t,"stream.codex.collab.agentRow",{action:Z(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:R(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function le({block:e}){let{t}=c(),[a,o]=z(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=N(e.status),r=ce(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[p("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(B,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Pe(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function ue({block:e}){let{t,i18n:a}=c(),o=Boolean(e.isComplete),[i,r]=z(`thinking:${L(e)}`,!1),u=P(null),d=e.thinking.trim().length>0;D(()=>{if(o||!d)return;let s=u.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let w=s.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:U(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?l:n("span",{className:"codex-activity-running",children:l})})}),d&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(S,{text:m,streaming:!o})})})})]})}function Oe(e){if(W(e))return"mcp";let t=V(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ue(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ve(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(W(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(O(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let l=Oe(d);if(!o.has(l))i.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=i.map((d,l)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ue(d.category,o.get(d.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function mi({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:u,providerIcon:d,children:l}){let{t:m,i18n:s}=c(),[g,f]=z(`work:${e}`,i,!0),C=H(`work:${e}`,g||o),h=P(null),[w,y]=E(0);D(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let T=()=>{let M=h.current;if(M===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-M)};T();let I=window.setInterval(T,1000);return()=>window.clearInterval(I)},[o,r,t]);let b=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:U(t,s.language)}):o&&w>=1000?m("stream.codex.workingFor",{duration:U(w,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((T)=>!T),children:[u!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":u,"aria-hidden":"true",children:d}),n("span",{children:b}),n(B,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&l})})})]})}function Ze(e,t){if(e.type==="tool_use")return Le(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ce(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function He(e,t,a=1000){let[o,i]=E({text:e,live:t}),r=P(Date.now());return D(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),d=Math.max(0,r.current+a-u);if(d===0||t!==o.live){r.current=u,i({text:e,live:t});return}let l=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function We({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=c(),i=e.some(X),r=L(e[0]),u=e.every((C)=>C.type==="tool_use"&&V(C).category==="execute"),[d,l]=z(`group:${r}`,t&&!u),m=H(`group:${r}`,d),s=e.findLast(X)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=He(i?Ze(s,a):Ve(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(ee,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(B,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(oe,{block:C},L(C)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(We,{blocks:e,defaultExpanded:t})}function tt({blocks:e,defaultExpanded:t}){if(!e.some(Fe))return n(Y,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&Fe(i[0])===Fe(o))i.push(o);else a.push([o])}return n(F,{children:a.map((o)=>Fe(o[0])?n(gi,{blocks:o.filter(Fe)},L(o[0])):n(Y,{blocks:o,defaultExpanded:t},L(o[0])))})}
|
|
7
|
+
export{mi,tt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ie,Pt}from"./chunk-fmjez7xp.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function Wn(o){if(o===null||o===void 0)return Ie();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function er(o,{reportError:t=console.error}={}){let e=S(Ie()),r=async()=>{e.setState(Wn(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(Pt,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function tr({store:o,children:t}){return w(f,{value:o,children:t})}function en(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function de(o){let{store:t}=en(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function X(){return en().dispatch}
|
|
2
|
+
export{Wn,er,tr,en,de,X};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function vo({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
|
|
2
|
+
export{vo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function qo(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||a(l).category!=="overloaded")break;if(n++,o.user!==null)break}return c[n-1]??null}
|
|
2
|
+
export{qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-jm6zxy9h.js";import{Button as T}from"@nyssance/shadcn/vega/components/ui/button";import{codexTurnError as h}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as C,useRef as s,useState as u}from"react";import{jsx as n,jsxs as d}from"react/jsx-runtime";function Sn({children:i}){return d("div",{className:"codex-error-message",role:"alert",children:[n(R,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:i})]})}function _n({error:i,retry:e}){let{t:m}=t(),f=h(i),[c]=u(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=u(e?.delaySeconds??null),[N,y]=u(!1),[x,g]=u(null),o=s(!1),w=s(!1),E=s(e?.run);E.current=e?.run;let S=s((b)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(b).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),l=e!==void 0&&f.retryable;return C(()=>{if(!l||c===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((c-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[c,l]),d(Sn,{children:[d("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:f.message}),l&&n(T,{variant:"outline",size:"sm",disabled:N,onClick:()=>S.current("manual"),children:p===null?m("timeline.retry"):m("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{Sn,_n};
|
|
@@ -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 oe(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,oe,nt,kn,wi,ki,Si,_i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{w}from"./chunk-b12v22de.js";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as f,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{useState as M}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Fo({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=M(!1);return o(f,{open:m,onOpenChange:c,children:[e(b,{render:o(g,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(w,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{Fo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ri}from"./chunk-mz8a6292.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function Mn(t,r,e={}){let o=r.trim();if(o.length===0)return[];return Ri(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
|
|
2
|
+
export{Mn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function
|
|
2
|
-
export{
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function ti(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function aa(){c()}function ni(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function oi(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Nr(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function sa(e,n,t,i,o,a){if(a==="none")return;_(o,[Nr(e,n,t,i,a)])}function Nr(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Gr(t,i);return Mr(e,n)}function Gr(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function Mr(e,n){return y+zr(e,n)}function la(e,n){return D(Mr(e,n))}function zr(e,n){if(n<=l)return Vr(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Vr(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function ca(){return r.context?.state}function da(e){return g(e).ready}
|
|
2
|
+
export{ti,aa,ni,oi,sa,Nr,Gr,Mr,la,zr,Vr,ca,da};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var N="collection-default";function K(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ie(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Pt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function nr(o,e=Ie()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{N,K,Ie,Pt,nr};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{an}from"./chunk-qwfw4xpn.js";import{mo}from"./chunk-n66yy1m1.js";import{We}from"./chunk-rbv1scqm.js";import{Button as G}from"@nyssance/shadcn/vega/components/ui/button";import{Separator as ot}from"@nyssance/shadcn/vega/components/ui/separator";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as J}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as d,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as v}from"react";import{createPortal as at}from"react-dom";import{jsx as m,jsxs as w,Fragment as ct}from"react/jsx-runtime";function po({handleRef:u,anchorRef:a,commands:T,searchFiles:l,onMention:_,onSearchError:B,fileSearchDebounceMs:C=0,bashMode:H=!1,forcedOpen:s=!1,onForcedOpenChange:p,emptyLabel:R,fileStatusLabels:E,morePlugins:M}){let A=We(),i=A.textInput.value,[j,z]=v(0),[g,D]=v(null),[x,h]=v(0),K=Z(null);d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=()=>z(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}});let U=Y(()=>H&&i.startsWith("!")?null:mo(i,j),[i,j,H]),o=U?.kind==="at"&&!l?null:U,P=`${o?.kind??"forced"}:${o?.query??""}:${s}`,[F,O]=v(P);if(F!==P)O(P),h(0);let L=Z(null);d(()=>{if(!s){L.current=null;return}if(L.current===null)L.current=i;else if(i!==L.current)p?.(!1)},[s,i,p]);let y=o?.kind==="at"?o.query:null;d(()=>{if(y===null||!l){D(null);return}let t=!0,e=()=>{l(y).then((r)=>{if(t)D({query:y,search:l,items:r})},(r)=>{if(t)D({query:y,search:l,items:[]}),B(r)})},n=C>0?window.setTimeout(e,C):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[y,l,C,B]);let f=Y(()=>{if(o?.kind==="at")return g?.query===o.query&&g.search===l?g.items:[];if(o)return an(T,o.query);if(s)return an(T,"");return[]},[o,s,T,g,l]),[tt,q]=v(!1);d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=()=>q(!0),n=()=>{if(q(!1),s)p?.(!1)};return q(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[u,s,p]),d(()=>{if(s)u.current?.getTextarea()?.focus()},[s,u]);let c=tt&&(o!==null?o.kind==="slash"||f.length>0||!!E:s);d(()=>{if(!c)return;K.current?.querySelector(`[data-idx="${x}"]`)?.scrollIntoView({block:"nearest"})},[x,c]);function V(t){let e=u.current?.getTextarea();if(!e)return;let n,r;if(o){let S=o.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(n=i.slice(0,o.start)+S+i.slice(o.end),o.kind==="at")_?.(t.payload);r=o.start+S.length}else if(s)n=`${i.length===0||i.endsWith(`
|
|
2
2
|
`)?i:`${i}
|
|
3
3
|
`}/${t.payload} `,r=n.length,p?.(!1);else return;A.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=(n)=>{if(!c)return;if(u.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>f.length===0?0:Math.min(f.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=f[x];if(r)V(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)z(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else p?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[b,W]=v(null),[N,et]=v(null),I=ut(()=>{let t=a?.current;if(!t)return;let e=t.getBoundingClientRect();W({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[a]);if(X(()=>{if(!c){W(null);return}I()},[c,I]),X(()=>{let t=a?.current;if(!c||!t||!N)return;return rt(t,N,I,{animationFrame:!0})},[c,N,a,I]),!c||a&&!b)return null;let k=o?o.kind==="slash":s,nt=k?st:it,Q=m("div",{ref:et,className:a?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:a&&b?{left:b.left,width:b.width,bottom:b.bottom}:void 0,children:w("div",{ref:K,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[w("div",{className:"max-h-72 overflow-y-auto",children:[f.length===0&&k&&m("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:R}),f.length===0&&!k&&E&&m("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:g?.query===y&&g.search===l?E.empty:E.loading}),f.map((t,e)=>w(G,{type:"button",variant:"ghost",role:"option","aria-selected":e===x,"data-idx":e,onMouseDown:(n)=>{n.preventDefault(),V(t)},onMouseEnter:()=>h(e),className:J("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===x&&"bg-muted"),children:[m(nt,{className:J("size-4 shrink-0",k?"text-blue-500":"text-muted-foreground")}),m("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&m("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),k&&M&&w(ct,{children:[m(ot,{}),w(G,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),p?.(!1),M.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[m(lt,{"data-icon":"inline-start"}),M.label]})]})]})});return a?at(Q,document.body):Q}
|
|
4
|
-
export{
|
|
4
|
+
export{po};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{C}from"./chunk-heyqzkxq.js";import{s}from"./chunk-1mn2t6ga.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function ar({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return C(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{ar};
|
|
@@ -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 Se(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=Se(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 _e(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Oe(e){let t=_e();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Se(_e());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Pe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
+
export{Se,Gi,l,_e,Oe,i,Pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function Fn(a){let{plugin:u,marketplace:n}=a;return{installAttemptId:crypto.randomUUID(),pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function A(a){let{plugin:u,marketplace:n}=a;return{pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function ut(a,u){let n=u??{t:(e)=>e},l=(e,r)=>n.t(e,r),p=(e)=>n.notify?.(e),o=(e)=>{if(n.reportError)n.reportError(Error(e));else console.error(e)},m=null,b=null,d=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>d((s)=>{let t={...s.busyIds};if(r===null)delete t[e];else t[e]=r;return{busyIds:t}}),h=(e,r)=>d((s)=>{let t={...s.busyMarketplaces};if(r)t[e]=!0;else delete t[e];return{busyMarketplaces:t}}),w=M({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{if(m={cwds:e,forceRefetch:r.forceRefetch===!0||m?.forceRefetch===!0},d({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let s=m;m=null,d({error:null});try{let[t,i,g]=await Promise.all([a.listSkills(s.cwds,s.forceRefetch),a.listPlugins({...s.cwds.length>0?{cwds:s.cwds}:{},...s.forceRefetch?{forceRefetch:!0}:{}}),a.installedPlugins(s.cwds)]);if(m)continue;let c=I(t);d({loadedScope:JSON.stringify(s.cwds),skills:c.skills,skillProjects:c.projects,skillErrors:c.errors,marketplaces:i.marketplaces,marketplaceLoadErrors:i.marketplaceLoadErrors,featuredPluginIds:i.featuredPluginIds,installed:v(g)})}catch(t){if(!m)d({error:k(t)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=E(e.plugin);f(e.plugin.id,"installing");try{let s=await a.installPlugin(Fn(e));return await y(),f(e.plugin.id,null),p(l("plugins.toast.installed",{pluginName:r})),s}catch(s){throw o(`${l("plugins.toast.installError")}: ${k(s)}`),s}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let s=(i)=>d((g)=>({installed:g.installed.map((c)=>c.plugin.id===e.id?{...c,plugin:{...c.plugin,enabled:i}}:c)}));s(r);let t=e.enabled;try{let i=e.source.type==="remote"?e.remotePluginId:void 0;if(i===null)throw Error("Remote plugin ID is missing");let g=await a.setPluginEnabled(e.id,r,i);t=g.enabled,s(g.enabled),await y();let c=P().installed.find((R)=>R.plugin.id===e.id);if(c)t=c.plugin.enabled;if(!c||t!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),p(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:E(e)}))}catch(i){s(t),o(`${l("plugins.toast.toggleError")}: ${k(i)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=E(e);f(e.id,"uninstalling");try{let s=e.source.type==="remote"?e.remotePluginId:e.id;if(!s)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(s),await y(),P().installed.some((t)=>t.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),p(l("plugins.toast.uninstalled",{pluginName:r}))}catch(s){o(`${l("plugins.toast.uninstallError")}: ${k(s)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(A(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;d((t)=>({busySkills:{...t.busySkills,[e.path]:!0}})),d((t)=>({skills:t.skills.map((i)=>i.path===e.path?{...i,enabled:r}:i)}));let s=e.interface?.displayName??e.name;try{let t=await a.setSkillEnabled({path:e.path,enabled:r});if(d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:t.effectiveEnabled}:g)})),t.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}p(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:s}))}catch(t){d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:e.enabled}:g)})),o(`${l("plugins.skills.toggleError")}: ${k(t)}`)}finally{d((t)=>{let i={...t.busySkills};return delete i[e.path],{busySkills:i}})}},addMarketplace:async(e)=>{let r=await a.addMarketplace(e);return await y(!0),p(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),p(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((s)=>s.message).join("; ")}`);else p(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else p(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(w,{bindHost:(e)=>{n=e}});return S}
|
|
2
|
+
export{Fn,ut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=(e)=>String(e).padStart(2,"0");function
|
|
2
|
-
export{
|
|
1
|
+
var a=(e)=>String(e).padStart(2,"0");function ot(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
|
|
2
|
+
export{ot};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var ra=280;function Vo({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function Re({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function mn({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function jo({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function $o({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function Ko({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{ra,Vo,Re,mn,jo,$o,Ko};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ye}from"./chunk-92xxp77d.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 Y,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(ye,"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,Y,F,D,ce,dt};
|