@alwith/module-chat 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-030esp62.js +2 -0
- package/dist/{chunk-69p0nqws.js → chunk-07srtfz3.js} +2 -2
- package/dist/chunk-0ag4ewq9.js +2 -0
- package/dist/{chunk-7491nfcw.js → chunk-0fmepk2y.js} +3 -3
- package/dist/{chunk-yvr086m7.js → chunk-1b2jsf2v.js} +2 -2
- package/dist/{chunk-te3mzdae.js → chunk-2bbspcb4.js} +2 -2
- package/dist/{chunk-6h2ysmec.js → chunk-2z1cpz8a.js} +2 -2
- package/dist/{chunk-8j39jdxr.js → chunk-31t5ap7s.js} +3 -3
- package/dist/{chunk-5wc30q2q.js → chunk-35z0nr4v.js} +2 -2
- package/dist/{chunk-r0bmsz7b.js → chunk-3aadhvbj.js} +2 -2
- package/dist/{chunk-zrh4de8p.js → chunk-3mrdv5yq.js} +2 -2
- package/dist/chunk-3stf1tm2.js +2 -0
- package/dist/{chunk-wcwgk4bg.js → chunk-41nq4hjc.js} +2 -2
- package/dist/{chunk-pfft1e99.js → chunk-4crj8dac.js} +2 -2
- package/dist/{chunk-gdr4245h.js → chunk-4jh2wk80.js} +2 -2
- package/dist/chunk-4xjzvwg4.js +2 -0
- package/dist/{chunk-wxsb337y.js → chunk-4xp0q7vs.js} +3 -3
- package/dist/{chunk-rz3njmhn.js → chunk-53k7yvr8.js} +1 -1
- package/dist/chunk-57p1s7hy.js +2 -0
- package/dist/{chunk-f06zyvek.js → chunk-5azv8vz6.js} +2 -2
- package/dist/{chunk-9vxev5r7.js → chunk-601kr76a.js} +3 -3
- package/dist/{chunk-1rs9getz.js → chunk-67x8znmk.js} +2 -2
- package/dist/{chunk-twbp4j4c.js → chunk-6d5c94rn.js} +2 -2
- package/dist/chunk-6hxa1n8n.js +2 -0
- package/dist/chunk-6m54xxts.js +2 -0
- package/dist/chunk-6pwy0ncf.js +2 -0
- package/dist/{chunk-cansmt47.js → chunk-6wtrmxev.js} +3 -3
- package/dist/{chunk-cpvaqbtq.js → chunk-6wv99fdt.js} +2 -2
- package/dist/{chunk-4kevwekp.js → chunk-6zcjn8ra.js} +2 -2
- package/dist/chunk-753z0tkd.js +2 -0
- package/dist/{chunk-m7e2zvyk.js → chunk-7bcm8mpx.js} +2 -2
- package/dist/{chunk-fyvq1tqw.js → chunk-7eq01k20.js} +3 -3
- package/dist/{chunk-q005jp78.js → chunk-7jx2k96e.js} +2 -2
- package/dist/{chunk-ddj8ag0b.js → chunk-7nb0qea6.js} +3 -3
- package/dist/{chunk-m8s9nw8b.js → chunk-7xe2v72q.js} +2 -2
- package/dist/{chunk-zettt6hy.js → chunk-7zcr1wzv.js} +2 -2
- package/dist/{chunk-t63mwyg0.js → chunk-8hen6y4t.js} +2 -2
- package/dist/{chunk-d4pm6n4q.js → chunk-8hgrrycr.js} +2 -2
- package/dist/{chunk-2g7k5pkt.js → chunk-8t3hyxk4.js} +2 -2
- package/dist/{chunk-6r8jsyqk.js → chunk-8wdkc41j.js} +2 -2
- package/dist/chunk-9b8y72yf.js +3 -0
- package/dist/{chunk-7g2fjbn8.js → chunk-9c8cyz7r.js} +2 -2
- package/dist/{chunk-kcke05ds.js → chunk-9ff3htdp.js} +2 -2
- package/dist/chunk-9g7qvbhx.js +2 -0
- package/dist/{chunk-0ms8k740.js → chunk-9hskky1n.js} +2 -2
- package/dist/{chunk-yep82kwy.js → chunk-9k4f13c1.js} +2 -2
- package/dist/{chunk-55gczv3j.js → chunk-9n028hnr.js} +2 -2
- package/dist/{chunk-hd879x7s.js → chunk-9rgrb198.js} +3 -3
- package/dist/{chunk-ezscf6qz.js → chunk-9w4fg6bn.js} +2 -2
- package/dist/{chunk-d09kxrbp.js → chunk-9yrctk84.js} +2 -2
- package/dist/{chunk-0d5830mq.js → chunk-a45jg9xv.js} +6 -6
- package/dist/{chunk-pvnc76cr.js → chunk-aarpb5np.js} +2 -2
- package/dist/{chunk-9cqfjpfk.js → chunk-abjr18n6.js} +3 -3
- package/dist/{chunk-9x48rd50.js → chunk-az434tgy.js} +2 -2
- package/dist/{chunk-4s4e7zzx.js → chunk-b5ywqwnr.js} +2 -2
- package/dist/{chunk-fjwn02v3.js → chunk-bb1y2fy7.js} +2 -2
- package/dist/{chunk-3sqxe0mw.js → chunk-be7ja8gh.js} +3 -3
- package/dist/{chunk-z32chhqm.js → chunk-bjfcyfp5.js} +2 -2
- package/dist/chunk-bk80xpsy.js +2 -0
- package/dist/{chunk-0jz7wsbx.js → chunk-brqgdzhr.js} +2 -2
- package/dist/chunk-bt01an6h.js +2 -0
- package/dist/{chunk-1z5htskd.js → chunk-bydgccyt.js} +2 -2
- package/dist/chunk-c11c29rv.js +5 -0
- package/dist/{chunk-1wh82w54.js → chunk-c2a0x69n.js} +2 -2
- package/dist/{chunk-gxjtydsk.js → chunk-c4dk6j2h.js} +2 -2
- package/dist/{chunk-ewjh6s2b.js → chunk-ce3wg766.js} +2 -2
- package/dist/chunk-cm5rcd9q.js +2 -0
- package/dist/chunk-d1pc0mrb.js +2 -0
- package/dist/{chunk-jsc8qzkj.js → chunk-d67ypca2.js} +2 -2
- package/dist/{chunk-887d80ps.js → chunk-db0g8rr1.js} +2 -2
- package/dist/{chunk-sc7qd3kj.js → chunk-dbrs7sen.js} +2 -2
- package/dist/{chunk-ht6p9j86.js → chunk-dj8e2ymr.js} +2 -2
- package/dist/{chunk-hfjvr394.js → chunk-e24d6hfs.js} +2 -2
- package/dist/chunk-e8jfja20.js +2 -0
- package/dist/{chunk-s7fc1rkz.js → chunk-eb12xkn0.js} +2 -2
- package/dist/{chunk-f192h0js.js → chunk-ehcpnhfw.js} +2 -2
- package/dist/chunk-enr3j794.js +2 -0
- package/dist/chunk-eryds6y3.js +2 -0
- package/dist/{chunk-j6e2t91q.js → chunk-ezhzktjg.js} +2 -2
- package/dist/{chunk-m0q3bf05.js → chunk-fkpmrb5t.js} +2 -2
- package/dist/{chunk-60z20w9q.js → chunk-fzfmg9pk.js} +2 -2
- package/dist/chunk-g3snk3nb.js +2 -0
- package/dist/chunk-g4frp0r0.js +2 -0
- package/dist/chunk-g7v2xgfh.js +2 -0
- package/dist/{chunk-y0cxqkzd.js → chunk-ggqv2qpg.js} +2 -2
- package/dist/{chunk-b4evrc3r.js → chunk-gjg213m6.js} +2 -2
- package/dist/chunk-gvwmyxwf.js +2 -0
- package/dist/{chunk-wvs6ttt3.js → chunk-gyps0vc5.js} +3 -3
- package/dist/chunk-h3hzsg0s.js +2 -0
- package/dist/chunk-h3mrbbsm.js +2 -0
- package/dist/{chunk-ss5xzk9q.js → chunk-h4r8cx37.js} +2 -2
- package/dist/{chunk-8mc330j2.js → chunk-hfzt777k.js} +2 -2
- package/dist/{chunk-yd68z08r.js → chunk-hp1w7xrp.js} +2 -2
- package/dist/chunk-hrgtpvkw.js +2 -0
- package/dist/{chunk-cc33s37q.js → chunk-j5engcds.js} +2 -2
- package/dist/chunk-j6mkqhey.js +2 -0
- package/dist/{chunk-d39kpmyz.js → chunk-k20e64v3.js} +2 -2
- package/dist/{chunk-dmsy511f.js → chunk-k8xqzrg6.js} +1 -1
- package/dist/{chunk-8ht645rn.js → chunk-ksyb8hyt.js} +2 -2
- package/dist/chunk-m33eg346.js +2 -0
- package/dist/{chunk-n6kdjmh7.js → chunk-m9mvh1gy.js} +2 -2
- package/dist/{chunk-d444rgtm.js → chunk-maa70rv4.js} +2 -2
- package/dist/{chunk-938k294j.js → chunk-mfnq8nnd.js} +3 -3
- package/dist/chunk-mhnhkg65.js +2 -0
- package/dist/{chunk-ps74k3c4.js → chunk-mmm1rq2a.js} +2 -2
- package/dist/{chunk-q3b79z6s.js → chunk-mz18hxbn.js} +2 -2
- package/dist/chunk-n6dbc0md.js +2 -0
- package/dist/{chunk-8qnrhq54.js → chunk-n9fwnebe.js} +2 -2
- package/dist/{chunk-pa354z8g.js → chunk-nk266xxm.js} +2 -2
- package/dist/{chunk-xhrs52gv.js → chunk-npsgbfh2.js} +2 -2
- package/dist/{chunk-yht2h676.js → chunk-nx701kdw.js} +2 -2
- package/dist/{chunk-fynzxex7.js → chunk-p0egvanw.js} +2 -2
- package/dist/{chunk-qcabefs0.js → chunk-p9ra3xxb.js} +2 -2
- package/dist/{chunk-tm5dbbgp.js → chunk-pp9fngkx.js} +2 -2
- package/dist/{chunk-xke4r5kr.js → chunk-q92p35wp.js} +2 -2
- package/dist/{chunk-8jxcdap5.js → chunk-qcj6f1rq.js} +2 -2
- package/dist/chunk-qexqjw6k.js +2 -0
- package/dist/chunk-qez4ygej.js +2 -0
- package/dist/chunk-qyp7c0j8.js +1 -0
- package/dist/{chunk-cfhg44ce.js → chunk-qznyjv2c.js} +2 -2
- package/dist/{chunk-t3vcp85z.js → chunk-r0v0wxn7.js} +2 -2
- package/dist/chunk-r1sdshyw.js +2 -0
- package/dist/{chunk-qmhnhgc5.js → chunk-rch4xpj1.js} +2 -2
- package/dist/{chunk-r25wz0yx.js → chunk-rg5jhh45.js} +2 -2
- package/dist/chunk-sqwscqfk.js +2 -0
- package/dist/{chunk-yvkt9ewq.js → chunk-stghje2t.js} +2 -2
- package/dist/{chunk-wc48fzq2.js → chunk-t8n1ny7h.js} +2 -2
- package/dist/{chunk-50brsmjd.js → chunk-teg61ef5.js} +2 -2
- package/dist/chunk-tjjqaf65.js +2 -0
- package/dist/chunk-v0h2wsj4.js +2 -0
- package/dist/{chunk-0e4zew7m.js → chunk-v3jehrgj.js} +2 -2
- package/dist/chunk-v4cf374m.js +2 -0
- package/dist/{chunk-kyxdpg6a.js → chunk-v5wqxqrh.js} +1 -1
- package/dist/chunk-v7dyjpv3.js +2 -0
- package/dist/{chunk-y7nq2yre.js → chunk-vkc6mwyb.js} +2 -2
- package/dist/chunk-vpm5ddtt.js +4 -0
- package/dist/{chunk-qx0xeepz.js → chunk-vwzkw97t.js} +2 -2
- package/dist/{chunk-93d3a9wy.js → chunk-w0dfvr05.js} +2 -2
- package/dist/{chunk-8nds14dw.js → chunk-wnsk4tw5.js} +2 -2
- package/dist/chunk-wyjzpncq.js +2 -0
- package/dist/{chunk-3pvs8s3b.js → chunk-x4qnkn8f.js} +2 -2
- package/dist/{chunk-t9djctkk.js → chunk-xecs5c6a.js} +1 -1
- package/dist/{chunk-97yvajhc.js → chunk-xhtpqc8p.js} +2 -2
- package/dist/{chunk-mb99bpqx.js → chunk-xvzz0xh6.js} +2 -2
- package/dist/{chunk-5fj4ewez.js → chunk-y2g8d94r.js} +2 -2
- package/dist/chunk-y7v0ghc9.js +2 -0
- package/dist/{chunk-5c5z2b48.js → chunk-yd6ae6py.js} +2 -2
- package/dist/{chunk-pqw5qz4e.js → chunk-yf39xswe.js} +2 -2
- package/dist/{chunk-z20ss7qj.js → chunk-yjk5a037.js} +2 -2
- package/dist/{chunk-wh5dd7mq.js → chunk-yq55kqn1.js} +2 -2
- package/dist/{chunk-y39xsj1f.js → chunk-yr6ar090.js} +1 -1
- package/dist/{chunk-6cbbnb7a.js → chunk-z49yf5bx.js} +2 -2
- package/dist/{chunk-vxk0kgbf.js → chunk-z4nv1j97.js} +2 -2
- package/dist/{chunk-a1snxcra.js → chunk-zb14ervr.js} +2 -2
- package/dist/{chunk-6883ebtb.js → chunk-zd40j8qb.js} +2 -2
- package/dist/{chunk-qvadb210.js → chunk-zn9xn0pj.js} +2 -2
- package/dist/chunk-zr2a9z0m.js +2 -0
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.d.ts +2 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.d.ts +2 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.d.ts +6 -0
- package/dist/conversation/composer/app-mentions.js +1 -0
- package/dist/conversation/composer/apps-menu.d.ts +4 -0
- package/dist/conversation/composer/apps-menu.js +1 -0
- package/dist/conversation/composer/composer.d.ts +4 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.d.ts +10 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.d.ts +12 -0
- package/dist/conversation/subagent-tasks.js +1 -0
- package/dist/conversation/types.d.ts +16 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.d.ts +104 -0
- package/dist/image.js +1 -0
- 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-parser.worker.js +46 -44
- 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/lib/tool-artifacts.d.ts +2 -0
- package/dist/lib/tool-artifacts.js +1 -0
- package/dist/locales.d.ts +91 -0
- package/dist/locales.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.d.ts +7 -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.d.ts +2 -0
- 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/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +10 -5
- package/dist/chunk-05c7f7pa.js +0 -2
- package/dist/chunk-1vmk34zf.js +0 -2
- package/dist/chunk-2emf349g.js +0 -2
- package/dist/chunk-3tbg92ns.js +0 -3
- package/dist/chunk-5p1fxq0k.js +0 -2
- package/dist/chunk-758e6qf7.js +0 -4
- package/dist/chunk-78qh8049.js +0 -2
- package/dist/chunk-7962trd3.js +0 -2
- package/dist/chunk-9g0j2ptv.js +0 -2
- package/dist/chunk-9pgh7zjb.js +0 -2
- package/dist/chunk-9vm0y271.js +0 -2
- package/dist/chunk-axyfaexd.js +0 -2
- package/dist/chunk-d32738zq.js +0 -2
- package/dist/chunk-gva03q5f.js +0 -2
- package/dist/chunk-haxhf3gd.js +0 -2
- package/dist/chunk-j1f4spe0.js +0 -2
- package/dist/chunk-jeedg61t.js +0 -2
- package/dist/chunk-js95dpfd.js +0 -2
- package/dist/chunk-jwkm2kgd.js +0 -2
- package/dist/chunk-ktpg1m74.js +0 -2
- package/dist/chunk-kyjhngd2.js +0 -2
- package/dist/chunk-kymztvkv.js +0 -2
- package/dist/chunk-nvxcys2c.js +0 -2
- package/dist/chunk-pvzceygv.js +0 -2
- package/dist/chunk-pyah1qdm.js +0 -2
- package/dist/chunk-qcy0m7c4.js +0 -2
- package/dist/chunk-qf163g6t.js +0 -2
- package/dist/chunk-r29eygte.js +0 -2
- package/dist/chunk-rbj9twq1.js +0 -2
- package/dist/chunk-sn5n38j6.js +0 -2
- package/dist/chunk-tdys88q3.js +0 -2
- package/dist/chunk-tggrc8e5.js +0 -2
- package/dist/chunk-v1x1b7cv.js +0 -5
- package/dist/chunk-vetfnaz1.js +0 -2
- package/dist/chunk-w3eddq0g.js +0 -2
- package/dist/chunk-w49gke0h.js +0 -2
- package/dist/chunk-wkw61zwr.js +0 -2
- package/dist/chunk-xmrsdhtw.js +0 -2
- package/dist/chunk-yamfntjx.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function
|
|
2
|
-
export{
|
|
1
|
+
import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function Ni(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function In(n){let t=n.replaceAll(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(t)}
|
|
2
|
+
export{Ni,In};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as o,useContext as n,useEffect as r}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as o,useContext as n,useEffect as r}from"react";var co=o(null);function S(t){let e=n(co);r(()=>{if(t&&e!==null)return e()},[t,e])}
|
|
2
|
+
export{co,S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Ur={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function qo(e){return[...e].toSorted((o,n)=>(Ur[o.kind]??99)-(Ur[n.kind]??99))}function ha(e){return e==="allow_once"||e==="allow_always"}function va(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{Ur,qo,ha,va};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Dn}from"./chunk-mhnhkg65.js";async function Gi(i,c){let s=new WeakSet;while(!c.aborted){let r=[...i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')].filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function at(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of Dn(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,o-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
|
|
2
|
+
export{Gi,at};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-k7y6dqf2.js";import{
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>d===""?v.path!==null||n.has(b.id):P.includes(d)).map(({plugin:b})=>b)}))},[m,f,d]);return s(Y,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Te(){let{t}=l(),d=q(),p=i((
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-k7y6dqf2.js";import{k,u}from"./chunk-xhtpqc8p.js";import{lt}from"./chunk-5vh4z4yp.js";import{_e,l,Pe,Ue,i}from"./chunk-gjg213m6.js";import{D,H,J,O,U,de,pt}from"./chunk-qyp7c0j8.js";import{ae}from"./chunk-yr6ar090.js";import{Oe}from"./chunk-hp9h8njw.js";import{h}from"./chunk-9cqpn67f.js";import{ut,M}from"./chunk-7zcr1wzv.js";import{F,le}from"./chunk-fzfmg9pk.js";import{dt}from"./chunk-7xe2v72q.js";import{ct}from"./chunk-k8xqzrg6.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ne,BookOpenIcon as se,CheckIcon as ie,CircleArrowUpIcon as oe,MoreVerticalIcon as re,PlusIcon as W,PuzzleIcon as ce,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as we,DropdownMenuContent as Ce,DropdownMenuItem as Ie,DropdownMenuTrigger as Se}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as X}from"@nyssance/shadcn/vega/components/ui/input";import{Label as De}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Y}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function Z(t){return t.interface?.shortDescription??""}function Me({plugin:t,marketplace:d}){let{t:p}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ie,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(y,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?p("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Ee({plugin:t,marketplace:d,actions:p,onOpen:g}){let a=Z(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(de,{className:"toolbox-row relative",children:[e(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(O,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(M,{name:t.name})})}),s(H,{className:"pointer-events-none relative min-w-0",children:[e(pt,{className:"mb-0.5",children:T(t)}),e(J,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(J,{"data-toolbox-metadata":"",children:r})]}),e(D,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function q(){return Ue((t)=>t.connection==="ready"&&te(t.agent))}var E=48;function ze({marketplace:t,plugins:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/E)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(we,{children:[e(Se,{render:e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(re,{})}),e(Ce,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ie,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(U,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*E,(r+1)*E).map((n)=>e(Ee,{onOpen:p,plugin:n,marketplace:t,actions:e(Me,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>E&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(y,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/E)]}),e(y,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*E>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Be=fe(function({query:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),Z(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:b,text:P})=>d===""?v.path!==null||n.has(b.id):P.includes(d)).map(({plugin:b})=>b)}))},[m,f,d]);return s(Y,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Te(){let{t}=l(),d=q(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,x]=I(!1),[b,P]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),P(null);try{await p({source:N}),m(""),x(!1)}catch(S){P(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(oe,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)x(N)},children:[s(be,{render:e(y,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(W,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(X,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),b&&e("p",{role:"alert",className:"text-destructive text-sm",children:b}),s("div",{className:"flex justify-end gap-2",children:[e(y,{type:"button",variant:"ghost",disabled:r,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(y,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Ae({onOpen:t,query:d}){let p=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(d.trim().toLowerCase());return e(h,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${F} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(ae,{}):e(Be,{query:f,onOpen:t})]})})}function Wi({cwd:t,active:d,extensions:p,onOpenCatalog:g}){let{t:a}=l(),f=Pe(),m=_e(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[x,b]=I("plugins"),[P,A]=I({plugins:"",skills:""}),N=x==="skills"?P.skills:P.plugins,S=(o)=>A((z)=>({...z,[x]:o})),ee=Ue((o)=>JSON.stringify([...new Set(o.sessionList.map((z)=>Oe(z.cwd,o.projectContext)).filter((z)=>z!==null))].toSorted())),L=JSON.stringify([...new Set([Oe(t,f.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),V=a(x==="skills"?"plugins.skills.search":"plugins.search"),[w,G]=I(null),C=q();K(()=>{if(!d||!C)return;if(m.getState().loadedScope!==L)r(JSON.parse(L))},[d,C,r,L,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),b("plugins"),G(o)},_=(o)=>{g?.(),b(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(ut,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(u,{className:`${c} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(ne,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(u,{className:`${c} h-8 gap-2 px-2`,active:!p?.active&&x===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(ce,{className:"size-4"}):e(se,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(h,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(k,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(u,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!p?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(M,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Y,{children:[w&&e(dt,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(le,{children:e(lt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(X,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>S(o.target.value),placeholder:V}),N&&e(y,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ge,{})})]}),e(y,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),x==="plugins"&&e(Te,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(y,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Ae,{query:P.plugins,onOpen:j})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(ct,{query:P.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
+
export{Wi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
export{De,
|
|
1
|
+
import{d}from"./chunk-teg61ef5.js";import{b}from"./chunk-57p1s7hy.js";import{isContentEntry as k,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as h}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";function De(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let n=[];for(let[r,c]of e.content.entries()){if(!k(c))continue;let i=c.content;if(N(i))n.push({key:`${e.id}:${r}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))n.push({key:`${e.id}:${r}`,path:i.uri,alt:i.name})}if(n.length)return n;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:n,openImageGallery:a,openImage:r,t:c}=d(),[i,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);B(()=>{let t=!0,l=JSON.parse(f);g({});for(let o of l)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&n?n(o.path):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)g((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)g((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[f,n,v]);let I=e.flatMap((t)=>{let l=i[t.key];return l&&"src"in l?[{src:l.src,alt:t.alt}]:[]});return s("div",{className:"codex-image-thumbnails",children:e.map((t,l)=>{let o=i[t.key];if(!o)return s("div",{className:"codex-image-thumbnail",role:"status","aria-label":c("stream.codex.imageLoading"),children:s(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":c("stream.codex.imageFailed"),onClick:()=>x((m)=>m+1),children:s(R,{"aria-hidden":"true"})},t.key);return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,l).filter((u)=>{let p=i[u.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 di({blocks:e}){let{t:n}=d(),a=e.flatMap(T),[r,c]=b(`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:()=>c((i)=>!i),children:[y("span",{className:"codex-activity-label",children:[s(S,{className:"codex-activity-icon","aria-hidden":"true"}),s("span",{className:"codex-activity-leading",children:n("stream.codex.viewedImages",{count:a.length})})]}),s(C,{className:r?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),r&&s(E,{images:a})]})}
|
|
2
|
+
export{De,di};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{d}from"./chunk-teg61ef5.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function ta(e){let c=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let a=u,f=a._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of a.changes){let i=c.get(n.path);if(i)i.additions+=l,i.deletions+=h;else c.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...c.values()]}function li({blocks:e}){return s(bn,{files:ta(e)})}function bn({files:e,onOpen:c,renderPath:r,actions:u}){let{t:a,openLink:f}=d(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:a("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:a(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:a("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>c===void 0?f(t.path):c(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[a(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{ta,li,bn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l,i}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{l,i}from"./chunk-gjg213m6.js";import{h}from"./chunk-9cqpn67f.js";import{M}from"./chunk-7zcr1wzv.js";import{ce}from"./chunk-v3jehrgj.js";import{F,se,le}from"./chunk-fzfmg9pk.js";import{ExternalLinkIcon as R,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as A}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as L}from"react/jsx-runtime";function dt({entry:r,onBack:p}){let u=l(),{t}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),v=i((a)=>a.busyIds[r.plugin.id]),O=i((a)=>a.install),T=i((a)=>a.uninstall),H=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,U]=y(null),[V,j]=y(0),[c,I]=y(null);_(()=>{let a=!0;return U(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,V]);let d=o?.summary??r.plugin,m=C?.plugin??d,s=d.interface,b=s?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",z=s?.longDescription??o?.description??s?.shortDescription,E=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(le,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:b})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(M,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:b})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?n(L,{children:[e(X,{checked:m.enabled,disabled:!!v||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void H(m,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void T(m),children:v?e(S,{}):t("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(k?"plugins.detail.unavailable":"plugins.detail.install"),title:t(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||k,onClick:()=>void O({...r,plugin:d}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(h,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${F} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(A,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(x,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(x,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(x,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(x,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(x,{label:t("plugins.detail.website"),children:e(w,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!D&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),t("plugins.detail.loading")]}),D&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>j((a)=>a+1),children:t("plugins.loadError.retry")})]}),z&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:z}),E.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(E)].map((a)=>e("img",{src:a,alt:b,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(N,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(A,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(N,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(M,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(N,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>I(a),children:[e(M,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(N,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(N,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(w,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(w,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)I(null)},children:e(G,{className:se,children:c&&n(L,{children:[e("div",{className:"shrink-0 pr-8",children:e(M,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(ce,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(R,{className:"size-3.5"})]})}
|
|
2
|
+
export{dt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Un}from"./chunk-t8n1ny7h.js";import{jsx as o}from"react/jsx-runtime";function ut(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:Un}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function On(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function M({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:On(t)})})}
|
|
2
|
+
export{ut,On,M};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var uo={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},po={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function L({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=uo[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",po.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{uo,po,L};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{P,En,Hi,Yt,Oi,Ln,Ui}from"./chunk-be7ja8gh.js";import{n,Se,X,t}from"./chunk-bt01an6h.js";import{we}from"./chunk-h3hzsg0s.js";import{createStore as C}from"@alwith/api/client";import{isText as w,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=C({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function v(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function E(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...Ln(s._meta),...s.content.filter(w).flatMap((i)=>Ln(i._meta))])if(a.questionItemId===e)return a.answer}return}function M({sessionId:r,item:e,question:s,index:a}){let i=Se(),{t:l}=n(),m=En(e.id,a),c=JSON.stringify([r,m]),u=X(b,(o)=>o.entries[c]),d=t((o)=>o.sessions[r]),k=t((o)=>o.connection==="ready"),f=u?.draft??Hi(s),x=d===void 0?u?.accepted:E(d,m)??u?.accepted,A=d!==void 0&&v(d,e),h=!d?.subagent&&k&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!A?"closed":!h?"unavailable":"pending",D=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!v(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Yt(s,f);if(!S.trim())return;let q={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Oi(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Ui,{question:s,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{D()}})}function _n({sessionId:r,item:e}){let s=t((i)=>i.sessions[r]),a=P(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!v(s,e))return y(we,{content:e.content.some((i)=>!w(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(M,{sessionId:r,item:e,question:i,index:l},En(e.id,l)))})}
|
|
2
|
+
export{_n};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{S}from"./chunk-6zcjn8ra.js";import{r}from"./chunk-d1pc0mrb.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function yr({children:l}){let{t:n}=r(),[o,u]=p(!1),t=c(null),[a,d]=p();return S(o),M(h,{open:o,onOpenChange:(i)=>{if(i){let s=t.current?.parentElement;if(!s)throw Error("Help trigger must be mounted in its footer row");d(s.clientWidth)}u(i)},children:[e(w,{render:e(f,{ref:t,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{yr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{P}from"./chunk-be7ja8gh.js";import{codexMessageError as v,nativeTurnId as m,textOf as A,turns as S}from"@nyssance/codex-acp-v2/client";function sa(t){return t.kind==="tool"&&t.name==="mcp_startup"}function _(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Ai(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function E(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(v(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=_(e),i=e._meta?.codex,d=P(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(P(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function Ei(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!sa(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>S({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&j(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(Mn),items:a},M=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>E(x,c,b<M,a[b-1])),x})}function j(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Mn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function re(t){return A(t.content)}function rt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function An(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Li(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Ri(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function Fi(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!Ri(t,e[n-1],o))break;n--}return e[n]?.key}function Di(t,e,n){let o=n,s=n;while(o>0&&Ri(t,e[o-1],e[o]))o--;while(s+1<e.length&&Ri(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{sa,Ai,Ei,Mn,re,rt,An,Li,Ri,Fi,Di};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{yn,xn}from"./chunk-6wtrmxev.js";import{P}from"./chunk-be7ja8gh.js";import{tt}from"./chunk-y7v0ghc9.js";import{Pn}from"./chunk-xvzz0xh6.js";import{n}from"./chunk-bt01an6h.js";import{Ai,re,rt,Li}from"./chunk-8wdkc41j.js";import{Cn}from"./chunk-z4nv1j97.js";import{we}from"./chunk-h3hzsg0s.js";import{_n}from"./chunk-8hgrrycr.js";import{si}from"./chunk-c11c29rv.js";import{mi}from"./chunk-hrgtpvkw.js";import{gi}from"./chunk-2bbspcb4.js";import{kn,Sn}from"./chunk-e24d6hfs.js";import{ot}from"./chunk-gha517v4.js";import{codexMessageError as U,codexTurnError as q,isContentEntry as me,isEmbeddedResource as Z,isImage as ee,isResourceLink as de,isText as ce,nativeTurnId as ue}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as ge,SparklesIcon as pe}from"lucide-react";import{Fragment as X,memo as fe,useEffect as ye,useState as he}from"react";import{jsx as i,jsxs as l,Fragment as N}from"react/jsx-runtime";function Y(s){if(ee(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(Z(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function ke({item:s}){let{t}=n(),m=s.status==="in_progress",[o,u]=he(()=>Date.now()-s.at>=1e4);return ye(()=>{if(!m)return;let a=Math.max(0,s.at+1e4-Date.now());if(u(a===0),a===0)return;let y=setTimeout(()=>u(!0),a);return()=>clearTimeout(y)},[s.id,s.at,m]),l("div",{className:"codex-context-compaction",children:[i(pe,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?t("stream.codex.contextCompacted"):s.status==="cancelled"?t("timeline.interrupted"):t(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function E({sessionId:s,entry:t,terminals:m,streaming:o,streamingThoughtId:u}){let{t:a}=n();switch(t.kind){case"activity":return i(Cn,{sessionId:s,items:t.items,terminals:m,streamingThoughtId:u});case"text":return P(t.item._meta).length>0?i(_n,{sessionId:s,item:t.item}):i(we,{content:t.item.content,messageId:t.item.id,streaming:o});case"plan":return i(mi,{plan:t.item.plan});case"compaction":if(t.item.status==="failed")return l(kn,{children:[i("div",{children:a("timeline.compactionFailed")}),t.item.error!==null&&i("div",{children:t.item.error})]});return i(ke,{item:t.item})}}function xe({sessionId:s,turn:t,terminals:m,active:o,blocked:u=!1,continued:a=!1,edits:y=t.edits,activityItems:M=t.items,workStartedAt:te=t.startedAt,isLast:F,error:h,interrupted:L,retry:O,retrying:p,extraWork:d=null,answerActions:D,footer:ne}){let{t:c}=n(),A=t.errors.map((e)=>{let r=U(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let v=O?.turnId===ue(e)?O:void 0;return i(Sn,{error:r,retry:v},`${e.id}:${v?.delaySeconds??"manual"}`)});if(F&&h!==null&&!t.errors.some((e)=>{let r=U(e);return r!==null&&r.stopReason===h.stopReason&&q(r).message===q(h).message}))A.push(i(Sn,{error:h},"current-run-error"));let k=A.length>0?i("div",{className:"codex-turn-errors",children:A}):null,b=t.items.filter(Pn);if(d===null&&b.length>0&&b.length===t.items.length)return l(N,{children:[i(Cn,{sessionId:s,items:b,terminals:m,streamingThoughtId:null}),k]});let x=t.work,T=x.length>0&&x.every((e)=>e.kind==="compaction");if(d===null&&(Ai(t)||T&&t.final.length===0))return l(N,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:t.work.map((e)=>i(E,{sessionId:s,entry:e,terminals:m,streaming:!1,streamingThoughtId:null},e.key))}),k]});let W=rt(t),B=t.final.filter((e)=>P(e._meta).length===0).map(re).join(`
|
|
2
|
+
`),w=o?null:ot(t,"assistant"),G=t.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="alwith_client_generate_image")&&(e.status==="pending"||e.status==="in_progress")),H=new Set(t.final.flatMap((e)=>e.content.map(Y).filter((r)=>r!==null))),C=t.items.flatMap((e)=>{if(!tt(e))return[];return e.content.filter(me).flatMap((r,v)=>{let g=r.content,ae=ee(g),le=de(g)||Z(g)&&"blob"in g.resource;if(!ae&&!le)return[];let S=Y(g);if(S!==null){if(H.has(S))return[];H.add(S)}return[{key:`${e.id}:${v}`,block:g}]})}),K=t.final.some((e)=>P(e._meta).length===0&&e.content.some((r)=>!ce(r)||r.text.trim().length>0)),ie=G.length>0||C.length>0||T||K||t.final.some((e)=>P(e._meta).length>0),I=t.items.findIndex((e)=>t.final.includes(e)),R=(e)=>t.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=x.filter((e)=>I===-1||R(e)<I),se=x.filter((e)=>I!==-1&&R(e)>I),oe=[...t.final.map((e)=>({kind:"answer",item:e,index:t.items.indexOf(e)})),...se.map((e)=>({kind:"work",entry:e,index:R(e)}))].toSorted((e,r)=>e.index-r.index),V=!o&&!a&&(B.trim().length>0?i(yn,{text:B,isMostRecentTurn:F,time:w,afterCopy:D}):l("div",{className:"flex items-center gap-0.5",children:[D,w&&i("span",{className:"codex-user-time ms-1",title:w.full,children:w.short})]})),f=gi({...t,items:M},{running:o,blocked:u,retrying:p!==void 0}),j=f.kind==="reasoning"?f.ownerKey??null:null,z=f.kind==="thinking",_=Li({...t,items:M}),J=o&&!K||d?.active===!0;return l(N,{children:[i(xn,{stateKey:JSON.stringify([s,t.replayed?"history":"live",t.key]),active:J,defaultExpanded:J||d?.defaultExpanded===!0||!t.replayed&&(L||W),..._,durationMs:d?.active?void 0:_.durationMs,startedAt:_.startedAt??te,loading:(z||f.kind==="working")&&t.work.length===0&&d===null,loadingLabel:f.kind==="working"?c("stream.codex.working"):void 0,work:[...a||T?[]:Q.map((e)=>i(E,{sessionId:s,entry:e,terminals:m,streaming:o,streamingThoughtId:j},e.key)),...d===null?[]:[i(X,{children:d.content},"additional-work")]],answer:ie||a?l("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&Q.map((e)=>i(E,{sessionId:s,entry:e,terminals:m,streaming:!1,streamingThoughtId:null},e.key)),oe.map((e)=>{if(e.kind==="work")return i(E,{sessionId:s,entry:e.entry,terminals:m,streaming:o,streamingThoughtId:j},e.entry.key);let r=e.item;return l(X,{children:[P(r._meta).length>0?i(_n,{sessionId:s,item:r}):i(we,{content:r.content,messageId:r.id,streaming:o}),r===t.final.at(-1)&&V]},r.id)}),G.map((e)=>l("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),l("span",{className:"codex-image-generation-status",children:[o&&i(ge,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),!o&&c("timeline.imageStopped")]})]},e.id)),C.length>0&&i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:C.map((e)=>i(we,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),t.final.length===0&&V]}):null,footer:l(N,{children:[z&&t.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:c("message.thinking")})}),ne,y.length>0&&!o&&!a&&i(si,{items:y}),L&&!W&&i("div",{className:"codex-interrupted-turn",role:"status",children:c("timeline.interrupted")}),!o&&k]})}),o&&p!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&k]})}var ri=fe(xe);
|
|
3
|
+
export{ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function Bn(a){let{plugin:u,marketplace:n}=a;return{installAttemptId:crypto.randomUUID(),pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function A(a){let{plugin:u,marketplace:n}=a;return{pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function mt(a,u){let n=u??{t:(e)=>e},l=(e,r)=>n.t(e,r),p=(e)=>n.notify?.(e),o=(e)=>{if(n.reportError)n.reportError(Error(e));else console.error(e)},m=null,b=null,d=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>d((s)=>{let t={...s.busyIds};if(r===null)delete t[e];else t[e]=r;return{busyIds:t}}),h=(e,r)=>d((s)=>{let t={...s.busyMarketplaces};if(r)t[e]=!0;else delete t[e];return{busyMarketplaces:t}}),w=M({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{if(m={cwds:e,forceRefetch:r.forceRefetch===!0||m?.forceRefetch===!0},d({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let s=m;m=null,d({error:null});try{let[t,i,g]=await Promise.all([a.listSkills(s.cwds,s.forceRefetch),a.listPlugins({...s.cwds.length>0?{cwds:s.cwds}:{},...s.forceRefetch?{forceRefetch:!0}:{}}),a.installedPlugins(s.cwds)]);if(m)continue;let c=I(t);d({loadedScope:JSON.stringify(s.cwds),skills:c.skills,skillProjects:c.projects,skillErrors:c.errors,marketplaces:i.marketplaces,marketplaceLoadErrors:i.marketplaceLoadErrors,featuredPluginIds:i.featuredPluginIds,installed:v(g)})}catch(t){if(!m)d({error:k(t)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=E(e.plugin);f(e.plugin.id,"installing");try{let s=await a.installPlugin(Bn(e));return await y(),f(e.plugin.id,null),p(l("plugins.toast.installed",{pluginName:r})),s}catch(s){throw o(`${l("plugins.toast.installError")}: ${k(s)}`),s}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let s=(i)=>d((g)=>({installed:g.installed.map((c)=>c.plugin.id===e.id?{...c,plugin:{...c.plugin,enabled:i}}:c)}));s(r);let t=e.enabled;try{let i=e.source.type==="remote"?e.remotePluginId:void 0;if(i===null)throw Error("Remote plugin ID is missing");let g=await a.setPluginEnabled(e.id,r,i);t=g.enabled,s(g.enabled),await y();let c=P().installed.find((R)=>R.plugin.id===e.id);if(c)t=c.plugin.enabled;if(!c||t!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),p(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:E(e)}))}catch(i){s(t),o(`${l("plugins.toast.toggleError")}: ${k(i)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=E(e);f(e.id,"uninstalling");try{let s=e.source.type==="remote"?e.remotePluginId:e.id;if(!s)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(s),await y(),P().installed.some((t)=>t.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),p(l("plugins.toast.uninstalled",{pluginName:r}))}catch(s){o(`${l("plugins.toast.uninstallError")}: ${k(s)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(A(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;d((t)=>({busySkills:{...t.busySkills,[e.path]:!0}})),d((t)=>({skills:t.skills.map((i)=>i.path===e.path?{...i,enabled:r}:i)}));let s=e.interface?.displayName??e.name;try{let t=await a.setSkillEnabled({path:e.path,enabled:r});if(d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:t.effectiveEnabled}:g)})),t.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}p(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:s}))}catch(t){d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:e.enabled}:g)})),o(`${l("plugins.skills.toggleError")}: ${k(t)}`)}finally{d((t)=>{let i={...t.busySkills};return delete i[e.path],{busySkills:i}})}},addMarketplace:async(e)=>{let r=await a.addMarketplace(e);return await y(!0),p(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),p(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((s)=>s.message).join("; ")}`);else p(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else p(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(w,{bindHost:(e)=>{n=e}});return S}
|
|
2
|
+
export{Bn,mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{invoke as r}from"@tauri-apps/api/core";import{listen as t,once as s,emit as n,emitTo as o}from"@tauri-apps/api/event";var
|
|
2
|
-
export{
|
|
1
|
+
import{invoke as r}from"@tauri-apps/api/core";import{listen as t,once as s,emit as n,emitTo as o}from"@tauri-apps/api/event";var C={providersRead:()=>r("plugin:alwith-chat|providers_read"),providersSave:(e)=>r("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>r("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>r("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>r("plugin:alwith-chat|providers_test",e),providersApply:()=>r("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>r("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>r("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>r("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>r("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>r("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>r("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>r("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>r("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>r("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>r("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>r("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>r("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>r("plugin:alwith-chat|word_cloud",e)},nn={"providers:changed":{name:"providers:changed",listen:(e)=>t("providers:changed",e),once:(e)=>s("providers:changed",e),emit:(e)=>n("providers:changed",e),emitTo:(e,i)=>o(e,"providers:changed",i)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>t("providers:managed-revoked",e),once:(e)=>s("providers:managed-revoked",e),emit:(e)=>n("providers:managed-revoked",e),emitTo:(e,i)=>o(e,"providers:managed-revoked",i)}};function Kr(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function la(e){if(Kr(e)||e instanceof Error)return e.message;return String(e)}
|
|
2
|
+
export{C,nn,Kr,la};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{R}from"./chunk-6pwy0ncf.js";import{n}from"./chunk-bt01an6h.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function No({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=n(),t=l(!1);return r(R,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{t.current=e},onClick:()=>{p(!t.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
+
export{No};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function
|
|
2
|
-
export{
|
|
1
|
+
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function Ii(i,e){return n??=new s,n.connect(i,e)}
|
|
2
|
+
export{Ii};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{fe}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{fe}from"./chunk-m9mvh1gy.js";function ao(r){let s=fe(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function ge(r){return ao(r).join(fe()?"":"+")}
|
|
2
|
+
export{ao,ge};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var $e="group/trailing";function Ae({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Ke({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
|
|
2
|
+
export{$e,Ae,Ke};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r,a,o}from"./chunk-
|
|
2
|
-
`));else f(null)}finally{h.current=!1,w(!1)}}return i("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":s("sessionList.archives.title"),children:[i("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[i("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:s("sessionList.archives.title")}),i(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),s("sessionList.archives.deleteAll")]})]}),i("div",{className:"flex shrink-0 flex-wrap gap-3",children:[i("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":s("sessionList.archives.search"),placeholder:s("sessionList.archives.search"),value:B,onChange:(e)=>
|
|
3
|
-
export{
|
|
1
|
+
import{r,a,o}from"./chunk-d1pc0mrb.js";import{Me,ne,Z}from"./chunk-qez4ygej.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function M({className:u,...s}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...s,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function hr({Scroll:u=we}){let{t:s,i18n:A}=r(),m=a(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,ee]=d("all"),[te,se]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let n=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(n.has(v))throw Error("Archive pagination returned a repeated cursor");n.add(v),await m.listArchived()}}catch(n){if(!e)F(E(n))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,te]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??s("sessionList.untitled"),ae=[...new Set(S.filter((e)=>l&&j(l,e).id!==Z).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=l?j(l,e).id:null,n=c===Z;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?n:!n))&&(p==="all"||(p==="quick"?n:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let n of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===n.sessionId))continue;try{await m.delete(n.sessionId)}catch(v){e.push(n),c.push(`${L(n)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
+
`));else f(null)}finally{h.current=!1,w(!1)}}return i("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":s("sessionList.archives.title"),children:[i("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[i("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:s("sessionList.archives.title")}),i(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),s("sessionList.archives.deleteAll")]})]}),i("div",{className:"flex shrink-0 flex-wrap gap-3",children:[i("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":s("sessionList.archives.search"),placeholder:s("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),i(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[i(R,{"aria-label":s("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:s(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),i(M,{children:[t(x,{value:"all",children:s("sessionList.archives.allChats")}),t(x,{value:"quick",children:s("sessionList.archives.quickChats")}),t(x,{value:"project",children:s("sessionList.archives.projectChats")})]})]}),i(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[i(R,{"aria-label":s("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?s("sessionList.archives.allProjects"):p==="quick"?s("sessionList.archives.noProject"):ne(p,l??void 0)})]}),i(M,{children:[t(x,{value:"all",children:s("sessionList.archives.allProjects")}),t(x,{value:"quick",children:s("sessionList.archives.noProject")}),ae.map((e)=>t(x,{value:e,title:e,children:ne(e,l??void 0)},e))]})]})]}),i(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:s("sessionList.archives.connecting")}):q?i("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),s("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:i(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>se((e)=>e+1),children:s("sessionList.archives.retry")})]})}):S.length===0?i("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:s("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:s("sessionList.archives.noResults")}):(l?Me(K,l):[]).filter(([,e])=>e.length>0).map(([e,c])=>i("section",{className:"flex flex-col gap-3",children:[i("div",{className:"flex items-center justify-between gap-3",children:[i("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===Z?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===Z?s("sessionList.archives.noProject"):ne(e,l??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:s("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((n)=>i("article",{"aria-label":L(n),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[i("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(n),children:L(n)}),n.updatedAt!==null&&t("time",{dateTime:n.updatedAt,title:s("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(n.updatedAt))})]}),i("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":s("sessionList.delete"),title:s("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([n])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(n),children:s("sessionList.archives.unarchive")})]})]},n.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:i(ge,{showCloseButton:!C,children:[i(ye,{children:[t(Le,{children:s("sessionList.archives.deleteTitle")}),t(xe,{children:s(ie?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),i(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:s("sessionList.cancel")}),i(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(J,{}),s("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
+
export{hr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Xo,Fe,vn,Jo,ei,ti}from"./chunk-9yrctk84.js";import{forwardRef as ye,useCallback as K,useEffect as ge,useImperativeHandle as ve,useLayoutEffect as w,useMemo as ne,useRef as s,useState as F}from"react";import{jsx as R,jsxs as re}from"react/jsx-runtime";var pe=12,X=2,V=800,he=new Map;function Re({turnKey:q,heightPx:x,placeholder:W=!1,deferUntilReady:n=!1,observe:b,onReady:L,children:z}){let h=s(null),[H,_]=F(!1),U=K((m)=>{h.current=m,b(q,m)},[b,q]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let T=()=>{L(m),_(!0)};if(m.querySelector("[data-markdown-pending]")===null){T();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),T()});return d.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-markdown-pending"]}),()=>d.disconnect()},[L]),re("div",{style:H?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:U,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":q,"aria-busy":!H||void 0,style:!H&&!W&&n?{visibility:"hidden"}:void 0,"data-turn-ready":H?"":void 0,children:z}),!H&&!W&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:re("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var Yo=ye(function({entries:x,renderTurn:W,scrollElement:n,sessionKey:b,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},H){let _=s(null),[U,m]=F(z),T=L!==void 0&&L!==null;w(()=>{let e=_.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[T]);let d=ne(()=>he.get(b),[b]),[j,J]=F(()=>d?.turnHeightsByKey??{}),i=ne(()=>Xo({entries:x,gapPx:pe,measuredHeightsByKey:j,leadingInsetPx:T?U:z}),[x,j,T,U,z]),me=ne(()=>{let e=Fe({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:X,viewportHeightPx:V}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return vn({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,ie]=F(me),[y,oe]=F(V),[c,ue]=F(null),N=s(d?.distanceFromBottomPx??0),k=s(M),ae=s(i.turnKeys),l=s(j),S=s(i),se=s(i),P=s(new Map),v=s(null),C=s(null),E=s(null),D=s(new Map),Q=s(!1),ce=s(()=>{}),O=s(null),de=K(()=>{if(!h||n===null||v.current!==null||O.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=S.current.turnIndexByKey.get(r),B=g===void 0?a.height:S.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)O.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Y=s(de);Y.current=de;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=Fe({distanceFromBottomPx:o,layout:i,overscanCount:X,viewportHeightPx:t}),u=k.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(N.current=o,k.current=a,ae.current=i.turnKeys,oe(t),a!==u)ie(a)},[i]),A=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),fe=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Y.current();let r={...l.current,[t]:o};l.current=r,J(r)},[]),Z=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);D.current.set(r,u)}if(E.current!==null||D.current.size===0)return;E.current=requestAnimationFrame(()=>{E.current=null;let t=[...D.current].filter(([r,u])=>l.current[r]!==u);if(D.current.clear(),t.length===0)return;Y.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,J(o)})}),C.current},[]),xe=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)Z().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),Z().observe(t)},[Z]);ge(()=>()=>{if(C.current?.disconnect(),E.current!==null)cancelAnimationFrame(E.current);D.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{ce.current=()=>{if(n===null)return;let e=A(n);if(v.current!==null){N.current=e,oe(n.clientHeight||V);return}p(e,n.clientHeight||V)}},[A,n,p]),w(()=>{if(n===null)return;if(!Q.current){Q.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?S.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>ce.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,J(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=ti({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||V),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ue(null)})},[i,c,n,p]),w(()=>{let e=se.current;if(se.current=i,S.current=i,n===null||c!==null){O.current=null;return}let t=O.current;O.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(A(n),n.clientHeight);return}let r=N.current;if(h&&e!==i&&Q.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=A(n);if(u<=96&&!h){p(u,y);return}let a=Fe({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=Jo({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,A,n,p,y,h]),w(()=>{k.current=M},[M]),ge(()=>()=>{v.current?.complete(),v.current=null;let e=k.current,o=S.current.turnKeys[e.startIndex];he.set(b,{distanceFromBottomPx:N.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[b]),ve(H,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=ei({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=Fe({distanceFromBottomPx:a,layout:i,overscanCount:X,viewportHeightPx:y});return k.current=g,ie(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ue(f)})}}),[i,y]);let I=M,G=ae.current;if(!(G===i.turnKeys||G.length===i.turnKeys.length&&G.every((e,t)=>e===i.turnKeys[t]))){let e=G[M.startIndex];I=(e===void 0?null:vn({anchorKey:e,layout:i,previousRange:M}))??Fe({distanceFromBottomPx:N.current,layout:i,overscanCount:X,viewportHeightPx:y})}let ee=x.length-1,le=x[ee],te=x.slice(I.startIndex,Math.min(I.endIndex,ee)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(le!==void 0)te.push({entry:le,index:ee});return re("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":te.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[T&&R("div",{ref:_,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),te.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(Re,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:xe,onReady:fe,children:W(e,t)})},e.turnKey))]})});
|
|
2
|
+
export{Yo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var ya=280;function Xo({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function Fe({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function vn({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function Jo({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function ei({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function ti({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{ya,Xo,Fe,vn,Jo,ei,ti};
|