@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{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-pwcw4zp2.js";import{zt,Vt}from"./chunk-9rf3qecr.js";import{Xe}from"./chunk-q1kstf4c.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Wr({providers:n,store:l}){let{t:m}=e().host,d=zt(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=Xe(s.id,o.api_id);return t(S,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function S({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Vt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
|
|
2
|
+
export{Wr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Cr(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function wr(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
|
|
2
|
+
export{Cr,wr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ke}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{ke}from"./chunk-j9snfndd.js";function bo(r){let s=ke(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function we(r){return bo(r).join(ke()?"":"+")}
|
|
2
|
+
export{bo,we};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{er}from"./chunk-wyndwb68.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function Qi({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(er,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
+
export{Qi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function
|
|
2
|
-
export{
|
|
1
|
+
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function Xt(t,o=50){return t.slice(0,o).map((e)=>{let r=a(e);return{key:r,label:e.path,payload:r,description:e.match_type==="directory"?"/":""}})}
|
|
2
|
+
export{Xt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{p,E}from"./chunk-f0kgxjp1.js";import{
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(Kn,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:c,time:i}):null,d=
|
|
3
|
-
export{
|
|
1
|
+
import{p,E}from"./chunk-f0kgxjp1.js";import{J}from"./chunk-b9q9d2jh.js";import{Ri}from"./chunk-t96rf4pg.js";import{de}from"./chunk-bqbpded2.js";import{Ui,ht}from"./chunk-gez0k8zs.js";import{Di}from"./chunk-5ymq8y72.js";import{oo}from"./chunk-4qghztvg.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(E,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(E,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(de,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function Xa({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:c,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),T=!t.streaming&&C.trim().length>0?o(Kn,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:c,time:i}):null,d=Ri(t.content,"compact"),x=d.reduce((e,a,l)=>a.kind==="codexActivityGroup"?l:e,-1),h=d.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&J(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((l)=>l.type!=="tool_use"||!s.has(l.name));return a.length===0?null:o(ht,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?d.length:h;return o(qn,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:d.slice(0,m).map(k),answer:d.length>m?d.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(Di,{blocks:f}):y(f))})}function Kn({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let c=p(),{t:u}=c;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(oo,{text:t,label:u("actions.copy"),host:c}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=p();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function qn({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...c}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(Ui,{...c,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
+
export{Xa,Kn,qn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as o,useContext as n,useEffect as r}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as o,useContext as n,useEffect as r}from"react";var Bo=o(null);function N(t){let e=n(Bo);r(()=>{if(t&&e!==null)return e()},[t,e])}
|
|
2
|
+
export{Bo,N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,s,n,g}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{a,s,n,g}from"./chunk-3t5cksae.js";import{H}from"./chunk-7eqtvqrn.js";import{I,ee,_e}from"./chunk-4jy404m1.js";import{Ce,K,re}from"./chunk-w22ch68s.js";import{Co}from"./chunk-j9snfndd.js";import{xe}from"./chunk-ex20n22v.js";import{be}from"./chunk-y6kxhkjm.js";import{we}from"./chunk-mgsxsaj1.js";import{Nt}from"./chunk-hqykt9hr.js";import{vo}from"./chunk-x6f51rt2.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as q}from"react/jsx-runtime";function M(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Or({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=a(),{t:N}=h,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=K((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&Ce({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:M(u,e)}]:[]}),[v,m,S,u]),b=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=K((t)=>t.activityCollapsedGroups),o=re(),L=b.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),x=(t)=>{if(w?.(t))return;d(t)},D=vo();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Co(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=L[r-1];if(!y)return;e.preventDefault(),x(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=L.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:k?.(t.sid),actions:R?.(t.sessionRow),hint:e<9&&D?c(G,{children:we(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(I,{children:b.map((t)=>t.key==="foreground"?c(I,{children:t.rows.map(A)},t.key):c(ee,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function T({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:m,hint:S}){let u=a(),v=s(),{t:p}=u,b=i.title??p("sessionList.untitled"),f=Nt(i.sessionId,d);return P(q,{children:[c(_e,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(be,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:b,preview:f,listeningPorts:R,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:h,hint:S,actions:c(xe,{title:p("sessionList.stop"),onStop:()=>g(u,v.stopSession(i.sessionId))})}),k.map((o)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(H,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
+
export{Or};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function
|
|
2
|
-
export{
|
|
1
|
+
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function ni(e=d){if(e.env.CLAUDE_CODE_SIMPLE&&["1","true","yes","on"].includes(e.env.CLAUDE_CODE_SIMPLE.toLowerCase()))throw Error("Claude OAuth is disabled by CLAUDE_CODE_SIMPLE");if(e.env.CLAUDE_CODE_CUSTOM_OAUTH_URL||e.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Custom Claude OAuth endpoints and descriptor credentials are not supported by the local-login reader");let r=e.env.CLAUDE_CODE_OAUTH_TOKEN;if(r!==void 0){if(!r.trim())throw Error("CLAUDE_CODE_OAUTH_TOKEN is empty");return{accessToken:r,expiresAt:null,scopes:["user:inference"],source:"environment"}}let t=e.env.CLAUDE_CONFIG_DIR;if(t==="")throw Error("CLAUDE_CONFIG_DIR is empty");let i=(t??u(e.home,".claude")).normalize("NFC");if(e.platform==="darwin"){let s=t===void 0?"":`-${new Bun.CryptoHasher("sha256").update(i).digest("hex").slice(0,8)}`,o=await e.keychain(`Claude Code-credentials${s}`,e.username());if(o!==null)return c(o,"keychain")}else if(e.platform!=="win32")throw Error(`Unsupported Claude login platform: ${e.platform}`);let n=await e.file(u(i,".credentials.json"));return n===null?null:c(n,"file")}async function ya(e=d,r=Date.now()){let t=await ni(e);if(!t)throw Error("No existing Claude subscription login; sign in through Claude Code or ALwith Desktop");if(t.expiresAt!==null&&t.expiresAt<=r+60000)throw Error("The existing Claude access token is expired or expiring; refresh it in the owning Claude Code or ALwith CLI before retrying");return t.accessToken}
|
|
2
|
+
export{ni,ya};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var O="collection-default";function te(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ue(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Kt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function ra(o,e=Ue()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{O,te,Ue,Kt,ra};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function L(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function Ba(i,t){return L(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var
|
|
2
|
-
export{L,Ba,
|
|
1
|
+
function L(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function Ba(i,t){return L(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var wt="inline-flex items-baseline gap-1 align-baseline whitespace-nowrap leading-[inherit] font-normal text-[color:var(--app-reference-foreground,var(--link))] select-all",br={command:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9"}]],skill:[["path",{d:"M12 5v16"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"}]],app:[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]]};
|
|
2
|
+
export{L,Ba,wt,br};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ee}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Ee}from"./chunk-xqwbn2ph.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function pn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Ee,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function y(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{pn,e,y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Eo,Ot,Ut,Bt,Gt}from"./chunk-x0h0g1ma.js";var a=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};var p={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var d=a,g={anthropic:Eo,deepseek:Ot,openrouter:Bt,qwen:Gt,xai:Ut};function m(e){let i=g[e];if(!i)throw Error(`Provider ${e} has no logo`);return i}var q=d.filter((e)=>e.source!=="account").map(({source:e,...i})=>({...i,logo:m(i.id)}));function No(e){return e!=null&&d.some((i)=>i.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(i.id)}:`))}function Ye(e){let i=JSON.parse(e);if(!Array.isArray(i)||i.length===0)throw Error("Add at least one model");let o=new Set;return i.map((n)=>{if(typeof n!=="object"||n===null||Array.isArray(n))throw Error("Each model must be an object");let t=n,r=typeof t.label==="string"?t.label.trim():"",s=typeof t.api_id==="string"?t.api_id.trim():"";if(r===""||s==="")throw Error("Model label and API ID cannot be empty");if(o.has(s))throw Error("Model IDs must be unique");if(o.add(s),t.contextWindow!==void 0&&t.contextWindow!==null&&(!Number.isSafeInteger(t.contextWindow)||t.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(t.description!==void 0&&typeof t.description!=="string")throw Error("Model description must be a string");return{label:r,api_id:s,...t.contextWindow===void 0?{}:{contextWindow:t.contextWindow},...t.description===void 0?{}:{description:t.description}}})}function Mo(e){return[...q.filter((i)=>e.providers[i.id]!==void 0).map((i)=>({id:i.id,name:i.name,models:i.models})),...[...e.customProviders,...e.managedProviders??[]].map((i)=>({id:i.id,name:i.name,models:i.models.map((o)=>({id:o.api_id,label:o.label,...o.description==null?{}:{description:o.description}}))}))]}function Xe(e,i){let o=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(n)=>n.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(o)}:${encodeURIComponent(i)}`}function Yr(e,i){let o=Mo(i).flatMap((n)=>n.models.map((t)=>Xe(n.id,t.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(No(e))throw Error("The selected ALwith account model is unavailable. Select another model before sending.");return o[0]??null}function X(e,i){if(!e.regions)return null;let o=e.regions.find((n)=>n.id===i)??e.regions[0];if(!o)throw Error(`Provider ${e.id} declares no regions`);return o}function Dt(e,i){return X(e,i)?.keyUrl??e.keyUrl??null}function Ht(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function Xr(e){let i=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!i)return null;let o=decodeURIComponent(i[1]),n=l.models.find((t)=>t.slug===o);return n?{value:n.default_reasoning_level,hidden:n.supported_reasoning_levels.length===0}:null}var Ao=p;function ea(e){return Ao[e]??{}}
|
|
2
|
+
export{q,No,Ye,Mo,Xe,Yr,X,Dt,Ht,Xr,Ao,ea};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function
|
|
2
|
-
export{
|
|
1
|
+
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function en(t,i,a,l){let e=p(()=>t.items.findLast((u)=>u.kind==="user"),[t.items]),n=JSON.stringify([t.id,m(e?._meta)]),[r,d]=c(null),o=l&&i&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!e?.replayed;return{text:o&&!a&&r!==n?s(t._meta):null,invalidate:()=>{if(o)d(n)}}}
|
|
2
|
+
export{en};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Vn}from"./chunk-j5njgy7p.js";import{ki}from"./chunk-2pahy4hs.js";import{oe}from"./chunk-xqwbn2ph.js";import{qe,or}from"./chunk-t94rfs41.js";import{e}from"./chunk-pwcw4zp2.js";import{useCallback as s}from"react";import"@alwith/module-chat/search.css";import{jsx as m}from"react/jsx-runtime";var h="alwith-chat:find";function da(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function Jt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=oe(qe,(r)=>r),w=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),y=s((r)=>u.sessionId===t?Vn(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>or(t,r,i),[t]),b=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,g=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return m("div",{className:"absolute inset-x-0 top-0 z-30",children:m(ki,{placement:"body",getViewport:w,findSourceMatches:y,revealTurn:S,prepareSource:b,subscribeOpen:g,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
|
|
2
|
+
export{da,Jt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Xo}from"./chunk-vjmgh1q9.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Jo({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=Xo(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
+
export{Jo};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{yn}from"./chunk-veb90k24.js";import{pe}from"./chunk-1e7gk302.js";import{ar}from"./chunk-4qghztvg.js";import{x,bt}from"./chunk-9h77fcpn.js";import{t}from"./chunk-xqwbn2ph.js";import{Cr,wr}from"./chunk-m2x1s408.js";import{ne}from"./chunk-0307kp7e.js";import{ue}from"./chunk-sct2h2dm.js";import{isEmbeddedResource as g,isImage as R,isResourceLink as h,isText as v}from"@nyssance/codex-acp-v2/client";import{memo as y}from"react";import{jsx as i,jsxs as q}from"react/jsx-runtime";var rr=y(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=wr(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
+
${e.text}`).join(`
|
|
3
|
+
`):ue(n),l=n.content.filter(R),d=new Set(bt(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(h(e)){let s=x(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(v).map((e)=>{let s=Cr(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return q("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(ne,{block:e},`${n.id}:${s}`))}),i(yn,{value:{names:u,icon:p.skillIcon},children:i(ar,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(pe,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
+
export{rr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function Rn(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function st(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=Rn(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{Rn,st};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var j="toolbox-content pb-8",ve="toolbox-detail flex max-h-[85dvh] flex-col gap-6 overflow-hidden rounded-2xl p-6 sm:max-w-3xl";function ye({children:e}){return o("div",{className:"toolbox-content shrink-0 pt-8",children:o("div",{className:"toolbox-toolbar flex min-h-9 items-center [&>header]:w-full [&>nav]:w-full","data-plugin-page-header":"",children:e})})}
|
|
2
|
+
export{j,ve,ye};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function
|
|
2
|
-
export{
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Ji(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function ns(){c()}function Yi(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function Xi(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Ca(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function os(e,n,t,i,o,a){if(a==="none")return;_(o,[Ca(e,n,t,i,a)])}function Ca(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Da(t,i);return wa(e,n)}function Da(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function wa(e,n){return y+Ha(e,n)}function is(e,n){return D(wa(e,n))}function Ha(e,n){if(n<=l)return Oa(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Oa(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function rs(){return r.context?.state}function as(e){return g(e).ready}
|
|
2
|
+
export{Ji,ns,Yi,Xi,os,Ca,Da,wa,is,Ha,Oa,rs,as};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{xi}from"./chunk-97tgc9ym.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function yi({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?xi({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{yi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{yt}from"./chunk-sp411z4y.js";import{c,De}from"./chunk-95n1cpnj.js";import{b}from"./chunk-d924by6g.js";import{MoreHorizontalIcon as N}from"lucide-react";import{useEffect as y,useState as p}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as D,DropdownMenuContent as P,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function go(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function he({path:n,renderHeader:s,description:t}){let e=c(),{t:l}=e,d=e.readFile,[a,f]=p(null),[v,w]=p(null),[h,M]=p(0);y(()=>{let r=!1;return f(null),w(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,h,d]);let k=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(D,{children:[o(z,{render:o(x,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(N,{})}),i(P,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void De(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void De(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)De(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(k):o("div",{className:"flex justify-end",children:k}),o(b,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(x,{variant:"outline",size:"sm",onClick:()=>M((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(yt,{text:go(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
|
+
export{go,he};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var Pe="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",d="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
|
|
2
|
+
export{Pe,d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A}from"./chunk-
|
|
2
|
-
export{Ua,
|
|
1
|
+
import{A}from"./chunk-ev9tkjgy.js";import{codexMessageError as v,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Ua(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function lr(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(v(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=A(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(A(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function cr(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Ua(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(io),items:a},M=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>j(x,c,b<M,a[b-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function io(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ue(t){return S(t.content)}function xt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function ro(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function dr(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function ur(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function pr(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!ur(t,e[n-1],o))break;n--}return e[n]?.key}function mr(t,e,n){let o=n,s=n;while(o>0&&ur(t,e[o-1],e[o]))o--;while(s+1<e.length&&ur(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{Ua,lr,cr,io,ue,xt,ro,dr,ur,pr,mr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isToolCallSubject as u}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{isToolCallSubject as u}from"@nyssance/codex-acp-v2/client";function Ir(o){let{parse:e,execute:r,...t}=o;return{...t,execute:(i,n)=>r(e(i),n)}}function xn(o){let e=new Set;if(o.length>128)throw Error("Too many application tools");let r=o.map((t)=>{if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||e.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.revision.trim()||!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);return e.add(t.name),{name:t.name,description:t.description,inputSchema:structuredClone(t.inputSchema)}});return{version:1,revision:JSON.stringify(o.map((t)=>[t.name,t.revision])),definitions:r}}function m(o){if(!o||typeof o!=="object"||Array.isArray(o))throw Error("Invalid application tool call");let e=o;if(!["sessionId","turnId","toolCallId","name","toolSetRevision"].every((r)=>typeof e[r]==="string"&&e[r].length>0)||!("arguments"in e))throw Error("Invalid application tool call");return e}var g=(o)=>({success:!1,contentItems:[{type:"text",text:o instanceof Error?o.message:String(o)}]});class bn{session;sessions=new Map;calls=new Map;constructor(o){this.session=o}bind(o,e,r){this.drop(o),this.sessions.set(o,{revision:r,tools:new Map(e.map((t)=>[t.name,{...t}])),active:new Set})}cancel(o){for(let e of this.sessions.get(o)?.active??[])e.abort()}drop(o){this.cancel(o),this.sessions.delete(o)}clear(){for(let o of this.sessions.keys())this.drop(o)}attached(o){let e=this.session(o);return e?.attached&&!e.readOnly}withdraw(o){let e=this.calls.get(JSON.stringify(o));if(!e)return!1;return e.abort(),!0}handle(o,e){if(e.method==="session/request_permission"){let t=e.params,i=t._meta?.alwith?.tool,n=this.sessions.get(t.sessionId),a=this.session(t.sessionId);if(!t.subject||!u(t.subject))return!1;let s=t.subject.toolCall.toolCallId,l=a?.items.find((c)=>c.id===s),p=a&&!a.restoring&&(a.state==="running"||a.state==="requires_action")&&l?.kind==="tool"&&!l.replayed&&l.endedAt===null&&(l.status==="pending"||l.status==="in_progress")?l.name:null,d=i!==void 0?typeof i?.name==="string"&&i.toolSetRevision===n?.revision?n?.tools.get(i.name):void 0:p?.startsWith("alwith_client_")?n?.tools.get(p.slice(14)):void 0;if(!n||!d||!this.attached(t.sessionId)||!t.subject||!u(t.subject)||!t.options.some((c)=>c.optionId==="allow_once"&&c.kind==="allow_once")||!d.autoApprove?.(t.sessionId))return!1;return o.respond(e.id,{outcome:{outcome:"selected",optionId:"allow_once"}}).catch(()=>{return}),!0}if(e.method!=="_alwith/tool/call")return!1;return(async()=>{let t=m(e.params),i=t.sessionId,n=this.sessions.get(i);if(!n||!this.attached(i))throw Error("Application tool session is not attached");if(t.toolSetRevision!==n.revision)throw Error("Invalid application tool revision");let a=n.tools.get(t.name);if(!a)throw Error(`Application tool is not registered: ${t.name}`);let s=new AbortController,l=JSON.stringify(e.id);if(this.calls.has(l))throw Error("Duplicate application tool request");this.calls.set(l,s),n.active.add(s);let p=Promise.withResolvers(),d=()=>p.reject(Error("Application tool call was cancelled"));s.signal.addEventListener("abort",d,{once:!0});try{let c=await Promise.race([Promise.resolve().then(()=>(s.signal.throwIfAborted(),a.execute(t.arguments,{sessionId:i,toolCallId:t.toolCallId,turnId:t.turnId,signal:s.signal,agent:o}))),p.promise]);if(s.signal.throwIfAborted(),this.sessions.get(i)!==n||!this.attached(i))throw Error("Application tool session was replaced");return c}finally{if(s.signal.removeEventListener("abort",d),n.active.delete(s),this.calls.get(l)===s)this.calls.delete(l)}})().catch(g).then((t)=>o.respond(e.id,t)).catch(()=>{return}),!0}}
|
|
2
|
+
export{Ir,xn,bn};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x,fr}from"./chunk-9h77fcpn.js";import{isResourceLink as v,isText as h}from"@nyssance/codex-acp-v2/client";import{useRef as R}from"react";function Vo(o,m,y,g=!1){let i=R(null);return(t)=>{if(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;let n=t.currentTarget;if(n.selectionStart!==n.selectionEnd)return;let e=i.current;if(e&&(e.sessionId!==o.id||e.value!==n.value))i.current=null,e=null;let s=t.key==="ArrowUp";if(s?n.value.slice(0,n.selectionStart).includes(`
|
|
2
2
|
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
3
|
`))return;if(!e){if(!s||n.value!==""||g)return;let u=o.items.flatMap((a)=>{if(a.kind!=="user")return[];let f=a.content.filter(h).map((l)=>l.text).join(`
|
|
4
|
-
`),p=a.content.filter(v).flatMap((l)=>{let d=
|
|
5
|
-
export{
|
|
4
|
+
`),p=a.content.filter(v).flatMap((l)=>{let d=x(l.uri);return d===null?[]:[{id:d,name:l.name}]});return f.trim()||p.length?[{text:fr(f,p),apps:p}]:[]});if(!u.length)return;e={sessionId:o.id,entries:u,index:u.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(s?-1:1)));let c=e.entries[e.index],r=c?.text??"";if(y?.(c?.apps??[]),e.value=r,m(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
+
export{Vo};
|