@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -306,10 +306,10 @@
|
|
|
306
306
|
},
|
|
307
307
|
"peerDependencies": {
|
|
308
308
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
309
|
-
"@alwith/api": "~0.5.
|
|
309
|
+
"@alwith/api": "~0.5.4",
|
|
310
310
|
"react": "^19.3.1",
|
|
311
311
|
"react-dom": "^19.3.1",
|
|
312
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
312
|
+
"@nyssance/codex-acp-v2": "^0.7.43"
|
|
313
313
|
},
|
|
314
314
|
"peerDependenciesMeta": {
|
|
315
315
|
"@nyssance/codex-acp-v2": {
|
|
@@ -336,9 +336,9 @@
|
|
|
336
336
|
},
|
|
337
337
|
"devDependencies": {
|
|
338
338
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
339
|
-
"@alwith/api": "~0.5.
|
|
339
|
+
"@alwith/api": "~0.5.4",
|
|
340
340
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
341
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
341
|
+
"@nyssance/codex-acp-v2": "^0.7.43",
|
|
342
342
|
"@testing-library/dom": "^10.4.2",
|
|
343
343
|
"@testing-library/jest-dom": "^6.6.3",
|
|
344
344
|
"@testing-library/react": "^16.3.3",
|
package/dist/chunk-00sds3wb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{ue,me,J}from"./chunk-k6b4cf05.js";import{f}from"./chunk-jtafw6h4.js";import{useState as g}from"react";import{jsx as o,jsxs as t}from"react/jsx-runtime";function qo({value:p,currentName:n,icon:r,options:s,label:i,header:a,onValueChange:d,showLabel:l=!1,disabled:u=!1}){let[m,c]=g(!1);return t(ue,{open:m,onOpenChange:c,children:[o(me,{render:t(e,{disabled:u,variant:"ghost","aria-label":`${i}: ${n}`,title:n,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:[r,o("span",{className:l?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),t(J,{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&&o("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:o("span",{children:a})}),o(f,{value:p,onValueChange:d,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:s})]})]})}
|
|
2
|
-
export{qo};
|
package/dist/chunk-1dce9zt8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l}from"./chunk-1hy64ewz.js";import{V}from"./chunk-ygebvrv5.js";import{h}from"./chunk-bse4zh1d.js";import{wt}from"./chunk-cbbr9m3a.js";import{L}from"./chunk-tjykfxrd.js";import{gt,ft}from"./chunk-fv7tp8pr.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as z,zhCN as E}from"date-fns/locale";import{ClockIcon as w,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{jsx as o,jsxs as C,Fragment as M}from"react/jsx-runtime";var S={en:z,"zh-CN":E};function Ae(t,a){let i=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:i})}function mt({sessionRow:t,actions:a,shortcut:i,renaming:n=!1,onRename:m}){let{t:r,i18n:I,PathAction:u}=h(),f=ft(),y=gt();g(()=>{f(n)},[n,f]);let[H,p]=D(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?r("sessionList.archived"):t.updatedAt!==null?Ae(t.updatedAt,I.language):null,v=[];if(N!==null)v.push({icon:o(w,{className:"size-3.5"}),text:N});let s=u&&o(u,{cwd:t.cwd,onOpened:y});return o(wt,{title:n?o(l,{autoFocus:!0,value:H,className:"h-7 text-sm","aria-label":r("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):C("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(L,{className:"min-w-0 flex-1",children:t.title??r("sessionList.untitled")})}),i]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:s||a!==void 0?C(M,{children:[s,s&&a!==void 0&&o(V,{}),a]}):void 0})}
|
|
2
|
-
export{Ae,mt};
|
package/dist/chunk-1mv3y3cs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-vmywavgm.js";import{ze}from"./chunk-tv9wdbxr.js";import{e}from"./chunk-cg97byvk.js";import{tt}from"./chunk-jf5651fz.js";import{FileIcon as m,XIcon as r}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function fn({mentions:n,onRemove:s}){let{t:i}=t();if(n.length===0)return null;return a("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:n.map((o)=>l(ze,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(m,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:tt(o)}),a(e,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:tt(o)}),onClick:()=>s(o),children:a(r,{className:"size-3"})})]},o))})}
|
|
2
|
-
export{fn};
|
package/dist/chunk-1q1hyka4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as f}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,s=32,g=6;function Xt({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=f({start:0,end:g}),[d,R]=f(()=>new Set),[E,M]=f(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),h=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/s)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/s)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>h()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,h()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[h,r]);let i=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)i.add(e);if(t.length>0)i.add(0),i.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))i.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)i.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*s-(s-y)},children:[...i].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*s,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
-
export{Xt};
|
package/dist/chunk-1v3wc4cv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j}from"./chunk-vmywavgm.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function rt({host:o,client:e,children:t}){let s=a(()=>({host:o,client:e}),[o,e]);return r(j,{host:o,client:e,children:r(i,{value:s,children:t})})}function n(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function b(o,e){e.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{rt,n,b};
|
package/dist/chunk-29wvjf38.js
DELETED
package/dist/chunk-2w9f1q84.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{v}from"./chunk-kjtd3wc3.js";import{U,R}from"./chunk-5w48y2ad.js";import{C}from"./chunk-xjtqdp82.js";import{useId as w}from"react";import{jsx as r,jsxs as c,Fragment as Q}from"react/jsx-runtime";function a(n){return n!==null&&typeof n==="object"&&!Array.isArray(n)}function p(n){if(!a(n)||!a(n.codex))return[];let s=n.codex,i=s.questions;if(s.delivery!=="async"||!Array.isArray(i))return[];if(!i.every((t)=>a(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((l)=>typeof l==="string"))))return[];return i}function Lt(n,s){return JSON.stringify(["request_user_input_async",n,s])}function io(n){return{selected:n.options?.length?0:null,text:""}}function Dt(n,s){return s.selected===null?s.text:n.options?.[s.selected]??""}function ao(n){return`<send_user_message_question_reply>
|
|
2
|
-
${JSON.stringify([n])}
|
|
3
|
-
</send_user_message_question_reply>`}function _t(n){if(!a(n)||!a(n.codex))return[];let s=n.codex;return(Array.isArray(s.questionReplyParts)?s.questionReplyParts.map((t)=>a(t)?{...t,answer:t.text}:t):[s.questionReply]).filter((t)=>a(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:l,answer:d})=>({questionItemId:t,question:l,answer:d}))}function so({question:n,draft:s,status:i,answer:t,error:l,onChange:d,onSubmit:x,onSkip:f,t:o}){let g=w(),y=i==="pending",b=i==="answered"||i==="skipped";return c("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:[r("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:n.title}),b?r("p",{className:"text-sm whitespace-pre-wrap",children:i==="answered"?t:o("asyncQuestion.skipped")}):c(Q,{children:[(n.options?.length??0)>0&&c(U,{"aria-labelledby":`${g}-title`,disabled:!y,value:s.selected===null?"other":String(s.selected),onValueChange:(u)=>d({...s,selected:u==="other"?null:Number(u)}),children:[n.options?.map((u,m)=>c(v,{className:"flex items-start gap-2 text-sm",children:[r(R,{value:String(m)}),r("span",{className:"whitespace-pre-wrap",children:u})]},m)),c(v,{className:"flex items-center gap-2 text-sm",children:[r(R,{value:"other"}),o("asyncQuestion.other")]})]}),r(C,{"aria-label":o("asyncQuestion.answer"),placeholder:o("asyncQuestion.answer"),value:s.text,readOnly:!y,onChange:(u)=>d({selected:null,text:u.target.value})}),l&&r("p",{role:"alert",className:"text-destructive text-sm",children:l}),c("div",{className:"flex flex-wrap items-center gap-2",children:[r(e,{size:"sm",disabled:!y||Dt(n,s).trim().length===0,onClick:x,children:o(i==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),r(e,{size:"sm",variant:"ghost",disabled:!y,onClick:f,children:o("asyncQuestion.skip")}),(i==="closed"||i==="unavailable")&&r("span",{role:"status",className:"text-muted-foreground text-xs",children:o(`asyncQuestion.${i}`)})]})]})]})}
|
|
4
|
-
export{p,Lt,io,Dt,ao,_t,so};
|
package/dist/chunk-34xzrr3s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g}from"./chunk-3p9j3gmw.js";import{t}from"./chunk-vmywavgm.js";import{M}from"./chunk-zw2q13qg.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@alwith/api";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(g,{text:e.text,streaming:o})})}if(i.isImage(e))return n(M,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(M,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function W({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
-
export{W};
|
package/dist/chunk-42fw8maa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-vmywavgm.js";import{B,rn,z}from"./chunk-0vy9fzs3.js";import{e}from"./chunk-cg97byvk.js";import{fe,he,ve,xe}from"./chunk-5xjm1hab.js";import{rt,n,b}from"./chunk-1v3wc4cv.js";import{Qe}from"./chunk-dgx31pdr.js";import{je}from"./chunk-f59aepmd.js";import{Ge,We}from"./chunk-v8rqevms.js";import{Ve}from"./chunk-n514z4we.js";import{LockIcon as D,UnplugIcon as g}from"lucide-react";import{useMemo as A}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function cr({host:t,client:l,...s}){let c=A(()=>t.openDiff?t:{...t,openDiff:Ge},[t]);return i(rt,{host:c,client:l,children:[r(R,{...s}),!t.openDiff&&r(We,{})]})}function R({session:t,header:l,overlay:s,timeline:c,composer:y,readOnlyActions:x,welcome:u,children:C,rootRef:N}){let{host:d,client:w}=n(),{t:a}=d,p=o((m)=>m.connection==="ready"),f=o((m)=>m.historyPages[t.id]?.error),v=()=>b(d,w.open(t.id,t.cwd)),h=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:N,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:[s,p&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(B,{children:[r(g,{}),r(rn,{children:a("conversation.stopped")}),r(z,{children:r(e,{size:"sm",variant:"outline",onClick:v,children:a("conversation.reconnect")})})]})}),h?u??r(fe,{className:"flex-1",children:i(he,{children:[r(ve,{className:"text-[28px] font-normal",children:a("conversation.welcomeTitle")}),r(xe,{children:a("conversation.welcomeDescription")})]})}):r(je,{session:t,timeline:c}),r(Ve,{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(B,{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(D,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(rn,{children:a("conversation.readOnlyTitle")}),r(z,{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(Qe,{session:t})]}),C]})}
|
|
2
|
-
export{cr};
|
package/dist/chunk-52y4pyr1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h,s,vt,r,S}from"./chunk-bse4zh1d.js";import{F}from"./chunk-cbbr9m3a.js";import{ht}from"./chunk-fv7tp8pr.js";import{ut}from"./chunk-key9msc9.js";import{Ae,mt}from"./chunk-1dce9zt8.js";import{hasRename as D}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as A,ArchiveRestoreIcon as H,GitForkIcon as N,PencilIcon as x,Trash2Icon as R}from"lucide-react";import{useRef as B,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function Yt({sessionRow:e,active:f,onSelect:u,onForked:p=u,onHoverCardOpenChange:a,actions:c}){let i=h(),{t:m,i18n:v}=i,k=s(),l=r((o)=>o.runStates[e.sessionId]),I=vt(),d=()=>u(e);return n(ht,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:f,onClick:d,onKeyDown:(o)=>{if(o.key==="Enter"||o.key===" ")o.preventDefault(),d()},state:l?.state,interruption:l?.interruption??null,title:e.title??m("sessionList.untitled"),onHoverCardOpenChange:a,hoverCard:n(E,{sessionRow:e,onDelete:()=>I(e),onForked:p,actions:c}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ae(e.updatedAt,v.language)}):void 0,actions:l!=null?n(ut,{title:m("sessionList.stop"),onStop:()=>S(i,k.stopSession(e.sessionId))}):void 0})}function E({sessionRow:e,onDelete:f,onForked:u,actions:p}){let a=h(),{t:c}=a,i=s(),m=r((t)=>D(t.agent)),v=r((t)=>t.connection==="ready"&&t.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,d]=y(!1),o=B(!1);return n(mt,{sessionRow:e,renaming:k,onRename:(t)=>{if(l(!1),t!==null)S(a,i.renameSession(e.sessionId,t))},actions:b(C,{children:[m&&n(F,{icon:n(x,{}),label:c("sessionList.rename"),onClick:()=>l(!0)}),p,e.archived?n(F,{icon:n(H,{}),label:c("sessionList.unarchive"),onClick:()=>void S(a,i.unarchive(e.sessionId))}):b(C,{children:[n(F,{icon:n(N,{}),label:c("sessionList.fork"),disabled:!v||I,onClick:()=>{if(o.current)return;o.current=!0,d(!0),S(a,i.fork(e.sessionId,e.cwd).then((t)=>{let g=i.state.sessionList.find((L)=>L.sessionId===t);if(!g)throw Error("Forked chat is missing from the session list");u(g)}).finally(()=>{o.current=!1,d(!1)}))}}),n(F,{icon:n(A,{}),label:c("sessionList.archive"),onClick:()=>void S(a,i.archive(e.sessionId))})]}),n(F,{variant:"destructive",icon:n(R,{}),label:c("sessionList.delete"),onClick:f})]})})}
|
|
2
|
-
export{Yt};
|
package/dist/chunk-6bdd2cgs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p}from"./chunk-2w9f1q84.js";import{textOf as A,turns as S}from"@alwith/api";import{codexMessageError as _,nativeTurnId as y}from"@nyssance/codex-acp-v2/client";function Er(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Hn(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function M(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(_(e)!==null){let u=y(e),f=t.errors.findIndex((m)=>u!==null&&y(m)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=p(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(p(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function On(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Er(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],m,I=null;for(let r of i.items){let a=y(r),l=d.get(a??"");if(a!==null&&I!==null&&a!==I||l!==void 0&&m!==void 0&&l>m+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")I=a;if(l!==void 0)m=l}return f.flatMap((r)=>S({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let h=`turn:${l.kind}:${l.id}`,b=r.endedAt??Math.max(...a.map((c)=>c.at)),k=o.get(h);if(k!==void 0&&K(k.items,a)&&k.endedAt===b)return k;let g={key:h,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:b,replayed:a.every(Nt),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,x)=>j(g,c,x<v,a[x-1])),g})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Nt(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function D(t){return A(t.content)}function Ie(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Rt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Fn(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Bn(t,e,n){if(n?.user==null)return!1;let o=e.items.map(y).find((i)=>i!==null),s=y(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function zn(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!Bn(t,e[n-1],o))break;n--}return e[n]?.key}function Un(t,e,n){let o=n,s=n;while(o>0&&Bn(t,e[o-1],e[o]))o--;while(s+1<e.length&&Bn(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
-
export{Er,Hn,On,Nt,D,Ie,Rt,Fn,Bn,zn,Un};
|
package/dist/chunk-7w4tjrdw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p,Lt,io,Dt,ao,_t,so}from"./chunk-2w9f1q84.js";import{t,K,re,o}from"./chunk-vmywavgm.js";import{W}from"./chunk-34xzrr3s.js";import{isText as k}from"@alwith/api";import{createStore as E}from"@alwith/api/client";import{nativeTurnId as v}from"@nyssance/codex-acp-v2/client";import{jsx as g}from"react/jsx-runtime";var x=E({entries:{}});function l(i,e){x.setState((n)=>({entries:{...n.entries,[i]:e}}))}function q(i,e){let n=v(e),a=i.items.findLast((s)=>v(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&v(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[..._t(n._meta),...n.content.filter(k).flatMap((s)=>_t(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=K(),{t:m}=t(),S=Lt(e.id,a),d=JSON.stringify([i,S]),u=re(x,(r)=>r.entries[d]),c=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??io(n),b=c===void 0?u?.accepted:M(c,S)??u?.accepted,h=c!==void 0&&q(c,e),D=A&&c?.attached&&!c.restoring&&!c.readOnly,y=b!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(x.getState().entries[d]?.pending||y!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!q(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Dt(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};l(d,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:ao(w),_meta:{codex:{questionReply:w}}}]),l(d,{draft:f,accepted:I})}catch(Q){l(d,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(y==="closed")return null;return g(so,{question:n,draft:f,status:y,answer:b,error:y==="pending"?u?.error:void 0,t:m,onChange:(r)=>l(d,{draft:r}),onSkip:()=>l(d,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function It({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=p(e._meta);if(n===void 0||n.readOnly||!q(n,e))return g(W,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return g("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,m)=>g(O,{sessionId:i,item:e,question:s,index:m},Lt(e.id,m)))})}
|
|
2
|
-
export{It};
|
package/dist/chunk-85gdavf5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ro}from"./chunk-sq5zstzq.js";import{isPlanItems as o}from"@alwith/api";function Pn(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return ro(a,r)}
|
|
2
|
-
export{Pn};
|
package/dist/chunk-8w6ze6pw.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{co}from"./chunk-q989x2x5.js";import{t}from"./chunk-vmywavgm.js";import{Gn,Wn}from"./chunk-r8k9jd0z.js";import{M}from"./chunk-zw2q13qg.js";import{D}from"./chunk-6bdd2cgs.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@alwith/api";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var Nn=p(function({item:s,messageTime:c}){let l=t(),o=Wn(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):D(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=Gn(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(M,{block:e},`${s.id}:${n}`))}),r(co,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
-
export{Nn};
|
package/dist/chunk-91qp7sps.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-3p9j3gmw.js";import{P}from"./chunk-qsqyf4y3.js";import{isContentEntry as k,isImage as b,isResourceLink as N}from"@alwith/api";import{ChevronRightIcon as w,ImageIcon as C,LoaderCircleIcon as S,RefreshCwIcon as A}from"lucide-react";import{useEffect as R,useState as h}from"react";import{jsx as n,jsxs as y}from"react/jsx-runtime";function ae(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function B(e){let r=[];for(let[c,l]of e.content.entries()){if(!k(l))continue;let o=l.content;if(b(o))r.push({key:`${e.id}:${c}`,src:`data:${o.mimeType};base64,${o.data}`,alt:e.title??""});if(N(o))r.push({key:`${e.id}:${c}`,path:o.uri,alt:o.name})}if(r.length)return r;let i=e.rawInput;if(i!==null&&typeof i==="object"&&"path"in i&&typeof i.path==="string")return[{key:e.id,path:i.path,alt:i.path.split(/[\\/]/).at(-1)??i.path}];throw Error(`Image view ${e.id} has no image source`)}function T({images:e}){let{loadImage:r,openImageGallery:i,openImage:c,t:l}=a(),[o,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);R(()=>{let t=!0,u=JSON.parse(f);g({});for(let s of u)(s.src!==void 0?Promise.resolve(s.src):s.path!==void 0&&r?r(s.path):Promise.reject(Error("Image loading is unavailable"))).then((d)=>{if(t)g((p)=>({...p,[s.key]:{src:d}}))},()=>{if(t)g((d)=>({...d,[s.key]:{error:!0}}))});return()=>{t=!1}},[f,r,v]);let I=e.flatMap((t)=>{let u=o[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return n("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let s=o[t.key];if(!s)return n("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:n(S,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in s)return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>x((m)=>m+1),children:n(A,{"aria-hidden":"true"})},t.key);return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,u).filter((d)=>{let p=o[d.key];return p&&"src"in p}).length;if(i)i(I,m);else c?.(s.src)},children:n("img",{src:s.src,alt:t.alt,draggable:!1})},t.key)})})}function bo({blocks:e}){let{t:r}=a(),i=e.flatMap(B),[c,l]=P(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((o)=>!o),children:[y("span",{className:"codex-activity-label",children:[n(C,{className:"codex-activity-icon","aria-hidden":"true"}),n("span",{className:"codex-activity-leading",children:r("stream.codex.viewedImages",{count:i.length})})]}),n(w,{className:c?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),c&&n(T,{images:i})]})}
|
|
2
|
-
export{ae,bo};
|
package/dist/chunk-932ykb37.js
DELETED
package/dist/chunk-azp1438s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g}from"./chunk-3p9j3gmw.js";import{_}from"./chunk-xf91jp39.js";import{isPlanItems as n,isPlanMarkdown as r}from"@alwith/api";import{jsx as e}from"react/jsx-runtime";function Mn({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(g,{text:t.content,streaming:!1})});if(!n(t))return null;return e(_,{entries:t.entries})}
|
|
2
|
-
export{Mn};
|
package/dist/chunk-bafntrka.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,g}from"./chunk-3p9j3gmw.js";import{E}from"./chunk-t794afpy.js";import{lo}from"./chunk-p2khnrm1.js";import{_}from"./chunk-xf91jp39.js";import{uo,Ne}from"./chunk-wpx2bvd0.js";import{po}from"./chunk-ad32h099.js";import{Ft}from"./chunk-q989x2x5.js";import{cn as b}from"cn";import{jsx as o,jsxs as y}from"react/jsx-runtime";var R=new WeakMap,w=1;function N(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=R.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=w++;return R.set(t,s),`${t.type}:${s}`}function P({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return y("div",{className:"codex-assistant-message",children:[o(g,{text:t.text,streaming:n}),s]})}function I({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(P,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(g,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(_,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var S=new Set;function ti({message:t,isMostRecentTurn:n,hiddenTools:s=S,time:i,beforeCopy:r,afterCopy:l,providerIcon:u,renderText:T,renderEditedFiles:C}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(A,{});let h=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),B=!t.streaming&&h.trim().length>0?o(Ht,{text:h,isMostRecentTurn:n,beforeCopy:r,afterCopy:l,time:i}):null,d=lo(t.content,"compact"),x=d.reduce((e,c,p)=>c.kind==="codexActivityGroup"?p:e,-1),k=d.findIndex((e,c)=>c>x&&e.kind==="block"&&e.block.type==="text"),M=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&E(e).category==="edit"),v=(e)=>{if(e.kind==="codexActivityGroup"){let c=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return c.length===0?null:o(Ne,{blocks:c},`activity:${N(c[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(I,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===M?B:void 0,renderText:T},N(e.block))},m=x===-1?0:k===-1?d.length:k;return o(Ot,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:d.slice(0,m).map(v),answer:d.length>m?d.slice(m).map(v):null,footer:x!==-1&&f.length>0&&(C===void 0?o(po,{blocks:f}):C(f))})}function Ht({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let l=a(),{t:u}=l;return y("div",{className:b("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Ft,{text:t,label:u("actions.copy"),host:l}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function A(){let{t}=a();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t("message.thinking")})})}function Ot({work:t,answer:n,footer:s,loading:i=!1,...r}){if(i)return o(A,{});return y("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(uo,{...r,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{ti,Ht,Ot};
|
package/dist/chunk-bse4zh1d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{d,u,w,q,m,k}from"./chunk-p0ebmb2m.js";import{Y}from"./chunk-9yv5c2s3.js";import{createContext as g,useContext as C,useState as y,useSyncExternalStore as L}from"react";import{jsx as i,jsxs as p}from"react/jsx-runtime";var v=g(null),f=g(null),x=g(null);function Cr({host:t,client:o,children:n}){let[l,a]=y(null);Y(l!==null);let{t:c}=t;return i(v,{value:t,children:i(f,{value:o,children:p(x,{value:a,children:[n,i(d,{open:l!==null,onOpenChange:(D)=>!D&&a(null),children:p(u,{children:[p(w,{children:[i(m,{children:c("sessionList.deleteTitle")}),i(k,{children:c("sessionList.deleteDescription")})]}),p(q,{children:[i(e,{variant:"outline",onClick:()=>a(null),children:c("sessionList.cancel")}),i(e,{onClick:()=>{if(l)S(t,o.delete(l.sessionId));a(null)},children:c("sessionList.delete")})]})]})})]})})})}function h(){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 vt(){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 S(t,o){return o.then(()=>{},(n)=>{if(t.reportError)t.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Cr,h,s,vt,r,S};
|
package/dist/chunk-bx1x7t6v.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Ht,Ot}from"./chunk-bafntrka.js";import{p}from"./chunk-2w9f1q84.js";import{t}from"./chunk-vmywavgm.js";import{Hn,D,Ie,Fn}from"./chunk-6bdd2cgs.js";import{En}from"./chunk-xnmjg8r1.js";import{W}from"./chunk-34xzrr3s.js";import{It}from"./chunk-7w4tjrdw.js";import{Ln}from"./chunk-48av28r4.js";import{Mn}from"./chunk-azp1438s.js";import{Pn}from"./chunk-85gdavf5.js";import{Pt,St}from"./chunk-p8n6rm5h.js";import{Te}from"./chunk-f3xhtnkz.js";import{isContentEntry as oe,isEmbeddedResource as X,isImage as Y,isResourceLink as ae,isText as me}from"@alwith/api";import{codexMessageError as J,codexTurnError as q,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as pe}from"react";import{jsx as s,jsxs as m,Fragment as R}from"react/jsx-runtime";function U(r){if(Y(r))return`${r.mimeType.toLowerCase()}:${r.data}`;if(X(r)&&"blob"in r.resource&&r.resource.mimeType?.toLowerCase().startsWith("image/"))return`${r.resource.mimeType.toLowerCase()}:${r.resource.blob}`;return null}function T({sessionId:r,entry:n,terminals:l,streaming:o,streamingThoughtId:w}){let{t:a}=t();switch(n.kind){case"activity":return s(En,{sessionId:r,items:n.items,terminals:l,streamingThoughtId:w});case"text":return p(n.item._meta).length>0?s(It,{sessionId:r,item:n.item}):s(W,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Mn,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Pt,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:n.item.status==="completed"?a("stream.codex.contextCompacted"):n.item.status==="cancelled"?a("timeline.interrupted"):a("timeline.compacting")})]})}}function ue({sessionId:r,turn:n,terminals:l,active:o,blocked:w=!1,continued:a=!1,edits:S=n.edits,activityItems:_=n.items,workStartedAt:Z=n.startedAt,isLast:F,error:u,interrupted:M,retry:L,retrying:g,answerActions:K,footer:ee}){let{t:d}=t(),I=n.errors.map((e)=>{let i=J(e);if(i===null)throw Error("Turn error item is missing its diagnostics");let k=L?.turnId===le(e)?L:void 0;return s(St,{error:i,retry:k},`${e.id}:${k?.delaySeconds??"manual"}`)});if(F&&u!==null&&!n.errors.some((e)=>{let i=J(e);return i!==null&&i.stopReason===u.stopReason&&q(i).message===q(u).message}))I.push(s(St,{error:u},"current-run-error"));let v=I.length>0?s("div",{className:"codex-turn-errors",children:I}):null,f=n.work,y=f.length>0&&f.every((e)=>e.kind==="compaction");if(Hn(n)||y&&n.final.length===0)return m(R,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),v]});let O=Ie(n),P=n.final.filter((e)=>p(e._meta).length===0).map(D).join(`
|
|
2
|
-
`),h=o?null:Te(n,"assistant"),G=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),B=new Set(n.final.flatMap((e)=>e.content.map(U).filter((i)=>i!==null))),N=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((i,k)=>{let c=i.content,ie=e.name==="image_generation"&&Y(c),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(c)||X(c)&&("blob"in c.resource));if(!ie&&!re)return[];let b=U(c);if(b!==null){if(B.has(b))return[];B.add(b)}return[{key:`${e.id}:${k}`,block:c}]})}),A=n.final.some((e)=>p(e._meta).length===0&&e.content.some((i)=>!me(i)||i.text.trim().length>0)),te=G.length>0||N.length>0||y||A||n.final.some((e)=>p(e._meta).length>0),x=n.items.findIndex((e)=>n.final.includes(e)),C=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),H=f.filter((e)=>x===-1||C(e)<x),ne=f.filter((e)=>x!==-1&&C(e)>x),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...ne.map((e)=>({kind:"work",entry:e,index:C(e)}))].toSorted((e,i)=>e.index-i.index),Q=!o&&!a&&(P.trim().length>0?s(Ht,{text:P,isMostRecentTurn:F,time:h,afterCopy:K}):m("div",{className:"flex items-center gap-0.5",children:[K,h&&s("span",{className:"codex-user-time ms-1",title:h.full,children:h.short})]})),E=Pn({...n,items:_},{running:o,blocked:w,retrying:g!==void 0}),V=E.kind==="reasoning"?E.ownerKey??null:null,j=E.kind==="thinking",z=Fn({...n,items:_});return m(R,{children:[s(Ot,{stateKey:JSON.stringify([r,n.replayed?"history":"live",n.key]),active:o&&!A,defaultExpanded:o&&!A||!n.replayed&&(M||O),...z,startedAt:z.startedAt??Z,loading:j&&n.work.length===0,work:a||y?[]:H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:o,streamingThoughtId:V},e.key)),answer:te||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||y)&&H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(T,{sessionId:r,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:V},e.entry.key);let i=e.item;return m(ge,{children:[p(i._meta).length>0?s(It,{sessionId:r,item:i}):s(W,{content:i.content,messageId:i.id,streaming:o}),i===n.final.at(-1)&&Q]},i.id)}),G.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),N.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:N.map((e)=>s(W,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&Q]}):null,footer:m(R,{children:[j&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),ee,S.length>0&&!o&&!a&&s(Ln,{items:S}),M&&!O&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&v]})}),o&&g!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:g.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(g.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():g.message}),o&&v]})}var In=pe(ue);
|
|
3
|
-
export{In};
|
package/dist/chunk-cka09jf6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,r}from"./chunk-bse4zh1d.js";import{A}from"./chunk-z79xmq12.js";import{useEffect as f,useMemo as p}from"react";function br(c){let e=s(),i=c===null?null:e.projectPath(c),u=r((t)=>t.sessionList),l=r((t)=>t.connection),n=r((t)=>t.sessionListLoaded),o=r((t)=>t.sessionListError),a=()=>e.listSessions({reset:!0}).catch(()=>{return});return f(()=>{if(l==="ready"&&!n&&o===null)e.listSessions().catch(()=>{return})},[e,l,n,o]),{result:p(()=>{if(n)return{status:"ready",sessionRows:u.filter((t)=>i===null?A(t.cwd):e.projectPath(t.cwd)===i).toSorted((t,d)=>(d.updatedAt??"").localeCompare(t.updatedAt??""))};if(o!==null)return{status:"failed",error:o};return{status:"loading"}},[e,u,n,o,i]),retry:a}}
|
|
2
|
-
export{br};
|
package/dist/chunk-dgx31pdr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{zo,x}from"./chunk-6jyd3a7v.js";import{Co}from"./chunk-t9nky8ka.js";import{Q}from"./chunk-seg9xzjy.js";import{So,No,Ro,Mo,Eo,H}from"./chunk-812n3qd8.js";import{Fo,Bo}from"./chunk-q53h2y2a.js";import{Gt}from"./chunk-jh46xzr6.js";import{t,o}from"./chunk-vmywavgm.js";import{n}from"./chunk-1v3wc4cv.js";import{Ct}from"./chunk-29wvjf38.js";import{i,xn,I,st}from"./chunk-xttthm0n.js";import{Xe}from"./chunk-ap1br099.js";import{ne,it}from"./chunk-w5wzxdbk.js";import{et,nt}from"./chunk-jf5651fz.js";import{fn}from"./chunk-1mv3y3cs.js";import{Ze}from"./chunk-qqv0bewt.js";import{hn}from"./chunk-jhxjbpt3.js";import{Ye}from"./chunk-dkbtw3g9.js";import{ot}from"./chunk-kc9rzb07.js";import{mn}from"./chunk-s3mx42dt.js";import{pn}from"./chunk-xrek8rbm.js";import{Je}from"./chunk-at0v48cp.js";import{hasFuzzyFileSearch as St}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Nt}from"lucide-react";import{useCallback as S,useEffect as Ot,useLayoutEffect as X,useMemo as q,useRef as K,useState as N}from"react";import{jsx as c,jsxs as v}from"react/jsx-runtime";var Ft=["image/png","image/jpeg","image/webp","image/gif"],J=[];async function kt(e){let d=await(await fetch(e.url)).blob();return new Promise((b,G)=>{let w=new FileReader;w.onerror=()=>G(w.error),w.onload=()=>{let O=w.result;b(O.slice(O.indexOf(",")+1))},w.readAsDataURL(d)})}function Dt(e){let{t:d}=t(),b=x();return c(H,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>b.openFileDialog(),...e,children:c(Nt,{className:"size-4"})})}function Qe({session:e,onSubmit:d,onHandOff:b,modelSelector:G,modelMenu:w,inputHeader:O,actions:gt,children:xt,attachmentPolicy:yt,predictions:Pt=!0,disabled:bt=!1,preparing:Z=!1,allowPendingInput:vt=!1}){let{host:F,client:A}=n(),{t:s}=F,k=S((r)=>{if(F.reportError)F.reportError(r);else console.error(r)},[F]),[tt,D]=N(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:M}=tt,[C,It]=N(()=>i.get(e.id)?.attachments??J),[h,_]=N(()=>i.get(e.id)?.mentions??[]),W=C.some((r)=>ne(r)&&r.pastedText.status!=="ready"),[T,rt]=N(!1),[L,wt]=N(!1),[Y,at]=N(!1),u=K(null),ct=K(null),a=K(tt),z=S((r)=>{ct.current?.(),a.current={text:r,revision:a.current.revision+1},D(a.current)},[]),pt=q(()=>({read:()=>{let p=u.current?.getTextarea(),g=p===null||p===void 0?[a.current.text.length,a.current.text.length]:[p.selectionStart,p.selectionEnd];return{target:e.id,...a.current,selection:g}},compareAndSet(p,g,y){if(p.target!==e.id||p.revision!==a.current.revision)return null;a.current={text:g,revision:a.current.revision+1},D(a.current);let l=u.current?.getTextarea();if(l!==null&&l!==void 0)l.value=g,l.setSelectionRange(y[0],y[1]);return{target:e.id,...a.current,selection:y}}}),[e.id]),B=K(null),mt=S((r)=>(B.current=r,()=>{if(B.current===r)B.current=null}),[]),lt=e.state!=="idle",f=!bt&&!Z&&e.attached&&!e.restoring&&!e.readOnly,R=!e.readOnly&&(vt||f),E=ot(e,f&&!T&&!L&&!W&&!Y,M.length>0||C.length>0||h.length>0,Pt),dt=E.invalidate;X(()=>{i.set(e.id,{text:M,attachments:C,mentions:h,modelId:i.get(e.id)?.modelId??null})},[e.id,M,C,h]),X(()=>xn(e.id,It),[e.id]),X(()=>st(e.id,(r)=>{if(!R||T)throw Error("The composer cannot take text now; try again later");if(M.length||C.length||h.length)throw Error("The composer already has a draft; send or clear it first");z(r)}),[e.id,R,T,M,C,h,z]);let ut=o((r)=>St(r.agent)),Tt=q(()=>ut&&f?async(r)=>Xe((await A.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[A,ut,f,e.cwd]),V=S((r)=>{_((p)=>p.includes(r)?p:[...p,r])},[]);Ot(()=>{u.current?.focus()},[]);let ft=S(async({text:r,files:p})=>{let g=r.trim();if(g.length===0&&p.length===0&&h.length===0)return;let y=B.current;rt(!0);let l=i.get(e.id),Et=a.current.revision,U=null;try{let P=[];for(let m of h){let j={kind:"file",absPath:m};P.push({type:"resource_link",uri:et(j),name:nt(j)})}if(g.length>0)P.push({type:"text",text:g});for(let m of p)if(ne(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");P.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else P.push({type:"image",data:await kt(m),mimeType:m.mediaType});if(a.current.revision===Et&&i.get(e.id)===l)a.current={text:"",revision:a.current.revision+1},U=a.current.revision,D(a.current),_([]),I(e.id,()=>J),i.set(e.id,{text:"",attachments:J,mentions:[],modelId:l?.modelId??null}),u.current?.resetHeight();if(d)if(y===null)await d(P);else await d(P,(m)=>{if(y.signal.aborted||B.current!==y)return;y.accept(m),b?.(e.id,m)});else if(y===null)await A.prompt(e.id,P);else{let m=await A.prompt(e.id,P);y.accept(m)}dt();for(let m of l?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((j)=>j.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(l&&U!==null&&a.current.revision===U&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:l.text,revision:U+1},D(a.current),_(l.mentions),i.set(e.id,l),I(e.id,()=>l.attachments);throw P}finally{rt(!1),u.current?.focus()}},[A,e.id,h,d,b,dt]),At=()=>{A.cancel(e.id).catch(k)},Mt=S((r)=>{let p=r.code==="max_total_size"?Object.assign(Error(s("composer.imageTooLargeTitle")),{description:s("composer.imageTooLargeDescription",{mb:Q})}):Object.assign(Error(s("composer.unsupportedAttachmentTitle")),{description:s("composer.unsupportedAttachmentDescription")});k(p)},[k,s]),Rt=q(()=>({session:e,ready:f,inputReady:R,sending:T,textareaRef:u,draft:pt,interruptRef:ct,observeReceipts:mt,addMention:V,setAdding:wt,handsFree:d===void 0||b!==void 0}),[e,f,R,T,pt,mt,V,d,b]),ht=F.writeTextAttachment;return c(Ct,{value:Rt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[O&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:O}),v(zo,{attachmentPolicy:yt,value:M,revision:a.current.revision,onValueChange:z,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},D(a.current)},attachments:C,onAttachmentsChange:(r)=>I(e.id,()=>r),children:[c(Co,{handleRef:u,commands:e.commands,searchFiles:Tt,onMention:V,onSearchError:k,forcedOpen:Y,onForcedOpenChange:at,emptyLabel:s("composer.noCommands"),fileStatusLabels:{loading:s("composer.searchingFiles"),empty:s("composer.noMatchingFiles")}}),v(So,{globalDrop:!0,multiple:!0,accept:Ft.join(","),onError:Mt,onSubmit:ft,onSubmitAsync:ft,onSubmitError:k,canSubmit:()=>f&&!T&&!L&&!W?!0:"chat_not_ready",className:"relative z-10",children:[xt,v(Ro,{className:"px-3 pt-3 pb-0 empty:hidden",children:[L&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:s("composer.addingFiles")}),c(fn,{mentions:h,onRemove:(r)=>_((p)=>p.filter((g)=>g!==r))}),c(Bo,{children:(r)=>ne(r)?c(hn,{data:r,sessionId:e.id}):c(Fo,{data:r,t:s})})]}),v(No,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(r)=>{if(!E.text||u.current?.isComposing()||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey||r.target!==u.current?.getTextarea())return;if(r.key==="Tab")r.preventDefault(),r.stopPropagation(),z(E.text)},children:[c(Gt,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,bashMode:!1,disabled:!R,onPasteCapture:ht?(r)=>it(r,e.id,s("composer.pastedTextFilename"),ht):void 0,placeholder:E.text||(lt?s("composer.steerPlaceholder"):s("composer.placeholder")),"aria-label":s("composer.placeholder")}),E.error&&c("span",{className:"text-muted-foreground text-xs",role:"status",title:E.error,children:s("composer.predictionUnavailable")})]}),c(Mo,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Dt,{className:"text-foreground",disabled:!R}),c(mn,{textareaRef:u,menuOpen:Y,onOpenChange:at,disabled:!f||e.commands.length===0}),c(Ye,{sessionId:e.id,options:e.configOptions,disabled:!f})]}),v(Eo,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(Je,{session:e}),G??c(Ze,{...w,sessionId:e.id,options:e.configOptions,disabled:!f}),gt,c(pn,{active:lt,sending:T||Z||L,ready:f&&!W,hasMentions:h.length>0,onStop:At})]})]})})]})]})]})})})}
|
|
2
|
-
export{Qe};
|
package/dist/chunk-dkbtw3g9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{qo}from"./chunk-00sds3wb.js";import{n,b}from"./chunk-1v3wc4cv.js";import{T,y}from"./chunk-tp5y8cc7.js";import{createLucideIcon as C,HandIcon as k,ShieldAlertIcon as w,ShieldCheckIcon as r}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var S=C("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":k,"workspace-write":r,agent:S,"agent-full-access":w},O={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function Ye({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=n(),{t:a}=l,s=y(m,"mode");if(!s)return null;let o=s.currentValue,p=T(s).map((e)=>{let i=O[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),h=p.find((e)=>e.value===o),I=d[o]??r,M=(e)=>{if(e===o)return;b(l,c?c(s.configId,e):f.setConfig(u,s.configId,e))};return t(qo,{value:o,currentName:h?.name??o,icon:t(I,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:g,label:a("composer.switchPermissionMode"),onValueChange:M,options:p.map((e)=>{let i=d[e.value]??r,v=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":v?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
|
|
2
|
-
export{Ye};
|
package/dist/chunk-f59aepmd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-vmywavgm.js";import{e}from"./chunk-cg97byvk.js";import{Tn}from"./chunk-n6xa65sp.js";import{fe,he,ve,xe}from"./chunk-5xjm1hab.js";import{n,b}from"./chunk-1v3wc4cv.js";import{Loader2Icon as y}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";function je({session:t,timeline:l}){let{host:s,client:a}=n(),{t:r}=s,c=o((f)=>f.historyPages[t.id]?.cursor!=null),d=()=>b(s,a.open(t.id,t.cwd)),p=i(Tn,{...l,session:t,client:a,host:s});if(t.restoring)return t.items.length===0?m("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[i(y,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return m(fe,{className:"flex-1",children:[m(he,{children:[i(ve,{children:r("conversation.reopen")}),i(xe,{children:r("conversation.detached")})]}),i(e,{onClick:d,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!c)return i(fe,{className:"flex-1",children:m(he,{children:[i(ve,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),i(xe,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{je};
|
package/dist/chunk-gdbzk1kt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function kn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function Tt(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function oe(t){return t.type==="array"}function lt(t){return(oe(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{kn,Tt,oe,lt};
|
package/dist/chunk-haf9qn5a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as g}from"@alwith/api";function An(n,o,r){if(n.kind!=="tool"){let t=g(n.content),c=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(t);return{type:"thinking",id:n.id,thinking:c?c[1]:t,isComplete:!r}}if(n.name==="subagent"){let t=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:p(t.agentPath,n.id),threadId:f(t.agentThreadId,"agentThreadId",n.id),activity:y(t.activity,n.id),model:l(t.model,"model",n.id),reasoningEffort:l(t.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let t=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof t.tool!=="string"||!Array.isArray(t.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:t.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:t.agents}}let i=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},e=u(n,o);if(Array.isArray(i.command))i.command=i.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof i.command!=="string"){let t=e?.command??n.title;if(t!==null)i.command=t}let a=n.rawOutput;if(typeof a==="object"&&a!==null&&"output"in a&&typeof a.output==="string")a=a.output;if(e!==null&&e.output.length>0)a=e.output;let d=e?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:i,rawOutput:a,...typeof d==="number"?{exitCode:d}:{}}}function s(n,o){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${o} is missing an object codex-acp-v2 always sends`);return n}function l(n,o,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${o}`)}function p(n,o){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${o} has no agent path`);return r}function f(n,o,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${o}`)}function y(n,o){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${o} has an unknown activity ${String(n)}`)}
|
|
2
|
-
export{An};
|
package/dist/chunk-hd682pax.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var gr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function wn(e){return[...e].toSorted((o,n)=>(gr[o.kind]??99)-(gr[n.kind]??99))}function Gr(e){return e==="allow_once"||e==="allow_always"}function Wr(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{gr,wn,Gr,Wr};
|
package/dist/chunk-jf5651fz.js
DELETED
package/dist/chunk-kc9rzb07.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-vmywavgm.js";import{n}from"./chunk-1v3wc4cv.js";import{isBooleanOption as T,isSelectOption as w}from"@alwith/api";import{codexExtensionCapabilities as j,codexTurnId as B,composerPrediction as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function ot(t,g,c,y){let{client:S}=n(),R=o((e)=>j(e.agent).composerPredictions),k=t.items.findLast((e)=>e.kind==="user"),i=B(k?._meta),O=t.configOptions.flatMap((e)=>w(e)||T(e)?[[e.configId,e.currentValue]]:[]).sort(([e],[u])=>String(e).localeCompare(String(u))),r=JSON.stringify([t.id,i,O]),s=F(t._meta),d=t._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===r||l.current?.key===r||i===null)return;let e={key:r,previousResult:m};l.current=e,x(null),S.requestPrediction(t.id,i).catch((u)=>{if(f.current&&l.current===e)x({key:r,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,r,m,t.id,i]);let I=p&&!c&&a!==r&&l.current?.key===r&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&t.state==="idle"&&!c&&a!==r?v?.key===r?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(r)}}}
|
|
2
|
-
export{ot};
|
package/dist/chunk-m92evp24.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var Mt=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function qn(e){Mt.setState({...e,terminals:e.terminals??{}})}function Vn(e){if(Mt.getState().sessionId===e)Mt.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function jr(e,t,n){let i=Mt.getState();if(n.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(t,void 0,{align:"top"})}
|
|
2
|
-
export{Mt,qn,Vn,jr};
|
package/dist/chunk-n514z4we.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-vmywavgm.js";import{te,ke,Ke}from"./chunk-8fd8jhbf.js";import{jsx as n,jsxs as m,Fragment as r}from"react/jsx-runtime";var c=[];function Ve({sessionId:s}){let e=o((i)=>i.actions),l=e.some((i)=>i.sessionId===s)?e.filter((i)=>i.sessionId===s):c,t=l.filter(te),a=l.filter((i)=>!te(i));return m(r,{children:[a.length>0&&n("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:a.map((i)=>n(Ke,{action:i},i.id))}),t[0]!==void 0&&n(ke,{action:t[0],total:t.length},t[0].id)]})}
|
|
2
|
-
export{Ve};
|
package/dist/chunk-p8n6rm5h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{t}from"./chunk-vmywavgm.js";import{codexTurnError as T}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as C,useRef as u,useState as s}from"react";import{jsx as o,jsxs as m}from"react/jsx-runtime";function Pt({children:l}){return m("div",{className:"codex-error-message",role:"alert",children:[o(R,{"aria-hidden":"true"}),o("div",{className:"min-w-0 flex-1",children:l})]})}function St({error:l,retry:r}){let{t:f}=t(),p=T(l),[c]=s(()=>r?.delaySeconds==null?null:Date.now()+r.delaySeconds*1000),[v,y]=s(r?.delaySeconds??null),[N,w]=s(!1),[g,x]=s(null),a=u(!1),E=u(!1),S=u(r?.run);S.current=r?.run;let b=u((h)=>{let i=S.current;if(a.current||i===void 0)return;a.current=!0,w(!0),x(null),i(h).catch((n)=>{E.current=!0,a.current=!1,y(null),w(!1),x(n instanceof Error?n.message:String(n))})}),d=r!==void 0&&p.retryable;return C(()=>{if(!d||c===null)return;let i=setInterval(()=>{if(E.current||a.current)return;let n=Math.max(0,Math.ceil((c-Date.now())/1000));if(y(n),n===0)b.current("automatic")},1000);return()=>clearInterval(i)},[c,d]),m(Pt,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:p.message}),d&&o(e,{variant:"outline",size:"sm",disabled:N,onClick:()=>b.current("manual"),children:v===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:v})})]}),g!==null&&o("div",{className:"text-muted-foreground mt-2 text-sm",children:g})]})}
|
|
2
|
-
export{Pt,St};
|
package/dist/chunk-qqv0bewt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ko}from"./chunk-jmcb7an2.js";import{o}from"./chunk-vmywavgm.js";import{n,b}from"./chunk-1v3wc4cv.js";import{T,y,G}from"./chunk-tp5y8cc7.js";import{isBooleanOption as E,isGroupedSelect as R,isSelectOption as U}from"@alwith/api";import{Zap as A}from"lucide-react";import{jsx as I}from"react/jsx-runtime";function Ze({sessionId:u,options:p,disabled:w,onModelChange:g,onConfigChange:M,defaultGroup:B={id:"models",name:"Models"},catalog:x=(s)=>s,headerAction:L}){let{host:s,client:N}=n(),{t:r}=s,h=o((e)=>Boolean(e.configPending[u])),t=y(p,"model"),l=y(p,"thought_level"),C=p.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==t&&e!==l)),O=C.filter(U),d=C.filter(E);if(!t&&!l&&O.length===0&&d.length===0)return null;let c=(e,a)=>{if(a===e.currentValue)return;b(s,M?M(e.configId,a):N.setConfig(u,e.configId,a))},f=l?T(l):[],z=f.reduce((e,a)=>a.name.length>=e.length?a.name:e,""),P=t?G(t):r("composer.model"),_=(e)=>({api_id:e.value,label:e.name}),v=x(t&&R(t.options)?t.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(_)})):[{...B,models:t?T(t).map(_):[]}]),S=v.flatMap((e)=>e.models),m=S.find((e)=>e.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:P},i=d.find((e)=>e.configId==="fast-mode");return I(ko,{disabled:w||h,switching:h,value:{...m,label:m.shortLabel??m.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:L},modelGroups:v,t:r,effortConfig:l&&f.length>0?{name:"Effort",value:l.currentValue,levels:f,sizer:z,onChange:(e)=>c(l,e)}:void 0,selectOptions:O.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:T(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:I(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((k)=>k.configId===e);if(!V)throw Error(`Unknown boolean config: ${e}`);c(V,a)}})}
|
|
2
|
-
export{Ze};
|
package/dist/chunk-r22h488a.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{B,z}from"./chunk-0vy9fzs3.js";import{e}from"./chunk-cg97byvk.js";import{d,u,w,q,m,k}from"./chunk-p0ebmb2m.js";import{l}from"./chunk-1hy64ewz.js";import{en,tn,nn,Xo,ee}from"./chunk-ta45etnd.js";import{de}from"./chunk-0jw4ffzj.js";import{h,s,r}from"./chunk-bse4zh1d.js";import{X,A,se,O}from"./chunk-z79xmq12.js";import{cn as pe}from"cn";import{ArchiveIcon as fe,FolderIcon as M,ListFilterIcon as ve,SearchIcon as ge,Trash2Icon as Y}from"lucide-react";import{useEffect as xe,useRef as Se,useState as p}from"react";import{jsx as i,jsxs as n}from"react/jsx-runtime";function Z({className:f,...a}){return i(Xo,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...a,className:pe("max-w-(--available-width) min-w-0 p-1",f)})}function _(f){return f instanceof Error?f.message:String(f)}function ye({children:f}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:f})})}function wr({Scroll:f=ye}){let{t:a,i18n:E}=h(),v=s(),L=r((t)=>t.archivedSessions),b=r((t)=>t.connection),[V,te]=p(""),[N,ie]=p("all"),[g,re]=p("all"),[ae,ne]=p(0),[H,Q]=p(!0),[F,K]=p(null),[U,G]=p(null),[D,I]=p(!1),x=Se(!1),[j,S]=p(null),[R,P]=p(null),[le,W]=p(!1);xe(()=>{if(b!=="ready")return;let t=!1;Q(!0),K(null);async function c(){try{await v.listArchived({reset:!0});let o=new Set;while(!t&&v.state.archivedCursor!==null){let y=v.state.archivedCursor;if(o.has(y))throw Error("Archive pagination returned a repeated cursor");o.add(y),await v.listArchived()}}catch(o){if(!t)K(_(o))}finally{if(!t)Q(!1)}}return c(),()=>{t=!0}},[v,b,ae]);let T=!(b==="ready"&&!H&&F===null)||D,C=(t)=>t.title??a("sessionList.untitled"),oe=[...new Set(L.filter((t)=>!A(t.cwd)).map((t)=>t.cwd))].toSorted(),ce=V.trim().toLocaleLowerCase(E.language),J=L.filter((t)=>{let c=A(t.cwd);return C(t).toLocaleLowerCase(E.language).includes(ce)&&(N==="all"||(N==="quick"?c:!c))&&(g==="all"||(g==="quick"?c:t.cwd===g))}),ue=new Intl.DateTimeFormat(E.language,{dateStyle:"medium",timeStyle:"short"});async function me(t){if(x.current)return;x.current=!0,I(!0),G(null);try{await v.unarchive(t.sessionId)}catch(c){G(_(c))}finally{x.current=!1,I(!1)}}async function he(){if(x.current||!j)return;x.current=!0,I(!0),P(null);let t=[],c=[];try{for(let o of j){if(!v.state.archivedSessions.some((y)=>y.sessionId===o.sessionId))continue;try{await v.delete(o.sessionId)}catch(y){t.push(o),c.push(`${C(o)}: ${_(y)}`)}}if(t.length)S(t),P(c.join(`
|
|
2
|
-
`));else S(null)}finally{x.current=!1,I(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":a("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:a("sessionList.archives.title")}),n(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:T||L.length===0,onClick:()=>{P(null),W(!0),S([...L])},children:[i(Y,{"aria-hidden":"true"}),a("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[i(ge,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":a("sessionList.archives.search"),placeholder:a("sessionList.archives.search"),value:V,onChange:(t)=>te(t.target.value),className:"rounded-md ps-9"})]}),n(en,{value:N,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ie(t)},children:[n(nn,{"aria-label":a("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ve,{"aria-hidden":"true"}),i(tn,{children:a(`sessionList.archives.${N==="all"?"allChats":N==="quick"?"quickChats":"projectChats"}`)})]}),n(Z,{children:[i(ee,{value:"all",children:a("sessionList.archives.allChats")}),i(ee,{value:"quick",children:a("sessionList.archives.quickChats")}),i(ee,{value:"project",children:a("sessionList.archives.projectChats")})]})]}),n(en,{value:g,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");re(t)},children:[n(nn,{"aria-label":a("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(M,{"aria-hidden":"true"}),i(tn,{className:"truncate",children:g==="all"?a("sessionList.archives.allProjects"):g==="quick"?a("sessionList.archives.noProject"):O(g)})]}),n(Z,{children:[i(ee,{value:"all",children:a("sessionList.archives.allProjects")}),i(ee,{value:"quick",children:a("sessionList.archives.noProject")}),oe.map((t)=>i(ee,{value:t,title:t,children:O(t)},t))]})]})]}),n(f,{children:[b!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:a("sessionList.archives.connecting")}):H?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(de,{}),a("sessionList.archives.loading")]}):F?i(B,{variant:"destructive",children:n(z,{className:"flex items-center justify-between gap-4",children:[i("span",{children:F}),i(e,{variant:"outline",onClick:()=>ne((t)=>t+1),children:a("sessionList.archives.retry")})]})}):L.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(fe,{"aria-hidden":"true",className:"size-8"}),i("p",{children:a("sessionList.archives.empty")})]}):J.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:a("sessionList.archives.noResults")}):se(J).filter(([,t])=>t.length>0).map(([t,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===X?void 0:t,children:[i(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===X?a("sessionList.archives.noProject"):O(t)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:a("sessionList.archives.count",{count:c.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((o)=>n("article",{"aria-label":C(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:C(o),children:C(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:a("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:ue.format(new Date(o.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":a("sessionList.delete"),title:a("sessionList.delete"),disabled:T,className:"text-muted-foreground hover:text-destructive",onClick:()=>{P(null),W(!1),S([o])},children:i(Y,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:T,onClick:()=>void me(o),children:a("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),U&&i(B,{variant:"destructive",children:i(z,{children:U})})]})]}),i(d,{open:j!==null,onOpenChange:(t)=>{if(!t&&!x.current)S(null)},children:n(u,{showCloseButton:!D,children:[n(w,{children:[i(m,{children:a("sessionList.archives.deleteTitle")}),i(k,{children:a(le?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:j?.length??0})})]}),R&&i(B,{variant:"destructive",children:i(z,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:R})}),n(q,{children:[i(e,{variant:"outline",disabled:D,onClick:()=>S(null),children:a("sessionList.cancel")}),n(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:T,onClick:()=>void he(),children:[D&&i(de,{}),a("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{wr};
|
package/dist/chunk-rd2n48s1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{fo}from"./chunk-raz9hb3h.js";import{Kn,Qn,Xn}from"./chunk-h2nvgcbs.js";import{go}from"./chunk-3zj0ka21.js";import{t}from"./chunk-vmywavgm.js";import{D}from"./chunk-6bdd2cgs.js";import{textOf as f}from"@alwith/api";import{nativeTurnId as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Mr(i,n){return{installUnlock:n==="none"?()=>()=>{}:Qn,preload:()=>{if(n!=="none")Kn(i)},playSequence:(a,d,l)=>Xn(a,d,l,i,n)}}function Dn(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=f(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(I).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:D(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(fo,{text:i.response,host:a})})]})}function _n(i){return r(go,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
|
-
export{Mr,Dn,_n};
|
package/dist/chunk-s1vxbxzr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Et(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Jr(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Et(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Et,Jr};
|
package/dist/chunk-s3mx42dt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{H}from"./chunk-812n3qd8.js";import{t}from"./chunk-vmywavgm.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function mn({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(H,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{mn};
|
package/dist/chunk-seg9xzjy.js
DELETED
package/dist/chunk-tp5y8cc7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@alwith/api";function T(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function y(e,t){return e.find((n)=>n.category===t&&o(n))}function G(e){return T(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{T,y,G};
|
package/dist/chunk-vmywavgm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{wo}from"./chunk-3p9j3gmw.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function j({host:e,client:n,children:i}){return r(wo,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function K(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function re(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=K();return re(n.store,e)}function Pe(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{j,t,K,re,o,Pe};
|
package/dist/chunk-w3z37qwe.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C}from"./chunk-xjtqdp82.js";import{cn as n}from"cn";import{jsx as o}from"react/jsx-runtime";function ln({className:r,...e}){return o(C,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",r),...e})}
|
|
2
|
-
export{ln};
|
package/dist/chunk-w5wzxdbk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i,I,at}from"./chunk-xttthm0n.js";var vn=5000;function ne(t){return"pastedText"in t}function Tr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Ce(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;I(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Tr(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),at(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function it(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<vn)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};I(e,(a)=>[...a,s]),Ce(e,s,n)}
|
|
2
|
-
export{vn,ne,Tr,Ce,it};
|
package/dist/chunk-wthttnkz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{ce}from"./chunk-11v81zha.js";import{d,u,w,q,m,k}from"./chunk-p0ebmb2m.js";import{v}from"./chunk-kjtd3wc3.js";import{cn,dn,ar,sr,lr,kt}from"./chunk-nhsbjys5.js";import{l}from"./chunk-1hy64ewz.js";import{U,R}from"./chunk-5w48y2ad.js";import{Be}from"./chunk-y6v59cgf.js";import{C}from"./chunk-xjtqdp82.js";import{isArrayProperty as D,isBooleanProperty as S,isNumberProperty as A,isStringProperty as E}from"@alwith/api";import{useEffect as N,useMemo as V,useState as P}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 Ir(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:D(i)?G(i.items):null}))}function fr(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(S(n.property))t[n.key]=!1;else if(D(n.property))t[n.key]=[]}return t}function Pr(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 O({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(v,{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(cn,{children:[o(dn,{variant:"label",children:t.title}),t.description&&o(kt,{children:t.description}),o("div",{className:"flex flex-col gap-1",children:t.multiOptions.map((c)=>{let f=`${r}:${c.value}`;return o(O,{id:f,...c,control:o(ce,{id:f,checked:a.has(c.value),onCheckedChange:(y)=>{let g=new Set(a);if(y)g.add(c.value);else g.delete(c.value);i([...g])}})},c.value)})})]})}if(t.options)return p(cn,{children:[o(dn,{variant:"label",children:t.title}),t.description&&o(kt,{children:t.description}),o(U,{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(O,{id:c,...a,control:o(R,{value:a.value,id:c})},a.value)})})]});return p(sr,{children:[o(lr,{htmlFor:r,children:t.title}),S(t.property)?o(Be,{id:r,checked:n===!0,onCheckedChange:(a)=>i(a)}):A(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(C,{id:r,rows:2,required:t.required,value:typeof n==="string"?n:"",onChange:(a)=>i(a.target.value)}),t.description&&o(kt,{children:t.description})]})}function Cn({requestId:r,schema:t,message:n,total:i,t:a,onRespond:c}){let f=V(()=>Ir(t),[t]),[y,g]=P(()=>fr(f));N(()=>g(fr(f)),[r,f]);let b=f.every((s)=>Pr(s,y[s.key])),x=()=>{if(!b)return;let s={};for(let[h,F]of Object.entries(y))if(F!==void 0)s[h]=F;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(),x()},children:[p(w,{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(k,{children:n})]}),o("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o(ar,{children:f.map((s)=>o(I,{id:`${r}:${s.key}`,field:s,value:y[s.key],onChange:(h)=>g((F)=>({...F,[s.key]:h}))},s.key))})}),p(q,{children:[o(e,{variant:"ghost",onClick:()=>c({action:"decline"}),children:a("actions.decline")}),o(e,{disabled:!b,onClick:x,children:a("actions.submit")})]})]})})}
|
|
2
|
-
export{Ir,fr,Pr,Cn};
|
package/dist/chunk-xnmjg8r1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ne}from"./chunk-wpx2bvd0.js";import{An}from"./chunk-haf9qn5a.js";import{t}from"./chunk-vmywavgm.js";import{M}from"./chunk-zw2q13qg.js";import{Nt}from"./chunk-6bdd2cgs.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@alwith/api";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,i)=>l(M,{block:o.content},`${n.id}:${i}`))]})}var En=k(function({sessionId:r,items:o,terminals:i,streamingThoughtId:d}){let p=t(),s=o.every(Nt),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...An(e,i,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,s?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,s,o,i,d,c]);return u(T,{children:[l(Ne,{blocks:a,defaultExpanded:!s}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
|
|
2
|
-
export{En};
|
package/dist/chunk-xrek8rbm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Me}from"./chunk-6jyd3a7v.js";import{H,Ao}from"./chunk-812n3qd8.js";import{t}from"./chunk-vmywavgm.js";import{Yo}from"./chunk-2q71dv8k.js";import{ye,be,we}from"./chunk-mxj4s2r8.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 pn({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Me(),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(H,{"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(ye,{children:[o(be,{render:o(Ao,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(we,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(Yo,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
|
|
2
|
-
export{pn};
|
package/dist/chunk-z79xmq12.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var X="quick-chats";function A(e){let t=n(e);if(/^[a-z]:\//i.test(t)||t.startsWith("//"))return/^[a-z]:\/users\/[^/]+\/documents\/(codex(?:\/.*)?|alwith)$/.test(t);return/^\/Users\/[^/]+\/Documents\/(Codex(?:\/.*)?|ALwith)$/.test(e.replace(/\/+$/,""))}function n(e){return e.replaceAll("\\","/").replace(/^\/\/\?\/UNC\//i,"//").replace(/^\/\/\?\//,"").replace(/\/+$/,"").toLowerCase()}function se(e){let t=new Map([["quick-chats",[]]]);for(let r of[...e].toSorted((s,o)=>(o.updatedAt??"").localeCompare(s.updatedAt??""))){let s=A(r.cwd)?"quick-chats":r.cwd,o=t.get(s);if(o)o.push(r);else t.set(s,[r])}return[...t]}function O(e){let t=e.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop();return t?t:e}
|
|
2
|
-
export{X,A,se,O};
|
package/dist/chunk-zw2q13qg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-cg97byvk.js";import{t,Pe}from"./chunk-vmywavgm.js";import{isEmbeddedResource as B,isImage as h,isResourceLink as E}from"@alwith/api";import{DownloadIcon as T,FileIcon as N,ImageOffIcon as L,LoaderCircleIcon as F}from"lucide-react";import{useState as y}from"react";import{jsx as i,jsxs as r}from"react/jsx-runtime";function hr(a){let o=a.split(/[\\/]/).at(-1)??a;if(a.startsWith("file:")||/^https?:/.test(a))o=new URL(a).pathname.split("/").at(-1)??"";try{return decodeURIComponent(o)||"attachment"}catch(n){if(n instanceof URIError)return o||"attachment";throw n}}function U(a,o){let n=document.createElement("a");n.href=o,n.download=a,n.click()}function M({block:a,generated:o=!1}){let n=t(),[p,d]=y(!1),[I,C]=y(null);if(E(a)){if(a.uri==="codex-image:unavailable")return r("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[i(L,{className:"size-4"}),n.t("timeline.imageUnavailable")]});let u=hr(a.uri);return r(e,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":a.title??a.name,title:a.uri,onClick:()=>n.openLink(a.uri),children:[i(N,{}),r("span",{className:"min-w-0 flex-1 text-start",children:[i("span",{className:"block truncate",children:a.title??a.name}),r("span",{className:"text-muted-foreground block truncate text-xs",children:[(a.title??a.name)!==u&&`${u} · `,a.mimeType??u.split(".").at(-1)?.toUpperCase()]})]})]})}if(!B(a)&&!h(a))return null;let s=h(a)?{uri:a.uri??`image.${a.mimeType.split("/")[1]??"png"}`,mimeType:a.mimeType,blob:a.data}:a.resource,l=hr(s.uri);if("text"in s)return r("div",{className:"min-w-0",children:[i("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:s.text}),r(e,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:s.uri,onClick:()=>n.openLink(s.uri),children:[i(N,{}),i("span",{className:"truncate",children:l})]})]});let m=`data:${s.mimeType??"application/octet-stream"};base64,${s.blob}`,f=s.mimeType?.toLowerCase().startsWith("image/")&&I!==m,{openImage:g,openImageGallery:w}=n,x=w?()=>w([{src:m,alt:l,uri:s.uri}],0):g&&(()=>g(m)),c=o&&f,R=async()=>{d(!0);try{if(n.saveFile)await n.saveFile(l,s.blob);else U(l,m)}catch(u){Pe(n,u)}finally{d(!1)}},v=i("img",{src:m,alt:"",className:o?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(m)});return r("div",{className:c?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:i(e,{variant:"ghost",className:o?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":n.t("timeline.viewImage"),onClick:x,children:v})),r(e,{variant:c?"secondary":"link",size:c?"icon":"sm",className:c?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:n.t("timeline.download",{name:l}),"aria-label":n.t("timeline.download",{name:l}),onClick:()=>{R()},children:[p?i(F,{className:"motion-safe:animate-spin"}):i(T,{}),!c&&i("span",{className:"truncate",children:l})]})]})}
|
|
2
|
-
export{hr,M};
|