@alwith/module-chat 0.6.13 → 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.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/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/README.md
CHANGED
|
@@ -401,6 +401,69 @@ Use the matching request's error chain and proxy steps to identify the failing c
|
|
|
401
401
|
|
|
402
402
|
Applications import protocol clients and session projections from `@alwith/module-chat/client`, conversation import utilities from `@alwith/module-chat/import`, and build-time `stageChatAdapter(directory, licenses)` from `@alwith/module-chat/stage`. The chat package owns the adapter dependency and resolves it relative to its own installation; applications must not declare it separately or reach into a hoisted `node_modules` path. Staging preserves the published adapter bytes and includes both license notices. Runtime remains responsible for process ownership.
|
|
403
403
|
|
|
404
|
+
### Application tools
|
|
405
|
+
|
|
406
|
+
Pass `applicationTools` to `CodexClient` from `@alwith/module-chat/client`. Each
|
|
407
|
+
application owns its capabilities and data; the client owns declaration, session
|
|
408
|
+
binding, permission matching, dispatch, cancellation and error responses.
|
|
409
|
+
|
|
410
|
+
```ts
|
|
411
|
+
const readCount = defineApplicationTool({
|
|
412
|
+
name: "read_count",
|
|
413
|
+
description: "Read the current item count",
|
|
414
|
+
revision: "1",
|
|
415
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
416
|
+
parse(input: unknown) {
|
|
417
|
+
if (!input || typeof input !== "object" || Array.isArray(input) || Object.keys(input).length)
|
|
418
|
+
throw new Error("Expected an empty object")
|
|
419
|
+
return undefined
|
|
420
|
+
},
|
|
421
|
+
autoApprove: () => true,
|
|
422
|
+
execute: async (_input, { sessionId, signal }) => ({
|
|
423
|
+
success: true,
|
|
424
|
+
contentItems: [{ type: "text", text: String(await readCountForSession(sessionId, signal)) }]
|
|
425
|
+
})
|
|
426
|
+
})
|
|
427
|
+
const client = new CodexClient(openPort, {
|
|
428
|
+
agentId: "codex",
|
|
429
|
+
launch: { engine: "codex" },
|
|
430
|
+
applicationTools: [readCount]
|
|
431
|
+
})
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
`defineApplicationTool` runs the supplied parser before executing the handler and
|
|
435
|
+
preserves its argument type. `inputSchema` describes the same arguments to the
|
|
436
|
+
model; the parser enforces their business constraints. Results use the existing
|
|
437
|
+
`ClientToolResult` contract from `@alwith/api/tools`.
|
|
438
|
+
|
|
439
|
+
A selector can replace the array: `applicationTools: ({ cwd, operation, options }) => tools`.
|
|
440
|
+
It runs for new, restored and forked sessions. The client snapshots each selection
|
|
441
|
+
and rejects duplicate names, unavailable tools and stale revisions. Increment a
|
|
442
|
+
tool's `revision` when its definition or execution contract changes. The selected
|
|
443
|
+
set remains stable until the session is explicitly rebound; input controls and
|
|
444
|
+
the currently selected conversation do not change a binding. Subclasses can
|
|
445
|
+
compose the default selection through `applicationToolsFor`.
|
|
446
|
+
|
|
447
|
+
Omit `autoApprove` to use the normal permission UI. Automatic approval requires
|
|
448
|
+
adapter-provided `_meta.alwith.tool` identity matching the registered name and
|
|
449
|
+
set revision. Adapters without permission metadata are matched through the standard
|
|
450
|
+
ACP tool name and call ID in the same session's live, unfinished tool event. History,
|
|
451
|
+
restoring sessions, stale metadata, descriptions and translated titles cannot grant
|
|
452
|
+
approval. Identity checks read the current session projection rather than a delayed
|
|
453
|
+
UI snapshot. Tools without a matching identity continue through the normal permission UI.
|
|
454
|
+
A skill's enabled state does not grant permission to execute a tool.
|
|
455
|
+
|
|
456
|
+
Handlers receive `sessionId`, `turnId`, `toolCallId`, `agent` and `signal`. Pass the signal to
|
|
457
|
+
external operations and check it before applying changes. Session cancellation,
|
|
458
|
+
close, stop, rebinding, disconnection and individual `$/cancel_request` withdrawal
|
|
459
|
+
abort active calls; late results are discarded. Cancellation cannot undo a side
|
|
460
|
+
effect that already completed. Pending calls from an earlier client attachment
|
|
461
|
+
are not replayed. Runtime and the adapter continue to own processes and turns.
|
|
462
|
+
|
|
463
|
+
Applications that already declare raw `_meta.alwith.tools` and handle their own
|
|
464
|
+
calls remain supported. Do not combine raw declarations with registered tools in
|
|
465
|
+
the same session. New integrations should use the registry above.
|
|
466
|
+
|
|
404
467
|
### Existing Claude login (Bun host only)
|
|
405
468
|
|
|
406
469
|
`readClaudeLogin()` and `requireClaudeAccessToken()` from `@alwith/module-chat/oauth`
|
package/dist/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{kr,p,E}from"./chunk-f0kgxjp1.js";export{kr as ActivityHostProvider,E as ActivityMarkdown,p as useActivityHost};
|
package/dist/app-reference.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ue}from"./chunk-ar7pyb7s.js";import"./chunk-nhs4dy9n.js";import"./chunk-36qcq9j0.js";export{ue as AppReferenceBadge};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Agent, AgentRequest, Session, SessionOperation, SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
|
|
2
|
+
export type { ClientToolResult as ApplicationToolResult } from "@alwith/api/tools";
|
|
3
|
+
import type { ClientToolResult as ApplicationToolResult, ClientToolSet } from "@alwith/api/tools";
|
|
4
|
+
export type ApplicationToolContext = {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
toolCallId: string;
|
|
7
|
+
turnId: string;
|
|
8
|
+
signal: AbortSignal;
|
|
9
|
+
agent: Agent;
|
|
10
|
+
};
|
|
11
|
+
export type ApplicationTool = {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
revision: string;
|
|
16
|
+
autoApprove?: (sessionId: string) => boolean;
|
|
17
|
+
execute: (input: unknown, context: ApplicationToolContext) => Promise<ApplicationToolResult> | ApplicationToolResult;
|
|
18
|
+
};
|
|
19
|
+
export type ApplicationToolSelection = {
|
|
20
|
+
cwd: string;
|
|
21
|
+
operation: SessionOperation;
|
|
22
|
+
options: SessionRequestOptions;
|
|
23
|
+
};
|
|
24
|
+
export type ApplicationTools = readonly ApplicationTool[] | ((selection: ApplicationToolSelection) => readonly ApplicationTool[] | Promise<readonly ApplicationTool[]>);
|
|
25
|
+
export declare function defineApplicationTool<T>(tool: Omit<ApplicationTool, "execute"> & {
|
|
26
|
+
parse: (input: unknown) => T;
|
|
27
|
+
execute: (input: T, context: ApplicationToolContext) => Promise<ApplicationToolResult> | ApplicationToolResult;
|
|
28
|
+
}): ApplicationTool;
|
|
29
|
+
export declare function applicationToolSet(tools: readonly ApplicationTool[]): ClientToolSet;
|
|
30
|
+
export declare class ApplicationToolRegistry {
|
|
31
|
+
private readonly session;
|
|
32
|
+
private readonly sessions;
|
|
33
|
+
private readonly calls;
|
|
34
|
+
constructor(session: (id: string) => Session | undefined);
|
|
35
|
+
bind(id: string, tools: readonly ApplicationTool[], revision: string): void;
|
|
36
|
+
cancel(id: string): void;
|
|
37
|
+
drop(id: string): void;
|
|
38
|
+
clear(): void;
|
|
39
|
+
private attached;
|
|
40
|
+
withdraw(requestId: unknown): boolean;
|
|
41
|
+
handle(agent: Agent, request: AgentRequest): boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Or,Cn,wn}from"./chunk-ndy5kjpz.js";export{wn as ApplicationToolRegistry,Cn as applicationToolSet,Or as defineApplicationTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fo,xn,He,Nt}from"../chunk-0xcspxsx.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?fo(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!He(i)){let c=Nt(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(He(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(He(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=Nt(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=Nt(r),m=He(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:xn(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:xn(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fo,xn,He,Nt}from"../chunk-0xcspxsx.js";export{fo as elicitationFields,xn as elicitationLabels,Nt as elicitationOptions,He as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ba,Si,Qa,Ja}from"../chunk-vncrqvge.js";export{ba as PERMISSION_KIND_GROUP_ORDER,Qa as isAllowKind,Ja as isAlwaysKind,Si as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ki}from"../chunk-nh9kfjss.js";import"../chunk-vncrqvge.js";export{ki as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ia,xa,Ta,Ci}from"../chunk-0kc5bhjv.js";export{Ci as SchemaElicitationForm,Ia as elicitationFields,xa as initialValues,Ta as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{wi}from"../chunk-wkbxdz82.js";export{wi as UrlElicitationCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-vhdzdzf0.js";import{e}from"./chunk-yz8dtdk0.js";import{je,pt,Me}from"./chunk-9bzz1801.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function Zt({sessionId:s}){let n=o((t)=>t.sessions),{host:u}=e(),d=o((t)=>t.actions),a=d.some((t)=>m(n,s,t.sessionId))?d.filter((t)=>m(n,s,t.sessionId)):p,i=a.filter(je).filter((t)=>{if(t.sessionId!==s||n[s]?.subagent!==void 0)return!0;let r=t.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((t)=>!je(t));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((t)=>f("div",{children:[t.sessionId!==s&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":n[t.sessionId]?.title??u.t("subagents.untitled")}),l(Me,{action:t})]},t.id))}),i[0]!==void 0&&l(pt,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
+
export{Zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{N}from"./chunk-c98q3k3j.js";import{a}from"./chunk-j3svczsr.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as s}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Yr({children:p}){let{t:n}=a(),[o,l]=s(!1),r=c(null),[u,d]=s();return N(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}l(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:u},children:p})]})}
|
|
2
|
+
export{Yr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,s,Wt,n,g}from"./chunk-j3svczsr.js";import{H}from"./chunk-nfsz18j1.js";import{Pe}from"./chunk-b6fs77p0.js";import{we}from"./chunk-1y8s1zmh.js";import{tt,be}from"./chunk-6ax3abjj.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,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 _n({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=a(),{t:f,i18n:S}=t,k=s(),l=n((i)=>i.runStates[e.sessionId]),h=Wt(),u=()=>m(e);return o(Pe,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:p,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??f("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:o(E,{sessionRow:e,onDelete:()=>h(e),onForked:v,actions:d}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:tt(e.updatedAt,S.language)}):void 0,actions:l!=null?o(we,{title:f("sessionList.stop"),onStop:()=>g(t,k.stopSession(e.sessionId))}):void 0})}function E({sessionRow:e,onDelete:p,onForked:m,actions:v}){let c=a(),{t:d}=c,t=s(),f=n((r)=>F(r.agent)),S=n((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[h,u]=y(!1),i=B(!1);return o(be,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)g(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&o(H,{icon:o(N,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?o(H,{icon:o(x,{}),label:d("sessionList.unarchive"),onClick:()=>void g(c,t.unarchive(e.sessionId))}):b(C,{children:[o(H,{icon:o(A,{}),label:d("sessionList.fork"),disabled:!S||h,onClick:()=>{if(i.current)return;i.current=!0,u(!0),g(c,t.fork(e.sessionId,e.cwd).then((r)=>{let I=t.state.sessionList.find((L)=>L.sessionId===r);if(!I)throw Error("Forked chat is missing from the session list");m(I)}).finally(()=>{i.current=!1,u(!1)}))}}),o(H,{icon:o(D,{}),label:d("sessionList.archive"),onClick:()=>void g(c,t.archive(e.sessionId))})]}),o(H,{variant:"destructive",icon:o(R,{}),label:d("sessionList.delete"),onClick:p})]})})}
|
|
2
|
+
export{_n};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function
|
|
2
|
-
export{
|
|
1
|
+
import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Ia(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function xa(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function Ta(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Ci({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>Ia(e),[e]),[m,u]=A(()=>xa(c));D(()=>u(xa(c)),[n,c]);let g=c.every((a)=>Ta(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
|
|
2
|
+
export{Ia,xa,Ta,Ci};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function fo(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function xn(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function He(t){return t.type==="array"}function Nt(t){return(He(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{fo,xn,He,Nt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-yz8dtdk0.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function ca({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
|
|
2
|
+
export{ca};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A,ro,dr,vn,ur,ao,pr}from"./chunk-p32m85v1.js";import{t,Re,oe,o}from"./chunk-vhdzdzf0.js";import{Ae}from"./chunk-vc43akb6.js";import{createStore as E}from"@alwith/api/client";import{isText as w,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(i,e){b.setState((n)=>({entries:{...n.entries,[i]:e}}))}function v(i,e){let n=Q(e),a=i.items.findLast((s)=>Q(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&Q(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...ao(n._meta),...n.content.filter(w).flatMap((s)=>ao(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=Re(),{t:l}=t(),m=ro(e.id,a),c=JSON.stringify([i,m]),u=oe(b,(r)=>r.entries[c]),d=o((r)=>r.sessions[i]),k=o((r)=>r.connection==="ready"),f=u?.draft??dr(n),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,h=d!==void 0&&v(d,e),D=!d?.subagent&&k&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!v(r,e)||!r.attached||r.readOnly||r.restoring)return;let S=vn(n,f);if(!S.trim())return;let q={questionItemId:m,question:n.title,answer:S};p(c,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:ur(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(pr,{question:n,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(c,{draft:r}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function oo({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=A(e._meta);if(n===void 0||n.subagent!==void 0||n.readOnly||!v(n,e))return y(Ae,{content:e.content.some((s)=>!w(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,l)=>y(O,{sessionId:i,item:e,question:s,index:l},ro(e.id,l)))})}
|
|
2
|
+
export{oo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{y,wr}from"./chunk-wwpv3gc3.js";import{isResourceLink as v,isText as h}from"@nyssance/codex-acp-v2/client";import{useRef as R}from"react";function ri(o,m,x,g=!1){let i=R(null);return(t)=>{if(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;let n=t.currentTarget;if(n.selectionStart!==n.selectionEnd)return;let e=i.current;if(e&&(e.sessionId!==o.id||e.value!==n.value))i.current=null,e=null;let s=t.key==="ArrowUp";if(s?n.value.slice(0,n.selectionStart).includes(`
|
|
2
2
|
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
|
-
`))return;if(!e){if(!s||n.value!==""||
|
|
4
|
-
`),p=a.content.filter(
|
|
5
|
-
export{
|
|
3
|
+
`))return;if(!e){if(!s||n.value!==""||g)return;let u=o.items.flatMap((a)=>{if(a.kind!=="user")return[];let f=a.content.filter(h).map((l)=>l.text).join(`
|
|
4
|
+
`),p=a.content.filter(v).flatMap((l)=>{let d=y(l.uri);return d===null?[]:[{id:d,name:l.name}]});return f.trim()||p.length?[{text:wr(f,p),apps:p}]:[]});if(!u.length)return;e={sessionId:o.id,entries:u,index:u.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(s?-1:1)));let c=e.entries[e.index],r=c?.text??"";if(x?.(c?.apps??[]),e.value=r,m(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
+
export{ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{mo}from"./chunk-rvmbvv03.js";import{jsx as o}from"react/jsx-runtime";function Pt(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:mo}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function po(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function F({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:po(t)})})}
|
|
2
|
+
export{Pt,po,F};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{L,bt,br}from"./chunk-36qcq9j0.js";import{u}from"./chunk-pamcdn3d.js";function p(o,d,r){let s=document.createElement("span");if(s.contentEditable="false",s.setAttribute("aria-label",o),s.className=bt,r){let t=document.createElement("img");t.src=r,t.alt="",t.draggable=!1,t.setAttribute("aria-hidden","true"),t.className="size-3.5 shrink-0 self-center object-contain";let l=document.createElement("span");return l.textContent=o,s.append(t,l),s}let a=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[t,l]of Object.entries({viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))a.setAttribute(t,l);a.setAttribute("class","size-3.5 shrink-0 self-center");for(let[t,l]of br[d]){let e=document.createElementNS("http://www.w3.org/2000/svg",t);for(let[i,c]of Object.entries(l))e.setAttribute(i,c);a.append(e)}let n=document.createElement("span");return n.textContent=o,s.append(a,n),s}function Yo(o,d,r=[],s){let a=document.createDocumentFragment(),n="",t=()=>{let e=0;for(let i of L(n,r)){a.append(document.createTextNode(n.slice(e,i.start)));let c=p(i.name.slice(1),i.kind,i.kind==="skill"?s?.(i.name.slice(1)):void 0);if(i.kind==="skill")c.dataset.inlineSkill=i.name;else c.dataset.inlineCommand=i.name;a.append(c);let f=document.createElement("span");f.dataset.inlineAnchor="",f.textContent="",a.append(f),e=i.end}if(n.slice(e))a.append(document.createTextNode(n.slice(e)));n=""};for(let e of u(d)){if(typeof e==="string"){n+=e;continue}t();let i=p(e.name,"app");i.dataset.inlineApp=e.id,a.append(i);let c=document.createElement("span");c.dataset.inlineAnchor="",c.textContent="",a.append(c)}t();let l=document.createElement("br");l.dataset.inlineCaret="",a.append(l),o.replaceChildren(a)}function En(o,d){let r=[],s=new Map(d.map((n)=>[n.id,n])),a=(n)=>{if(n.nodeType===Node.TEXT_NODE){r.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){r.push(...(n.textContent??"").replace("","").split(""));return}let t=n.dataset.inlineSkill??n.dataset.inlineCommand;if(t!==void 0){r.push(...t.split(""));return}let l=n.dataset.inlineApp;if(l!==void 0){let i=s.get(l);if(i)r.push(i);return}if(n.tagName==="BR"){r.push(`
|
|
2
|
+
`);return}if((n.tagName==="DIV"||n.tagName==="P")&&r.length&&r.at(-1)!==`
|
|
3
|
+
`)r.push(`
|
|
4
|
+
`)}for(let t of n.childNodes)a(t)};for(let n of o.childNodes)a(n);return r}function Xo(o,d,r){let s=window.getSelection();if(!s?.rangeCount)return r;let a=s.getRangeAt(0);if(!o.contains(a.startContainer)||!o.contains(a.endContainer))return r;let n=(t,l)=>{let e=document.createRange();return e.selectNodeContents(o),e.setEnd(t,l),En(e.cloneContents(),d).length};return{start:n(a.startContainer,a.startOffset),end:n(a.endContainer,a.endOffset)}}function Rn(o,d){let r=(n)=>{let t=Math.max(0,n);for(let[l,e]of[...o.childNodes].entries())if(e.nodeType===Node.TEXT_NODE){let i=e.textContent?.length??0;if(t<=i)return[e,t];t-=i}else if(e instanceof HTMLElement&&e.hasAttribute("data-inline-anchor")){let i=e.firstChild,c=(e.textContent??"").replace("","").length;if(i&&t<=c)return[i,t+(i.textContent?.startsWith("")?1:0)];t-=c}else if(e instanceof HTMLElement&&(e.dataset.inlineSkill!==void 0||e.dataset.inlineCommand!==void 0)){let i=(e.dataset.inlineSkill??e.dataset.inlineCommand).length;if(t<i)return[o,l];t-=i}else if(e instanceof HTMLElement&&e.dataset.inlineApp!==void 0){if(t===0)return[o,l];t--}else if(e instanceof HTMLElement&&e.tagName==="BR")return[o,l];return[o,o.childNodes.length]},s=document.createRange();s.setStart(...r(d.start)),s.setEnd(...r(d.end));let a=window.getSelection();a?.removeAllRanges(),a?.addRange(s)}
|
|
5
|
+
export{Yo,En,Xo,Rn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useCallback as f,useState as r}from"react";var t=new Map;function _(o,e,a=!1){let[p,S]=r(()=>({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 k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
|
|
2
|
+
export{_};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function we({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
|
|
2
|
+
export{we};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`),I=o?null:
|
|
3
|
-
export{
|
|
1
|
+
import{Kn,qn}from"./chunk-kthwyebf.js";import{A}from"./chunk-p32m85v1.js";import{ht}from"./chunk-rfp26vx1.js";import{so}from"./chunk-h5ehjay8.js";import{t}from"./chunk-vhdzdzf0.js";import{or,de,xt,rr}from"./chunk-46ty0q9n.js";import{Zn}from"./chunk-abvawet2.js";import{Ae}from"./chunk-vc43akb6.js";import{Jn}from"./chunk-yn1rck7n.js";import{oo}from"./chunk-1a741cjb.js";import{Zi}from"./chunk-qm7vegrj.js";import{er}from"./chunk-8r53axab.js";import{gr}from"./chunk-t31w04yq.js";import{fr}from"./chunk-9cjwy7mn.js";import{to,no}from"./chunk-61ehrk7x.js";import{yt}from"./chunk-ydqr81rv.js";import{codexMessageError as q,codexTurnError as z,isContentEntry as me,isEmbeddedResource as Z,isImage as ee,isResourceLink as le,isText as ce,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{SparklesIcon as ue}from"lucide-react";import{Fragment as X,memo as pe,useEffect as fe,useState as ye}from"react";import{jsx as i,jsxs as m,Fragment as b}from"react/jsx-runtime";function Y(s){if(ee(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(Z(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function he({item:s}){let{t:n}=t(),l=s.status==="in_progress",[o,g]=ye(()=>Date.now()-s.at>=1e4);return fe(()=>{if(!l)return;let a=Math.max(0,s.at+1e4-Date.now());if(g(a===0),a===0)return;let h=setTimeout(()=>g(!0),a);return()=>clearTimeout(h)},[s.id,s.at,l]),m("div",{className:"codex-context-compaction",children:[i(ue,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?n("stream.codex.contextCompacted"):s.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:s,entry:n,terminals:l,streaming:o,streamingThoughtId:g}){let{t:a}=t();switch(n.kind){case"activity":return i(Zn,{sessionId:s,items:n.items,terminals:l,streamingThoughtId:g});case"text":return A(n.item._meta).length>0?i(oo,{sessionId:s,item:n.item}):i(Ae,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return i(gr,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(to,{children:[i("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&i("div",{children:n.item.error})]});return i(he,{item:n.item})}}function ke({sessionId:s,turn:n,terminals:l,active:o,blocked:g=!1,continued:a=!1,edits:h=n.edits,activityItems:F=n.items,workStartedAt:te=n.startedAt,isLast:L,error:k,interrupted:P,retry:G,retrying:p,extraWork:d=null,answerActions:O,footer:ne}){let{t:c}=t(),C=n.errors.map((e)=>{let r=q(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let E=G?.turnId===ge(e)?G:void 0;return i(no,{error:r,retry:E},`${e.id}:${E?.delaySeconds??"manual"}`)});if(L&&k!==null&&!n.errors.some((e)=>{let r=q(e);return r!==null&&r.stopReason===k.stopReason&&z(r).message===z(k).message}))C.push(i(no,{error:k},"current-run-error"));let x=C.length>0?i("div",{className:"codex-turn-errors",children:C}):null,R=n.items.filter(so);if(d===null&&R.length>0&&R.length===n.items.length)return m(b,{children:[i(Zn,{sessionId:s,items:R,terminals:l,streamingThoughtId:null}),x]});let T=n.work,w=T.length>0&&T.every((e)=>e.kind==="compaction");if(d===null&&(or(n)||w&&n.final.length===0))return m(b,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),x]});let W=xt(n),D=n.final.filter((e)=>A(e._meta).length===0).map((e)=>de({...e,content:Jn(e.content,n.items)})).join(`
|
|
2
|
+
`),I=o?null:yt(n,"assistant"),B=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="alwith_client_generate_image"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),H=new Set(n.final.flatMap((e)=>e.content.map(Y).filter((r)=>r!==null))),f=n.items.flatMap((e)=>{if(!ht(e))return[];return e.content.filter(me).flatMap((r,E)=>{let u=r.content,oe=ee(u),ae=le(u)||Z(u)&&"blob"in u.resource;if(!oe&&!ae)return[];let M=Y(u);if(M!==null){if(H.has(M))return[];H.add(M)}return[{key:`${e.id}:${E}`,block:u}]})}),K=n.final.some((e)=>A(e._meta).length===0&&e.content.some((r)=>!ce(r)||r.text.trim().length>0)),ie=B.length>0||f.length>0||w||K||n.final.some((e)=>A(e._meta).length>0),v=n.items.findIndex((e)=>n.final.includes(e)),_=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=T.filter((e)=>v===-1||_(e)<v),se=T.filter((e)=>v!==-1&&_(e)>v),re=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...se.map((e)=>({kind:"work",entry:e,index:_(e)}))].toSorted((e,r)=>e.index-r.index),V=!o&&!a&&(D.trim().length>0?i(Kn,{text:D,isMostRecentTurn:L,time:I,afterCopy:O}):m("div",{className:"flex items-center gap-0.5",children:[O,I&&i("span",{className:"codex-user-time ms-1",title:I.full,children:I.short})]})),y=fr({...n,items:F},{running:o,blocked:g,retrying:p!==void 0}),j=y.kind==="reasoning"?y.ownerKey??null:null,J=y.kind==="thinking",S=rr({...n,items:F}),U=o&&!K||d?.active===!0;return m(b,{children:[i(qn,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:U,defaultExpanded:U||d?.defaultExpanded===!0||!n.replayed&&(P||W),...S,durationMs:d?.active?void 0:S.durationMs,startedAt:S.startedAt??te,loading:(J||y.kind==="working")&&n.work.length===0&&d===null,loadingLabel:y.kind==="working"?c("stream.codex.working"):void 0,work:[...a||w?[]:Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:j},e.key)),...d===null?[]:[i(X,{children:d.content},"additional-work")]],answer:ie||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||w)&&Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),re.map((e)=>{if(e.kind==="work")return i(N,{sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:j},e.entry.key);let r=e.item;return m(X,{children:[A(r._meta).length>0?i(oo,{sessionId:s,item:r}):i(Ae,{content:Jn(r.content,n.items),messageId:r.id,streaming:o}),r===n.final.at(-1)&&f.length===0&&V]},r.id)}),B.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&i(er,{startedAt:e.at}),!o&&c("timeline.imageStopped")]})]},e.id)),f.length>0&&i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:f.map((e)=>i(Ae,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),(n.final.length===0||f.length>0)&&V]}):null,footer:m(b,{children:[J&&n.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:c("message.thinking")})}),ne,h.length>0&&!o&&!a&&i(Zi,{items:h}),P&&!W&&i("div",{className:"codex-interrupted-turn",role:"status",children:c("timeline.interrupted")}),!o&&x]})}),o&&p!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&x]})}var qi=pe(ke);
|
|
3
|
+
export{qi};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{hn}from"./chunk-nhs4dy9n.js";import{ue}from"./chunk-ar7pyb7s.js";import{tr}from"./chunk-hw6d7q50.js";import{y,Ct}from"./chunk-wwpv3gc3.js";import{t}from"./chunk-vhdzdzf0.js";import{Li,Fi}from"./chunk-p9vk6dds.js";import{ne}from"./chunk-8gc78fh3.js";import{de}from"./chunk-46ty0q9n.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as q}from"react/jsx-runtime";var Ri=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=Fi(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
+
${e.text}`).join(`
|
|
3
|
+
`):de(n),l=n.content.filter(x),d=new Set(Ct(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=y(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=Li(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return q("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(ne,{block:e},`${n.id}:${s}`))}),i(hn,{value:{names:u,icon:p.skillIcon},children:i(tr,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(ue,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
+
export{Ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-vhdzdzf0.js";import{e,x}from"./chunk-yz8dtdk0.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as P}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as j}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(n){return n.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||n}function ya({cwd:n,onChange:u,preparing:b=!1,recentProjects:g}){let{host:i,client:p}=e(),{t:l}=i,w=o((r)=>r.projectContext),v=o((r)=>r.sessionList),y=R(()=>g??[...new Set([...v].toSorted((r,f)=>(f.updatedAt??"").localeCompare(r.updatedAt??"")).map((r)=>r.cwd))],[g,v]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let r=!0;return x(i,p.refreshProjectContext(!0).then((f)=>{if(r)N(f.chatDirectory)})),()=>{r=!1}},[i,p]);let h=[...n!==null?[n]:[],...y.filter((r)=>r!==n)].filter((r)=>r!==c&&(!w||z(w,{cwd:r}).id!==I)),a=n!==null&&n!==c,D=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":b,className:P("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(C,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:D,children:[t(m,{className:"size-4 group-hover/project:opacity-0"}),t("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:t(j,{className:"size-3"})})]}),s(_,{render:t(C,{variant:"ghost",size:"sm",className:P("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&t(m,{className:"size-4"}),t("span",{className:"truncate",children:a?M(n):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[h.length>0&&s(H,{children:[t("div",{className:"max-h-64 overflow-y-auto",children:t(B,{value:n??"",onValueChange:u,children:h.map((r)=>s(E,{value:r,title:r,closeOnClick:!0,children:[t(m,{}),t("span",{className:"truncate",children:M(r)})]},r))})}),(d!==void 0||a)&&t(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{x(i,d(n).then((r)=>{if(r!==null)u(r)}))},children:[t(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:D,children:[t(j,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
+
export{ya};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function L(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function Ba(i,t){return L(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var bt="inline-flex items-baseline gap-1 align-baseline whitespace-nowrap leading-[inherit] font-normal text-[color:var(--app-reference-foreground,var(--link))] select-all",br={command:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9"}]],skill:[["path",{d:"M12 5v16"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"}]],app:[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]]};
|
|
2
|
+
export{L,Ba,bt,br};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ft}from"./chunk-ddkh0qey.js";import{Bi,Gi,zi}from"./chunk-kmn45zqk.js";import{Oi}from"./chunk-915dk3fj.js";import{t}from"./chunk-vhdzdzf0.js";import{de}from"./chunk-46ty0q9n.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Na(i,n){return{installUnlock:n==="none"?()=>()=>{}:Gi,preload:()=>{if(n!=="none")Bi(i)},playSequence:(a,d,l)=>zi(a,d,l,i,n)}}function Di(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:de(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(ft,{text:i.response,host:a})})]})}function Hi(i){return r(Oi,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
+
export{Na,Di,Hi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Qn(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
|
|
2
|
+
export{Qn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-vhdzdzf0.js";import{mn}from"./chunk-v12aj1ee.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function bi({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:mn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:mn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
|
|
2
|
+
export{bi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{A}from"./chunk-p32m85v1.js";import{codexMessageError as v,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Ua(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function or(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(v(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=A(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(A(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function ir(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Ua(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(Xn),items:a},M=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>j(x,c,b<M,a[b-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Xn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function de(t){return S(t.content)}function xt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function eo(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function rr(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function ar(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function sr(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!ar(t,e[n-1],o))break;n--}return e[n]?.key}function lr(t,e,n){let o=n,s=n;while(o>0&&ar(t,e[o-1],e[o]))o--;while(s+1<e.length&&ar(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{Ua,or,ir,Xn,de,xt,eo,rr,ar,sr,lr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{invoke as r}from"@tauri-apps/api/core";import{listen as t,once as s,emit as n,emitTo as o}from"@tauri-apps/api/event";var
|
|
2
|
-
export{
|
|
1
|
+
import{invoke as r}from"@tauri-apps/api/core";import{listen as t,once as s,emit as n,emitTo as o}from"@tauri-apps/api/event";var P={providersRead:()=>r("plugin:alwith-chat|providers_read"),providersSave:(e)=>r("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>r("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>r("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>r("plugin:alwith-chat|providers_test",e),providersApply:()=>r("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>r("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>r("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>r("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>r("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>r("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>r("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>r("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>r("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>r("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>r("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>r("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>r("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>r("plugin:alwith-chat|word_cloud",e)},kn={"providers:changed":{name:"providers:changed",listen:(e)=>t("providers:changed",e),once:(e)=>s("providers:changed",e),emit:(e)=>n("providers:changed",e),emitTo:(e,i)=>o(e,"providers:changed",i)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>t("providers:managed-revoked",e),once:(e)=>s("providers:managed-revoked",e),emit:(e)=>n("providers:managed-revoked",e),emitTo:(e,i)=>o(e,"providers:managed-revoked",i)}};function _a(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Ga(e){if(_a(e)||e instanceof Error)return e.message;return String(e)}
|
|
2
|
+
export{P,kn,_a,Ga};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function Hn(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function lt(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=Hn(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{Hn,lt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Xi}from"./chunk-9hed1d4c.js";function Wi(t,o){if(Xi(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
|
|
2
|
+
export{Wi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{s,n}from"./chunk-j3svczsr.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Kt(e,o){let a=s(),c=n((t)=>t.connection),r=n((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=n((t)=>v(t.sessions[e]?.items)),f=n((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||r)return;let t=!1,l,i=0,m=async()=>{try{let d=await a.activityReply(e);if(i=0,!t)y(d??void 0)}catch{i++}finally{if(!t&&(o==="running"||i>0&&i<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[a,e,c,f,r,o]),r?u:p??u}
|
|
2
|
+
export{Kt};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{ze}from"./chunk-mp6va3k2.js";import{Zo}from"./chunk-6kh62x8f.js";import{c}from"./chunk-6e3g436k.js";import{ce}from"./chunk-7f35yy1n.js";import{autoUpdate as ot}from"@floating-ui/dom";import{cn as rt}from"cn";import{BookOpenIcon as st,FileIcon as it,SquareSlashIcon as lt,StoreIcon as at}from"lucide-react";import{useCallback as ut,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as ct}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as mt}from"react/jsx-runtime";function Wo({handleRef:l,anchorRef:f,commands:q,renderSlashMenu:b,searchFiles:a,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:u,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=ce(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=l.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[l]);let V=Y(()=>z&&s.startsWith("!")?null:Zo(s,K),[s,K,z]),o=V?.kind==="at"&&!a?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,et]=g(H);if(tt!==H)et(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)u?.(!1)},[i,s,u]);let k=o?.kind==="at"?o.query:null;y(()=>{if(k===null||!a){B(null);return}let t=!0,e=()=>{a(k).then((r)=>{if(t)B({query:k,search:a,items:r})},(r)=>{if(t)B({query:k,search:a,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[k,a,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===a?x.items:[];if(b&&(o?.kind==="slash"||i))return[];if(o)return ze(q,o.query);if(i)return ze(q,"");return[]},[o,i,q,x,a,b]),m=o?o.kind==="slash":i;y(()=>{let t=l.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)u?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[l,i,u]),y(()=>{if(i)l.current?.getTextarea()?.focus()},[i,l]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=l.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
|
|
2
|
+
`)?s:`${s}
|
|
3
|
+
`}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,u?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=l.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&b)return;if(l.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else u?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,nt]=g(null),C=ut(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return ot(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&b)return b({query:o?.query??"",close:()=>{if(o)P(o.start),l.current?.getTextarea()?.setSelectionRange(o.start,o.start);else u?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=l.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),u?.(!1),requestAnimationFrame(()=>{if(l.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:nt,className:f?"fixed z-50":c.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:c.surface,children:[T("div",{className:c.list,children:[v.length===0&&m&&d("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===k&&x.search===a?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?st:lt:it;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:rt(m?c.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&"bg-muted"),children:[d(n,{className:m?c.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?c.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{className:c.description,children:t.description})]},t.key)})]}),m&&N&&d(mt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),u?.(!1),N.open()},className:c.row,children:[d(at,{className:c.icon}),d("span",{className:c.label,children:N.label})]})})]})});return f?ct(J,document.body):J}
|
|
4
|
+
export{Wo};
|