@alwith/module-chat 0.5.3 → 0.5.5
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/dist/activity-host.d.ts +2 -0
- 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-00sds3wb.js +2 -0
- package/dist/{chunk-r6e2abj6.js → chunk-0h993cve.js} +2 -2
- package/dist/{chunk-61vxy6yd.js → chunk-0jw4ffzj.js} +1 -1
- package/dist/{chunk-4dcagj01.js → chunk-0vy9fzs3.js} +1 -1
- package/dist/{chunk-9bjywaze.js → chunk-11v81zha.js} +1 -1
- package/dist/chunk-1dce9zt8.js +2 -0
- package/dist/{chunk-b5g1j1zv.js → chunk-1mnc7200.js} +2 -2
- package/dist/{chunk-hr9d9zpb.js → chunk-1mv3y3cs.js} +2 -2
- package/dist/{chunk-zjg9n6zj.js → chunk-1q1hyka4.js} +2 -2
- package/dist/chunk-1tz8afx9.js +2 -0
- package/dist/chunk-1v3wc4cv.js +2 -0
- package/dist/chunk-29wvjf38.js +2 -0
- package/dist/{chunk-cr294svm.js → chunk-2q71dv8k.js} +1 -1
- package/dist/chunk-2w9f1q84.js +4 -0
- package/dist/{chunk-x71x2atx.js → chunk-34xzrr3s.js} +2 -2
- package/dist/{chunk-dfengqjx.js → chunk-39f0d44a.js} +2 -2
- package/dist/{chunk-d4yhdesy.js → chunk-3d58k7fn.js} +2 -2
- package/dist/chunk-3p9j3gmw.js +2 -0
- package/dist/chunk-3zj0ka21.js +2 -0
- package/dist/chunk-42fw8maa.js +2 -0
- package/dist/{chunk-w92s8704.js → chunk-48av28r4.js} +5 -5
- package/dist/{chunk-w2tmm1va.js → chunk-494jkxv9.js} +2 -2
- package/dist/chunk-52y4pyr1.js +2 -0
- package/dist/chunk-5nemwzzv.js +2 -0
- package/dist/{chunk-w99ah6qt.js → chunk-5s5tedyw.js} +3 -3
- package/dist/{chunk-zcrct67v.js → chunk-5w48y2ad.js} +1 -1
- package/dist/{chunk-qpz97p1m.js → chunk-5xjm1hab.js} +1 -1
- package/dist/chunk-6bdd2cgs.js +2 -0
- package/dist/{chunk-j4teycge.js → chunk-6jyd3a7v.js} +2 -2
- package/dist/{chunk-hesyytcd.js → chunk-76fxyvb0.js} +2 -2
- package/dist/chunk-7w4tjrdw.js +2 -0
- package/dist/{chunk-p0cc67an.js → chunk-812n3qd8.js} +2 -2
- package/dist/chunk-85gdavf5.js +2 -0
- package/dist/{chunk-ptt7q7za.js → chunk-8fd8jhbf.js} +3 -3
- package/dist/chunk-8w6ze6pw.js +4 -0
- package/dist/{chunk-20re64ta.js → chunk-91qp7sps.js} +2 -2
- package/dist/chunk-932ykb37.js +2 -0
- package/dist/{chunk-jdv29apq.js → chunk-9d0vkezs.js} +2 -2
- package/dist/{chunk-3jcxkpvs.js → chunk-9mcfd41e.js} +2 -2
- package/dist/{chunk-3m06tqqk.js → chunk-9yv5c2s3.js} +2 -2
- package/dist/{chunk-cgxcxfh1.js → chunk-ad32h099.js} +3 -3
- package/dist/{chunk-mgakm5yv.js → chunk-ap1br099.js} +2 -2
- package/dist/{chunk-eyre28p1.js → chunk-at0v48cp.js} +2 -2
- package/dist/chunk-azp1438s.js +2 -0
- package/dist/{chunk-wf4tq3fn.js → chunk-b0v983ch.js} +1 -1
- package/dist/chunk-bafntrka.js +3 -0
- package/dist/chunk-bje0nmh9.js +2 -0
- package/dist/chunk-bse4zh1d.js +2 -0
- package/dist/chunk-bx1x7t6v.js +3 -0
- package/dist/{chunk-tptnjbrd.js → chunk-c7b8rscf.js} +2 -2
- package/dist/{chunk-mk10tgjk.js → chunk-cbbr9m3a.js} +2 -2
- package/dist/{chunk-a7mr12yc.js → chunk-cg97byvk.js} +1 -1
- package/dist/{chunk-2snmjnz9.js → chunk-cka09jf6.js} +2 -2
- package/dist/chunk-dgx31pdr.js +2 -0
- package/dist/{chunk-pb6xtb3n.js → chunk-dhvpffgf.js} +2 -2
- package/dist/{chunk-tj44vjyv.js → chunk-dkbtw3g9.js} +2 -2
- package/dist/{chunk-px7xxz3v.js → chunk-eyqbvc19.js} +2 -2
- package/dist/{chunk-aygzz2yg.js → chunk-ez1ac611.js} +2 -2
- package/dist/{chunk-zwvyfjj8.js → chunk-f3xhtnkz.js} +2 -2
- package/dist/chunk-f59aepmd.js +2 -0
- package/dist/{chunk-n3raktzz.js → chunk-fv7tp8pr.js} +2 -2
- package/dist/chunk-gdbzk1kt.js +2 -0
- package/dist/{chunk-23wzpgbs.js → chunk-gdhkb2rz.js} +2 -2
- package/dist/{chunk-bycbj1aq.js → chunk-h2nvgcbs.js} +2 -2
- package/dist/{chunk-tre0r8qm.js → chunk-h3s5e0c5.js} +2 -2
- package/dist/chunk-haf9qn5a.js +2 -0
- package/dist/chunk-hd682pax.js +2 -0
- package/dist/{chunk-86kkb0z4.js → chunk-hw5n7sqm.js} +2 -2
- package/dist/{chunk-dzydvx7r.js → chunk-jh46xzr6.js} +3 -3
- package/dist/{chunk-fqj76wq8.js → chunk-jhxjbpt3.js} +2 -2
- package/dist/chunk-jmcb7an2.js +2 -0
- package/dist/{chunk-kbvkr5mr.js → chunk-jtafw6h4.js} +2 -2
- package/dist/{chunk-8r010kvn.js → chunk-k6b4cf05.js} +1 -1
- package/dist/chunk-kc9rzb07.js +2 -0
- package/dist/{chunk-ckp6661s.js → chunk-key9msc9.js} +2 -2
- package/dist/{chunk-ek06eyp4.js → chunk-kjtd3wc3.js} +1 -1
- package/dist/{chunk-9v2gk9ex.js → chunk-kk2nr6dd.js} +2 -2
- package/dist/chunk-m3cbbk3v.js +2 -0
- package/dist/chunk-m92evp24.js +2 -0
- package/dist/{chunk-8kjsqjy6.js → chunk-mme37xva.js} +1 -1
- package/dist/{chunk-802bgza1.js → chunk-mwkr9pvg.js} +2 -2
- package/dist/{chunk-k50475tn.js → chunk-mxj4s2r8.js} +1 -1
- package/dist/{chunk-pcngn73n.js → chunk-mzc51shd.js} +2 -2
- package/dist/{chunk-d25r0vq3.js → chunk-n514z4we.js} +2 -2
- package/dist/chunk-n6xa65sp.js +2 -0
- package/dist/{chunk-st90r31c.js → chunk-nhsbjys5.js} +1 -1
- package/dist/{chunk-cw68hvkc.js → chunk-p0ebmb2m.js} +1 -1
- package/dist/{chunk-mmdpwbef.js → chunk-p2khnrm1.js} +2 -2
- package/dist/{chunk-rqbbb37p.js → chunk-p8n6rm5h.js} +2 -2
- package/dist/{chunk-zy6338m6.js → chunk-q53h2y2a.js} +2 -2
- package/dist/chunk-q989x2x5.js +2 -0
- package/dist/chunk-qqv0bewt.js +2 -0
- package/dist/{chunk-acrrwrzy.js → chunk-qsqyf4y3.js} +2 -2
- package/dist/chunk-r22h488a.js +3 -0
- package/dist/{chunk-543v9eke.js → chunk-r8k9jd0z.js} +2 -2
- package/dist/{chunk-87t0qtkr.js → chunk-raz9hb3h.js} +4 -4
- package/dist/{chunk-691gxr2e.js → chunk-rd2n48s1.js} +2 -2
- package/dist/{chunk-t2ceq16d.js → chunk-rmv0t2ee.js} +2 -2
- package/dist/chunk-s1vxbxzr.js +2 -0
- package/dist/chunk-s3mx42dt.js +2 -0
- package/dist/chunk-seg9xzjy.js +2 -0
- package/dist/chunk-sq5zstzq.js +2 -0
- package/dist/{chunk-3nmqebb6.js → chunk-t794afpy.js} +3 -3
- package/dist/{chunk-maj7m5s7.js → chunk-t9nky8ka.js} +3 -3
- package/dist/{chunk-hwwhxb3x.js → chunk-ta45etnd.js} +1 -1
- package/dist/{chunk-zzwnpk4q.js → chunk-tcgx9yxg.js} +2 -2
- package/dist/{chunk-aaqk0jrt.js → chunk-tjykfxrd.js} +2 -2
- package/dist/chunk-tp5y8cc7.js +2 -0
- package/dist/{chunk-51qsyrd6.js → chunk-tv9wdbxr.js} +1 -1
- package/dist/{chunk-t9vvcy09.js → chunk-v8rqevms.js} +3 -3
- package/dist/{chunk-awrzpp7x.js → chunk-v958q8hh.js} +2 -2
- package/dist/chunk-vmywavgm.js +2 -0
- package/dist/chunk-w3z37qwe.js +2 -0
- package/dist/{chunk-hmtgx7fw.js → chunk-w522gwhm.js} +2 -2
- package/dist/chunk-w5wzxdbk.js +2 -0
- package/dist/{chunk-d6nxypzc.js → chunk-w9nr7saa.js} +1 -1
- package/dist/chunk-wpx2bvd0.js +7 -0
- package/dist/chunk-wthttnkz.js +2 -0
- package/dist/{chunk-e3mkvx24.js → chunk-x8vd2d2g.js} +1 -1
- package/dist/{chunk-rkqe8p8n.js → chunk-xf91jp39.js} +2 -2
- package/dist/{chunk-ncekagm6.js → chunk-xjtqdp82.js} +1 -1
- package/dist/chunk-xnmjg8r1.js +2 -0
- package/dist/chunk-xrek8rbm.js +2 -0
- package/dist/{chunk-0n82kdek.js → chunk-xttthm0n.js} +2 -2
- package/dist/{chunk-4mnf89r3.js → chunk-y6v59cgf.js} +1 -1
- package/dist/{chunk-jnfp7j32.js → chunk-y8qmxd0j.js} +2 -2
- package/dist/{chunk-qbdqh38y.js → chunk-ygebvrv5.js} +1 -1
- package/dist/{chunk-1dp50khb.js → chunk-z79xmq12.js} +2 -2
- package/dist/{chunk-h80g3eme.js → chunk-zw2q13qg.js} +2 -2
- package/dist/codex/activity-group.d.ts +2 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.d.ts +14 -0
- package/dist/codex/turn-activity.js +1 -0
- package/dist/codex/user-message.d.ts +3 -2
- 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.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.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/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.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-view.d.ts +1 -0
- 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/locales.d.ts +24 -8
- package/dist/locales.js +1 -1
- package/dist/search/chat-search.d.ts +2 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/dom-matches.d.ts +1 -0
- 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.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.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.css +6 -4
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/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.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.d.ts +2 -0
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.d.ts +3 -0
- package/dist/session-timeline/turn-activity.js +1 -0
- 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 +1 -0
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +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/button.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 +3 -3
- package/dist/chunk-0j15twx6.js +0 -2
- package/dist/chunk-0pa5t12s.js +0 -2
- package/dist/chunk-0vvn08gg.js +0 -2
- package/dist/chunk-14a9wet3.js +0 -2
- package/dist/chunk-1wc83vxg.js +0 -2
- package/dist/chunk-20bww40d.js +0 -2
- package/dist/chunk-20gtemb9.js +0 -2
- package/dist/chunk-2b185a0a.js +0 -2
- package/dist/chunk-2sy8cs84.js +0 -2
- package/dist/chunk-30g0y24x.js +0 -2
- package/dist/chunk-33mgpcnd.js +0 -2
- package/dist/chunk-4d8q9bpy.js +0 -2
- package/dist/chunk-67txww0x.js +0 -2
- package/dist/chunk-6fht8rx9.js +0 -2
- package/dist/chunk-6ndz2pf9.js +0 -2
- package/dist/chunk-7gaper2w.js +0 -2
- package/dist/chunk-8mvg9a32.js +0 -2
- package/dist/chunk-9x4et210.js +0 -2
- package/dist/chunk-asxwsg2p.js +0 -2
- package/dist/chunk-cj5pkg2y.js +0 -4
- package/dist/chunk-ctedwb0a.js +0 -3
- package/dist/chunk-czahfwp7.js +0 -2
- package/dist/chunk-dnn8064m.js +0 -2
- package/dist/chunk-dqw30cz4.js +0 -2
- package/dist/chunk-e43pfcrt.js +0 -2
- package/dist/chunk-h4sw0pez.js +0 -2
- package/dist/chunk-jmx0awnf.js +0 -2
- package/dist/chunk-maepz12p.js +0 -3
- package/dist/chunk-npjw8dm5.js +0 -2
- package/dist/chunk-qf3a35g4.js +0 -2
- package/dist/chunk-r41p7378.js +0 -2
- package/dist/chunk-rzajhyrq.js +0 -2
- package/dist/chunk-sc746nr6.js +0 -2
- package/dist/chunk-sgbde4dv.js +0 -2
- package/dist/chunk-tgb70x2n.js +0 -2
- package/dist/chunk-vxnjsga5.js +0 -2
- package/dist/chunk-vyzzs0nc.js +0 -7
- package/dist/chunk-w0y1svj7.js +0 -3
- package/dist/chunk-wqwqx3hc.js +0 -2
- package/dist/chunk-wtk721nx.js +0 -2
- package/dist/chunk-x3b4dpac.js +0 -2
- package/dist/chunk-xem94nq0.js +0 -4
- package/dist/chunk-yx02h2ja.js +0 -2
- package/dist/chunk-z8fdvq3v.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{En}from"../chunk-xnmjg8r1.js";import"../chunk-haf9qn5a.js";import"../chunk-zw2q13qg.js";import"../chunk-6bdd2cgs.js";import"../chunk-vmywavgm.js";import"../chunk-2w9f1q84.js";import"../chunk-wpx2bvd0.js";import"../chunk-eyqbvc19.js";import"../chunk-t794afpy.js";import"../chunk-xf91jp39.js";import"../chunk-91qp7sps.js";import"../chunk-qsqyf4y3.js";import"../chunk-3p9j3gmw.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{En as ActivityGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{An}from"../chunk-haf9qn5a.js";export{An as projectActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{W}from"../chunk-34xzrr3s.js";import"../chunk-zw2q13qg.js";import"../chunk-vmywavgm.js";import"../chunk-3p9j3gmw.js";import"../chunk-cg97byvk.js";export{W as AssistantContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{In}from"../chunk-bx1x7t6v.js";import"../chunk-85gdavf5.js";import"../chunk-7w4tjrdw.js";import"../chunk-f3xhtnkz.js";import"../chunk-p8n6rm5h.js";import"../chunk-34xzrr3s.js";import"../chunk-azp1438s.js";import"../chunk-xnmjg8r1.js";import"../chunk-haf9qn5a.js";import"../chunk-48av28r4.js";import"../chunk-zw2q13qg.js";import"../chunk-6bdd2cgs.js";import"../chunk-vmywavgm.js";import"../chunk-sq5zstzq.js";import"../chunk-2w9f1q84.js";import"../chunk-bafntrka.js";import"../chunk-p2khnrm1.js";import"../chunk-q989x2x5.js";import"../chunk-wpx2bvd0.js";import"../chunk-eyqbvc19.js";import"../chunk-t794afpy.js";import"../chunk-xf91jp39.js";import"../chunk-ad32h099.js";import"../chunk-91qp7sps.js";import"../chunk-qsqyf4y3.js";import"../chunk-3p9j3gmw.js";import"../chunk-tcgx9yxg.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{In as AssistantTurn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{It}from"../chunk-7w4tjrdw.js";import"../chunk-34xzrr3s.js";import"../chunk-zw2q13qg.js";import"../chunk-vmywavgm.js";import"../chunk-2w9f1q84.js";import"../chunk-3p9j3gmw.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{It as AsyncQuestions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Sr,Nr,Rr,Ln}from"../chunk-48av28r4.js";import"../chunk-vmywavgm.js";import"../chunk-ad32h099.js";import"../chunk-3p9j3gmw.js";export{Ln as EditedFilesCard,Rr as fileChanges,Sr as filePatch,Nr as patchStatsByFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Sn}from"../chunk-494jkxv9.js";export{Sn as historyTimeline};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j,t,K,re,o,Pe}from"../chunk-vmywavgm.js";import"../chunk-3p9j3gmw.js";export{j as TimelineProvider,Pe as reportError,o as useClientState,re as useStoreState,K as useTimelineClient,t as useTimelineHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mr,Dn,_n}from"../chunk-rd2n48s1.js";import"../chunk-6bdd2cgs.js";import"../chunk-vmywavgm.js";import"../chunk-h2nvgcbs.js";import"../chunk-2w9f1q84.js";import"../chunk-3zj0ka21.js";import"../chunk-raz9hb3h.js";import"../chunk-v958q8hh.js";import"../chunk-76fxyvb0.js";import"../chunk-gdhkb2rz.js";import"../chunk-dhvpffgf.js";import"../chunk-3p9j3gmw.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{_n as TimelineNavigationRail,Mr as navigationAudio,Dn as toNavigationRailItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mn}from"../chunk-azp1438s.js";import"../chunk-xf91jp39.js";import"../chunk-3p9j3gmw.js";export{Mn as TurnPlan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Gn,Wn}from"../chunk-r8k9jd0z.js";export{Gn as questionReply,Wn as questionReplyParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hr,M}from"../chunk-zw2q13qg.js";import"../chunk-vmywavgm.js";import"../chunk-3p9j3gmw.js";import"../chunk-cg97byvk.js";export{M as ResourceContent,hr as chatFileName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Tn}from"../chunk-n6xa65sp.js";import"../chunk-bx1x7t6v.js";import"../chunk-85gdavf5.js";import"../chunk-7w4tjrdw.js";import"../chunk-f3xhtnkz.js";import"../chunk-494jkxv9.js";import"../chunk-p8n6rm5h.js";import"../chunk-8w6ze6pw.js";import"../chunk-34xzrr3s.js";import"../chunk-ez1ac611.js";import"../chunk-azp1438s.js";import"../chunk-xnmjg8r1.js";import"../chunk-haf9qn5a.js";import"../chunk-48av28r4.js";import"../chunk-zw2q13qg.js";import{Mr}from"../chunk-rd2n48s1.js";import"../chunk-6bdd2cgs.js";import{j}from"../chunk-vmywavgm.js";import"../chunk-w522gwhm.js";import"../chunk-m92evp24.js";import"../chunk-r8k9jd0z.js";import"../chunk-mzc51shd.js";import"../chunk-h2nvgcbs.js";import"../chunk-9mcfd41e.js";import"../chunk-sq5zstzq.js";import"../chunk-2w9f1q84.js";import"../chunk-bafntrka.js";import"../chunk-p2khnrm1.js";import"../chunk-q989x2x5.js";import"../chunk-wpx2bvd0.js";import"../chunk-eyqbvc19.js";import"../chunk-t794afpy.js";import"../chunk-xf91jp39.js";import"../chunk-ad32h099.js";import"../chunk-3zj0ka21.js";import"../chunk-raz9hb3h.js";import"../chunk-v958q8hh.js";import"../chunk-76fxyvb0.js";import"../chunk-gdhkb2rz.js";import"../chunk-dhvpffgf.js";import"../chunk-91qp7sps.js";import"../chunk-qsqyf4y3.js";import"../chunk-3p9j3gmw.js";import"../chunk-tcgx9yxg.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{Tn as SessionTimeline,j as TimelineProvider,Mr as navigationAudio};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Terminal } from "@alwith/api";
|
|
1
2
|
import type { VirtualizedTurnListApi } from "../codex/virtualized-turn-list";
|
|
2
3
|
import type { Turn } from "./turns";
|
|
3
4
|
export type TimelineRegistry = {
|
|
@@ -5,6 +6,7 @@ export type TimelineRegistry = {
|
|
|
5
6
|
turns: Turn[];
|
|
6
7
|
api: VirtualizedTurnListApi | null;
|
|
7
8
|
beforeReveal: (() => void) | null;
|
|
9
|
+
terminals?: Record<string, Terminal>;
|
|
8
10
|
};
|
|
9
11
|
export declare const timelineRegistry: import("@alwith/api/client").Store<TimelineRegistry>;
|
|
10
12
|
export declare function publishTimeline(entry: TimelineRegistry): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mt,qn,Vn,jr}from"../chunk-m92evp24.js";export{Vn as clearTimeline,qn as publishTimeline,jr as revealTimelineTurn,Mt as timelineRegistry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pn}from"../chunk-85gdavf5.js";import"../chunk-sq5zstzq.js";export{Pn as projectTurnActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pt,St}from"../chunk-p8n6rm5h.js";import"../chunk-vmywavgm.js";import"../chunk-3p9j3gmw.js";import"../chunk-cg97byvk.js";export{Pt as ErrorCard,St as TurnErrorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$n}from"../chunk-w522gwhm.js";export{$n as capacityRetryDelay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Te}from"../chunk-f3xhtnkz.js";export{Te as formatTurnTime};
|
|
@@ -33,6 +33,7 @@ export type Turn = {
|
|
|
33
33
|
export declare function isMcpStartup(item: Item): item is ToolItem;
|
|
34
34
|
export declare function isSessionStatus(turn: Turn): boolean;
|
|
35
35
|
export declare function groupTurns(session: Session, previous?: Turn[], historyOrder?: HistoryTurnSummary[]): Turn[];
|
|
36
|
+
export declare function isHistoryItem(item: Item): boolean;
|
|
36
37
|
export declare function messageText(item: MessageItem): string;
|
|
37
38
|
export declare function isHistoryInterrupted(turn: Turn): boolean;
|
|
38
39
|
export declare function isTurnInterrupted(turn: Turn): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Er,Hn,On,Nt,D,Ie,Rt,Fn,Bn,zn,Un}from"../chunk-6bdd2cgs.js";import"../chunk-2w9f1q84.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{zn as activeTurnKey,Bn as continuesTurn,On as groupTurns,Ie as isHistoryInterrupted,Nt as isHistoryItem,Er as isMcpStartup,Hn as isSessionStatus,Rt as isTurnInterrupted,D as messageText,Un as turnPresentation,Fn as turnTiming};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Rn}from"../chunk-ez1ac611.js";export{Rn as useTimelineScroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Nn}from"../chunk-8w6ze6pw.js";import"../chunk-zw2q13qg.js";import"../chunk-6bdd2cgs.js";import"../chunk-vmywavgm.js";import"../chunk-r8k9jd0z.js";import"../chunk-2w9f1q84.js";import"../chunk-q989x2x5.js";import"../chunk-3p9j3gmw.js";import"../chunk-tcgx9yxg.js";import"../chunk-5w48y2ad.js";import"../chunk-cg97byvk.js";import"../chunk-xjtqdp82.js";import"../chunk-kjtd3wc3.js";export{Nn as UserMessage};
|
package/dist/ui/alert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B,rn,z,hi}from"../chunk-0vy9fzs3.js";export{B as Alert,hi as AlertAction,z as AlertDescription,rn as AlertTitle};
|
package/dist/ui/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{qr,ze}from"../chunk-tv9wdbxr.js";export{ze as Badge,qr as badgeVariants};
|
package/dist/ui/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vr,e}from"../chunk-cg97byvk.js";export{e as Button,Vr as buttonVariants};
|
package/dist/ui/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Jo,er,tr,nr,yi,or,rr}from"../chunk-w9nr7saa.js";export{Jo as Card,yi as CardAction,or as CardContent,nr as CardDescription,rr as CardFooter,er as CardHeader,tr as CardTitle};
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ce}from"../chunk-11v81zha.js";export{ce as Checkbox};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,
|
|
1
|
+
import{d,xi,Ur,Zo,$r,u,w,q,m,k}from"../chunk-p0ebmb2m.js";import"../chunk-cg97byvk.js";export{d as Dialog,Zo as DialogClose,u as DialogContent,k as DialogDescription,q as DialogFooter,w as DialogHeader,$r as DialogOverlay,Ur as DialogPortal,m as DialogTitle,xi as DialogTrigger};
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ue,ui,me,J,pe,bt,ge,He,Oe,Fe,Jt,Ko,Qo,N,mi}from"../chunk-k6b4cf05.js";export{ue as DropdownMenu,Jt as DropdownMenuCheckboxItem,J as DropdownMenuContent,pe as DropdownMenuGroup,ge as DropdownMenuItem,bt as DropdownMenuLabel,ui as DropdownMenuPortal,Ko as DropdownMenuRadioGroup,Qo as DropdownMenuRadioItem,N as DropdownMenuSeparator,mi as DropdownMenuShortcut,He as DropdownMenuSub,Fe as DropdownMenuSubContent,Oe as DropdownMenuSubTrigger,me as DropdownMenuTrigger};
|
package/dist/ui/empty.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fe,he,Ii,ve,xe,Pi}from"../chunk-5xjm1hab.js";export{fe as Empty,Pi as EmptyContent,xe as EmptyDescription,he as EmptyHeader,Ii as EmptyMedia,ve as EmptyTitle};
|
package/dist/ui/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cn,dn,ar,sr,wi,lr,ki,kt,Ci,Ti}from"../chunk-nhsbjys5.js";import"../chunk-ygebvrv5.js";import"../chunk-kjtd3wc3.js";export{sr as Field,wi as FieldContent,kt as FieldDescription,Ti as FieldError,ar as FieldGroup,lr as FieldLabel,dn as FieldLegend,Ci as FieldSeparator,cn as FieldSet,ki as FieldTitle};
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ue,$e,qe}from"../chunk-mme37xva.js";export{Ue as HoverCard,qe as HoverCardContent,$e as HoverCardTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ln}from"../chunk-w3z37qwe.js";import"../chunk-xjtqdp82.js";export{ln as InputGroupTextarea};
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ir,an,sn,bi}from"../chunk-x8vd2d2g.js";import"../chunk-cg97byvk.js";import{ln}from"../chunk-w3z37qwe.js";import"../chunk-xjtqdp82.js";export{ir as InputGroup,an as InputGroupAddon,sn as InputGroupButton,bi as InputGroupText,ln as InputGroupTextarea};
|
package/dist/ui/kbd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yo,vi}from"../chunk-2q71dv8k.js";export{Yo as Kbd,vi as KbdGroup};
|
package/dist/ui/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{v}from"../chunk-kjtd3wc3.js";export{v as Label};
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{U,R}from"../chunk-5w48y2ad.js";export{U as RadioGroup,R as RadioGroupItem};
|
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{en,pi,tn,nn,Xo,gi,ee,fi,Br,zr}from"../chunk-ta45etnd.js";export{en as Select,Xo as SelectContent,pi as SelectGroup,ee as SelectItem,gi as SelectLabel,zr as SelectScrollDownButton,Br as SelectScrollUpButton,fi as SelectSeparator,nn as SelectTrigger,tn as SelectValue};
|
package/dist/ui/separator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{V}from"../chunk-ygebvrv5.js";export{V as Separator};
|
package/dist/ui/skeleton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{on}from"../chunk-b0v983ch.js";export{on as Skeleton};
|
package/dist/ui/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{de}from"../chunk-0jw4ffzj.js";export{de as Spinner};
|
package/dist/ui/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Be}from"../chunk-y6v59cgf.js";export{Be as Switch};
|
package/dist/ui/textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C}from"../chunk-xjtqdp82.js";export{C as Textarea};
|
package/dist/ui/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Si,ye,be,we}from"../chunk-mxj4s2r8.js";export{ye as Tooltip,we as TooltipContent,Si as TooltipProvider,be as TooltipTrigger};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
},
|
|
307
307
|
"peerDependencies": {
|
|
308
308
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
309
|
-
"@alwith/api": "
|
|
309
|
+
"@alwith/api": "~0.5.3",
|
|
310
310
|
"react": "^19.3.1",
|
|
311
311
|
"react-dom": "^19.3.1",
|
|
312
312
|
"@nyssance/codex-acp-v2": "^0.7.39"
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
},
|
|
337
337
|
"devDependencies": {
|
|
338
338
|
"@agentclientprotocol/sdk": "^2.0.2",
|
|
339
|
-
"@alwith/api": "
|
|
339
|
+
"@alwith/api": "~0.5.3",
|
|
340
340
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
341
341
|
"@nyssance/codex-acp-v2": "^0.7.39",
|
|
342
342
|
"@testing-library/dom": "^10.4.2",
|
package/dist/chunk-0j15twx6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ce}from"./chunk-j4teycge.js";import{D,Pn}from"./chunk-p0cc67an.js";import{t}from"./chunk-yx02h2ja.js";import{On}from"./chunk-cr294svm.js";import{ne,oe,re}from"./chunk-k50475tn.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 yn({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Ce(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(h,{children:[a&&o(D,{"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(ne,{children:[o(oe,{render:o(Pn,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(re,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(On,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
|
|
2
|
-
export{yn};
|
package/dist/chunk-0pa5t12s.js
DELETED
package/dist/chunk-0vvn08gg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Fn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function Et(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function ie(t){return t.type==="array"}function ct(t){return(ie(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{Fn,Et,ie,ct};
|
package/dist/chunk-14a9wet3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-yx02h2ja.js";import{e}from"./chunk-a7mr12yc.js";import{uo}from"./chunk-e43pfcrt.js";import{ae,se,le,ce}from"./chunk-qpz97p1m.js";import{n,y}from"./chunk-vxnjsga5.js";import{Loader2Icon as u}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";function qe({session:t,timeline:l}){let{host:s,client:a}=n(),{t:r}=s,c=o((f)=>f.historyPages[t.id]?.cursor!=null),d=()=>y(s,a.open(t.id,t.cwd)),p=i(uo,{...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(u,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return m(ae,{className:"flex-1",children:[m(se,{children:[i(le,{children:r("conversation.reopen")}),i(ce,{children:r("conversation.detached")})]}),i(e,{onClick:d,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!c)return i(ae,{className:"flex-1",children:m(se,{children:[i(le,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),i(ce,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{qe};
|
package/dist/chunk-1wc83vxg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as n}from"react/jsx-runtime";var e=i(null);function nr({host:t,children:o}){return n(e.Provider,{value:t,children:o})}function a(){let t=r(e);if(t===null)throw Error("Activity host is missing");return t}function h(t){let{Markdown:o}=a();return n(o,{...t})}
|
|
2
|
-
export{nr,a,h};
|
package/dist/chunk-20bww40d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C,rn,Jo,an,er,sn,tr}from"./chunk-cj5pkg2y.js";import{t,J,be,o}from"./chunk-yx02h2ja.js";import{isText as D}from"@alwith/api";import{createStore as E}from"@alwith/api/client";import{nativeTurnId as y}from"@nyssance/codex-acp-v2/client";import{jsx as f,jsxs as R}from"react/jsx-runtime";var I=E({entries:{}});function m(n,s){I.setState((e)=>({entries:{...e.entries,[n]:s}}))}function v(n,s){let e=y(s),r=n.items.findLast((a)=>y(a)!==null),p=n.items.some((a)=>a.kind==="user"&&y(a)===e&&n.turnEndedAt[a.id]!==void 0);return!s.replayed&&e!==null&&r!==void 0&&n.state!=="idle"&&!p&&y(r)===e}function N(n,s){for(let e of n.items){if(e.kind!=="user"||e.echo==="pending")continue;for(let r of[...sn(e._meta),...e.content.filter(D).flatMap((p)=>sn(p._meta))])if(r.questionItemId===s)return r.answer}return}function M({sessionId:n,item:s,question:e,index:r}){let p=J(),{t:a}=t(),x=rn(s.id,r),c=JSON.stringify([n,x]),l=be(I,(i)=>i.entries[c]),u=o((i)=>i.sessions[n]),k=o((i)=>i.connection==="ready"),d=l?.draft??Jo(e),Q=u===void 0?l?.accepted:N(u,x)??l?.accepted,h=u!==void 0&&v(u,s),A=k&&u?.attached&&!u.restoring&&!u.readOnly,g=Q!==void 0?"answered":l?.skipped?"skipped":l?.pending?"submitting":!h?"closed":!A?"unavailable":"pending",q=async()=>{if(I.getState().entries[c]?.pending||g!=="pending")return;let i=p.state.sessions[n];if(i===void 0||!v(i,s)||!i.attached||i.readOnly||i.restoring)return;let w=an(e,d);if(!w.trim())return;let b={questionItemId:x,question:e.title,answer:w};m(c,{draft:d,pending:!0});try{await p.prompt(n,[{type:"text",text:er(b),_meta:{codex:{questionReply:b}}}]),m(c,{draft:d,accepted:w})}catch(S){m(c,{draft:d,error:S instanceof Error?S.message:String(S)})}};if(g==="closed")return R("section",{className:"text-muted-foreground flex min-w-0 flex-col gap-1 text-sm","aria-label":e.title,children:[f("p",{className:"whitespace-pre-wrap",children:e.title}),d.text.trim()&&f("p",{className:"whitespace-pre-wrap",children:d.text}),f("span",{role:"status",className:"text-xs",children:a("asyncQuestion.closed")})]});return f(tr,{question:e,draft:d,status:g,answer:Q,error:g==="pending"?l?.error:void 0,t:a,onChange:(i)=>m(c,{draft:i}),onSkip:()=>m(c,{draft:d,skipped:!0}),onSubmit:()=>{q()}})}function yo({sessionId:n,item:s}){return f("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":s.id,children:C(s._meta).map((e,r)=>f(M,{sessionId:n,item:s,question:e,index:r},rn(s.id,r)))})}
|
|
2
|
-
export{yo};
|
package/dist/chunk-20gtemb9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Be}from"./chunk-vyzzs0nc.js";import{Eo}from"./chunk-2sy8cs84.js";import{t}from"./chunk-yx02h2ja.js";import{L}from"./chunk-h80g3eme.js";import{isContentEntry as p,isEmbeddedResource as a,isResourceLink as f}from"@alwith/api";import{memo as g,useMemo as k}from"react";import{jsx as s,jsxs as u,Fragment as R}from"react/jsx-runtime";function y({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(p).filter((e)=>a(e.content)||f(e.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(L,{block:e.content},`${n.id}:${l}`))]})}var So=g(function({sessionId:r,items:e,terminals:l,streamingThoughtId:m}){let i=t().toolBlock,d=k(()=>e.map((o)=>{let c={...Eo(o,l,o.kind==="thought"&&o.id===m),id:JSON.stringify([r,o.id])};return c.type==="tool_use"&&o.kind==="tool"&&i!==void 0?i(c,o):c}),[r,e,l,m,i]);return u(R,{children:[s(Be,{blocks:d}),e.map((o)=>o.kind==="tool"&&s(y,{item:o},o.id))]})});
|
|
2
|
-
export{So};
|
package/dist/chunk-2b185a0a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Po}from"./chunk-zzwnpk4q.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as w,FileIcon as k}from"lucide-react";import{useEffect as H,useLayoutEffect as I,useRef as T,useState as b}from"react";import{jsx as e,jsxs as g,Fragment as y}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function h(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),i=o.getBoundingClientRect();return s.top>=i.top&&s.right<=i.right&&s.bottom<=i.bottom&&s.left>=i.left}function M({text:n,host:o}){let{t:s,Markdown:i}=o,c=T(null),[l,p]=b(!1),[d,f]=b(!1);return I(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){p(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");p(r.scrollHeight>A*x+1)};t();let u=new ResizeObserver(t);return u.observe(r),()=>u.disconnect()},[]),H(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,u=typeof IntersectionObserver>"u"?null:new IntersectionObserver((a)=>{for(let m of a){let v=m.target;if(!t.has(v))continue;h(v,m.isIntersecting&&m.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let a of t.keys()){if(r.contains(a))continue;u?.unobserve(a),t.delete(a)}for(let a of r.querySelectorAll(L)){if(t.has(a)||a.hasAttribute("inert"))continue;let m=a.getAttribute("aria-hidden");t.set(a,m),h(a,u===null&&R(a,r),m),u?.observe(a)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{u?.disconnect(),C.disconnect();for(let[a,m]of t)h(a,!0,m)}},[l,d]),g("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(i,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&g("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{f((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Yt({text:n,label:o}){let[s,i]=b(!1);return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:o,onClick:()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2000)},children:s?e(N,{className:"codex-message-action-confirmed"}):e(w,{})})}function S({image:n,openImage:o}){let[s,i]=b(!1),c=`data:${n.mimeType};base64,${n.data}`;return g(y,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?i(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(Po,{src:c,alt:"",onClose:()=>i(!1)})]})}function To({message:n,text:o,textParts:s,mentions:i,images:c,messageTime:l,host:p,bubbleStyle:d}){let{t:f,openImage:r}=p;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:g("div",{className:"group/codex-user codex-user-message-group",children:[i.length>0&&e("div",{className:"codex-user-mentions",children:i.map((t)=>g("span",{className:"codex-user-mention",title:t.title,children:[e(k,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(y,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,u)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:p}):g(y,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},u)):e(M,{text:o,host:p})})}),g("div",{className:"codex-user-actions",children:[e(Yt,{text:o,label:f("actions.copy")}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
|
|
2
|
-
export{Yt,To};
|
package/dist/chunk-2sy8cs84.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as g}from"@alwith/api";function Eo(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"&&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{Eo};
|
package/dist/chunk-30g0y24x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var mr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Bn(e){return[...e].toSorted((o,n)=>(mr[o.kind]??99)-(mr[n.kind]??99))}function Kr(e){return e==="allow_once"||e==="allow_always"}function Qr(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{mr,Bn,Kr,Qr};
|
package/dist/chunk-33mgpcnd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-a7mr12yc.js";import{d,u,b,z,m,w}from"./chunk-cw68hvkc.js";import{X}from"./chunk-3m06tqqk.js";import{createContext as C,useContext as v,useState as L,useSyncExternalStore as h}from"react";import{jsx as i,jsxs as p}from"react/jsx-runtime";var f=C(null),x=C(null),D=C(null);function hr({host:t,client:o,children:n}){let[l,a]=L(null);X(l!==null);let{t:c}=t;return i(f,{value:t,children:i(x,{value:o,children:p(D,{value:a,children:[n,i(d,{open:l!==null,onOpenChange:(y)=>!y&&a(null),children:p(u,{children:[p(b,{children:[i(m,{children:c("sessionList.deleteTitle")}),i(w,{children:c("sessionList.deleteDescription")})]}),p(z,{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 g(){let t=v(f);if(t===null)throw Error("Session list host is missing");return t}function s(){let t=v(x);if(t===null)throw Error("Session list client is missing");return t}function bt(){let t=v(D);if(t===null)throw Error("Session list provider is missing");return t}function r(t){let o=s();return h((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{hr,g,s,bt,r,S};
|
package/dist/chunk-4d8q9bpy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-yx02h2ja.js";import{O,$t,F}from"./chunk-4dcagj01.js";import{e}from"./chunk-a7mr12yc.js";import{ae,se,le,ce}from"./chunk-qpz97p1m.js";import{st,n,y}from"./chunk-vxnjsga5.js";import{Ve}from"./chunk-czahfwp7.js";import{qe}from"./chunk-14a9wet3.js";import{ot,rt}from"./chunk-t9vvcy09.js";import{it}from"./chunk-d25r0vq3.js";import{LockIcon as N,UnplugIcon as A}from"lucide-react";import{useMemo as E}from"react";import{jsx as r,jsxs as a}from"react/jsx-runtime";function ir({host:t,client:l,...c}){let m=E(()=>t.openDiff?t:{...t,openDiff:ot},[t]);return a(st,{host:m,client:l,children:[r(R,{...c}),!t.openDiff&&r(rt,{})]})}function R({session:t,header:l,overlay:c,timeline:m,composer:x,welcome:C,children:u,rootRef:w}){let{host:s,client:h}=n(),{t:i}=s,d=o((p)=>p.connection==="ready"),f=o((p)=>p.historyPages[t.id]?.error),v=()=>y(s,h.open(t.id,t.cwd)),D=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return a("div",{"data-chat-drop-zone":!0,ref:w,className:"flex h-full min-h-0 flex-col",children:[l,a("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[c,d&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:a(O,{children:[r(A,{}),r($t,{children:i("conversation.stopped")}),r(F,{children:r(e,{size:"sm",variant:"outline",onClick:v,children:i("conversation.reconnect")})})]})}),t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:a(O,{children:[r(N,{}),r($t,{children:i("conversation.readOnlyTitle")}),a(F,{className:"flex flex-wrap items-center gap-2",children:[i("conversation.readOnlyDescription"),f&&r("p",{role:"alert",className:"text-destructive w-full break-words",children:f}),r(e,{size:"sm",variant:"outline",onClick:v,disabled:!d||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")})]})]})}),D?C??r(ae,{className:"flex-1",children:a(se,{children:[r(le,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),r(ce,{children:i("conversation.welcomeDescription")})]})}):r(qe,{session:t,timeline:m}),r(it,{sessionId:t.id}),x??r(Ve,{session:t})]}),u]})}
|
|
2
|
-
export{ir};
|
package/dist/chunk-67txww0x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-yx02h2ja.js";import{n}from"./chunk-vxnjsga5.js";import{codexExtensionCapabilities as T,codexTurnId as _,composerPrediction as q}from"@nyssance/codex-acp-v2/client";import{useEffect as x,useRef as v,useState as P}from"react";function Ye(e,p,u,f){let{client:g}=n(),b=o((i)=>T(i.agent).composerPredictions),y=e.items.findLast((i)=>i.kind==="user"),r=_(y?._meta),t=JSON.stringify([e.id,r,e.configOptions]),l=v(null),d=v(!1);x(()=>(d.current=!0,()=>{d.current=!1}),[]);let a=JSON.stringify([e.id,r]),[c,C]=P(null),[k,I]=P(null),m=f&&b&&p&&e.state==="idle"&&e.lastStopReason==="end_turn"&&!y?.replayed&&r!==null;x(()=>{if(!m||u||c===t||l.current?.source===a||r===null)return;l.current={key:t,source:a},g.requestPrediction(e.id,r).catch((i)=>{if(d.current&&l.current?.key===t)I({key:t,message:i instanceof Error?i.message:String(i)})})},[g,m,u,c,t,a,e.id,r]);let s=q(e._meta),S=m&&!u&&c!==t&&l.current?.key===t&&s?.sourceTurnId===r,E=S&&s.result.type==="completed"?s.result.text:null,O=f&&p&&e.state==="idle"&&!u&&c!==t?k?.key===t?k.message:S&&s.result.type==="failed"?"Prediction failed":null:null;return{text:E,error:O,invalidate:()=>C(t)}}
|
|
2
|
-
export{Ye};
|
package/dist/chunk-6fht8rx9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i,T,Ze}from"./chunk-0n82kdek.js";var Nn=5000;function ee(t){return"pastedText"in t}function Cr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Te(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;T(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Cr(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),Ze(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function Xe(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<Nn)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};T(e,(a)=>[...a,s]),Te(e,s,n)}
|
|
2
|
-
export{Nn,ee,Cr,Te,Xe};
|
package/dist/chunk-6ndz2pf9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{qo}from"./chunk-pb6xtb3n.js";import{useCallback as Te,useEffect as P,useLayoutEffect as xe,useMemo as Q,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as Me}from"react/jsx-runtime";var ye=4,me=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((w)=>[w,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let O=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,w]of h.entries()){let S=v.get(w),m=n.at(-1);if(!m||S!==void 0&&S!==m.key||S===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=S!==void 0&&!B.has(S)?S:O++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(w)}return n}function ge(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function $o({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:O,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[w,S]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[W,A]=E(null),[X,U]=E(!1),[_,fe]=E(()=>new Set),[pe,ve]=E(!0),[be,j]=E(null),{installUnlock:Z,preload:ee,playSequence:te}=h,K=I(null),M=I(null),R=I(!1),H=I(null),L=I(0),N=I(null),G=I(new Set),V=Q(()=>p.map((e)=>e.id).join("\x00"),[p]),F=I(p);F.current=p;let ne=I(_),ie=I(w),re=I({itemIdsKey:V,scrollRoot:n});if(re.current.scrollRoot!==n)L.current+=1,re.current={itemIdsKey:V,scrollRoot:n};let g=Q(()=>v===void 0?p.filter((e)=>_.has(e.id)):p,[v,p,_]),se=Q(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),z=I({ids:"",groups:[]}),ae=g.map((e)=>e.id).join("\x00");if(z.current.ids!==ae)z.current={ids:ae,groups:we(g.map((e)=>e.id),z.current.groups)};P(()=>Z(),[Z]),P(()=>()=>{if(L.current+=1,N.current!==null)clearTimeout(N.current)},[]),P(()=>{y(null),U(!1),A(null),M.current=null,R.current=!1,H.current=null,j(null),G.current.clear()},[n]),P(()=>{ee()},[ee]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(F.current.map((o)=>o.id)),r=()=>{let o=new Set(t.values()),d=F.current.filter((f)=>o.has(f.id)).map((f)=>f.id),u=d.findIndex((f)=>e.has(f));if(u===-1)return;let b=u;for(let f=u+1;f<d.length;f++)if(e.has(d[f]))b=f;let k=new Set(d.slice(u,b+1));if(ge(ie.current,k))return;ie.current=k,S(k)},s=new IntersectionObserver((o)=>{for(let d of o){let u=t.get(d.target);if(d.isIntersecting)e.add(u);else e.delete(u)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),a=()=>{let o=new Set,d=new Set;for(let u of n.querySelectorAll("[data-content-search-unit-key]")){let b=u.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||o.has(b))continue;o.add(b);let k=u.closest("[data-turn-key]"),f=k===null||d.has(k)?u:k;if(d.add(f),t.has(f))continue;t.set(f,b),s.observe(f)}for(let u of t.keys()){if(d.has(u))continue;s.unobserve(u),e.delete(t.get(u)),t.delete(u)}if(r(),ge(ne.current,o))return;ne.current=o,fe(o)};a();let l=new MutationObserver((o)=>{if(o.some((u)=>[...u.addedNodes,...u.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))a()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),s.disconnect()}},[V,n,c]);let J=g.find((e)=>w.has(e.id))?.id??g.at(-1)?.id;xe(()=>{let e=K.current;if(e===null||M.current!==null||J===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(J)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[J,V]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),s=e.getBoundingClientRect();if(r.width===0||s.width===0)return;let a=n.offsetWidth>0?r.width/n.offsetWidth:1;ve((s.left-r.left)/a>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let Ie=Te(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),s=r(),a=s!==null&&n.clientHeight>0&&s.closest("[data-turn-key]")!==null&&Math.abs(s.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((s===null||a)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;s=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(s===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;s.scrollIntoView({behavior:l?"instant":t,block:"start"}),s.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]")?.animate?.([{backgroundColor:"color-mix(in srgb, var(--foreground) 14%, transparent)"},{backgroundColor:"color-mix(in srgb, var(--foreground) 14%, transparent)",offset:0.35},{backgroundColor:"transparent"}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})},[x,v,n]);if(g.length<ye||!pe)return null;let Y=()=>{if(N.current!==null)clearTimeout(N.current);N.current=null},oe=(e,t=!1)=>{if(Y(),C===void 0||e.isLoaded!==!1||G.current.has(e.turnKey))return;let i=()=>{N.current=null,G.current.add(e.turnKey),C(e).catch(()=>G.current.delete(e.turnKey))};if(t)i();else N.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,ue=(e,t="smooth")=>{Ie(e,t).catch((i)=>{if(B)B(i);else throw i})},le=g.findIndex((e)=>e.id===(W??be)),de=K.current,he=m===null||!de?.contains(m.button)?0:Se(de,m.button),ce=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,s=g.findIndex((a)=>a.id===r);return{button:t,item:g[s],index:s}},D=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,A(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(qo,{open:X,onOpenChange:U,side:"inline-end",sideOffset:0,align:"center",alignOffset:he,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":W===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Y();let t=ce(e.target instanceof Element?e.target:null);if(t===null)return;R.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),A(t.item.id),y(t),U(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=ce(e.target instanceof Element?e.target:null);if(l!==null){j(l.item.id);let o=H.current;if(o!==null&&o!==l.index)te(o,l.index,se);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),oe(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){D(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/me))),a={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(a.item.id===t.itemId)return;te(t.itemIndex,a.index,se),H.current=a.index,M.current={...t,itemId:a.item.id,itemIndex:a.index},R.current=!0,A(a.item.id),y(a),ue(a.item,"instant")},onPointerUp:D,onPointerCancel:D,onLostPointerCapture:D,onPointerLeave:()=>{if(Y(),j(null),H.current=null,M.current===null&&!X)y(null)},children:T("div",{className:"flex flex-col",children:z.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*me},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,s=Math.abs(r-le),a=le===-1||s>3?void 0:[1,0.7,0.4,0.2][s];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":W===t.id?"":void 0,"aria-current":w.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(R.current){R.current=!1;return}let o={button:l.currentTarget,item:t,index:r};y(o),U(!0),ue(t)},onFocus:(l)=>{oe(t,!0),y({button:l.currentTarget,item:t,index:r}),U(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:a===void 0?void 0:{"--marker-progress":a}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:O?O(q):Ne(Me,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Se(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
-
export{$o};
|
package/dist/chunk-7gaper2w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var to={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},no={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function xt({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=to[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",no.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
-
export{to,no,xt};
|
package/dist/chunk-8mvg9a32.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l}from"./chunk-1hy64ewz.js";import{_}from"./chunk-qbdqh38y.js";import{g}from"./chunk-33mgpcnd.js";import{pt}from"./chunk-mk10tgjk.js";import{R}from"./chunk-aaqk0jrt.js";import{ft,ht}from"./chunk-n3raktzz.js";import{formatDistanceToNowStrict as L}from"date-fns";import{enUS as x,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as w}from"lucide-react";import{useEffect as h,useState as A}from"react";import{jsx as o,jsxs as C,Fragment as D}from"react/jsx-runtime";var S={en:x,"zh-CN":z};function _e(t,a){let i=a==="zh-CN"?S["zh-CN"]:S.en;return L(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}=g(),f=ht(),y=ft();h(()=>{f(n)},[n,f]);let[H,p]=A(t.title??"");h(()=>{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?_e(t.updatedAt,I.language):null,v=[];if(N!==null)v.push({icon:o(E,{className:"size-3.5"}),text:N});let s=u&&o(u,{cwd:t.cwd,onOpened:y});return o(pt,{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(R,{className:"min-w-0 flex-1",children:t.title??r("sessionList.untitled")})}),i]}),titleIcon:o(w,{className:"size-3.5"}),details:v,actions:s||a!==void 0?C(D,{children:[s,s&&a!==void 0&&o(_,{}),a]}):void 0})}
|
|
2
|
-
export{_e,mt};
|
package/dist/chunk-9x4et210.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D}from"./chunk-p0cc67an.js";import{t}from"./chunk-yx02h2ja.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function fn({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(D,{"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{fn};
|
package/dist/chunk-asxwsg2p.js
DELETED
package/dist/chunk-cj5pkg2y.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-a7mr12yc.js";import{f}from"./chunk-ek06eyp4.js";import{V,M}from"./chunk-zcrct67v.js";import{k}from"./chunk-ncekagm6.js";import{useId as w}from"react";import{jsx as r,jsxs as p,Fragment as Q}from"react/jsx-runtime";function a(n){return n!==null&&typeof n==="object"&&!Array.isArray(n)}function C(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 rn(n,s){return JSON.stringify(["request_user_input_async",n,s])}function Jo(n){return{selected:n.options?.length?0:null,text:""}}function an(n,s){return s.selected===null?s.text:n.options?.[s.selected]??""}function er(n){return`<send_user_message_question_reply>
|
|
2
|
-
${JSON.stringify([n])}
|
|
3
|
-
</send_user_message_question_reply>`}function sn(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:c})=>({questionItemId:t,question:l,answer:c}))}function tr({question:n,draft:s,status:i,answer:t,error:l,onChange:c,onSubmit:m,onSkip:x,t:o}){let y=w(),d=i==="pending",b=i==="answered"||i==="skipped";return p("section",{"aria-labelledby":`${y}-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:`${y}-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")}):p(Q,{children:[(n.options?.length??0)>0&&p(V,{"aria-labelledby":`${y}-title`,disabled:!d,value:s.selected===null?"other":String(s.selected),onValueChange:(u)=>c({...s,selected:u==="other"?null:Number(u)}),children:[n.options?.map((u,g)=>p(f,{className:"flex items-start gap-2 text-sm",children:[r(M,{value:String(g)}),r("span",{className:"whitespace-pre-wrap",children:u})]},g)),p(f,{className:"flex items-center gap-2 text-sm",children:[r(M,{value:"other"}),o("asyncQuestion.other")]})]}),r(k,{"aria-label":o("asyncQuestion.answer"),placeholder:o("asyncQuestion.answer"),value:s.text,readOnly:!d,onChange:(u)=>c({selected:null,text:u.target.value})}),l&&r("p",{role:"alert",className:"text-destructive text-sm",children:l}),p("div",{className:"flex flex-wrap items-center gap-2",children:[r(e,{size:"sm",disabled:!d||an(n,s).trim().length===0,onClick:m,children:o(i==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),r(e,{size:"sm",variant:"ghost",disabled:!d,onClick:x,children:o("asyncQuestion.skip")}),(i==="closed"||i==="unavailable")&&r("span",{role:"status",className:"text-muted-foreground text-xs",children:o(`asyncQuestion.${i}`)})]})]})]})}
|
|
4
|
-
export{C,rn,Jo,an,er,sn,tr};
|
package/dist/chunk-ctedwb0a.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Kt,Qt}from"./chunk-maepz12p.js";import{C}from"./chunk-cj5pkg2y.js";import{t}from"./chunk-yx02h2ja.js";import{So}from"./chunk-20gtemb9.js";import{Ct}from"./chunk-x71x2atx.js";import{yo}from"./chunk-20bww40d.js";import{wo}from"./chunk-w92s8704.js";import{Ao}from"./chunk-rzajhyrq.js";import{Jt,en}from"./chunk-rqbbb37p.js";import{ze}from"./chunk-zwvyfjj8.js";import{jo,q,Ue,Qo}from"./chunk-dqw30cz4.js";import{isContentEntry as le,isEmbeddedResource as X,isImage as Y,isResourceLink as de,isText as ce}from"@alwith/api";import{codexMessageError as J,codexTurnError as D,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as pe,SparklesIcon as ue}from"lucide-react";import{memo as fe}from"react";import{jsx as s,jsxs as m,Fragment as M}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 p({sessionId:r,entry:n,terminals:l,streaming:o,streamingThoughtId:T}){let{t:a}=t();switch(n.kind){case"activity":return s(So,{sessionId:r,items:n.items,terminals:l,streamingThoughtId:T});case"text":return s(Ct,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Ao,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Jt,{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(ue,{"aria-hidden":"true"}),s("span",{children:n.item.status==="completed"?a("stream.codex.contextCompacted"):a("timeline.compacting")})]})}}function ye({sessionId:r,turn:n,terminals:l,active:o,blocked:T=!1,continued:a=!1,edits:W=n.edits,activityItems:I=n.items,workStartedAt:Z=n.startedAt,isLast:F,error:u,interrupted:O,retry:P,retrying:g,answerActions:G,footer:ee}){let{t:d}=t(),w=n.errors.map((e)=>{let i=J(e);if(i===null)throw Error("Turn error item is missing its diagnostics");let x=P?.turnId===ge(e)?P:void 0;return s(en,{error:i,retry:x},`${e.id}:${x?.delaySeconds??"manual"}`)});if(F&&u!==null&&!n.errors.some((e)=>{let i=J(e);return i!==null&&i.stopReason===u.stopReason&&D(i).message===D(u).message}))w.push(s(en,{error:u},"current-run-error"));let N=w.length>0?s("div",{className:"codex-turn-errors",children:w}):null,A=n.work.filter((e)=>e.kind==="compaction"&&e.item.status==="completed"),b=n.work.filter((e)=>!A.includes(e)),te=A.length>0&&b.length===0&&n.final.length===0;if(jo(n)||te)return m(M,{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(p,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),N]});let v=Ue(n),f=I.findLast((e)=>e.kind!=="user"),E=o&&f?.kind==="thought"?f.id:null,K=n.final.filter((e)=>C(e._meta).length===0).map(q).join(`
|
|
2
|
-
`),y=o?null:ze(n,"assistant"),B=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),H=new Set(n.final.flatMap((e)=>e.content.map(U).filter((i)=>i!==null))),R=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(le).flatMap((i,x)=>{let c=i.content,ae=e.name==="image_generation"&&Y(c),me=e.toolKind!=="read"&&e.toolKind!=="search"&&(de(c)||X(c)&&("blob"in c.resource));if(!ae&&!me)return[];let L=U(c);if(L!==null){if(H.has(L))return[];H.add(L)}return[{key:`${e.id}:${x}`,block:c}]})}),h=n.final.some((e)=>C(e._meta).length===0&&e.content.some((i)=>!ce(i)||i.text.trim().length>0)),ne=B.length>0||R.length>0||h||n.final.some((e)=>C(e._meta).length>0),k=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=b.filter((e)=>k===-1||S(e)<k),V=b.filter((e)=>k!==-1&&S(e)>k),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...V.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,i)=>e.index-i.index),ie=o&&(!h||V.length>0),oe=I.some((e)=>e.kind==="tool"&&(e.status==="pending"||e.status==="in_progress")),_=f?._meta?.codex,re=f?.kind==="assistant"&&!(typeof _==="object"&&_!==null&&("messageCompletedAt"in _)),j=ie&&!T&&!oe&&!re&&E===null&&g===void 0,z=Qo({...n,items:I});return m(M,{children:[s(Qt,{stateKey:JSON.stringify([r,n.key]),active:o&&!h,defaultExpanded:O||v||o&&!h,...z,startedAt:z.startedAt??Z,loading:j&&n.work.length===0,work:a?[]:Q.map((e)=>s(p,{sessionId:r,entry:e,terminals:l,streaming:o,streamingThoughtId:E},e.key)),answer:ne||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[a&&Q.map((e)=>s(p,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(p,{sessionId:r,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:E},e.entry.key);let i=e.item;return C(i._meta).length>0?s(yo,{sessionId:r,item:i},i.id):s(Ct,{content:i.content,messageId:i.id,streaming:o},i.id)}),B.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(pe,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),R.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:R.map((e)=>s(Ct,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),!o&&!a&&(K.trim().length>0?s(Kt,{text:K,isMostRecentTurn:F,time:y,afterCopy:G}):m("div",{className:"flex items-center gap-0.5",children:[G,y&&s("span",{className:"codex-user-time ms-1",title:y.full,children:y.short})]}))]}):null,footer:m(M,{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")})}),A.map((e)=>s(p,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),ee,W.length>0&&!o&&!a&&s(wo,{items:W}),(O||v)&&s("div",{className:"codex-interrupted-turn",role:"status",children:d(v?"timeline.historyInterrupted":"timeline.interrupted")}),!o&&N]})}),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&&N]})}var vo=fe(ye);
|
|
3
|
-
export{vo};
|
package/dist/chunk-czahfwp7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{In,v}from"./chunk-j4teycge.js";import{pn}from"./chunk-maj7m5s7.js";import{Y}from"./chunk-0pa5t12s.js";import{bn,wn,Cn,kn,Tn,D}from"./chunk-p0cc67an.js";import{cn,dn}from"./chunk-zy6338m6.js";import{kt}from"./chunk-dzydvx7r.js";import{t,o}from"./chunk-yx02h2ja.js";import{n}from"./chunk-vxnjsga5.js";import{Pt}from"./chunk-asxwsg2p.js";import{i,Mn,T,Je}from"./chunk-0n82kdek.js";import{je}from"./chunk-mgakm5yv.js";import{ee,Xe}from"./chunk-6fht8rx9.js";import{et,nt}from"./chunk-jf5651fz.js";import{Rn}from"./chunk-hr9d9zpb.js";import{Ke}from"./chunk-z8fdvq3v.js";import{vn}from"./chunk-fqj76wq8.js";import{Qe}from"./chunk-tj44vjyv.js";import{Ye}from"./chunk-67txww0x.js";import{fn}from"./chunk-9x4et210.js";import{yn}from"./chunk-0j15twx6.js";import{We}from"./chunk-eyre28p1.js";import{hasFuzzyFileSearch as Mt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Rt}from"lucide-react";import{useCallback as S,useEffect as Et,useLayoutEffect as q,useMemo as J,useRef as K,useState as N}from"react";import{jsx as c,jsxs as b}from"react/jsx-runtime";var St=["image/png","image/jpeg","image/webp","image/gif"],Q=[];async function Nt(e){let d=await(await fetch(e.url)).blob();return new Promise((P,G)=>{let I=new FileReader;I.onerror=()=>G(I.error),I.onload=()=>{let O=I.result;P(O.slice(O.indexOf(",")+1))},I.readAsDataURL(d)})}function Ot(e){let{t:d}=t(),P=v();return c(D,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>P.openFileDialog(),...e,children:c(Rt,{className:"size-4"})})}function Ve({session:e,onSubmit:d,onHandOff:P,modelSelector:G,modelMenu:I,inputHeader:O,actions:ut,children:ft,attachmentPolicy:ht,predictions:gt=!0,disabled:xt=!1,preparing:Z=!1,allowPendingInput:yt=!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,B]=N(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:M}=tt,[w,bt]=N(()=>i.get(e.id)?.attachments??Q),[h,L]=N(()=>i.get(e.id)?.mentions??[]),W=w.some((r)=>ee(r)&&r.pastedText.status!=="ready"),[C,rt]=N(!1),[z,vt]=N(!1),[V,ot]=N(!1),u=K(null),at=K(null),a=K(tt),U=S((r)=>{at.current?.(),a.current={text:r,revision:a.current.revision+1},B(a.current)},[]),it=J(()=>({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,x){if(p.target!==e.id||p.revision!==a.current.revision)return null;a.current={text:g,revision:a.current.revision+1},B(a.current);let l=u.current?.getTextarea();if(l!==null&&l!==void 0)l.value=g,l.setSelectionRange(x[0],x[1]);return{target:e.id,...a.current,selection:x}}}),[e.id]),_=K(null),ct=S((r)=>(_.current=r,()=>{if(_.current===r)_.current=null}),[]),pt=e.state!=="idle",f=!xt&&!Z&&e.attached&&!e.restoring&&!e.readOnly,R=!e.readOnly&&(yt||f),E=Ye(e,f&&!C&&!z&&!W&&!V,M.length>0||w.length>0||h.length>0,gt),mt=E.invalidate;q(()=>{i.set(e.id,{text:M,attachments:w,mentions:h,modelId:i.get(e.id)?.modelId??null})},[e.id,M,w,h]),q(()=>Mn(e.id,bt),[e.id]),q(()=>Je(e.id,(r)=>{if(!R||C)throw Error("The composer cannot take text now; try again later");if(M.length||w.length||h.length)throw Error("The composer already has a draft; send or clear it first");U(r)}),[e.id,R,C,M,w,h,U]);let st=o((r)=>Mt(r.agent)),It=J(()=>st&&f?async(r)=>je((await A.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[A,st,f,e.cwd]),X=S((r)=>{L((p)=>p.includes(r)?p:[...p,r])},[]);Et(()=>{u.current?.focus()},[]);let lt=S(async({text:r,files:p})=>{let g=r.trim();if(g.length===0&&p.length===0&&h.length===0)return;let x=_.current;rt(!0);let l=i.get(e.id),At=a.current.revision,j=null;try{let y=[];for(let m of h){let H={kind:"file",absPath:m};y.push({type:"resource_link",uri:et(H),name:nt(H)})}if(g.length>0)y.push({type:"text",text:g});for(let m of p)if(ee(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");y.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else y.push({type:"image",data:await Nt(m),mimeType:m.mediaType});if(a.current.revision===At&&i.get(e.id)===l)a.current={text:"",revision:a.current.revision+1},j=a.current.revision,B(a.current),L([]),T(e.id,()=>Q),i.set(e.id,{text:"",attachments:Q,mentions:[],modelId:l?.modelId??null}),u.current?.resetHeight();if(d)if(x===null)await d(y);else await d(y,(m)=>{if(x.signal.aborted||_.current!==x)return;x.accept(m),P?.(e.id,m)});else if(x===null)await A.prompt(e.id,y);else{let m=await A.prompt(e.id,y);x.accept(m)}mt();for(let m of l?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((H)=>H.id===m.id))URL.revokeObjectURL(m.url)}catch(y){if(l&&j!==null&&a.current.revision===j&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:l.text,revision:j+1},B(a.current),L(l.mentions),i.set(e.id,l),T(e.id,()=>l.attachments);throw y}finally{rt(!1),u.current?.focus()}},[A,e.id,h,d,P,mt]),wt=()=>{A.cancel(e.id).catch(k)},Ct=S((r)=>{let p=r.code==="max_total_size"?Object.assign(Error(s("composer.imageTooLargeTitle")),{description:s("composer.imageTooLargeDescription",{mb:Y})}):Object.assign(Error(s("composer.unsupportedAttachmentTitle")),{description:s("composer.unsupportedAttachmentDescription")});k(p)},[k,s]),Tt=J(()=>({session:e,ready:f,inputReady:R,sending:C,textareaRef:u,draft:it,interruptRef:at,observeReceipts:ct,addMention:X,setAdding:vt,handsFree:d===void 0||P!==void 0}),[e,f,R,C,it,ct,X,d,P]),dt=F.writeTextAttachment;return c(Pt,{value:Tt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:b("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}),b(In,{attachmentPolicy:ht,value:M,revision:a.current.revision,onValueChange:U,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},B(a.current)},attachments:w,onAttachmentsChange:(r)=>T(e.id,()=>r),children:[c(pn,{handleRef:u,commands:e.commands,searchFiles:It,onMention:X,onSearchError:k,forcedOpen:V,onForcedOpenChange:ot,emptyLabel:s("composer.noCommands"),fileStatusLabels:{loading:s("composer.searchingFiles"),empty:s("composer.noMatchingFiles")}}),b(bn,{globalDrop:!0,multiple:!0,accept:St.join(","),onError:Ct,onSubmit:lt,onSubmitAsync:lt,onSubmitError:k,canSubmit:()=>f&&!C&&!z&&!W?!0:"chat_not_ready",className:"relative z-10",children:[ft,b(Cn,{className:"px-3 pt-3 pb-0 empty:hidden",children:[z&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:s("composer.addingFiles")}),c(Rn,{mentions:h,onRemove:(r)=>L((p)=>p.filter((g)=>g!==r))}),c(dn,{children:(r)=>ee(r)?c(vn,{data:r,sessionId:e.id}):c(cn,{data:r,t:s})})]}),b(wn,{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(),U(E.text)},children:[c(kt,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,bashMode:!1,disabled:!R,onPasteCapture:dt?(r)=>Xe(r,e.id,s("composer.pastedTextFilename"),dt):void 0,placeholder:E.text||(pt?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(kn,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:b("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[b("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Ot,{className:"text-foreground",disabled:!R}),c(fn,{textareaRef:u,menuOpen:V,onOpenChange:ot,disabled:!f||e.commands.length===0}),c(Qe,{sessionId:e.id,options:e.configOptions,disabled:!f})]}),b(Tn,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(We,{session:e}),G??c(Ke,{...I,sessionId:e.id,options:e.configOptions,disabled:!f}),ut,c(yn,{active:pt,sending:C||Z||z,ready:f&&!W,hasMentions:h.length>0,onStop:wt})]})]})})]})]})]})})})}
|
|
2
|
-
export{Ve};
|
package/dist/chunk-dnn8064m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createStore as l}from"@alwith/api/client";var ln=l({sessionId:null,turns:[],api:null,beforeReveal:null});function or(e){ln.setState(e)}function rr(e){if(ln.getState().sessionId===e)ln.setState({sessionId:null,turns:[],api:null,beforeReveal:null})}async function ki(e,t,n){let i=ln.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{ln,or,rr,ki};
|
package/dist/chunk-dqw30cz4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C}from"./chunk-cj5pkg2y.js";import{textOf as v,turns as A}from"@alwith/api";import{codexMessageError as S,nativeTurnId as f}from"@nyssance/codex-acp-v2/client";function Br(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 x(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function jo(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&x(e))}function b(t,e){let n=t.work.at(-1),r=n?.kind==="activity"?n.items.at(-1):void 0;if(n?.kind==="activity"&&r!==void 0&&t.items.indexOf(e)===t.items.indexOf(r)+1){n.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function T(t,e,n){if(t.kind!=="tool"){e.push(t);return}let r=n.get(t.id);if(r===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(r);for(let i of t.children)T(i,e,n)}function _(t,e,n){switch(e.kind){case"user":break;case"assistant":{if(S(e)!==null){let i=f(e),u=t.errors.findIndex((l)=>i!==null&&f(l)===i);if(u===-1)t.errors.push(e);else t.errors[u]=e;break}let r=E(e);if(C(e._meta).length>0||r==="final_answer")t.final.push(e);else if(r==="commentary"||x(e)||r===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":b(t,e);break;case"tool":if(b(t,e),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 Ko(t,e=[],n=[]){let r=new Map(e.map((o)=>[o.key,o])),i=new Map(t.items.filter((o)=>o.kind==="tool").map((o)=>[o.id,o])),u={...t,items:t.items.filter((o)=>!Br(o))},l=new Map(n.map((o,s)=>[o.turnId,s])),a=[],m=[a],k,y=null;for(let o of u.items){let s=f(o),c=l.get(s??"");if(s!==null&&y!==null&&s!==y||c!==void 0&&k!==void 0&&c>k+1)a=[],m.push(a);if(a.push(o),s!==null||o.kind==="user")y=s;if(c!==void 0)k=c}return m.flatMap((o)=>A({...u,items:o})).map((o)=>{let s=o.prompt===null?[]:[o.prompt];for(let d of o.entries)T(d,s,i);let c=s[0];if(c===void 0)throw Error("A turn without items");let I=`turn:${c.kind}:${c.id}`,h=o.endedAt??Math.max(...s.map((d)=>d.at)),p=r.get(I);if(p!==void 0&&j(p.items,s)&&p.endedAt===h)return p;let g={key:I,user:o.prompt,work:[],final:[],errors:[],edits:[],startedAt:o.startedAt??c.at,endedAt:h,replayed:s.every((d)=>d.replayed),items:s},w=s.findLastIndex((d)=>d.kind!=="user"&&d.kind!=="compaction");return s.forEach((d,M)=>_(g,d,M<w)),g})}function j(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function q(t){return v(t.content)}function Ue(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function on(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Qo(t){let e=(i)=>{for(let u of t.items){let l=u._meta?.codex;if(typeof l!=="object"||l===null)continue;let a=l[i];if(typeof a==="number"&&Number.isFinite(a)&&a>=0)return a}return},n=e("workDurationMs"),r=e("turnDurationMs");return{durationMs:n??r,durationKind:n===void 0&&r!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Xo(t,e,n){if(n?.user==null)return!1;let r=e.items.map(f).find((u)=>u!==null),i=f(n.user);if(r!==void 0&&i!==null)return r===i;return 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 Yo(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let r=e[n];if(r.items.some((i)=>i.kind!=="user"))break;if(!Xo(t,e[n-1],r))break;n--}return e[n]?.key}function Zo(t,e,n){let r=n,i=n;while(r>0&&Xo(t,e[r-1],e[r]))r--;while(i+1<e.length&&Xo(t,e[i],e[i+1]))i++;let u=e.slice(r,i+1),l=u.findLast((a)=>a.items.some((m)=>m.kind!=="user"))??u[0];return{continued:e[n]!==l,items:u.flatMap((a)=>a.items),edits:u.flatMap((a)=>a.edits),startedAt:u[0].startedAt}}
|
|
2
|
-
export{Br,jo,Ko,q,Ue,on,Qo,Xo,Yo,Zo};
|
package/dist/chunk-e43pfcrt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{mo}from"./chunk-pcngn73n.js";import{e}from"./chunk-a7mr12yc.js";import{Z,t,J,o,$e}from"./chunk-yx02h2ja.js";import{ze}from"./chunk-zwvyfjj8.js";import{Ko,Ue,on,Yo,Zo}from"./chunk-dqw30cz4.js";import{vo}from"./chunk-ctedwb0a.js";import{bo}from"./chunk-w2tmm1va.js";import{Ho,Oo}from"./chunk-691gxr2e.js";import{or,rr}from"./chunk-dnn8064m.js";import{Io}from"./chunk-hmtgx7fw.js";import{_o}from"./chunk-aygzz2yg.js";import{ko}from"./chunk-xem94nq0.js";import{codexExtensionCapabilities as Le,codexMessageError as Ce,codexRetryNotice as Me,codexTurnError as Ve,nativeTurnId as me}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Be}from"lucide-react";import{useCallback as V,useEffect as A,useLayoutEffect as pe,useMemo as fe,useRef as w,useState as _}from"react";import{flushSync as ge}from"react-dom";import{jsx as l,jsxs as L}from"react/jsx-runtime";var ve=24;function qe(n){let m=Math.max(0,n.turnTopPx-ve),v=Math.max(0,n.scrollHeightPx-n.viewportHeightPx),d=m-v;return{scrollTopPx:m,spacerPx:d>0?n.spacerPx+d:n.spacerPx}}function Oe({viewportRef:n,viewportProps:m,children:v}){return l("div",{ref:n,...m,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function Fe({sessionId:n,turnId:m,root:v,error:d,connected:S}){let C=w(null),b=J(),{t:N}=t(),R=V(()=>{b.loadHistoryTurn(n,m).catch(()=>{})},[b,n,m]);return A(()=>{if(!v||!C.current||!S||d)return;let B=new IntersectionObserver((T)=>{if(T.some((P)=>P.isIntersecting))B.disconnect(),R()},{root:v,rootMargin:"800px 0px"});return B.observe(C.current),()=>B.disconnect()},[v,S,d,R]),l("div",{ref:C,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":m,"data-markdown-pending":!0,children:d?L("div",{className:"flex flex-col items-center gap-2",children:[l("p",{role:"alert",className:"text-destructive text-xs",children:d}),l(e,{variant:"outline",size:"sm",onClick:R,disabled:!S,children:N("timeline.navigationRetry")})]}):L("div",{role:"status","aria-label":N("timeline.navigationLoading"),className:"space-y-3",children:[l("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),l("div",{className:"bg-muted h-3 w-4/5 rounded"}),l("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function Ke(n,m){let v=w([]),d=w(null);if(d.current?.items!==n.items||d.current.ended!==n.turnEndedAt||d.current.usage!==n.turnUsage||d.current.historyOrder!==m)d.current={items:n.items,ended:n.turnEndedAt,usage:n.turnUsage,historyOrder:m,turns:Ko(n,v.current,m)};let S=d.current.turns;return v.current=S,S}function uo(n){return l(Z,{host:n.host,client:n.client,children:l(_e,{...n})})}function _e({session:n,leading:m,afterTurn:v,answerActions:d,turnFooter:S,renderUserMessage:C,insert:b,navigation:N,anchorNewTurn:R=!1,Viewport:B=Oe}){let T=J(),P=t(),y=o((r)=>r.historyNavigation[n.id]),c=Ke(n,y?.turns),M=c.at(-1)?.key,Te=Yo(n,c),x=n.state!=="idle",ye=fe(()=>bo(c,y),[c,y]),xe=fe(()=>N===void 0?[]:Ho(c,n.turnUsage,y),[N,c,n.turnUsage,y]),Q=b&&b.afterItemId!==null?c.findIndex((r)=>r.items.some((u)=>u.id===b.afterItemId)):-1,D=w(c);D.current=c;let[a,he]=_(null),h=o((r)=>r.historyPages[n.id]),I=o((r)=>r.connection==="ready"),we=o((r)=>Le(r.agent).sessionRetry),Y=h!==void 0;A(()=>{if(I&&Y&&!n.restoring)T.loadHistoryNavigation(n.id).catch(()=>{})},[T,I,Y,n.id,n.restoring]);let[be,Re]=_(!1),F=w(null),[Se,ee]=_(!1),te=w(0),j=w({key:M,running:x});j.current={key:M,running:x};let[ne,U]=_(0),k=w(0),E=w(null);k.current=ne;let Pe=V(()=>{if(E.current!==null)E.current.keepTop=!1},[]),{isFollowing:z,scrollToBottom:W,stopFollowing:q,schedulePin:re,contentResized:ie,beginLocate:oe,cancelLocation:le}=_o(a,x,Pe),ae=V(()=>{if(a===null||!x)return;let r=c.at(-1)?.key;if(r===void 0)return;let u=oe(!0),s=()=>u.isCurrent()&&j.current.running&&j.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!s())return;let g=a.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(g===null)return;let p=a.scrollTop+g.getBoundingClientRect().top-a.getBoundingClientRect().top,H=qe({turnTopPx:p,scrollHeightPx:a.scrollHeight,viewportHeightPx:a.clientHeight,spacerPx:k.current});E.current=H.spacerPx>0?{element:g,heightPx:g.getBoundingClientRect().height+H.spacerPx,keepTop:!0}:null,ge(()=>U(H.spacerPx)),requestAnimationFrame(()=>{if(s())u.finish(H.scrollTopPx)})})),f=F.current;if(f===null)return;f.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(s())i()})},[oe,x,a,c]);pe(()=>{if(!R||x)return;le(),E.current=null,k.current=0,U(0)},[R,le,x]);let X=V(()=>{q(),T.loadOlderHistory(n.id).catch(()=>{})},[T,n.id,q]);A(()=>{if(a===null)return;let r=()=>{let u=a.scrollTop<600;if(Re(u),u&&!y?.complete&&I&&!n.restoring&&!z&&h?.cursor&&!h.loading&&!h.error)X()};return r(),a.addEventListener("scroll",r,{passive:!0}),()=>a.removeEventListener("scroll",r)},[I,h,z,X,a,n.restoring,y?.complete]),A(()=>{or({sessionId:n.id,turns:c,api:F.current,beforeReveal:q})},[n.id,c,q]),A(()=>()=>rr(n.id),[n.id]);let Ie=V(async(r,u)=>{let s=++te.current;ee(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await T.loadHistoryTurn(n.id,r.nativeTurnId),await new Promise((p)=>requestAnimationFrame(()=>p()));if(!u())return null;let i=D.current.find((p)=>p.user?.id===(r.messageId??r.id))??D.current.find((p)=>p.user!==null&&r.nativeTurnId!==void 0&&p.items.some((H)=>me(H)===r.nativeTurnId));if(!i?.user)return null;let f=i.user.id,g=F.current;if(g===null)throw Error("Virtual timeline is not mounted");return await g.scrollToKey(i.key,(p)=>p.querySelector(`[data-content-search-unit-key="${CSS.escape(f)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(f)}"]`)}finally{if(te.current===s)ee(!1)}},[T,n.id]),He=V(async(r)=>{if(r.nativeTurnId!==void 0)await T.previewHistoryTurn(n.id,r.nativeTurnId)},[T,n.id]);A(()=>{if(a===null)return;let r=a.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let s=E.current,i=null;if(s!==null){let f=Math.max(0,s.heightPx-s.element.getBoundingClientRect().height);if(f!==k.current&&(f<k.current||s.keepTop)){if(k.current=f,ge(()=>U(f)),f===0)E.current=null}if(f>0&&s.keepTop)i=a.scrollTop+s.element.getBoundingClientRect().top-a.getBoundingClientRect().top-ve}ie(i)});if(u.observe(r),u.observe(a),M!==void 0){let s=a.querySelector(`[data-codex-turn="${CSS.escape(M)}"]`);if(s===null)throw Error("Latest turn is not mounted");u.observe(s)}return()=>u.disconnect()},[ie,M,a]),A(()=>{if(n.items.length===0)return;re()},[re,n.items]);let ue=w(null);pe(()=>{if(a===null)return;let r=c.at(-1),u=ue.current;if(ue.current=r===void 0?null:{key:r.key,running:x},r===void 0||u===null||r.user===null||r.replayed)return;if(R){if(x&&n.turnEndedAt[r.user.id]===void 0&&(r.key!==u.key||!u.running))E.current=null,k.current=0,U(0),ae()}else if(r.key!==u.key)W()},[ae,R,x,W,a,n.turnEndedAt,c]);let Ne=(r,u)=>{let s=r,i=s.turn;if(i===void 0){if(s.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return l(Fe,{sessionId:n.id,turnId:s.nativeTurnId,root:a,error:y?.turnErrors[s.nativeTurnId],connected:I&&!z&&!Se})}let f=c.indexOf(i),g=i.key===Te,p=Zo(n,c,f),H=!g&&p.continued,K=i.key===M,O=i.errors.at(-1),se=O===void 0?null:Ce(O),G=O===void 0?null:me(O),ke=K&&!g&&I&&we&&n.attached&&!n.readOnly&&!n.restoring&&O===n.items.at(-1)&&se!==null&&Ve(se).category==="overloaded"&&G!==null&&n.lastStopReason!=="end_turn"&&n.lastStopReason!=="cancelled",ce=S?.(i)??null,Ee=i.work.length>0||i.final.length>0||i.errors.length>0||g||ce!==null||Ue(i)||on(i)||K&&(n.error!==null||n.lastStopReason==="cancelled"),de=i.user===null?null:ze(i);return L("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(C===void 0?l(ko,{item:i.user,messageTime:de}):C(i.user,de)),Ee&&l(vo,{sessionId:n.id,turn:i,terminals:n.terminals,active:g,blocked:n.state==="requires_action",continued:H,edits:p.edits,activityItems:p.items,workStartedAt:p.startedAt,isLast:K,error:n.error,retrying:g?Me(n._meta)??void 0:void 0,retry:ke?{turnId:G,delaySeconds:Io(c),run:(Ae)=>T.retrySession(n.id,G,Ae)}:void 0,interrupted:on(i)||!g&&K&&n.lastStopReason==="cancelled",answerActions:d?.(i),footer:ce}),u===Q&&b?.node,v?.(i)]})};return L("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[l(B,{viewportRef:he,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":P.t("timeline.label")},children:l("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:L("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&Q===-1&&b.node,l(mo,{ref:F,entries:ye,renderTurn:Ne,scrollElement:a,sessionKey:n.id,preserveViewport:!z,leadingInsetPx:12,leadingContent:m===void 0?void 0:l("div",{className:"pt-3",children:m})}),R&&l("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ne}}),l("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),l("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),y?.error&&l("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:l(e,{variant:"outline",size:"sm",disabled:!I,title:y.error,onClick:()=>{T.loadHistoryNavigation(n.id).catch(()=>{})},children:P.t("timeline.navigationRetry")})}),be&&h?.cursor&&!y?.complete&&L("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[l(e,{variant:"outline",size:"sm",disabled:!I||n.restoring||h.loading,onClick:X,children:h.loading?P.t("timeline.loadingEarlier"):P.t("timeline.loadEarlier")}),h.error&&l("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:h.error})]}),N!==void 0&&l(Oo,{items:xe,audio:N.audio,scrollRoot:a,beforeReveal:q,ensureItemMounted:Ie,onPreviewItem:He,onRevealError:(r)=>$e(P,r),targetTopMarginPx:16},n.id),l("button",{type:"button",className:z?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:z?-1:void 0,onClick:W,"aria-label":P.t("timeline.scrollToBottom"),children:x?L("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"})]}):l(Be,{})})]})}
|
|
2
|
-
export{uo};
|