@alwith/module-chat 0.6.12 → 0.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/dist/activity-host.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +42 -0
- package/dist/application-tools.js +1 -0
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-f8tv9m81.js → chunk-01qqfj91.js} +2 -2
- package/dist/{chunk-vdc46qt2.js → chunk-060xywt5.js} +2 -2
- package/dist/chunk-0d2frj7b.js +2 -0
- package/dist/{chunk-ehhzhjyb.js → chunk-0kc5bhjv.js} +2 -2
- package/dist/chunk-0xcspxsx.js +2 -0
- package/dist/{chunk-y3mk12gg.js → chunk-0zmt1z4x.js} +2 -2
- package/dist/chunk-1a741cjb.js +2 -0
- package/dist/{chunk-snee6rb9.js → chunk-1cm0r042.js} +4 -4
- package/dist/{chunk-2761tcb3.js → chunk-1eyzjfc7.js} +2 -2
- package/dist/chunk-1vnw2sgz.js +5 -0
- package/dist/chunk-1xaskqdj.js +2 -0
- package/dist/{chunk-ex20n22v.js → chunk-1y8s1zmh.js} +2 -2
- package/dist/{chunk-5zq0s9fd.js → chunk-2pg50r36.js} +3 -3
- package/dist/chunk-31ecwv4k.js +4 -0
- package/dist/{chunk-1g54ee1j.js → chunk-3435g0ft.js} +2 -2
- package/dist/chunk-36qcq9j0.js +2 -0
- package/dist/{chunk-jpm15hcd.js → chunk-37a8v8sd.js} +2 -2
- package/dist/{chunk-b8c460mr.js → chunk-3gms312w.js} +2 -2
- package/dist/chunk-3qabfreh.js +2 -0
- package/dist/{chunk-f2wy8jza.js → chunk-440eq9v5.js} +2 -2
- package/dist/{chunk-rge2pazt.js → chunk-46ty0q9n.js} +2 -2
- package/dist/{chunk-xztxaq9k.js → chunk-485y3k93.js} +2 -2
- package/dist/{chunk-cctw9m9a.js → chunk-4e8rwzhz.js} +2 -2
- package/dist/{chunk-06yzz0yx.js → chunk-4sneycqc.js} +2 -2
- package/dist/{chunk-mmywt5fq.js → chunk-4wb9xn39.js} +2 -2
- package/dist/chunk-5347w553.js +4 -0
- package/dist/{chunk-fgre64ge.js → chunk-59rxa4rt.js} +2 -2
- package/dist/{chunk-n13y99dj.js → chunk-5t4egv96.js} +2 -2
- package/dist/chunk-5tvysr2s.js +2 -0
- package/dist/{chunk-1mf3b58j.js → chunk-602grjva.js} +2 -2
- package/dist/{chunk-wz6a2j26.js → chunk-61ehrk7x.js} +2 -2
- package/dist/chunk-6ax3abjj.js +2 -0
- package/dist/chunk-6e3g436k.js +2 -0
- package/dist/chunk-6kh62x8f.js +4 -0
- package/dist/{chunk-5s85tvas.js → chunk-7919s3et.js} +2 -2
- package/dist/chunk-7f35yy1n.js +2 -0
- package/dist/{chunk-jgseey5x.js → chunk-7qq2hj62.js} +3 -3
- package/dist/{chunk-7cj104ba.js → chunk-7rd487pt.js} +2 -2
- package/dist/{chunk-ggkjq8rk.js → chunk-82xjggwn.js} +2 -2
- package/dist/{chunk-nxjr0z23.js → chunk-86gk0v56.js} +2 -2
- package/dist/chunk-881sxqxf.js +2 -0
- package/dist/chunk-89nc6p3f.js +2 -0
- package/dist/chunk-8arntrcm.js +3 -0
- package/dist/{chunk-1bt8a25d.js → chunk-8djjctdj.js} +2 -2
- package/dist/{chunk-2s5598rk.js → chunk-8gc78fh3.js} +2 -2
- package/dist/chunk-8qr01fzq.js +2 -0
- package/dist/{chunk-djk0ebpk.js → chunk-8r53axab.js} +2 -2
- package/dist/{chunk-kgjdh49d.js → chunk-8sckf8ey.js} +2 -2
- package/dist/{chunk-jzyj96ws.js → chunk-915dk3fj.js} +2 -2
- package/dist/chunk-9a72hk73.js +2 -0
- package/dist/{chunk-8xn58z0x.js → chunk-9bzz1801.js} +3 -3
- package/dist/{chunk-pnavf2zs.js → chunk-9cjwy7mn.js} +2 -2
- package/dist/{chunk-eeqppv9j.js → chunk-9hed1d4c.js} +3 -3
- package/dist/chunk-9kn9jafp.js +4 -0
- package/dist/chunk-aaqk0jrt.js +2 -0
- package/dist/{chunk-y8sc8n3j.js → chunk-abp8zh77.js} +2 -2
- package/dist/chunk-abvawet2.js +2 -0
- package/dist/chunk-ac5wmxwh.js +2 -0
- package/dist/{chunk-st0gd22t.js → chunk-af90c0vz.js} +2 -2
- package/dist/chunk-ar7pyb7s.js +2 -0
- package/dist/{chunk-8c7x6vrs.js → chunk-b5ba1vak.js} +3 -3
- package/dist/{chunk-8wydj0hv.js → chunk-b5przf89.js} +2 -2
- package/dist/chunk-b6fs77p0.js +2 -0
- package/dist/{chunk-yzhqbz2p.js → chunk-c05dxz9x.js} +2 -2
- package/dist/chunk-c5gzxgfp.js +2 -0
- package/dist/{chunk-r9szj8sp.js → chunk-c6zsjmmj.js} +2 -2
- package/dist/chunk-c8szpswj.js +2 -0
- package/dist/{chunk-cdgfr4n0.js → chunk-c98q3k3j.js} +2 -2
- package/dist/{chunk-2wex96dp.js → chunk-camsks19.js} +2 -2
- package/dist/chunk-cdwhf4a8.js +2 -0
- package/dist/{chunk-cx1sg5dt.js → chunk-cg8nrtjv.js} +2 -2
- package/dist/{chunk-z8ymt0ny.js → chunk-che3097s.js} +2 -2
- package/dist/{chunk-290e7g1q.js → chunk-cwfj3w5c.js} +2 -2
- package/dist/{chunk-3pcbgsm6.js → chunk-cxhyh0w9.js} +2 -2
- package/dist/{chunk-xary32dg.js → chunk-cy35nmk9.js} +2 -2
- package/dist/{chunk-k5cjaeza.js → chunk-d7jpv1at.js} +2 -2
- package/dist/{chunk-btrg3ywt.js → chunk-d924by6g.js} +2 -2
- package/dist/{chunk-x2ayy0ys.js → chunk-ddkh0qey.js} +4 -4
- package/dist/chunk-dqntm4yy.js +2 -0
- package/dist/{chunk-rhxyb55x.js → chunk-dz6gv1k8.js} +2 -2
- package/dist/chunk-eezcnm8y.js +2 -0
- package/dist/{chunk-vkbaa74h.js → chunk-esrm0762.js} +2 -2
- package/dist/chunk-f0kgxjp1.js +2 -0
- package/dist/{chunk-9n2wwk4g.js → chunk-fk71dmx0.js} +2 -2
- package/dist/{chunk-a953k2dj.js → chunk-fmwxhswe.js} +3 -3
- package/dist/chunk-fwx30jk5.js +2 -0
- package/dist/{chunk-0xmj4d4z.js → chunk-fzze5xcw.js} +2 -2
- package/dist/chunk-g6j0f6nq.js +3 -0
- package/dist/chunk-gg7ar09k.js +2 -0
- package/dist/{chunk-pr5wv14q.js → chunk-gmtjagqw.js} +2 -2
- package/dist/{chunk-1sxmqb44.js → chunk-h5ehjay8.js} +2 -2
- package/dist/{chunk-q4f8zazc.js → chunk-hnh4907d.js} +2 -2
- package/dist/{chunk-24dqkjvg.js → chunk-hw6d7q50.js} +2 -2
- package/dist/chunk-hy66kdet.js +4 -0
- package/dist/{chunk-hqdbv5hw.js → chunk-j3svczsr.js} +2 -2
- package/dist/{chunk-bp6f5tv8.js → chunk-j63fnn73.js} +2 -2
- package/dist/{chunk-v28fv6c4.js → chunk-j85kej5x.js} +2 -2
- package/dist/{chunk-8t1brzbh.js → chunk-jayj7jn1.js} +2 -2
- package/dist/{chunk-y8md080p.js → chunk-jbw1dmrg.js} +2 -2
- package/dist/{chunk-xw2zfj4c.js → chunk-jj460s9n.js} +2 -2
- package/dist/{chunk-3ab38s9g.js → chunk-k0mcp7wa.js} +2 -2
- package/dist/chunk-kg10wznr.js +2 -0
- package/dist/{chunk-ba4fa6fc.js → chunk-kmn45zqk.js} +2 -2
- package/dist/chunk-kthwyebf.js +3 -0
- package/dist/{chunk-53ptmmsx.js → chunk-kwnznjqg.js} +2 -2
- package/dist/chunk-mb9h6s08.js +2 -0
- package/dist/{chunk-vpzjhbfa.js → chunk-mgedgmps.js} +2 -2
- package/dist/{chunk-q2z9w661.js → chunk-mh566s9g.js} +2 -2
- package/dist/{chunk-sjes4cxr.js → chunk-mhka64tj.js} +2 -2
- package/dist/{chunk-y7gzr914.js → chunk-mp6va3k2.js} +2 -2
- package/dist/{chunk-6g5z3pff.js → chunk-mwwas9bw.js} +2 -2
- package/dist/chunk-myjx503j.js +2 -0
- package/dist/{chunk-7xc69d48.js → chunk-n27z019x.js} +2 -2
- package/dist/{chunk-mzwwsacy.js → chunk-ndrpfbe1.js} +2 -2
- package/dist/chunk-ndy5kjpz.js +2 -0
- package/dist/{chunk-r6b9fdnm.js → chunk-nfsz18j1.js} +2 -2
- package/dist/{chunk-rq7t6qry.js → chunk-nh9kfjss.js} +2 -2
- package/dist/chunk-nhs4dy9n.js +2 -0
- package/dist/{chunk-acmc2r2s.js → chunk-p32m85v1.js} +3 -3
- package/dist/{chunk-wj2xjzds.js → chunk-p8pj4pkf.js} +2 -2
- package/dist/{chunk-3tsy36rq.js → chunk-p9vk6dds.js} +2 -2
- package/dist/{chunk-z9ch23p0.js → chunk-pamcdn3d.js} +2 -2
- package/dist/chunk-pj42memd.js +2 -0
- package/dist/chunk-pmdpwwx5.js +2 -0
- package/dist/{chunk-6tkjdrnj.js → chunk-pyrza100.js} +2 -2
- package/dist/{chunk-782x5ryb.js → chunk-q1mbkntx.js} +2 -2
- package/dist/{chunk-rhcpe6m6.js → chunk-q53qh3sx.js} +2 -2
- package/dist/{chunk-pfqz31kk.js → chunk-qdhdt0hb.js} +2 -2
- package/dist/{chunk-7wj3dcpj.js → chunk-qfwy13e3.js} +2 -2
- package/dist/{chunk-m7exm1n3.js → chunk-qm7vegrj.js} +5 -5
- package/dist/{chunk-rvbbb9rf.js → chunk-r7ddbf5n.js} +2 -2
- package/dist/{chunk-5ykpe629.js → chunk-raxtm3ej.js} +2 -2
- package/dist/{chunk-h1embxgj.js → chunk-rd4yhfs7.js} +2 -2
- package/dist/chunk-rfp26vx1.js +2 -0
- package/dist/{chunk-1tb3d2x4.js → chunk-rfrr4xbt.js} +2 -2
- package/dist/{chunk-0d0bfb8e.js → chunk-rjqtw4zf.js} +2 -2
- package/dist/{chunk-pjgym6rx.js → chunk-rkbdgfgs.js} +2 -2
- package/dist/{chunk-z94nsbnw.js → chunk-rvmbvv03.js} +2 -2
- package/dist/chunk-ryfqa1bc.js +4 -0
- package/dist/chunk-sbyj2adb.js +7 -0
- package/dist/{chunk-zxwvq5f4.js → chunk-sntvq6zv.js} +2 -2
- package/dist/{chunk-d51rg15n.js → chunk-sqt4g5nd.js} +2 -2
- package/dist/chunk-szrdzr1d.js +2 -0
- package/dist/{chunk-b5jq0ken.js → chunk-t0e7gk7y.js} +2 -2
- package/dist/{chunk-tbv1mfdg.js → chunk-t1ys4wak.js} +3 -3
- package/dist/{chunk-cqskn18r.js → chunk-t2h1wgvg.js} +2 -2
- package/dist/chunk-t31w04yq.js +2 -0
- package/dist/{chunk-rtdjp07m.js → chunk-t9sgtnge.js} +2 -2
- package/dist/{chunk-7wgt5rjw.js → chunk-ta71ve6k.js} +2 -2
- package/dist/{chunk-87br10bq.js → chunk-te33zs6y.js} +2 -2
- package/dist/{chunk-gnpvd7wg.js → chunk-teb81g3n.js} +2 -2
- package/dist/{chunk-8jgstab4.js → chunk-twxn29aq.js} +2 -2
- package/dist/{chunk-j7w4jr8y.js → chunk-txvxq7hy.js} +2 -2
- package/dist/chunk-v12aj1ee.js +2 -0
- package/dist/{chunk-6fvrhr9x.js → chunk-v4z2kexv.js} +2 -2
- package/dist/{chunk-sygx6n0s.js → chunk-v8c2tsnr.js} +2 -2
- package/dist/{chunk-8a1th59e.js → chunk-vc43akb6.js} +2 -2
- package/dist/chunk-vhdzdzf0.js +2 -0
- package/dist/{chunk-fnvjemhq.js → chunk-vk4xkyhw.js} +2 -2
- package/dist/chunk-vmmebfqv.js +2 -0
- package/dist/chunk-vncrqvge.js +2 -0
- package/dist/{chunk-zntkqbcv.js → chunk-wamhc02v.js} +2 -2
- package/dist/{chunk-r9ny4bqk.js → chunk-wht615am.js} +2 -2
- package/dist/{chunk-j71h60r0.js → chunk-wkbxdz82.js} +2 -2
- package/dist/chunk-wn0eg5m8.js +2 -0
- package/dist/chunk-wwpv3gc3.js +2 -0
- package/dist/{chunk-vk7kqa6a.js → chunk-y14r7906.js} +2 -2
- package/dist/{chunk-9he6963p.js → chunk-y6993bfz.js} +2 -2
- package/dist/{chunk-mdp2zdqm.js → chunk-yd9962fa.js} +2 -2
- package/dist/{chunk-rb4p3h5b.js → chunk-ydqr81rv.js} +2 -2
- package/dist/chunk-yg0xnvde.js +2 -0
- package/dist/{chunk-tme1d6xh.js → chunk-yksyxg7r.js} +2 -2
- package/dist/{chunk-mxh0vcye.js → chunk-yn1rck7n.js} +2 -2
- package/dist/chunk-yz8dtdk0.js +2 -0
- package/dist/chunk-z1j2c9r4.js +2 -0
- package/dist/chunk-z7ssj61m.js +2 -0
- package/dist/chunk-zhxjp4tt.js +2 -0
- package/dist/chunk-zktqmha9.js +1 -0
- package/dist/client.d.ts +20 -1
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.d.ts +9 -2
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.d.ts +2 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-presentation.d.ts +10 -0
- package/dist/composer/menu-presentation.js +1 -0
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.d.ts +3 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.d.ts +2 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.d.ts +24 -0
- package/dist/conversation/composer/composer-menu.js +1 -0
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.d.ts +24 -0
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.d.ts +38 -0
- package/dist/lib/reference-presentation.js +1 -0
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.d.ts +104 -0
- package/dist/locales.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/reference-projection.d.ts +13 -0
- package/dist/reference-projection.js +1 -0
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/types.d.ts +1 -0
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.d.ts +2 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -2
- package/dist/chunk-0aqnqk7b.js +0 -2
- package/dist/chunk-0r4b11t4.js +0 -2
- package/dist/chunk-0srja8yh.js +0 -2
- package/dist/chunk-1647cyqx.js +0 -2
- package/dist/chunk-19yjze8m.js +0 -7
- package/dist/chunk-1axvr26t.js +0 -4
- package/dist/chunk-1ye5ygbk.js +0 -2
- package/dist/chunk-26bm75r2.js +0 -2
- package/dist/chunk-3ddgyzhz.js +0 -3
- package/dist/chunk-3kzmec3f.js +0 -2
- package/dist/chunk-4gstmex3.js +0 -2
- package/dist/chunk-52tcfvz0.js +0 -2
- package/dist/chunk-5q0kb3yb.js +0 -2
- package/dist/chunk-5y5b3w22.js +0 -2
- package/dist/chunk-677dyzb1.js +0 -4
- package/dist/chunk-6cbj9r2x.js +0 -2
- package/dist/chunk-6z3nch41.js +0 -1
- package/dist/chunk-799h4586.js +0 -2
- package/dist/chunk-7m08m4m1.js +0 -2
- package/dist/chunk-7p3nx5bx.js +0 -2
- package/dist/chunk-7qmj50a2.js +0 -2
- package/dist/chunk-844s61q1.js +0 -2
- package/dist/chunk-88j29hzx.js +0 -2
- package/dist/chunk-8pdapsc7.js +0 -2
- package/dist/chunk-aardrb6e.js +0 -2
- package/dist/chunk-akk3k2sc.js +0 -4
- package/dist/chunk-b0bd8abz.js +0 -2
- package/dist/chunk-bqdnxftw.js +0 -2
- package/dist/chunk-bv175dn9.js +0 -2
- package/dist/chunk-crg1ttkp.js +0 -2
- package/dist/chunk-der9jtk9.js +0 -2
- package/dist/chunk-eg9c12vk.js +0 -2
- package/dist/chunk-fkmka3v9.js +0 -2
- package/dist/chunk-fp3rp1qc.js +0 -2
- package/dist/chunk-h9rwby5r.js +0 -2
- package/dist/chunk-hhdeh622.js +0 -2
- package/dist/chunk-j5trhvx8.js +0 -4
- package/dist/chunk-mz8tjgre.js +0 -2
- package/dist/chunk-nktaekpq.js +0 -2
- package/dist/chunk-nrvd7njv.js +0 -2
- package/dist/chunk-p95ndy0b.js +0 -3
- package/dist/chunk-qyj4d255.js +0 -5
- package/dist/chunk-r29b0ap8.js +0 -2
- package/dist/chunk-rgn6pdaa.js +0 -2
- package/dist/chunk-rvjfb004.js +0 -2
- package/dist/chunk-rwh1yvqn.js +0 -2
- package/dist/chunk-s267ztm1.js +0 -2
- package/dist/chunk-s4v10afm.js +0 -3
- package/dist/chunk-t3sqxded.js +0 -2
- package/dist/chunk-vxexg361.js +0 -2
- package/dist/chunk-vxn8gfy4.js +0 -2
- package/dist/chunk-xvfvxjyp.js +0 -4
- package/dist/chunk-ycj91akv.js +0 -2
- package/dist/chunk-ym0pvy7y.js +0 -2
- package/dist/chunk-z9q7rgbf.js +0 -2
- package/dist/chunk-zfjpfj30.js +0 -2
- package/dist/chunk-zyznsm1p.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{yi}from"./chunk-7f35yy1n.js";import{Wo}from"./chunk-5347w553.js";import{Cr}from"./chunk-wwpv3gc3.js";import{u,S,rt}from"./chunk-pamcdn3d.js";import{Te}from"./chunk-myjx503j.js";import{ci,di,ui,pi,mi}from"./chunk-camsks19.js";import{Qo,Jo}from"./chunk-gmtjagqw.js";import{L}from"./chunk-36qcq9j0.js";import{An}from"./chunk-ryfqa1bc.js";import{Mn}from"./chunk-hy66kdet.js";import{o}from"./chunk-vhdzdzf0.js";import{e}from"./chunk-yz8dtdk0.js";import{Dn,oi}from"./chunk-5tvysr2s.js";import{zn}from"./chunk-3qabfreh.js";import{r,xi,W,un}from"./chunk-fk71dmx0.js";import{rn}from"./chunk-5t4egv96.js";import{Ve,cn}from"./chunk-zhxjp4tt.js";import{pn,gn}from"./chunk-v12aj1ee.js";import{bi}from"./chunk-440eq9v5.js";import{ln}from"./chunk-mb9h6s08.js";import{ni}from"./chunk-esrm0762.js";import{an}from"./chunk-z1j2c9r4.js";import{sn}from"./chunk-mh566s9g.js";import{ri}from"./chunk-1cm0r042.js";import{li}from"./chunk-abp8zh77.js";import{on}from"./chunk-v8c2tsnr.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as T,useEffect as jt,useLayoutEffect as nt,useMemo as st,useRef as k,useState as M}from"react";import{jsx as p,jsxs as R}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(n){let w=await(await fetch(n.url)).blob();return new Promise((I,F)=>{let E=new FileReader;E.onerror=()=>F(E.error),E.onload=()=>{let G=E.result;I(G.slice(G.indexOf(",")+1))},E.readAsDataURL(w)})}function Xt({session:n,onSubmit:w,onShellCommand:I,onHandOff:F,modelSelector:E,modelMenu:G,inputHeader:mt,actions:Mt,leadingTools:Rt,agentControls:Q=!0,placeholder:Et,children:Dt,attachmentPolicy:Nt,predictions:kt=!0,disabled:St=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:O,client:_}=e(),{t:g}=O,H=T((t)=>{if(O.reportError)O.reportError(t);else console.error(t)},[O]),[ut,K]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[C,Ot]=M(()=>r.get(n.id)?.attachments??pt),[y,Y]=M(()=>r.get(n.id)?.mentions??[]),[m,U]=M(()=>r.get(n.id)?.apps??[]),[ft,j]=M(()=>(r.get(n.id)?.apps?.length??0)>0||L(v,n.commands.map((t)=>t.name)).length>0),z=k(void 0),B=k(void 0);nt(()=>{if(m.length>0)j(!0)},[m.length]);let ot=C.some((t)=>Ve(t)&&t.pastedText.status!=="ready"),[D,ht]=M(!1),[V,_t]=M(!1),[it,Lt]=M(!1),at=k(null),f=k(null),gt=k(null),c=k(ut),P=T((t)=>{gt.current?.(),c.current={text:t,revision:c.current.revision+1},K(c.current)},[]),xt=T((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,d=i?.getTextarea()?.selectionStart??a.length;B.current={text:a,apps:[]},z.current=d+1,j(!0),P(a),U((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:d}])},[P]),Wt=T((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,d=i?.getTextarea(),l=d?.selectionStart??a.length,h=d?.selectionEnd??l,lt=`${a.slice(0,l)}${t} ${a.slice(h)}`;B.current={text:a,apps:[]},z.current=l+t.length+1,P(lt),j(!0)},[P]),yt=T(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=ri(n,P,U,m.length>0||y.length>0||C.length>0),bt=st(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,d){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},K(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(d[0],d[1]);return{target:n.id,...c.current,selection:d}}}),[n.id]),q=k(null),vt=T((t)=>(q.current=t,()=>{if(q.current===t)q.current=null}),[]),X=n.state!=="idle",x=I!==void 0&&m.length===0&&v.startsWith("!"),J=(ft||m.length>0)&&!x,b=!St&&!dt&&n.attached&&!n.restoring&&!n.readOnly,N=!n.readOnly&&(Ft||b),Z=sn(n,b&&!D&&!V&&!ot&&!it,v.length>0||C.length>0||y.length>0||m.length>0,kt&&!x),Pt=Z.invalidate;nt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...m.length>0?{apps:m}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,m]),nt(()=>xi(n.id,Ot),[n.id]),nt(()=>un(n.id,(t)=>{if(!N||D)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||m.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,N,D,v,C,y,m,P]);let It=o((t)=>Kt(t.agent)),Ut=st(()=>It&&b?async(t)=>rn((await _.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[_,It,b,n.cwd]),ct=T((t)=>{Y((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let At=T(async({text:t,files:i})=>{let a=I!==void 0&&m.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||m.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let d=t.trim();if(d.length===0&&i.length===0&&y.length===0&&m.length===0)return;let l=q.current;ht(!0);let h=r.get(n.id),lt=c.current.revision,tt=null;try{let A=m.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:pn(et),name:gn(et)})}let Ct=Cr(d,m);if(Ct.length>0)A.push({type:"text",text:Ct});for(let s of i)if(Ve(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===lt&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,K(c.current),Y([]),U([]),z.current=void 0,B.current=void 0,W(n.id,()=>pt),r.set(n.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(w)if(l===null)await w(A);else await w(A,(s)=>{if(l.signal.aborted||q.current!==l)return;l.accept(s),F?.(n.id,s)});else if(l===null)await _.prompt(n.id,A);else{let s=await _.prompt(n.id,A);l.accept(s)}Pt();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:tt+1},K(c.current),Y(h.mentions),U(h.apps??[]),r.set(n.id,h),W(n.id,()=>h.attachments);throw A}finally{ht(!1),f.current?.focus()}},[_,n.id,n.state,y,m,w,I,F,Pt]),zt=()=>{_.cancel(n.id).catch(H)},Bt=T((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Te})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});H(i)},[H,g]),Ht=st(()=>({session:n,ready:b,inputReady:N,sending:D,textareaRef:f,draft:bt,interruptRef:gt,observeReceipts:vt,addMention:ct,setAdding:_t,shellMode:x,handsFree:!x&&(w===void 0||F!==void 0)}),[n,b,N,D,bt,vt,ct,w,F,x]),Tt=O.writeTextAttachment,wt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!N,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(X?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!J&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=rt(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,d=u(i),l=S([...a.value.slice(0,a.selectionStart).split(""),...d,...a.value.slice(a.selectionEnd).split("")]);B.current={text:v,apps:[]},z.current=a.selectionStart+d.length,j(!0),U(l.apps),P(l.text);return}}if(Tt)cn(t,n.id,g("composer.pastedTextFilename"),Tt)}};return p(zn,{value:Ht,children:p("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[mt&&p("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:mt}),p(yi,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},K(c.current)},attachments:C,onAttachmentsChange:(t)=>W(n.id,()=>t),children:R("div",{ref:at,className:"relative",children:[Q&&!it&&p(Wo,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>p(Dn,{anchorRef:at,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!N,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>xt(i)),focusInput:yt}),searchFiles:Ut,onMention:ct,onSearchError:H,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},J?"inline":"textarea"),R(ci,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:At,onSubmitAsync:At,onSubmitError:H,canSubmit:()=>b&&!D&&!V&&!ot&&(!x||!X&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,R(ui,{className:"px-3 pt-3 pb-0 empty:hidden",children:[V&&p("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),p(bi,{mentions:y,onRemove:(t)=>Y((i)=>i.filter((a)=>a!==t))}),p(Jo,{children:(t)=>Ve(t)?p(ni,{data:t,sessionId:n.id}):p(Qo,{data:t,t:g})})]}),R(di,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&p("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),J?p(An,{...wt,skillIcon:O.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:m,onApplicationsChange:U,initialCaret:z.current,initialUndo:B.current}):p(Mn,{...wt,autoFocus:ft&&x})]}),p(pi,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[p(oi,{anchorRef:at,commands:n.commands,disabled:!N,agentDisabled:!b||x,agentControls:Q,open:it,onOpenChange:Lt,focusInput:yt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
+
`)?i:`${i}
|
|
3
|
+
`,d=t.startsWith("$")?t:`/${t}`,l=`${a}${d} `;if(!J)B.current={text:i,apps:[]},z.current=l.length,j(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:xt}),Rt,Q&&p(an,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),R(mi,{className:"w-full min-w-0 items-center justify-end gap-1",children:[Q&&p(on,{session:n}),E??p(ln,{...G,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,p(li,{active:X,sending:D||dt||V,ready:b&&!ot&&(!x||!X&&v.slice(1).trim().length>0),hasMentions:y.length>0||m.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
|
+
export{Xt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function R({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
|
|
2
|
+
export{R};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ce}from"./chunk-7f35yy1n.js";import{U,gi}from"./chunk-camsks19.js";import{t}from"./chunk-vhdzdzf0.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function li({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=ce(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(U,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(gi,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{li};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{vt}from"./chunk-sbyj2adb.js";import{mr}from"./chunk-h5ehjay8.js";import{t}from"./chunk-vhdzdzf0.js";import{ne}from"./chunk-8gc78fh3.js";import{Xn}from"./chunk-46ty0q9n.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(ne,{block:e.content},`${n.id}:${l}`))]})}var Zn=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(Xn),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...mr(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(vt,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
+
export{Zn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function*Nn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function qo(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Nn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
+
export{Nn,qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{jt}from"./chunk-z7ssj61m.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function jr({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(jt,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
|
|
2
|
+
export{jr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{io}from"./chunk-nhs4dy9n.js";import{XIcon as i}from"lucide-react";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function ue({app:a,remove:e}){return o("span",{"data-app-reference":a.id,title:a.name,className:"inline-flex max-w-full items-baseline gap-1 align-baseline",children:[n(io,{kind:"app",name:a.name}),e&&n(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:n(i,{className:"size-3","aria-hidden":"true"})})]})}
|
|
2
|
+
export{ue};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{p}from"./chunk-f0kgxjp1.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function Da(e){let a=new Map;for(let l of e)for(let r of l.content){if(r.type!=="diff")continue;let d=r,u=d._meta?.alwith?.hunks??[],c=u.reduce((n,i)=>n+x(i.newText),0),f=u.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=c,i.deletions+=f;else a.set(n.path,{path:n.path,additions:c,deletions:f})}}return[...a.values()]}function Qi({blocks:e}){return s(Wn,{files:Da(e)})}function Wn({files:e,onOpen:a,renderPath:l,actions:r}){let{t:d,openLink:u}=p(),[c,f]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,h)=>t+h.additions,0),v=e.reduce((t,h)=>t+h.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{f((t)=>!t),i(!1)},"aria-expanded":c,children:d(c?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),r,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),c&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?u(t.path):a(t),children:l===void 0?t.path:l(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{Da,Qi,Wn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function
|
|
2
|
-
export{
|
|
1
|
+
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function zo(e=d){if(e.env.CLAUDE_CODE_SIMPLE&&["1","true","yes","on"].includes(e.env.CLAUDE_CODE_SIMPLE.toLowerCase()))throw Error("Claude OAuth is disabled by CLAUDE_CODE_SIMPLE");if(e.env.CLAUDE_CODE_CUSTOM_OAUTH_URL||e.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Custom Claude OAuth endpoints and descriptor credentials are not supported by the local-login reader");let r=e.env.CLAUDE_CODE_OAUTH_TOKEN;if(r!==void 0){if(!r.trim())throw Error("CLAUDE_CODE_OAUTH_TOKEN is empty");return{accessToken:r,expiresAt:null,scopes:["user:inference"],source:"environment"}}let t=e.env.CLAUDE_CONFIG_DIR;if(t==="")throw Error("CLAUDE_CONFIG_DIR is empty");let i=(t??u(e.home,".claude")).normalize("NFC");if(e.platform==="darwin"){let s=t===void 0?"":`-${new Bun.CryptoHasher("sha256").update(i).digest("hex").slice(0,8)}`,o=await e.keychain(`Claude Code-credentials${s}`,e.username());if(o!==null)return c(o,"keychain")}else if(e.platform!=="win32")throw Error(`Unsupported Claude login platform: ${e.platform}`);let n=await e.file(u(i,".credentials.json"));return n===null?null:c(n,"file")}async function la(e=d,r=Date.now()){let t=await zo(e);if(!t)throw Error("No existing Claude subscription login; sign in through Claude Code or ALwith Desktop");if(t.expiresAt!==null&&t.expiresAt<=r+60000)throw Error("The existing Claude access token is expired or expiring; refresh it in the owning Claude Code or ALwith CLI before retrying");return t.accessToken}
|
|
2
|
+
export{zo,la};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ie,d}from"./chunk-c5gzxgfp.js";import{R}from"./chunk-aaqk0jrt.js";import{O}from"./chunk-mhka64tj.js";import{N}from"./chunk-c98q3k3j.js";import{nt,Be,ot}from"./chunk-r7ddbf5n.js";import{PreviewCard as C}from"@base-ui/react/preview-card";import{cn as u}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as _,useContext as E,useLayoutEffect as M,useState as L}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as p,Fragment as K}from"react/jsx-runtime";function T(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:u("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:u("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function f({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:u("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function m({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:u("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function te({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:b,headerChildren:g,wrapHeader:c,onHeaderClick:P,children:y}){let S=()=>{P?.(),t(!o)},x=u(nt,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),k=p(K,{children:[r!=null&&e(f,{children:r}),g??e(R,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(ot,{content:s!==void 0?e(Be,{className:u("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:b})})]}),H=g==null?p("div",{"data-active":l?"":void 0,title:n,className:u(x,d),onClick:S,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),S()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),k]}):e("div",{"data-active":l?"":void 0,className:x,children:k});return p("div",{className:"text-[#1a1c1f] dark:text-white",children:[c===void 0?H:c(H),o&&e(T,{className:"mt-0.5",children:y})]})}var G=_(()=>{}),z=_(()=>{});function qt(){return E(z)}function _e(){return E(G)}function Pe({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:b,preview:g,listeningPorts:c,onOpenPort:P,accessory:y,meta:S,hint:x,actions:k,className:H,...v}){let I=p("div",{"data-slot":"navigation-session-item","data-active":o,className:u(nt,Ie,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||c!=null&&c.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...v,children:[e(f,{children:t!=null?e(O,{state:t,title:n??void 0}):i}),p("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(R,{className:u("leading-none",t==="done"&&"font-semibold"),children:s}),b!=null&&e(R,{className:"text-muted-foreground text-xs",children:b}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),c!=null&&c.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:c.map((w)=>P?p("button",{type:"button",className:"underline",onPointerDown:(h)=>h.stopPropagation(),onKeyDown:(h)=>h.stopPropagation(),onClick:(h)=>{h.stopPropagation(),P(w)},children:[":",w]},w):p("span",{children:[":",w]},w))})]}),p("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(ot,{content:y!=null?e(Be,{children:y}):S??e(Be,{}),actions:k}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return I;return e(q,{row:I,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=L(!1),[s,a]=L(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(G.Provider,{value:a,children:e(z.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return N(o),p(C.Root,{open:o,onOpenChange:t,children:[e(C.Trigger,{render:n,delay:700,closeDelay:100}),e(C.Portal,{children:e(C.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(C.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
+
export{T,f,m,te,qt,_e,Pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";function kt({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
|
|
2
|
+
export{kt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var Ye="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function Gt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(Ye))n()}),[e]);return d(t,()=>o(e.get(Ye)))}async function zt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[Ye])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[Ye]:i}})}
|
|
2
|
+
export{Ye,Gt,zt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{P,kn}from"./chunk-485y3k93.js";import{Rt}from"./chunk-jbw1dmrg.js";import{useEffect as p,useRef as u,useState as m}from"react";var bo="providers:changed",Co="providers:managed-revoked",i=(e)=>e;function Er(){return{read:()=>i(P.providersRead()),save:(e,r,t)=>i(P.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(P.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(P.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>P.providersTest({providerId:e}),apply:()=>i(P.providersApply()),onChanged:(e)=>kn[bo].listen((r)=>e(r.payload))}}function Rr(){return{bind:(e)=>P.providersAccountBind({account:e}),refresh:(e,r)=>i(P.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await P.providersClearManaged()},onRevoked:(e)=>kn[Co].listen((r)=>e(r.payload.sessionIds))}}async function Mt(e){try{return await e.apply()}catch(r){if(!Rt(r))throw r;return e.read()}}function At(e,r=console.error){let[t,d]=m(null),a=u(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
+
export{bo,Co,Er,Rr,Mt,At};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as o,useContext as n,useEffect as r}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as o,useContext as n,useEffect as r}from"react";var Uo=o(null);function N(t){let e=n(Uo);r(()=>{if(t&&e!==null)return e()},[t,e])}
|
|
2
|
+
export{Uo,N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{fi,Te}from"./chunk-myjx503j.js";import{hi}from"./chunk-602grjva.js";import{Un,Bn,dt,ut,Gn}from"./chunk-7f35yy1n.js";import{cn as P}from"cn";import{ArrowUpIcon as ge,Loader2Icon as be,SquareIcon as ve,XIcon as he}from"lucide-react";import{Children as Y,useCallback as h,useEffect as F,useMemo as Pe,useRef as M,useState as Ie}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as xe,InputGroupAddon as ee,InputGroupButton as te}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Le}from"react/jsx-runtime";function Z(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var ci=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:re,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:ne,children:oe,...se})=>{let s=ut(),l=!!s,ie=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ae,D]=Ie([]),c=l?s.attachments.files:ae,B=M(c);B.current=c;let ue=h(()=>{x.current?.click()},[]),O=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),W=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),le=h((e)=>{let r=[...e],t=r.filter((i)=>O(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let Q=[];for(let T of _){let V=I?.sourcePath(T);Q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:W(T),filename:T.name,size:T.size,lastModified:T.lastModified,...V===void 0?{}:{sourcePath:V}})}return[...i,...Q]})},[I,W,O,z,H,b]),pe=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),me=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),G=l?s.attachments.add:le,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(fi(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${Te}MB.`});return}}G(r)},[c,G,b]),j=l?s.attachments.remove:pe,N=l?s.attachments.clear:me,q=l?s.attachments.openFileDialog:ue;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of B.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let ce=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},X=Pe(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:j,clear:N,openFileDialog:q,fileInputRef:x}),[c,L,j,N,q]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let J=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Z(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Z(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await hi(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await ne({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},de=(e)=>{e.preventDefault(),J(e).catch(y)},fe=h((e)=>{if(!e.trim())return;if(l&&s)ye(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),K=a(Bn.Provider,{value:()=>J(null),children:Le(Un.Provider,{value:fe,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:re,onChange:ce,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:de,ref:A,"data-tour":"chat-input",...se,children:a(xe,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ie&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:oe})})]})});return l?a(dt.Provider,{value:X,children:K}):a(Gn.Provider,{value:X,children:K})};function di({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function ui({className:u,...o}){return a(ee,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function pi({className:u,...o}){return a(ee,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function mi({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var U=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||Y.count(y.children)<=1?"icon-xs":"xs";return a(te,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||Y.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},gi=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ge,{className:"size-4"});if(d==="submitted")g=a(be,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(ve,{className:"size-3 fill-current"});else if(d==="error")g=a(he,{className:"size-4"});return a(te,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
|
|
2
|
+
export{ci,di,ui,pi,mi,U,gi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as r}from"@alwith/api/client";var qe=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function vr(e){qe.setState({...e,terminals:e.terminals??{}})}function yr(e){if(qe.getState().sessionId===e)qe.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function xr(e,n,t){let i=qe.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
|
|
2
|
+
export{qe,vr,yr,xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-vhdzdzf0.js";import{gt}from"./chunk-kg10wznr.js";import{e,x}from"./chunk-yz8dtdk0.js";import{Vn}from"./chunk-9a72hk73.js";import{Loader2Icon as v}from"lucide-react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function fn({session:t,timeline:s}){let{host:m,client:a}=e(),{t:n}=m,u=o((h)=>h.historyPages[t.id]?.cursor!=null),y=Vn(t,s?.turnWork),E=()=>x(m,a.open(t.id,t.cwd)),p=r(gt,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[r(v,{className:"size-4 animate-spin","aria-hidden":"true"}),n("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[r(f,{children:n("conversation.reopen")}),r(l,{children:n("conversation.detached")})]}),r(g,{onClick:E,children:n("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return r(c,{className:"flex-1",children:i(d,{children:[r(f,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
+
export{fn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-yz8dtdk0.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function Bt({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
|
|
2
|
+
export{Bt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Ne(e){if(e.startsWith("\\\\?\\UNC\\"))e="\\\\"+e.slice(8);else if(e.startsWith("\\\\?\\"))e=e.slice(4);if(/^[a-z]:[\\/]/i.test(e))e="/"+e.replaceAll("\\","/");else if(e.startsWith("\\\\"))e=e.replaceAll("\\","/");if(!e.startsWith("/"))throw Error("File URLs require an absolute path");let i=encodeURI(e).replaceAll(/[?#]/g,encodeURIComponent);return e.startsWith("//")?`file:${i}`:`file://${i}`}
|
|
2
|
+
export{Ne};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inSessionTree as v,nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function r(s){return s!==null&&typeof s==="object"&&!Array.isArray(s)?s:null}function o(s){return typeof s==="string"&&s.length>0?s:null}function _(s){switch(s){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function
|
|
2
|
-
export{
|
|
1
|
+
import{inSessionTree as v,nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function r(s){return s!==null&&typeof s==="object"&&!Array.isArray(s)?s:null}function o(s){return typeof s==="string"&&s.length>0?s:null}function _(s){switch(s){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function co(s,l,m,b,S=m[s]){let f=S?.items??l.items,I=new Set(l.items.map(p).filter((t)=>t!==null)),h=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&p(e)===t)??f.find((e)=>p(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),A=f.filter((t)=>{let n=p(t);return n===null?l.items.includes(t):h.has(n)}),T=Object.values(m).filter((t)=>t.subagent?.parentId===s),u=new Map,y=(t,n,e)=>{if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown"})};for(let t of A){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.subagent),i=r(t.rawInput);if(e?.activity==="started"||i?.activity==="started"){let c=o(e?.threadId)??o(i?.agentThreadId),d=o(e?.path)??o(i?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null)}let a=r(n?.collaboration);if(a?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=a?.receiverThreadIds??i?.receiverThreadIds,d=Array.isArray(a?.agents)?a.agents.map(r):[];if(Array.isArray(c))for(let g of c){let k=o(g);if(!k)continue;let w=d.find((x)=>x?.threadId===k);y(k,o(w?.nickname)??o(w?.role),o(i?.prompt))}}}for(let t of T){let n=r(t.subagent?._meta?.codex),e=o(n?.threadId),i=o(n?.parentTurnId);if(!(e===null?void 0:u.get(e))&&(i===null||!h.has(i)))continue;let c=e??t.id;u.set(c,{key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=r(c),g=u.get(o(d?.threadId)??"");if(g)g.status=_(r(d?.state)?.status)}let i=r(n?.subagent),a=u.get(o(i?.threadId)??"");if(a&&i?.activity==="completed")a.status="completed";if(a&&i?.activity==="interrupted")a.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(b.some((e)=>v(m,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
|
|
2
|
+
export{co};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{On}from"./chunk-twxn29aq.js";import{M}from"./chunk-fzze5xcw.js";import{cn as r}from"cn";import{ArrowUpRight as pe,ChevronUp as H,Loader2Icon as W,Zap as Z}from"lucide-react";import{Fragment as ce,useState as q}from"react";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as J,DropdownMenuCheckboxItem as K,DropdownMenuContent as Q,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuLabel as L,DropdownMenuSeparator as u,DropdownMenuSub as T,DropdownMenuSubContent as C,DropdownMenuSubTrigger as O,DropdownMenuTrigger as X}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as he}from"@nyssance/shadcn/vega/components/ui/switch";import{Tooltip as Y,TooltipContent as E,TooltipTrigger as ee}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as e,jsxs as a,Fragment as p}from"react/jsx-runtime";function ai({value:c,onChange:ne,models:x,modelGroups:V,compactCatalog:o,catalogHeight:ae="fixed",effortPresentation:j="slider",unavailableEffort:v,providerMenu:h,header:w,className:B,condensed:z,stripLabelPrefix:_,showDescription:se,showModelList:ie=!0,loading:oe,switching:G,isLoading:te,effortConfig:s,booleanOptions:f,onBooleanChange:R,selectOptions:le=[],t:m,...d}){let[de,re]=q(!1),[me,ue]=q(!1),l=f?.find((n)=>n.id==="fast_mode"),I=o?f?.filter((n)=>n!==l):f,P=(n)=>_&&n.startsWith(_)?n.slice(_.length):n;if(oe)return e("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:a(A,{variant:"ghost",disabled:!0,className:r("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",B),children:[e(W,{className:"size-3 animate-spin"}),e("span",{className:"text-muted-foreground truncate",children:m("model.loadingModels")})]})});return a("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[h&&a(J,{open:de,onOpenChange:re,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"provider-trigger",variant:"ghost",disabled:d.disabled,className:r("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[h.icon,e(H,{className:"size-2.5 shrink-0 opacity-60"})]})})}),e(E,{children:m("model.switchProvider")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((n,t)=>a(ce,{children:[t>0&&n.length>0&&e(u,{}),e(M,{value:h.value,onValueChange:h.onChange,options:n})]},t)),h.moreAction&&a(p,{children:[e(u,{}),a(k,{onClick:h.moreAction,className:"whitespace-nowrap",children:[e("span",{className:"min-w-0 flex-1 truncate",children:m("model.moreModels")}),e(pe,{className:"size-4"})]})]})]})]}),a(J,{open:me,onOpenChange:ue,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"model-trigger","aria-busy":G,variant:"ghost",className:r("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",z&&"h-7 gap-1 px-1.5 text-[11px]",B),...d,children:[c.icon,f?.some((n)=>n.id==="fast_mode"&&n.currentValue&&!n.disabled)&&e(Z,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),e("span",{className:r("min-w-0 flex-1 truncate text-start",z&&"text-[11px]"),children:P(c.label)||m("model.selectModel")}),s&&a("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[e("span",{className:"invisible col-start-1 row-start-1",children:s.sizer??s.levels.reduce((n,t)=>t.name.length>n.length?t.name:n,"")}),e("span",{className:"col-start-1 row-start-1",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),G?e(W,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(H,{className:r("size-3 shrink-0",z&&"size-2.5")})]})})}),e(E,{children:m("model.switchModel")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:r("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",o&&"flex w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5",o&&(ae==="content"?"max-h-[min(350px,var(--available-height))]":"h-[350px]")),children:[o&&a(p,{children:[a(y,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-2 py-1",children:[s?j==="slider"?e("div",{role:"menuitem","aria-label":s.name,className:"min-w-0 flex-1 [&>div]:justify-between [&>div]:gap-3 [&>div]:px-0 [&>div]:py-1.5",children:e(On,{...s,disabled:d.disabled})}):a(T,{children:[a(O,{disabled:d.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[e("span",{children:s.name}),e("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(C,{children:e(M,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):v?a(k,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[e("span",{children:v.name}),e("span",{className:"text-muted-foreground truncate text-xs",children:v.label})]}):e(L,{className:"min-w-0 flex-1 truncate",children:w?.name}),l&&e(K,{"aria-label":l.name,title:l.title??l.name,disabled:d.disabled||l.disabled,checked:l.currentValue,closeOnClick:!1,onCheckedChange:(n)=>R?.(l.id,n),className:r("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ms-auto -me-2 size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",l.currentValue&&!l.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:l.icon??e(Z,{className:"size-4","aria-hidden":"true"})})]}),e(u,{className:"shrink-0"})]}),w&&!o&&a(p,{children:[a("div",{className:"flex items-center gap-2 px-2 py-2",children:[w.icon,e("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:w.name}),w.action]}),e(u,{})]}),a(y,{"data-model-menu-list":o?"":void 0,className:o?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[ie&&(te?e(k,{disabled:!0,className:"text-muted-foreground",children:m("model.loadingModels")}):x.length===0?e(k,{disabled:!0,className:"text-muted-foreground",children:m("model.noModelsAvailable")}):(()=>{let n=x.filter((i)=>!i.more),t=x.filter((i)=>i.more),F=n.length>0&&t.length>0,N=(i,g)=>({disabled:d.disabled,icon:i.icon,value:i.api_id,label:P(i.label),description:g?.noDescription?void 0:se?i.description:void 0}),D=(i)=>{let g=x.find((S)=>S.api_id===i);if(g)ne(g)};if(o)return e(M,{value:c.api_id,onValueChange:D,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:x.map((i)=>N(i))});return a(p,{children:[V?V.map((i)=>{let g=i.models.filter((b)=>!b.more),S=i.models.filter((b)=>b.more),U=g.length>0&&S.length>0;return a(y,{children:[e(L,{className:"text-muted-foreground text-xs font-normal",children:i.name}),e(M,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(U?g:i.models).map((b)=>N(b))}),U&&a(T,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(C,{children:e(M,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:S.map((b)=>N(b,{noDescription:!0}))})})]})]},i.id)}):e(M,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(F?n:x).map((i)=>N(i))}),!V&&F&&a(T,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(C,{children:e(M,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:t.map((i)=>N(i,{noDescription:!0}))})})]})]})})()),!o&&s&&a(p,{children:[e(u,{}),j==="menu"?a(T,{children:[a(O,{disabled:d.disabled,children:[e("span",{className:"flex-1",children:s.name}),e("span",{className:"text-muted-foreground",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(C,{children:e(M,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(On,{...s,disabled:d.disabled})]}),!o&&!s&&v&&a(p,{children:[e(u,{}),a(k,{disabled:!0,children:[e("span",{className:"flex-1",children:v.name}),e("span",{children:v.label})]})]}),le.map((n)=>a(y,{children:[e(u,{}),e(L,{children:n.name}),e(M,{value:n.value,onValueChange:n.onChange,options:n.options,itemClassName:"whitespace-nowrap"})]},n.id)),I&&I.length>0&&a(p,{children:[!s&&e(u,{}),I.map((n)=>o?a(K,{"aria-label":n.name,title:n.title,disabled:d.disabled||n.disabled,checked:n.currentValue,closeOnClick:!1,onCheckedChange:(t)=>R?.(n.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[a("span",{className:"flex items-center gap-2",children:[n.icon,n.name]}),e("span",{"aria-hidden":"true",className:r("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",n.currentValue?"bg-primary":"bg-input"),children:e("span",{className:r("bg-background size-3.5 rounded-full shadow-xs transition-transform",n.currentValue&&"translate-x-3.5")})})]},n.id):a("div",{title:n.title,className:r("flex items-center justify-between gap-3 px-2 py-2.5",n.disabled&&"opacity-50"),children:[a("span",{className:"flex items-center gap-2 text-sm font-medium",children:[n.icon,n.name]}),e(he,{"aria-label":n.name,disabled:d.disabled||n.disabled,checked:n.currentValue,onCheckedChange:(t)=>R?.(n.id,t)})]},n.id))]})]}),o&&w?.action&&a(p,{children:[e(u,{className:"shrink-0"}),e(y,{"data-model-menu-footer":!0,className:"shrink-0",children:w.action})]})]})]})]})}
|
|
2
|
+
export{ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function b({nativeScroll:f=!1,className:t,viewportClassName:n,viewportRef:i,onScroll:s,viewportProps:a,children:c,...m}){let[p,l]=v(!1);if(f)return e("div",{className:o("relative flex min-h-0 flex-1",t),...m,children:e("div",{ref:i,onScroll:s,...a,className:o("min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",n,a?.className),children:c})});return u(r.Root,{"data-slot":"scroll-area",className:o("relative min-h-0 flex-1 pe-[var(--app-scrollbar-track-size)]",t),...m,children:[e(r.Viewport,{ref:i,onScroll:s,"data-slot":"scroll-area-viewport",...a,className:o("size-full rounded-[inherit] pe-2 outline-none",n,a?.className),children:c}),e(r.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":"vertical",orientation:"vertical","data-dragging":p?"":void 0,onPointerDownCapture:(d)=>{if(d.button===0)l(!0)},onPointerUpCapture:()=>l(!1),onPointerCancelCapture:()=>l(!1),onLostPointerCapture:()=>l(!1),className:"flex h-full w-[var(--app-scrollbar-track-size)] touch-none px-[var(--app-scrollbar-edge-gap)] select-none",children:e(r.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}),e(r.Corner,{})]})}
|
|
2
|
+
export{b};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cr}from"./chunk-nhs4dy9n.js";import{ue}from"./chunk-ar7pyb7s.js";import{lo}from"./chunk-59rxa4rt.js";import{y}from"./chunk-wwpv3gc3.js";import{Vi}from"./chunk-t0e7gk7y.js";import{$n,ji}from"./chunk-sqt4g5nd.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as v}from"entities";import ae from"katex";import{CheckIcon as U,ChevronLeftIcon as se,ChevronRightIcon as ie,CopyIcon as ce,DownloadIcon as de,FileIcon as le,LinkIcon as me,MailIcon as ge,XIcon as fe}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as pe,createElement as B,memo as D,startTransition as he,useContext as ke,useEffect as k,useLayoutEffect as X,useMemo as G,useRef as w,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as re}from"react/jsx-runtime";var J=pe(null);function M(){let e=ke(J);if(e===null)throw Error("Markdown host is missing");return e}var we=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,be=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,xe=/\uE200[^\uE201]*$/,Te=4,ve=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function E(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function V(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)&&!V(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!E(e,t)&&!V(e,t,n))return t;return-1}function Ne(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Me(e){return Ne(e,"```")%2===1}function Z(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!E(e,t))n+=1;t+=1}return n%2===1}function Ee(e){return e.endsWith(`
|
|
2
2
|
`)?`${e}\`\`\``:`${e}
|
|
3
3
|
\`\`\``}function _(e,n){if(!e.includes(n)||Ce(e,n)%2===0)return e;let t=ye(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
4
|
`)||Z(r))return e;return`${e}${n}`}function Le(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Y(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ie(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Y(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>Te&&!ve.has(u))return!1}return!0}function $e(e){let{path:n}=Y(e);if(Le(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Re(e){let n=e.match(H);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ie(t)||$e(t)?e.replace(H,"$1"):`${e})`}function Pe(e){let n=e.replace(xe,"");if(n.length===0||n.includes("`")&&Z(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Me(n))return{isCodeFenceOpen:!0,markdown:Ee(n)};if(n.includes(")n=Re(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Se(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return Se(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Q(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Q(t.tokens);if(!O(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!O(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function Fe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Fe(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Ae(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function He(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function _e(e){let n=He(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Oe({href:e}){let n=G(()=>_e(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ge:o?
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Je(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function ne(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${ee(Je(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ne(r),s=t.get(o)??0;return t.set(o,s+1),te(r,`${n}-${o}-${s}`)})}function Ve(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(U,{}):null]}):null,m(t,n)]},n)}function Ze(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return B(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ye(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=ee(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function z(e,n,t){let r=
|
|
7
|
-
export{
|
|
5
|
+
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function Fe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Fe(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Ae(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function He(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function _e(e){let n=He(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Oe({href:e}){let n=G(()=>_e(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ge:o?le:me;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function je({children:e,href:n,title:t}){let r=M();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Ae(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(Oe,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function We({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=M(),i=w(null),[c,d]=h(null),[u,p]=h(null),[L,b]=h(!1);if(k(()=>{let g=Vi(d,p);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let x=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:L?a(U,{}):a(ce,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function qe({code:e,language:n}){return M().preview?a("span",{children:e}):a(Ke,{code:e,language:n})}function Ke({code:e,language:n}){let t=w(null),[r,o]=h(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(We,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function ze(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ue({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(se,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(de,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(ie,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(fe,{})})]})]})}function Be(e){return M().preview?a(re,{children:e.alt}):a(De,{...e})}function De({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=h();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(re,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(ze(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ue,{preview:s,setPreview:i})})]})}function Xe({value:e,display:n}){let t=w(null);return X(()=>{if(t.current===null)throw Error("Codex math root is not mounted");ae.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var Ge=150,C=null;function W(e,n){let t=C;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function ee(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function q(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
+
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Je(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function ne(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${ee(Je(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ne(r),s=t.get(o)??0;return t.set(o,s+1),te(r,`${n}-${o}-${s}`)})}function Ve(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(U,{}):null]}):null,m(t,n)]},n)}function Ze(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return B(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ye(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=ee(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function z(e,n,t){let r=N(e.href);if(!lo(r))return null;return a(Be,{src:r,alt:v(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function te(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return B(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>z(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(cr,{text:v(t.text),children:W(v(t.text),n)},n):m(t.tokens,n)}case"escape":return W(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=N(t.href),s=y(o);if(s!==null)return a(ue,{app:{id:s,name:v(t.text).replace(/^\$/,"")}},n);return lo(o)?a(je,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return z(e,n,!1);case"code":{let t=e;return a(qe,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Ze(e,n);case"list_item":return Ve(e,n);case"table":return Ye(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Xe,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function T(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?v(n.text):n.tokens.map(T).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(T).join("");case"list":return e.items.map(T).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(T).join("")).join("")).join("")}default:return""}}function Qe({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=C;try{return C={cursor:t,runs:r,generation:o},te(e,n)}finally{C=s}}var en=D(function({result:n}){let{text:t,isStreaming:r}=n,o=G(()=>{let l=n.tokens;if(n.source.includes("!["))Q(l);P(l);let g=new Map,S=0;return l.map((I)=>{let R=ne(I),F=g.get(R)??0;g.set(R,F+1);let A=T(I),oe={token:I,tokenKey:`root-${R}-${F}`,offset:S,visibleText:A};return S+=A.length,oe})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,p=performance.now(),L=r&&d?c.runs.filter((l)=>p-l.firstSeenAtMs<Ge):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:L.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)x.runs.push({start:u,end:s.length,firstSeenAtMs:p});return X(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Qe,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:x.runs,generation:b},l.tokenKey))})}),nn=D(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>$n(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let u=ji((p)=>{if(!i.current)i.current=!0,s(p);else he(()=>s(p))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let p=t?Pe(n).markdown:n;u.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(en,{result:o})});function ft({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(J.Provider,{value:t,children:a(nn,{text:r?o:e,isStreaming:r})})}
|
|
7
|
+
export{ft};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{I}from"./chunk-vmmebfqv.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as b}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function Xe({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=I();return n(x,{open:m,onOpenChange:r,children:[o(b,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
|
|
2
|
+
export{Xe};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function Q(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function v(e,t){return e.find((n)=>n.category===t&&o(n))}function J(e){return Q(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
+
export{Q,v,J};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{h}from"./chunk-7f35yy1n.js";import{e}from"./chunk-yz8dtdk0.js";import{ct}from"./chunk-zhxjp4tt.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function ni({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=h(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>ct(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
|
|
2
|
+
export{ni};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function kr({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function p(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function E(t){let{Markdown:o}=p();return e(o,{...t})}
|
|
2
|
+
export{kr,p,E};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var r=new Map,i=new Map,m=new Map;function
|
|
2
|
-
export{r,
|
|
1
|
+
var r=new Map,i=new Map,m=new Map;function xi(e,t){if(i.has(e))throw Error("An attachment writer is already registered for this session");return i.set(e,t),()=>{if(i.get(e)===t)i.delete(e)}}function W(e,t){let o=r.get(e);if(!o)return;let n=t(o.attachments);r.set(e,{...o,attachments:n}),i.get(e)?.(n)}function dn(e,t){m.set(e,t),t.finally(()=>{if(m.get(e)===t)m.delete(e)})}async function ga(e){for(;;){let n=r.get(e)?.attachments.flatMap((p)=>{let c=m.get(p.id);return c?[c]:[]})??[];if(!n.length)break;await Promise.all(n)}let t=r.get(e);if(!t)return null;let o=await Promise.all(t.attachments.map(async(n)=>{if(!n.url.startsWith("blob:"))return n;let p=await fetch(n.url);if(!p.ok)throw Error("Cannot read draft image");let c=await p.blob(),f=await new Promise((l,g)=>{let a=new FileReader;a.onload=()=>l(a.result),a.onerror=()=>g(a.error),a.readAsDataURL(c)});return{...n,url:f}}));return{...t,...t.apps?{apps:t.apps.map((n)=>({...n}))}:{},text:t.text,mentions:[...t.mentions],attachments:o,modelId:t.modelId}}function fa(e,t){if(t===null)r.delete(e);else r.set(e,t)}var s=new Map;function un(e,t){if(s.has(e))throw Error("A composer is already registered for this session");return s.set(e,t),()=>{if(s.get(e)===t)s.delete(e)}}function ha(e,t){if(typeof t!=="string"||!t.trim())throw Error("The draft is empty");let o=s.get(e);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(e);if(n&&(n.text.length||n.attachments.length||n.mentions.length||n.apps?.length))throw Error("The composer already has a draft; send or clear it first");o(t),r.set(e,{text:t,attachments:[],mentions:[],modelId:n?.modelId??null})}
|
|
2
|
+
export{r,xi,W,dn,ga,fa,un,ha};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function
|
|
2
|
-
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function
|
|
3
|
-
export{
|
|
1
|
+
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function _i(e){let t=0,i=0;for(let o of e.split(`
|
|
2
|
+
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function mt({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
|
|
3
|
+
export{_i,mt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d}from"./chunk-c5gzxgfp.js";import{a}from"./chunk-j3svczsr.js";import{f,m}from"./chunk-b6fs77p0.js";import{et}from"./chunk-sntvq6zv.js";import{cn as r}from"cn";import{ArrowLeftIcon as s,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as u,DropdownMenuItem as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as L}from"react/jsx-runtime";function Kr({onCollapseAll:i}){let{t:n}=a();return L(c,{children:[o(w,{render:o(et,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(u,{align:"end",className:"w-52",children:o(g,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function qr({screen:i,onSwitch:n}){let{t:e}=a(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(m,{className:r(d,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(f,{children:i==="main"?o(s,{}):o(l,{})})})}
|
|
2
|
+
export{Kr,qr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function M({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
|
|
2
|
+
export{M};
|