@alwith/module-chat 0.6.14 → 0.6.16
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/assets/provider-catalog.json +3 -9
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.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-ta71ve6k.js → chunk-00z352ph.js} +2 -2
- package/dist/{chunk-8gc78fh3.js → chunk-0307kp7e.js} +1 -1
- package/dist/{chunk-vc43akb6.js → chunk-04vnhbvc.js} +1 -1
- package/dist/{chunk-rfrr4xbt.js → chunk-05eg5p11.js} +2 -2
- package/dist/{chunk-c8szpswj.js → chunk-07fajk18.js} +2 -2
- package/dist/{chunk-v8c2tsnr.js → chunk-0yqb54zg.js} +2 -2
- package/dist/{chunk-y14r7906.js → chunk-11cbk1je.js} +2 -2
- package/dist/{chunk-dz6gv1k8.js → chunk-11z072sz.js} +2 -2
- package/dist/{chunk-ar7pyb7s.js → chunk-1e7gk302.js} +2 -2
- package/dist/{chunk-g6j0f6nq.js → chunk-1renytb3.js} +3 -3
- package/dist/chunk-2drcx544.js +2 -0
- package/dist/{chunk-txvxq7hy.js → chunk-2pahy4hs.js} +2 -2
- package/dist/{chunk-gmtjagqw.js → chunk-2ptyqcf3.js} +2 -2
- package/dist/{chunk-hy66kdet.js → chunk-2ss8m0ja.js} +3 -3
- package/dist/chunk-2sxxr6j8.js +2 -0
- package/dist/chunk-2tc9kn50.js +2 -0
- package/dist/{chunk-fk71dmx0.js → chunk-3174p320.js} +2 -2
- package/dist/{chunk-yn1rck7n.js → chunk-3h3cmjh2.js} +2 -2
- package/dist/chunk-3karja82.js +2 -0
- package/dist/{chunk-j3svczsr.js → chunk-3t5cksae.js} +2 -2
- package/dist/{chunk-cwfj3w5c.js → chunk-3yq0a0f1.js} +2 -2
- package/dist/{chunk-440eq9v5.js → chunk-41v0g6sw.js} +2 -2
- package/dist/{chunk-2pg50r36.js → chunk-4dabfz24.js} +3 -3
- package/dist/{chunk-h5ehjay8.js → chunk-4gq7ye1a.js} +2 -2
- package/dist/{chunk-t9sgtnge.js → chunk-4hz2ax5w.js} +2 -2
- package/dist/{chunk-b6fs77p0.js → chunk-4jy404m1.js} +2 -2
- package/dist/{chunk-te33zs6y.js → chunk-4n4gap45.js} +2 -2
- package/dist/{chunk-hw6d7q50.js → chunk-4qghztvg.js} +2 -2
- package/dist/{chunk-fwx30jk5.js → chunk-4zz6dnqa.js} +2 -2
- package/dist/{chunk-ryfqa1bc.js → chunk-5m45z6qm.js} +4 -4
- package/dist/{chunk-camsks19.js → chunk-5wsyenq9.js} +2 -2
- package/dist/{chunk-7f35yy1n.js → chunk-5ygdb72w.js} +2 -2
- package/dist/{chunk-b5ba1vak.js → chunk-5ymq8y72.js} +2 -2
- package/dist/{chunk-59rxa4rt.js → chunk-620q6hmz.js} +2 -2
- package/dist/{chunk-6e3g436k.js → chunk-6283nzqs.js} +2 -2
- package/dist/{chunk-61ehrk7x.js → chunk-64wzvf7k.js} +2 -2
- package/dist/{chunk-t0e7gk7y.js → chunk-6es8tgxc.js} +2 -2
- package/dist/{chunk-mb9h6s08.js → chunk-6xds0dkq.js} +2 -2
- package/dist/{chunk-9a72hk73.js → chunk-7cv512vy.js} +2 -2
- package/dist/{chunk-mhka64tj.js → chunk-7eqtvqrn.js} +2 -2
- package/dist/{chunk-qm7vegrj.js → chunk-7h3f7s97.js} +5 -5
- package/dist/{chunk-kg10wznr.js → chunk-7hwg9r4y.js} +1 -1
- package/dist/{chunk-cxhyh0w9.js → chunk-7nehhgej.js} +2 -2
- package/dist/chunk-856bck34.js +2 -0
- package/dist/{chunk-twxn29aq.js → chunk-8weq6t3q.js} +2 -2
- package/dist/{chunk-0zmt1z4x.js → chunk-9072bnjm.js} +2 -2
- package/dist/chunk-95n1cpnj.js +2 -0
- package/dist/{chunk-j85kej5x.js → chunk-97tgc9ym.js} +2 -2
- package/dist/{chunk-602grjva.js → chunk-9eme3n5c.js} +2 -2
- package/dist/chunk-9h77fcpn.js +2 -0
- package/dist/{chunk-060xywt5.js → chunk-9hmqa3cs.js} +2 -2
- package/dist/{chunk-vk4xkyhw.js → chunk-9pcx42v8.js} +2 -2
- package/dist/{chunk-c6zsjmmj.js → chunk-9rf3qecr.js} +2 -2
- package/dist/chunk-9rvf1am9.js +2 -0
- package/dist/{chunk-9cjwy7mn.js → chunk-9xhw5zmq.js} +2 -2
- package/dist/{chunk-hnh4907d.js → chunk-9z9jffth.js} +2 -2
- package/dist/{chunk-sntvq6zv.js → chunk-a1k3ffay.js} +2 -2
- package/dist/{chunk-v4z2kexv.js → chunk-adc8e01w.js} +2 -2
- package/dist/{chunk-7qq2hj62.js → chunk-avpdhhdz.js} +3 -3
- package/dist/{chunk-9hed1d4c.js → chunk-b9q9d2jh.js} +3 -3
- package/dist/{chunk-abp8zh77.js → chunk-bnpwhf5c.js} +2 -2
- package/dist/{chunk-7rd487pt.js → chunk-bqbpded2.js} +2 -2
- package/dist/{chunk-6kh62x8f.js → chunk-bsra0akd.js} +2 -2
- package/dist/{chunk-mgedgmps.js → chunk-csgkwny6.js} +2 -2
- package/dist/chunk-ct0xqakr.js +2 -0
- package/dist/chunk-d1n4w7hn.js +2 -0
- package/dist/{chunk-wht615am.js → chunk-dcevaazr.js} +2 -2
- package/dist/{chunk-86gk0v56.js → chunk-ehmdmfs5.js} +2 -2
- package/dist/{chunk-p32m85v1.js → chunk-ev9tkjgy.js} +3 -3
- package/dist/{chunk-1y8s1zmh.js → chunk-ex20n22v.js} +2 -2
- package/dist/{chunk-ydqr81rv.js → chunk-f2jc13bq.js} +2 -2
- package/dist/chunk-fd72zzqm.js +4 -0
- package/dist/chunk-fjk1g303.js +2 -0
- package/dist/chunk-fjseqvmx.js +1 -0
- package/dist/{chunk-37a8v8sd.js → chunk-fvz27k62.js} +2 -2
- package/dist/{chunk-rjqtw4zf.js → chunk-gbc31gbf.js} +2 -2
- package/dist/{chunk-kwnznjqg.js → chunk-gee5kh24.js} +2 -2
- package/dist/{chunk-sbyj2adb.js → chunk-gez0k8zs.js} +5 -5
- package/dist/chunk-gjfhvaxn.js +2 -0
- package/dist/{chunk-pamcdn3d.js → chunk-gk0tq3n9.js} +2 -2
- package/dist/{chunk-qdhdt0hb.js → chunk-gxjg94y5.js} +2 -2
- package/dist/{chunk-z1j2c9r4.js → chunk-h3xn4d48.js} +2 -2
- package/dist/{chunk-9kn9jafp.js → chunk-h4xxyhpn.js} +3 -3
- package/dist/{chunk-che3097s.js → chunk-ha5xrc0a.js} +2 -2
- package/dist/chunk-hmet2d96.js +2 -0
- package/dist/{chunk-raxtm3ej.js → chunk-hn6f6yrp.js} +2 -2
- package/dist/{chunk-4wb9xn39.js → chunk-hqykt9hr.js} +2 -2
- package/dist/{chunk-esrm0762.js → chunk-hwvr7b0j.js} +2 -2
- package/dist/{chunk-jayj7jn1.js → chunk-j5njgy7p.js} +2 -2
- package/dist/{chunk-1eyzjfc7.js → chunk-j6r44m9g.js} +2 -2
- package/dist/{chunk-dqntm4yy.js → chunk-j9snfndd.js} +2 -2
- package/dist/chunk-jz6zecb7.js +2 -0
- package/dist/{chunk-p8pj4pkf.js → chunk-k86843av.js} +2 -2
- package/dist/{chunk-nfsz18j1.js → chunk-kcra1mgf.js} +2 -2
- package/dist/chunk-kp7qa98m.js +2 -0
- package/dist/{chunk-ndrpfbe1.js → chunk-ktbszx6r.js} +2 -2
- package/dist/{chunk-p9vk6dds.js → chunk-m2x1s408.js} +2 -2
- package/dist/{chunk-wamhc02v.js → chunk-mgsxsaj1.js} +2 -2
- package/dist/{chunk-915dk3fj.js → chunk-mhxgws9c.js} +2 -2
- package/dist/{chunk-5t4egv96.js → chunk-n13y99dj.js} +2 -2
- package/dist/{chunk-kthwyebf.js → chunk-ncwf6pjj.js} +3 -3
- package/dist/{chunk-c98q3k3j.js → chunk-netp71kb.js} +2 -2
- package/dist/{chunk-yg0xnvde.js → chunk-nh9gk065.js} +2 -2
- package/dist/{chunk-b5przf89.js → chunk-nszq1xrj.js} +2 -2
- package/dist/chunk-nxj8m5bm.js +2 -0
- package/dist/chunk-p0d6rr6q.js +2 -0
- package/dist/chunk-pn5ghg65.js +2 -0
- package/dist/{chunk-36qcq9j0.js → chunk-pvd09dx5.js} +2 -2
- package/dist/{chunk-yz8dtdk0.js → chunk-pwcw4zp2.js} +2 -2
- package/dist/chunk-q1kstf4c.js +2 -0
- package/dist/{chunk-mh566s9g.js → chunk-q2z9w661.js} +2 -2
- package/dist/{chunk-n27z019x.js → chunk-q3vvg0de.js} +2 -2
- package/dist/{chunk-nh9kfjss.js → chunk-qdgsg6v4.js} +2 -2
- package/dist/chunk-qkw2nhsr.js +4 -0
- package/dist/{chunk-4e8rwzhz.js → chunk-qm1z1zcw.js} +2 -2
- package/dist/{chunk-rd4yhfs7.js → chunk-qnbr2cmg.js} +2 -2
- package/dist/{chunk-kmn45zqk.js → chunk-qtft8hnb.js} +2 -2
- package/dist/{chunk-k0mcp7wa.js → chunk-qwtmwj5m.js} +2 -2
- package/dist/chunk-rncx5gxz.js +2 -0
- package/dist/{chunk-c5gzxgfp.js → chunk-s5c2ha8t.js} +2 -2
- package/dist/{chunk-46ty0q9n.js → chunk-sct2h2dm.js} +2 -2
- package/dist/{chunk-ndy5kjpz.js → chunk-segftqt4.js} +2 -2
- package/dist/{chunk-1cm0r042.js → chunk-sg681jnt.js} +3 -3
- package/dist/{chunk-ddkh0qey.js → chunk-sp411z4y.js} +4 -4
- package/dist/{chunk-mwwas9bw.js → chunk-sqm2vsf5.js} +1 -1
- package/dist/chunk-t4dsmqdq.js +2 -0
- package/dist/{chunk-cg8nrtjv.js → chunk-t94rfs41.js} +2 -2
- package/dist/{chunk-4sneycqc.js → chunk-t96rf4pg.js} +2 -2
- package/dist/{chunk-abvawet2.js → chunk-thhtbvj1.js} +2 -2
- package/dist/{chunk-wkbxdz82.js → chunk-tjfjvzv5.js} +2 -2
- package/dist/{chunk-3435g0ft.js → chunk-tkbs5ev1.js} +2 -2
- package/dist/{chunk-cy35nmk9.js → chunk-trh02gwn.js} +2 -2
- package/dist/chunk-tvbgjmtw.js +3 -0
- package/dist/{chunk-q1mbkntx.js → chunk-twbeapwa.js} +2 -2
- package/dist/{chunk-yd9962fa.js → chunk-twx75z08.js} +2 -2
- package/dist/{chunk-pyrza100.js → chunk-tz8wmvs9.js} +2 -2
- package/dist/{chunk-t1ys4wak.js → chunk-v0y5fepf.js} +3 -3
- package/dist/chunk-vctq22tq.js +2 -0
- package/dist/{chunk-nhs4dy9n.js → chunk-veb90k24.js} +2 -2
- package/dist/{chunk-szrdzr1d.js → chunk-vepv6ktb.js} +2 -2
- package/dist/{chunk-sqt4g5nd.js → chunk-vextf7ba.js} +2 -2
- package/dist/chunk-vjmgh1q9.js +2 -0
- package/dist/{chunk-3gms312w.js → chunk-vkc8ssbv.js} +2 -2
- package/dist/chunk-vmg3evhm.js +2 -0
- package/dist/{chunk-fmwxhswe.js → chunk-vnr9rqs6.js} +3 -3
- package/dist/{chunk-af90c0vz.js → chunk-vqkwvrxc.js} +2 -2
- package/dist/{chunk-0kc5bhjv.js → chunk-vypkwd0x.js} +2 -2
- package/dist/{chunk-q53qh3sx.js → chunk-w22ch68s.js} +2 -2
- package/dist/{chunk-8qr01fzq.js → chunk-wdacgfwp.js} +2 -2
- package/dist/{chunk-mp6va3k2.js → chunk-wv127h6d.js} +2 -2
- package/dist/{chunk-jj460s9n.js → chunk-wyndwb68.js} +2 -2
- package/dist/{chunk-t2h1wgvg.js → chunk-x0h0g1ma.js} +2 -2
- package/dist/{chunk-yksyxg7r.js → chunk-x6f51rt2.js} +2 -2
- package/dist/{chunk-9bzz1801.js → chunk-xbp4r3n4.js} +3 -3
- package/dist/{chunk-eezcnm8y.js → chunk-xmks1g9y.js} +2 -2
- package/dist/{chunk-d7jpv1at.js → chunk-xmpaqxer.js} +2 -2
- package/dist/{chunk-vhdzdzf0.js → chunk-xqwbn2ph.js} +2 -2
- package/dist/{chunk-rkbdgfgs.js → chunk-xtwpbvdx.js} +2 -2
- package/dist/{chunk-j63fnn73.js → chunk-y1fpm5r2.js} +1 -1
- package/dist/{chunk-6ax3abjj.js → chunk-y6kxhkjm.js} +2 -2
- package/dist/{chunk-8r53axab.js → chunk-y7n8m9st.js} +2 -2
- package/dist/{chunk-r7ddbf5n.js → chunk-yaxsff9s.js} +2 -2
- package/dist/chunk-yy1pm240.js +2 -0
- package/dist/{chunk-1vnw2sgz.js → chunk-z38xf1rw.js} +3 -3
- package/dist/{chunk-485y3k93.js → chunk-z7ehwkcq.js} +2 -2
- package/dist/{chunk-1a741cjb.js → chunk-zah0npdy.js} +2 -2
- package/dist/{chunk-0d2frj7b.js → chunk-zcwsc0gx.js} +2 -2
- package/dist/{chunk-01qqfj91.js → chunk-zq18ffn0.js} +2 -2
- package/dist/client.js +1 -1
- 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/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-presentation.d.ts +2 -0
- package/dist/composer/menu-presentation.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.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.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/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.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -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.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.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/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/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-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/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-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.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/darwin-arm64/THIRD_PARTY_NOTICES.md +2 -2
- package/native/darwin-arm64/artifact.json +1 -1
- package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
- package/native/win32-x64/THIRD_PARTY_NOTICES.md +2 -2
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +1 -1
- package/dist/chunk-0xcspxsx.js +0 -2
- package/dist/chunk-31ecwv4k.js +0 -4
- package/dist/chunk-3qabfreh.js +0 -2
- package/dist/chunk-5347w553.js +0 -4
- package/dist/chunk-5tvysr2s.js +0 -2
- package/dist/chunk-881sxqxf.js +0 -2
- package/dist/chunk-89nc6p3f.js +0 -2
- package/dist/chunk-8arntrcm.js +0 -3
- package/dist/chunk-8sckf8ey.js +0 -2
- package/dist/chunk-ac5wmxwh.js +0 -2
- package/dist/chunk-cdwhf4a8.js +0 -2
- package/dist/chunk-gg7ar09k.js +0 -2
- package/dist/chunk-jbw1dmrg.js +0 -2
- package/dist/chunk-myjx503j.js +0 -2
- package/dist/chunk-pj42memd.js +0 -2
- package/dist/chunk-pmdpwwx5.js +0 -2
- package/dist/chunk-qfwy13e3.js +0 -2
- package/dist/chunk-rfp26vx1.js +0 -2
- package/dist/chunk-t31w04yq.js +0 -2
- package/dist/chunk-teb81g3n.js +0 -2
- package/dist/chunk-v12aj1ee.js +0 -2
- package/dist/chunk-vmmebfqv.js +0 -2
- package/dist/chunk-vncrqvge.js +0 -2
- package/dist/chunk-wn0eg5m8.js +0 -2
- package/dist/chunk-wwpv3gc3.js +0 -2
- package/dist/chunk-y6993bfz.js +0 -2
- package/dist/chunk-z7ssj61m.js +0 -2
- package/dist/chunk-zhxjp4tt.js +0 -2
- package/dist/chunk-zktqmha9.js +0 -1
- /package/native/darwin-arm64/licenses/{libsqlite3-sys-0.39.1 → libsqlite3-sys-0.40.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{rusqlite-0.41.1 → rusqlite-0.42.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{libsqlite3-sys-0.39.1 → libsqlite3-sys-0.40.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{rusqlite-0.41.1 → rusqlite-0.42.0}/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{gi}from"./chunk-hn6f6yrp.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function mi(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await gi(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
|
|
2
|
+
export{mi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{me}from"./chunk-620q6hmz.js";function x(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function bt(e){if(!e.includes("app://"))return[];let n=me(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=x(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Sa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function gr(e,n){return[Sa(n),e.trim()].filter(Boolean).join(" ")}function fr(e,n){let r=Sa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
+
export{x,bt,Sa,gr,fr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{N}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{N}from"./chunk-netp71kb.js";import{a}from"./chunk-3t5cksae.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as s}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 Br({children:p}){let{t:n}=a(),[o,l]=s(!1),r=c(null),[u,d]=s();return N(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}l(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:u},children:p})]})}
|
|
2
|
+
export{Br};
|
|
@@ -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 fo(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 Tt(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(fo(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{fo,Tt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var et="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function zt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(et))n()}),[e]);return d(t,()=>o(e.get(et)))}async function Vt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[et])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[et]:i}})}
|
|
2
|
+
export{et,zt,Vt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function ei(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function An(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ve(t){return t.type==="array"}function mn(t){return(Ve(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{ei,An,Ve,mn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Oi}from"./chunk-gbc31gbf.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function Hi(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Oi(a,r)}
|
|
2
|
+
export{Hi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function Vi(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
|
|
2
|
+
export{Vi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{d}from"./chunk-s5c2ha8t.js";import{cn as o}from"cn";import{motion as v}from"motion/react";import{jsx as i,jsxs as g}from"react/jsx-runtime";function Je({active:n,expanded:r=!1,highlight:s=!0,className:a,...l}){return i("button",{type:"button","data-active":n?"":void 0,"aria-current":n?"page":void 0,className:o(s&&d,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)]":"size-[var(--navigation-row-height,30px)]",a),...l})}function jr({tabs:n,view:r,onViewChange:s,onReset:a,notifications:l,trailing:p,className:u}){return g("div",{className:o("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",u),children:[i("div",{role:"tablist",className:"bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-52 flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]",children:n.map((e)=>{let t=r===e.key;return g(Je,{role:"tab",active:t,expanded:t,highlight:!1,"aria-selected":t,title:e.title,onClick:()=>s(e.key),onDoubleClick:a&&(()=>a(e.key)),className:o("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-[18px] [&_svg]:shrink-0",t?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[t&&i(v.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-destructive pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:o("relative z-10 grid",t?"ms-1.5 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})}),p!=null&&i("div",{className:"ms-auto flex shrink-0 items-center gap-0.5",children:p})]})}
|
|
2
|
+
export{Je,jr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function kn({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{kn};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e}from"./chunk-yz8dtdk0.js";import{Ut}from"./chunk-yd9962fa.js";import{K,Qe,Y,Et}from"./chunk-jbw1dmrg.js";import{Mt,At}from"./chunk-c8szpswj.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as j}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as O,FieldDescription as de,FieldLabel as _}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as H,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as Q}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as X}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function ho({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,V(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(X,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function Ar({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=At(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(K[0]?.id??""),[F,U]=y(0),[z,M]=y({}),J=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)M((L)=>{let G={...L};return delete G[r.id],G});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(M((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else M((a)=>{let L={...a};return delete L[r.id],L}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},E=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(K[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},B=async()=>{p("retry");try{let o=await Mt(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=K.find((o)=>o.id===x)??null,A=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||P||A)return;k(K[0]?.id??"")},[c,x,P,A]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Ut,{bridge:d})]}),C&&t(ho,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void B(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(vo,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),K.map((o)=>t("div",{hidden:x!==o.id,children:t(xo,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>J(r,o,f),testResult:z[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(bn,{provider:o,revision:c.revision,busy:b!==null,testResult:z[o.id],onTest:()=>I(o.id),onRemove:()=>E(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(bn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{U((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function vo({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[K.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:j("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:j("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:j("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function yo({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(yo,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function xo({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,U]=y(Y(s,d?.region)?.id),[z,M]=y(d?.base_url??""),J=s.logo,I=d!==null,T=c.trim(),E=Et(s,F),B=F!==Y(s,x.saved?.region)?.id,P=z.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&T===""&&!B&&!P)k({saved:d,revision:u}),U(Y(s,d?.region)?.id),M(d?.base_url??"")},[u,d,s,x.revision,T,B,P]);let A=!v&&(T!==""||B||P),o=`${s.id}-api-key`,r=async(a)=>{let L=c,G=F,m=await C(x.revision,a);if(!m)return;let D=m.providers[s.id]??null;k({saved:D,revision:m.revision}),w((g)=>g===L?"":g),U((g)=>g===G?Y(s,D?.region)?.id:g),M((g)=>g===z?D?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:z.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(J,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>U(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(O,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(_,{htmlFor:o,children:n("provider.apiKey")}),E!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(E)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(H,{children:[t(q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&A)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(O,{className:"gap-2",children:[t(_,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(H,{children:t(q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:Y(s,F)?.baseUrl??s.baseUrl,value:z,onChange:(a)=>M(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!A,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!A?S:void 0,children:i(R,{size:"sm",disabled:!A,onClick:f,children:[v&&t(X,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function bn({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[U,z]=y(s===null),[M,J]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
1
|
+
import{e}from"./chunk-pwcw4zp2.js";import{Lt}from"./chunk-twx75z08.js";import{q,Ye,X,Dt}from"./chunk-q1kstf4c.js";import{At,Et}from"./chunk-07fajk18.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as J}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as j,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as D,FieldDescription as de,FieldLabel as O}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as W,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as H}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as Q}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function V(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(V(d));if(s.reportError)s.reportError(u);else console.error(u)}}function wo({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,j(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),j(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(V(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function $r({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=Et(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(q[0]?.id??""),[F,B]=y(0),[U,A]=y({}),_=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)A((M)=>{let L={...M};return delete L[r.id],L});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(A((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else A((a)=>{let M={...a};return delete M[r.id],M}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},z=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(q[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await At(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=q.find((o)=>o.id===x)??null,E=c?.customProviders.find((o)=>o.id===x)??null;return j(()=>{if(!c||x==="new"||P||E)return;k(q[0]?.id??"")},[c,x,P,E]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Lt,{bridge:d})]}),C&&t(wo,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(ko,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),q.map((o)=>t("div",{hidden:x!==o.id,children:t(_o,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>_(r,o,f),testResult:U[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(Sn,{provider:o,revision:c.revision,busy:b!==null,testResult:U[o.id],onTest:()=>I(o.id),onRemove:()=>z(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(Sn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{B((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function ko({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[q.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:J("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:J("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:J("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function So({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(So,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function _o({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,B]=y(X(s,d?.region)?.id),[U,A]=y(d?.base_url??""),_=s.logo,I=d!==null,T=c.trim(),z=Dt(s,F),K=F!==X(s,x.saved?.region)?.id,P=U.trim()!==(x.saved?.base_url??"");j(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),B(X(s,d?.region)?.id),A(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let E=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let M=c,L=F,m=await C(x.revision,a);if(!m)return;let G=m.providers[s.id]??null;k({saved:G,revision:m.revision}),w((g)=>g===M?"":g),B((g)=>g===L?X(s,G?.region)?.id:g),A((g)=>g===U?G?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:U.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(_,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>B(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(O,{htmlFor:o,children:n("provider.apiKey")}),z!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(z)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(W,{children:[t(H,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&E)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(D,{className:"gap-2",children:[t(O,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(W,{children:t(H,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:X(s,F)?.baseUrl??s.baseUrl,value:U,onChange:(a)=>A(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!E,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!E?S:void 0,children:i(R,{size:"sm",disabled:!E,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function Sn({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[B,U]=y(s===null),[A,_]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
2
2
|
{ "label": "My Model", "api_id": "model-id" }
|
|
3
|
-
]`),[
|
|
4
|
-
export{
|
|
3
|
+
]`),[z,K]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),E=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),M=(m)=>{if(!m)try{_(Ye(I)),K(null)}catch(G){K(V(G));return}U(m)},L=async()=>{let m;try{m=Ye(I),K(null)}catch(g){K(V(g)),U(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(ie,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[t(O,{htmlFor:E,children:n("provider.name")}),t(ee,{id:E,value:h,onChange:(m)=>c(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:o,children:n("provider.baseUrl")}),t(ee,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:r,children:n("provider.apiKey")}),i(W,{children:[t(H,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(ne,{}):t(oe,{})})})]})]})]}),t(Q,{}),i(re,{open:B,onOpenChange:M,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(B?"provider.previewModels":"provider.editModels"),t(se,{className:J("size-4",B&&"rotate-180")})]})]}),!B&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:A.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(ae,{children:i(D,{className:"gap-2","data-invalid":z!==null,children:[t(O,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":z!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),K(null)}}),t(de,{id:`${f}-description`,className:J("text-xs",z&&"text-destructive"),role:z?"alert":void 0,children:z??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void L(),children:[u&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
|
|
4
|
+
export{wo,$r,ko,So,_o,Sn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var es=["full","compact","codexUI"];function Bi(t){return t==="compact"||t==="codexUI"}var La=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function J(t){let o=La.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ts(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{es,Bi,La,J,ts};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ce}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{ce}from"./chunk-5ygdb72w.js";import{U,pi}from"./chunk-5wsyenq9.js";import{t}from"./chunk-xqwbn2ph.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function zo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=ce(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(U,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(pi,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{zo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function de({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
|
|
2
|
+
export{de};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ri(e,t){if(t===0)return null;let r=t-1;while(r>=0){let n=e[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":e[r-1],a=r===0||i===`
|
|
3
3
|
`||i===" "||i==="\t",s=a||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i??"");if(n==="/"?s&&!/[/\\]/.test(e.slice(r+1,t)):a)return{kind:n==="/"?"slash":"at",start:r,end:t,query:e.slice(r+1,t)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function sr({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{sr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c}from"./chunk-95n1cpnj.js";import{B,G,z,V}from"./chunk-fjseqvmx.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function ge({skills:l=!1}){let{t:o}=c();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(V,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(z,{children:e(s,{className:"size-10 rounded-xl"})}),a(G,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(B,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
|
|
2
|
+
export{ge};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c,i}from"./chunk-95n1cpnj.js";import{b}from"./chunk-d924by6g.js";import{F}from"./chunk-j6r44m9g.js";import{he}from"./chunk-rncx5gxz.js";import{j,ve,ye}from"./chunk-qnbr2cmg.js";import{ExternalLinkIcon as M,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 s,Fragment as L}from"react/jsx-runtime";function Pt({entry:o,onBack:p}){let u=c(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),O=i((a)=>a.install),T=i((a)=>a.uninstall),H=i((a)=>a.setPluginEnabled),[n,B]=y(null),[D,U]=y(null),[V,R]=y(0),[r,I]=y(null);_(()=>{let a=!0;return U(null),B(null),P(o).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,V]);let d=n?.summary??o.plugin,m=C?.plugin??d,t=d.interface,h=t?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",z=t?.longDescription??n?.description??t?.shortDescription,E=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(ye,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("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:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(F,{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:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(L,{children:[e(X,{checked:m.enabled,disabled:!!v||k,"aria-label":l(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void H(m,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void T(m),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(k?"plugins.detail.unavailable":"plugins.detail.install"),title:l(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||k,onClick:()=>void O({...o,plugin:d}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(b,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${j} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.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))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(m.localVersion??m.version)&&e(x,{label:l("plugins.detail.version"),children:m.localVersion??m.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("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:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(A,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(F,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(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(F,{name:a.name,className:"size-8"}),s("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))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("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:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:r!==null,onOpenChange:(a)=>{if(!a)I(null)},children:e(G,{className:ve,children:r&&s(L,{children:[e("div",{className:"shrink-0 pr-8",children:e(F,{name:r.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]}),e(he,{path:r.path,description:r.description},r.path??r.name)]})]})})})]})}function x({label:o,children:p}){return s("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:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",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:o,label:p}){let{openLink:u}=c();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
|
|
2
|
+
export{Pt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M}from"./chunk-fzze5xcw.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{M}from"./chunk-fzze5xcw.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function ai({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(M,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-xqwbn2ph.js";import{pn,e,y}from"./chunk-pwcw4zp2.js";import{Yt}from"./chunk-h4xxyhpn.js";import{dn}from"./chunk-ha5xrc0a.js";import{Jt}from"./chunk-q3vvg0de.js";import{Wt,Zt}from"./chunk-v0y5fepf.js";import{Qt}from"./chunk-zq18ffn0.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function ca({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:Wt},[t]);return i(pn,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r(Zt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),u=()=>y(d,R.open(t.id,t.cwd)),x=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!x&&r(Jt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(C,{children:[r(k,{}),r(h,{children:n("conversation.stopped")}),r(N,{children:r(w,{size:"sm",variant:"outline",onClick:u,children:n("conversation.reconnect")})})]})}),x?E??r(M,{className:"flex-1",children:i(z,{children:[r(B,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(P,{children:n("conversation.welcomeDescription")})]})}):r(dn,{session:t,timeline:m}),r(Qt,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(h,{children:n("conversation.readOnlyTitle")}),r(N,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:u,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??r(Yt,{session:t})]}),T]})}
|
|
2
|
+
export{ca};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function A(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function A(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function so(e,n){return JSON.stringify(["request_user_input_async",e,n])}function hr(e){return{selected:e.options?.length?0:null,text:""}}function vn(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function vr(e){return`<send_user_message_question_reply>
|
|
2
2
|
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function
|
|
4
|
-
export{A,
|
|
3
|
+
</send_user_message_question_reply>`}function lo(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function yr({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:C,t:u}){let g=R(),h=b(!1),a=b(null);v(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",N=o==="answered"||o==="skipped",f=e.options??[],w=l&&vn(e,n).trim().length>0,Q="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:N?c(_,{children:[i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:u("asyncQuestion.skipped")})]}):c(r.Root,{items:f.length>0?[{name:"answer",choices:[...f.map((s,d)=>({value:String(d)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),w)x()},children:[c(r.Item,{name:"answer",className:"m-0 flex min-w-0 flex-col gap-3 border-0 p-0",children:[i(r.Title,{render:i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),f.length>0&&c(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[f.map((s,d)=>c(r.Choice,{value:String(d),checked:n.selected===d,onChange:()=>l&&y({...n,selected:d}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{className:"whitespace-pre-wrap",children:s})]},d)),c(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&y({...n,selected:null}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{children:u("asyncQuestion.other")})]})]}),i(r.Input,{render:i(S,{rows:1,className:"min-h-0 resize-none"}),onCompositionStart:()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null,h.current=!0},onCompositionEnd:()=>{if(h.current=!1,a.current!==null)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{a.current=null})},onKeyDown:(s)=>{if(s.key==="Enter")s.stopPropagation();if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||h.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&vn(e,{...n,text:s.currentTarget.value}).trim().length>0)x()},"aria-label":u("asyncQuestion.answer"),placeholder:u("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>y({selected:null,text:s.target.value})}),m&&i("p",{role:"alert",className:"text-destructive text-sm",children:m})]}),c("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(k,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(k,{size:"sm",variant:"ghost"}),disabled:!l,onClick:C,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{A,so,hr,vn,vr,lo,yr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function xe({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
|
|
2
|
+
export{xe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=(e)=>String(e).padStart(2,"0");function
|
|
2
|
-
export{
|
|
1
|
+
var a=(e)=>String(e).padStart(2,"0");function vt(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
|
|
2
|
+
export{vt};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{je}from"./chunk-wv127h6d.js";import{ri}from"./chunk-bsra0akd.js";import{l}from"./chunk-6283nzqs.js";import{ce}from"./chunk-5ygdb72w.js";import{autoUpdate as ot}from"@floating-ui/dom";import{cn as rt}from"cn";import{BookOpenIcon as st,FileIcon as it,SquareSlashIcon as at,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as ct}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as mt}from"react/jsx-runtime";function oi({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=ce(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>z&&s.startsWith("!")?null:ri(s,K),[s,K,z]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,et]=g(H);if(tt!==H)et(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return je(q,o.query);if(i)return je(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
|
|
2
|
+
`)?s:`${s}
|
|
3
|
+
`}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,nt]=g(null),C=ut(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return ot(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:nt,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?st:at:it;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:rt(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(mt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(lt,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?ct(J,document.body):J}
|
|
4
|
+
export{oi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pe}from"./chunk-s5c2ha8t.js";import{R}from"./chunk-aaqk0jrt.js";import{cn as n}from"cn";import{Item as i,ItemActions as B,ItemContent as G,ItemDescription as ie,ItemMedia as z,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function V({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function fe({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Pe,"data-[active=true]:font-medium",e),...r})}function _t({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(R,{children:t})})}export{B,G,ie,z,V,fe,_t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{yt}from"./chunk-sp411z4y.js";import{Ji,Yi,Xi}from"./chunk-qtft8hnb.js";import{Qi}from"./chunk-mhxgws9c.js";import{t}from"./chunk-xqwbn2ph.js";import{ue}from"./chunk-sct2h2dm.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Fa(i,n){return{installUnlock:n==="none"?()=>()=>{}:Yi,preload:()=>{if(n!=="none")Ji(i)},playSequence:(a,d,l)=>Xi(a,d,l,i,n)}}function Ki(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:ue(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(yt,{text:i.response,host:a})})]})}function qi(i){return r(Qi,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
+
export{Fa,Ki,qi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Oi(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{Oi};
|