@alwith/module-chat 0.6.14 → 0.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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-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-ndrpfbe1.js → chunk-5r909639.js} +2 -2
- 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-9hed1d4c.js → chunk-b9q9d2jh.js} +3 -3
- package/dist/{chunk-c8szpswj.js → chunk-bc6e3dhv.js} +2 -2
- 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-jbw1dmrg.js → chunk-h7ackcd4.js} +2 -2
- 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-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-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-7qq2hj62.js → chunk-v2mdhm11.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-myjx503j.js +0 -2
- package/dist/chunk-pj42memd.js +0 -2
- package/dist/chunk-pmdpwwx5.js +0 -2
- package/dist/chunk-qfwy13e3.js +0 -2
- package/dist/chunk-rfp26vx1.js +0 -2
- package/dist/chunk-t31w04yq.js +0 -2
- package/dist/chunk-teb81g3n.js +0 -2
- package/dist/chunk-v12aj1ee.js +0 -2
- package/dist/chunk-vmmebfqv.js +0 -2
- package/dist/chunk-vncrqvge.js +0 -2
- package/dist/chunk-wn0eg5m8.js +0 -2
- package/dist/chunk-wwpv3gc3.js +0 -2
- package/dist/chunk-y6993bfz.js +0 -2
- package/dist/chunk-z7ssj61m.js +0 -2
- package/dist/chunk-zhxjp4tt.js +0 -2
- package/dist/chunk-zktqmha9.js +0 -1
- /package/native/darwin-arm64/licenses/{libsqlite3-sys-0.39.1 → libsqlite3-sys-0.40.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{rusqlite-0.41.1 → rusqlite-0.42.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{libsqlite3-sys-0.39.1 → libsqlite3-sys-0.40.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{rusqlite-0.41.1 → rusqlite-0.42.0}/LICENSE +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{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};
|
|
@@ -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};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xr}from"./chunk-veb90k24.js";import{pe}from"./chunk-1e7gk302.js";import{ao}from"./chunk-620q6hmz.js";import{x}from"./chunk-9h77fcpn.js";import{Zi}from"./chunk-6es8tgxc.js";import{no,Wi}from"./chunk-vextf7ba.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as C}from"entities";import ae from"katex";import{CheckIcon as U,ChevronLeftIcon as se,ChevronRightIcon as ie,CopyIcon as ce,DownloadIcon as de,FileIcon as le,LinkIcon as ue,MailIcon as me,XIcon as ge}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as fe,createElement as B,memo as D,startTransition as he,useContext as ke,useEffect as k,useLayoutEffect as X,useMemo as G,useRef as w,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as re}from"react/jsx-runtime";var J=fe(null);function M(){let e=ke(J);if(e===null)throw Error("Markdown host is missing");return e}var we=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,be=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,xe=/\uE200[^\uE201]*$/,Te=4,ve=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function E(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function V(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)&&!V(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!E(e,t)&&!V(e,t,n))return t;return-1}function Ne(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Me(e){return Ne(e,"```")%2===1}function Z(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!E(e,t))n+=1;t+=1}return n%2===1}function Ee(e){return e.endsWith(`
|
|
2
2
|
`)?`${e}\`\`\``:`${e}
|
|
3
3
|
\`\`\``}function _(e,n){if(!e.includes(n)||Ce(e,n)%2===0)return e;let t=ye(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
4
|
`)||Z(r))return e;return`${e}${n}`}function Le(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Y(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ie(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Y(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>Te&&!ve.has(u))return!1}return!0}function $e(e){let{path:n}=Y(e);if(Le(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Re(e){let n=e.match(H);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ie(t)||$e(t)?e.replace(H,"$1"):`${e})`}function Pe(e){let n=e.replace(xe,"");if(n.length===0||n.includes("`")&&Z(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Me(n))return{isCodeFenceOpen:!0,markdown:Ee(n)};if(n.includes(")n=Re(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Se(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return Se(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Q(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Q(t.tokens);if(!O(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!O(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function Fe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Fe(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Ae(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function He(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function _e(e){let n=He(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Oe({href:e}){let n=G(()=>_e(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Je(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function ne(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${ee(Je(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ne(r),s=t.get(o)??0;return t.set(o,s+1),te(r,`${n}-${o}-${s}`)})}function Ve(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(U,{}):null]}):null,m(t,n)]},n)}function Ze(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return B(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ye(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=ee(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function z(e,n,t){let r=N(e.href);if(!
|
|
7
|
-
export{
|
|
5
|
+
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function Fe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Fe(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Ae(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function He(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function _e(e){let n=He(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Oe({href:e}){let n=G(()=>_e(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?me:o?le:ue;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function je({children:e,href:n,title:t}){let r=M();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Ae(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(Oe,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function We({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=M(),i=w(null),[c,d]=h(null),[u,p]=h(null),[L,b]=h(!1);if(k(()=>{let g=Zi(d,p);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let T=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:L?a(U,{}):a(ce,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...T===null?{children:e}:{dangerouslySetInnerHTML:{__html:T}}})})]})}function qe({code:e,language:n}){return M().preview?a("span",{children:e}):a(Ke,{code:e,language:n})}function Ke({code:e,language:n}){let t=w(null),[r,o]=h(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(We,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function ze(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ue({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(se,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(de,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(ie,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(ge,{})})]})]})}function Be(e){return M().preview?a(re,{children:e.alt}):a(De,{...e})}function De({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=h();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(re,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(ze(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ue,{preview:s,setPreview:i})})]})}function Xe({value:e,display:n}){let t=w(null);return X(()=>{if(t.current===null)throw Error("Codex math root is not mounted");ae.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var Ge=150,y=null;function W(e,n){let t=y;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function ee(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function q(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
+
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Je(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function ne(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${ee(Je(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ne(r),s=t.get(o)??0;return t.set(o,s+1),te(r,`${n}-${o}-${s}`)})}function Ve(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(U,{}):null]}):null,m(t,n)]},n)}function Ze(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return B(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ye(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=ee(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function z(e,n,t){let r=N(e.href);if(!ao(r))return null;return a(Be,{src:r,alt:C(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function te(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return B(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>z(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(xr,{text:C(t.text),children:W(C(t.text),n)},n):m(t.tokens,n)}case"escape":return W(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=N(t.href),s=x(o);if(s!==null)return a(pe,{app:{id:s,name:C(t.text).replace(/^\$/,"")}},n);return ao(o)?a(je,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return z(e,n,!1);case"code":{let t=e;return a(qe,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Ze(e,n);case"list_item":return Ve(e,n);case"table":return Ye(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Xe,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function v(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?C(n.text):n.tokens.map(v).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(v).join("");case"list":return e.items.map(v).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(v).join("")).join("")).join("")}default:return""}}function Qe({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=y;try{return y={cursor:t,runs:r,generation:o},te(e,n)}finally{y=s}}var en=D(function({result:n}){let{text:t,isStreaming:r}=n,o=G(()=>{let l=n.tokens;if(n.source.includes("!["))Q(l);P(l);let g=new Map,S=0;return l.map((I)=>{let R=ne(I),F=g.get(R)??0;g.set(R,F+1);let A=v(I),oe={token:I,tokenKey:`root-${R}-${F}`,offset:S,visibleText:A};return S+=A.length,oe})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,p=performance.now(),L=r&&d?c.runs.filter((l)=>p-l.firstSeenAtMs<Ge):[],b=c.generation+(d?0:1),T={text:t,visibleText:s,runs:L.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)T.runs.push({start:u,end:s.length,firstSeenAtMs:p});return X(()=>{i.current=T}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Qe,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:T.runs,generation:b},l.tokenKey))})}),nn=D(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>no(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let u=Wi((p)=>{if(!i.current)i.current=!0,s(p);else he(()=>s(p))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let p=t?Pe(n).markdown:n;u.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(en,{result:o})});function yt({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(J.Provider,{value:t,children:a(nn,{text:r?o:e,isStreaming:r})})}
|
|
7
|
+
export{yt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c,i}from"./chunk-95n1cpnj.js";import{B,G,ie,z,V,fe}from"./chunk-fjseqvmx.js";import{ge}from"./chunk-ct0xqakr.js";import{b}from"./chunk-d924by6g.js";import{he}from"./chunk-rncx5gxz.js";import{j,ve}from"./chunk-qnbr2cmg.js";import{CheckIcon as F,SparklesIcon as X,XIcon as _}from"lucide-react";import{useDeferredValue as J,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as K,DialogClose as Q,DialogContent as R,DialogDescription as W,DialogHeader as Y,DialogTitle as Z}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as oe}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:m}=c(),[u,s]=v(!1),l=r.interface?.iconSmall,h=l&&m?m(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(X,{className:"text-muted-foreground size-6"})})}function re({skill:r}){let{t:m}=c(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${m(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function St({query:r,ready:m,onOpenPlugin:u}){let{t:s}=c(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!m,M=i((e)=>e.installed),E=i((e)=>e.skillProjects),[L,H]=v(null),[k,O]=v(!1),[q,C]=v(null),x=J(r.trim().toLowerCase()),o=l.find((e)=>e.path===q),N=M.find(({plugin:e})=>e.id===o?.pluginId),p=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(E).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],A=d.map((e)=>e.label);for(let e of d)if(e.path&&A.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===L)??d[0],D=g?p.filter((e)=>g.paths.has(e.path)):[],U=k||x?p:p.slice(0,6),w=(e)=>t(V,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(fe,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(z,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(G,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(ie,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(B,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(F,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(b,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${j} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(ge,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:p.length})})]}),p.length?w(U):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>O((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")H(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(oe,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(K,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(R,{showCloseButton:!1,className:ve,children:o&&n(S,{children:[t(he,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(re,{skill:o}),e,t(Q,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(_,{})})]})]}),n(Y,{className:"gap-3",children:[t(Z,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(W,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
2
|
export{St};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-3t5cksae.js";import{Ce,K,re}from"./chunk-w22ch68s.js";import{useEffect as S,useMemo as f}from"react";function Rr(s){let c=K((i)=>i.activityOrder),a=n((i)=>{let o=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&Ce(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(o)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=K((i)=>i.activitySeen),r=re();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,o])=>u.get(i)!==o)}
|
|
2
|
+
export{Rr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var qe=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function
|
|
2
|
-
export{qe,
|
|
1
|
+
import{createStore as r}from"@alwith/api/client";var qe=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function tr(e){qe.setState({...e,terminals:e.terminals??{}})}function nr(e){if(qe.getState().sessionId===e)qe.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function or(e,n,t){let i=qe.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
|
|
2
|
+
export{qe,tr,nr,or};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Bi}from"./chunk-b9q9d2jh.js";function Ri(t,o){if(Bi(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
|
|
2
|
+
export{Ri};
|