@alwith/module-chat 0.6.12 → 0.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/dist/activity-host.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +42 -0
- package/dist/application-tools.js +1 -0
- 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-f8tv9m81.js → chunk-01qqfj91.js} +2 -2
- package/dist/{chunk-vdc46qt2.js → chunk-060xywt5.js} +2 -2
- package/dist/chunk-0d2frj7b.js +2 -0
- package/dist/{chunk-ehhzhjyb.js → chunk-0kc5bhjv.js} +2 -2
- package/dist/chunk-0xcspxsx.js +2 -0
- package/dist/{chunk-y3mk12gg.js → chunk-0zmt1z4x.js} +2 -2
- package/dist/chunk-1a741cjb.js +2 -0
- package/dist/{chunk-snee6rb9.js → chunk-1cm0r042.js} +4 -4
- package/dist/{chunk-2761tcb3.js → chunk-1eyzjfc7.js} +2 -2
- package/dist/chunk-1vnw2sgz.js +5 -0
- package/dist/chunk-1xaskqdj.js +2 -0
- package/dist/{chunk-ex20n22v.js → chunk-1y8s1zmh.js} +2 -2
- package/dist/{chunk-5zq0s9fd.js → chunk-2pg50r36.js} +3 -3
- package/dist/chunk-31ecwv4k.js +4 -0
- package/dist/{chunk-1g54ee1j.js → chunk-3435g0ft.js} +2 -2
- package/dist/chunk-36qcq9j0.js +2 -0
- package/dist/{chunk-jpm15hcd.js → chunk-37a8v8sd.js} +2 -2
- package/dist/{chunk-b8c460mr.js → chunk-3gms312w.js} +2 -2
- package/dist/chunk-3qabfreh.js +2 -0
- package/dist/{chunk-f2wy8jza.js → chunk-440eq9v5.js} +2 -2
- package/dist/{chunk-rge2pazt.js → chunk-46ty0q9n.js} +2 -2
- package/dist/{chunk-xztxaq9k.js → chunk-485y3k93.js} +2 -2
- package/dist/{chunk-cctw9m9a.js → chunk-4e8rwzhz.js} +2 -2
- package/dist/{chunk-06yzz0yx.js → chunk-4sneycqc.js} +2 -2
- package/dist/{chunk-mmywt5fq.js → chunk-4wb9xn39.js} +2 -2
- package/dist/chunk-5347w553.js +4 -0
- package/dist/{chunk-fgre64ge.js → chunk-59rxa4rt.js} +2 -2
- package/dist/{chunk-n13y99dj.js → chunk-5t4egv96.js} +2 -2
- package/dist/chunk-5tvysr2s.js +2 -0
- package/dist/{chunk-1mf3b58j.js → chunk-602grjva.js} +2 -2
- package/dist/{chunk-wz6a2j26.js → chunk-61ehrk7x.js} +2 -2
- package/dist/chunk-6ax3abjj.js +2 -0
- package/dist/chunk-6e3g436k.js +2 -0
- package/dist/chunk-6kh62x8f.js +4 -0
- package/dist/{chunk-5s85tvas.js → chunk-7919s3et.js} +2 -2
- package/dist/chunk-7f35yy1n.js +2 -0
- package/dist/{chunk-jgseey5x.js → chunk-7qq2hj62.js} +3 -3
- package/dist/{chunk-7cj104ba.js → chunk-7rd487pt.js} +2 -2
- package/dist/{chunk-ggkjq8rk.js → chunk-82xjggwn.js} +2 -2
- package/dist/{chunk-nxjr0z23.js → chunk-86gk0v56.js} +2 -2
- package/dist/chunk-881sxqxf.js +2 -0
- package/dist/chunk-89nc6p3f.js +2 -0
- package/dist/chunk-8arntrcm.js +3 -0
- package/dist/{chunk-1bt8a25d.js → chunk-8djjctdj.js} +2 -2
- package/dist/{chunk-2s5598rk.js → chunk-8gc78fh3.js} +2 -2
- package/dist/chunk-8qr01fzq.js +2 -0
- package/dist/{chunk-djk0ebpk.js → chunk-8r53axab.js} +2 -2
- package/dist/{chunk-kgjdh49d.js → chunk-8sckf8ey.js} +2 -2
- package/dist/{chunk-jzyj96ws.js → chunk-915dk3fj.js} +2 -2
- package/dist/chunk-9a72hk73.js +2 -0
- package/dist/{chunk-8xn58z0x.js → chunk-9bzz1801.js} +3 -3
- package/dist/{chunk-pnavf2zs.js → chunk-9cjwy7mn.js} +2 -2
- package/dist/{chunk-eeqppv9j.js → chunk-9hed1d4c.js} +3 -3
- package/dist/chunk-9kn9jafp.js +4 -0
- package/dist/chunk-aaqk0jrt.js +2 -0
- package/dist/{chunk-y8sc8n3j.js → chunk-abp8zh77.js} +2 -2
- package/dist/chunk-abvawet2.js +2 -0
- package/dist/chunk-ac5wmxwh.js +2 -0
- package/dist/{chunk-st0gd22t.js → chunk-af90c0vz.js} +2 -2
- package/dist/chunk-ar7pyb7s.js +2 -0
- package/dist/{chunk-8c7x6vrs.js → chunk-b5ba1vak.js} +3 -3
- package/dist/{chunk-8wydj0hv.js → chunk-b5przf89.js} +2 -2
- package/dist/chunk-b6fs77p0.js +2 -0
- package/dist/{chunk-yzhqbz2p.js → chunk-c05dxz9x.js} +2 -2
- package/dist/chunk-c5gzxgfp.js +2 -0
- package/dist/{chunk-r9szj8sp.js → chunk-c6zsjmmj.js} +2 -2
- package/dist/chunk-c8szpswj.js +2 -0
- package/dist/{chunk-cdgfr4n0.js → chunk-c98q3k3j.js} +2 -2
- package/dist/{chunk-2wex96dp.js → chunk-camsks19.js} +2 -2
- package/dist/chunk-cdwhf4a8.js +2 -0
- package/dist/{chunk-cx1sg5dt.js → chunk-cg8nrtjv.js} +2 -2
- package/dist/{chunk-z8ymt0ny.js → chunk-che3097s.js} +2 -2
- package/dist/{chunk-290e7g1q.js → chunk-cwfj3w5c.js} +2 -2
- package/dist/{chunk-3pcbgsm6.js → chunk-cxhyh0w9.js} +2 -2
- package/dist/{chunk-xary32dg.js → chunk-cy35nmk9.js} +2 -2
- package/dist/{chunk-k5cjaeza.js → chunk-d7jpv1at.js} +2 -2
- package/dist/{chunk-btrg3ywt.js → chunk-d924by6g.js} +2 -2
- package/dist/{chunk-x2ayy0ys.js → chunk-ddkh0qey.js} +4 -4
- package/dist/chunk-dqntm4yy.js +2 -0
- package/dist/{chunk-rhxyb55x.js → chunk-dz6gv1k8.js} +2 -2
- package/dist/chunk-eezcnm8y.js +2 -0
- package/dist/{chunk-vkbaa74h.js → chunk-esrm0762.js} +2 -2
- package/dist/chunk-f0kgxjp1.js +2 -0
- package/dist/{chunk-9n2wwk4g.js → chunk-fk71dmx0.js} +2 -2
- package/dist/{chunk-a953k2dj.js → chunk-fmwxhswe.js} +3 -3
- package/dist/chunk-fwx30jk5.js +2 -0
- package/dist/{chunk-0xmj4d4z.js → chunk-fzze5xcw.js} +2 -2
- package/dist/chunk-g6j0f6nq.js +3 -0
- package/dist/chunk-gg7ar09k.js +2 -0
- package/dist/{chunk-pr5wv14q.js → chunk-gmtjagqw.js} +2 -2
- package/dist/{chunk-1sxmqb44.js → chunk-h5ehjay8.js} +2 -2
- package/dist/{chunk-q4f8zazc.js → chunk-hnh4907d.js} +2 -2
- package/dist/{chunk-24dqkjvg.js → chunk-hw6d7q50.js} +2 -2
- package/dist/chunk-hy66kdet.js +4 -0
- package/dist/{chunk-hqdbv5hw.js → chunk-j3svczsr.js} +2 -2
- package/dist/{chunk-bp6f5tv8.js → chunk-j63fnn73.js} +2 -2
- package/dist/{chunk-v28fv6c4.js → chunk-j85kej5x.js} +2 -2
- package/dist/{chunk-8t1brzbh.js → chunk-jayj7jn1.js} +2 -2
- package/dist/{chunk-y8md080p.js → chunk-jbw1dmrg.js} +2 -2
- package/dist/{chunk-xw2zfj4c.js → chunk-jj460s9n.js} +2 -2
- package/dist/{chunk-3ab38s9g.js → chunk-k0mcp7wa.js} +2 -2
- package/dist/chunk-kg10wznr.js +2 -0
- package/dist/{chunk-ba4fa6fc.js → chunk-kmn45zqk.js} +2 -2
- package/dist/chunk-kthwyebf.js +3 -0
- package/dist/{chunk-53ptmmsx.js → chunk-kwnznjqg.js} +2 -2
- package/dist/chunk-mb9h6s08.js +2 -0
- package/dist/{chunk-vpzjhbfa.js → chunk-mgedgmps.js} +2 -2
- package/dist/{chunk-q2z9w661.js → chunk-mh566s9g.js} +2 -2
- package/dist/{chunk-sjes4cxr.js → chunk-mhka64tj.js} +2 -2
- package/dist/{chunk-y7gzr914.js → chunk-mp6va3k2.js} +2 -2
- package/dist/{chunk-6g5z3pff.js → chunk-mwwas9bw.js} +2 -2
- package/dist/chunk-myjx503j.js +2 -0
- package/dist/{chunk-7xc69d48.js → chunk-n27z019x.js} +2 -2
- package/dist/{chunk-mzwwsacy.js → chunk-ndrpfbe1.js} +2 -2
- package/dist/chunk-ndy5kjpz.js +2 -0
- package/dist/{chunk-r6b9fdnm.js → chunk-nfsz18j1.js} +2 -2
- package/dist/{chunk-rq7t6qry.js → chunk-nh9kfjss.js} +2 -2
- package/dist/chunk-nhs4dy9n.js +2 -0
- package/dist/{chunk-acmc2r2s.js → chunk-p32m85v1.js} +3 -3
- package/dist/{chunk-wj2xjzds.js → chunk-p8pj4pkf.js} +2 -2
- package/dist/{chunk-3tsy36rq.js → chunk-p9vk6dds.js} +2 -2
- package/dist/{chunk-z9ch23p0.js → chunk-pamcdn3d.js} +2 -2
- package/dist/chunk-pj42memd.js +2 -0
- package/dist/chunk-pmdpwwx5.js +2 -0
- package/dist/{chunk-6tkjdrnj.js → chunk-pyrza100.js} +2 -2
- package/dist/{chunk-782x5ryb.js → chunk-q1mbkntx.js} +2 -2
- package/dist/{chunk-rhcpe6m6.js → chunk-q53qh3sx.js} +2 -2
- package/dist/{chunk-pfqz31kk.js → chunk-qdhdt0hb.js} +2 -2
- package/dist/{chunk-7wj3dcpj.js → chunk-qfwy13e3.js} +2 -2
- package/dist/{chunk-m7exm1n3.js → chunk-qm7vegrj.js} +5 -5
- package/dist/{chunk-rvbbb9rf.js → chunk-r7ddbf5n.js} +2 -2
- package/dist/{chunk-5ykpe629.js → chunk-raxtm3ej.js} +2 -2
- package/dist/{chunk-h1embxgj.js → chunk-rd4yhfs7.js} +2 -2
- package/dist/chunk-rfp26vx1.js +2 -0
- package/dist/{chunk-1tb3d2x4.js → chunk-rfrr4xbt.js} +2 -2
- package/dist/{chunk-0d0bfb8e.js → chunk-rjqtw4zf.js} +2 -2
- package/dist/{chunk-pjgym6rx.js → chunk-rkbdgfgs.js} +2 -2
- package/dist/{chunk-z94nsbnw.js → chunk-rvmbvv03.js} +2 -2
- package/dist/chunk-ryfqa1bc.js +4 -0
- package/dist/chunk-sbyj2adb.js +7 -0
- package/dist/{chunk-zxwvq5f4.js → chunk-sntvq6zv.js} +2 -2
- package/dist/{chunk-d51rg15n.js → chunk-sqt4g5nd.js} +2 -2
- package/dist/chunk-szrdzr1d.js +2 -0
- package/dist/{chunk-b5jq0ken.js → chunk-t0e7gk7y.js} +2 -2
- package/dist/{chunk-tbv1mfdg.js → chunk-t1ys4wak.js} +3 -3
- package/dist/{chunk-cqskn18r.js → chunk-t2h1wgvg.js} +2 -2
- package/dist/chunk-t31w04yq.js +2 -0
- package/dist/{chunk-rtdjp07m.js → chunk-t9sgtnge.js} +2 -2
- package/dist/{chunk-7wgt5rjw.js → chunk-ta71ve6k.js} +2 -2
- package/dist/{chunk-87br10bq.js → chunk-te33zs6y.js} +2 -2
- package/dist/{chunk-gnpvd7wg.js → chunk-teb81g3n.js} +2 -2
- package/dist/{chunk-8jgstab4.js → chunk-twxn29aq.js} +2 -2
- package/dist/{chunk-j7w4jr8y.js → chunk-txvxq7hy.js} +2 -2
- package/dist/chunk-v12aj1ee.js +2 -0
- package/dist/{chunk-6fvrhr9x.js → chunk-v4z2kexv.js} +2 -2
- package/dist/{chunk-sygx6n0s.js → chunk-v8c2tsnr.js} +2 -2
- package/dist/{chunk-8a1th59e.js → chunk-vc43akb6.js} +2 -2
- package/dist/chunk-vhdzdzf0.js +2 -0
- package/dist/{chunk-fnvjemhq.js → chunk-vk4xkyhw.js} +2 -2
- package/dist/chunk-vmmebfqv.js +2 -0
- package/dist/chunk-vncrqvge.js +2 -0
- package/dist/{chunk-zntkqbcv.js → chunk-wamhc02v.js} +2 -2
- package/dist/{chunk-r9ny4bqk.js → chunk-wht615am.js} +2 -2
- package/dist/{chunk-j71h60r0.js → chunk-wkbxdz82.js} +2 -2
- package/dist/chunk-wn0eg5m8.js +2 -0
- package/dist/chunk-wwpv3gc3.js +2 -0
- package/dist/{chunk-vk7kqa6a.js → chunk-y14r7906.js} +2 -2
- package/dist/{chunk-9he6963p.js → chunk-y6993bfz.js} +2 -2
- package/dist/{chunk-mdp2zdqm.js → chunk-yd9962fa.js} +2 -2
- package/dist/{chunk-rb4p3h5b.js → chunk-ydqr81rv.js} +2 -2
- package/dist/chunk-yg0xnvde.js +2 -0
- package/dist/{chunk-tme1d6xh.js → chunk-yksyxg7r.js} +2 -2
- package/dist/{chunk-mxh0vcye.js → chunk-yn1rck7n.js} +2 -2
- package/dist/chunk-yz8dtdk0.js +2 -0
- package/dist/chunk-z1j2c9r4.js +2 -0
- package/dist/chunk-z7ssj61m.js +2 -0
- package/dist/chunk-zhxjp4tt.js +2 -0
- package/dist/chunk-zktqmha9.js +1 -0
- package/dist/client.d.ts +20 -1
- 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/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.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.d.ts +9 -2
- 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.d.ts +2 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-presentation.d.ts +10 -0
- package/dist/composer/menu-presentation.js +1 -0
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.d.ts +3 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.d.ts +2 -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.d.ts +24 -0
- package/dist/conversation/composer/composer-menu.js +1 -0
- 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.d.ts +24 -0
- 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.d.ts +38 -0
- package/dist/lib/reference-presentation.js +1 -0
- 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.d.ts +104 -0
- package/dist/locales.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-header.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/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/reference-projection.d.ts +13 -0
- package/dist/reference-projection.js +1 -0
- 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/locales.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-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/history-timeline.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/types.d.ts +1 -0
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.d.ts +2 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -2
- package/dist/chunk-0aqnqk7b.js +0 -2
- package/dist/chunk-0r4b11t4.js +0 -2
- package/dist/chunk-0srja8yh.js +0 -2
- package/dist/chunk-1647cyqx.js +0 -2
- package/dist/chunk-19yjze8m.js +0 -7
- package/dist/chunk-1axvr26t.js +0 -4
- package/dist/chunk-1ye5ygbk.js +0 -2
- package/dist/chunk-26bm75r2.js +0 -2
- package/dist/chunk-3ddgyzhz.js +0 -3
- package/dist/chunk-3kzmec3f.js +0 -2
- package/dist/chunk-4gstmex3.js +0 -2
- package/dist/chunk-52tcfvz0.js +0 -2
- package/dist/chunk-5q0kb3yb.js +0 -2
- package/dist/chunk-5y5b3w22.js +0 -2
- package/dist/chunk-677dyzb1.js +0 -4
- package/dist/chunk-6cbj9r2x.js +0 -2
- package/dist/chunk-6z3nch41.js +0 -1
- package/dist/chunk-799h4586.js +0 -2
- package/dist/chunk-7m08m4m1.js +0 -2
- package/dist/chunk-7p3nx5bx.js +0 -2
- package/dist/chunk-7qmj50a2.js +0 -2
- package/dist/chunk-844s61q1.js +0 -2
- package/dist/chunk-88j29hzx.js +0 -2
- package/dist/chunk-8pdapsc7.js +0 -2
- package/dist/chunk-aardrb6e.js +0 -2
- package/dist/chunk-akk3k2sc.js +0 -4
- package/dist/chunk-b0bd8abz.js +0 -2
- package/dist/chunk-bqdnxftw.js +0 -2
- package/dist/chunk-bv175dn9.js +0 -2
- package/dist/chunk-crg1ttkp.js +0 -2
- package/dist/chunk-der9jtk9.js +0 -2
- package/dist/chunk-eg9c12vk.js +0 -2
- package/dist/chunk-fkmka3v9.js +0 -2
- package/dist/chunk-fp3rp1qc.js +0 -2
- package/dist/chunk-h9rwby5r.js +0 -2
- package/dist/chunk-hhdeh622.js +0 -2
- package/dist/chunk-j5trhvx8.js +0 -4
- package/dist/chunk-mz8tjgre.js +0 -2
- package/dist/chunk-nktaekpq.js +0 -2
- package/dist/chunk-nrvd7njv.js +0 -2
- package/dist/chunk-p95ndy0b.js +0 -3
- package/dist/chunk-qyj4d255.js +0 -5
- package/dist/chunk-r29b0ap8.js +0 -2
- package/dist/chunk-rgn6pdaa.js +0 -2
- package/dist/chunk-rvjfb004.js +0 -2
- package/dist/chunk-rwh1yvqn.js +0 -2
- package/dist/chunk-s267ztm1.js +0 -2
- package/dist/chunk-s4v10afm.js +0 -3
- package/dist/chunk-t3sqxded.js +0 -2
- package/dist/chunk-vxexg361.js +0 -2
- package/dist/chunk-vxn8gfy4.js +0 -2
- package/dist/chunk-xvfvxjyp.js +0 -4
- package/dist/chunk-ycj91akv.js +0 -2
- package/dist/chunk-ym0pvy7y.js +0 -2
- package/dist/chunk-z9q7rgbf.js +0 -2
- package/dist/chunk-zfjpfj30.js +0 -2
- package/dist/chunk-zyznsm1p.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
"@dnd-kit/sortable": "^10.0.0",
|
|
407
407
|
"@dnd-kit/utilities": "^3.2.2",
|
|
408
408
|
"@floating-ui/dom": "^1.8.0",
|
|
409
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
409
|
+
"@nyssance/codex-acp-v2": "^0.7.66",
|
|
410
410
|
"@nyssance/shadcn": "^4.23.4",
|
|
411
411
|
"@shadcn/react": "^0.3.1",
|
|
412
412
|
"@solar-icons/react": "^2.3.5",
|
package/dist/chunk-0aqnqk7b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*bn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Uo(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of bn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{bn,Uo};
|
package/dist/chunk-0r4b11t4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{H}from"./chunk-2wex96dp.js";import{e}from"./chunk-rvjfb004.js";import{BlocksIcon as I}from"lucide-react";import{useRef as D,useState as a}from"react";import{DropdownMenu as h,DropdownMenuContent as C,DropdownMenuGroup as v,DropdownMenuItem as p,DropdownMenuTrigger as N}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as S}from"react/jsx-runtime";function Xo({disabled:w,onSelect:M,focusAfterSelect:A}){let{client:u,host:r}=e(),[k,y]=a(!1),[c,U]=a([]),[d,t]=a("loading"),l=D(0),i=D(!1),m=u.installedApps?.bind(u);if(!m)return null;let f=(n)=>{y(n);let g=++l.current;if(!n)return;i.current=!1,t("loading"),m().then(({apps:s})=>{if(g!==l.current)return;U(s.filter((b)=>b.enabled&&b.callable)),t("ready")},(s)=>{if(g!==l.current)return;t("error"),r.reportError?.(s)})};return S(h,{open:k,onOpenChange:f,children:[o(N,{render:o(H,{disabled:w,"aria-label":r.t("composer.apps"),title:r.t("composer.apps"),children:o(I,{})})}),o(C,{finalFocus:()=>i.current?A?.()??!1:!0,align:"start",side:"top",className:"max-h-72 min-w-48 overflow-y-auto",children:o(v,{children:d!=="ready"?o(p,{disabled:!0,children:r.t(d==="loading"?"composer.appsLoading":"composer.appsFailed")}):c.length===0?o(p,{disabled:!0,children:r.t("composer.appsEmpty")}):c.map((n)=>o(p,{onClick:()=>{i.current=!0,M({id:n.id,name:n.runtimeName||n.id,...n.iconUrl?{iconUrl:n.iconUrl}:{},...n.iconUrlDark?{iconUrlDark:n.iconUrlDark}:{}}),f(!1)},children:n.runtimeName||n.id},n.id))})})]})}
|
|
2
|
-
export{Xo};
|
package/dist/chunk-0srja8yh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{BlocksIcon as i,XIcon as t}from"lucide-react";import{Button as s}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as l}from"react/jsx-runtime";function de({app:n,remove:e}){return l("span",{"data-app-reference":n.id,title:n.name,className:"inline-flex max-w-full items-center gap-1.5 rounded-md bg-muted px-2 py-1 align-middle text-sm font-medium text-foreground",children:[a(i,{className:"size-3.5 shrink-0","aria-hidden":"true"}),a("span",{className:"max-w-48 truncate",children:n.name}),e&&a(s,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:a(t,{className:"size-3","aria-hidden":"true"})})]})}
|
|
2
|
-
export{de};
|
package/dist/chunk-1647cyqx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function gr({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function u(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function A(t){let{Markdown:o}=u();return e(o,{...t})}
|
|
2
|
-
export{gr,u,A};
|
package/dist/chunk-19yjze8m.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{u,A}from"./chunk-1647cyqx.js";import{zn}from"./chunk-b8c460mr.js";import{q}from"./chunk-eeqppv9j.js";import{k}from"./chunk-mz8tjgre.js";import{Ve,zi}from"./chunk-ycj91akv.js";import{le}from"./chunk-7cj104ba.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as P,useRef as O,useState as _}from"react";import{jsx as n,jsxs as p,Fragment as D}from"react/jsx-runtime";function H(e,t){let[a,o]=_(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var G=new WeakMap,z=1;function L(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=G.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=z;return z+=1,G.set(e,a),`${e.type}:${a}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function V(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let l=Intl.DurationFormat;if(l)try{return new l(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function M({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function K(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;if(U(e))return n(K,{});let t=q(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(K,{})}function I(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function we(e){return q(e).target}function W(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function U(e){return W(e)||e.name==="dynamic_tool"}function te(e,t){let{category:a}=q(e),o=we(e),i=N(e.status);if(U(e))return{leading:e.title};if(a==="execute"){let r=I(e,"command")?.split(`
|
|
2
|
-
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=I(e,"pattern")??I(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=I(e,"query")??I(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function Le(e,t){let a=te(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function Ne(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
|
|
3
|
-
`).trim()}function be(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function Te(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="audio"?[{data:a.data,mimeType:a.mimeType}]:[]})}function $e(e){if(typeof e==="string"&&e.length>0)return e;return}function ke(e){return e.type==="diff"}function Ae(e){let t=e.content.find(ke);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
|
-
`)}function ne(e){let t=$e(e.rawOutput);if(t!==void 0)return t;let a=Ne(e.content);if(a.length>0)return a;return Ae(e)}function J({block:e,command:t}){let{t:a,Output:o,commandStatus:i}=u(),[r,l]=_(!1),[d,c]=_(!1),m=ne(e),s=i===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):i(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
|
|
5
|
-
`)),l(!0),setTimeout(()=>l(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>c((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(pe,{}):n(ge,{})})]}),m!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:m}):n(o,{text:m})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function ae({block:e}){let{t,openLink:a,Patch:o,openImage:i,commandStatus:r,expandToolOutput:l=!1}=u(),d=ne(e),c=o===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let B=x;return B.patch?.text?[B.patch.text]:[]}).join(`
|
|
6
|
-
`),m=be(e.content),s=Te(e.content),[g,f]=k(`tool:${e.id}`,!1),C=H(`tool:${e.id}`,g),h=q(e),w=h.category,y=te(e,t),b=w==="execute"?I(e,"command"):void 0;if(e.userShell&&b!==void 0)return n(J,{block:e,command:b});let T=b!==void 0||U(e)||m.length>0||s.length>0||Boolean(c)||l&&d!==void 0,E=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(w==="read"&&N(e.status))return null;let S=p("span",{className:"codex-activity-label",children:[n(ee,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(D,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(E!==void 0?p(D,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:E,onClick:()=>a(E),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[T?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[S,n(M,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:S}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(D,{children:[b!==void 0?n(J,{block:e,command:b}):o!==void 0&&c?n(o,{patch:c}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let B=`data:${x.mimeType};base64,${x.data}`,j=n("img",{src:B,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?j:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(B),children:j},B)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function oe({block:e}){if(e.type==="tool_use")return n(ae,{block:e});if(e.type==="thinking")return n(ue,{block:e});if(e.type==="collab")return n(ce,{block:e});return n(ie,{block:e})}function ie({block:e}){let{t,openSession:a}=u(),o=N(e.status),[i,r]=k(`subagent:${e.id}`,o),l=O(o);P(()=>{if(o)r(!0);if(l.current&&!o)r(!1);l.current=o},[o,r]);let d=`${Ee(e.activity,o,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,c=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Me,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(c,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(c,e.name)},children:d})})]}),m&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ae,{block:s},s.id);if(s.type==="thinking")return n(ue,{block:s},L(s));if(s.type==="subagent")return n(ie,{block:s},s.id);if(s.type==="collab")return n(ce,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(A,{text:s.text,streaming:!1})},L(s));if(s.type==="plan")return n(le,{entries:s.entries},L(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},L(s));return null})})})})]})}var Be=8;function Ie(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Be}function Me({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ie(e),"aria-hidden":"true"})}function Ee(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var Se=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,a){if(e===null)return"";if(t===null)return` · ${zn(e)}`;let o=Se.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${zn(e)} · ${o}`}var _e={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=se(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${_e[e.tool]}.${o}`)}function Re(e){return e.agents.filter((t)=>t.nickname!==null)}function de(e,t){let a=e.agents.length>0?e.agents.length:1;return`${Z(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var R="\x01";function F(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${R}${r}${R}`]));return e(t,{...a,...i}).split(new RegExp(`${R}(\\w+)${R}`,"u")).map((r,l)=>n(fe,{children:l%2===1?o[r]:r},`${l}:${r}`))}function Fe({agent:e,showModel:t}){let{t:a,openSession:o}=u(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,a)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function De(e,t){let a=e.prompt?.trim()?e.prompt:null,o=se(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,l=Re(e),d=[];if(l.length===0)d.push({key:"generic",node:Z(e,"row",t)});for(let c of l){let m=n(Fe,{agent:c,showModel:e.tool==="spawnAgent"});if(i)d.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:a})})})});else if(r)d.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(Q,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&c.state!==null&&c.state!==null?c.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${c.state.status}`),message:c.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${c.state.status}`)}):"";d.push({key:c.threadId,node:F(t,"stream.codex.collab.agentRow",{action:Z(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:F(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function ce({block:e}){let{t}=u(),[a,o]=k(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=N(e.status),r=de(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((l)=>!l),children:[p("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(M,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:De(e,t).map((l)=>n("div",{className:"codex-collab-row",children:l.node},l.key))})})})]})}function ue({block:e}){let{t,i18n:a}=u(),o=Boolean(e.isComplete),[i,r]=k(`thinking:${L(e)}`,!1),l=O(null),d=e.thinking.trim().length>0;P(()=>{if(o||!d)return;let s=l.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let w=s.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let c=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:V(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?c:n("span",{className:"codex-activity-running",children:c})})}),d&&n(M,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:l,className:"codex-reasoning-details",role:"region","aria-label":c,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(A,{text:m,streaming:!o})})})})]})}function Pe(e){if(W(e))return"mcp";let t=q(e).category;return t==="think"||t==="switch_mode"?"other":t}function Oe(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ue(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(W(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(U(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let c=Pe(d);if(!o.has(c))i.push({kind:"category",category:c});o.set(c,(o.get(c)??0)+1)}let l=i.map((d,c)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${c===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Oe(d.category,o.get(d.category),c===0,t)});if(a.startsWith("zh"))return l.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(l)}function Gi({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:l,providerIcon:d,children:c}){let{t:m,i18n:s}=u(),[g,f]=k(`work:${e}`,i,!0),C=H(`work:${e}`,g||o),h=O(null),[w,y]=_(0);P(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let T=()=>{let S=h.current;if(S===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-S)};T();let E=window.setInterval(T,1000);return()=>window.clearInterval(E)},[o,r,t]);let b=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:V(t,s.language)}):o&&w>=1000?m("stream.codex.workingFor",{duration:V(w,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((T)=>!T),children:[l!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":l,"aria-hidden":"true",children:d}),n("span",{children:b}),n(M,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&c})})})]})}function Ze(e,t){if(e.type==="tool_use")return Le(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return de(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function He(e,t,a=1000){let[o,i]=_({text:e,live:t}),r=O(Date.now());return P(()=>{if(e===o.text&&t===o.live)return;let l=Date.now(),d=Math.max(0,r.current+a-l);if(d===0||t!==o.live){r.current=l,i({text:e,live:t});return}let c=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(c)},[o,t,a,e]),t===o.live?o.text:e}function We({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=u(),i=e.some(X),r=L(e[0]),l=e.every((C)=>C.type==="tool_use"&&q(C).category==="execute"),[d,c]=k(`group:${r}`,t&&!l),m=H(`group:${r}`,d),s=e.findLast(X)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=He(i?Ze(s,a):Ue(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>c((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(ee,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(M,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(oe,{block:C},L(C)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(We,{blocks:e,defaultExpanded:t})}function mt({blocks:e,defaultExpanded:t}){if(!e.some(Ve))return n(Y,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&Ve(i[0])===Ve(o))i.push(o);else a.push([o])}return n(D,{children:a.map((o)=>Ve(o[0])?n(zi,{blocks:o.filter(Ve)},L(o[0])):n(Y,{blocks:o,defaultExpanded:t},L(o[0])))})}
|
|
7
|
-
export{Gi,mt};
|
package/dist/chunk-1axvr26t.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{_n}from"./chunk-y7gzr914.js";import{zo}from"./chunk-xvfvxjyp.js";import{se}from"./chunk-6cbj9r2x.js";import{autoUpdate as ot}from"@floating-ui/dom";import{cn as G}from"cn";import{BookOpenTextIcon as rt,FileIcon as st,StoreIcon as it}from"lucide-react";import{useCallback as lt,useEffect as d,useLayoutEffect as J,useMemo as X,useRef as Y,useState as v}from"react";import{createPortal as ut}from"react-dom";import{Button as Z}from"@nyssance/shadcn/vega/components/ui/button";import{Separator as at}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as m,jsxs as w,Fragment as ct}from"react/jsx-runtime";function Go({handleRef:l,anchorRef:a,commands:T,searchFiles:u,onMention:_,onSearchError:B,fileSearchDebounceMs:C=0,bashMode:H=!1,forcedOpen:s=!1,onForcedOpenChange:p,emptyLabel:R,fileStatusLabels:E,morePlugins:M}){let A=se(),i=A.textInput.value,[j,z]=v(0),[g,D]=v(null),[x,h]=v(0),K=Y(null);d(()=>{let t=l.current?.getTextarea();if(!t)return;let e=()=>z(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[l]);let U=X(()=>H&&i.startsWith("!")?null:zo(i,j),[i,j,H]),o=U?.kind==="at"&&!u?null:U,P=`${o?.kind??"forced"}:${o?.query??""}:${s}`,[F,O]=v(P);if(F!==P)O(P),h(0);let L=Y(null);d(()=>{if(!s){L.current=null;return}if(L.current===null)L.current=i;else if(i!==L.current)p?.(!1)},[s,i,p]);let y=o?.kind==="at"?o.query:null;d(()=>{if(y===null||!u){D(null);return}let t=!0,e=()=>{u(y).then((r)=>{if(t)D({query:y,search:u,items:r})},(r)=>{if(t)D({query:y,search:u,items:[]}),B(r)})},n=C>0?window.setTimeout(e,C):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[y,u,C,B]);let f=X(()=>{if(o?.kind==="at")return g?.query===o.query&&g.search===u?g.items:[];if(o)return _n(T,o.query);if(s)return _n(T,"");return[]},[o,s,T,g,u]),[tt,q]=v(!1);d(()=>{let t=l.current?.getTextarea();if(!t)return;let e=()=>q(!0),n=()=>{if(q(!1),s)p?.(!1)};return q(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[l,s,p]),d(()=>{if(s)l.current?.getTextarea()?.focus()},[s,l]);let c=tt&&(o!==null?o.kind==="slash"||f.length>0||!!E:s);d(()=>{if(!c)return;K.current?.querySelector(`[data-idx="${x}"]`)?.scrollIntoView({block:"nearest"})},[x,c]);function V(t){let e=l.current?.getTextarea();if(!e)return;let n,r;if(o){let S=o.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(n=i.slice(0,o.start)+S+i.slice(o.end),o.kind==="at")_?.(t.payload);r=o.start+S.length}else if(s)n=`${i.length===0||i.endsWith(`
|
|
2
|
-
`)?i:`${i}
|
|
3
|
-
`}/${t.payload} `,r=n.length,p?.(!1);else return;A.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}d(()=>{let t=l.current?.getTextarea();if(!t)return;let e=(n)=>{if(!c)return;if(l.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>f.length===0?0:Math.min(f.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=f[x];if(r)V(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)z(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else p?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[b,W]=v(null),[N,et]=v(null),I=lt(()=>{let t=a?.current;if(!t)return;let e=t.getBoundingClientRect();W({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[a]);if(J(()=>{if(!c){W(null);return}I()},[c,I]),J(()=>{let t=a?.current;if(!c||!t||!N)return;return ot(t,N,I,{animationFrame:!0})},[c,N,a,I]),!c||a&&!b)return null;let k=o?o.kind==="slash":s,nt=k?rt:st,Q=m("div",{ref:et,className:a?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:a&&b?{left:b.left,width:b.width,bottom:b.bottom}:void 0,children:w("div",{ref:K,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[w("div",{className:"max-h-72 overflow-y-auto",children:[f.length===0&&k&&m("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:R}),f.length===0&&!k&&E&&m("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:g?.query===y&&g.search===u?E.empty:E.loading}),f.map((t,e)=>w(Z,{type:"button",variant:"ghost",role:"option","aria-selected":e===x,"data-idx":e,onMouseDown:(n)=>{n.preventDefault(),V(t)},onMouseEnter:()=>h(e),className:G("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===x&&"bg-muted"),children:[m(nt,{className:G("size-4 shrink-0",k?"text-blue-500":"text-muted-foreground")}),m("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&m("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),k&&M&&w(ct,{children:[m(at,{}),w(Z,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),p?.(!1),M.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[m(it,{"data-icon":"inline-start"}),M.label]})]})]})});return a?ut(Q,document.body):Q}
|
|
4
|
-
export{Go};
|
package/dist/chunk-1ye5ygbk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-8pdapsc7.js";import{a}from"./chunk-hqdbv5hw.js";import{g,p}from"./chunk-bv175dn9.js";import{et}from"./chunk-zxwvq5f4.js";import{cn as r}from"cn";import{ArrowLeftIcon as s,ArrowRightIcon as l,SlidersHorizontalIcon as m}from"lucide-react";import{DropdownMenu as u,DropdownMenuContent as d,DropdownMenuItem as f,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as L}from"react/jsx-runtime";function Dr({onCollapseAll:i}){let{t:n}=a();return L(u,{children:[o(w,{render:o(et,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(m,{})}),o(d,{align:"end",className:"w-52",children:o(f,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Hr({screen:i,onSwitch:n}){let{t:e}=a(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(p,{className:r(c,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(g,{children:i==="main"?o(s,{}):o(l,{})})})}
|
|
2
|
-
export{Dr,Hr};
|
package/dist/chunk-26bm75r2.js
DELETED
package/dist/chunk-3ddgyzhz.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,s,n}from"./chunk-hqdbv5hw.js";import{He,re,X}from"./chunk-7p3nx5bx.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as r}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function Or({Scroll:u=we}){let{t:i,i18n:A}=a(),m=s(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,Y]=d(""),[y,Z]=d("all"),[p,ee]=d("all"),[te,se]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,te]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ne=[...new Set(S.filter((e)=>o&&j(o,e).id!==X).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),ae=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===X;return L(e).toLocaleLowerCase(A.language).includes(ae)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
-
`));else f(null)}finally{h.current=!1,w(!1)}}return r("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[r("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[r("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),r(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),r("div",{className:"flex shrink-0 flex-wrap gap-3",children:[r("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>Y(e.target.value),className:"rounded-md ps-9"})]}),r(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Z(e)},children:[r(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),r(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[r(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):re(p,o??void 0)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ne.map((e)=>t(x,{value:e,title:e,children:re(e,o??void 0)},e))]})]})]}),r(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?r("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:r(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>se((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?r("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(o?He(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>r("section",{className:"flex flex-col gap-3",children:[r("div",{className:"flex items-center justify-between gap-3",children:[r("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===X?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===X?i("sessionList.archives.noProject"):re(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>r("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[r("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(l.updatedAt))})]}),r("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(l),children:i("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:r(ge,{showCloseButton:!C,children:[r(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(ie?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),r(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),r(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{Or};
|
package/dist/chunk-3kzmec3f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,s,Vt,n,m}from"./chunk-hqdbv5hw.js";import{F}from"./chunk-r6b9fdnm.js";import{Se}from"./chunk-bv175dn9.js";import{xe}from"./chunk-ex20n22v.js";import{Ye,ye}from"./chunk-rgn6pdaa.js";import{hasRename as D}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as x,ArchiveRestoreIcon as A,GitForkIcon as H,PencilIcon as N,Trash2Icon as R}from"lucide-react";import{useRef as B,useState as y}from"react";import{jsx as o,jsxs as b,Fragment as C}from"react/jsx-runtime";function hn({sessionRow:e,active:v,onSelect:f,onForked:S=f,onHoverCardOpenChange:c,actions:d}){let t=a(),{t:p,i18n:k}=t,h=s(),l=n((i)=>i.runStates[e.sessionId]),I=Vt(),u=()=>f(e);return o(Se,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:u,onKeyDown:(i)=>{if(i.key==="Enter"||i.key===" ")i.preventDefault(),u()},media:t.SessionMedia?o(t.SessionMedia,{sessionId:e.sessionId,state:l?.state}):void 0,state:l?.state,interruption:l?.interruption??null,title:e.title??p("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:o(E,{sessionRow:e,onDelete:()=>I(e),onForked:S,actions:d}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ye(e.updatedAt,k.language)}):void 0,actions:l!=null?o(xe,{title:p("sessionList.stop"),onStop:()=>m(t,h.stopSession(e.sessionId))}):void 0})}function E({sessionRow:e,onDelete:v,onForked:f,actions:S}){let c=a(),{t:d}=c,t=s(),p=n((r)=>D(r.agent)),k=n((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[h,l]=y(!1),[I,u]=y(!1),i=B(!1);return o(ye,{sessionRow:e,renaming:h,onRename:(r)=>{if(l(!1),r!==null)m(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[p&&o(F,{icon:o(N,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),S,e.archived?o(F,{icon:o(A,{}),label:d("sessionList.unarchive"),onClick:()=>void m(c,t.unarchive(e.sessionId))}):b(C,{children:[o(F,{icon:o(H,{}),label:d("sessionList.fork"),disabled:!k||I,onClick:()=>{if(i.current)return;i.current=!0,u(!0),m(c,t.fork(e.sessionId,e.cwd).then((r)=>{let g=t.state.sessionList.find((L)=>L.sessionId===r);if(!g)throw Error("Forked chat is missing from the session list");f(g)}).finally(()=>{i.current=!1,u(!1)}))}}),o(F,{icon:o(x,{}),label:d("sessionList.archive"),onClick:()=>void m(c,t.archive(e.sessionId))})]}),o(F,{variant:"destructive",icon:o(R,{}),label:d("sessionList.delete"),onClick:v})]})})}
|
|
2
|
-
export{hn};
|
package/dist/chunk-4gstmex3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{F}from"./chunk-r6b9fdnm.js";import{ke}from"./chunk-bv175dn9.js";import{_,ie}from"./chunk-s267ztm1.js";import{R,Y}from"./chunk-kgjdh49d.js";import{ve,oe}from"./chunk-1tb3d2x4.js";import{cn as G}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as E,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as M}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as z,DropdownMenuContent as L,DropdownMenuGroup as N,DropdownMenuItem as y,DropdownMenuRadioGroup as j,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function xo({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:k=n?"none":void 0,allowRemove:O=!0,submenu:g=!1,className:x,onOpenChange:B}){let{t}=_(),c=oe(),A=ie(),T=ke(),{collections:s,order:C}=ve(),i=C.find((o)=>s[o].sessionIds.includes(l)),[H,P]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(P(o),T(o),B?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),A(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(z,{modal:!1,open:H,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(J,{disabled:r,"data-hover-background":k,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(M,{variant:"ghost",size:"icon-sm",className:x,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:G(i!==void 0&&"fill-current")})})}),a(L,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(N,{children:e(j,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===R?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:Y(s[o],t)})]},o))})}),e(q,{}),a(N,{children:[a(y,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),O&&i!==void 0&&a(y,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(Q,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(M,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Nr({sessionId:l,allowRemove:f=!0}){let{t:n}=_();return e(xo,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(F,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
|
|
2
|
-
export{xo,Nr};
|
package/dist/chunk-52tcfvz0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ca={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function hi(e){return[...e].toSorted((o,n)=>(ca[o.kind]??99)-(ca[n.kind]??99))}function Oa(e){return e==="allow_once"||e==="allow_always"}function Ba(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{ca,hi,Oa,Ba};
|
package/dist/chunk-5q0kb3yb.js
DELETED
package/dist/chunk-5y5b3w22.js
DELETED
package/dist/chunk-677dyzb1.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{de}from"./chunk-0srja8yh.js";import{v,ht}from"./chunk-zfjpfj30.js";import{Xi}from"./chunk-24dqkjvg.js";import{t}from"./chunk-844s61q1.js";import{Qi,Yi}from"./chunk-3tsy36rq.js";import{ee}from"./chunk-2s5598rk.js";import{ce}from"./chunk-rge2pazt.js";import{isEmbeddedResource as d,isImage as g,isResourceLink as x,isText as R}from"@nyssance/codex-acp-v2/client";import{memo as h}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var Zi=h(function({item:n,messageTime:u}){let c=t(),o=Yi(n._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):ce(n),p=n.content.filter(g),l=new Set(ht(m).map((e)=>e.id)),r=new Map,a=n.content.filter((e)=>{if(x(e)){let s=v(e.uri);if(s!==null){if(!l.has(s))r.set(s,{id:s,name:e.title??e.name});return!1}return!0}return d(e)}),f=o??n.content.filter(R).map((e)=>{let s=Qi(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&p.length===0&&a.length===0&&r.size===0)return null;return y("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(ee,{block:e},`${n.id}:${s}`))}),i(Xi,{host:c,message:n,text:m,textParts:f.some((e)=>("question"in e))?f:void 0,applicationReferences:r.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...r.values()].map((e)=>i(de,{app:e},e.id))}):void 0,images:p,mentions:[],messageTime:u})]})});
|
|
4
|
-
export{Zi};
|
package/dist/chunk-6cbj9r2x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as g,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),An=d(null);function Da(){return i(An)}var En=d(null);function Ha(){return i(En)}var at=d(null);function se(){let r=i(F);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var st=()=>i(F);function Ua(){let r=i(at);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i(at);function ui({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:A,attachmentPolicy:P,value:R,onValueChange:y,attachments:U,onAttachmentsChange:L,children:B}){let S=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),T=R!==void 0,[G,J]=z(r),p=R??G,o=g({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let W=n(()=>o.current.revision,[]),x=n((t)=>{if(o.current.value=t,o.current.revision++,T)y?.(t);else J(t)},[T,y]),h=n(()=>x(""),[x]),v=U!==void 0,[K,N]=z([]),I=U??K,b=g(I);b.current=I;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(v)L?.(e);else N(e)},[v,L]),j=g(null),w=g(()=>{}),O=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=P===void 0?e:P.uniqueFiles(e,a);return[...a,...m.map((u)=>{let _=P?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:S(u),filename:u.name,size:u.size,lastModified:u.lastModified,..._===void 0?{}:{sourcePath:_}}})]})},[P,S,s]),M=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),A?.()},[A,s]),E=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(v)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[v]);let k=n(()=>{w.current?.()},[]),C=q(()=>({files:I,add:O,remove:M,clear:E,openFileDialog:k,fileInputRef:j}),[I,O,M,E,k]),H=n((t,e)=>{j.current=t.current,w.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:x,clear:h,getRevision:W,clearSubmitted:c??h},attachments:C,__registerFileInput:H}),[p,x,h,W,c,C,H]);return D(F.Provider,{value:Q,children:D(at.Provider,{value:C,children:B})})}var Ln=d(null);function f(){let r=X(),l=i(Ln),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
-
export{An,Da,En,Ha,at,se,st,Ua,ui,Ln,f};
|
package/dist/chunk-6z3nch41.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_e}from"./chunk-8pdapsc7.js";import{E}from"./chunk-nktaekpq.js";import{cn as n}from"cn";import{Item as i,ItemActions as U,ItemContent as O,ItemDescription as ne,ItemMedia as B,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function G({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function me({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(_e,"data-[active=true]:font-medium",e),...r})}function bt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(E,{children:t})})}export{U,O,ne,B,G,me,bt};
|
package/dist/chunk-799h4586.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S,gn}from"./chunk-xztxaq9k.js";import{Lt}from"./chunk-y8md080p.js";import{useEffect as p,useRef as P,useState as u}from"react";var po="providers:changed",mo="providers:managed-revoked",i=(e)=>e;function kr(){return{read:()=>i(S.providersRead()),save:(e,r,t)=>i(S.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(S.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(S.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>S.providersTest({providerId:e}),apply:()=>i(S.providersApply()),onChanged:(e)=>gn[po].listen((r)=>e(r.payload))}}function Sr(){return{bind:(e)=>S.providersAccountBind({account:e}),refresh:(e,r)=>i(S.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await S.providersClearManaged()},onRevoked:(e)=>gn[mo].listen((r)=>e(r.payload.sessionIds))}}async function Mt(e){try{return await e.apply()}catch(r){if(!Lt(r))throw r;return e.read()}}function At(e,r=console.error){let[t,d]=u(null),a=P(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
-
export{po,mo,kr,Sr,Mt,At};
|
package/dist/chunk-7m08m4m1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{k}from"./chunk-mz8tjgre.js";import{o}from"./chunk-844s61q1.js";import{dt}from"./chunk-rwh1yvqn.js";import{h,Z}from"./chunk-7qmj50a2.js";import{e}from"./chunk-rvjfb004.js";import{eo}from"./chunk-xary32dg.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Y}from"lucide-react";import{useCallback as ss,useEffect as es,useId as J,useRef as L,useState as N}from"react";import{Button as z}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as as}from"react/jsx-runtime";function Fn(s,l){let d=o((u)=>u.sessions),r=o((u)=>u.actions),[S,m]=N(()=>new Set);return(u)=>{let c=l?.(u)??null,a=eo(s.id,u,d,r,s);if(a.length===0)return c;let x=`${s.id}:${u.key}`;return{active:c?.active===!0||a.some((i)=>i.status==="running"||i.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||S.has(x),content:p(as,{children:[t(xi,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(x)?i:new Set([...i,x]))}),c?.content]})}}}function xi({sessionId:s,turn:l,parent:d,tasks:r,onExpand:S}){let{host:m}=e(),u=o((n)=>n.sessions),c=o((n)=>n.actions),a=r??eo(s,l,u,c,d),x=a.some((n)=>n.status==="running"),i=a.some((n)=>n.status==="running"||n.status==="requires_action"),[f,w]=k(`subagents:${s}:${l.key}`,i,!0),C=J();if(a.length===0)return null;let g=new Map;for(let n of a)g.set(n.status,(g.get(n.status)??0)+1);let v=[...g].map(([n,I])=>`${m.t(`subagents.${n}`)} ${I}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(z,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":f,"aria-controls":C,onClick:()=>{if(!f)S?.();w(!f)},children:[f?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),x?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",a.length]}),t("span",{className:"truncate",role:"status",children:v})]}),t("div",{id:C,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:a.map((n)=>t(ts,{task:n,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${n.key}`,onRead:()=>{S?.(),w(!0)}},n.key))})]})}function O(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function ts({task:s,cwd:l,stateKey:d,visible:r,onRead:S}){let{client:m,host:u}=e(),{t:c}=u,a=s.session,x=o((b)=>b.connection==="ready"),[i,f]=k(`subagent:${d}`,!1),[w,C]=N(!1),[g,v]=N(null),[n,I]=N(null),[R,Q]=N(null),[B,P]=N(!1),q=L(!1),_=L(!1),j=J(),W=a&&h(a.configOptions,"model"),T=s.title??c("subagents.untitled"),H=n?O(n,a):a,U=x&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),M=s.threadId,D=a?.cwd??l,E=ss(async(b)=>{if(!m.readSubagentHistory||M===null||q.current)return;_.current=!0,q.current=!0,P(!0),v(null);try{let y=await m.readSubagentHistory(M,D,b);I((K)=>K===null?y.session:O(y.session,K)),Q(y.cursor)}catch(y){v(y instanceof Error?y.message:String(y))}finally{q.current=!1,P(!1)}},[m,M,D]);es(()=>{if(r&&i&&!_.current)E(null)},[r,i,E]);let V=async()=>{if(!a)throw Error("A live child session is required for cancellation");C(!0),v(null);try{await m.cancel(a.id)}catch(b){v(b instanceof Error?b.message:String(b))}finally{C(!1)}};return p("section",{"aria-label":T,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(z,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${T} · ${c(`subagents.${s.status}`)}`,"aria-expanded":i,"aria-controls":j,onClick:()=>{if(!i)S();f(!i)},children:[i?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:T}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),U&&t(z,{variant:"ghost",size:"icon-sm",disabled:w,"aria-label":c("subagents.cancel",{name:T}),onClick:()=>{V()},children:w?t(F,{className:"size-3.5 animate-spin"}):t(Y,{className:"size-3.5"})})]}),g&&!i&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!i,className:"min-w-0 ps-4",children:[(s.description||W)&&p("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:Z(W)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(z,{variant:"ghost",size:"sm",onClick:()=>{E(n===null?null:R)},children:c("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),R&&t(z,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{E(R)},children:c("timeline.loadEarlier")}),r&&i&&(H&&H.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:H})}):!B&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:l,host:d}=e(),r=Fn(s);return t(dt,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
-
export{Fn,xi};
|
package/dist/chunk-7p3nx5bx.js
DELETED
package/dist/chunk-7qmj50a2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function W(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function h(e,t){return e.find((n)=>n.category===t&&o(n))}function Z(e){return W(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{W,h,Z};
|
package/dist/chunk-844s61q1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gr}from"./chunk-1647cyqx.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function Me({host:e,client:n,children:i}){return r(gr,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function Ae(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function te(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=Ae();return te(n.store,e)}function vt(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{Me,t,Ae,te,o,vt};
|
package/dist/chunk-88j29hzx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A}from"./chunk-1647cyqx.js";import{le}from"./chunk-7cj104ba.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function Ki({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(A,{text:t.content,streaming:!1})});if(!n(t))return null;return e(le,{entries:t.entries})}
|
|
2
|
-
export{Ki};
|
package/dist/chunk-8pdapsc7.js
DELETED
package/dist/chunk-aardrb6e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{kt}from"./chunk-fnvjemhq.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Ee(e){let t=r.get(e);if(!t)t=kt(e),r.set(e,t);return t}function hr({host:e,client:t,children:n}){let s=Ee(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Le(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Ke(e){let t=Le();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ee(Le());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Re(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Ee,hr,l,Le,Ke,i,Re};
|
package/dist/chunk-akk3k2sc.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{nt,ot,Qt}from"./chunk-h9rwby5r.js";import{st,f}from"./chunk-6cbj9r2x.js";import{cn as R}from"cn";import{forwardRef as M,useCallback as F,useEffect as T,useImperativeHandle as K,useRef as h}from"react";import{InputGroupTextarea as L}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,Sn=M(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:E,className:I,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...g},k)=>{let n=st(),p=f(),u=h(!1),s=h(!1),a=h(null),i=h(null),o=F(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||i.current!==null)return;i.current=requestAnimationFrame(()=>{i.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([l])=>{if(l&&l.contentRect.width!==t)t=l.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),i.current!==null)cancelAnimationFrame(i.current);i.current=null}},[o]),T(o,[o,n?.textInput.value,g.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
|
-
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:l,value:d}=t,v=`${d.slice(0,r)}
|
|
3
|
-
${d.slice(l)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:l}=nt(t),d=ot(t);if(r.length>0)e.preventDefault(),p.add(r);else if(l&&!d)e.preventDefault()},D=n?{value:u.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:Qt(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)Qt(e.currentTarget);o(),c?.(e)}};return K(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||s.current,getTextarea:()=>a.current}),[]),q(L,{"data-chat-input":!0,ref:a,rows:3,className:R("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",I),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=Qt(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),E?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,u.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...g,...D})});Sn.displayName="PromptInputTextarea";
|
|
4
|
-
export{Sn};
|
package/dist/chunk-b0bd8abz.js
DELETED
package/dist/chunk-bqdnxftw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Qo}from"./chunk-r9ny4bqk.js";import{e,y}from"./chunk-rvjfb004.js";import{W,h}from"./chunk-7qmj50a2.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":w,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=e(),{t:r}=l,s=h(m,"mode");if(!s)return null;let o=s.currentValue,p=W(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),M=p.find((n)=>n.value===o),I=d[o]??a,C=(n)=>{if(n===o)return;y(l,c?c(s.configId,n):f.setConfig(u,s.configId,n))};return t(Qo,{value:o,warning:o==="agent-full-access",currentName:M?.name??o,icon:t(I,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:g,label:r("composer.switchPermissionMode"),onValueChange:C,options:p.map((n)=>{let i=d[n.value]??a,v=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":v?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Jt=O(N);
|
|
2
|
-
export{Jt};
|
package/dist/chunk-bv175dn9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_e,c}from"./chunk-8pdapsc7.js";import{E}from"./chunk-nktaekpq.js";import{D}from"./chunk-sjes4cxr.js";import{I}from"./chunk-cdgfr4n0.js";import{Xe,Ue,Je}from"./chunk-rvbbb9rf.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as u}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as M,useState as O}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function P(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:u("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:u("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function g({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:u("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function p({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:u("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function J({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:m,wrapHeader:f,onHeaderClick:b,children:y}){let R=()=>{b?.(),t(!o)},x=u(Xe,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),S=d(K,{children:[r!=null&&e(g,{children:r}),m??e(E,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Je,{content:s!==void 0?e(Ue,{className:u("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),k=m==null?d("div",{"data-active":l?"":void 0,title:n,className:u(x,c),onClick:R,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),R()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?k:f(k),o&&e(P,{className:"mt-0.5",children:y})]})}var _=T(()=>{}),G=T(()=>{});function zt(){return L(G)}function ke(){return L(_)}function Se({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:m,listeningPorts:f,onOpenPort:b,accessory:y,meta:R,hint:x,actions:S,className:k,...v}){let H=d("div",{"data-slot":"navigation-session-item","data-active":o,className:u(Xe,_e,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(m||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...v,children:[e(g,{children:t!=null?e(D,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(E,{className:u("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(E,{className:"text-muted-foreground text-xs",children:C}),m&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:m}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(Je,{content:y!=null?e(Ue,{children:y}):R??e(Ue,{}),actions:S}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return H;return e(q,{row:H,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=O(!1),[s,a]=O(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(_.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return I(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
-
export{P,g,p,J,zt,ke,Se};
|
package/dist/chunk-crg1ttkp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{H}from"./chunk-2wex96dp.js";import{t}from"./chunk-844s61q1.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Wo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(H,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{Wo};
|
package/dist/chunk-der9jtk9.js
DELETED
package/dist/chunk-eg9c12vk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{pr}from"./chunk-zfjpfj30.js";import{Pe}from"./chunk-5q0kb3yb.js";import{ui,f}from"./chunk-6cbj9r2x.js";import{ni,oi,ii,ri,ai,H}from"./chunk-2wex96dp.js";import{t,o}from"./chunk-844s61q1.js";import{e}from"./chunk-rvjfb004.js";import{Xo}from"./chunk-0r4b11t4.js";import{d,T,it}from"./chunk-z9ch23p0.js";import{Cn}from"./chunk-j5trhvx8.js";import{Go}from"./chunk-1axvr26t.js";import{Oo,Bo}from"./chunk-pr5wv14q.js";import{Sn}from"./chunk-akk3k2sc.js";import{Rn}from"./chunk-fkmka3v9.js";import{r,pi,K,rn}from"./chunk-9n2wwk4g.js";import{Xt}from"./chunk-n13y99dj.js";import{Be,nn}from"./chunk-hhdeh622.js";import{an,ln}from"./chunk-26bm75r2.js";import{mi}from"./chunk-f2wy8jza.js";import{tn}from"./chunk-vxn8gfy4.js";import{Zo}from"./chunk-vkbaa74h.js";import{Jt}from"./chunk-bqdnxftw.js";import{en}from"./chunk-q2z9w661.js";import{Yo}from"./chunk-snee6rb9.js";import{Wo}from"./chunk-crg1ttkp.js";import{ti}from"./chunk-y8sc8n3j.js";import{Yt}from"./chunk-sygx6n0s.js";import{hasFuzzyFileSearch as jt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Gt}from"lucide-react";import{useCallback as _,useEffect as Ct,useLayoutEffect as et,useMemo as pt,useRef as L,useState as D}from"react";import{jsx as p,jsxs as E,Fragment as Qt}from"react/jsx-runtime";var Vt=["image/png","image/jpeg","image/webp","image/gif"],st=[];async function $t(n){let A=await(await fetch(n.url)).blob();return new Promise((P,U)=>{let N=new FileReader;N.onerror=()=>U(N.error),N.onload=()=>{let G=N.result;P(G.slice(G.indexOf(",")+1))},N.readAsDataURL(A)})}function qt(n){let{t:A}=t(),P=f();return p(H,{"aria-label":A("composer.attachImage"),title:A("composer.attachImage"),onClick:()=>P.openFileDialog(),...n,children:p(Gt,{className:"size-4"})})}function Wt({session:n,onSubmit:A,onShellCommand:P,onHandOff:U,modelSelector:N,modelMenu:G,inputHeader:mt,actions:Mt,leadingTools:Et,agentControls:rt=!0,placeholder:Rt,children:Dt,attachmentPolicy:Nt,predictions:St=!0,disabled:kt=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:z,client:M}=e(),{t:x}=z,S=_((i)=>{if(z.reportError)z.reportError(i);else console.error(i)},[z]),[ut,W]=D(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[R,Ot]=D(()=>r.get(n.id)?.attachments??st),[I,Y]=D(()=>r.get(n.id)?.mentions??[]),[u,k]=D(()=>r.get(n.id)?.apps??[]);Ct(()=>{if(!M.installedApps||!r.get(n.id)?.apps?.length)return;let i=!0;return M.installedApps().then(({apps:a})=>{if(!i)return;let l=new Map(a.map((g)=>[g.id,g]));k((g)=>g.map((s)=>{let y=l.get(s.id);return y?{...s,iconUrl:y.iconUrl,iconUrlDark:y.iconUrlDark}:s}))},S),()=>{i=!1}},[M,n.id,S]);let[ft,nt]=D(()=>(r.get(n.id)?.apps?.length??0)>0),V=L(void 0),X=L(void 0);et(()=>{if(u.length>0)nt(!0)},[u.length]);let ot=R.some((i)=>Be(i)&&i.pastedText.status!=="ready"),[F,gt]=D(!1),[q,Ut]=D(!1),[at,ht]=D(!1),h=L(null),xt=L(null),c=L(ut),O=_((i)=>{xt.current?.(),c.current={text:i,revision:c.current.revision+1},W(c.current)},[]),Bt=Yo(n,O,k,u.length>0||I.length>0||R.length>0),bt=pt(()=>({read:()=>{let a=h.current?.getTextarea(),l=a===null||a===void 0?[c.current.text.length,c.current.text.length]:[a.selectionStart,a.selectionEnd];return{target:n.id,...c.current,selection:l}},compareAndSet(a,l,g){if(h.current?.isComposing())return null;if(a.target!==n.id||a.revision!==c.current.revision)return null;c.current={text:l,revision:c.current.revision+1},W(c.current);let s=h.current?.getTextarea();if(s!==null&&s!==void 0)s.value=l,s.setSelectionRange(g[0],g[1]);return{target:n.id,...c.current,selection:g}}}),[n.id]),j=L(null),yt=_((i)=>(j.current=i,()=>{if(j.current===i)j.current=null}),[]),J=n.state!=="idle",b=P!==void 0&&u.length===0&&v.startsWith("!"),ct=(ft||u.length>0)&&!b,w=!kt&&!dt&&n.attached&&!n.restoring&&!n.readOnly,B=!n.readOnly&&(Ft||w),Q=en(n,w&&!F&&!q&&!ot&&!at,v.length>0||R.length>0||I.length>0||u.length>0,St&&!b),Pt=Q.invalidate;et(()=>{r.set(n.id,{text:v,attachments:R,mentions:I,...u.length>0?{apps:u}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,R,I,u]),et(()=>pi(n.id,Ot),[n.id]),et(()=>rn(n.id,(i)=>{if(!B||F)throw Error("The composer cannot take text now; try again later");if(v.length||R.length||I.length||u.length)throw Error("The composer already has a draft; send or clear it first");O(i)}),[n.id,B,F,v,R,I,u,O]);let vt=o((i)=>jt(i.agent)),_t=pt(()=>vt&&w?async(i)=>Xt((await M.fuzzyFileSearch({query:i,roots:[n.cwd],cancellationToken:null})).files):void 0,[M,vt,w,n.cwd]),lt=_((i)=>{Y((a)=>a.includes(i)?a:[...a,i])},[]);Ct(()=>{h.current?.focus()},[]);let It=_(async({text:i,files:a})=>{let l=P!==void 0&&u.length===0&&i.startsWith("!")?i.slice(1):null;if(l!==null){if(l.trim().length===0)return;if(a.length||I.length||u.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let g=i.trim();if(g.length===0&&a.length===0&&I.length===0&&u.length===0)return;let s=j.current;gt(!0);let y=r.get(n.id),Kt=c.current.revision,Z=null;try{let C=u.map((m)=>({type:"resource_link",name:m.name,uri:`app://${m.id}`}));for(let m of I){let tt={kind:"file",absPath:m};C.push({type:"resource_link",uri:an(tt),name:ln(tt)})}let Tt=pr(g,u);if(Tt.length>0)C.push({type:"text",text:Tt});for(let m of a)if(Be(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");C.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else C.push({type:"image",data:await $t(m),mimeType:m.mediaType});if(c.current.revision===Kt&&r.get(n.id)===y)c.current={text:"",revision:c.current.revision+1},Z=c.current.revision,W(c.current),Y([]),k([]),V.current=void 0,X.current=void 0,K(n.id,()=>st),r.set(n.id,{text:"",attachments:st,mentions:[],apps:[],modelId:y?.modelId??null}),h.current?.resetHeight();if(l!==null&&P)await P(l);else if(A)if(s===null)await A(C);else await A(C,(m)=>{if(s.signal.aborted||j.current!==s)return;s.accept(m),U?.(n.id,m)});else if(s===null)await M.prompt(n.id,C);else{let m=await M.prompt(n.id,C);s.accept(m)}Pt();for(let m of y?.attachments??[])if(m.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((tt)=>tt.id===m.id))URL.revokeObjectURL(m.url)}catch(C){if(y&&Z!==null&&c.current.revision===Z&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:y.text,revision:Z+1},W(c.current),Y(y.mentions),k(y.apps??[]),r.set(n.id,y),K(n.id,()=>y.attachments);throw C}finally{gt(!1),h.current?.focus()}},[M,n.id,n.state,I,u,A,P,U,Pt]),Lt=()=>{M.cancel(n.id).catch(S)},zt=_((i)=>{let a=i.code==="max_total_size"?Object.assign(Error(x("composer.imageTooLargeTitle")),{description:x("composer.imageTooLargeDescription",{mb:Pe})}):Object.assign(Error(x("composer.unsupportedAttachmentTitle")),{description:x("composer.unsupportedAttachmentDescription")});S(a)},[S,x]),Ht=pt(()=>({session:n,ready:w,inputReady:B,sending:F,textareaRef:h,draft:bt,interruptRef:xt,observeReceipts:yt,addMention:lt,setAdding:Ut,shellMode:b,handsFree:!b&&(A===void 0||U!==void 0)}),[n,w,B,F,bt,yt,lt,A,U,b]),wt=z.writeTextAttachment,At={className:"min-h-10 bg-transparent text-sm font-normal",ref:h,rows:2,onKeyDown:Bt,bashMode:P!==void 0,disabled:!B,"aria-label":x("composer.placeholder"),placeholder:b?"! command":Q.text||Rt||(J?x("composer.steerPlaceholder"):x("composer.placeholder")),onPasteCapture:(i)=>{if(!ct&&!b&&!i.currentTarget.disabled&&![...i.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/"))){let a=it(i.clipboardData);if(a?.apps.length){i.preventDefault();let l=i.currentTarget,g=d(a),s=T([...l.value.slice(0,l.selectionStart).split(""),...g,...l.value.slice(l.selectionEnd).split("")]);X.current={text:v,apps:[]},V.current=l.selectionStart+g.length,nt(!0),k(s.apps),O(s.text);return}}if(wt)nn(i,n.id,x("composer.pastedTextFilename"),wt)}};return p(Rn,{value:Ht,children:p("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:E("div",{className:"relative",children:[mt&&p("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:mt}),E(ui,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:O,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},W(c.current)},attachments:R,onAttachmentsChange:(i)=>K(n.id,()=>i),children:[rt&&p(Go,{bashMode:P!==void 0,handleRef:h,commands:n.commands,searchFiles:_t,onMention:lt,onSearchError:S,forcedOpen:at,onForcedOpenChange:ht,emptyLabel:x("composer.noCommands"),fileStatusLabels:{loading:x("composer.searchingFiles"),empty:x("composer.noMatchingFiles")}},ct?"inline":"textarea"),E(ni,{"data-shell-mode":b||void 0,bashMode:P!==void 0,globalDrop:!0,multiple:!0,accept:Vt.join(","),onError:zt,onSubmit:It,onSubmitAsync:It,onSubmitError:S,canSubmit:()=>w&&!F&&!q&&!ot&&(!b||!J&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,E(ii,{className:"px-3 pt-3 pb-0 empty:hidden",children:[q&&p("span",{role:"status",className:"text-muted-foreground text-xs",children:x("composer.addingFiles")}),p(mi,{mentions:I,onRemove:(i)=>Y((a)=>a.filter((l)=>l!==i))}),p(Bo,{children:(i)=>Be(i)?p(Zo,{data:i,sessionId:n.id}):p(Oo,{data:i,t:x})})]}),E(oi,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(i)=>{if(!Q.text||h.current?.isComposing()||i.nativeEvent.isComposing||i.nativeEvent.keyCode===229||i.shiftKey||i.ctrlKey||i.altKey||i.metaKey||i.target!==h.current?.getTextarea())return;if(i.key==="Tab")i.preventDefault(),i.stopPropagation(),O(Q.text)},children:[b&&p("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),ct?p(Cn,{...At,applications:u,onApplicationsChange:k,initialCaret:V.current,initialUndo:X.current}):p(Sn,{...At,autoFocus:ft&&b})]}),p(ri,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:E("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[E("div",{className:"flex min-w-0 items-center gap-[5px]",children:[p(qt,{className:"text-foreground",disabled:!B}),Et,rt&&E(Qt,{children:[p(Wo,{textareaRef:h,menuOpen:at,onOpenChange:ht,disabled:!w||n.commands.length===0}),p(Xo,{disabled:!w||b,focusAfterSelect:()=>(h.current?.focus(),h.current?.getTextarea()??null),onSelect:(i)=>{let a=h.current;if(a?.insertApplication){a.insertApplication(i);return}let l=a?.getTextarea()?.selectionStart??v.length;X.current={text:v,apps:[]},V.current=l+1,nt(!0),O(c.current.text),k((g)=>g.some((s)=>s.id===i.id)?g:[...g,{...i,offset:l}])}}),p(Jt,{sessionId:n.id,options:n.configOptions,disabled:!w})]})]}),E(ai,{className:"w-full min-w-0 items-center justify-end gap-1",children:[rt&&p(Yt,{session:n}),N??p(tn,{...G,sessionId:n.id,options:n.configOptions,disabled:!w}),Mt,p(ti,{active:J,sending:F||dt||q,ready:w&&!ot&&(!b||!J&&v.slice(1).trim().length>0),hasMentions:I.length>0||u.length>0,onStop:Lt})]})]})})]})]})]})})})}
|
|
2
|
-
export{Wt};
|
package/dist/chunk-fkmka3v9.js
DELETED
package/dist/chunk-fp3rp1qc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{mt}from"./chunk-19yjze8m.js";import{$i}from"./chunk-1sxmqb44.js";import{t}from"./chunk-844s61q1.js";import{ee}from"./chunk-2s5598rk.js";import{Zn}from"./chunk-rge2pazt.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,s)=>l(ee,{block:o.content},`${n.id}:${s}`))]})}var Gn=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(Zn),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...$i(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l(mt,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
|
|
2
|
-
export{Gn};
|
package/dist/chunk-h9rwby5r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function ha(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function nt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(ha(t,o))}return{imageFiles:n,sawNonImageFile:i}}function ot(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Zt(e){return e.replace(s,"")}function oa(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Qt(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Zt(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-oa(n,i)),r=Math.max(0,o-oa(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{ha,nt,ot,Zt,oa,Qt};
|
package/dist/chunk-hhdeh622.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ie}from"./chunk-3pcbgsm6.js";import{r,K,on}from"./chunk-9n2wwk4g.js";var ei=5000;function Be(t){return"pastedText"in t}function rt(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;K(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Ie(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),on(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function nn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<ei)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};K(e,(i)=>[...i,o]),rt(e,o,n)}
|
|
2
|
-
export{ei,Be,rt,nn};
|
package/dist/chunk-j5trhvx8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Pn,d,T,In,Tn,it}from"./chunk-z9ch23p0.js";import{Vo,wn,jo,kn}from"./chunk-qyj4d255.js";import{nt,ot,Zt}from"./chunk-h9rwby5r.js";import{se,f}from"./chunk-6cbj9r2x.js";import{cn as F}from"cn";import{forwardRef as O,useImperativeHandle as q,useLayoutEffect as N,useRef as u}from"react";import{jsx as z}from"react/jsx-runtime";var B=(a,D)=>a.text===D.text&&JSON.stringify(a.apps)===JSON.stringify(D.apps),Cn=O((a,D)=>{let h=se(),L=f(),c=u(null),H=u(null),r=u(T(d({text:h.textInput.value,apps:a.applications}))),s=u({start:a.initialCaret??d(r.current).length,end:a.initialCaret??d(r.current).length}),g=u(a.initialUndo?[{...a.initialUndo,selection:{start:Math.max(0,(a.initialCaret??1)-1),end:Math.max(0,(a.initialCaret??1)-1)}}]:[]),C=u([]),m=u(!1),y=u(!1),E=u(null),p=u({props:a,controller:h,attachments:L});p.current={props:a,controller:h,attachments:L};let l=()=>{if(c.current&&document.activeElement===c.current)s.current=jo(c.current,r.current.apps,s.current);return s.current},A=()=>{let e=c.current;if(!e)return;let t={...s.current};e.focus(),s.current=t,kn(e,t)},P=()=>({...r.current,selection:l()}),I=(e,t)=>{if(!c.current)return;if(Vo(c.current,e),c.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),s.current=t,document.activeElement===c.current)kn(c.current,t)},S=(e,t,n=!0,i=!0)=>{if(i&&!B(r.current,e)){if(g.current.push(E.current??P()),g.current.length>100)g.current.shift();C.current=[]}if(E.current=null,r.current=e,s.current=t,n)I(e,t);p.current.props.onApplicationsChange(e.apps),p.current.controller.textInput.setInput(e.text)},b=(e)=>{let t=l(),n=d(r.current),i=d(e),o=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((x)=>typeof x==="string"?[]:[x.id])),k=i.filter((x)=>typeof x==="string"||!o.has(x.id)),v=T([...n.slice(0,t.start),...k,...n.slice(t.end)]),M=t.start+k.length;S(v,{start:M,end:M})},R=(e)=>{let n=(e?g.current:C.current).pop();if(!n)return;(e?C.current:g.current).push(P()),S({text:n.text,apps:n.apps},n.selection,!0,!1)},w=()=>{if(!c.current)return;let e=T(wn(c.current,r.current.apps)),t=l();if(m.current)return;let n=Zt(e.text),i=n===e.text?e:T(d({text:n,apps:e.apps}));S(i,t,n!==e.text)};N(()=>{let e=c.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>r.current.text,set:(o)=>{r.current=T(d({text:o,apps:r.current.apps})),I(r.current,s.current)}},selectionStart:{configurable:!0,get:()=>In(d(r.current),l().start)},selectionEnd:{configurable:!0,get:()=>In(d(r.current),l().end)},setSelectionRange:{configurable:!0,value:(o,k)=>{let v=d(r.current);s.current={start:Tn(v,o),end:Tn(v,k)},I(r.current,s.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(p.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),H.current=e,I(r.current,s.current),A();let n=()=>{l()},i=(o)=>{if(p.current.props.disabled){o.preventDefault();return}if(m.current||o.isComposing)return;if(o.inputType==="historyUndo"||o.inputType==="historyRedo")o.preventDefault(),R(o.inputType==="historyUndo");else if(o.inputType==="insertParagraph"||o.inputType==="insertLineBreak")o.preventDefault(),b({text:`
|
|
2
|
-
`,apps:[]});else E.current=P()};return e.addEventListener("beforeinput",i),e.addEventListener("change",w),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",i),e.removeEventListener("change",w),document.removeEventListener("selectionchange",n),H.current=null}},[]),N(()=>{if(m.current)return;let e=T(d({text:h.textInput.value,apps:a.applications}));if(B(e,r.current))return;let t=l();r.current=e,I(e,t)},[h.textInput.value,a.applications]),q(D,()=>({focus:A,getTextarea:()=>H.current,isComposing:()=>m.current||y.current,resetHeight:()=>{g.current=[],C.current=[]},insertApplication:(e)=>{if(A(),r.current.apps.some((t)=>t.id===e.id))return;b({text:"",apps:[{...e,offset:0}]})}}),[]);let U=(e)=>{if(m.current||y.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(p.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),R(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)b({text:`
|
|
3
|
-
`,apps:[]});else{let t=c.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=l(),n=d(r.current);if(t.start!==t.end){e.preventDefault(),b({text:"",apps:[]});return}let i=e.key==="Backspace"?t.start-1:t.start;if(i>=0&&i<n.length&&typeof n[i]!=="string")e.preventDefault(),S(T([...n.slice(0,i),...n.slice(i+1)]),{start:i,end:i});else if(e.key==="Backspace"&&n.length===0){let o=p.current.attachments.files.at(-1);if(o)e.preventDefault(),p.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},K=(e)=>{let t=l();if(t.start===t.end)return;let n=d(r.current).slice(t.start,t.end),i=T(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((o)=>typeof o==="string"?o:`${o.name} `).join("")),e.clipboardData.setData(Pn,JSON.stringify({version:1,...i})),e.type==="cut"&&!a.disabled)b({text:"",apps:[]})};return z("div",{ref:c,role:"textbox","aria-multiline":"true","aria-label":a["aria-label"],"aria-disabled":a.disabled||void 0,contentEditable:!a.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":a.placeholder,"data-empty":r.current.text.length===0&&r.current.apps.length===0,className:F("relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto whitespace-pre-wrap break-words bg-chat-input-bg p-0 pe-2.5 leading-(--chat-input-line-height) outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:text-chat-input-placeholder data-[empty=true]:before:content-[attr(data-placeholder)]",a.className),onInput:w,onKeyDown:U,onCompositionStart:()=>{E.current=P(),m.current=!0,y.current=!1},onCompositionEnd:()=>{m.current=!1,w(),y.current=!0,requestAnimationFrame(()=>{y.current=!1})},onPasteCapture:(e)=>a.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||a.disabled)return;let{imageFiles:t,sawNonImageFile:n}=nt(e.clipboardData.items);if(e.preventDefault(),t.length){L.add(t);return}if(n&&!ot(e.clipboardData.items))return;b(it(e.clipboardData)??{text:Zt(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:K,onCut:K,onDrop:(e)=>{e.preventDefault()}})});Cn.displayName="PromptInputInline";
|
|
4
|
-
export{Cn};
|
package/dist/chunk-mz8tjgre.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as r,useState as x}from"react";var t=new Map;function k(o,e,a=!1){let[p,S]=x(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let b=r((c)=>{S((s)=>{let f=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(f):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,b]}
|
|
2
|
-
export{k};
|
package/dist/chunk-nktaekpq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{useRef as u,useState as M}from"react";import{jsx as l}from"react/jsx-runtime";var d=45,w=8;function E({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=M(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>w)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/d}s linear`},children:p})})}
|
|
2
|
-
export{E};
|
package/dist/chunk-nrvd7njv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,s,n,m}from"./chunk-hqdbv5hw.js";import{D}from"./chunk-sjes4cxr.js";import{P,J,Se}from"./chunk-bv175dn9.js";import{we,j,ae}from"./chunk-rhcpe6m6.js";import{To}from"./chunk-5y5b3w22.js";import{xe}from"./chunk-ex20n22v.js";import{ye}from"./chunk-rgn6pdaa.js";import{be}from"./chunk-zntkqbcv.js";import{Gt}from"./chunk-mmywt5fq.js";import{Po}from"./chunk-tme1d6xh.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as G,useMemo as A}from"react";import{Kbd as K}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as C,Fragment as T}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 qr({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=a(),{t:N}=h,p=n((t)=>t.runStates),v=n((t)=>t.drafts),u=n((t)=>t.sessionList),g=j((t)=>t.activityOrder),f=A(()=>g.flatMap((t)=>{let e=p[t];return e&&we({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:M(u,e)}]:[]}),[g,p,v,u]),b=A(()=>{let t=new Map;for(let e of f){let r=e.sid===i||l?.(e.sid)?"foreground":"background",S=t.get(r)??[];S.push(e),t.set(r,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,l]),y=j((t)=>t.activityCollapsedGroups),o=ae(),L=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),x=(t)=>{if(w?.(t))return;d(t)},O=Po();G(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!To(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 S=L[r-1];if(!S)return;e.preventDefault(),x(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let I=(t)=>{let e=L.indexOf(t);return c(H,{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&&O?c(K,{children:be(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(P,{children:b.map((t)=>t.key==="foreground"?c(P,{children:t.rows.map(I)},t.key):c(J,{open:!y.has(t.key),onOpenChange:(e)=>{let r=new Set(y);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(I)},t.key))})}function H({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:p,hint:v}){let u=a(),g=s(),{t:f}=u,b=i.title??f("sessionList.untitled"),y=Gt(i.sessionId,d);return C(T,{children:[c(Se,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(ye,{sessionRow:i,actions:N}),onClick:p,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),p()},state:d,interruption:l,title:b,preview:y,listeningPorts:R,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:h,hint:v,actions:c(xe,{title:f("sessionList.stop"),onStop:()=>m(u,g.stopSession(i.sessionId))})}),k.map((o)=>C("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(D,{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{qr};
|
package/dist/chunk-p95ndy0b.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-8pdapsc7.js";import{P,p}from"./chunk-bv175dn9.js";import{yt}from"./chunk-yzhqbz2p.js";import{Ee,l,Le,Ke,i}from"./chunk-aardrb6e.js";import{U,O,ne,B,G,me,bt}from"./chunk-6z3nch41.js";import{pe}from"./chunk-gnpvd7wg.js";import{$e}from"./chunk-ggkjq8rk.js";import{x}from"./chunk-btrg3ywt.js";import{wt,L}from"./chunk-2761tcb3.js";import{z,fe}from"./chunk-h1embxgj.js";import{Ct}from"./chunk-7wj3dcpj.js";import{xt}from"./chunk-6g5z3pff.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as se,CircleArrowUpIcon as ie,MoreVerticalIcon as le,PlusIcon as F,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as de,XIcon as ue}from"lucide-react";import{memo as ge,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Se}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as E}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Z}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function De({plugin:t,marketplace:d}){let{t:u}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=u(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(se,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?u("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(E,{"aria-hidden":"true"}):e(F,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Me({plugin:t,marketplace:d,actions:u,onOpen:g}){let a=X(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(me,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(B,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(L,{name:t.name})})}),s(O,{className:"pointer-events-none relative min-w-0",children:[e(bt,{className:"mb-0.5",children:T(t)}),e(ne,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(ne,{"data-toolbox-metadata":"",children:r})]}),e(U,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function J(){return Ke((t)=>t.connection==="ready"&&ee(t.agent))}var D=48;function ze({marketplace:t,plugins:d,onOpen:u}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/D)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(Pe,{children:[e(Ie,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(le,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(G,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*D,(r+1)*D).map((n)=>e(Me,{onOpen:u,plugin:n,marketplace:t,actions:e(De,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>D&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/D)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*D>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Oe=ge(function({query:d,onOpen:u}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),X(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:h})=>({marketplace:v,plugins:h.filter(({plugin:y,text:b})=>d===""?v.path!==null||n.has(y.id):b.includes(d)).map(({plugin:y})=>y)}))},[m,f,d]);return s(Z,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:u},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Be(){let{t}=l(),d=J(),u=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,h]=I(!1),[y,b]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),b(null);try{await u({source:N}),m(""),h(!1)}catch(S){b(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(E,{}):e(ie,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)h(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(F,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(Se,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(E,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Te({onOpen:t,query:d}){let u=J(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,f=ve(d.trim().toLowerCase());return e(x,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${z} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(pe,{}):e(Oe,{query:f,onOpen:t})]})})}function fr({cwd:t,active:d,extensions:u,onOpenCatalog:g}){let{t:a}=l(),f=Le(),m=Ee(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[h,y]=I("plugins"),[b,A]=I({plugins:"",skills:""}),N=h==="skills"?b.skills:b.plugins,S=(o)=>A((M)=>({...M,[h]:o})),Y=Ke((o)=>JSON.stringify([...new Set(o.sessionList.map((M)=>$e(M.cwd,o.projectContext)).filter((M)=>M!==null))].toSorted())),H=JSON.stringify([...new Set([$e(t,f.state.projectContext),...JSON.parse(Y)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),q=a(h==="skills"?"plugins.skills.search":"plugins.search"),[w,V]=I(null),C=J();K(()=>{if(!d||!C)return;if(m.getState().loadedScope!==H)r(JSON.parse(H))},[d,C,r,H,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),y("plugins"),V(o)},_=(o)=>{g?.(),y(o),V(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(wt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(p,{className:`${c} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(p,{className:`${c} h-8 gap-2 px-2`,active:!u?.active&&h===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(x,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(P,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(E,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(p,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!u?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(L,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(Z,{children:[w&&e(Ct,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(fe,{children:e(yt,{title:a(`plugins.headings.${h}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":q,value:N,onChange:(o)=>S(o.target.value),placeholder:q}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ue,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(E,{}):e(re,{})}),h==="plugins"&&e(Be,{})]})})}),(h==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[h==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Te,{query:b.plugins,onOpen:j})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(xt,{query:b.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
-
export{fr};
|
package/dist/chunk-qyj4d255.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{d}from"./chunk-z9ch23p0.js";function Vo(a,s){let i=document.createDocumentFragment(),o="",r=()=>{if(o)i.append(document.createTextNode(o));o=""};for(let e of d(s)){if(typeof e==="string"){o+=e;continue}r();let c=document.createElement("span");c.contentEditable="false",c.dataset.inlineApp=e.id,c.setAttribute("aria-label",e.name),c.className="inline-flex items-center gap-1 align-middle whitespace-nowrap text-xs leading-none font-normal text-[color:var(--app-reference-foreground,var(--color-blue-500))] select-all me-1";let t=(u,m)=>{let f=document.createElement("img");f.src=u,f.alt="",f.draggable=!1,f.className=`size-3 shrink-0 object-contain ${m}`,c.append(f)};if(e.iconUrl)t(e.iconUrl,e.iconUrlDark?"dark:hidden":"");if(e.iconUrlDark)t(e.iconUrlDark,e.iconUrl?"hidden dark:block":"");let l=document.createElement("span");l.textContent=e.name,c.append(l),i.append(c);let p=document.createElement("span");p.dataset.inlineAnchor="",p.textContent="",i.append(p)}r();let n=document.createElement("br");n.dataset.inlineCaret="",i.append(n),a.replaceChildren(i)}function wn(a,s){let i=[],o=new Map(s.map((n)=>[n.id,n])),r=(n)=>{if(n.nodeType===Node.TEXT_NODE){i.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){i.push(...(n.textContent??"").replace("","").split(""));return}let e=n.dataset.inlineApp;if(e!==void 0){let t=o.get(e);if(t)i.push(t);return}if(n.tagName==="BR"){i.push(`
|
|
2
|
-
`);return}if((n.tagName==="DIV"||n.tagName==="P")&&i.length&&i.at(-1)!==`
|
|
3
|
-
`)i.push(`
|
|
4
|
-
`)}for(let e of n.childNodes)r(e)};for(let n of a.childNodes)r(n);return i}function jo(a,s,i){let o=window.getSelection();if(!o?.rangeCount)return i;let r=o.getRangeAt(0);if(!a.contains(r.startContainer)||!a.contains(r.endContainer))return i;let n=(e,c)=>{let t=document.createRange();return t.selectNodeContents(a),t.setEnd(e,c),wn(t.cloneContents(),s).length};return{start:n(r.startContainer,r.startOffset),end:n(r.endContainer,r.endOffset)}}function kn(a,s){let i=(n)=>{let e=Math.max(0,n);for(let[c,t]of[...a.childNodes].entries())if(t.nodeType===Node.TEXT_NODE){let l=t.textContent?.length??0;if(e<=l)return[t,e];e-=l}else if(t instanceof HTMLElement&&t.hasAttribute("data-inline-anchor")){let l=t.firstChild,p=(t.textContent??"").replace("","").length;if(l&&e<=p)return[l,e+(l.textContent?.startsWith("")?1:0)];e-=p}else if(t instanceof HTMLElement&&t.dataset.inlineApp!==void 0){if(e===0)return[a,c];e--}else if(t instanceof HTMLElement&&t.tagName==="BR")return[a,c];return[a,a.childNodes.length]},o=document.createRange();o.setStart(...i(s.start)),o.setEnd(...i(s.end));let r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}
|
|
5
|
-
export{Vo,wn,jo,kn};
|
package/dist/chunk-r29b0ap8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function ro(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function pn(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Fe(t){return t.type==="array"}function St(t){return(Fe(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{ro,pn,Fe,St};
|
package/dist/chunk-rgn6pdaa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-hqdbv5hw.js";import{Bt}from"./chunk-r6b9fdnm.js";import{E}from"./chunk-nktaekpq.js";import{zt,ke}from"./chunk-bv175dn9.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function Ye(t,n){let i=n==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:i})}function ye({sessionRow:t,actions:n,shortcut:i,renaming:r=!1,onRename:m}){let{t:s,i18n:C,PathAction:u}=a(),f=ke(),y=zt();g(()=>{f(r)},[r,f]);let[I,p]=D(t.title??"");g(()=>{if(r)p(t.title??"")},[r,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?s("sessionList.archived"):t.updatedAt!==null?Ye(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Bt,{title:r?o(w,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":s("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(E,{className:"min-w-0 flex-1",children:t.title??s("sessionList.untitled")})}),i]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:l||n!==void 0?h(O,{children:[l,l&&n!==void 0&&o(M,{}),n]}):void 0})}
|
|
2
|
-
export{Ye,ye};
|
package/dist/chunk-rvjfb004.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Me}from"./chunk-844s61q1.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 un({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Me,{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{un,e,y};
|
package/dist/chunk-rwh1yvqn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{bi}from"./chunk-bp6f5tv8.js";import{Me,t,Ae,o,vt}from"./chunk-844s61q1.js";import{tr,ft,Qn,ir,rr}from"./chunk-rge2pazt.js";import{gt}from"./chunk-rb4p3h5b.js";import{Hi}from"./chunk-5zq0s9fd.js";import{Fi}from"./chunk-5s85tvas.js";import{Pi,Ii}from"./chunk-jpm15hcd.js";import{cr,dr}from"./chunk-cx1sg5dt.js";import{_i}from"./chunk-q4f8zazc.js";import{Di}from"./chunk-vk7kqa6a.js";import{Zi}from"./chunk-677dyzb1.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as qe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Oe}from"lucide-react";import{useCallback as M,useEffect as N,useLayoutEffect as ve,useMemo as Q,useRef as h,useState as U}from"react";import{flushSync as Te}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var ye=24;function Fe(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ke({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function Ue({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=Ae(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return N(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((_)=>{if(_.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function _e(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:tr(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function dt(e){return i(Me,{host:e.host,client:e.client,children:i(We,{...e})})}function We({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=Ke}){let v=Ae(),A=t(),T=o((n)=>n.historyNavigation[e.id]),c=_e(e,T?.turns),L=c.at(-1)?.key,xe=ir(e,c),y=e.state==="running"||e.state==="requires_action",W=Q(()=>Fi(c,T),[c,T]),Z=Q(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),he=Q(()=>S===void 0?[]:Pi(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,D=h(c);D.current=c;let[l,be]=U(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),we=o((n)=>ze(n.agent).sessionRetry),te=x!==void 0;N(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[Re,Se]=U(!1),O=h(null),[ke,ne]=U(!1),re=h(0),j=h({key:L,running:y});j.current={key:L,running:y};let[ie,F]=U(0),I=h(0),H=h(null);I.current=ie;let Pe=M(()=>{if(H.current!==null)H.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:X,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=Di(l,y,Pe),se=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&j.current.running&&j.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Fe({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});H.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,Te(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ae,y,l,c]);ve(()=>{if(!w||y)return;ue(),H.current=null,I.current=0,F(0)},[w,ue,y]);let G=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);N(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(Se(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)G()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,G,l,e.restoring,T?.complete]),N(()=>{cr({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),N(()=>()=>dr(e.id),[e.id]);let Ie=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=D.current.find((m)=>m.user?.id===(n.messageId??n.id))??D.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ge(P)===n.nativeTurnId));if(!r?.user)return null;let p=r.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),He=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);N(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=H.current,r=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,Te(()=>F(p)),p===0)H.current=null}if(p>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),N(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);ve(()=>{if(l===null)return;let n=c.at(-1),a=ce.current;if(ce.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))H.current=null,I.current=0,F(0),se()}else if(n.key!==a.key)X()},[se,w,y,X,l,e.turnEndedAt,c]);let Ne=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(Ue,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!ke})}let p=c.indexOf(r),f=r.key===xe,m=rr(e,c,p),P=!f&&m.continued,K=r.key===L,q=r.errors.at(-1),de=q===void 0?null:Ve(q),J=q===void 0?null:ge(q),Ee=!e.subagent&&K&&!f&&k&&we&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&qe(de).kind==="overloaded"&&J!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(r)??null,pe=s?.(r)??null,Le=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||f||me!==null||ft(r)||Qn(r)||K&&(e.error!==null||e.lastStopReason==="cancelled"),fe=r.user===null?null:gt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(Zi,{item:r.user,messageTime:fe}):V(r.user,fe)),Le&&i(Hi,{sessionId:e.id,turn:r,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?Be(e._meta)??void 0:void 0,retry:Ee?{turnId:J,delaySeconds:_i(c),run:(Ce)=>v.retrySession(e.id,J,Ce)}:void 0,interrupted:Qn(r)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:me}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(_,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(bi,{ref:O,entries:W,renderTurn:Ne,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),Re&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:G,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(Ii,{items:he,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:Ie,onPreviewItem:He,onRevealError:(n)=>vt(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:X,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Oe,{})})]})}
|
|
2
|
-
export{dt};
|
package/dist/chunk-s267ztm1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{No}from"./chunk-hqdbv5hw.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Lr({host:o,children:t}){return s(n,{value:o,children:t})}function _(){let o=i(n),e={...No(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Co(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function ie(){let o=_();return(t)=>Co(o,t)}function wo(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{Lr,_,Co,ie,wo};
|