@alwith/module-chat 0.5.5 → 0.5.7
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 +5 -1
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-w9nr7saa.js → chunk-01ekhzvd.js} +1 -1
- package/dist/{chunk-q989x2x5.js → chunk-0geh5prw.js} +2 -2
- package/dist/{chunk-t9nky8ka.js → chunk-0nda3snj.js} +3 -3
- package/dist/chunk-11kwcp8b.js +2 -0
- package/dist/chunk-19em37f4.js +2 -0
- package/dist/chunk-1yz914xx.js +2 -0
- package/dist/{chunk-m3cbbk3v.js → chunk-2407f23n.js} +2 -2
- package/dist/{chunk-rmv0t2ee.js → chunk-294gms5s.js} +2 -2
- package/dist/{chunk-5s5tedyw.js → chunk-2mj3yh2z.js} +3 -3
- package/dist/{chunk-b0v983ch.js → chunk-2pha46d9.js} +1 -1
- package/dist/chunk-2rjt5w9p.js +2 -0
- package/dist/chunk-31x6chk8.js +2 -0
- package/dist/chunk-356na0ca.js +2 -0
- package/dist/{chunk-k6b4cf05.js → chunk-3dhdh7jh.js} +1 -1
- package/dist/chunk-3g3n0djp.js +2 -0
- package/dist/{chunk-mwkr9pvg.js → chunk-3pk47npz.js} +2 -2
- package/dist/chunk-465zxxrf.js +2 -0
- package/dist/{chunk-5nemwzzv.js → chunk-4ar9qjya.js} +2 -2
- package/dist/{chunk-tv9wdbxr.js → chunk-4vb2e17y.js} +1 -1
- package/dist/{chunk-kk2nr6dd.js → chunk-4xt6bccx.js} +2 -2
- package/dist/{chunk-h3s5e0c5.js → chunk-4y0yjee1.js} +2 -2
- package/dist/{chunk-3zj0ka21.js → chunk-4y87qc0q.js} +2 -2
- package/dist/{chunk-jmcb7an2.js → chunk-5640ga6m.js} +2 -2
- package/dist/{chunk-6jyd3a7v.js → chunk-58t2kkh8.js} +2 -2
- package/dist/chunk-5hdcwxmh.js +2 -0
- package/dist/chunk-5tsvqfej.js +2 -0
- package/dist/chunk-602snzpa.js +2 -0
- package/dist/{chunk-p2khnrm1.js → chunk-60tc6jmp.js} +2 -2
- package/dist/{chunk-0jw4ffzj.js → chunk-62sp80d0.js} +1 -1
- package/dist/{chunk-9d0vkezs.js → chunk-6amcjhqh.js} +2 -2
- package/dist/{chunk-0vy9fzs3.js → chunk-6xhjta3v.js} +1 -1
- package/dist/{chunk-mme37xva.js → chunk-71zed0rt.js} +1 -1
- package/dist/chunk-7az2575k.js +3 -0
- package/dist/{chunk-812n3qd8.js → chunk-82m8q66f.js} +2 -2
- package/dist/{chunk-11v81zha.js → chunk-862r6ajk.js} +1 -1
- package/dist/chunk-8jhsjq8f.js +2 -0
- package/dist/chunk-8pktp9pc.js +2 -0
- package/dist/chunk-90av8aeq.js +2 -0
- package/dist/{chunk-xf91jp39.js → chunk-9mknagqd.js} +2 -2
- package/dist/{chunk-fv7tp8pr.js → chunk-9y31b3sw.js} +2 -2
- package/dist/chunk-9yha9cvq.js +2 -0
- package/dist/{chunk-tjykfxrd.js → chunk-aaqk0jrt.js} +2 -2
- package/dist/chunk-appwebh3.js +2 -0
- package/dist/chunk-atv1r122.js +2 -0
- package/dist/{chunk-n6xa65sp.js → chunk-awawx7sp.js} +2 -2
- package/dist/{chunk-h2nvgcbs.js → chunk-b826jevt.js} +2 -2
- package/dist/chunk-b91ggk46.js +2 -0
- package/dist/{chunk-mxj4s2r8.js → chunk-bkyjy7tp.js} +1 -1
- package/dist/chunk-bztgv33r.js +2 -0
- package/dist/chunk-cc8f9yvh.js +2 -0
- package/dist/{chunk-qsqyf4y3.js → chunk-ckft9abb.js} +2 -2
- package/dist/{chunk-mzc51shd.js → chunk-d1ckpc56.js} +2 -2
- package/dist/{chunk-q53h2y2a.js → chunk-d7h2n049.js} +2 -2
- package/dist/{chunk-dhvpffgf.js → chunk-d9xm18sy.js} +2 -2
- package/dist/chunk-dsxw7qvm.js +2 -0
- package/dist/chunk-dx176sdf.js +2 -0
- package/dist/{chunk-1mnc7200.js → chunk-e11qjnb4.js} +2 -2
- package/dist/{chunk-wpx2bvd0.js → chunk-eftxa7tx.js} +7 -7
- package/dist/chunk-eg2ts8sp.js +2 -0
- package/dist/{chunk-ad32h099.js → chunk-ehrfhhfw.js} +3 -3
- package/dist/{chunk-kjtd3wc3.js → chunk-ek06eyp4.js} +1 -1
- package/dist/{chunk-ygebvrv5.js → chunk-eq1azzrt.js} +1 -1
- package/dist/{chunk-cbbr9m3a.js → chunk-f09gwfr3.js} +2 -2
- package/dist/{chunk-1tz8afx9.js → chunk-f5z2f54v.js} +2 -2
- package/dist/chunk-f7tp22k1.js +4 -0
- package/dist/{chunk-gdhkb2rz.js → chunk-fvgebjsz.js} +2 -2
- package/dist/{chunk-ez1ac611.js → chunk-g5ke7686.js} +2 -2
- package/dist/{chunk-494jkxv9.js → chunk-gjh9py8j.js} +2 -2
- package/dist/{chunk-hw5n7sqm.js → chunk-gxmrync5.js} +2 -2
- package/dist/chunk-gyt0xsmh.js +2 -0
- package/dist/{chunk-0h993cve.js → chunk-gzff19t3.js} +2 -2
- package/dist/{chunk-tcgx9yxg.js → chunk-h6354tmm.js} +2 -2
- package/dist/chunk-hf0nha31.js +2 -0
- package/dist/{chunk-w522gwhm.js → chunk-hxhptw6e.js} +2 -2
- package/dist/{chunk-eyqbvc19.js → chunk-hz1pgnqp.js} +2 -2
- package/dist/{chunk-jhxjbpt3.js → chunk-jce1mkfh.js} +2 -2
- package/dist/{chunk-nhsbjys5.js → chunk-jn90tdhn.js} +1 -1
- package/dist/{chunk-v958q8hh.js → chunk-jrmdbkae.js} +2 -2
- package/dist/{chunk-p0ebmb2m.js → chunk-k6tqy9x5.js} +1 -1
- package/dist/{chunk-9yv5c2s3.js → chunk-kh32nepy.js} +2 -2
- package/dist/{chunk-5w48y2ad.js → chunk-kmt7fjdq.js} +1 -1
- package/dist/{chunk-c7b8rscf.js → chunk-krn4yh36.js} +2 -2
- package/dist/chunk-kywzvmjx.js +2 -0
- package/dist/chunk-m5xngq9n.js +2 -0
- package/dist/{chunk-jtafw6h4.js → chunk-m8dbspj3.js} +2 -2
- package/dist/{chunk-8fd8jhbf.js → chunk-mdg2na3p.js} +3 -3
- package/dist/chunk-mgtkmbmd.js +2 -0
- package/dist/chunk-msredq8h.js +2 -0
- package/dist/{chunk-ap1br099.js → chunk-mzh48e09.js} +2 -2
- package/dist/chunk-n7yk45mr.js +2 -0
- package/dist/chunk-na21awb6.js +2 -0
- package/dist/{chunk-9mcfd41e.js → chunk-nc724yjk.js} +2 -2
- package/dist/{chunk-xjtqdp82.js → chunk-ncekagm6.js} +1 -1
- package/dist/chunk-nkjfa05y.js +2 -0
- package/dist/chunk-nnfnwj9n.js +2 -0
- package/dist/chunk-nyvzyy9q.js +3 -0
- package/dist/{chunk-v8rqevms.js → chunk-p0bvkpwq.js} +3 -3
- package/dist/{chunk-at0v48cp.js → chunk-qb09vn5h.js} +2 -2
- package/dist/chunk-qpc4ca5y.js +2 -0
- package/dist/{chunk-jh46xzr6.js → chunk-qrar3eh8.js} +3 -3
- package/dist/chunk-qsvd61ce.js +4 -0
- package/dist/chunk-qtwmcw8y.js +2 -0
- package/dist/chunk-r3tfwy7k.js +2 -0
- package/dist/chunk-rj4z8zrk.js +2 -0
- package/dist/chunk-rwpr6j34.js +2 -0
- package/dist/{chunk-3p9j3gmw.js → chunk-ryz4c13z.js} +2 -2
- package/dist/{chunk-x8vd2d2g.js → chunk-sc57jf2x.js} +1 -1
- package/dist/chunk-sgy0gbar.js +2 -0
- package/dist/{chunk-sq5zstzq.js → chunk-sppn6v56.js} +2 -2
- package/dist/chunk-sw9pw2vx.js +2 -0
- package/dist/{chunk-76fxyvb0.js → chunk-t177dfb8.js} +2 -2
- package/dist/{chunk-y8qmxd0j.js → chunk-t3ew92b3.js} +2 -2
- package/dist/{chunk-y6v59cgf.js → chunk-tc85dd04.js} +1 -1
- package/dist/chunk-tmc05znj.js +3 -0
- package/dist/{chunk-f3xhtnkz.js → chunk-tsexf956.js} +2 -2
- package/dist/{chunk-39f0d44a.js → chunk-tv89wh8b.js} +2 -2
- package/dist/{chunk-key9msc9.js → chunk-tx1tn5kr.js} +2 -2
- package/dist/chunk-v7581vjx.js +2 -0
- package/dist/{chunk-bje0nmh9.js → chunk-v86a2qjp.js} +2 -2
- package/dist/{chunk-raz9hb3h.js → chunk-vmw815b1.js} +5 -5
- package/dist/{chunk-xttthm0n.js → chunk-wbkj0ea6.js} +2 -2
- package/dist/chunk-x55qtpsa.js +2 -0
- package/dist/{chunk-t794afpy.js → chunk-xcfde6w5.js} +3 -3
- package/dist/{chunk-3d58k7fn.js → chunk-ya03j791.js} +2 -2
- package/dist/{chunk-ta45etnd.js → chunk-yx7f12tc.js} +1 -1
- package/dist/{chunk-5xjm1hab.js → chunk-z33zakbw.js} +1 -1
- package/dist/{chunk-2q71dv8k.js → chunk-zb8cdt79.js} +1 -1
- package/dist/{chunk-r8k9jd0z.js → chunk-ze7v4hpt.js} +2 -2
- package/dist/{chunk-48av28r4.js → chunk-zk6d3k70.js} +5 -5
- 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.d.ts +2 -0
- 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/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.d.ts +2 -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-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.d.ts +2 -2
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.d.ts +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.d.ts +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.d.ts +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.d.ts +1 -1
- package/dist/conversation/composer/prediction.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.d.ts +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.d.ts +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-view.d.ts +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/session-actions.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.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/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/search/chat-search.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/archived-sessions.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.d.ts +2 -2
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.d.ts +1 -5
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.d.ts +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.d.ts +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.d.ts +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/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-project-sessions.d.ts +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.d.ts +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.d.ts +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.d.ts +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-turn.d.ts +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.d.ts +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.d.ts +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/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.d.ts +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.d.ts +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.d.ts +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.d.ts +2 -3
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/types.d.ts +1 -2
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.d.ts +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input-group-textarea.js +1 -1
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/kbd.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/spinner.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-00sds3wb.js +0 -2
- package/dist/chunk-1dce9zt8.js +0 -2
- package/dist/chunk-1mv3y3cs.js +0 -2
- package/dist/chunk-1q1hyka4.js +0 -2
- package/dist/chunk-1v3wc4cv.js +0 -2
- package/dist/chunk-29wvjf38.js +0 -2
- package/dist/chunk-2w9f1q84.js +0 -4
- package/dist/chunk-34xzrr3s.js +0 -2
- package/dist/chunk-42fw8maa.js +0 -2
- package/dist/chunk-52y4pyr1.js +0 -2
- package/dist/chunk-6bdd2cgs.js +0 -2
- package/dist/chunk-7w4tjrdw.js +0 -2
- package/dist/chunk-85gdavf5.js +0 -2
- package/dist/chunk-8w6ze6pw.js +0 -4
- package/dist/chunk-91qp7sps.js +0 -2
- package/dist/chunk-932ykb37.js +0 -2
- package/dist/chunk-azp1438s.js +0 -2
- package/dist/chunk-bafntrka.js +0 -3
- package/dist/chunk-bse4zh1d.js +0 -2
- package/dist/chunk-bx1x7t6v.js +0 -3
- package/dist/chunk-cka09jf6.js +0 -2
- package/dist/chunk-dgx31pdr.js +0 -2
- package/dist/chunk-dkbtw3g9.js +0 -2
- package/dist/chunk-f59aepmd.js +0 -2
- package/dist/chunk-gdbzk1kt.js +0 -2
- package/dist/chunk-haf9qn5a.js +0 -2
- package/dist/chunk-hd682pax.js +0 -2
- package/dist/chunk-jf5651fz.js +0 -2
- package/dist/chunk-kc9rzb07.js +0 -2
- package/dist/chunk-m92evp24.js +0 -2
- package/dist/chunk-n514z4we.js +0 -2
- package/dist/chunk-p8n6rm5h.js +0 -2
- package/dist/chunk-qqv0bewt.js +0 -2
- package/dist/chunk-r22h488a.js +0 -3
- package/dist/chunk-rd2n48s1.js +0 -2
- package/dist/chunk-s1vxbxzr.js +0 -2
- package/dist/chunk-s3mx42dt.js +0 -2
- package/dist/chunk-seg9xzjy.js +0 -2
- package/dist/chunk-tp5y8cc7.js +0 -2
- package/dist/chunk-vmywavgm.js +0 -2
- package/dist/chunk-w3z37qwe.js +0 -2
- package/dist/chunk-w5wzxdbk.js +0 -2
- package/dist/chunk-wthttnkz.js +0 -2
- package/dist/chunk-xnmjg8r1.js +0 -2
- package/dist/chunk-xrek8rbm.js +0 -2
- package/dist/chunk-z79xmq12.js +0 -2
- package/dist/chunk-zw2q13qg.js +0 -2
package/README.md
CHANGED
|
@@ -77,7 +77,11 @@ the draft port, the interrupt hook for dictation and the receipt observer for ha
|
|
|
77
77
|
stop, the `SessionInfoCard` hover card, `ArchivedSessions` and the hooks behind them
|
|
78
78
|
(`useActivityPreview`, `useProjectSessions`). `SessionListProvider` takes the host and client and
|
|
79
79
|
owns the delete confirmation; slots add the application's row actions and group headers. Import
|
|
80
|
-
`@alwith/module-chat/session-list.css` once.
|
|
80
|
+
`@alwith/module-chat/session-list.css` once. Groups come from the `@nyssance/codex-acp-v2/client`
|
|
81
|
+
projection: Codex projects by name, then quick chats (the home directory, `~/Documents/Codex` and
|
|
82
|
+
`~/Documents/ALwith`, on the Runtime's machine), then one group per remaining folder. The list waits
|
|
83
|
+
for the client's project context and never guesses quick chats from local path patterns, so this
|
|
84
|
+
entry needs `@nyssance/codex-acp-v2` installed.
|
|
81
85
|
|
|
82
86
|
`search` provides Desktop's complete find bar, DOM matching, highlights and navigation. The host supplies its viewport, labels and native-menu subscription; virtualized callers also supply source matches and an async turn-reveal callback. Key the component by session identity to discard the previous search on a session switch. Highlight ownership is per mounted search, and cancelled navigation cannot repaint after close. Source projection stays with the application's message model; the search component never reads a private store.
|
|
83
87
|
|
package/dist/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{sr,a,v}from"./chunk-ryz4c13z.js";export{sr as ActivityHostProvider,v as ActivityMarkdown,a as useActivityHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ue}from"../chunk-4vb2e17y.js";import{e}from"../chunk-cg97byvk.js";import{ie}from"../chunk-862r6ajk.js";import{l}from"../chunk-1hy64ewz.js";import{f}from"../chunk-ek06eyp4.js";import{z,P}from"../chunk-kmt7fjdq.js";import{k}from"../chunk-ncekagm6.js";import{mn,Ct,ee,Ve}from"../chunk-3g3n0djp.js";import{autoUpdate as G}from"@floating-ui/dom";import{cn as H}from"cn";import{useCallback as R,useEffect as M,useLayoutEffect as O,useMemo as _,useRef as V,useState as F}from"react";import{createPortal as W}from"react-dom";import{jsx as i,jsxs as m}from"react/jsx-runtime";var c="__other__";function de({current:r,total:A,anchorRef:N,t:p,onAccept:I,onDecline:L}){let x=_(()=>r?mn(r.requestedSchema):[],[r]),[S,b]=F({}),T=V(null);M(()=>{if(r?.elicitationId===void 0)return;let t={};for(let{key:a,property:o}of x)if(!ee(o)){let u=Ve(o)[0];if(u)t[a]={selected:u.value}}b(t)},[r?.elicitationId,x]),M(()=>{if(r?.elicitationId!==void 0&&T.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")T.current.focus()},[r?.elicitationId]);let[y,q]=F(null),[C,D]=F(null),E=R(()=>{let t=N.current;if(!t)return;let a=t.getBoundingClientRect();if(a.width===0){let o=Math.min(640,window.innerWidth*0.9);q({left:(window.innerWidth-o)/2,width:o,bottom:24});return}q({left:a.left,width:a.width,bottom:window.innerHeight-a.bottom+20})},[N]);O(()=>{if(!r)return;let t=0,a=()=>{if(N.current){E();return}t=requestAnimationFrame(a)};return a(),()=>cancelAnimationFrame(t)},[r,E,N]),O(()=>{let t=N.current;if(!r||!t||!C)return;return G(t,C,E,{animationFrame:!0})},[r,C,N,E]);let U=_(()=>{if(!r)return!1;for(let{key:t,property:a}of x){let o=S[t];if(!o)return!1;if(ee(a)){if(!o.selectedSet||o.selectedSet.size===0)return!1;if(o.selectedSet.has(c)&&!o.otherText?.trim())return!1}else{if(!o.selected)return!1;if(o.selected===c&&!o.otherText?.trim())return!1}}return!0},[r,x,S]),j=R(async()=>{if(!r)return;if(!U)return;let t={},a={};for(let{key:o,property:u}of x){let d=S[o];if(!d)continue;let g;if(ee(u))t[o]=[...d.selectedSet??[]].map((v)=>v===c?(d.otherText??"").trim():v).filter(Boolean);else{let v=d.selected??"";if(t[o]=v===c?(d.otherText??"").trim():v,v!==c)g=Ve(u).find((s)=>s.value===v)?.preview}let h=d.notes?.trim();if(g||h)a[o]={...g&&{preview:g},...h&&{notes:h}}}await I(r.elicitationId,t,a)},[r,x,S,U,I]),B=R(async()=>{if(r)await L(r.elicitationId)},[r,L]);if(!r||!y)return null;return W(m("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(t)=>{if(t.key==="Escape")t.preventDefault(),B()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:y.left,width:y.width,bottom:y.bottom,maxHeight:"70vh"},ref:(t)=>{T.current=t,D(t)},children:[m("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[i("div",{className:"text-foreground text-sm font-medium",children:p("askUserQuestion.title")}),A>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${A}`})]}),i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"space-y-4 px-3 py-3",children:x.map(({key:t,property:a},o)=>{let u=S[t],d=u?.selected,g=u?.selectedSet??new Set,h=Ve(a),v=ee(a);return m("div",{className:"space-y-2",children:[m("div",{className:"flex items-center gap-2",children:[i(Ue,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:Ct(a).title??t}),i("div",{className:"text-foreground text-sm font-medium",children:Ct(a).description})]}),v?m("div",{className:"space-y-1.5 ps-1",children:[h.map((s)=>m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[i(ie,{checked:g.has(s.value),onCheckedChange:(n)=>{b((w)=>{let Q=new Set(w[t]?.selectedSet??new Set);if(n)Q.add(s.value);else Q.delete(s.value);return{...w,[t]:{...w[t],selectedSet:Q}}})}}),m("div",{className:"min-w-0 flex-1",children:[i("div",{className:"text-foreground text-sm",children:s.label}),s.description&&i("div",{className:"text-muted-foreground text-xs",children:s.description})]})]},s.value)),m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[i(ie,{checked:g.has(c),onCheckedChange:(s)=>{b((n)=>{let w=new Set(n[t]?.selectedSet??new Set);if(s)w.add(c);else w.delete(c);return{...n,[t]:{...n[t],selectedSet:w}}})}}),i("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:p("askUserQuestion.other")})]}),g.has(c)&&i("div",{className:"ps-7",children:i(l,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],otherText:s.target.value}}))})})]}):m(z,{value:d??"",onValueChange:(s)=>b((n)=>({...n,[t]:{...n[t],selected:s}})),className:"space-y-1.5 ps-1",children:[h.map((s)=>{let n=`${o}:${s.value}`;return m("div",{className:H("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",d===s.value&&"bg-muted/60"),children:[i(P,{value:s.value,id:n}),m(f,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer",children:[i("div",{className:"text-foreground text-sm font-normal",children:s.label}),s.description&&i("div",{className:"text-muted-foreground text-xs font-normal",children:s.description})]})]},s.value)}),m("div",{className:H("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",d===c&&"bg-muted/60"),children:[i(P,{value:c,id:`${o}:other`,className:"mt-0.5"}),i(f,{htmlFor:`${o}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:p("askUserQuestion.other")})]}),d===c&&i("div",{className:"ps-7",children:i(l,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],otherText:s.target.value}}))})})]}),!v&&d&&d!==c&&(()=>{let s=h.find((n)=>n.value===d)?.preview;if(!s)return null;return i("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:s})})(),h.some((s)=>s.preview)&&i(k,{placeholder:p("askUserQuestion.notesPlaceholder"),value:u?.notes??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],notes:s.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},t)})})}),m("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[i(e,{variant:"ghost",size:"sm",onClick:()=>void B(),children:p("askUserQuestion.cancel")}),i(e,{size:"sm",disabled:!U,onClick:()=>void j(),children:p("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mn,Ct,ee,Ve}from"../chunk-3g3n0djp.js";export{mn as elicitationFields,Ct as elicitationLabels,Ve as elicitationOptions,ee as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fr,kn,Xr,Yr}from"../chunk-bztgv33r.js";export{fr as PERMISSION_KIND_GROUP_ORDER,Xr as isAllowKind,Yr as isAlwaysKind,kn as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{wn}from"../chunk-4y0yjee1.js";import"../chunk-bztgv33r.js";export{wn as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pr,gr,Sr,yn}from"../chunk-356na0ca.js";import"../chunk-jn90tdhn.js";import"../chunk-862r6ajk.js";import"../chunk-1hy64ewz.js";import"../chunk-kmt7fjdq.js";import"../chunk-ek06eyp4.js";import"../chunk-eq1azzrt.js";import"../chunk-k6tqy9x5.js";import"../chunk-tc85dd04.js";import"../chunk-ncekagm6.js";import"../chunk-cg97byvk.js";export{yn as SchemaElicitationForm,Pr as elicitationFields,gr as initialValues,Sr as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bn}from"../chunk-gxmrync5.js";import"../chunk-01ekhzvd.js";import"../chunk-cg97byvk.js";export{bn as UrlElicitationCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as r}from"cn";import{jsx as d}from"react/jsx-runtime";function
|
|
1
|
+
import{cn as r}from"cn";import{jsx as d}from"react/jsx-runtime";function Cn({className:a,size:t="default",...o}){return d("div",{"data-slot":"card","data-size":t,className:r("group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...o})}function Tn({className:a,...t}){return d("div",{"data-slot":"card-header",className:r("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...t})}function In({className:a,...t}){return d("div",{"data-slot":"card-title",className:r("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",a),...t})}function Pn({className:a,...t}){return d("div",{"data-slot":"card-description",className:r("text-muted-foreground text-sm",a),...t})}function Zr({className:a,...t}){return d("div",{"data-slot":"card-action",className:r("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...t})}function Sn({className:a,...t}){return d("div",{"data-slot":"card-content",className:r("flex flex-col gap-3 px-(--card-spacing)",a),...t})}function Nn({className:a,...t}){return d("div",{"data-slot":"card-footer",className:r("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",a),...t})}export{Cn,Tn,In,Pn,Zr,Sn,Nn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ho}from"./chunk-h6354tmm.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Gt({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(ho,{src:c,alt:"",onClose:()=>a(!1)})]})}function fo({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(Gt,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
|
|
2
|
+
export{Gt,fo};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{q}from"./chunk-eq1azzrt.js";import{Yt}from"./chunk-4xt6bccx.js";import{Eo}from"./chunk-294gms5s.js";import{Fe}from"./chunk-58t2kkh8.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as X}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as v,useLayoutEffect as Y,useMemo as Z,useRef as _,useState as g}from"react";import{createPortal as at}from"react-dom";import{jsx as p,jsxs as E,Fragment as ct}from"react/jsx-runtime";function Ro({handleRef:a,anchorRef:c,commands:C,searchFiles:u,onMention:R,onSearchError:A,fileSearchDebounceMs:M=0,bashMode:j=!1,forcedOpen:i=!1,onForcedOpenChange:f,emptyLabel:F,fileStatusLabels:h,morePlugins:D}){let z=Fe(),l=z.textInput.value,[K,U]=g(0),[y,P]=g(null),[b,L]=g(0),V=_(null);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>U(t.selectionStart??0),o=()=>{if(document.activeElement===t)n()};return t.addEventListener("keyup",n),t.addEventListener("click",n),t.addEventListener("input",n),t.addEventListener("select",n),t.addEventListener("focus",n),document.addEventListener("selectionchange",o),()=>{t.removeEventListener("keyup",n),t.removeEventListener("click",n),t.removeEventListener("input",n),t.removeEventListener("select",n),t.removeEventListener("focus",n),document.removeEventListener("selectionchange",o)}});let W=Z(()=>j&&l.startsWith("!")?null:Eo(l,K),[l,K,j]),r=W?.kind==="at"&&!u?null:W,N=`${r?.kind??"forced"}:${r?.query??""}:${i}`,[O,tt]=g(N);if(O!==N)tt(N),L(0);let I=_(null);v(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=l;else if(l!==I.current)f?.(!1)},[i,l,f]);let x=r?.kind==="at"?r.query:null;v(()=>{if(x===null||!u){P(null);return}let t=!0,n=()=>{u(x).then((s)=>{if(t)P({query:x,search:u,items:s})},(s)=>{if(t)P({query:x,search:u,items:[]}),A(s)})},o=M>0?window.setTimeout(n,M):null;if(o===null)n();return()=>{if(t=!1,o!==null)window.clearTimeout(o)}},[x,u,M,A]);let d=Z(()=>{if(r?.kind==="at")return y?.query===r.query&&y.search===u?y.items:[];if(r)return Yt(C,r.query);if(i)return Yt(C,"");return[]},[r,i,C,y,u]),[et,S]=g(!1);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>S(!0),o=()=>{if(S(!1),i)f?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",n),t.addEventListener("blur",o),()=>{t.removeEventListener("focus",n),t.removeEventListener("blur",o)}},[a,i,f]),v(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let m=et&&(r!==null?r.kind==="slash"||d.length>0||!!h:i);v(()=>{if(!m)return;V.current?.querySelector(`[data-idx="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,m]);function Q(t){let n=a.current?.getTextarea();if(!n)return;let o,s;if(r){let H=r.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(o=l.slice(0,r.start)+H+l.slice(r.end),r.kind==="at")R?.(t.payload);s=r.start+H.length}else if(i)o=`${l.length===0||l.endsWith(`
|
|
2
2
|
`)?l:`${l}
|
|
3
|
-
`}/${t.payload} `,s=o.length,f?.(!1);else return;
|
|
4
|
-
export{
|
|
3
|
+
`}/${t.payload} `,s=o.length,f?.(!1);else return;z.textInput.setInput(o),requestAnimationFrame(()=>{n.focus(),n.setSelectionRange(s,s)})}v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=(o)=>{if(!m)return;if(a.current?.isComposing()||o.isComposing||o.keyCode===229)return;if(o.key==="ArrowDown")o.preventDefault(),o.stopPropagation(),L((s)=>d.length===0?0:Math.min(d.length-1,s+1));else if(o.key==="ArrowUp")o.preventDefault(),o.stopPropagation(),L((s)=>Math.max(0,s-1));else if(o.key==="Enter"||o.key==="Tab"){o.preventDefault(),o.stopPropagation();let s=d[b];if(s)Q(s)}else if(o.key==="Escape")if(o.preventDefault(),o.stopPropagation(),r)U(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",n,!0),()=>t.removeEventListener("keydown",n,!0)});let[k,G]=g(null),[B,nt]=g(null),T=ut(()=>{let t=c?.current;if(!t)return;let n=t.getBoundingClientRect();G({left:n.left,width:n.width,bottom:window.innerHeight-n.top+8})},[c]);if(Y(()=>{if(!m){G(null);return}T()},[m,T]),Y(()=>{let t=c?.current;if(!m||!t||!B)return;return rt(t,B,T,{animationFrame:!0})},[m,B,c,T]),!m||c&&!k)return null;let w=r?r.kind==="slash":i,ot=w?st:it,J=p("div",{ref:nt,className:c?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:c&&k?{left:k.left,width:k.width,bottom:k.bottom}:void 0,children:E("div",{ref:V,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[d.length===0&&w&&p("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:F}),d.length===0&&!w&&h&&p("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:y?.query===x&&y.search===u?h.empty:h.loading}),d.map((t,n)=>E(e,{type:"button",variant:"ghost",role:"option","aria-selected":n===b,"data-idx":n,onMouseDown:(o)=>{o.preventDefault(),Q(t)},onMouseEnter:()=>L(n),className:X("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",n===b&&"bg-muted"),children:[p(ot,{className:X("size-4 shrink-0",w?"text-blue-500":"text-muted-foreground")}),p("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&p("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),w&&D&&E(ct,{children:[p(q,{}),E(e,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[p(lt,{"data-icon":"inline-start"}),D.label]})]})]})});return c?at(J,document.body):J}
|
|
4
|
+
export{Ro};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{U}from"./chunk-82m8q66f.js";import{t}from"./chunk-hf0nha31.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function jo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(U,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
+
export{jo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{v}from"./chunk-ryz4c13z.js";import{F}from"./chunk-9mknagqd.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function uo({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(v,{text:t.content,streaming:!1})});if(!n(t))return null;return e(F,{entries:t.entries})}
|
|
2
|
+
export{uo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fe}from"./chunk-58t2kkh8.js";import{U,Zo}from"./chunk-82m8q66f.js";import{t}from"./chunk-hf0nha31.js";import{Go}from"./chunk-zb8cdt79.js";import{ve,xe,ye}from"./chunk-bkyjy7tp.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{jsx as o,jsxs as n,Fragment as h}from"react/jsx-runtime";var f=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Vo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Fe(),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(h,{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(ve,{children:[o(xe,{render:o(Zo,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(ye,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(Go,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{Vo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{l}from"./chunk-1hy64ewz.js";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{l}from"./chunk-1hy64ewz.js";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function un({ref:p,value:o,onChange:d,onFind:i,onClose:s,placeholder:m,autoFocusOpen:a=!0,prevTitle:c,nextTitle:u,className:v}){let r=E(null);N(p,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!a)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus({preventScroll:!0}),t.select()},[a]);let f=!o;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",v),children:[n(l,{ref:r,value:o,onChange:(t)=>d(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),s();return}if(t.key==="Enter"){if(t.preventDefault(),o)i(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!0),title:c?`${c} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!1),title:u?`${u} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
|
|
2
|
+
export{un};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Eo(t,e){if(e===0)return null;let r=e-1;while(r>=0){let n=t[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":t[r-1],s=r===0||i===`
|
|
3
3
|
`;if(n==="/"?s&&!/[/\\]/.test(t.slice(r+1,e)):s||i===" "||i==="\t")return{kind:n==="/"?"slash":"at",start:r,end:e,query:t.slice(r+1,e)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{Eo};
|
|
@@ -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 An(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 Pe({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{An,Pe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as t}from"cn";import{jsx as n}from"react/jsx-runtime";function
|
|
1
|
+
import{cn as t}from"cn";import{jsx as n}from"react/jsx-runtime";function Tt({className:e,...o}){return n("div",{"data-slot":"skeleton",className:t("bg-muted animate-pulse rounded-md",e),...o})}export{Tt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{d,u,b,V,m,w}from"./chunk-k6tqy9x5.js";import{W}from"./chunk-kh32nepy.js";import{createContext as g,useContext as C,useState as y,useSyncExternalStore as L}from"react";import{jsx as i,jsxs as S}from"react/jsx-runtime";var v=g(null),f=g(null),x=g(null);function mr({host:t,client:o,children:n}){let[l,a]=y(null);W(l!==null);let{t:c}=t;return i(v,{value:t,children:i(f,{value:o,children:S(x,{value:a,children:[n,i(d,{open:l!==null,onOpenChange:(D)=>!D&&a(null),children:S(u,{children:[S(b,{children:[i(m,{children:c("sessionList.deleteTitle")}),i(w,{children:c("sessionList.deleteDescription")})]}),S(V,{children:[i(e,{variant:"outline",onClick:()=>a(null),children:c("sessionList.cancel")}),i(e,{onClick:()=>{if(l)T(t,o.delete(l.sessionId));a(null)},children:c("sessionList.delete")})]})]})})]})})})}function p(){let t=C(v);if(t===null)throw Error("Session list host is missing");return t}function s(){let t=C(f);if(t===null)throw Error("Session list client is missing");return t}function et(){let t=C(x);if(t===null)throw Error("Session list provider is missing");return t}function r(t){let o=s();return L((n)=>o.store.subscribe(n),()=>t(o.store.getState()),()=>t(o.store.getState()))}function T(t,o){return o.then(()=>{},(n)=>{if(t.reportError)t.reportError(n);else console.error(n)})}
|
|
2
|
+
export{mr,p,s,et,r,T};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{ie}from"./chunk-862r6ajk.js";import{d,u,b,V,m,w}from"./chunk-k6tqy9x5.js";import{f}from"./chunk-ek06eyp4.js";import{At,Lt,Mn,Rn,En,it}from"./chunk-jn90tdhn.js";import{l}from"./chunk-1hy64ewz.js";import{z,P}from"./chunk-kmt7fjdq.js";import{ze}from"./chunk-tc85dd04.js";import{k}from"./chunk-ncekagm6.js";import{isArrayProperty as S,isBooleanProperty as A,isNumberProperty as C,isStringProperty as E}from"@nyssance/codex-acp-v2/client";import{useEffect as N,useMemo as R,useState as q}from"react";import{jsx as o,jsxs as p}from"react/jsx-runtime";function L(r){if(!E(r))return null;if(r.oneOf&&r.oneOf.length>0)return r.oneOf.map((t)=>({value:t.const,label:t.title??t.const,...t.description?{description:t.description}:{}}));if(r.enum&&r.enum.length>0)return r.enum.map((t)=>({value:t,label:t}));return null}function G(r){let t=r,n=t._meta?.alwith?.options;if(Array.isArray(n)&&Array.isArray(t.enum))return n.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));if(Array.isArray(t.enum))return t.enum.map((i)=>({value:String(i),label:String(i)}));if(Array.isArray(t.oneOf))return t.oneOf.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));return null}function Pr(r){let t=new Set(r.required??[]);return Object.entries(r.properties??{}).map(([n,i])=>({key:n,property:i,title:i.title??n,description:i.description??null,required:t.has(n),options:L(i),multiOptions:S(i)?G(i.items):null}))}function gr(r){let t={};for(let n of r){let i=n.property.default;if(i!==void 0&&i!==null)t[n.key]=i;else if(n.options)t[n.key]=n.options[0].value;else if(A(n.property))t[n.key]=!1;else if(S(n.property))t[n.key]=[]}return t}function Sr(r,t){if(r.multiOptions)return Array.isArray(t)&&t.length>0;if(!r.required)return!0;return t!==void 0&&t!==""&&!(Array.isArray(t)&&t.length===0)}function D({id:r,label:t,description:n,control:i}){return p("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[i,p(f,{htmlFor:r,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[o("div",{className:"text-foreground text-sm",children:t}),n&&o("div",{className:"text-muted-foreground text-xs",children:n})]})]})}function I({id:r,field:t,value:n,onChange:i}){if(t.multiOptions){let a=new Set(Array.isArray(n)?n:[]);return p(At,{children:[o(Lt,{variant:"label",children:t.title}),t.description&&o(it,{children:t.description}),o("div",{className:"flex flex-col gap-1",children:t.multiOptions.map((c)=>{let g=`${r}:${c.value}`;return o(D,{id:g,...c,control:o(ie,{id:g,checked:a.has(c.value),onCheckedChange:(F)=>{let y=new Set(a);if(F)y.add(c.value);else y.delete(c.value);i([...y])}})},c.value)})})]})}if(t.options)return p(At,{children:[o(Lt,{variant:"label",children:t.title}),t.description&&o(it,{children:t.description}),o(z,{value:typeof n==="string"?n:"",onValueChange:(a)=>i(String(a)),className:"flex flex-col gap-1",children:t.options.map((a)=>{let c=`${r}:${a.value}`;return o(D,{id:c,...a,control:o(P,{value:a.value,id:c})},a.value)})})]});return p(Rn,{children:[o(En,{htmlFor:r,children:t.title}),A(t.property)?o(ze,{id:r,checked:n===!0,onCheckedChange:(a)=>i(a)}):C(t.property)?o(l,{id:r,type:"number",required:t.required,value:typeof n==="number"?n:"",onChange:(a)=>i(a.target.value===""?void 0:Number(a.target.value))}):o(k,{id:r,rows:2,required:t.required,value:typeof n==="string"?n:"",onChange:(a)=>i(a.target.value)}),t.description&&o(it,{children:t.description})]})}function yn({requestId:r,schema:t,message:n,total:i,t:a,onRespond:c}){let g=R(()=>Pr(t),[t]),[F,y]=q(()=>gr(g));N(()=>y(gr(g)),[r,g]);let x=g.every((s)=>Sr(s,F[s.key])),O=()=>{if(!x)return;let s={};for(let[h,v]of Object.entries(F))if(v!==void 0)s[h]=v;c({action:"accept",content:s})};return o(d,{open:!0,onOpenChange:(s)=>!s&&c({action:"cancel"}),children:p(u,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(s)=>{if(s.key==="Enter"&&(s.metaKey||s.ctrlKey))s.preventDefault(),O()},children:[p(b,{children:[p("div",{className:"flex items-center justify-between gap-2 pe-8",children:[o(m,{children:t.title??a("approval.needed")}),i>1&&o("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${i}`})]}),o(w,{children:n})]}),o("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o(Mn,{children:g.map((s)=>o(I,{id:`${r}:${s.key}`,field:s,value:F[s.key],onChange:(h)=>y((v)=>({...v,[s.key]:h}))},s.key))})}),p(V,{children:[o(e,{variant:"ghost",onClick:()=>c({action:"decline"}),children:a("actions.decline")}),o(e,{disabled:!x,onClick:O,children:a("actions.submit")})]})]})})}
|
|
2
|
+
export{Pr,gr,Sr,yn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Menu as n}from"@base-ui/react/menu";import{cn as i}from"cn";import{CheckIcon as c,ChevronRightIcon as p}from"lucide-react";import{jsx as t,jsxs as u}from"react/jsx-runtime";function
|
|
1
|
+
import{Menu as n}from"@base-ui/react/menu";import{cn as i}from"cn";import{CheckIcon as c,ChevronRightIcon as p}from"lucide-react";import{jsx as t,jsxs as u}from"react/jsx-runtime";function me({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function hi({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function pe({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function Q({align:e="start",alignOffset:o=0,side:a="bottom",sideOffset:r=4,className:d,...s}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:a,sideOffset:r,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:i("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",d),...s})})})}function ge({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}function gt({className:e,inset:o,...a}){return t(n.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:i("text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:pl-8",e),...a})}function fe({className:e,inset:o,variant:a="default",...r}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:i("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function Le({...e}){return t(n.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function De({className:e,inset:o,children:a,...r}){return u(n.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:i("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a,t(p,{className:"ml-auto"})]})}function _e({align:e="start",alignOffset:o=-3,side:a="right",sideOffset:r=0,className:d,...s}){return t(Q,{"data-slot":"dropdown-menu-sub-content",className:i("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100",d),align:e,alignOffset:o,side:a,sideOffset:r,...s})}function nn({className:e,children:o,checked:a,inset:r,...d}){return u(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:i("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...d,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t(n.CheckboxItemIndicator,{children:t(c,{})})}),o]})}function Uo({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function $o({className:e,children:o,inset:a,...r}){return u(n.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:i("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t(n.RadioItemIndicator,{children:t(c,{})})}),o]})}function S({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:i("bg-border -mx-1 my-1 h-px",e),...o})}function vi({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:i("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",e),...o})}export{me,hi,pe,Q,ge,gt,fe,Le,De,_e,nn,Uo,$o,S,vi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function mn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function Ct(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function ee(t){return t.type==="array"}function Ve(t){return(ee(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{mn,Ct,ee,Ve};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,r}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{s,r}from"./chunk-2rjt5w9p.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function lr(e,o){let a=s(),c=r((t)=>t.connection),i=r((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=r((t)=>v(t.sessions[e]?.items)),f=r((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await a.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(o==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[a,e,c,f,i,o]),i?u:p??u}
|
|
2
|
+
export{lr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{zo}from"./chunk-5640ga6m.js";import{o}from"./chunk-hf0nha31.js";import{n,C}from"./chunk-r3tfwy7k.js";import{N,y,X}from"./chunk-rwpr6j34.js";import{isBooleanOption as R,isGroupedSelect as U,isSelectOption as q}from"@nyssance/codex-acp-v2/client";import{Zap as A}from"lucide-react";import{jsx as w}from"react/jsx-runtime";function pt({sessionId:p,options:f,disabled:I,onModelChange:g,onConfigChange:M,defaultGroup:B={id:"models",name:"Models"},catalog:G=(s)=>s,headerAction:x}){let{host:s,client:L}=n(),{t:r}=s,h=o((e)=>Boolean(e.configPending[p])),k=o((e)=>{let a=e.sessions[p];return a?.state==="running"||a?.state==="requires_action"}),t=y(f,"model"),l=y(f,"thought_level"),b=f.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==t&&e!==l)),O=b.filter(q),d=b.filter(R);if(!t&&!l&&O.length===0&&d.length===0)return null;let c=(e,a)=>{if(a===e.currentValue)return;C(s,M?M(e.configId,a):L.setConfig(p,e.configId,a))},m=l?N(l):[],z=m.reduce((e,a)=>a.name.length>=e.length?a.name:e,""),P=t?X(t):r("composer.model"),_=(e)=>({api_id:e.value,label:e.name}),v=G(t&&U(t.options)?t.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(_)})):[{...B,models:t?N(t).map(_):[]}]),S=v.flatMap((e)=>e.models),u=S.find((e)=>e.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:P},i=d.find((e)=>e.configId==="fast-mode");return w(zo,{disabled:I||h||k,switching:h,value:{...u,label:u.shortLabel??u.label},compactCatalog:!0,models:S,showModelList:Boolean(t),onChange:(e)=>{if(e.api_id===t?.currentValue)return;if(g)g(e.api_id);else if(t)c(t,e.api_id)},header:{name:t?.name??r("composer.model"),action:x},modelGroups:v,t:r,effortConfig:l&&m.length>0?{name:"Effort",value:l.currentValue,levels:m,sizer:z,onChange:(e)=>c(l,e)}:void 0,selectOptions:O.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:N(e).map((a)=>({value:a.value,label:a.name})),onChange:(a)=>c(e,a)})),booleanOptions:[{id:"fast_mode",name:r("composer.fastMode"),currentValue:i?.currentValue??!1,disabled:!i,title:!i?r("composer.fastModeUnsupported"):void 0,icon:w(A,{className:"size-4","aria-hidden":"true"})},...d.filter((e)=>e!==i).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,a)=>{let V=e==="fast_mode"?i:d.find((E)=>E.configId===e);if(!V)throw Error(`Unknown boolean config: ${e}`);c(V,a)}})}
|
|
2
|
+
export{pt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{kt}from"./chunk-8pktp9pc.js";async function dn(i,c){let s=new WeakSet;while(!c.aborted){let r=Array.from(i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')).filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function qe(i,c){if(!c)return[];let s=[],r="",e=[],o=()=>{let t=0,n=0;for(let{start:a,end:l}of kt(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<l)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,l-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let l=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+l.length}),r+=l;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){o();return}if(t.tagName==="BR"){o();return}let n=m.has(t.tagName);if(n)o();for(let a of t.childNodes)u(a);if(n)o()};return u(i),o(),s}
|
|
2
|
+
export{dn,qe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeProps as a}from"@base-ui/react/merge-props";import{useRender as n}from"@base-ui/react/use-render";import{cva as o}from"class-variance-authority";import{cn as d}from"cn";var qr=o("group/badge focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:ring-[3px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function
|
|
1
|
+
import{mergeProps as a}from"@base-ui/react/merge-props";import{useRender as n}from"@base-ui/react/use-render";import{cva as o}from"class-variance-authority";import{cn as d}from"cn";var qr=o("group/badge focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:ring-[3px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Ue({className:r,variant:e="default",render:t,...i}){return n({defaultTagName:"span",props:a({className:d(qr({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{qr,Ue};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Jt,_o}from"./chunk-gzff19t3.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function Yt(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=Jt(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function fi(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return _o(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
|
|
2
|
+
export{Yt,fi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{kn}from"./chunk-bztgv33r.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function wn({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=kn(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
+
export{wn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Gn}from"./chunk-d9xm18sy.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function Vn({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(Gn,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
+
export{Vn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{me,pe,Q,ge,gt,fe,Le,De,_e,nn,S}from"./chunk-3dhdh7jh.js";import{ze}from"./chunk-tc85dd04.js";import{ve,xe,ye}from"./chunk-bkyjy7tp.js";import{tn}from"./chunk-e11qjnb4.js";import{h}from"./chunk-m8dbspj3.js";import{cn as m}from"cn";import{ArrowUpRight as E,ChevronUp as j,Loader2Icon as B,Zap as G}from"lucide-react";import{Fragment as ee,useState as P}from"react";import{jsx as n,jsxs as s,Fragment as p}from"react/jsx-runtime";function zo({value:c,onChange:F,models:v,modelGroups:f,compactCatalog:l,effortPresentation:z="slider",unavailableEffort:N,providerMenu:w,header:g,className:_,condensed:C,stripLabelPrefix:T,showDescription:U,showModelList:W=!0,loading:Z,switching:R,isLoading:q,effortConfig:i,booleanOptions:y,onBooleanChange:O,selectOptions:H=[],t:u,...r}){let[J,K]=P(!1),[X,Y]=P(!1),d=y?.find((a)=>a.id==="fast_mode"),V=l?y?.filter((a)=>a!==d):y,I=(a)=>T&&a.startsWith(T)?a.slice(T.length):a;if(Z)return n("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:s(e,{variant:"ghost",disabled:!0,className:m("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",_),children:[n(B,{className:"size-3 animate-spin"}),n("span",{className:"text-muted-foreground truncate",children:u("model.loadingModels")})]})});return s("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[w&&s(me,{open:J,onOpenChange:K,children:[s(ve,{children:[n(xe,{render:n(pe,{render:s(e,{"data-testid":"provider-trigger",variant:"ghost",disabled:r.disabled,className:m("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[w.icon,n(j,{className:"size-2.5 shrink-0 opacity-60"})]})})}),n(ye,{children:u("model.switchProvider")})]}),s(Q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[w.groups.map((a,t)=>s(ee,{children:[t>0&&a.length>0&&n(S,{}),n(h,{value:w.value,onValueChange:w.onChange,options:a})]},t)),w.moreAction&&s(p,{children:[n(S,{}),s(fe,{onClick:w.moreAction,className:"whitespace-nowrap",children:[n("span",{className:"min-w-0 flex-1 truncate",children:u("model.moreModels")}),n(E,{className:"size-4"})]})]})]})]}),s(me,{open:X,onOpenChange:Y,children:[s(ve,{children:[n(xe,{render:n(pe,{render:s(e,{"data-testid":"model-trigger","aria-busy":R,variant:"ghost",className:m("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",C&&"h-7 gap-1 px-1.5 text-[11px]",_),...r,children:[c.icon,y?.some((a)=>a.id==="fast_mode"&&a.currentValue&&!a.disabled)&&n(G,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),n("span",{className:m("min-w-0 flex-1 truncate text-start",C&&"text-[11px]"),children:I(c.label)||u("model.selectModel")}),i&&s("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[n("span",{className:"invisible col-start-1 row-start-1",children:i.sizer??i.levels.reduce((a,t)=>t.name.length>a.length?t.name:a,"")}),n("span",{className:"col-start-1 row-start-1",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),R?n(B,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):n(j,{className:m("size-3 shrink-0",C&&"size-2.5")})]})})}),n(ye,{children:u("model.switchModel")})]}),s(Q,{side:"top",align:"end",sideOffset:4,className:m("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",l&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[l&&s(p,{children:[s(ge,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-1 py-1",children:[i?z==="slider"?n("div",{role:"menuitem","aria-label":i.name,className:"min-w-0 [&>div]:justify-start [&>div]:gap-3 [&>div]:px-2 [&>div]:py-1.5",children:n(tn,{...i,disabled:r.disabled})}):s(Le,{children:[s(De,{disabled:r.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[n("span",{children:i.name}),n("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(_e,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):N?s(fe,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[n("span",{children:N.name}),n("span",{className:"text-muted-foreground truncate text-xs",children:N.label})]}):n(gt,{className:"min-w-0 flex-1 truncate",children:g?.name}),d&&n(nn,{"aria-label":d.name,title:d.title??d.name,disabled:r.disabled||d.disabled,checked:d.currentValue,closeOnClick:!1,onCheckedChange:(a)=>O?.(d.id,a),className:m("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ml-auto size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",d.currentValue&&!d.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:d.icon??n(G,{className:"size-4","aria-hidden":"true"})})]}),n(S,{className:"shrink-0"})]}),g&&!l&&s(p,{children:[s("div",{className:"flex items-center gap-2 px-2 py-2",children:[g.icon,n("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:g.name}),g.action]}),n(S,{})]}),s(ge,{"data-model-menu-list":l?"":void 0,className:l?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[W&&(q?n(fe,{disabled:!0,className:"text-muted-foreground",children:u("model.loadingModels")}):v.length===0?n(fe,{disabled:!0,className:"text-muted-foreground",children:u("model.noModelsAvailable")}):(()=>{let a=v.filter((o)=>!o.more),t=v.filter((o)=>o.more),A=a.length>0&&t.length>0,M=(o,b)=>({disabled:r.disabled,icon:o.icon,value:o.api_id,label:I(o.label),description:b?.noDescription?void 0:U?o.description:void 0}),D=(o)=>{let b=v.find((k)=>k.api_id===o);if(b)F(b)};if(l)return n(h,{value:c.api_id,onValueChange:D,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:v.map((o)=>M(o))});return s(p,{children:[f?f.map((o)=>{let b=o.models.filter((x)=>!x.more),k=o.models.filter((x)=>x.more),L=b.length>0&&k.length>0;return s(ge,{children:[n(gt,{className:"text-muted-foreground text-xs font-normal",children:o.name}),n(h,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(L?b:o.models).map((x)=>M(x))}),L&&s(Le,{children:[n(De,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(_e,{children:n(h,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:k.map((x)=>M(x,{noDescription:!0}))})})]})]},o.id)}):n(h,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(A?a:v).map((o)=>M(o))}),!f&&A&&s(Le,{children:[n(De,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(_e,{children:n(h,{value:c.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:t.map((o)=>M(o,{noDescription:!0}))})})]})]})})()),!l&&i&&s(p,{children:[n(S,{}),z==="menu"?s(Le,{children:[s(De,{disabled:r.disabled,children:[n("span",{className:"flex-1",children:i.name}),n("span",{className:"text-muted-foreground",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(_e,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):n(tn,{...i,disabled:r.disabled})]}),!l&&!i&&N&&s(p,{children:[n(S,{}),s(fe,{disabled:!0,children:[n("span",{className:"flex-1",children:N.name}),n("span",{children:N.label})]})]}),H.map((a)=>s(ge,{children:[n(S,{}),n(gt,{children:a.name}),n(h,{value:a.value,onValueChange:a.onChange,options:a.options,itemClassName:"whitespace-nowrap"})]},a.id)),V&&V.length>0&&s(p,{children:[!i&&n(S,{}),V.map((a)=>l?s(nn,{"aria-label":a.name,title:a.title,disabled:r.disabled||a.disabled,checked:a.currentValue,closeOnClick:!1,onCheckedChange:(t)=>O?.(a.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[s("span",{className:"flex items-center gap-2",children:[a.icon,a.name]}),n("span",{"aria-hidden":"true",className:m("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",a.currentValue?"bg-primary":"bg-input"),children:n("span",{className:m("bg-background size-3.5 rounded-full shadow-xs transition-transform",a.currentValue&&"translate-x-3.5")})})]},a.id):s("div",{title:a.title,className:m("flex items-center justify-between gap-3 px-2 py-2.5",a.disabled&&"opacity-50"),children:[s("span",{className:"flex items-center gap-2 text-sm font-medium",children:[a.icon,a.name]}),n(ze,{"aria-label":a.name,disabled:r.disabled||a.disabled,checked:a.currentValue,onCheckedChange:(t)=>O?.(a.id,t)})]},a.id))]})]}),l&&g?.action&&s(p,{children:[n(S,{className:"shrink-0"}),n(ge,{"data-model-menu-footer":!0,className:"shrink-0",children:g.action})]})]})]})]})}
|
|
2
|
+
export{zo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as g,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as g,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),sn=d(null);function Ti(){return i(sn)}var ln=d(null);function Ii(){return i(ln)}var Oe=d(null);function Fe(){let r=i(F);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var Be=()=>i(F);function Pi(){let r=i(Oe);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i(Oe);function or({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:A,attachmentPolicy:f,value:R,onValueChange:y,attachments:U,onAttachmentsChange:L,children:B}){let S=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),T=R!==void 0,[G,J]=z(r),p=R??G,o=g({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let W=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,T)y?.(t);else J(t)},[T,y]),h=n(()=>P(""),[P]),v=U!==void 0,[K,N]=z([]),I=U??K,b=g(I);b.current=I;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(v)L?.(e);else N(e)},[v,L]),j=g(null),w=g(()=>{}),O=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let _=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:S(u),filename:u.name,size:u.size,lastModified:u.lastModified,..._===void 0?{}:{sourcePath:_}}})]})},[f,S,s]),M=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),A?.()},[A,s]),E=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(v)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[v]);let k=n(()=>{w.current?.()},[]),C=q(()=>({files:I,add:O,remove:M,clear:E,openFileDialog:k,fileInputRef:j}),[I,O,M,E,k]),H=n((t,e)=>{j.current=t.current,w.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:P,clear:h,getRevision:W,clearSubmitted:c??h},attachments:C,__registerFileInput:H}),[p,P,h,W,c,C,H]);return D(F.Provider,{value:Q,children:D(Oe.Provider,{value:C,children:B})})}var cn=d(null);function x(){let r=X(),l=i(cn),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
+
export{sn,Ti,ln,Ii,Oe,Fe,Be,Pi,or,cn,x};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o}from"./chunk-hf0nha31.js";import{H,Et,O}from"./chunk-6xhjta3v.js";import{e}from"./chunk-cg97byvk.js";import{le,ce,de,ue}from"./chunk-z33zakbw.js";import{ht,n,C}from"./chunk-r3tfwy7k.js";import{st}from"./chunk-atv1r122.js";import{at}from"./chunk-nnfnwj9n.js";import{tt,nt}from"./chunk-p0bvkpwq.js";import{ot}from"./chunk-na21awb6.js";import{LockIcon as g,UnplugIcon as A}from"lucide-react";import{useMemo as R}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function pr({host:t,client:l,...c}){let s=R(()=>t.openDiff?t:{...t,openDiff:tt},[t]);return i(ht,{host:s,client:l,children:[r(E,{...c}),!t.openDiff&&r(nt,{})]})}function E({session:t,header:l,overlay:c,timeline:s,composer:y,readOnlyActions:x,welcome:u,children:N,rootRef:w}){let{host:d,client:h}=n(),{t:a}=d,p=o((m)=>m.connection==="ready"),f=o((m)=>m.historyPages[t.id]?.error),v=()=>C(d,h.open(t.id,t.cwd)),D=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:w,className:"flex h-full min-h-0 flex-col",children:[l,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[c,p&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(H,{children:[r(A,{}),r(Et,{children:a("conversation.stopped")}),r(O,{children:r(e,{size:"sm",variant:"outline",onClick:v,children:a("conversation.reconnect")})})]})}),D?u??r(le,{className:"flex-1",children:i(ce,{children:[r(de,{className:"text-[28px] font-normal",children:a("conversation.welcomeTitle")}),r(ue,{children:a("conversation.welcomeDescription")})]})}):r(at,{session:t,timeline:s}),r(ot,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(H,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(g,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(Et,{children:a("conversation.readOnlyTitle")}),r(O,{children:a("conversation.readOnlyDescription")}),f&&r("p",{role:"alert",className:"text-destructive break-words",children:f})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(e,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:v,disabled:!p||t.restoring,children:a(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),x]})]})}):y??r(st,{session:t})]}),N]})}
|
|
2
|
+
export{pr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e}from"./chunk-cg97byvk.js";import{me,pe,Q}from"./chunk-3dhdh7jh.js";import{h}from"./chunk-m8dbspj3.js";import{useState as f}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";function Bo({value:r,currentName:o,icon:p,options:i,label:s,header:a,onValueChange:d,showLabel:l=!1,disabled:u=!1,warning:m=!1}){let[c,g]=f(!1);return t(me,{open:c,onOpenChange:g,children:[n(pe,{render:t(e,{disabled:u,"data-permission-warning":m?"":void 0,variant:"ghost","aria-label":`${s}: ${o}`,title:o,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[p,n("span",{className:l?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:o})]})}),t(Q,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[a&&n("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:n("span",{children:a})}),n(h,{value:r,onValueChange:d,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:i})]})]})}
|
|
2
|
+
export{Bo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{lo}from"./chunk-xcfde6w5.js";function no(t,o){if(lo(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
|
|
2
|
+
export{no};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{Loader2Icon as r}from"lucide-react";import{jsx as e}from"react/jsx-runtime";function
|
|
1
|
+
import{cn as a}from"cn";import{Loader2Icon as r}from"lucide-react";import{jsx as e}from"react/jsx-runtime";function oe({className:o,...n}){return e(r,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:a("size-4 animate-spin",o),...n})}export{oe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{tr}from"./chunk-tv89wh8b.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function er(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await tr(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
|
|
2
|
+
export{er};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cva as s}from"class-variance-authority";import{cn as a}from"cn";import{jsx as r}from"react/jsx-runtime";var n=s("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function
|
|
1
|
+
import{cva as s}from"class-variance-authority";import{cn as a}from"cn";import{jsx as r}from"react/jsx-runtime";var n=s("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function H({className:t,variant:e,...o}){return r("div",{"data-slot":"alert",role:"alert",className:a(n({variant:e}),t),...o})}function Et({className:t,...e}){return r("div",{"data-slot":"alert-title",className:a("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),...e})}function O({className:t,...e}){return r("div",{"data-slot":"alert-description",className:a("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),...e})}function Qr({className:t,...e}){return r("div",{"data-slot":"alert-action",className:a("absolute top-2.5 end-3",t),...e})}export{H,Et,O,Qr};
|