@alwith/module-chat 0.5.19 → 0.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +240 -1
- package/THIRD_PARTY_NOTICES.md +13 -0
- package/assets/catalogs/alwith/models.json +72 -0
- package/assets/catalogs/custom/models.json +604 -0
- package/assets/catalogs/custom/sources.json +168 -0
- package/assets/catalogs/deepseek/models.json +139 -0
- package/assets/catalogs/openrouter/models.json +231 -0
- package/assets/catalogs/qwen/models.json +253 -0
- package/assets/catalogs/xai/models.json +129 -0
- package/assets/provider-catalog.json +127 -0
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-00eytt1z.js +2 -0
- package/dist/chunk-0fs2k5fe.js +1289 -0
- package/dist/chunk-0gersbj0.js +2 -0
- package/dist/chunk-0gy6ngda.js +2 -0
- package/dist/chunk-0mp7tyea.js +2 -0
- package/dist/chunk-0vhkv9ax.js +2 -0
- package/dist/{chunk-b53ky6rb.js → chunk-141kppzb.js} +2 -2
- package/dist/chunk-14exd146.js +2 -0
- package/dist/{chunk-yjtq166b.js → chunk-156m3888.js} +3 -3
- package/dist/{chunk-jx1cngyb.js → chunk-1e6x0018.js} +2 -2
- package/dist/{chunk-01rfnabj.js → chunk-1f628zap.js} +2 -2
- package/dist/{chunk-h3antqdd.js → chunk-1ppfn0e1.js} +2 -2
- package/dist/chunk-1q2cykp4.js +2 -0
- package/dist/chunk-1tkzxktd.js +2 -0
- package/dist/{chunk-9ej4c7a8.js → chunk-23rjsm3a.js} +2 -2
- package/dist/chunk-2ce8gd89.js +2 -0
- package/dist/chunk-2f1qx13s.js +2 -0
- package/dist/{chunk-0vy6cqmw.js → chunk-2nvsvw67.js} +2 -2
- package/dist/chunk-2tce3pc5.js +3 -0
- package/dist/chunk-2tkeevm0.js +2 -0
- package/dist/chunk-33620ca6.js +2 -0
- package/dist/chunk-3aq5c12k.js +2 -0
- package/dist/{chunk-jt8h82c2.js → chunk-3jcmv5qf.js} +2 -2
- package/dist/chunk-3n47hknp.js +2 -0
- package/dist/chunk-3nr5qe41.js +2 -0
- package/dist/chunk-3yvd77ph.js +2 -0
- package/dist/chunk-40bcp4pa.js +2 -0
- package/dist/{chunk-9xkp5x7h.js → chunk-42hkbpey.js} +2 -2
- package/dist/chunk-42nhwnbe.js +4 -0
- package/dist/chunk-4s6gx750.js +2 -0
- package/dist/chunk-4w3g7d6w.js +2 -0
- package/dist/chunk-52p7kyam.js +2 -0
- package/dist/{chunk-kvx8fv1e.js → chunk-59957gfy.js} +2 -2
- package/dist/chunk-59exzf5n.js +2 -0
- package/dist/chunk-5cdr7q6f.js +4 -0
- package/dist/chunk-5nc3dtyt.js +2 -0
- package/dist/chunk-63kxepkh.js +2 -0
- package/dist/chunk-67hrx4kg.js +2 -0
- package/dist/{chunk-eeq8d3x7.js → chunk-6dn3j8a2.js} +2 -2
- package/dist/{chunk-cdrmg9jj.js → chunk-72x7rae0.js} +2 -2
- package/dist/chunk-77j8n5k5.js +2 -0
- package/dist/{chunk-d6c0mnth.js → chunk-78s6h7r4.js} +2 -2
- package/dist/chunk-7p1r1ha9.js +2 -0
- package/dist/{chunk-hwh88n0v.js → chunk-7wk3d01c.js} +4 -4
- package/dist/chunk-80ckz04b.js +2 -0
- package/dist/chunk-82xjggwn.js +2 -0
- package/dist/chunk-85ffkcch.js +2 -0
- package/dist/chunk-8c042xya.js +2 -0
- package/dist/{chunk-09r35ts9.js → chunk-8ch9444t.js} +2 -2
- package/dist/{chunk-2hk04fh3.js → chunk-8hte6dh7.js} +2 -2
- package/dist/{chunk-dj4e0q7k.js → chunk-8jxcdap5.js} +2 -2
- package/dist/chunk-8qw8erv6.js +2 -0
- package/dist/chunk-8t36vprh.js +2 -0
- package/dist/{chunk-a9s3m9fs.js → chunk-8w22ck92.js} +2 -2
- package/dist/chunk-908ndb9r.js +2 -0
- package/dist/chunk-983gkw32.js +2 -0
- package/dist/chunk-9g67z1b4.js +2 -0
- package/dist/chunk-9mky3b7v.js +2 -0
- package/dist/chunk-9n79tr1q.js +2 -0
- package/dist/{chunk-ekd97p2x.js → chunk-9sq2etjk.js} +2 -2
- package/dist/chunk-a8p82wp7.js +2 -0
- package/dist/chunk-ajpxjj5m.js +2 -0
- package/dist/chunk-ap0vmczf.js +2 -0
- package/dist/chunk-aqvy57zs.js +2 -0
- package/dist/{chunk-9ebnn34t.js → chunk-aza82m2p.js} +2 -2
- package/dist/chunk-b2wczqtd.js +2 -0
- package/dist/chunk-b3jg6nzv.js +3 -0
- package/dist/{chunk-qy2prx7m.js → chunk-b614gnnv.js} +2 -2
- package/dist/{chunk-50mckd2p.js → chunk-c1b8z8pa.js} +2 -2
- package/dist/chunk-c38t8809.js +2 -0
- package/dist/chunk-c9nbavk0.js +2 -0
- package/dist/chunk-cbwya2ss.js +2 -0
- package/dist/chunk-cg8ekwka.js +2 -0
- package/dist/chunk-dv65h7z5.js +2 -0
- package/dist/chunk-dya74vts.js +2 -0
- package/dist/chunk-dyqvhn6y.js +5 -0
- package/dist/chunk-dyrgfdxz.js +2 -0
- package/dist/chunk-e9ntencj.js +2 -0
- package/dist/{chunk-e92r4g3v.js → chunk-ec9rgnt3.js} +2 -2
- package/dist/chunk-efrn25h9.js +2 -0
- package/dist/chunk-emcefs0g.js +2 -0
- package/dist/chunk-et8rcxw6.js +2 -0
- package/dist/chunk-f28hhbf4.js +2 -0
- package/dist/chunk-f3924gdb.js +2 -0
- package/dist/chunk-f8zy35gz.js +2 -0
- package/dist/chunk-f98at4r5.js +2 -0
- package/dist/chunk-fke98cj0.js +2 -0
- package/dist/chunk-g242n3dt.js +2 -0
- package/dist/{chunk-q4q4f03j.js → chunk-g73f62qm.js} +2 -2
- package/dist/{chunk-k9mbpf0g.js → chunk-h1bhhqtq.js} +2 -2
- package/dist/chunk-h5m2fpp4.js +2 -0
- package/dist/chunk-hv1ejvhg.js +2 -0
- package/dist/chunk-j86x2rn0.js +2 -0
- package/dist/chunk-jm6zja6h.js +2 -0
- package/dist/{chunk-z5tstgsh.js → chunk-k5rkpqbh.js} +2 -2
- package/dist/chunk-k5wgf59a.js +2 -0
- package/dist/{chunk-4xhvh2dn.js → chunk-k7k6qsqh.js} +2 -2
- package/dist/chunk-kc5k5e59.js +3 -0
- package/dist/chunk-kvc6ewkt.js +4 -0
- package/dist/chunk-kxmajv0m.js +3 -0
- package/dist/{chunk-m2hpfdch.js → chunk-m2b8kzpk.js} +2 -2
- package/dist/{chunk-e44hny11.js → chunk-m7wn4z9x.js} +2 -2
- package/dist/chunk-mcjwwxa1.js +2 -0
- package/dist/chunk-memvzzc6.js +2 -0
- package/dist/{chunk-fgzq0ktw.js → chunk-mg2mkzkk.js} +2 -2
- package/dist/{chunk-0zp04d1m.js → chunk-mgm1x3de.js} +2 -2
- package/dist/chunk-mwpchd85.js +3 -0
- package/dist/chunk-myrdfa3s.js +2 -0
- package/dist/chunk-n0khj68q.js +2 -0
- package/dist/{chunk-c2h76vnt.js → chunk-n929wkw7.js} +2 -2
- package/dist/chunk-nacjea1s.js +2 -0
- package/dist/{chunk-gcx4fk1a.js → chunk-nn25kjm4.js} +2 -2
- package/dist/{chunk-f8wzz84b.js → chunk-nq7gg9vg.js} +2 -2
- package/dist/{chunk-a4wrn6ep.js → chunk-nqw4deag.js} +2 -2
- package/dist/{chunk-gr1nnczz.js → chunk-ns5rnxdj.js} +2 -2
- package/dist/{chunk-6p41wmgs.js → chunk-nxp1b8ny.js} +2 -2
- package/dist/chunk-p4bb313p.js +3 -0
- package/dist/chunk-py837qjk.js +1 -0
- package/dist/chunk-q7nn5xe5.js +2 -0
- package/dist/chunk-qjhkzdhm.js +2 -0
- package/dist/{chunk-eyf9bxyx.js → chunk-qwfwxfhn.js} +2 -2
- package/dist/chunk-qxcnyvps.js +2 -0
- package/dist/chunk-r3qrftds.js +2 -0
- package/dist/chunk-r9dt4bs3.js +2 -0
- package/dist/chunk-rbqn4725.js +2 -0
- package/dist/chunk-rcbb4ke2.js +2 -0
- package/dist/chunk-rekc1q3m.js +2 -0
- package/dist/chunk-rwkkqdcv.js +2 -0
- package/dist/{chunk-fcy4sv9f.js → chunk-rwnz06kr.js} +2 -2
- package/dist/{chunk-5n4mefej.js → chunk-s55n9cby.js} +2 -2
- package/dist/chunk-sxh0pd3y.js +2 -0
- package/dist/chunk-sy5tq3y6.js +2 -0
- package/dist/chunk-t0cr21e3.js +2 -0
- package/dist/chunk-t97yjy4f.js +2 -0
- package/dist/chunk-v4t0p6pp.js +2 -0
- package/dist/{chunk-rsfwc38x.js → chunk-vcy5vyp7.js} +3 -3
- package/dist/chunk-vkrgdqnm.js +2 -0
- package/dist/chunk-vs02ry2r.js +2 -0
- package/dist/chunk-vyk4zh1m.js +7 -0
- package/dist/{chunk-5nj2fjej.js → chunk-w0hpztj7.js} +2 -2
- package/dist/chunk-w6rwngm3.js +2 -0
- package/dist/{chunk-jc52024g.js → chunk-w9dh298r.js} +2 -2
- package/dist/chunk-wvdncbrt.js +2 -0
- package/dist/chunk-x2yc5748.js +2 -0
- package/dist/chunk-x334e7wb.js +3 -0
- package/dist/{chunk-qmc18ejg.js → chunk-x6nz6eyb.js} +2 -2
- package/dist/chunk-xdm2are3.js +2 -0
- package/dist/{chunk-0zph0gwq.js → chunk-xf36kt74.js} +3 -3
- package/dist/{chunk-tzyc5myt.js → chunk-xgjkj9j8.js} +2 -2
- package/dist/chunk-xktybk48.js +2 -0
- package/dist/{chunk-210b2kk6.js → chunk-xmstt6hh.js} +2 -2
- package/dist/chunk-xrs7x5ah.js +2 -0
- package/dist/chunk-xyvqcpjx.js +2 -0
- package/dist/chunk-y7xcync7.js +2 -0
- package/dist/chunk-ye9tsdhn.js +2 -0
- package/dist/{chunk-5e10bzg2.js → chunk-z2fjwkmt.js} +2 -2
- package/dist/{chunk-nkqe2e8s.js → chunk-z2v008kc.js} +2 -2
- package/dist/chunk-z71pp1mb.js +4 -0
- package/dist/chunk-zxkvvecz.js +2 -0
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.d.ts +4 -0
- package/dist/collections/collection-emoji.js +1 -0
- package/dist/collections/collection-menu.d.ts +15 -0
- package/dist/collections/collection-menu.js +1 -0
- package/dist/collections/collection-panel.d.ts +11 -0
- package/dist/collections/collection-panel.js +1 -0
- package/dist/collections/collections.d.ts +6 -0
- package/dist/collections/collections.js +1 -0
- package/dist/collections/host.d.ts +19 -0
- package/dist/collections/host.js +1 -0
- package/dist/collections/locales.d.ts +71 -0
- package/dist/collections/locales.js +1 -0
- package/dist/collections/model.d.ts +95 -0
- package/dist/collections/model.js +1 -0
- package/dist/collections/store.d.ts +30 -0
- package/dist/collections/store.js +1 -0
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.d.ts +8 -0
- package/dist/conversation/connection-notice.js +1 -0
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.d.ts +8 -0
- package/dist/conversation/conversation-search.js +1 -0
- package/dist/conversation/conversation-view.d.ts +1 -0
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.d.ts +3 -0
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.d.ts +7 -0
- package/dist/conversation/draft-project-picker.js +1 -0
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/types.d.ts +6 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +1914 -0
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-header.d.ts +6 -0
- package/dist/plugins/catalog-header.js +1 -0
- package/dist/plugins/catalog-skeleton.d.ts +3 -0
- package/dist/plugins/catalog-skeleton.js +1 -0
- package/dist/plugins/host.d.ts +49 -0
- package/dist/plugins/host.js +1 -0
- package/dist/plugins/locales.d.ts +1136 -0
- package/dist/plugins/locales.js +1 -0
- package/dist/plugins/new-chat-directory.d.ts +2 -0
- package/dist/plugins/new-chat-directory.js +1 -0
- package/dist/plugins/pane.d.ts +12 -0
- package/dist/plugins/pane.js +1 -0
- package/dist/plugins/panel-item.d.ts +8 -0
- package/dist/plugins/panel-item.js +1 -0
- package/dist/plugins/plugin-detail-page.d.ts +5 -0
- package/dist/plugins/plugin-detail-page.js +1 -0
- package/dist/plugins/plugin-icon.d.ts +7 -0
- package/dist/plugins/plugin-icon.js +1 -0
- package/dist/plugins/plugin-icons.d.ts +1 -0
- package/dist/plugins/plugin-icons.js +1 -0
- package/dist/plugins/plugins-page.d.ts +12 -0
- package/dist/plugins/plugins-page.js +1 -0
- package/dist/plugins/plugins.css +199 -0
- package/dist/plugins/plugins.d.ts +14 -0
- package/dist/plugins/plugins.js +1 -0
- package/dist/plugins/read-skill-document.d.ts +2 -0
- package/dist/plugins/read-skill-document.js +1 -0
- package/dist/plugins/skill-document.d.ts +7 -0
- package/dist/plugins/skill-document.js +1 -0
- package/dist/plugins/skills-tab.d.ts +6 -0
- package/dist/plugins/skills-tab.js +1 -0
- package/dist/plugins/store.d.ts +62 -0
- package/dist/plugins/store.js +1 -0
- package/dist/plugins/toolbox-layout.d.ts +7 -0
- package/dist/plugins/toolbox-layout.js +1 -0
- package/dist/search/chat-search.css +9 -0
- package/dist/search/chat-search.d.ts +1 -0
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.d.ts +4 -0
- package/dist/search/codex-source-matches.js +1 -0
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.d.ts +26 -0
- package/dist/session-list/account-menu.js +1 -0
- package/dist/session-list/activity-list.d.ts +11 -0
- package/dist/session-list/activity-list.js +1 -0
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.d.ts +5 -0
- package/dist/session-list/help-menu.js +1 -0
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.d.ts +2 -0
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.d.ts +91 -0
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-header.d.ts +14 -0
- package/dist/session-list/navigation-header.js +1 -0
- package/dist/session-list/navigation-store.d.ts +19 -0
- package/dist/session-list/navigation-store.js +1 -0
- package/dist/session-list/navigation-tabs.d.ts +20 -0
- package/dist/session-list/navigation-tabs.js +1 -0
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.d.ts +2 -0
- package/dist/session-list/platform.js +1 -0
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.d.ts +10 -0
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.d.ts +14 -0
- package/dist/session-list/shortcut-hint.js +1 -0
- package/dist/session-list/shortcut.d.ts +2 -0
- package/dist/session-list/shortcut.js +1 -0
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.d.ts +1 -0
- package/dist/session-list/use-activity-notification.js +1 -0
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.d.ts +1 -0
- package/dist/session-list/use-cmd-held.js +1 -0
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.d.ts +18 -0
- package/dist/settings/codex-account-card.js +1 -0
- package/dist/settings/login-card.d.ts +6 -0
- package/dist/settings/login-card.js +1 -0
- package/dist/settings/model-alias-settings.d.ts +6 -0
- package/dist/settings/model-alias-settings.js +1 -0
- package/dist/settings/model-aliases.d.ts +17 -0
- package/dist/settings/model-aliases.js +1 -0
- package/dist/settings/provider-logos.d.ts +5 -0
- package/dist/settings/provider-logos.js +1 -0
- package/dist/settings/provider-section.d.ts +52 -0
- package/dist/settings/provider-section.js +1 -0
- package/dist/settings/providers-port.d.ts +32 -0
- package/dist/settings/providers-port.js +1 -0
- package/dist/settings/providers.d.ts +92 -0
- package/dist/settings/providers.js +1 -0
- package/dist/settings/settings-bridge.d.ts +39 -0
- package/dist/settings/settings-bridge.js +1 -0
- package/dist/settings/settings.d.ts +9 -0
- package/dist/settings/settings.js +1 -0
- package/dist/stage.d.ts +1 -0
- package/dist/stage.js +1 -1
- package/emojibase/LICENSE +21 -0
- package/emojibase/en/data.json +51183 -0
- package/emojibase/en/messages.json +124 -0
- package/emojibase/zh/data.json +48992 -0
- package/emojibase/zh/messages.json +124 -0
- package/licenses/_dnd-kit_core-LICENSE +21 -0
- package/licenses/_dnd-kit_sortable-LICENSE +21 -0
- package/licenses/_dnd-kit_utilities-LICENSE +21 -0
- package/licenses/_solar-icons_react-LICENSE +11 -0
- package/licenses/_solar-icons_react-LICENSE-THIRD-PARTY +14 -0
- package/licenses/frimousse-LICENSE +21 -0
- package/package.json +36 -4
- package/rust/Cargo.lock +3844 -0
- package/rust/Cargo.toml +29 -0
- package/rust/build.rs +16 -0
- package/rust/permissions/autogenerated/reference.md +296 -0
- package/rust/permissions/default.toml +20 -0
- package/rust/permissions/schemas/schema.json +292 -0
- package/rust/src/lib.rs +79 -0
- package/rust/src/providers/managed.rs +801 -0
- package/rust/src/providers/tests.rs +681 -0
- package/rust/src/providers.rs +984 -0
- package/rust/src/skills.rs +130 -0
- package/dist/chunk-04mj5ftg.js +0 -7
- package/dist/chunk-0jvfabsq.js +0 -2
- package/dist/chunk-107y8e8x.js +0 -2
- package/dist/chunk-22h5rh2h.js +0 -2
- package/dist/chunk-31yt34hy.js +0 -2
- package/dist/chunk-3hp5t5wf.js +0 -2
- package/dist/chunk-3jcx1ns0.js +0 -2
- package/dist/chunk-3jjc06nd.js +0 -3
- package/dist/chunk-3z8ajtxp.js +0 -2
- package/dist/chunk-4b3g7acq.js +0 -2
- package/dist/chunk-4jkg9p4g.js +0 -2
- package/dist/chunk-4xmbve71.js +0 -4
- package/dist/chunk-54qxv3er.js +0 -2
- package/dist/chunk-5bz1bzsw.js +0 -2
- package/dist/chunk-5dk4xga8.js +0 -2
- package/dist/chunk-5my9w4vd.js +0 -2
- package/dist/chunk-5tqygmg9.js +0 -2
- package/dist/chunk-7dd374an.js +0 -2
- package/dist/chunk-7s7txz2j.js +0 -2
- package/dist/chunk-8hbwf0qe.js +0 -2
- package/dist/chunk-8yj3q7n2.js +0 -2
- package/dist/chunk-9eqezb4k.js +0 -2
- package/dist/chunk-9xfv8jdn.js +0 -2
- package/dist/chunk-a3s36z4s.js +0 -3
- package/dist/chunk-a414w7ah.js +0 -3
- package/dist/chunk-am6tss41.js +0 -2
- package/dist/chunk-b65w6x23.js +0 -2
- package/dist/chunk-cv2j9sjp.js +0 -2
- package/dist/chunk-d1trg76g.js +0 -2
- package/dist/chunk-dgm4gxkj.js +0 -2
- package/dist/chunk-e6ddpdxn.js +0 -2
- package/dist/chunk-e9znmqdj.js +0 -2
- package/dist/chunk-eyfdn4p3.js +0 -2
- package/dist/chunk-fcqwzmkd.js +0 -2
- package/dist/chunk-fkwafga0.js +0 -2
- package/dist/chunk-gap8n0vv.js +0 -5
- package/dist/chunk-j5rd55qs.js +0 -3
- package/dist/chunk-j9q2s4kq.js +0 -2
- package/dist/chunk-jnena0v6.js +0 -2
- package/dist/chunk-kjswq0tx.js +0 -2
- package/dist/chunk-kkps1qd4.js +0 -4
- package/dist/chunk-mpnv2rht.js +0 -2
- package/dist/chunk-mtydzse4.js +0 -2
- package/dist/chunk-mw9k08ky.js +0 -3
- package/dist/chunk-px6nrr87.js +0 -2
- package/dist/chunk-pzmd5d3m.js +0 -2
- package/dist/chunk-q5az5kp2.js +0 -4
- package/dist/chunk-qqm07rfv.js +0 -2
- package/dist/chunk-qv7kkv47.js +0 -2
- package/dist/chunk-rq04p6pn.js +0 -3
- package/dist/chunk-rx9sdjtn.js +0 -2
- package/dist/chunk-s0b5g8nc.js +0 -2
- package/dist/chunk-sf1z4r7v.js +0 -2
- package/dist/chunk-syp06z39.js +0 -2
- package/dist/chunk-t6cfjn19.js +0 -2
- package/dist/chunk-vsff9djs.js +0 -2
- package/dist/chunk-vvq50011.js +0 -2
- package/dist/chunk-wkvm8f2e.js +0 -2
- package/dist/chunk-ww223tm5.js +0 -2
- package/dist/chunk-x0tbzjqc.js +0 -2
- package/dist/chunk-x480gyp7.js +0 -2
- package/dist/chunk-yjhypkmc.js +0 -2
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
//! Read-only access to Codex skill documents (SKILL.md and their sibling files) for the toolbox.
|
|
2
|
+
//! Only files whose canonical path lies under a Codex skill root are readable, so a symlink inside a
|
|
3
|
+
//! root cannot reach a file outside it.
|
|
4
|
+
use std::path::{Path, PathBuf};
|
|
5
|
+
use tauri::{AppHandle, Manager};
|
|
6
|
+
|
|
7
|
+
/// Skill documents are short Markdown; anything larger is not one.
|
|
8
|
+
const MAX_BYTES: u64 = 1024 * 1024;
|
|
9
|
+
|
|
10
|
+
/// `$CODEX_HOME` (or `~/.codex`), `~/.agents`, and `.codex` / `.agents` of each project directory.
|
|
11
|
+
fn skill_roots(codex_home: Option<PathBuf>, home: Option<PathBuf>, projects: &[String]) -> Vec<PathBuf> {
|
|
12
|
+
let mut roots = Vec::new();
|
|
13
|
+
match (codex_home, &home) {
|
|
14
|
+
(Some(codex), _) => roots.push(codex),
|
|
15
|
+
(None, Some(home)) => roots.push(home.join(".codex")),
|
|
16
|
+
(None, None) => {}
|
|
17
|
+
}
|
|
18
|
+
if let Some(home) = &home {
|
|
19
|
+
roots.push(home.join(".agents"));
|
|
20
|
+
}
|
|
21
|
+
for project in projects.iter().filter(|project| !project.trim().is_empty()) {
|
|
22
|
+
let project = PathBuf::from(project);
|
|
23
|
+
roots.push(project.join(".codex"));
|
|
24
|
+
roots.push(project.join(".agents"));
|
|
25
|
+
}
|
|
26
|
+
roots
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
fn read_under(path: &Path, roots: &[PathBuf]) -> Result<String, String> {
|
|
30
|
+
if !path.is_absolute() {
|
|
31
|
+
return Err("Skill document path must be absolute".into());
|
|
32
|
+
}
|
|
33
|
+
let file = path.canonicalize().map_err(|error| format!("Cannot read skill document: {error}"))?;
|
|
34
|
+
// Roots are canonicalized too, so a root that is itself a link (a synced ~/.codex) still matches.
|
|
35
|
+
if !roots.iter().filter_map(|root| root.canonicalize().ok()).any(|root| file.starts_with(&root)) {
|
|
36
|
+
return Err("Path is outside the Codex skill directories".into());
|
|
37
|
+
}
|
|
38
|
+
let metadata = std::fs::metadata(&file).map_err(|error| format!("Cannot read skill document: {error}"))?;
|
|
39
|
+
if !metadata.is_file() {
|
|
40
|
+
return Err("Skill document is not a file".into());
|
|
41
|
+
}
|
|
42
|
+
if metadata.len() > MAX_BYTES {
|
|
43
|
+
return Err("Skill document is too large".into());
|
|
44
|
+
}
|
|
45
|
+
let bytes = std::fs::read(&file).map_err(|error| format!("Cannot read skill document: {error}"))?;
|
|
46
|
+
String::from_utf8(bytes).map_err(|_| "Skill document is not UTF-8 text".into())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#[tauri::command]
|
|
50
|
+
pub(crate) async fn read_skill_document(
|
|
51
|
+
app: AppHandle, path: String, roots: Option<Vec<String>>,
|
|
52
|
+
) -> Result<String, String> {
|
|
53
|
+
let codex_home = std::env::var_os("CODEX_HOME").filter(|value| !value.is_empty()).map(PathBuf::from);
|
|
54
|
+
let home = app.path().home_dir().ok();
|
|
55
|
+
let roots = skill_roots(codex_home, home, roots.as_deref().unwrap_or_default());
|
|
56
|
+
tauri::async_runtime::spawn_blocking(move || read_under(Path::new(&path), &roots))
|
|
57
|
+
.await
|
|
58
|
+
.map_err(|error| error.to_string())?
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#[cfg(test)]
|
|
62
|
+
mod tests {
|
|
63
|
+
use super::*;
|
|
64
|
+
|
|
65
|
+
#[test]
|
|
66
|
+
fn only_files_under_skill_roots_are_readable() {
|
|
67
|
+
let temp = tempfile::tempdir().unwrap();
|
|
68
|
+
let home = temp.path().join("home");
|
|
69
|
+
let project = temp.path().join("project");
|
|
70
|
+
let outside = temp.path().join("outside");
|
|
71
|
+
for directory in [
|
|
72
|
+
home.join(".codex/skills/review"),
|
|
73
|
+
home.join(".agents/skills/plan"),
|
|
74
|
+
project.join(".agents/skills/local"),
|
|
75
|
+
project.join("src"),
|
|
76
|
+
outside.clone(),
|
|
77
|
+
] {
|
|
78
|
+
std::fs::create_dir_all(directory).unwrap();
|
|
79
|
+
}
|
|
80
|
+
std::fs::write(home.join(".codex/skills/review/SKILL.md"), "# Review").unwrap();
|
|
81
|
+
std::fs::write(home.join(".agents/skills/plan/SKILL.md"), "# Plan").unwrap();
|
|
82
|
+
std::fs::write(project.join(".agents/skills/local/SKILL.md"), "# Local").unwrap();
|
|
83
|
+
std::fs::write(project.join("src/secret.txt"), "secret").unwrap();
|
|
84
|
+
std::fs::write(outside.join("secret.txt"), "secret").unwrap();
|
|
85
|
+
let roots = skill_roots(None, Some(home.clone()), &[project.to_string_lossy().into_owned()]);
|
|
86
|
+
|
|
87
|
+
assert_eq!(read_under(&home.join(".codex/skills/review/SKILL.md"), &roots).unwrap(), "# Review");
|
|
88
|
+
assert_eq!(read_under(&home.join(".agents/skills/plan/SKILL.md"), &roots).unwrap(), "# Plan");
|
|
89
|
+
assert_eq!(read_under(&project.join(".agents/skills/local/SKILL.md"), &roots).unwrap(), "# Local");
|
|
90
|
+
// Project files outside its skill directories, other directories and traversal are refused.
|
|
91
|
+
assert!(read_under(&project.join("src/secret.txt"), &roots).is_err());
|
|
92
|
+
assert!(read_under(&outside.join("secret.txt"), &roots).is_err());
|
|
93
|
+
assert!(read_under(&home.join(".codex/skills/../../../outside/secret.txt"), &roots).is_err());
|
|
94
|
+
assert!(read_under(Path::new("relative/SKILL.md"), &roots).is_err());
|
|
95
|
+
assert!(read_under(&home.join(".codex/skills"), &roots).is_err());
|
|
96
|
+
// Without the project root its skills are not readable.
|
|
97
|
+
let home_only = skill_roots(None, Some(home.clone()), &[]);
|
|
98
|
+
assert!(read_under(&project.join(".agents/skills/local/SKILL.md"), &home_only).is_err());
|
|
99
|
+
// CODEX_HOME replaces ~/.codex.
|
|
100
|
+
let codex_home = skill_roots(Some(outside.clone()), Some(home.clone()), &[]);
|
|
101
|
+
assert!(read_under(&outside.join("secret.txt"), &codex_home).is_ok());
|
|
102
|
+
assert!(read_under(&home.join(".codex/skills/review/SKILL.md"), &codex_home).is_err());
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
#[cfg(unix)]
|
|
106
|
+
#[test]
|
|
107
|
+
fn symlinks_cannot_escape_a_skill_root_and_binary_files_are_refused() {
|
|
108
|
+
let temp = tempfile::tempdir().unwrap();
|
|
109
|
+
let home = temp.path().join("home");
|
|
110
|
+
let skill = home.join(".codex/skills/escape");
|
|
111
|
+
std::fs::create_dir_all(&skill).unwrap();
|
|
112
|
+
std::fs::write(temp.path().join("secret.txt"), "secret").unwrap();
|
|
113
|
+
std::os::unix::fs::symlink(temp.path().join("secret.txt"), skill.join("SKILL.md")).unwrap();
|
|
114
|
+
std::os::unix::fs::symlink(temp.path(), skill.join("parent")).unwrap();
|
|
115
|
+
std::fs::write(skill.join("binary.md"), [0xff, 0xfe, 0x00]).unwrap();
|
|
116
|
+
let roots = skill_roots(None, Some(home.clone()), &[]);
|
|
117
|
+
assert!(read_under(&skill.join("SKILL.md"), &roots).is_err());
|
|
118
|
+
assert!(read_under(&skill.join("parent/secret.txt"), &roots).is_err());
|
|
119
|
+
assert_eq!(read_under(&skill.join("binary.md"), &roots).unwrap_err(), "Skill document is not UTF-8 text");
|
|
120
|
+
// A root that is itself a link still matches the files inside it.
|
|
121
|
+
let real = temp.path().join("synced-codex");
|
|
122
|
+
std::fs::create_dir_all(real.join("skills/s")).unwrap();
|
|
123
|
+
std::fs::write(real.join("skills/s/SKILL.md"), "# Synced").unwrap();
|
|
124
|
+
let linked_home = temp.path().join("linked-home");
|
|
125
|
+
std::fs::create_dir_all(&linked_home).unwrap();
|
|
126
|
+
std::os::unix::fs::symlink(&real, linked_home.join(".codex")).unwrap();
|
|
127
|
+
let roots = skill_roots(None, Some(linked_home.clone()), &[]);
|
|
128
|
+
assert_eq!(read_under(&linked_home.join(".codex/skills/s/SKILL.md"), &roots).unwrap(), "# Synced");
|
|
129
|
+
}
|
|
130
|
+
}
|
package/dist/chunk-04mj5ftg.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i,m}from"./chunk-fcqwzmkd.js";import{nt}from"./chunk-gr1nnczz.js";import{y}from"./chunk-yjtq166b.js";import{x}from"./chunk-5n4mefej.js";import{q,dn}from"./chunk-px6nrr87.js";import{M}from"./chunk-jnena0v6.js";import{cn as L}from"cn";import{BotIcon as ge,CheckIcon as fe,CopyIcon as xe}from"lucide-react";import{Fragment as Ce,useEffect as U,useRef as V,useState as F}from"react";import{jsx as n,jsxs as g,Fragment as O}from"react/jsx-runtime";function j(e,t){let[a,o]=F(()=>({key:e,mounted:t})),r=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==r)o({key:e,mounted:r});return r}var K=new WeakMap,J=1;function T(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=K.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=J;return J+=1,K.set(e,a),`${e.type}:${a}`}function k(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 H(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),r=Math.floor(a%3600/60),s=a%60;if(s>=60)r+=Math.floor(s/60),s%=60;if(r>=60)o+=Math.floor(r/60),r%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:r,seconds:o>0?0:s})}catch{}if(o>0)return r>0?`${o}h ${r}m`:`${o}h`;if(r>0)return s>0?`${r}m ${s}s`:`${r}m`;return`${s}s`}var ye="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 S({expanded:e,className:t}){return n("svg",{className:L("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:ye})})}function ve(){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 he(){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 we(){return g("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 Le(){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 Q(){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 ne({block:e}){if(e.type!=="tool_use")return null;if(Z(e))return n(Q,{});let t=y(e).category;if(t==="read")return n(ve,{});if(t==="search"||t==="fetch")return n(he,{});if(t==="execute")return n(we,{});if(t==="edit")return n(Le,{});return n(Q,{})}function E(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function Ne(e){return y(e).target}function G(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function Z(e){return G(e)||e.name==="dynamic_tool"}function ae(e,t){let{category:a}=y(e),o=Ne(e),r=k(e.status);if(Z(e))return{leading:e.title};if(a==="execute"){let s=E(e,"command")?.split(`
|
|
2
|
-
`)[0]??o;return s?{leading:t(r?"stream.codex.running":"stream.codex.ran"),trailing:s}:{leading:t(r?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let s=E(e,"pattern")??E(e,"query")??o;return s?{leading:t(r?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let s=E(e,"query")??E(e,"url")??o;return s?{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"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(r?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(r?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(r?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(r?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(r?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(r?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function be(e,t){let a=ae(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function Te(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 $e(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 ke(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 Ae(e){if(typeof e==="string"&&e.length>0)return e;return}function Be(e){return e.type==="diff"}function Ie(e){let t=e.content.find(Be);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
|
-
`)}function ie(e){let t=Ae(e.rawOutput);if(t!==void 0)return t;let a=Te(e.content);if(a.length>0)return a;return Ie(e)}function X({block:e,command:t}){let{t:a,Output:o,commandStatus:r}=i(),[s,u]=F(!1),[c,l]=F(!1),p=ie(e),d=r===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):r(e),f=()=>{navigator.clipboard.writeText([`$ ${t}`,p].filter((C)=>C!==void 0).join(`
|
|
5
|
-
`)),u(!0),setTimeout(()=>u(!1),1500)};return n("div",{className:"codex-command-details",children:g("div",{className:"codex-command-card",children:[g("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:L("codex-command-line",!c&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((C)=>!C),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:f,children:s?n(fe,{}):n(xe,{})})]}),p!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:p}):n(o,{text:p})),d!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:d})})]})})}function re({block:e}){let{t,openLink:a,Patch:o,openImage:r,commandStatus:s,expandToolOutput:u=!1}=i(),c=ie(e),l=o===void 0?void 0:e.content.flatMap((v)=>{if(v.type!=="diff")return[];let I=v;return I.patch?.text?[I.patch.text]:[]}).join(`
|
|
6
|
-
`),p=$e(e.content),d=ke(e.content),[f,C]=x(`tool:${e.id}`,!1),h=j(`tool:${e.id}`,f),N=y(e),b=N.category,w=ae(e,t),A=b==="execute"?E(e,"command"):void 0;if(e.userShell&&A!==void 0)return n(X,{block:e,command:A});let B=A!==void 0||Z(e)||p.length>0||d.length>0||Boolean(l)||u&&c!==void 0,_=!B&&!k(e.status)?N.filePath:void 0;if(b==="execute"&&!k(e.status)&&e.status!=="completed"){let v=s?.(e);if(v)w={...w,leading:v}}if(b==="read"&&k(e.status))return null;let R=g("span",{className:"codex-activity-label",children:[n(ne,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:k(e.status)?n("span",{className:"codex-activity-running",children:w.trailing===void 0?w.leading:`${w.leading} ${w.trailing}`}):g(O,{children:[n("span",{className:"codex-activity-leading",children:w.leading}),w.trailing!==void 0&&(_!==void 0?g(O,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:_,onClick:()=>a(_),children:w.trailing})]}):g("span",{className:"codex-activity-trailing",children:[" ",w.trailing]}))]})})]});return g("div",{className:"codex-activity-item",children:[B?g("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":w.trailing===void 0?w.leading:`${w.leading} ${w.trailing}`,"aria-expanded":f,onClick:()=>C((v)=>!v),children:[R,n(S,{expanded:f})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:R}),n("div",{className:L("codex-activity-details-grid",f&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:h&&g(O,{children:[A!==void 0?n(X,{block:e,command:A}):o!==void 0&&l?n(o,{patch:l}):c!==void 0&&n("pre",{className:"codex-activity-details",children:c}),p.length>0&&n("div",{className:"codex-activity-media",children:p.map((v)=>{let I=`data:${v.mimeType};base64,${v.data}`,z=n("img",{src:I,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${v.mimeType}:${v.data.slice(0,32)}`);return r===void 0?z:n("button",{type:"button",className:"cursor-pointer",onClick:()=>r(I),children:z},I)})}),d.map((v)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${v.mimeType};base64,${v.data}`},`${v.mimeType}:${v.data.slice(0,32)}`))]})})})]})}function se({block:e}){if(e.type==="tool_use")return n(re,{block:e});if(e.type==="thinking")return n(pe,{block:e});if(e.type==="collab")return n(me,{block:e});return n(de,{block:e})}function de({block:e}){let{t,openSession:a}=i(),o=k(e.status),[r,s]=x(`subagent:${e.id}`,o),u=V(o);U(()=>{if(o)s(!0);if(u.current&&!o)s(!1);u.current=o},[o,s]);let c=`${_e(e.activity,o,e.name,t)}${ce(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",p=e.blocks.length>0;return g("div",{className:"codex-activity-item",children:[g("button",{type:"button",className:L("codex-activity-header",!p&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":p?r:void 0,disabled:!p,onClick:()=>s((d)=>!d),children:[g("span",{className:"codex-activity-label",children:[n(Se,{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:c}):c:n("span",{role:"link",tabIndex:0,className:L("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(d)=>{d.stopPropagation(),a(l,e.name)},onKeyDown:(d)=>{if(d.key!=="Enter"&&d.key!==" ")return;d.preventDefault(),d.stopPropagation(),a(l,e.name)},children:c})})]}),p&&n(S,{expanded:r})]}),n("div",{className:L("codex-activity-details-grid",r&&"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((d)=>{if(d.type==="tool_use")return n(re,{block:d},d.id);if(d.type==="thinking")return n(pe,{block:d},T(d));if(d.type==="subagent")return n(de,{block:d},d.id);if(d.type==="collab")return n(me,{block:d},d.id);if(d.type==="text")return n("div",{className:"codex-reasoning-details",children:n(m,{text:d.text,streaming:!1})},T(d));if(d.type==="plan")return n(M,{entries:d.entries},T(d));if(d.type==="image")return n("img",{src:`data:${d.source.media_type};base64,${d.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},T(d));return null})})})})]})}var Me=8;function Ee(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Me}function Se({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ee(e),"aria-hidden":"true"})}function _e(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 Re=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function ce(e,t,a){if(e===null)return"";if(t===null)return` · ${nt(e)}`;let o=Re.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${nt(e)} · ${o}`}var Fe={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function le(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 W(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=le(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Fe[e.tool]}.${o}`)}function De(e){return e.agents.filter((t)=>t.nickname!==null)}function ue(e,t){let a=e.agents.length>0?e.agents.length:1;return`${W(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var D="\x01";function P(e,t,a,o){let r=Object.fromEntries(Object.keys(o).map((s)=>[s,`${D}${s}${D}`]));return e(t,{...a,...r}).split(new RegExp(`${D}(\\w+)${D}`,"u")).map((s,u)=>n(Ce,{children:u%2===1?o[s]:s},`${u}:${s}`))}function Pe({agent:e,showModel:t}){let{t:a,openSession:o}=i(),r=e.nickname??"",s=o===void 0?n("span",{className:"font-medium",children:r}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:r}),onClick:()=>o(e.threadId,r),children:r});return g("span",{children:[s,e.role!==null&&` (${e.role})`,t&&ce(e.model,e.reasoningEffort,a)]})}function Y({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Oe(e,t){let a=e.prompt?.trim()?e.prompt:null,o=le(e.status),r=e.tool==="spawnAgent"&&o==="completed"&&a!==null,s=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=De(e),c=[];if(u.length===0)c.push({key:"generic",node:W(e,"row",t)});for(let l of u){let p=n(Pe,{agent:l,showModel:e.tool==="spawnAgent"});if(r)c.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:P(t,"stream.codex.collab.createdWithInstructions",{},{agent:p,instructions:n(Y,{prompt:a})})})});else if(s)c.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:P(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:p,prompt:n(Y,{prompt:a})})})});else{let f=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}`)}):"";c.push({key:l.threadId,node:P(t,"stream.codex.collab.agentRow",{action:W(e,"row",t),state:f},{agent:p})})}}if(!r&&!s&&a!==null)c.push({key:"input",node:P(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return c}function me({block:e}){let{t}=i(),[a,o]=x(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let r=k(e.status),s=ue(e,t);return g("div",{className:"codex-activity-item",children:[g("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[g("span",{className:"codex-activity-label",children:[n(ge,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:r?n("span",{className:"codex-activity-running",children:s}):s})]}),n(S,{expanded:a})]}),n("div",{className:L("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:Oe(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function pe({block:e}){let{t,i18n:a}=i(),o=Boolean(e.isComplete),[r,s]=x(`thinking:${T(e)}`,!1),u=V(null),c=e.thinking.trim().length>0;U(()=>{if(o||!c)return;let d=u.current;if(d===null)throw Error("Thinking details are not mounted");let f=new ResizeObserver(()=>{d.scrollTop=d.scrollHeight}),C=null,h=()=>{let b=d.firstElementChild;if(b===C)return;if(C!==null)f.unobserve(C);if(C=b,C!==null)f.observe(C)},N=new MutationObserver(h);return N.observe(d,{childList:!0}),h(),()=>{N.disconnect(),f.disconnect()}},[c,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:H(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),p=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return g("div",{className:"codex-activity-item",children:[g("button",{type:"button",className:L("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>s((d)=>!d),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})})}),c&&n(S,{expanded:r})]}),n("div",{className:L("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:c&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!r,tabIndex:0,inert:!r,children:n(m,{text:p,streaming:!o})})})})]})}function Ue(e){if(G(e))return"mcp";let t=y(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ve(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ze(e,t,a){let o=new Map,r=[],s=new Set;for(let c of e){if(G(c)&&typeof c.rawInput.server==="string"){if(s.size===0)r.push({kind:"integrations"});s.add(c.rawInput.server);continue}if(Z(c)){if(!r.some((p)=>p.kind==="named"&&p.title===c.title))r.push({kind:"named",title:c.title});continue}let l=Ue(c);if(!o.has(l))r.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=r.map((c,l)=>{if(c.kind==="named")return c.title;if(c.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:s.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...s])});return Ve(c.category,o.get(c.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function cn({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:r=o,startedAt:s,providerId:u,providerIcon:c,children:l}){let{t:p,i18n:d}=i(),[f,C]=x(`work:${e}`,r,!0),h=j(`work:${e}`,f||o),N=V(null),[b,w]=F(0);U(()=>{if(!o||t!==void 0){N.current=null;return}N.current=s??Date.now();let B=()=>{let R=N.current;if(R===null)throw Error("Codex work section is ticking without a start time");w(Date.now()-R)};B();let _=window.setInterval(B,1000);return()=>window.clearInterval(_)},[o,s,t]);let A=t!==void 0?p(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:H(t,d.language)}):o&&b>=1000?p("stream.codex.workingFor",{duration:H(b,d.language)}):p(o?"stream.codex.working":"stream.codex.worked");return g("section",{className:"codex-work-section",children:[g("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":f,onClick:()=>C((B)=>!B),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:c}),n("span",{children:A}),n(S,{expanded:f,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:L("codex-work-grid",f&&"codex-work-grid-open"),"aria-hidden":!f,inert:!f,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:h&&l})})})]})}function He(e,t){if(e.type==="tool_use")return be(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ue(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function ee(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return k(e.status);return!1}function We(e,t,a=1000){let[o,r]=F({text:e,live:t}),s=V(Date.now());return U(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),c=Math.max(0,s.current+a-u);if(c===0||t!==o.live){s.current=u,r({text:e,live:t});return}let l=window.setTimeout(()=>{s.current=Date.now(),r({text:e,live:t})},c);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function je({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=i(),r=e.some(ee),s=T(e[0]),u=e.every((h)=>h.type==="tool_use"&&y(h).category==="execute"),[c,l]=x(`group:${s}`,t&&!u),p=j(`group:${s}`,c),d=e.findLast(ee)??e.at(-1);if(d===void 0)throw Error("CodexActivityGroup requires at least one activity block");let f=e.filter((h)=>h.type==="tool_use"),C=We(r?He(d,a):Ze(f,a,o.language),r);return g("div",{className:"codex-activity-group",children:[g("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((h)=>!h),children:[g("span",{className:"codex-activity-label",children:[n(ne,{block:e[0]}),n("span",{className:"truncate",children:r?n("span",{className:"codex-activity-running",children:C}):C})]}),n(S,{expanded:c})]}),n("div",{className:L("codex-activity-group-grid",c&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:p&&e.map((h)=>n(se,{block:h},T(h)))})})})]})}function te({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(se,{block:e[0]});return n(je,{blocks:e,defaultExpanded:t})}function oe({blocks:e,defaultExpanded:t}){if(!e.some(q))return n(te,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let r=a.at(-1);if(r&&q(r[0])===q(o))r.push(o);else a.push([o])}return n(O,{children:a.map((o)=>q(o[0])?n(dn,{blocks:o.filter(q)},T(o[0])):n(te,{blocks:o,defaultExpanded:t},T(o[0])))})}
|
|
7
|
-
export{cn,oe};
|
package/dist/chunk-0jvfabsq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-7dd374an.js";import{ne}from"./chunk-qqm07rfv.js";import{s,v}from"./chunk-e6ddpdxn.js";import{n}from"./chunk-3hp5t5wf.js";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{inSessionTree as B}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as q,ChevronRightIcon as E,GitBranchIcon as O,Loader2Icon as R,SquareIcon as T}from"lucide-react";import{useId as j,useState as p}from"react";import{jsx as a,jsxs as c}from"react/jsx-runtime";function J({sessionId:e}){let l=t((i)=>i.sessions),r=Object.values(l).filter((i)=>i.subagent?.parentId===e);if(r.length===0)return null;return a("div",{"data-subagent-sessions":!0,className:"min-w-0",children:r.map((i)=>a(D,{session:i},i.id))})}function D({session:e}){let{client:l,host:r}=n(),{t:i}=r,w=t((o)=>o.actions),I=t((o)=>o.sessions),S=t((o)=>o.connection==="ready"),m=w.filter((o)=>B(I,e.id,o.sessionId)).length,[d,k]=p(!1),[g,f]=p(!1),[x,h]=p(null),b=j(),u=s(e.configOptions,"model"),y=!e.attached?"detached":m>0?"requires_action":e.state==="unknown"?"unknown":e.error?"failed":e.state,C=S&&e.attached&&e.subagent?.capabilities?.cancel!=null&&e.state!=="idle",z=async()=>{f(!0),h(null);try{await l.cancel(e.id)}catch(o){h(o instanceof Error?o.message:String(o))}finally{f(!1)}};return c("section",{"aria-label":e.title??i("subagents.untitled"),className:"min-w-0",children:[c("div",{className:"flex min-w-0 items-center gap-1",children:[c(N,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":d,"aria-controls":b,onClick:()=>k(!d),children:[d?a(q,{className:"size-3.5 shrink-0"}):a(E,{className:"size-3.5 shrink-0"}),a(O,{className:"text-muted-foreground size-3.5 shrink-0"}),a("span",{className:"truncate",children:e.title??i("subagents.untitled")}),c("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[i(`subagents.${y}`),m>0?` · ${m}`:""]})]}),C&&a(N,{variant:"ghost",size:"icon-sm",disabled:g,"aria-label":i("subagents.cancel",{name:e.title??i("subagents.untitled")}),onClick:()=>{z()},children:g?a(R,{className:"size-3.5 animate-spin"}):a(T,{className:"size-3.5"})})]}),x&&a("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:x}),d&&c("div",{id:b,className:"min-w-0 ps-4",children:[(e.subagent?.description||u)&&c("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[a("span",{className:"min-w-0 flex-1 truncate",title:e.subagent?.description??void 0,children:e.subagent?.description}),u&&a("span",{className:"shrink-0",children:v(u)})]}),e.items.length>0?a("div",{className:"flex max-h-72 min-h-0 flex-col",children:a(ne,{session:e,client:l,host:r})}):a("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:i("subagents.noMessages")}),a(J,{sessionId:e.id})]})]})}
|
|
2
|
-
export{J};
|
package/dist/chunk-107y8e8x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E}from"./chunk-a9s3m9fs.js";import{Button as S}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as x,DialogContent as D,DialogDescription as y,DialogFooter as L,DialogHeader as h,DialogTitle as w}from"@nyssance/shadcn/vega/components/ui/dialog";import{createContext as d,useContext as p,useState as P,useSyncExternalStore as H}from"react";import{jsx as i,jsxs as u}from"react/jsx-runtime";var m=d(null),g=d(null),C=d(null);function to({host:e,client:t,children:n}){let[s,r]=P(null);E(s!==null);let{t:l}=e;return i(m,{value:e,children:i(g,{value:t,children:u(C,{value:r,children:[n,i(x,{open:s!==null,onOpenChange:(v)=>!v&&r(null),children:u(D,{children:[u(h,{children:[i(w,{children:l("sessionList.deleteTitle")}),i(y,{children:l("sessionList.deleteDescription")})]}),u(L,{children:[i(S,{variant:"outline",onClick:()=>r(null),children:l("sessionList.cancel")}),i(S,{onClick:()=>{if(s)f(e,t.delete(s.sessionId));r(null)},children:l("sessionList.delete")})]})]})})]})})})}function c(){let e=p(m);if(e===null)throw Error("Session list host is missing");return e}function a(){let e=p(g);if(e===null)throw Error("Session list client is missing");return e}function ve(){let e=p(C);if(e===null)throw Error("Session list provider is missing");return e}function o(e){let t=a();return H((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function f(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{to,c,a,ve,o,f};
|
package/dist/chunk-22h5rh2h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Nn}from"./chunk-hwh88n0v.js";import{Rn,En,An}from"./chunk-0zp04d1m.js";import{Mn}from"./chunk-tzyc5myt.js";import{e}from"./chunk-7dd374an.js";import{P}from"./chunk-8hbwf0qe.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function To(i,n){return{installUnlock:n==="none"?()=>()=>{}:En,preload:()=>{if(n!=="none")Rn(i)},playSequence:(a,d,l)=>An(a,d,l,i,n)}}function In(i,n={},a){let d=[];for(let t of i){if(t.user===null)continue;let o="";for(let m of t.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[t.user.id],s=t.items.map(f).find((m)=>m!==null);d.push({id:t.user.id,turnKey:t.key,label:P(t.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let t of d){if(t.nativeTurnId===void 0)continue;let o=l.get(t.nativeTurnId)??[];o.push(t),l.set(t.nativeTurnId,o)}let c=new Set(a.turns.map((t)=>t.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((t)=>{let o=l.get(t.turnId);if(o)return o;if(g.has(t.turnId))return[];let u=a.previews[t.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${t.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${t.turnId}`,nativeTurnId:t.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((t)=>t.nativeTurnId===void 0||!c.has(t.nativeTurnId))]}function T({item:i}){let n=e(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(Nn,{text:i.response,host:a})})]})}function Sn(i){return r(Mn,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
-
export{To,In,Sn};
|
package/dist/chunk-31yt34hy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var V="group/trailing";function O({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function G({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
|
|
2
|
-
export{V,O,G};
|
package/dist/chunk-3hp5t5wf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D}from"./chunk-7dd374an.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function Ae({host:o,client:e,children:t}){let s=a(()=>({host:o,client:e}),[o,e]);return r(D,{host:o,client:e,children:r(i,{value:s,children:t})})}function n(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function g(o,e){e.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{Ae,n,g};
|
package/dist/chunk-3jcx1ns0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-fcqwzmkd.js";import{M}from"./chunk-jnena0v6.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function vn({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(m,{text:t.content,streaming:!1})});if(!n(t))return null;return e(M,{entries:t.entries})}
|
|
2
|
-
export{vn};
|
package/dist/chunk-3jjc06nd.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i,m}from"./chunk-fcqwzmkd.js";import{y}from"./chunk-yjtq166b.js";import{un}from"./chunk-5e10bzg2.js";import{M}from"./chunk-jnena0v6.js";import{cn,oe}from"./chunk-04mj5ftg.js";import{ln}from"./chunk-j5rd55qs.js";import{it}from"./chunk-kvx8fv1e.js";import{cn as P}from"cn";import{jsx as o,jsxs as C}from"react/jsx-runtime";var N=new WeakMap,I=1;function A(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=N.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=I++;return N.set(t,s),`${t.type}:${s}`}function E({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return C("div",{className:"codex-assistant-message",children:[o(m,{text:t.text,streaming:n}),s]})}function _({block:t,streaming:n,actions:s,renderText:r}){switch(t.type){case"text":return r===void 0?o(E,{block:t,streaming:n,actions:s}):r({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(m,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(M,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var S=new Set;function Uo({message:t,isMostRecentTurn:n,hiddenTools:s=S,time:r,beforeCopy:a,afterCopy:d,providerIcon:u,renderText:b,renderEditedFiles:h}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(T,{});let k=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),B=!t.streaming&&k.trim().length>0?o(Ze,{text:k,isMostRecentTurn:n,beforeCopy:a,afterCopy:d,time:r}):null,l=un(t.content,"compact"),x=l.reduce((e,c,p)=>c.kind==="codexActivityGroup"?p:e,-1),v=l.findIndex((e,c)=>c>x&&e.kind==="block"&&e.block.type==="text"),w=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&y(e).category==="edit"),R=(e)=>{if(e.kind==="codexActivityGroup"){let c=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return c.length===0?null:o(oe,{blocks:c},`activity:${A(c[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(_,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===w?B:void 0,renderText:b},A(e.block))},g=x===-1?0:v===-1?l.length:v;return o(Je,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,g).map(R),answer:l.length>g?l.slice(g).map(R):null,footer:x!==-1&&f.length>0&&(h===void 0?o(ln,{blocks:f}):h(f))})}function Ze({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:r,time:a}){let d=i(),{t:u}=d;return C("div",{className:P("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(it,{text:t,label:u("actions.copy"),host:d}),r,a&&o("span",{className:"codex-user-time ms-1",title:a.full,children:a.short})]})}function T({label:t}){let{t:n}=i();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function Je({work:t,answer:n,footer:s,loading:r=!1,loadingLabel:a,...d}){if(r)return o(T,{label:a});return C("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(cn,{...d,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{Uo,Ze,Je};
|
package/dist/chunk-3z8ajtxp.js
DELETED
package/dist/chunk-4b3g7acq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{N}from"./chunk-vvq50011.js";import{e}from"./chunk-7dd374an.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function At({textareaRef:a,onOpenChange:p,menuOpen:o,disabled:m}){let{t}=e(),n=l(!1);return r(N,{"aria-label":t("composer.commands"),title:t("composer.commands"),disabled:m,"aria-pressed":o,onPointerDown:()=>{n.current=o},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{At};
|
package/dist/chunk-4jkg9p4g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Pt}from"./chunk-jx1cngyb.js";import{p}from"./chunk-wkvm8f2e.js";import{Button as P}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as k,HoverCardContent as T,HoverCardTrigger as M}from"@nyssance/shadcn/vega/components/ui/hover-card";import{cn as f}from"cn";import{PaperclipIcon as L,XIcon as z}from"lucide-react";import{Fragment as E,useEffect as R,useRef as D,useState as N}from"react";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(T,{align:"start",...t})}function kt({data:t,t:n,className:u,...m}){let c=p(),[d,h]=N(!1),[I,v]=N(1),C=D(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return R(()=>{if(!d)return;let l=0.1,g=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),v((b)=>{if(w)return 1;if(x)return g(b+l);return g(b-l)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[d]),r(K,{children:[r(k,{children:[e(M,{render:r("div",{className:f("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",u),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(P,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{v(1),h(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(L,{className:"size-3"})}),r(P,{"aria-label":n("input.removeAttachment"),className:f("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(l)=>{l.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(z,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(Pt,{containerRef:C,filename:a||n("input.image"),onOpenChange:h,onScaleChange:v,open:d,scale:I,url:t.url})]})}function Tt({children:t,className:n,...u}){let m=p();if(!m.files.length)return null;return e("div",{className:f("flex w-full flex-wrap items-center gap-1",n),...u,children:m.files.map((c)=>e(E,{children:t(c)},c.id))})}
|
|
2
|
-
export{kt,Tt};
|
package/dist/chunk-4xmbve71.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as k}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as p,Fragment as _}from"react/jsx-runtime";function m(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function u(e){if(!m(e)||!m(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>m(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((d)=>typeof d==="string"))))return[];return o}function pt(e,n){return JSON.stringify(["request_user_input_async",e,n])}function Wn(e){return{selected:e.options?.length?0:null,text:""}}function Ee(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function jn(e){return`<send_user_message_question_reply>
|
|
2
|
-
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function gt(e){if(!m(e)||!m(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>m(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>m(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:d,answer:f})=>({questionItemId:t,question:d,answer:f}))}function Kn({question:e,draft:n,status:o,answer:t,error:d,onChange:f,onSubmit:w,onSkip:A,t:c}){let h=R(),x=k(!1),a=k(null);v(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",N=o==="answered"||o==="skipped",g=e.options??[],Q=l&&Ee(e,n).trim().length>0,b="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${h}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:N?p(_,{children:[i("h3",{id:`${h}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:c("asyncQuestion.skipped")})]}):p(r.Root,{items:g.length>0?[{name:"answer",choices:[...g.map((s,y)=>({value:String(y)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),Q)w()},children:[p(r.Item,{name:"answer",className:"m-0 flex min-w-0 flex-col gap-3 border-0 p-0",children:[i(r.Title,{render:i("h3",{id:`${h}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),g.length>0&&p(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[g.map((s,y)=>p(r.Choice,{value:String(y),checked:n.selected===y,onChange:()=>l&&f({...n,selected:y}),className:b,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{className:"whitespace-pre-wrap",children:s})]},y)),p(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&f({...n,selected:null}),className:b,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{children:c("asyncQuestion.other")})]})]}),i(r.Input,{render:i(S,{rows:1,className:"min-h-0 resize-none"}),onCompositionStart:()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null,x.current=!0},onCompositionEnd:()=>{if(x.current=!1,a.current!==null)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{a.current=null})},onKeyDown:(s)=>{if(s.key==="Enter")s.stopPropagation();if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||x.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&Ee(e,{...n,text:s.currentTarget.value}).trim().length>0)w()},"aria-label":c("asyncQuestion.answer"),placeholder:c("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>f({selected:null,text:s.target.value})}),d&&i("p",{role:"alert",className:"text-destructive text-sm",children:d})]}),p("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(C,{size:"sm"}),disabled:!Q,children:c(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(C,{size:"sm",variant:"ghost"}),disabled:!l,onClick:A,children:c("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:c(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
-
export{u,pt,Wn,Ee,jn,gt,Kn};
|
package/dist/chunk-54qxv3er.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function go(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function Nt(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(go(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Mt(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function fo(t){return[...t].filter((e)=>!s(e)).join("")}function oo(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function Ce(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=fo(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-oo(e,o)),r=Math.max(0,i-oo(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{go,Nt,Mt,fo,oo,Ce};
|
package/dist/chunk-5bz1bzsw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-107y8e8x.js";import{de}from"./chunk-6p41wmgs.js";import{C}from"./chunk-dj4e0q7k.js";import{pe,ge}from"./chunk-7s7txz2j.js";import{Input as H}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as L}from"@nyssance/shadcn/vega/components/ui/separator";import{formatDistanceToNowStrict as z}from"date-fns";import{enUS as E,zhCN as A}from"date-fns/locale";import{ClockIcon as D,MessageSquareIcon as w}from"lucide-react";import{useEffect as g,useState as M}from"react";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:E,"zh-CN":A};function j(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return z(new Date(t),{locale:r})}function ce({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:y,PathAction:u}=c(),f=ge(),I=pe();g(()=>{f(n)},[n,f]);let[x,p]=M(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let l=e.trim();m?.(l!==""&&l!==t.title?l:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?j(t.updatedAt,y.language):null,v=[];if(N!==null)v.push({icon:o(D,{className:"size-3.5"}),text:N});let s=u&&o(u,{cwd:t.cwd,onOpened:I});return o(de,{title:n?o(H,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(C,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(w,{className:"size-3.5"}),details:v,actions:s||a!==void 0?h(O,{children:[s,s&&a!==void 0&&o(L,{}),a]}):void 0})}
|
|
2
|
-
export{j,ce};
|
package/dist/chunk-5dk4xga8.js
DELETED
package/dist/chunk-5my9w4vd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Gt,p}from"./chunk-wkvm8f2e.js";import{It}from"./chunk-rsfwc38x.js";import{A}from"./chunk-x480gyp7.js";import{Bt,Ut,zt,$t,qt,N}from"./chunk-vvq50011.js";import{kt,Tt}from"./chunk-4jkg9p4g.js";import{qe}from"./chunk-kkps1qd4.js";import{e,t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{Ke}from"./chunk-3z8ajtxp.js";import{r,Vn,b,De}from"./chunk-d6c0mnth.js";import{Te}from"./chunk-9ej4c7a8.js";import{B,Me}from"./chunk-5tqygmg9.js";import{_e,Fe}from"./chunk-am6tss41.js";import{Gn}from"./chunk-8yj3q7n2.js";import{Ne}from"./chunk-j9q2s4kq.js";import{Dt}from"./chunk-vsff9djs.js";import{Ie}from"./chunk-x0tbzjqc.js";import{Se}from"./chunk-k9mbpf0g.js";import{At}from"./chunk-4b3g7acq.js";import{Ot}from"./chunk-fkwafga0.js";import{ke}from"./chunk-d1trg76g.js";import{hasFuzzyFileSearch as St}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Ft}from"lucide-react";import{useCallback as k,useEffect as _t,useLayoutEffect as tt,useMemo as et,useRef as q,useState as D}from"react";import{jsx as c,jsxs as T}from"react/jsx-runtime";var Lt=["image/png","image/jpeg","image/webp","image/gif"],rt=[];async function Wt(o){let u=await(await fetch(o.url)).blob();return new Promise((d,O)=>{let M=new FileReader;M.onerror=()=>O(M.error),M.onload=()=>{let W=M.result;d(W.slice(W.indexOf(",")+1))},M.readAsDataURL(u)})}function jt(o){let{t:u}=e(),d=p();return c(N,{"aria-label":u("composer.attachImage"),title:u("composer.attachImage"),onClick:()=>d.openFileDialog(),...o,children:c(Ft,{className:"size-4"})})}function we({session:o,onSubmit:u,onShellCommand:d,onHandOff:O,modelSelector:M,modelMenu:W,inputHeader:nt,actions:ht,children:gt,attachmentPolicy:xt,predictions:yt=!0,disabled:Pt=!1,preparing:ot=!1,allowPendingInput:bt=!1}){let{host:_,client:S}=n(),{t:l}=_,L=k((a)=>{if(_.reportError)_.reportError(a);else console.error(a)},[_]),[at,z]=D(()=>({text:r.get(o.id)?.text??"",revision:0})),{text:v}=at,[C,vt]=D(()=>r.get(o.id)?.attachments??rt),[f,j]=D(()=>r.get(o.id)?.mentions??[]),J=C.some((a)=>B(a)&&a.pastedText.status!=="ready"),[E,it]=D(!1),[H,wt]=D(!1),[Q,ct]=D(!1),h=q(null),st=q(null),i=q(at),K=k((a)=>{st.current?.(),i.current={text:a,revision:i.current.revision+1},z(i.current)},[]),mt=et(()=>({read:()=>{let s=h.current?.getTextarea(),x=s===null||s===void 0?[i.current.text.length,i.current.text.length]:[s.selectionStart,s.selectionEnd];return{target:o.id,...i.current,selection:x}},compareAndSet(s,x,R){if(s.target!==o.id||s.revision!==i.current.revision)return null;i.current={text:x,revision:i.current.revision+1},z(i.current);let y=h.current?.getTextarea();if(y!==null&&y!==void 0)y.value=x,y.setSelectionRange(R[0],R[1]);return{target:o.id,...i.current,selection:R}}}),[o.id]),U=q(null),pt=k((a)=>(U.current=a,()=>{if(U.current===a)U.current=null}),[]),G=o.state!=="idle",w=d!==void 0&&v.startsWith("!"),g=!Pt&&!ot&&o.attached&&!o.restoring&&!o.readOnly,F=!o.readOnly&&(bt||g),Y=Se(o,g&&!E&&!H&&!J&&!Q,v.length>0||C.length>0||f.length>0,yt&&!w),lt=Y.invalidate;tt(()=>{r.set(o.id,{text:v,attachments:C,mentions:f,modelId:r.get(o.id)?.modelId??null})},[o.id,v,C,f]),tt(()=>Vn(o.id,vt),[o.id]),tt(()=>De(o.id,(a)=>{if(!F||E)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||f.length)throw Error("The composer already has a draft; send or clear it first");K(a)}),[o.id,F,E,v,C,f,K]);let dt=t((a)=>St(a.agent)),Mt=et(()=>dt&&g?async(a)=>Te((await S.fuzzyFileSearch({query:a,roots:[o.cwd]})).files):void 0,[S,dt,g,o.cwd]),Z=k((a)=>{j((s)=>s.includes(a)?s:[...s,a])},[]);_t(()=>{h.current?.focus()},[]);let ut=k(async({text:a,files:s})=>{let x=d!==void 0&&a.startsWith("!")?a.slice(1):null;if(x!==null){if(x.trim().length===0)return;if(s.length||f.length)throw Error("Shell commands cannot include file references or attachments");if(o.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let R=a.trim();if(R.length===0&&s.length===0&&f.length===0)return;let y=U.current;it(!0);let I=r.get(o.id),Nt=i.current.revision,V=null;try{let P=[];for(let m of f){let X={kind:"file",absPath:m};P.push({type:"resource_link",uri:_e(X),name:Fe(X)})}if(R.length>0)P.push({type:"text",text:R});for(let m of s)if(B(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");P.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else P.push({type:"image",data:await Wt(m),mimeType:m.mediaType});if(i.current.revision===Nt&&r.get(o.id)===I)i.current={text:"",revision:i.current.revision+1},V=i.current.revision,z(i.current),j([]),b(o.id,()=>rt),r.set(o.id,{text:"",attachments:rt,mentions:[],modelId:I?.modelId??null}),h.current?.resetHeight();if(x!==null&&d)await d(x);else if(u)if(y===null)await u(P);else await u(P,(m)=>{if(y.signal.aborted||U.current!==y)return;y.accept(m),O?.(o.id,m)});else if(y===null)await S.prompt(o.id,P);else{let m=await S.prompt(o.id,P);y.accept(m)}lt();for(let m of I?.attachments??[])if(m.url.startsWith("blob:")&&!r.get(o.id)?.attachments.some((X)=>X.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(I&&V!==null&&i.current.revision===V&&r.get(o.id)?.attachments.length===0&&r.get(o.id)?.mentions.length===0)i.current={text:I.text,revision:V+1},z(i.current),j(I.mentions),r.set(o.id,I),b(o.id,()=>I.attachments);throw P}finally{it(!1),h.current?.focus()}},[S,o.id,o.state,f,u,d,O,lt]),Ct=()=>{S.cancel(o.id).catch(L)},Et=k((a)=>{let s=a.code==="max_total_size"?Object.assign(Error(l("composer.imageTooLargeTitle")),{description:l("composer.imageTooLargeDescription",{mb:A})}):Object.assign(Error(l("composer.unsupportedAttachmentTitle")),{description:l("composer.unsupportedAttachmentDescription")});L(s)},[L,l]),Rt=et(()=>({session:o,ready:g,inputReady:F,sending:E,textareaRef:h,draft:mt,interruptRef:st,observeReceipts:pt,addMention:Z,setAdding:wt,shellMode:w,handsFree:!w&&(u===void 0||O!==void 0)}),[o,g,F,E,mt,pt,Z,u,O,w]),ft=_.writeTextAttachment;return c(Ke,{value:Rt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:T("div",{className:"relative",children:[nt&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:nt}),T(Gt,{attachmentPolicy:xt,value:v,revision:i.current.revision,onValueChange:K,onSubmittedClear:()=>{i.current={text:"",revision:i.current.revision+1},z(i.current)},attachments:C,onAttachmentsChange:(a)=>b(o.id,()=>a),children:[c(It,{bashMode:d!==void 0,handleRef:h,commands:o.commands,searchFiles:Mt,onMention:Z,onSearchError:L,forcedOpen:Q,onForcedOpenChange:ct,emptyLabel:l("composer.noCommands"),fileStatusLabels:{loading:l("composer.searchingFiles"),empty:l("composer.noMatchingFiles")}}),T(Bt,{"data-shell-mode":w||void 0,bashMode:d!==void 0,globalDrop:!0,multiple:!0,accept:Lt.join(","),onError:Et,onSubmit:ut,onSubmitAsync:ut,onSubmitError:L,canSubmit:()=>g&&!E&&!H&&!J&&(!w||!G&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[gt,T(zt,{className:"px-3 pt-3 pb-0 empty:hidden",children:[H&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:l("composer.addingFiles")}),c(Gn,{mentions:f,onRemove:(a)=>j((s)=>s.filter((x)=>x!==a))}),c(Tt,{children:(a)=>B(a)?c(Dt,{data:a,sessionId:o.id}):c(kt,{data:a,t:l})})]}),T(Ut,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(a)=>{if(!Y.text||h.current?.isComposing()||a.nativeEvent.isComposing||a.nativeEvent.keyCode===229||a.shiftKey||a.ctrlKey||a.altKey||a.metaKey||a.target!==h.current?.getTextarea())return;if(a.key==="Tab")a.preventDefault(),a.stopPropagation(),K(Y.text)},children:[w&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(qe,{className:"min-h-10 bg-transparent text-sm font-normal",ref:h,rows:2,bashMode:d!==void 0,disabled:!F,onPasteCapture:ft?(a)=>Me(a,o.id,l("composer.pastedTextFilename"),ft):void 0,placeholder:w?"! command":Y.text||(G?l("composer.steerPlaceholder"):l("composer.placeholder")),"aria-label":l("composer.placeholder")})]}),c($t,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:T("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[T("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(jt,{className:"text-foreground",disabled:!F}),c(At,{textareaRef:h,menuOpen:Q,onOpenChange:ct,disabled:!g||o.commands.length===0}),c(Ie,{sessionId:o.id,options:o.configOptions,disabled:!g})]}),T(qt,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(ke,{session:o}),M??c(Ne,{...W,sessionId:o.id,options:o.configOptions,disabled:!g}),ht,c(Ot,{active:G,sending:E||ot||H,ready:g&&!J&&(!w||!G&&v.slice(1).trim().length>0),hasMentions:f.length>0,onStop:Ct})]})]})})]})]})]})})})}
|
|
2
|
-
export{we};
|
package/dist/chunk-5tqygmg9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,b,Le}from"./chunk-d6c0mnth.js";var Ft=5000;function B(t){return"pastedText"in t}function ho(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Q(t,e,o){let n=(a,s)=>{for(let[i,x]of r){if(!x.attachments.some((p)=>p.id===e.id))continue;b(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":ho(s),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),Le(e.id,o("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function Me(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Ft)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:a,status:"pending"}};b(e,(i)=>[...i,s]),Q(e,s,n)}
|
|
2
|
-
export{Ft,B,ho,Q,Me};
|
package/dist/chunk-7dd374an.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Qn}from"./chunk-fcqwzmkd.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function D({host:n,client:i,children:o}){return r(Qn,{host:n,children:r(c,{value:n,children:r(u,{value:i,children:o})})})}function e(){let n=l(c);if(n===null)throw Error("Timeline host is missing");return n}function _(){let n=l(u);if(n===null)throw Error("Timeline client is missing");return n}function W(n,i){return m((o)=>n.subscribe(o),()=>i(n.getState()),()=>i(n.getState()))}function t(n){let i=_();return W(i.store,n)}function ae(n,i){if(n.reportError)n.reportError(i);else console.error(i)}
|
|
2
|
-
export{D,e,_,W,t,ae};
|
package/dist/chunk-7s7txz2j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{he,R}from"./chunk-dgm4gxkj.js";import{C}from"./chunk-dj4e0q7k.js";import{S}from"./chunk-h3antqdd.js";import{E}from"./chunk-a9s3m9fs.js";import{V,O,G}from"./chunk-31yt34hy.js";import{PreviewCard as x}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as I,useContext as T,useLayoutEffect as D,useState as H}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as j}from"react/jsx-runtime";function xt(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function K({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function me({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function $e({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:N,headerChildren:f,wrapHeader:u,onHeaderClick:w,children:h}){let b=()=>{w?.(),t(!o)},v=p(V,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),P=d(j,{children:[r!=null&&e(K,{children:r}),f??e(C,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(G,{content:s!==void 0?e(O,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:N})})]}),y=f==null?d("div",{"data-active":l?"":void 0,title:n,className:p(v,R),onClick:b,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),b()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),P]}):e("div",{"data-active":l?"":void 0,className:v,children:P});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?y:u(y),o&&e(xt,{className:"mt-0.5",children:h})]})}var L=I(()=>{}),_=I(()=>{});function pe(){return T(_)}function ge(){return T(L)}function fe({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:N,preview:f,listeningPorts:u,onOpenPort:w,accessory:h,meta:b,hint:v,actions:P,className:y,...c}){let k=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(V,he,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(f||u!=null&&u.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",y),...c,children:[e(K,{children:t!=null?e(S,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(C,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),N!=null&&e(C,{className:"text-muted-foreground text-xs",children:N}),f&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:f}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((m)=>w?d("button",{type:"button",className:"underline",onPointerDown:(g)=>g.stopPropagation(),onKeyDown:(g)=>g.stopPropagation(),onClick:(g)=>{g.stopPropagation(),w(m)},children:[":",m]},m):d("span",{children:[":",m]},m))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(G,{content:h!=null?e(O,{children:h}):b??e(O,{}),actions:P}),v!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:v})]})]});if(a==null)return k;return e(M,{row:k,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=H(!1),[s,a]=H(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(L.Provider,{value:a,children:e(_.Provider,{value:()=>{i(!1),a(!1)},children:e(q,{open:l,onOpenChange:i,trigger:o,children:t})})})}function q({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return E(o),d(x.Root,{open:o,onOpenChange:t,children:[e(x.Trigger,{render:n,delay:700,closeDelay:100}),e(x.Portal,{children:e(x.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(x.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
-
export{xt,K,me,$e,pe,ge,fe};
|
package/dist/chunk-8hbwf0qe.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u}from"./chunk-4xmbve71.js";import{codexMessageError as A,nativeTurnId as y,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Mo(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 Hn(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 a=y(e),p=t.errors.findIndex((m)=>a!==null&&y(m)===a);if(p===-1)t.errors.push(e);else t.errors[p]=e;break}let s=E(e),i=e._meta?.codex,l=u(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(u(e._meta).length>0)t.final.push(e);else if(l)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 Fn(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)=>!Mo(r))},l=new Map(n.map((r,d)=>[r.turnId,d])),a=[],p=[a],m,I=null;for(let r of i.items){let d=y(r),c=l.get(d??"");if(d!==null&&I!==null&&d!==I||c!==void 0&&m!==void 0&&c>m+1)a=[],p.push(a);if(a.push(r),d!==null||r.kind==="user")I=d;if(c!==void 0)m=c}return p.flatMap((r)=>_({...i,items:r})).map((r)=>{let d=r.prompt===null?[]:[r.prompt];for(let f of r.entries)M(f,d,s);let c=d[0];if(c===void 0)throw Error("A turn without items");let h=`turn:${c.kind}:${c.id}`,x=r.endedAt??Math.max(...d.map((f)=>f.at)),k=o.get(h);if(k!==void 0&&K(k.items,d)&&k.endedAt===x)return k;let b={key:h,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??c.at,endedAt:x,replayed:d.every(lt),items:d},v=d.findLastIndex((f)=>f.kind!=="user"&&f.kind!=="compaction");return d.forEach((f,g)=>j(b,f,g<v,d[g-1])),b})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function lt(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function P(t){return S(t.content)}function ie(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function ct(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function On(t){let e=(s)=>{for(let i of t.items){let l=i._meta?.codex;if(typeof l!=="object"||l===null)continue;let a=l[s];if(typeof a==="number"&&Number.isFinite(a)&&a>=0)return a}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Bn(t,e,n){if(n?.user==null)return!1;let o=e.items.map(y).find((i)=>i!==null),s=y(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let l=i._meta?.codex;return typeof l==="object"&&l!==null&&"turnCompletedAt"in l&&typeof l.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 Un(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(!Bn(t,e[n-1],o))break;n--}return e[n]?.key}function zn(t,e,n){let o=n,s=n;while(o>0&&Bn(t,e[o-1],e[o]))o--;while(s+1<e.length&&Bn(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),l=i.findLast((a)=>a.items.some((p)=>p.kind!=="user"))??i[0];return{continued:e[n]!==l,items:i.flatMap((a)=>a.items),edits:i.flatMap((a)=>a.edits),startedAt:i[0].startedAt}}
|
|
2
|
-
export{Mo,Hn,Fn,lt,P,ie,ct,On,Bn,Un,zn};
|
package/dist/chunk-8yj3q7n2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-7dd374an.js";import{He}from"./chunk-am6tss41.js";import{Badge as t}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{FileIcon as r,XIcon as l}from"lucide-react";import{jsx as a,jsxs as c}from"react/jsx-runtime";function Gn({mentions:n,onRemove:s}){let{t:i}=e();if(n.length===0)return null;return a("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:n.map((o)=>c(t,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(r,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:He(o)}),a(m,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:He(o)}),onClick:()=>s(o),children:a(l,{className:"size-3"})})]},o))})}
|
|
2
|
-
export{Gn};
|
package/dist/chunk-9eqezb4k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var l={ar:{untitled:"دردشة جديدة",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة"},de:{untitled:"Neuer Chat",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"}},es:{untitled:"Nuevo chat",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados"},fr:{untitled:"Nouveau chat",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées"},hi:{untitled:"नई चैट",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत"},id:{untitled:"Obrolan baru",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan"},it:{untitled:"Nuova chat",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate"},ja:{untitled:"新しいチャット",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み"},ko:{untitled:"새 채팅",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨"},"pt-BR":{untitled:"Novo chat",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas"},ru:{untitled:"Новый чат",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"}}};
|
|
2
|
-
export{l};
|
package/dist/chunk-9xfv8jdn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{oe}from"./chunk-04mj5ftg.js";import{hn}from"./chunk-eeq8d3x7.js";import{e}from"./chunk-7dd374an.js";import{k}from"./chunk-qmc18ejg.js";import{lt}from"./chunk-8hbwf0qe.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as v,useMemo as R}from"react";import{jsx as l,jsxs as u,Fragment as x}from"react/jsx-runtime";function T({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((t)=>y(t.content)||g(t.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((t,s)=>l(k,{block:t.content},`${n.id}:${s}`))]})}var tt=v(function({sessionId:r,items:t,terminals:s,streamingThoughtId:d}){let p=e(),i=t.every(lt),c=p.toolBlock,a=R(()=>t.map((o)=>{let m={...hn(o,s,o.kind==="thought"&&o.id===d),id:JSON.stringify([r,i?"history":"live",o.id])};return m.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(m,o):m}),[r,i,t,s,d,c]);return u(x,{children:[l(oe,{blocks:a,defaultExpanded:!i}),t.map((o)=>o.kind==="tool"&&l(T,{item:o},o.id))]})});
|
|
2
|
-
export{tt};
|
package/dist/chunk-a3s36z4s.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Xt}from"./chunk-9xkp5x7h.js";import{Zt}from"./chunk-ekd97p2x.js";import{Qt}from"./chunk-4xhvh2dn.js";import{te}from"./chunk-0zph0gwq.js";import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function U(e){return e.kind==="elicitation"&&x(e.params)}function y(e){let o=e._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(e){let o=e.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(e){for(let o of e.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(e){return(e.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
-
`)}function T({subject:e,requestTitle:o}){let{host:s}=n();if(!b(e))return null;let r=e.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(te,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(e,o){let{host:s,client:r}=n();return(l)=>{try{if(o)o(e.id,l);else r.respond(e.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s),i=e.params,c=r.permissionTitle?.(i)??i.title;return m(Xt,{requestId:e.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function ee({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s),i=t((c)=>e.sessionId===null?void 0:c.sessions[e.sessionId]);return a(Zt,{requestId:e.id,schema:e.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${e.params.message}`:e.params.message,total:o,t:r.t,onRespond:l})}function Pe({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s);if(e.kind==="permission")return a(C,{action:e,total:o,onRespond:s});if(U(e))return a(ee,{action:e,total:o??1,onRespond:s});let i=e.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Qt,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{U,ee,Pe};
|
package/dist/chunk-a414w7ah.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Jt,te}from"./chunk-0zph0gwq.js";import{e,W}from"./chunk-7dd374an.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function xe(t){c.setState({request:{path:t.path,patch:Ct(t.patch,t.path)}})}function Ct(t,a){let n=t.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return t;return n.find((o)=>{let r=o.split(`
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??t}function ye(){let{t,theme:a}=e(),n=W(c,(o)=>o.request),s=n===null?null:Jt(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:t("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(te,{patch:n.patch,theme:a})})]})})}
|
|
3
|
-
export{xe,Ct,ye};
|
package/dist/chunk-am6tss41.js
DELETED
package/dist/chunk-b65w6x23.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var io={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Yt(e){return[...e].toSorted((o,n)=>(io[o.kind]??99)-(io[n.kind]??99))}function Fo(e){return e==="allow_once"||e==="allow_always"}function Oo(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{io,Yt,Fo,Oo};
|
package/dist/chunk-cv2j9sjp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-7dd374an.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 dt({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 ut({error:i,retry:r}){let{t:m}=e(),f=h(i),[c]=u(()=>r?.delaySeconds==null?null:Date.now()+r.delaySeconds*1000),[p,v]=u(r?.delaySeconds??null),[N,y]=u(!1),[x,g]=u(null),o=s(!1),w=s(!1),E=s(r?.run);E.current=r?.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((t)=>{w.current=!0,o.current=!1,v(null),y(!1),g(t instanceof Error?t.message:String(t))})}),l=r!==void 0&&f.retryable;return C(()=>{if(!l||c===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let t=Math.max(0,Math.ceil((c-Date.now())/1000));if(v(t),t===0)S.current("automatic")},1000);return()=>clearInterval(a)},[c,l]),d(dt,{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{dt,ut};
|
package/dist/chunk-d1trg76g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{s,v}from"./chunk-e6ddpdxn.js";import{HoverCard as L,HoverCardContent as H,HoverCardTrigger as W}from"@nyssance/shadcn/vega/components/ui/hover-card";import{hasAccount as T,isGroupedSelect as F}from"@nyssance/codex-acp-v2/client";import{cn as z}from"cn";import{useEffect as O,useState as A}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var p=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),I=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),U=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function g(r){return typeof r==="number"&&!Number.isNaN(r)?Math.max(0,r):0}function V(r,e){let o=Math.min(100,r/e*100),f=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:f}}function G(r){let e=s(r.configOptions,"model");return e===void 0?void 0:v(e)}function Lt(r,e){let o=r.windowDurationMins;if(o===null)return e("usage.usage");if(o%1440===0)return e("usage.windowDays",{count:o/1440});return e("usage.windowHours",{count:Math.round(o/60)})}function P(r){let{client:e}=n(),o=t((a)=>r&&a.connection==="ready"&&T(a.agent)),[f,c]=A(null);return O(()=>{if(!o){c(null);return}let a=!0;e.readRateLimits().then((m)=>{if(a)c(m)},()=>{return});let d=e.onRateLimits((m)=>{if(a)c(m)});return()=>{a=!1,d()}},[o,e]),o?f:null}function ke({session:r}){let{t:e}=n().host,o=s(r.configOptions,"model"),f=o!==void 0&&(F(o.options)?o.options.some((u)=>u.groupId==="chatgpt"&&u.options.some((b)=>b.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((u)=>u.value===o.currentValue)),c=P(f),{usage:a,lastTurnUsage:d}=r;if(a===null&&d===null)return null;let m=a&&a.size>0?V(a.used,a.size):null,h=7,k=2*Math.PI*h,N=g(d?.inputTokens),w=g(d?.outputTokens),x=g(d?.cachedReadTokens),R=g(d?.cachedWriteTokens),C=g(d?.totalTokens)||N+w+x+R,S=N+x,D=S>0?I.format(x/S):e("tokens.notAvailable"),M=[[e("tokens.input"),p.format(N)],[e("tokens.output"),p.format(w)],[e("tokens.cachedRead"),p.format(x)],[e("tokens.cachedWrite"),p.format(R)],[e("tokens.cacheHitRate"),D],[e("tokens.total"),p.format(C)]],y=G(r);return l(L,{children:[i(W,{delay:100,closeDelay:100,render:l("button",{type:"button",className:z("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":e("tokens.openDetails"),children:[l("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[i("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&i("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:k,strokeDashoffset:k*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&l("span",{children:[Math.round(m.pct),"%"]})]})}),l(H,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[y!==void 0&&i("div",{className:"border-b px-3 py-2",children:i("p",{className:"text-foreground truncate text-xs font-semibold",title:y,children:y})}),l("div",{className:"flex flex-col gap-3 p-3",children:[d!==null&&l("div",{className:"flex flex-col gap-1.5",children:[i("p",{className:"text-xs font-medium",children:e("tokens.openDetails")}),i("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([u,b])=>l("div",{className:"contents",children:[i("dt",{className:"text-muted-foreground",children:u}),i("dd",{className:"text-end tabular-nums",children:b})]},u))})]}),a!==null&&a.size>0&&l("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[i("p",{className:"text-xs font-medium",children:e("tokens.context")}),i("p",{className:"text-muted-foreground text-xs tabular-nums",children:e("tokens.contextSummary",{used:p.format(a.used),limit:p.format(a.size),percent:U.format(a.used/a.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&l("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[i("p",{className:"text-xs font-medium",children:e("usage.limits")}),i("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((u)=>u!==null).map((u)=>l("div",{className:"contents",children:[i("dt",{className:"text-muted-foreground",children:Lt(u,e)}),i("dd",{className:"text-end tabular-nums",children:e("usage.used",{percent:Math.round(Math.min(100,Math.max(0,u.usedPercent)))})})]},`${u.windowDurationMins??"window"}`))})]})]})]})]})}
|
|
2
|
-
export{Lt,ke};
|
package/dist/chunk-dgm4gxkj.js
DELETED
package/dist/chunk-e6ddpdxn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function h(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function s(e,t){return e.find((n)=>n.category===t&&o(n))}function v(e){return h(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{h,s,v};
|
package/dist/chunk-e9znmqdj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{U,ee,Pe}from"./chunk-a3s36z4s.js";import{J}from"./chunk-0jvfabsq.js";import{inSessionTree as d}from"@nyssance/codex-acp-v2/client";import{jsx as o,jsxs as c,Fragment as p}from"react/jsx-runtime";var u=[];function be({sessionId:e}){let l=t((s)=>s.sessions),{host:f}=n(),a=t((s)=>s.actions),r=a.some((s)=>d(l,e,s.sessionId))?a.filter((s)=>d(l,e,s.sessionId)):u,i=r.filter(U),m=r.filter((s)=>!U(s));return c(p,{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(J,{sessionId:e})}),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((s)=>c("div",{children:[s.sessionId!==e&&o("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:s.sessionId===null?"":l[s.sessionId]?.title??f.t("subagents.untitled")}),o(Pe,{action:s})]},s.id))}),i[0]!==void 0&&o(ee,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
-
export{be};
|
package/dist/chunk-eyfdn4p3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u,pt,Wn,Ee,jn,gt,Kn}from"./chunk-4xmbve71.js";import{e,_,W,t}from"./chunk-7dd374an.js";import{L}from"./chunk-qv7kkv47.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var v=E({entries:{}});function l(r,n){v.setState((s)=>({entries:{...s.entries,[r]:n}}))}function x(r,n){let s=b(n),a=r.items.findLast((i)=>b(i)!==null);return!n.replayed&&s!==null&&a!==void 0&&b(a)===s}function M(r,n){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...gt(s._meta),...s.content.filter(k).flatMap((i)=>gt(i._meta))])if(a.questionItemId===n)return a.answer}return}function O({sessionId:r,item:n,question:s,index:a}){let i=_(),{t:g}=e(),S=pt(n.id,a),c=JSON.stringify([r,S]),f=W(v,(o)=>o.entries[c]),d=t((o)=>o.sessions[r]),A=t((o)=>o.connection==="ready"),p=f?.draft??Wn(s),q=d===void 0?f?.accepted:M(d,S)??f?.accepted,h=d!==void 0&&x(d,n),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,y=q!==void 0?"answered":f?.skipped?"skipped":f?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(v.getState().entries[c]?.pending||y!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,n)||!o.attached||o.readOnly||o.restoring)return;let I=Ee(s,p);if(!I.trim())return;let w={questionItemId:S,question:s.title,answer:I};l(c,{draft:p,pending:!0});try{await i.prompt(r,[{type:"text",text:jn(w),_meta:{codex:{questionReply:w}}}]),l(c,{draft:p,accepted:I})}catch(Q){l(c,{draft:p,error:Q instanceof Error?Q.message:String(Q)})}};if(y==="closed")return null;return m(Kn,{question:s,draft:p,status:y,answer:q,error:y==="pending"?f?.error:void 0,t:g,onChange:(o)=>l(c,{draft:o}),onSkip:()=>l(c,{draft:p,skipped:!0}),onSubmit:()=>{C()}})}function mt({sessionId:r,item:n}){let s=t((i)=>i.sessions[r]),a=u(n._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,n))return m(L,{content:n.content.some((i)=>!k(i)||i.text.trim().length>0)?n.content:a.map((i)=>({type:"text",text:i.title})),messageId:n.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":n.id,children:a.map((i,g)=>m(O,{sessionId:r,item:n,question:i,index:g},pt(n.id,g)))})}
|
|
2
|
-
export{mt};
|
package/dist/chunk-fcqwzmkd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as r,useContext as s}from"react";import{jsx as e}from"react/jsx-runtime";var n=r(null);function Qn({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function i(){let t=s(n);if(t===null)throw Error("Activity host is missing");return t}function m(t){let{Markdown:o}=i();return e(o,{...t})}
|
|
2
|
-
export{Qn,i,m};
|
package/dist/chunk-fkwafga0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Y}from"./chunk-wkvm8f2e.js";import{N,Wt}from"./chunk-vvq50011.js";import{e}from"./chunk-7dd374an.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Ot({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t}=e(),s=Y(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?t("composer.steer"):t("composer.send");return n(P,{children:[a&&o(N,{"aria-label":t("composer.stop"),title:t("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(Wt,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
-
export{Ot};
|
package/dist/chunk-gap8n0vv.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{et}from"./chunk-j5rd55qs.js";import{e}from"./chunk-7dd374an.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function yo(o,s){let n=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(n.length<=1)return o;return n.find((i)=>{let a=i.split(`
|
|
2
|
-
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function bo(o){let s=new Map,n=null;for(let t of o.split(`
|
|
3
|
-
`)){if(t.startsWith("diff --git ")){n=null;continue}if(t.startsWith("+++ ")){let i=t.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)n={additions:0,deletions:0},s.set(a,n);continue}if(t.startsWith("--- ")){let i=t.slice(4).trim();if(i!=="/dev/null"&&n===null)n={additions:0,deletions:0},s.set(i.replace(/^a\//,""),n);continue}if(n===null)continue;if(t.startsWith("+"))n.additions+=1;else if(t.startsWith("-"))n.deletions+=1}return s}function u(o,s){let n=s.replaceAll("\\","/");for(let[t,i]of o)if(n===t||n.endsWith(`/${t}`))return i;return{additions:0,deletions:0}}function wo(o){let s=new Map;for(let n of o)for(let t of n.content){if(!p(t))continue;let i=t.patch?bo(t.patch.text):new Map;for(let a of t.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=t.patch?yo(t.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
-
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function sn({items:o}){let s=e(),{openDiff:n,FileIcon:t}=s;return c(et,{files:wo(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:n===void 0?void 0:(i)=>n({path:i.path,patch:i.patch}),renderPath:t===void 0?void 0:(i)=>g(h,{children:[c(t,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
-
export{yo,bo,wo,sn};
|
package/dist/chunk-j5rd55qs.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i}from"./chunk-fcqwzmkd.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
-
`).length}function Co(e){let c=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let a=u,f=a._meta?.alwith?.hunks??[],l=f.reduce((n,s)=>n+x(s.newText),0),h=f.reduce((n,s)=>n+x(s.oldText),0);for(let n of a.changes){let s=c.get(n.path);if(s)s.additions+=l,s.deletions+=h;else c.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...c.values()]}function ln({blocks:e}){return d(et,{files:Co(e)})}function et({files:e,onOpen:c,renderPath:r,actions:u}){let{t:a,openLink:f}=i(),[l,h]=m(!0),[n,s]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[d("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:d(k,{})}),o("div",{className:"codex-edited-files-summary",children:[d("strong",{children:a("stream.codex.editedFilesCount",{count:e.length})}),d("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),s(!1)},"aria-expanded":l,children:a(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:a("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[d("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>c===void 0?f(t.path):c(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>s((t)=>!t),children:[a(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?d(C,{size:16,"aria-hidden":"true"}):d(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
-
export{Co,ln,et};
|
package/dist/chunk-j9q2s4kq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ht}from"./chunk-ww223tm5.js";import{t}from"./chunk-7dd374an.js";import{n,g}from"./chunk-3hp5t5wf.js";import{h,s,v}from"./chunk-e6ddpdxn.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 Ne({sessionId:l,options:p,disabled:x,onModelChange:O,onConfigChange:_,defaultGroup:L={id:"models",name:"Models"},catalog:N=(f)=>f,headerAction:P}){let{host:f,client:k}=n(),{t:i}=f,z=t((e)=>Boolean(e.configPending[l])),M=H({sessionId:l,model:!0}),S=z&&(M.current.sessionId!==l||M.current.model),R=t((e)=>{let r=e.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),o=s(p,"model"),a=s(p,"thought_level"),V=p.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==o&&e!==a)),y=V.filter(D),m=V.filter(A);if(!o&&!a&&y.length===0&&m.length===0)return null;let u=(e,r)=>{if(r===e.currentValue)return Promise.resolve();M.current={sessionId:l,model:e===o};let c=_?_(e.configId,r):k.setConfig(l,e.configId,r);return g(f,c),c},C=a?h(a):[],E=C.reduce((e,r)=>r.name.length>=e.length?r.name:e,""),U=o?v(o):i("composer.model"),w=(e)=>({api_id:e.value,label:e.name}),B=N(o&&Z(o.options)?o.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(w)})):[{...L,models:o?h(o).map(w):[]}]),G=B.flatMap((e)=>e.models),b=G.find((e)=>e.api_id===o?.currentValue)??{api_id:o?.currentValue??"",label:U},d=m.find((e)=>e.configId==="fast_mode"||e.configId==="fast-mode");return I(Ht,{disabled:x||S||R,switching:S,value:{...b,label:b.shortLabel??b.label},compactCatalog:!0,models:G,showModelList:Boolean(o),onChange:(e)=>{if(e.api_id===o?.currentValue)return;if(O)O(e.api_id);else if(o)u(o,e.api_id)},header:{name:o?.name??i("composer.model"),action:P},modelGroups:B,t:i,effortConfig:a&&C.length>0?{name:"Effort",value:a.currentValue,levels:C,sizer:E,onChange:(e)=>u(a,e)}:void 0,selectOptions:y.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:h(e).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>u(e,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:d?.currentValue??!1,disabled:!d,title:!d?i("composer.fastModeUnsupported"):void 0,icon:I(F,{className:"size-4","aria-hidden":"true"})},...m.filter((e)=>e!==d).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,r)=>{let c=e==="fast_mode"?d:m.find((q)=>q.configId===e);if(!c)throw Error(`Unknown boolean config: ${e}`);u(c,r)}})}
|
|
2
|
-
export{Ne};
|
package/dist/chunk-jnena0v6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function M({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
|
|
2
|
-
export{M};
|