@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,2 @@
|
|
|
1
|
+
import{d}from"./chunk-xyvqcpjx.js";import{a,o}from"./chunk-80ckz04b.js";import{k,P,g,W}from"./chunk-5nc3dtyt.js";import{x,Y,Vn}from"./chunk-52p7kyam.js";import{Ue}from"./chunk-c38t8809.js";import{I,V}from"./chunk-00eytt1z.js";import{re,Q}from"./chunk-vs02ry2r.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as Z,useSensors as De}from"@dnd-kit/core";import{SortableContext as ee,sortableKeyboardCoordinates as we,useSortable as ce,verticalListSortingStrategy as oe}from"@dnd-kit/sortable";import{CSS as de}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as me,StarIcon as be,Trash2Icon as pe}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as te,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as se,DialogTitle as ae}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as z,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:b}){let{attributes:w,listeners:v,setNodeRef:i,transform:p,transition:u,isDragging:M}=ce({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:de.Transform.toString(p),transition:u},className:F("w-full min-w-0",M&&"opacity-50"),...w,...v,role:"group",children:b})}function Be({collection:l,children:C,onEdit:b,onConfirm:w,onNewChat:v}){let{t:i}=x(),p=Q(),u=Y(),{attributes:M,listeners:m,setNodeRef:N,transform:T,transition:B,isDragging:K}=ce({id:l.id,disabled:{draggable:l.id===I,droppable:!1},data:{type:"collection"}});return e("div",{ref:N,style:{transform:de.Transform.toString(T),transition:B},className:F("w-full min-w-0",K&&"opacity-50"),children:e(W,{open:!l.collapsed,onOpenChange:(c)=>u(p({type:"collapse",id:l.id,collapsed:!c})),label:V(l,i),count:l.sessionIds.length,leading:l.id===I?e(be,{className:"size-3.5"}):e(Ue,{emoji:l.emoji,onChange:(c)=>u(p({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...m,role:"group",children:c}),actions:s(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:V(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==I&&s(z,{onClick:b,children:[e(he,{}),i("collection.rename")]}),s(z,{onClick:v,children:[e(me,{}),i("collection.newChat")]}),s(z,{onClick:()=>w("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==I&&s(z,{variant:"destructive",onClick:()=>w("delete"),children:[e(pe,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function qi({renderRow:l,onSelect:C,onNewChat:b,Scroll:w=He}){let v=x(),{t:i}=v,p=Q(),u=Y(),M=a(),{collections:m,order:N}=re(),T=o((t)=>t.sessionList),B=o((t)=>t.archivedSessions),K=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...B,...T].map((t)=>[t.sessionId,t])),[B,T]),_=v.isMac??Vn(),[y,E]=R(null),[L,O]=R(""),[q,j]=R(""),[S,H]=R(null),[f,J]=R(!1),ue=De(Z(Se,{activationConstraint:{distance:5}}),Z(ye,{coordinateGetter:we})),G=N.flatMap((t)=>m[t].collapsed?[]:m[t].sessionIds.flatMap((n)=>{let r=U.get(n);return r&&!r.archived?[r]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(_?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(n.key)-1;if(!Number.isInteger(r)||r<0||r>8||!G[r])return;n.preventDefault(),C(G[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[G,_,C]);let ge=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,h=n.data.current;if(r?.type==="session"&&h!==void 0){let X=h.type==="session"?String(h.collectionId):String(n.id);u(p({type:"move",sourceCollectionId:String(r.collectionId),collectionId:X,sessionId:String(r.sessionId),index:h.type==="session"?m[X].sessionIds.indexOf(String(h.sessionId)):void 0}))}else if(r?.type==="collection"&&h?.type==="collection"&&String(n.id)!==I)u(p({type:"reorder",id:String(t.id),index:N.indexOf(String(n.id))}))},A=(t,n)=>{J(!0),u(t.then(n).finally(()=>J(!1)))};return s(ze,{children:[e(w,{children:s(k,{children:[s(g,{className:F(d,"font-normal"),onClick:()=>{E("new"),O(""),j("")},children:[e(P,{children:e(me,{})}),e("span",{children:i("collection.newCollection")})]}),c&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>u(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:ue,collisionDetection:fe,onDragEnd:ge,children:e(ee,{items:N,strategy:oe,children:e(k,{children:N.map((t)=>e(Be,{collection:m[t],onNewChat:()=>b(t),onEdit:()=>{E(t),O(m[t].name),j(m[t].emoji??"")},onConfirm:(n)=>H({id:t,type:n}),children:e(ee,{items:m[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:oe,children:m[t].sessionIds.map((n)=>{let r=U.get(n);if(r?.archived)return null;if(!r)return K?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(P,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>u(p({type:"remove",sessionId:n,collectionId:t})),children:e(pe,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(te,{open:y!==null,onOpenChange:(t)=>{if(!t&&!f)E(null)},children:s(ne,{children:[s(se,{children:[e(ae,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(t)=>{if(t.preventDefault(),y===null||!L.trim()||f)return;let n=y==="new"?`collection-${crypto.randomUUID()}`:y;A(p([y==="new"?{type:"create",id:n,name:L}:{type:"rename",id:n,name:L},{type:"emoji",id:n,emoji:q}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(t)=>O(t.target.value),disabled:f}),y!=="new"&&e(Ue,{emoji:q,onChange:j}),s(le,{children:[e(D,{type:"button",variant:"outline",disabled:f,onClick:()=>E(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:f||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(te,{open:S!==null,onOpenChange:(t)=>{if(!t&&!f)H(null)},children:s(ne,{children:[s(se,{children:[e(ae,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:S===null?"":V(m[S.id],i)})})]}),s(le,{children:[e(D,{variant:"outline",disabled:f,onClick:()=>H(null),children:i("collection.cancel")}),e(D,{disabled:f,onClick:()=>{if(S!==null)A(p({type:S.type,id:S.id}),()=>H(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{qi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w}from"./chunk-zxkvvecz.js";import{t}from"./chunk-ye9tsdhn.js";import{j}from"./chunk-x6nz6eyb.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(w,{text:e.text,streaming:o})})}if(i.isImage(e))return n(j,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(j,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function ae({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{ae};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{At}from"./chunk-hv1ejvhg.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Ie(e){let t=r.get(e);if(!t)t=At(e),r.set(e,t);return t}function ar({host:e,client:t,children:n}){let s=Ie(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Ne(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Qe(e){let t=Ne();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ie(Ne());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Me(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
+
export{Ie,ar,l,Ne,Qe,i,Me};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-ye9tsdhn.js";import{Be}from"./chunk-v4t0p6pp.js";import{p,G}from"./chunk-y7xcync7.js";import{e}from"./chunk-f3924gdb.js";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{inSessionTree as z}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as B,ChevronRightIcon as q,GitBranchIcon as E,Loader2Icon as O,SquareIcon as R}from"lucide-react";import{useId as T,useState as u}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function Oe({sessionId:t}){let r=n((a)=>a.sessions),c=Object.values(r).filter((a)=>a.subagent?.parentId===t);if(c.length===0)return null;return s("div",{"data-subagent-sessions":!0,className:"min-w-0",children:c.map((a)=>s(j,{session:a},a.id))})}function j({session:t}){let{client:r,host:c}=e(),{t:a}=c,v=n((i)=>i.actions),w=n((i)=>i.sessions),I=n((i)=>i.connection==="ready"),d=v.filter((i)=>z(w,t.id,i.sessionId)).length,[l,S]=u(!1),[g,f]=u(!1),[x,h]=u(null),b=T(),m=p(t.configOptions,"model"),k=!t.attached?"detached":d>0?"requires_action":t.state==="unknown"?"unknown":t.error?"failed":t.state,y=I&&t.attached&&t.subagent?.capabilities?.cancel!=null&&t.state!=="idle",C=async()=>{f(!0),h(null);try{await r.cancel(t.id)}catch(i){h(i instanceof Error?i.message:String(i))}finally{f(!1)}};return o("section",{"aria-label":t.title??a("subagents.untitled"),className:"min-w-0",children:[o("div",{className:"flex min-w-0 items-center gap-1",children:[o(N,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":l,"aria-controls":b,onClick:()=>S(!l),children:[l?s(B,{className:"size-3.5 shrink-0"}):s(q,{className:"size-3.5 shrink-0"}),s(E,{className:"text-muted-foreground size-3.5 shrink-0"}),s("span",{className:"truncate",children:t.title??a("subagents.untitled")}),o("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[a(`subagents.${k}`),d>0?` · ${d}`:""]})]}),y&&s(N,{variant:"ghost",size:"icon-sm",disabled:g,"aria-label":a("subagents.cancel",{name:t.title??a("subagents.untitled")}),onClick:()=>{C()},children:g?s(O,{className:"size-3.5 animate-spin"}):s(R,{className:"size-3.5"})})]}),x&&s("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:x}),l&&o("div",{id:b,className:"min-w-0 ps-4",children:[(t.subagent?.description||m)&&o("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:t.subagent?.description??void 0,children:t.subagent?.description}),m&&s("span",{className:"shrink-0",children:G(m)})]}),t.items.length>0?s("div",{className:"flex max-h-72 min-h-0 flex-col",children:s(Be,{session:t,client:r,host:c})}):s("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:a("subagents.noMessages")}),s(Oe,{sessionId:t.id})]})]})}
|
|
2
|
+
export{Oe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{mo}from"./chunk-et8rcxw6.js";import{ge,t,fe,n,nt}from"./chunk-ye9tsdhn.js";import{so,ze,ln,uo,po}from"./chunk-q7nn5xe5.js";import{Ge}from"./chunk-z2v008kc.js";import{Kn}from"./chunk-kxmajv0m.js";import{jn}from"./chunk-mg2mkzkk.js";import{io,ro}from"./chunk-wvdncbrt.js";import{Qn,Yn}from"./chunk-rwkkqdcv.js";import{Zn}from"./chunk-nqw4deag.js";import{$n}from"./chunk-72x7rae0.js";import{Jn}from"./chunk-kvc6ewkt.js";import{Button as Q}from"@nyssance/shadcn/vega/components/ui/button";import{codexExtensionCapabilities as Ce,codexMessageError as Me,codexRetryNotice as Ve,codexTurnError as qe,nativeTurnId as pe}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Oe}from"lucide-react";import{useCallback as z,useEffect as E,useLayoutEffect as ve,useMemo as J,useRef as h,useState as U}from"react";import{flushSync as Te}from"react-dom";import{jsx as o,jsxs as A}from"react/jsx-runtime";var ye=24;function Fe(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ke({viewportRef:e,viewportProps:d,children:g}){return o("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function Ue({sessionId:e,turnId:d,root:g,error:s,connected:R}){let L=h(null),b=fe(),{t:H}=t(),w=z(()=>{b.loadHistoryTurn(e,d).catch(()=>{})},[b,e,d]);return E(()=>{if(!g||!L.current||!R||s)return;let V=new IntersectionObserver((v)=>{if(v.some((S)=>S.isIntersecting))V.disconnect(),w()},{root:g,rootMargin:"800px 0px"});return V.observe(L.current),()=>V.disconnect()},[g,R,s,w]),o("div",{ref:L,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?A("div",{className:"flex flex-col items-center gap-2",children:[o("p",{role:"alert",className:"text-destructive text-xs",children:s}),o(Q,{variant:"outline",size:"sm",onClick:w,disabled:!R,children:H("timeline.navigationRetry")})]}):A("div",{role:"status","aria-label":H("timeline.navigationLoading"),className:"space-y-3",children:[o("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),o("div",{className:"bg-muted h-3 w-4/5 rounded"}),o("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function _e(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:so(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function Be(e){return o(ge,{host:e.host,client:e.client,children:o($e,{...e})})}function $e({session:e,leading:d,afterTurn:g,answerActions:s,turnFooter:R,renderUserMessage:L,insert:b,navigation:H,anchorNewTurn:w=!1,Viewport:V=Ke}){let v=fe(),S=t(),T=n((r)=>r.historyNavigation[e.id]),c=_e(e,T?.turns),C=c.at(-1)?.key,xe=uo(e,c),y=e.state==="running"||e.state==="requires_action",_=J(()=>jn(c,T),[c,T]),Y=J(()=>_.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[_]),he=J(()=>H===void 0?[]:io(c,e.turnUsage,T),[H,c,e.turnUsage,T]),Z=b&&b.afterItemId!==null?c.findIndex((r)=>r.items.some((l)=>l.id===b.afterItemId)):-1,D=h(c);D.current=c;let[a,be]=U(null),x=n((r)=>r.historyPages[e.id]),P=n((r)=>r.connection==="ready"),we=n((r)=>Ce(r.agent).sessionRetry),ee=x!==void 0;E(()=>{if(P&&ee&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,P,ee,e.id,e.restoring]);let[Re,Se]=U(!1),O=h(null),[Pe,te]=U(!1),ne=h(0),j=h({key:C,running:y});j.current={key:C,running:y};let[re,F]=U(0),N=h(0),k=h(null);N.current=re;let Ie=z(()=>{if(k.current!==null)k.current.keepTop=!1},[]),{isFollowing:M,scrollToBottom:W,stopFollowing:B,schedulePin:ie,contentResized:oe,beginLocate:ae,cancelLocation:le}=$n(a,y,Ie),ue=z(()=>{if(a===null||!y)return;let r=c.at(-1)?.key;if(r===void 0)return;let l=ae(!0),u=()=>l.isCurrent()&&j.current.running&&j.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let p=a.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(p===null)return;let m=a.scrollTop+p.getBoundingClientRect().top-a.getBoundingClientRect().top,I=Fe({turnTopPx:m,scrollHeightPx:a.scrollHeight,viewportHeightPx:a.clientHeight,spacerPx:N.current});k.current=I.spacerPx>0?{element:p,heightPx:p.getBoundingClientRect().height+I.spacerPx,keepTop:!0}:null,Te(()=>F(I.spacerPx)),requestAnimationFrame(()=>{if(u())l.finish(I.scrollTopPx)})})),f=O.current;if(f===null)return;f.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(u())i()})},[ae,y,a,c]);ve(()=>{if(!w||y)return;le(),k.current=null,N.current=0,F(0)},[w,le,y]);let X=z(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);E(()=>{if(a===null)return;let r=()=>{let l=a.scrollTop<600;if(Se(l),l&&!T?.complete&&P&&!e.restoring&&!M&&x?.cursor&&!x.loading&&!x.error)X()};return r(),a.addEventListener("scroll",r,{passive:!0}),()=>a.removeEventListener("scroll",r)},[P,x,M,X,a,e.restoring,T?.complete]),E(()=>{Qn({sessionId:e.id,turns:Y,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Y,B]),E(()=>()=>Yn(e.id),[e.id]);let He=z(async(r,l)=>{let u=++ne.current;te(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,r.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!l())return null;let i=D.current.find((m)=>m.user?.id===(r.messageId??r.id))??D.current.find((m)=>m.user!==null&&r.nativeTurnId!==void 0&&m.items.some((I)=>pe(I)===r.nativeTurnId));if(!i?.user)return null;let f=i.user.id,p=O.current;if(p===null)throw Error("Virtual timeline is not mounted");return await p.scrollToKey(i.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(f)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(f)}"]`)}finally{if(ne.current===u)te(!1)}},[v,e.id]),Ne=z(async(r)=>{if(r.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,r.nativeTurnId)},[v,e.id]);E(()=>{if(a===null)return;let r=a.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let l=new ResizeObserver(()=>{let u=k.current,i=null;if(u!==null){let f=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(f!==N.current&&(f<N.current||u.keepTop)){if(N.current=f,Te(()=>F(f)),f===0)k.current=null}if(f>0&&u.keepTop)i=a.scrollTop+u.element.getBoundingClientRect().top-a.getBoundingClientRect().top-ye}oe(i)});if(l.observe(r),l.observe(a),C!==void 0){let u=a.querySelector(`[data-codex-turn="${CSS.escape(C)}"]`);if(u===null)throw Error("Latest turn is not mounted");l.observe(u)}return()=>l.disconnect()},[oe,C,a]),E(()=>{if(e.items.length===0)return;ie()},[ie,e.items]);let se=h(null);ve(()=>{if(a===null)return;let r=c.at(-1),l=se.current;if(se.current=r===void 0?null:{key:r.key,running:y},r===void 0||l===null||r.user===null||r.replayed)return;if(w){if(y&&e.turnEndedAt[r.user.id]===void 0&&(r.key!==l.key||!l.running))k.current=null,N.current=0,F(0),ue()}else if(r.key!==l.key)W()},[ue,w,y,W,a,e.turnEndedAt,c]);let ke=(r,l)=>{let u=r,i=u.turn;if(i===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${l}`);return o(Ue,{sessionId:e.id,turnId:u.nativeTurnId,root:a,error:T?.turnErrors[u.nativeTurnId],connected:P&&!M&&!Pe})}let f=c.indexOf(i),p=i.key===xe,m=po(e,c,f),I=!p&&m.continued,K=i.key===C,q=i.errors.at(-1),ce=q===void 0?null:Me(q),G=q===void 0?null:pe(q),Ee=!e.subagent&&K&&!p&&P&&we&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&ce!==null&&qe(ce).category==="overloaded"&&G!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",de=R?.(i)??null,Ae=i.work.length>0||i.final.length>0||i.errors.length>0||p||de!==null||ze(i)||ln(i)||K&&(e.error!==null||e.lastStopReason==="cancelled"),me=i.user===null?null:Ge(i);return A("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(L===void 0?o(Jn,{item:i.user,messageTime:me}):L(i.user,me)),Ae&&o(Kn,{sessionId:e.id,turn:i,terminals:e.terminals,active:p,blocked:e.state==="requires_action",continued:I,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:p?Ve(e._meta)??void 0:void 0,retry:Ee?{turnId:G,delaySeconds:Zn(c),run:(Le)=>v.retrySession(e.id,G,Le)}:void 0,interrupted:ln(i)||!p&&K&&e.lastStopReason==="cancelled",answerActions:s?.(i),footer:de}),l===Z&&b?.node,g?.(i)]})};return A("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[o(V,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":S.t("timeline.label")},children:o("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:A("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&Z===-1&&b.node,o(mo,{ref:O,entries:_,renderTurn:ke,scrollElement:a,sessionKey:e.id,preserveViewport:!M,leadingInsetPx:12,leadingContent:d===void 0?void 0:o("div",{className:"pt-3",children:d})}),w&&o("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:re}}),o("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),o("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&o("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:o(Q,{variant:"outline",size:"sm",disabled:!P,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:S.t("timeline.navigationRetry")})}),Re&&x?.cursor&&!T?.complete&&A("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[o(Q,{variant:"outline",size:"sm",disabled:!P||e.restoring||x.loading,onClick:X,children:x.loading?S.t("timeline.loadingEarlier"):S.t("timeline.loadEarlier")}),x.error&&o("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),H!==void 0&&o(ro,{items:he,audio:H.audio,scrollRoot:a,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ne,onRevealError:(r)=>nt(S,r),targetTopMarginPx:16},e.id),o("button",{type:"button",className:M?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:M?-1:void 0,onClick:W,"aria-label":S.t("timeline.scrollToBottom"),children:y?A("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"}),o("span",{className:"codex-wave-dot"})]}):o(Oe,{})})]})}
|
|
2
|
+
export{Be};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xn}from"./chunk-8ch9444t.js";import{Jo}from"./chunk-1f628zap.js";import{Ke}from"./chunk-x2yc5748.js";import{Button as G}from"@nyssance/shadcn/vega/components/ui/button";import{Separator as ot}from"@nyssance/shadcn/vega/components/ui/separator";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as J}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as d,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as v}from"react";import{createPortal as at}from"react-dom";import{jsx as m,jsxs as w,Fragment as ct}from"react/jsx-runtime";function Bo({handleRef:u,anchorRef:a,commands:T,searchFiles:l,onMention:_,onSearchError:B,fileSearchDebounceMs:C=0,bashMode:H=!1,forcedOpen:s=!1,onForcedOpenChange:p,emptyLabel:R,fileStatusLabels:E,morePlugins:M}){let A=Ke(),i=A.textInput.value,[j,z]=v(0),[g,D]=v(null),[x,h]=v(0),K=Z(null);d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=()=>z(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}});let U=Y(()=>H&&i.startsWith("!")?null:Jo(i,j),[i,j,H]),o=U?.kind==="at"&&!l?null:U,P=`${o?.kind??"forced"}:${o?.query??""}:${s}`,[F,O]=v(P);if(F!==P)O(P),h(0);let L=Z(null);d(()=>{if(!s){L.current=null;return}if(L.current===null)L.current=i;else if(i!==L.current)p?.(!1)},[s,i,p]);let y=o?.kind==="at"?o.query:null;d(()=>{if(y===null||!l){D(null);return}let t=!0,e=()=>{l(y).then((r)=>{if(t)D({query:y,search:l,items:r})},(r)=>{if(t)D({query:y,search:l,items:[]}),B(r)})},n=C>0?window.setTimeout(e,C):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[y,l,C,B]);let f=Y(()=>{if(o?.kind==="at")return g?.query===o.query&&g.search===l?g.items:[];if(o)return xn(T,o.query);if(s)return xn(T,"");return[]},[o,s,T,g,l]),[tt,q]=v(!1);d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=()=>q(!0),n=()=>{if(q(!1),s)p?.(!1)};return q(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[u,s,p]),d(()=>{if(s)u.current?.getTextarea()?.focus()},[s,u]);let c=tt&&(o!==null?o.kind==="slash"||f.length>0||!!E:s);d(()=>{if(!c)return;K.current?.querySelector(`[data-idx="${x}"]`)?.scrollIntoView({block:"nearest"})},[x,c]);function V(t){let e=u.current?.getTextarea();if(!e)return;let n,r;if(o){let S=o.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(n=i.slice(0,o.start)+S+i.slice(o.end),o.kind==="at")_?.(t.payload);r=o.start+S.length}else if(s)n=`${i.length===0||i.endsWith(`
|
|
2
2
|
`)?i:`${i}
|
|
3
|
-
`}/${t.payload} `,r=n.length,p?.(!1);else return;A.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=(n)=>{if(!c)return;if(u.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>f.length===0?0:Math.min(f.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=f[x];if(r)V(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)z(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else p?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[b,W]=v(null),[N,
|
|
4
|
-
export{
|
|
3
|
+
`}/${t.payload} `,r=n.length,p?.(!1);else return;A.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}d(()=>{let t=u.current?.getTextarea();if(!t)return;let e=(n)=>{if(!c)return;if(u.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>f.length===0?0:Math.min(f.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=f[x];if(r)V(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)z(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else p?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[b,W]=v(null),[N,et]=v(null),I=ut(()=>{let t=a?.current;if(!t)return;let e=t.getBoundingClientRect();W({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[a]);if(X(()=>{if(!c){W(null);return}I()},[c,I]),X(()=>{let t=a?.current;if(!c||!t||!N)return;return rt(t,N,I,{animationFrame:!0})},[c,N,a,I]),!c||a&&!b)return null;let k=o?o.kind==="slash":s,nt=k?st:it,Q=m("div",{ref:et,className:a?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:a&&b?{left:b.left,width:b.width,bottom:b.bottom}:void 0,children:w("div",{ref:K,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[w("div",{className:"max-h-72 overflow-y-auto",children:[f.length===0&&k&&m("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:R}),f.length===0&&!k&&E&&m("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:g?.query===y&&g.search===l?E.empty:E.loading}),f.map((t,e)=>w(G,{type:"button",variant:"ghost",role:"option","aria-selected":e===x,"data-idx":e,onMouseDown:(n)=>{n.preventDefault(),V(t)},onMouseEnter:()=>h(e),className:J("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===x&&"bg-muted"),children:[m(nt,{className:J("size-4 shrink-0",k?"text-blue-500":"text-muted-foreground")}),m("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&m("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),k&&M&&w(ct,{children:[m(ot,{}),w(G,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),p?.(!1),M.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[m(lt,{"data-icon":"inline-start"}),M.label]})]})]})});return a?at(Q,document.body):Q}
|
|
4
|
+
export{Bo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b,pn,Po,St,To,mn,Io}from"./chunk-z71pp1mb.js";import{t,fe,Le,n}from"./chunk-ye9tsdhn.js";import{ae}from"./chunk-sy5tq3y6.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var v=E({entries:{}});function p(r,e){v.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function M(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...mn(s._meta),...s.content.filter(k).flatMap((i)=>mn(i._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:r,item:e,question:s,index:a}){let i=fe(),{t:l}=t(),m=pn(e.id,a),c=JSON.stringify([r,m]),u=Le(v,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),A=n((o)=>o.connection==="ready"),f=u?.draft??Po(s),q=d===void 0?u?.accepted:M(d,m)??u?.accepted,h=d!==void 0&&x(d,e),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=St(s,f);if(!S.trim())return;let w={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:To(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Io,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function tn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=b(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return y(ae,{content:e.content.some((i)=>!k(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(O,{sessionId:r,item:e,question:i,index:l},pn(e.id,l)))})}
|
|
2
|
+
export{tn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_e,kt}from"./chunk-00eytt1z.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function Gn(o){if(o===null||o===void 0)return _e();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function Zi(o,{reportError:t=console.error}={}){let e=S(_e()),r=async()=>{e.setState(Gn(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(kt,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function Qi({store:o,children:t}){return w(f,{value:o,children:t})}function en(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function re(o){let{store:t}=en(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function Q(){return en().dispatch}
|
|
2
|
+
export{Gn,Zi,Qi,en,re,Q};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c,w}from"./chunk-zxkvvecz.js";import{vn}from"./chunk-ns5rnxdj.js";import{L}from"./chunk-156m3888.js";import{R}from"./chunk-s55n9cby.js";import{Te,Ro}from"./chunk-xrs7x5ah.js";import{ee}from"./chunk-jm6zja6h.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as O,useRef as U,useState as _}from"react";import{jsx as n,jsxs as p,Fragment as P}from"react/jsx-runtime";function W(e,t){let[a,o]=_(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var q=new WeakMap,z=1;function b(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=q.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=z;return z+=1,q.set(e,a),`${e.type}:${a}`}function T(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function M({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function K(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function te({block:e}){if(e.type!=="tool_use")return null;if(V(e))return n(K,{});let t=L(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(K,{})}function I(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function we(e){return L(e).target}function j(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function V(e){return j(e)||e.name==="dynamic_tool"}function ne(e,t){let{category:a}=L(e),o=we(e),i=T(e.status);if(V(e))return{leading:e.title};if(a==="execute"){let r=I(e,"command")?.split(`
|
|
2
|
+
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=I(e,"pattern")??I(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=I(e,"query")??I(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function Le(e,t){let a=ne(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function Ne(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
|
|
3
|
+
`).trim()}function be(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function $e(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 ke(e){if(typeof e==="string"&&e.length>0)return e;return}function Ae(e){return e.type==="diff"}function Be(e){let t=e.content.find(Ae);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
|
+
`)}function ae(e){let t=ke(e.rawOutput);if(t!==void 0)return t;let a=Ne(e.content);if(a.length>0)return a;return Be(e)}function J({block:e,command:t}){let{t:a,Output:o,commandStatus:i}=c(),[r,u]=_(!1),[d,l]=_(!1),m=ae(e),s=i===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):i(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
|
|
5
|
+
`)),u(!0),setTimeout(()=>u(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(pe,{}):n(ge,{})})]}),m!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:m}):n(o,{text:m})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function oe({block:e}){let{t,openLink:a,Patch:o,openImage:i,commandStatus:r,expandToolOutput:u=!1}=c(),d=ae(e),l=o===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let B=x;return B.patch?.text?[B.patch.text]:[]}).join(`
|
|
6
|
+
`),m=be(e.content),s=$e(e.content),[g,f]=R(`tool:${e.id}`,!1),C=W(`tool:${e.id}`,g),h=L(e),N=h.category,y=ne(e,t),k=N==="execute"?I(e,"command"):void 0;if(e.userShell&&k!==void 0)return n(J,{block:e,command:k});let A=k!==void 0||V(e)||m.length>0||s.length>0||Boolean(l)||u&&d!==void 0,E=!A&&!T(e.status)?h.filePath:void 0;if(N==="execute"&&!T(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(N==="read"&&T(e.status))return null;let S=p("span",{className:"codex-activity-label",children:[n(te,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:T(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(P,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(E!==void 0?p(P,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:E,onClick:()=>a(E),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[A?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[S,n(M,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:S}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(P,{children:[k!==void 0?n(J,{block:e,command:k}):o!==void 0&&l?n(o,{patch:l}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let B=`data:${x.mimeType};base64,${x.data}`,G=n("img",{src:B,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?G:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(B),children:G},B)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function ie({block:e}){if(e.type==="tool_use")return n(oe,{block:e});if(e.type==="thinking")return n(ue,{block:e});if(e.type==="collab")return n(le,{block:e});return n(re,{block:e})}function re({block:e}){let{t,openSession:a}=c(),o=T(e.status),[i,r]=R(`subagent:${e.id}`,o),u=U(o);O(()=>{if(o)r(!0);if(u.current&&!o)r(!1);u.current=o},[o,r]);let d=`${Se(e.activity,o,e.name,t)}${se(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Ee,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(l,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(l,e.name)},children:d})})]}),m&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(oe,{block:s},s.id);if(s.type==="thinking")return n(ue,{block:s},b(s));if(s.type==="subagent")return n(re,{block:s},s.id);if(s.type==="collab")return n(le,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(w,{text:s.text,streaming:!1})},b(s));if(s.type==="plan")return n(ee,{entries:s.entries},b(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},b(s));return null})})})})]})}var Ie=8;function Me(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Ie}function Ee({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Me(e),"aria-hidden":"true"})}function Se(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function se(e,t,a){if(e===null)return"";if(t===null)return` · ${vn(e)}`;let o=_e.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${vn(e)} · ${o}`}var Re={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function de(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=de(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Re[e.tool]}.${o}`)}function Fe(e){return e.agents.filter((t)=>t.nickname!==null)}function ce(e,t){let a=e.agents.length>0?e.agents.length:1;return`${H(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var F="\x01";function D(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${F}${r}${F}`]));return e(t,{...a,...i}).split(new RegExp(`${F}(\\w+)${F}`,"u")).map((r,u)=>n(fe,{children:u%2===1?o[r]:r},`${u}:${r}`))}function De({agent:e,showModel:t}){let{t:a,openSession:o}=c(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&se(e.model,e.reasoningEffort,a)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Pe(e,t){let a=e.prompt?.trim()?e.prompt:null,o=de(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=Fe(e),d=[];if(u.length===0)d.push({key:"generic",node:H(e,"row",t)});for(let l of u){let m=n(De,{agent:l,showModel:e.tool==="spawnAgent"});if(i)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:a})})})});else if(r)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(Q,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&l.state!==null&&l.state!==null?l.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${l.state.status}`),message:l.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${l.state.status}`)}):"";d.push({key:l.threadId,node:D(t,"stream.codex.collab.agentRow",{action:H(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:D(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function le({block:e}){let{t}=c(),[a,o]=R(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=T(e.status),r=ce(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[p("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(M,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Pe(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function ue({block:e}){let{t,i18n:a}=c(),o=Boolean(e.isComplete),[i,r]=R(`thinking:${b(e)}`,!1),u=U(null),d=e.thinking.trim().length>0;O(()=>{if(o||!d)return;let s=u.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let N=s.firstElementChild;if(N===f)return;if(f!==null)g.unobserve(f);if(f=N,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:Z(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?l:n("span",{className:"codex-activity-running",children:l})})}),d&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(w,{text:m,streaming:!o})})})})]})}function Oe(e){if(j(e))return"mcp";let t=L(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ue(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ve(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(j(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(V(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let l=Oe(d);if(!o.has(l))i.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=i.map((d,l)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ue(d.category,o.get(d.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function Eo({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:u,providerIcon:d,children:l}){let{t:m,i18n:s}=c(),[g,f]=R(`work:${e}`,i,!0),C=W(`work:${e}`,g||o),h=U(null),[N,y]=_(0);O(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let A=()=>{let S=h.current;if(S===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-S)};A();let E=window.setInterval(A,1000);return()=>window.clearInterval(E)},[o,r,t]);let k=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:Z(t,s.language)}):o&&N>=1000?m("stream.codex.workingFor",{duration:Z(N,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((A)=>!A),children:[u!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":u,"aria-hidden":"true",children:d}),n("span",{children:k}),n(M,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&l})})})]})}function Ze(e,t){if(e.type==="tool_use")return Le(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ce(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return T(e.status);return!1}function He(e,t,a=1000){let[o,i]=_({text:e,live:t}),r=U(Date.now());return O(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),d=Math.max(0,r.current+a-u);if(d===0||t!==o.live){r.current=u,i({text:e,live:t});return}let l=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function We({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=c(),i=e.some(X),r=b(e[0]),u=e.every((C)=>C.type==="tool_use"&&L(C).category==="execute"),[d,l]=R(`group:${r}`,t&&!u),m=W(`group:${r}`,d),s=e.findLast(X)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=He(i?Ze(s,a):Ve(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(te,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(M,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(ie,{block:C},b(C)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(ie,{block:e[0]});return n(We,{blocks:e,defaultExpanded:t})}function je({blocks:e,defaultExpanded:t}){if(!e.some(Te))return n(Y,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&Te(i[0])===Te(o))i.push(o);else a.push([o])}return n(P,{children:a.map((o)=>Te(o[0])?n(Ro,{blocks:o.filter(Te)},b(o[0])):n(Y,{blocks:o,defaultExpanded:t},b(o[0])))})}
|
|
7
|
+
export{Eo,je};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function bn(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function Go(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=bn(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{bn,Go};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var F="toolbox-content pb-8",ce="toolbox-detail flex max-h-[85dvh] flex-col gap-6 overflow-hidden rounded-2xl p-6 sm:max-w-3xl";function de({children:e}){return o("div",{className:"toolbox-content shrink-0 pt-8",children:o("div",{className:"toolbox-toolbar flex min-h-9 items-center [&>header]:w-full [&>nav]:w-full","data-plugin-page-header":"",children:e})})}
|
|
2
|
+
export{F,ce,de};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function Ho({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
|
|
2
|
+
export{Ho};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ze}from"./chunk-7wk3d01c.js";import{go,fo,ho}from"./chunk-mgm1x3de.js";import{Do}from"./chunk-xgjkj9j8.js";import{t}from"./chunk-ye9tsdhn.js";import{J}from"./chunk-q7nn5xe5.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 Ur(i,n){return{installUnlock:n==="none"?()=>()=>{}:fo,preload:()=>{if(n!=="none")go(i)},playSequence:(a,d,l)=>ho(a,d,l,i,n)}}function io(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:J(e.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 e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),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(Ze,{text:i.response,host:a})})]})}function ro(i){return r(Do,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
+
export{Ur,io,ro};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as I,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var C=d(null),kn=d(null);function da(){return i(kn)}var Sn=d(null);function ua(){return i(Sn)}var $e=d(null);function Ke(){let r=i(C);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var qe=()=>i(C);function pa(){let r=i($e);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i($e);function ni({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:F,attachmentPolicy:f,value:A,onValueChange:R,attachments:y,onAttachmentsChange:U,children:B}){let L=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),S=A!==void 0,[G,J]=z(r),p=A??G,o=I({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let T=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,S)R?.(t);else J(t)},[S,R]),g=n(()=>P(""),[P]),x=y!==void 0,[K,N]=z([]),v=y??K,h=I(v);h.current=v;let s=n((t)=>{let e=typeof t==="function"?t(h.current):t;if(x)U?.(e);else N(e)},[x,U]),W=I(null),j=I(()=>{}),w=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let H=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:L(u),filename:u.name,size:u.size,lastModified:u.lastModified,...H===void 0?{}:{sourcePath:H}}})]})},[f,L,s]),O=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),F?.()},[F,s]),M=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(x)return;return()=>{for(let t of h.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let E=n(()=>{j.current?.()},[]),b=q(()=>({files:v,add:w,remove:O,clear:M,openFileDialog:E,fileInputRef:W}),[v,w,O,M,E]),k=n((t,e)=>{W.current=t.current,j.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:P,clear:g,getRevision:T,clearSubmitted:c??g},attachments:b,__registerFileInput:k}),[p,P,g,T,c,b,k]);return D(C.Provider,{value:Q,children:D($e.Provider,{value:b,children:B})})}var _n=d(null);function _(){let r=X(),l=i(_n),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
+
export{kn,da,Sn,ua,$e,Ke,qe,pa,ni,_n,_};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c,w}from"./chunk-zxkvvecz.js";import{L}from"./chunk-156m3888.js";import{No}from"./chunk-z2fjwkmt.js";import{ee}from"./chunk-jm6zja6h.js";import{Eo,je}from"./chunk-vyk4zh1m.js";import{Fo}from"./chunk-2tce3pc5.js";import{hn}from"./chunk-59957gfy.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function P({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(w,{text:t.text,streaming:n}),s]})}function I({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(P,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(w,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(ee,{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 E=new Set;function oa({message:t,isMostRecentTurn:n,hiddenTools:s=E,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),T=!t.streaming&&C.trim().length>0?o(gn,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=No(t.content,"compact"),x=l.reduce((e,a,p)=>a.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&L(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return a.length===0?null:o(je,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(I,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?l.length:h;return o(fn,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(Fo,{blocks:f}):y(f))})}function gn({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=c(),{t:u}=d;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(hn,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=c();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function fn({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(Eo,{...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{oa,gn,fn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{t,nt}from"./chunk-ye9tsdhn.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{isEmbeddedResource as B,isImage as h,isResourceLink as E}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as T,FileIcon as N,ImageOffIcon as L,LoaderCircleIcon as F}from"lucide-react";import{useState as y}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";function Ji(e){let s=e.split(/[\\/]/).at(-1)??e;if(e.startsWith("file:")||/^https?:/.test(e))s=new URL(e).pathname.split("/").at(-1)??"";try{return decodeURIComponent(s)||"attachment"}catch(a){if(a instanceof URIError)return s||"attachment";throw a}}function U(e,s){let a=document.createElement("a");a.href=s,a.download=e,a.click()}function j({block:e,generated:s=!1}){let a=t(),[p,d]=y(!1),[I,C]=y(null);if(E(e)){if(e.uri==="codex-image:unavailable")return o("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[n(L,{className:"size-4"}),a.t("timeline.imageUnavailable")]});let c=Ji(e.uri);return o(u,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":e.title??e.name,title:e.uri,onClick:()=>a.openLink(e.uri),children:[n(N,{}),o("span",{className:"min-w-0 flex-1 text-start",children:[n("span",{className:"block truncate",children:e.title??e.name}),o("span",{className:"text-muted-foreground block truncate text-xs",children:[(e.title??e.name)!==c&&`${c} · `,e.mimeType??c.split(".").at(-1)?.toUpperCase()]})]})]})}if(!B(e)&&!h(e))return null;let i=h(e)?{uri:e.uri??`image.${e.mimeType.split("/")[1]??"png"}`,mimeType:e.mimeType,blob:e.data}:e.resource,r=Ji(i.uri);if("text"in i)return o("div",{className:"min-w-0",children:[n("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:i.text}),o(u,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:i.uri,onClick:()=>a.openLink(i.uri),children:[n(N,{}),n("span",{className:"truncate",children:r})]})]});let l=`data:${i.mimeType??"application/octet-stream"};base64,${i.blob}`,f=i.mimeType?.toLowerCase().startsWith("image/")&&I!==l,{openImage:g,openImageGallery:w}=a,x=w?()=>w([{src:l,alt:r,uri:i.uri}],0):g&&(()=>g(l)),m=s&&f,R=async()=>{d(!0);try{if(a.saveFile)await a.saveFile(r,i.blob);else U(r,l)}catch(c){nt(a,c)}finally{d(!1)}},v=n("img",{src:l,alt:"",className:s?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(l)});return o("div",{className:m?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:n(u,{variant:"ghost",className:s?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":a.t("timeline.viewImage"),onClick:x,children:v})),o(u,{variant:m?"secondary":"link",size:m?"icon":"sm",className:m?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:a.t("timeline.download",{name:r}),"aria-label":a.t("timeline.download",{name:r}),onClick:()=>{R()},children:[p?n(F,{className:"motion-safe:animate-spin"}):n(T,{}),!m&&n("span",{className:"truncate",children:r})]})]})}
|
|
2
|
+
export{Ji,j};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var h={ar:{title:"المكونات الإضافية",search:"البحث عن plugins",sections:{installed:"تم التثبيت",showLess:"عرض أقل"},loadError:{retry:"أعد المحاولة"},card:{install:"ثَبَّتَ",uninstall:"إلغاء التثبيت",installTooltip:"تثبيت البرنامج المساعد"},installModal:{about:"عن",includesSkills:"مهارات",includesApps:"تطبيقات",includesMcpServers:"خوادم MCP",connected:"متصل"},detail:{root:"الإضافات",install:"تثبيت البرنامج المساعد",uninstall:"إلغاء التثبيت",loading:"تحميل",skills:"مهارات",apps:"تطبيقات",mcpServers:"خوادم MCP",developer:"المطور",category:"فئة",version:"إصدار",website:"موقع إلكتروني",privacyPolicy:"سياسة الخصوصية"},manageTabs:{plugins:"الإضافات",skills:"مهارات",marketplace:"السوق"},headings:{plugins:"الإضافات",skills:"مهارات",marketplace:"السوق"},skills:{scope:{user:"مستخدم",repo:"المشروع",system:"نظام"},installed:"تم التثبيت",refresh:"تحديث",open:"يفتح",revealInFinder:"كشف في الباحث",details:"تفاصيل"},marketplace:{loadErrorRetry:"أعد المحاولة",partialRetry:"أعد المحاولة",removeConfirm:"يزيل",removeCancel:"يلغي",sourceLabel:"مصدر",addCancel:"يلغي"},previousPage:"سابق",nextPage:"التالي",close:"إغلاق",copy:"نسخ",extensions:"ملحقات"},de:{sections:{installed:"Installiert"},loadError:{retry:"Wiederholen"},card:{install:"Installieren",uninstall:"Deinstallieren",installTooltip:"Plugin installieren"},installModal:{about:"Über",connected:"Verbunden"},detail:{install:"Plugin installieren",uninstall:"Deinstallieren",developer:"Entwickler",category:"Kategorie",privacyPolicy:"Datenschutzrichtlinie"},skills:{scope:{user:"Nutzer",repo:"Projekt"},installed:"Installiert",open:"Öffnen",revealInFinder:"Im Finder anzeigen"},marketplace:{loadErrorRetry:"Wiederholen",partialRetry:"Wiederholen",removeConfirm:"Entfernen",removeCancel:"Abbrechen",sourceLabel:"Quelle",addCancel:"Abbrechen"},previousPage:"Vorherige",nextPage:"Nächste",close:"Schließen",copy:"Kopieren"},en:{catalog:{navigation:"Toolbox navigation",customize:"Toolbox",content:"Plugin and skill content",pluginViews:"Plugin views",personal:"Personal",showMore:"Show {{count}} more",title:"Plugins",description:"Discover plugins and manage skills and tools.",search:"Search plugins and skills",clearSearch:"Clear search",sourceHelp:"Add a GitHub repository, Git URL, or local folder.",scope:"Skill scope",allScopes:"All scopes",skillCount:"{{count}} skills",location:"Location",fromPlugin:"From plugin",toggleNotApplied:"The skill state did not match the requested change."},title:"Plugins",beta:"BETA",subtitle:"Work with Codex across your favorite tools",search:"Search plugins",manage:"Manage",pageActions:"Page actions",addMarketplace:"Add a marketplace",sections:{featured:"Recommended",installed:"Installed",installedEmpty:"No plugins installed",showLess:"Show less",seeMore:"See more",seeMoreDescription:"See {{pluginNames}}, and more"},empty:"No plugins found",loading:"Loading plugins…",loadError:{title:"Failed to load plugins",retry:"Retry"},card:{install:"Install",installing:"Installing",uninstalling:"Uninstalling",manage:"Manage",moreActions:"More actions",uninstall:"Uninstall",tryNow:"Try now",disabledInstallTooltip:"Access is turned off by your admin",disabledByAdmin:"Disabled by admin",installTooltip:"Install plugin",gitMarketplace:"From a Git marketplace",namedGitMarketplace:"From the {{marketplaceName}} Git marketplace",folderMarketplace:"From a folder marketplace",namedFolderMarketplace:"From {{marketplaceName}}",localPlugin:"From your personal marketplace on this machine",enabledStatus:"Plugin enabled",disabledStatus:"Plugin disabled",installedByAdmin:"Installed by admin",enable:"Enable {{pluginName}}",disable:"Disable {{pluginName}}"},disabledReason:{planNotEligible:"Not available on your plan",requiredAppUnavailable:"Required app unavailable",unknown:"Unavailable"},toast:{installed:"{{pluginName}} plugin installed",installError:"Failed to install plugin",refreshError:"Installed {{pluginName}}, but failed to refresh the plugin list",uninstalled:"{{pluginName}} plugin uninstalled",uninstallError:"Failed to uninstall plugin",uninstallNotApplied:"The plugin is still installed after refreshing. Please try again.",skillsReloadError:"Plugin changed, but skills couldn't refresh. Reload skills before starting a new chat",syncError:"The change was saved, but refreshing the list failed: {{message}}",toggleError:"Failed to update plugin",enabled:"{{pluginName}} plugin enabled",disabled:"{{pluginName}} plugin disabled",toggleNotApplied:"The refreshed plugin state does not match the requested change. Please try again."},installModal:{title:"Install {{pluginName}}",install:"Install {{pluginName}}",installing:"Installing {{pluginName}}",developedBy:"Developed by {{developerName}}",category:"Category: {{category}}",about:"About",capabilities:"Capabilities",includes:"Includes",includesSkills:"Skills",includesApps:"Apps",includesMcpServers:"MCP servers",needsAppsTitle:"Connect your apps to {{pluginName}}",needsAppsSubtitle:"Get more relevant help from the apps you already use. You can always do this later.",tryNow:"Try {{pluginName}} now",viewDetails:"View details",connect:"Connect",connected:"Connected",connecting:"Opened link"},detail:{root:"Plugins",install:"Install plugin",installing:"Installing",tryNow:"Try now",moreActions:"More actions",uninstall:"Uninstall",loading:"Loading",errorTitle:"Failed to load plugin",missing:"Plugin not found",missingDescription:"This plugin could not be loaded from its marketplace entry.",skills:"Skills",apps:"Apps",mcpServers:"MCP servers",hooks:"Hooks",information:"Information",developer:"Developer",category:"Category",version:"Version",website:"Website",capabilities:"Capabilities",privacyPolicy:"Privacy Policy",termsOfService:"Terms of Service",unavailable:"Unavailable",disabledByAdmin:"Disabled by admin",fallbackTitle:"Plugin"},breadcrumb:{manage:"Manage"},manageTabs:{aria:"Manage extensions",plugins:"Plugins",skills:"Skills",marketplace:"Marketplace"},headings:{plugins:"Plugins",skills:"Skills",marketplace:"Marketplace"},skills:{document:{open:"Open",reveal:"Show in file manager",copy:"Copy Markdown",content:"Skill instructions",error:"Could not read SKILL.md"},search:"Search skills",scope:{user:"User",repo:"Project",system:"System",admin:"Admin"},empty:"No skills found",installed:"Installed",loading:"Loading skills…",refresh:"Refresh",filteredEmpty:"No skills match your filters",filteredEmptyDescription:"Try adjusting your search or scope filters",enable:"Enable skill",disable:"Disable skill",enabledStatus:"Skill enabled",disabledStatus:"Skill disabled",disabledBadge:"Disabled",enabledToast:"{{skillName}} skill enabled",disabledToast:"{{skillName}} skill disabled",toggleError:"Failed to update skill",moreActions:"More actions",open:"Open",revealInFinder:"Reveal in Finder",revealInFileExplorer:"Reveal in File Explorer",revealInFileManager:"Reveal in File Manager",details:"Details"},marketplace:{subtitle:"Manage available plugin marketplaces",search:"Search marketplaces",empty:"No marketplaces found",loading:"Loading marketplaces…",loadErrorTitle:"Unable to load marketplaces",loadErrorRetry:"Retry",partialTitle:"Some marketplaces could not be loaded",partialRetry:"Retry",upgrade:"Upgrade marketplace",upgradeButton:"Upgrade",upgradeBuiltIn:"Built-in marketplaces update automatically",upgradeLocal:"Only Git marketplaces can be upgraded",upgradeAll:"Upgrade",upgradeAllTooltip:"Upgrade all marketplaces",remove:"Remove marketplace",removeBuiltIn:"Built-in marketplaces cannot be removed",removeConfigured:"Only configured marketplaces can be removed",removeTitle:'Remove "{{marketplaceName}}"?',removeDescription:"This removes the marketplace from your configuration. Its plugins won't appear unless you add it again.",removeConfirm:"Remove",removeCancel:"Cancel",addTitle:"Add plugin marketplace",addSubtitle:"Add from a GitHub repo, Git URL, or local folder. Learn more",sourceLabel:"Source",sourcePlaceholder:"openai/plugins or git@github.com:org/repo.git",sourceRequired:"Enter a marketplace source",refLabel:"Git ref",refPlaceholder:"main",sparseLabel:"Sparse paths",sparsePlaceholder:"plugins/codex",addSubmit:"Add marketplace",addCancel:"Cancel",added:"{{marketplaceName}} marketplace added",alreadyAdded:"{{marketplaceName}} is already added",addFailed:"Failed to add marketplace",refreshFailed:"{{marketplaceName}} marketplace is configured, but failed to refresh the plugin list",removed:"{{marketplaceName}} marketplace removed",removeError:"Failed to remove marketplace",upgraded:"{{marketplaceName}} marketplace upgraded",upgradeError:"Failed to upgrade marketplace",upgradedAll:"Marketplaces upgraded",upgradeAllError:"Some marketplaces failed to upgrade",upgradeAllRequestError:"Failed to upgrade marketplaces",pluginCount_one:"{{count}} plugin",pluginCount_other:"{{count}} plugins",partialMore_one:"{{count}} more marketplace could not be loaded",partialMore_other:"{{count}} more marketplaces could not be loaded"},previousPage:"Previous",nextPage:"Next",close:"Close",copy:"Copy",extensions:"Extensions"},es:{sections:{installed:"Instalado"},loadError:{retry:"Reintentar"},card:{install:"Instalar",uninstall:"Desinstalar",installTooltip:"Instalar plugin"},installModal:{about:"Acerca de",includesSkills:"Habilidades",connected:"Conectado"},detail:{install:"Instalar plugin",uninstall:"Desinstalar",skills:"Habilidades",developer:"Desarrollador",category:"Categoría",version:"Versión",website:"Sitio web",privacyPolicy:"política de privacidad"},manageTabs:{skills:"Habilidades"},headings:{skills:"Habilidades"},skills:{scope:{user:"Usuario",system:"Sistema",repo:"Proyecto"},installed:"Instalado",open:"Abrir",revealInFinder:"Mostrar en Finder",details:"Detalles"},marketplace:{loadErrorRetry:"Reintentar",partialRetry:"Reintentar",removeConfirm:"Quitar",removeCancel:"Cancelar",sourceLabel:"Fuente",addCancel:"Cancelar"},previousPage:"Anterior",nextPage:"Siguiente",close:"Cerrar",copy:"Copiar"},fr:{sections:{installed:"Installé"},loadError:{retry:"Réessayer"},card:{install:"Installer",uninstall:"Désinstaller",installTooltip:"Installer le plugin"},installModal:{about:"À propos",includesSkills:"Compétences",connected:"Connecté"},detail:{install:"Installer le plugin",uninstall:"Désinstaller",skills:"Compétences",developer:"Développeur",category:"Catégorie",website:"Site web",privacyPolicy:"politique de confidentialité"},manageTabs:{skills:"Compétences"},headings:{skills:"Compétences"},skills:{scope:{user:"Utilisateur",system:"Système",repo:"Projet"},installed:"Installé",open:"Ouvrir",revealInFinder:"Afficher dans le Finder",details:"Détails"},marketplace:{loadErrorRetry:"Réessayer",partialRetry:"Réessayer",removeConfirm:"Retirer",removeCancel:"Annuler",addCancel:"Annuler"},previousPage:"Précédent",nextPage:"Suivant",close:"Fermer",copy:"Copier"},hi:{title:"प्लगइन्स",sections:{installed:"इंस्टॉल किया गया"},loadError:{retry:"पुनः प्रयास करें"},card:{install:"इंस्टॉल करें",uninstall:"अनइंस्टॉल करें",installTooltip:"प्लगइन इंस्टॉल करें"},installModal:{about:"के बारे में",includesSkills:"स्किल्स",includesApps:"ऐप्स",connected:"जुड़ा हुआ"},detail:{root:"प्लगइन",install:"प्लगइन इंस्टॉल करें",uninstall:"अनइंस्टॉल करें",skills:"स्किल्स",apps:"ऐप्स",developer:"डेवलपर",category:"श्रेणी",version:"संस्करण",website:"वेबसाइट",privacyPolicy:"गोपनीयता नीति"},manageTabs:{plugins:"प्लगइन",skills:"स्किल्स"},headings:{plugins:"प्लगइन",skills:"स्किल्स"},skills:{scope:{user:"उपयोगकर्ता",system:"सिस्टम",repo:"प्रोजेक्ट"},installed:"इंस्टॉल किया गया",open:"खोलें",revealInFinder:"Finder में दिखाएं",details:"विवरण"},marketplace:{loadErrorRetry:"पुनः प्रयास करें",partialRetry:"पुनः प्रयास करें",removeConfirm:"हटाएँ",removeCancel:"रद्द करें",sourceLabel:"सोर्स",addCancel:"रद्द करें"},previousPage:"पिछला",nextPage:"अगला",close:"बंद करें",copy:"कॉपी करें"},id:{title:"Plugin",sections:{installed:"Terpasang"},loadError:{retry:"Coba lagi"},card:{install:"Instal",uninstall:"Hapus instalasi",installTooltip:"Pasang plugin"},installModal:{about:"Tentang",includesSkills:"Skill",includesApps:"Aplikasi",includesMcpServers:"MCP server",connected:"Terhubung"},detail:{root:"Plugin",install:"Pasang plugin",uninstall:"Hapus instalasi",skills:"Skill",apps:"Aplikasi",mcpServers:"MCP server",developer:"Pengembang",category:"Kategori",version:"Versi",website:"Situs web",privacyPolicy:"kebijakan privasi"},manageTabs:{plugins:"Plugin",skills:"Skill"},headings:{plugins:"Plugin",skills:"Skill"},skills:{scope:{user:"Pengguna",system:"Sistem",repo:"Proyek"},installed:"Terpasang",open:"Buka",revealInFinder:"Tampilkan di Finder",details:"Detail"},marketplace:{loadErrorRetry:"Coba lagi",partialRetry:"Coba lagi",removeConfirm:"Hapus",removeCancel:"Batal",sourceLabel:"Sumber",addCancel:"Batal"},previousPage:"Sebelumnya",nextPage:"Berikutnya",close:"Tutup",copy:"Salin"},it:{title:"Plugin",sections:{installed:"Installato"},loadError:{retry:"Riprova"},card:{install:"Installa",uninstall:"Disinstalla",installTooltip:"Installa plugin"},installModal:{about:"Informazioni",includesSkills:"Skill",includesApps:"App",includesMcpServers:"MCP server",connected:"Connesso"},detail:{root:"Plugin",install:"Installa plugin",uninstall:"Disinstalla",skills:"Skill",apps:"App",mcpServers:"MCP server",developer:"Sviluppatore",category:"Categoria",version:"Versione",website:"Sito web",privacyPolicy:"informativa sulla privacy"},manageTabs:{plugins:"Plugin",skills:"Skill"},headings:{plugins:"Plugin",skills:"Skill"},skills:{scope:{user:"Utente",system:"Sistema",repo:"Progetto"},installed:"Installato",open:"Apri",revealInFinder:"Mostra nel Finder",details:"Dettagli"},marketplace:{loadErrorRetry:"Riprova",partialRetry:"Riprova",removeConfirm:"Rimuovi",removeCancel:"Annulla",sourceLabel:"Sorgente",addCancel:"Annulla"},previousPage:"Precedente",nextPage:"Successivo",close:"Chiudi",copy:"Copia"},ja:{title:"プラグイン",sections:{installed:"インストール済み"},loadError:{retry:"再試行"},card:{install:"インストール",uninstall:"アンインストール",installTooltip:"プラグインをインストール"},installModal:{about:"概要",includesSkills:"スキル",includesApps:"アプリ",connected:"接続済み"},detail:{root:"プラグイン",install:"プラグインをインストール",uninstall:"アンインストール",skills:"スキル",apps:"アプリ",developer:"開発者",category:"カテゴリ",version:"バージョン",website:"Webサイト",privacyPolicy:"プライバシーポリシー"},manageTabs:{plugins:"プラグイン",skills:"スキル",marketplace:"マーケットプレイス"},headings:{plugins:"プラグイン",skills:"スキル",marketplace:"マーケットプレイス"},skills:{scope:{user:"ユーザー",system:"システム",repo:"プロジェクト"},installed:"インストール済み",open:"開く",revealInFinder:"Finderで表示",details:"詳細"},marketplace:{loadErrorRetry:"再試行",partialRetry:"再試行",removeConfirm:"削除",removeCancel:"キャンセル",sourceLabel:"ソース",addCancel:"キャンセル"},previousPage:"前へ",nextPage:"次へ",close:"閉じる",copy:"コピー"},ko:{title:"플러그인",sections:{installed:"설치됨"},loadError:{retry:"다시 시도"},card:{install:"설치",uninstall:"제거",installTooltip:"플러그인 설치"},installModal:{about:"정보",includesSkills:"스킬",includesApps:"앱",includesMcpServers:"MCP 서버",connected:"연결됨"},detail:{root:"플러그인",install:"플러그인 설치",uninstall:"제거",skills:"스킬",apps:"앱",mcpServers:"MCP 서버",developer:"개발자",category:"카테고리",version:"버전",website:"웹사이트",privacyPolicy:"개인정보 보호정책"},manageTabs:{plugins:"플러그인",skills:"스킬",marketplace:"마켓플레이스"},headings:{plugins:"플러그인",skills:"스킬",marketplace:"마켓플레이스"},skills:{scope:{user:"사용자",system:"시스템",repo:"프로젝트"},installed:"설치됨",open:"열기",revealInFinder:"Finder에서 보기",details:"세부 정보"},marketplace:{loadErrorRetry:"다시 시도",partialRetry:"다시 시도",removeConfirm:"제거",removeCancel:"취소",sourceLabel:"소스",addCancel:"취소"},previousPage:"이전",nextPage:"다음",close:"닫기",copy:"복사"},"pt-BR":{sections:{installed:"Instalado"},loadError:{retry:"Tentar novamente"},card:{install:"Instalar",uninstall:"Desinstalar",installTooltip:"Instalar plugin"},installModal:{about:"Sobre",connected:"Conectado"},detail:{install:"Instalar plugin",uninstall:"Desinstalar",developer:"Desenvolvedor",category:"Categoria",version:"Versão",website:"Site",privacyPolicy:"política de privacidade"},skills:{scope:{user:"Usuário",system:"Sistema",repo:"Projeto"},installed:"Instalado",open:"Abrir",revealInFinder:"Mostrar no Finder",details:"Detalhes"},marketplace:{loadErrorRetry:"Tentar novamente",partialRetry:"Tentar novamente",removeConfirm:"Remover",removeCancel:"Cancelar",sourceLabel:"Código-fonte",addCancel:"Cancelar"},previousPage:"Anterior",nextPage:"Próximo",close:"Fechar",copy:"Copiar"},ru:{title:"Плагины",sections:{installed:"Установлено"},loadError:{retry:"Повторить"},card:{install:"Установить",uninstall:"Удалить",installTooltip:"Установить плагин"},installModal:{about:"О программе",includesSkills:"Навыки",includesApps:"Приложения",connected:"Подключено"},detail:{root:"Плагины",install:"Установить плагин",uninstall:"Удалить",skills:"Навыки",apps:"Приложения",developer:"Разработчик",category:"Категория",version:"Версия",website:"Сайт",privacyPolicy:"политику конфиденциальности"},manageTabs:{plugins:"Плагины",skills:"Навыки"},headings:{plugins:"Плагины",skills:"Навыки"},skills:{scope:{user:"Пользователь",system:"Система",repo:"Проект"},installed:"Установлено",open:"Открыть",revealInFinder:"Показать в Finder",details:"Подробности"},marketplace:{loadErrorRetry:"Повторить",partialRetry:"Повторить",removeConfirm:"Удалить",removeCancel:"Отмена",sourceLabel:"Исходник",addCancel:"Отмена"},previousPage:"Предыдущее",nextPage:"Следующее",close:"Закрыть",copy:"Копировать"},"zh-CN":{catalog:{navigation:"工具箱导航",customize:"工具箱",content:"插件与技能内容",pluginViews:"插件视图",personal:"个人",showMore:"查看其余 {{count}} 项",title:"插件",description:"发现插件,管理技能与工具",search:"搜索插件和技能",clearSearch:"清除搜索",sourceHelp:"添加 GitHub 仓库、Git 地址或本地文件夹。",scope:"技能范围",allScopes:"全部范围",skillCount:"{{count}} 个技能",location:"位置",fromPlugin:"来自插件",toggleNotApplied:"技能实际状态与请求不一致。"},title:"插件",beta:"BETA",subtitle:"在你常用的工具中使用 Codex",search:"搜索插件",manage:"管理",pageActions:"页面操作",addMarketplace:"添加插件市场",sections:{featured:"推荐",installed:"已安装",installedEmpty:"尚未安装插件",showLess:"收起",seeMore:"查看更多",seeMoreDescription:"查看{{pluginNames}}等更多"},empty:"未找到插件",loading:"正在加载插件…",loadError:{title:"插件加载失败",retry:"重试"},card:{install:"安装",installing:"正在安装",uninstalling:"正在卸载",manage:"管理",moreActions:"更多操作",uninstall:"卸载",tryNow:"立即试用",disabledInstallTooltip:"你的管理员已关闭访问权限",disabledByAdmin:"已被管理员禁用",installTooltip:"安装插件",gitMarketplace:"来自 Git 市场",namedGitMarketplace:"来自 {{marketplaceName}} Git 市场",folderMarketplace:"来自文件夹插件市场",namedFolderMarketplace:"来自 {{marketplaceName}}",localPlugin:"来自此设备上的个人插件市场",enabledStatus:"插件已启用",disabledStatus:"插件已禁用",installedByAdmin:"由管理员安装",enable:"启用 {{pluginName}}",disable:"禁用 {{pluginName}}"},disabledReason:{planNotEligible:"你的套餐不支持",requiredAppUnavailable:"所需应用不可用",unknown:"不可用"},toast:{installed:"{{pluginName}} 插件已安装",installError:"插件安装失败",refreshError:"已安装 {{pluginName}},但刷新插件列表失败",uninstalled:"{{pluginName}} 插件已卸载",uninstallError:"插件卸载失败",uninstallNotApplied:"刷新后插件仍处于已安装状态,请重试。",skillsReloadError:"插件已更改,但无法刷新技能。请先重新加载技能,再开始新聊天",syncError:"操作已保存,但列表刷新失败:{{message}}",toggleError:"无法更新插件",enabled:"{{pluginName}} 插件已启用",disabled:"{{pluginName}} 插件已禁用",toggleNotApplied:"刷新后的插件状态与请求不一致,请重试。"},installModal:{title:"安装 {{pluginName}}",install:"安装 {{pluginName}}",installing:"正在安装 {{pluginName}}",developedBy:"由 {{developerName}} 开发",category:"类别:{{category}}",about:"关于",capabilities:"功能",includes:"包含内容",includesSkills:"技能",includesApps:"应用",includesMcpServers:"MCP 服务器",needsAppsTitle:"将应用连接到 {{pluginName}}",needsAppsSubtitle:"从你已在使用的应用中获得相关性更强的帮助。你也可以稍后再设置。",tryNow:"立即试用 {{pluginName}}",viewDetails:"查看详情",connect:"连接",connected:"已连接",connecting:"已打开链接"},detail:{root:"插件",install:"安装插件",installing:"正在安装",tryNow:"立即试用",moreActions:"更多操作",uninstall:"卸载",loading:"正在加载",errorTitle:"无法加载插件",missing:"未找到插件",missingDescription:"无法从插件市场详情页加载此插件。",skills:"技能",apps:"应用",mcpServers:"MCP 服务器",hooks:"钩子",information:"信息",developer:"开发者",category:"类别",version:"版本",website:"网站",capabilities:"功能",privacyPolicy:"隐私政策",termsOfService:"服务条款",unavailable:"不可用",disabledByAdmin:"管理员已禁用",fallbackTitle:"插件"},breadcrumb:{manage:"管理"},manageTabs:{aria:"管理扩展程序",plugins:"插件",skills:"技能",marketplace:"市场"},headings:{plugins:"插件",skills:"技能",marketplace:"市场"},skills:{document:{open:"打开",reveal:"在文件夹中显示",copy:"复制 Markdown",content:"技能正文",error:"无法读取 SKILL.md"},search:"搜索技能",scope:{user:"用户",repo:"项目",system:"系统",admin:"管理员"},empty:"找不到技能",installed:"已安装",loading:"正在加载技能…",refresh:"刷新",filteredEmpty:"没有符合筛选条件的技能",filteredEmptyDescription:"尝试调整你的搜索内容或范围筛选条件",enable:"启用技能",disable:"禁用技能",enabledStatus:"技能已启用",disabledStatus:"技能已禁用",disabledBadge:"已禁用",enabledToast:"{{skillName}} 技能已启用",disabledToast:"{{skillName}} 技能已禁用",toggleError:"无法更新技能",moreActions:"更多操作",open:"打开",revealInFinder:"在 Finder 中显示",revealInFileExplorer:"在文件资源管理器中显示",revealInFileManager:"在文件管理器中显示",details:"详情"},marketplace:{subtitle:"管理可用的插件市场",search:"搜索市场",empty:"未找到任何市场",loading:"正在加载市场…",loadErrorTitle:"无法加载插件市场",loadErrorRetry:"重试",partialTitle:"部分插件市场无法加载",partialRetry:"重试",upgrade:"升级市场",upgradeButton:"升级",upgradeBuiltIn:"内置市场会自动更新",upgradeLocal:"只能升级 Git 市场",upgradeAll:"升级",upgradeAllTooltip:"升级所有市场",remove:"移除市场",removeBuiltIn:"无法移除内置市场",removeConfigured:"仅可移除已配置的市场",removeTitle:"是否移除“{{marketplaceName}}”?",removeDescription:"这会从你的配置中移除该市场。除非你重新添加,否则其插件不会显示。",removeConfirm:"移除",removeCancel:"取消",addTitle:"添加插件市场",addSubtitle:"从 GitHub 仓库、Git URL 或本地文件夹添加。了解更多",sourceLabel:"来源",sourcePlaceholder:"openai/plugins 或 git@github.com:org/repo.git",sourceRequired:"请输入市场来源",refLabel:"Git 引用",refPlaceholder:"主分支",sparseLabel:"稀疏路径",sparsePlaceholder:"plugins/codex",addSubmit:"添加市场",addCancel:"取消",added:"已添加 {{marketplaceName}} 市场",alreadyAdded:"{{marketplaceName}} 已添加",addFailed:"添加插件市场失败",refreshFailed:"{{marketplaceName}} 市场已配置,但刷新插件列表失败",removed:"已移除 {{marketplaceName}} 市场",removeError:"移除市场失败",upgraded:"{{marketplaceName}} 市场已升级",upgradeError:"升级市场失败",upgradedAll:"市场已升级",upgradeAllError:"部分市场升级失败",upgradeAllRequestError:"升级市场失败",pluginCount_one:"{{count}} 个插件",pluginCount_other:"{{count}} 个插件",partialMore_one:"还有 {{count}} 个市场无法加载",partialMore_other:"还有 {{count}} 个市场无法加载"},previousPage:"上一页",nextPage:"下一页",close:"关闭",copy:"复制",extensions:"扩展"}};
|
|
2
|
+
export{h};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function
|
|
2
|
-
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function
|
|
3
|
-
export{
|
|
1
|
+
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function Ci(e){let t=0,i=0;for(let o of e.split(`
|
|
2
|
+
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Je({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
|
|
3
|
+
export{Ci,Je};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ho}from"./chunk-w9dh298r.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function Do({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(Ho,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
+
export{Do};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Oo}from"./chunk-0gersbj0.js";import{e,m}from"./chunk-f3924gdb.js";import{B,p}from"./chunk-y7xcync7.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as c}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var O=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),u={"read-only":y,"workspace-write":c,agent:O,"agent-full-access":S},b={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function mt({sessionId:g,options:f,disabled:h,onConfigChange:r}){let{host:l,client:I}=e(),{t:a}=l,o=p(f,"mode");if(!o)return null;let s=o.currentValue,d=B(o).map((n)=>{let i=b[n.value];return i?{...n,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:n}),M=d.find((n)=>n.value===s),v=u[s]??c,C=(n)=>{if(n===s)return;m(l,r?r(o.configId,n):I.setConfig(g,o.configId,n))};return t(Oo,{value:s,warning:s==="agent-full-access",currentName:M?.name??s,icon:t(v,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:h,label:a("composer.switchPermissionMode"),onValueChange:C,options:d.map((n)=>{let i=u[n.value]??c,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
|
|
2
|
+
export{mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function wn({name:p,value:M,levels:h,disabled:c,onChange:P}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=100,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
+
export{wn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c}from"./chunk-zxkvvecz.js";import{R}from"./chunk-s55n9cby.js";import{isContentEntry as k,isImage as b,isResourceLink as N}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as w,ImageIcon as C,LoaderCircleIcon as S,RefreshCwIcon as A}from"lucide-react";import{useEffect as B,useState as h}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";function Te(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let n=[];for(let[r,l]of e.content.entries()){if(!k(l))continue;let i=l.content;if(b(i))n.push({key:`${e.id}:${r}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(N(i))n.push({key:`${e.id}:${r}`,path:i.uri,alt:i.name})}if(n.length)return n;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:n,openImageGallery:a,openImage:r,t:l}=c(),[i,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);B(()=>{let t=!0,u=JSON.parse(f);g({});for(let o of u)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&n?n(o.path):Promise.reject(Error("Image loading is unavailable"))).then((d)=>{if(t)g((p)=>({...p,[o.key]:{src:d}}))},()=>{if(t)g((d)=>({...d,[o.key]:{error:!0}}))});return()=>{t=!1}},[f,n,v]);let I=e.flatMap((t)=>{let u=i[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return s("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let o=i[t.key];if(!o)return s("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:s(S,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>x((m)=>m+1),children:s(A,{"aria-hidden":"true"})},t.key);return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,u).filter((d)=>{let p=i[d.key];return p&&"src"in p}).length;if(a)a(I,m);else r?.(o.src)},children:s("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Ro({blocks:e}){let{t:n}=c(),a=e.flatMap(T),[r,l]=R(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":r,onClick:()=>l((i)=>!i),children:[y("span",{className:"codex-activity-label",children:[s(C,{className:"codex-activity-icon","aria-hidden":"true"}),s("span",{className:"codex-activity-leading",children:n("stream.codex.viewedImages",{count:a.length})})]}),s(w,{className:r?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),r&&s(E,{images:a})]})}
|
|
2
|
+
export{Te,Ro};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function B(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function p(e,t){return e.find((n)=>n.category===t&&o(n))}function G(e){return B(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
+
export{B,p,G};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ti}from"./chunk-zxkvvecz.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 ge({host:e,client:i,children:o}){return r(Ti,{host:e,children:r(c,{value:e,children:r(u,{value:i,children:o})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function fe(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function Le(e,i){return m((o)=>e.subscribe(o),()=>i(e.getState()),()=>i(e.getState()))}function n(e){let i=fe();return Le(i.store,e)}function nt(e,i){if(e.reportError)e.reportError(i);else console.error(i)}
|
|
2
|
+
export{ge,t,fe,Le,n,nt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Lo}from"./chunk-156m3888.js";function No(t,o){if(Lo(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
|
|
2
|
+
export{No};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=(e)=>String(e).padStart(2,"0");function
|
|
2
|
-
export{
|
|
1
|
+
var a=(e)=>String(e).padStart(2,"0");function Ge(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
|
|
2
|
+
export{Ge};
|
|
@@ -0,0 +1,4 @@
|
|
|
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 c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function b(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function pn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function Po(e){return{selected:e.options?.length?0:null,text:""}}function St(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function To(e){return`<send_user_message_question_reply>
|
|
2
|
+
${JSON.stringify([e])}
|
|
3
|
+
</send_user_message_question_reply>`}function mn(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function Io({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:A,t:u}){let g=R(),h=k(!1),a=k(null);v(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",N=o==="answered"||o==="skipped",f=e.options??[],w=l&&St(e,n).trim().length>0,Q="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:N?c(_,{children:[i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:u("asyncQuestion.skipped")})]}):c(r.Root,{items:f.length>0?[{name:"answer",choices:[...f.map((s,d)=>({value:String(d)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),w)x()},children:[c(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:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),f.length>0&&c(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[f.map((s,d)=>c(r.Choice,{value:String(d),checked:n.selected===d,onChange:()=>l&&y({...n,selected:d}),className:Q,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})]},d)),c(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&y({...n,selected:null}),className:Q,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:u("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,h.current=!0},onCompositionEnd:()=>{if(h.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||h.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&St(e,{...n,text:s.currentTarget.value}).trim().length>0)x()},"aria-label":u("asyncQuestion.answer"),placeholder:u("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>y({selected:null,text:s.target.value})}),m&&i("p",{role:"alert",className:"text-destructive text-sm",children:m})]}),c("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(C,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(C,{size:"sm",variant:"ghost"}),disabled:!l,onClick:A,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{b,pn,Po,St,To,mn,Io};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function Ti({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function c(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function w(t){let{Markdown:o}=c();return e(o,{...t})}
|
|
2
|
+
export{Ti,c,w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Eo,je}from"../chunk-vyk4zh1m.js";import"../chunk-ns5rnxdj.js";import"../chunk-156m3888.js";import"../chunk-xrs7x5ah.js";import"../chunk-s55n9cby.js";import"../chunk-jm6zja6h.js";import"../chunk-zxkvvecz.js";export{je as CodexActivityGroup,Eo as CodexWorkSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{oa,gn,fn}from"../chunk-x334e7wb.js";import"../chunk-z2fjwkmt.js";import"../chunk-59957gfy.js";import"../chunk-8hte6dh7.js";import"../chunk-vyk4zh1m.js";import"../chunk-ns5rnxdj.js";import"../chunk-156m3888.js";import"../chunk-xrs7x5ah.js";import"../chunk-s55n9cby.js";import"../chunk-jm6zja6h.js";import"../chunk-2tce3pc5.js";import"../chunk-zxkvvecz.js";export{oa as CodexAssistantMessage,fn as CodexAssistantTurn,gn as CodexMessageActions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b,pn,Po,St,To,mn,Io}from"../chunk-z71pp1mb.js";export{Io as AsyncQuestionCard,pn as asyncQuestionId,b as asyncQuestions,Po as initialQuestionDraft,St as questionAnswer,mn as questionReplies,To as questionReplyEnvelope};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{R}from"../chunk-s55n9cby.js";export{R as useCodexDisclosureState};
|