@alwith/module-chat 0.5.3 → 0.5.4
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-pcngn73n.js → chunk-0d8k5bmd.js} +2 -2
- package/dist/chunk-0fvpmcps.js +2 -0
- package/dist/{chunk-hesyytcd.js → chunk-0grd0g0x.js} +2 -2
- package/dist/chunk-0habpww5.js +2 -0
- package/dist/chunk-0hpww4x3.js +2 -0
- package/dist/{chunk-d4yhdesy.js → chunk-0k654tyt.js} +2 -2
- package/dist/chunk-0mf7yh69.js +2 -0
- package/dist/{chunk-pb6xtb3n.js → chunk-17wjmyj7.js} +2 -2
- package/dist/{chunk-9bjywaze.js → chunk-1drkvxzk.js} +1 -1
- package/dist/{chunk-cw68hvkc.js → chunk-1txn4b0v.js} +1 -1
- package/dist/{chunk-t2ceq16d.js → chunk-2s4y2v50.js} +2 -2
- package/dist/{chunk-zy6338m6.js → chunk-2ysnmwx1.js} +2 -2
- package/dist/{chunk-691gxr2e.js → chunk-367b1yab.js} +2 -2
- package/dist/{chunk-aaqk0jrt.js → chunk-3nj26hhf.js} +2 -2
- package/dist/{chunk-543v9eke.js → chunk-3ryhmzsq.js} +2 -2
- package/dist/{chunk-x71x2atx.js → chunk-3wsg6710.js} +2 -2
- package/dist/{chunk-h80g3eme.js → chunk-3x1eq95a.js} +2 -2
- package/dist/{chunk-zwvyfjj8.js → chunk-4jagfjhm.js} +2 -2
- package/dist/chunk-4pbh3fph.js +2 -0
- package/dist/{chunk-8r010kvn.js → chunk-5s2wpbdt.js} +1 -1
- package/dist/{chunk-9x4et210.js → chunk-5t3rrnfd.js} +2 -2
- package/dist/{chunk-4mnf89r3.js → chunk-5wyxvpgt.js} +1 -1
- package/dist/{chunk-xem94nq0.js → chunk-65jedxc3.js} +3 -3
- package/dist/{chunk-1dp50khb.js → chunk-68y66m3v.js} +2 -2
- package/dist/{chunk-t9vvcy09.js → chunk-69yx37pv.js} +3 -3
- package/dist/chunk-6d38ff76.js +2 -0
- package/dist/{chunk-w99ah6qt.js → chunk-6j4g51ff.js} +3 -3
- package/dist/chunk-6pq1xmwg.js +2 -0
- package/dist/{chunk-npjw8dm5.js → chunk-6vqnsdgc.js} +1 -1
- package/dist/chunk-76tkqx9n.js +2 -0
- package/dist/{chunk-w92s8704.js → chunk-78ew0821.js} +5 -5
- package/dist/chunk-7e1m1d9x.js +2 -0
- package/dist/chunk-88vkk9s3.js +2 -0
- package/dist/{chunk-eyre28p1.js → chunk-8bzk9e4v.js} +2 -2
- package/dist/{chunk-aygzz2yg.js → chunk-8fn5n4yv.js} +2 -2
- package/dist/chunk-8p0074ye.js +2 -0
- package/dist/chunk-91trh8rj.js +2 -0
- package/dist/{chunk-cr294svm.js → chunk-93q2dm10.js} +1 -1
- package/dist/chunk-94k9byb1.js +2 -0
- package/dist/chunk-9c41y5hw.js +2 -0
- package/dist/{chunk-4dcagj01.js → chunk-a2ftkzak.js} +1 -1
- package/dist/{chunk-jnfp7j32.js → chunk-an03g9e8.js} +2 -2
- package/dist/{chunk-n3raktzz.js → chunk-bwas6kp2.js} +2 -2
- package/dist/{chunk-hwwhxb3x.js → chunk-c6w4bp15.js} +1 -1
- package/dist/{chunk-a7mr12yc.js → chunk-cg97byvk.js} +1 -1
- package/dist/{chunk-kbvkr5mr.js → chunk-cywx4qmv.js} +1 -1
- package/dist/chunk-d2rrvka6.js +2 -0
- package/dist/chunk-dcxprfnp.js +2 -0
- package/dist/chunk-dsdxw9s8.js +2 -0
- package/dist/{chunk-zcrct67v.js → chunk-ehh31hzz.js} +1 -1
- package/dist/{chunk-86kkb0z4.js → chunk-epqjzw63.js} +2 -2
- package/dist/{chunk-87t0qtkr.js → chunk-f0sbnmcs.js} +4 -4
- package/dist/chunk-fwd1zewt.js +2 -0
- package/dist/{chunk-jdv29apq.js → chunk-fzetrkvd.js} +2 -2
- package/dist/{chunk-33mgpcnd.js → chunk-gb2dmt6b.js} +2 -2
- package/dist/{chunk-802bgza1.js → chunk-gmhbqxcg.js} +2 -2
- package/dist/chunk-gsq8mzr7.js +2 -0
- package/dist/{chunk-bycbj1aq.js → chunk-gtddnhdy.js} +2 -2
- package/dist/chunk-gwav4k8b.js +2 -0
- package/dist/{chunk-wqwqx3hc.js → chunk-gy63n5pz.js} +1 -1
- package/dist/chunk-h05s12jn.js +3 -0
- package/dist/chunk-h7gq5y52.js +2 -0
- package/dist/chunk-h9tnsvjr.js +2 -0
- package/dist/{chunk-3jcxkpvs.js → chunk-hhw1pjz6.js} +2 -2
- package/dist/{chunk-51qsyrd6.js → chunk-hjm26kwf.js} +1 -1
- package/dist/chunk-hmj7yqyb.js +3 -0
- package/dist/{chunk-tre0r8qm.js → chunk-hmze7f10.js} +2 -2
- package/dist/{chunk-p0cc67an.js → chunk-hrexfky6.js} +2 -2
- package/dist/{chunk-w2tmm1va.js → chunk-jd61cfkk.js} +2 -2
- package/dist/{chunk-fqj76wq8.js → chunk-jwb3723b.js} +2 -2
- package/dist/chunk-k2zg8xva.js +2 -0
- package/dist/{chunk-0j15twx6.js → chunk-kg1gk77d.js} +2 -2
- package/dist/chunk-kh1tc15g.js +2 -0
- package/dist/chunk-m4mfw5s4.js +7 -0
- package/dist/{chunk-r6e2abj6.js → chunk-m5jhw1e6.js} +2 -2
- package/dist/{chunk-e3mkvx24.js → chunk-mgt5j803.js} +1 -1
- package/dist/{chunk-6fht8rx9.js → chunk-mv8jmv1e.js} +2 -2
- package/dist/{chunk-ptt7q7za.js → chunk-n4cseazv.js} +3 -3
- package/dist/{chunk-2snmjnz9.js → chunk-nb5wjv92.js} +2 -2
- package/dist/{chunk-ek06eyp4.js → chunk-nx91ewps.js} +1 -1
- package/dist/chunk-p2s04v76.js +2 -0
- package/dist/{chunk-ckp6661s.js → chunk-pkgrt90z.js} +2 -2
- package/dist/chunk-py1t2v6e.js +2 -0
- package/dist/chunk-q2ppgpfd.js +2 -0
- package/dist/chunk-q3hdevem.js +2 -0
- package/dist/chunk-q4y1q1na.js +2 -0
- package/dist/{chunk-zzwnpk4q.js → chunk-q98941j2.js} +2 -2
- package/dist/{chunk-0vvn08gg.js → chunk-qbj5s8qa.js} +2 -2
- package/dist/{chunk-qpz97p1m.js → chunk-qgfq5vrz.js} +1 -1
- package/dist/{chunk-8mvg9a32.js → chunk-qqdca2rm.js} +2 -2
- package/dist/{chunk-mk10tgjk.js → chunk-r7c0tca8.js} +2 -2
- package/dist/{chunk-qf3a35g4.js → chunk-r8z8f31m.js} +2 -2
- package/dist/{chunk-awrzpp7x.js → chunk-rd94eyan.js} +2 -2
- package/dist/{chunk-b5g1j1zv.js → chunk-rdtj6bad.js} +2 -2
- package/dist/{chunk-23wzpgbs.js → chunk-rgkhm4s4.js} +2 -2
- package/dist/chunk-s44rx1sz.js +3 -0
- package/dist/{chunk-d6nxypzc.js → chunk-scddkjv8.js} +1 -1
- package/dist/{chunk-st90r31c.js → chunk-sj7jdb7m.js} +1 -1
- package/dist/chunk-spt7tnqx.js +2 -0
- package/dist/{chunk-8kjsqjy6.js → chunk-sqh158m4.js} +1 -1
- package/dist/{chunk-hmtgx7fw.js → chunk-syv6gady.js} +2 -2
- package/dist/{chunk-j4teycge.js → chunk-tpx841s3.js} +2 -2
- package/dist/{chunk-20re64ta.js → chunk-ttk21631.js} +2 -2
- package/dist/chunk-twwqgd8e.js +2 -0
- package/dist/{chunk-rqbbb37p.js → chunk-tzjk7zkc.js} +2 -2
- package/dist/{chunk-maj7m5s7.js → chunk-v5wwv2t9.js} +2 -2
- package/dist/{chunk-dfengqjx.js → chunk-wjs8bwpk.js} +2 -2
- package/dist/{chunk-h4sw0pez.js → chunk-wrs447cs.js} +2 -2
- package/dist/chunk-x053g6f2.js +2 -0
- package/dist/{chunk-cj5pkg2y.js → chunk-xf14bg2v.js} +3 -3
- package/dist/{chunk-dzydvx7r.js → chunk-xfjcwypy.js} +3 -3
- package/dist/{chunk-ncekagm6.js → chunk-xjtqdp82.js} +1 -1
- package/dist/{chunk-9v2gk9ex.js → chunk-xp0nfvxg.js} +2 -2
- package/dist/{chunk-3m06tqqk.js → chunk-xw0gvwh5.js} +2 -2
- package/dist/{chunk-3nmqebb6.js → chunk-y438yezf.js} +3 -3
- package/dist/chunk-y6r6tzfh.js +2 -0
- package/dist/{chunk-mgakm5yv.js → chunk-yegh80h4.js} +2 -2
- package/dist/{chunk-tptnjbrd.js → chunk-yf2p44mq.js} +2 -2
- package/dist/{chunk-cgxcxfh1.js → chunk-yg42bpjr.js} +3 -3
- package/dist/chunk-yhmb3z56.js +2 -0
- package/dist/{chunk-0n82kdek.js → chunk-z3e38981.js} +2 -2
- package/dist/{chunk-px7xxz3v.js → chunk-z4zm74ge.js} +2 -2
- package/dist/{chunk-k50475tn.js → chunk-z75zbdq8.js} +1 -1
- package/dist/{chunk-mmdpwbef.js → chunk-zc2hdmk1.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/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/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/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.d.ts +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.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-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/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-0pa5t12s.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-4d8q9bpy.js +0 -2
- package/dist/chunk-67txww0x.js +0 -2
- package/dist/chunk-6ndz2pf9.js +0 -2
- package/dist/chunk-7gaper2w.js +0 -2
- package/dist/chunk-asxwsg2p.js +0 -2
- package/dist/chunk-ctedwb0a.js +0 -3
- package/dist/chunk-czahfwp7.js +0 -2
- package/dist/chunk-d25r0vq3.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-hr9d9zpb.js +0 -2
- package/dist/chunk-jf5651fz.js +0 -2
- package/dist/chunk-jmx0awnf.js +0 -2
- package/dist/chunk-maepz12p.js +0 -3
- 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-tj44vjyv.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-wtk721nx.js +0 -2
- package/dist/chunk-x3b4dpac.js +0 -2
- package/dist/chunk-yx02h2ja.js +0 -2
- package/dist/chunk-z8fdvq3v.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Z}from"../chunk-3wsg6710.js";import"../chunk-3x1eq95a.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{Z as AssistantContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bo}from"../chunk-hmj7yqyb.js";import"../chunk-s44rx1sz.js";import"../chunk-zc2hdmk1.js";import"../chunk-kh1tc15g.js";import"../chunk-3wsg6710.js";import"../chunk-78ew0821.js";import"../chunk-yg42bpjr.js";import"../chunk-gsq8mzr7.js";import"../chunk-q98941j2.js";import"../chunk-x053g6f2.js";import"../chunk-m4mfw5s4.js";import"../chunk-ttk21631.js";import"../chunk-acrrwrzy.js";import"../chunk-y438yezf.js";import"../chunk-p2s04v76.js";import"../chunk-z4zm74ge.js";import"../chunk-3x1eq95a.js";import"../chunk-6pq1xmwg.js";import"../chunk-rkqe8p8n.js";import"../chunk-8p0074ye.js";import"../chunk-q4y1q1na.js";import"../chunk-4jagfjhm.js";import"../chunk-tzjk7zkc.js";import"../chunk-0fvpmcps.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{bo as AssistantTurn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Xt}from"../chunk-kh1tc15g.js";import"../chunk-3wsg6710.js";import"../chunk-3x1eq95a.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{Xt as AsyncQuestions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Dr,_r,Hr,Io}from"../chunk-78ew0821.js";import"../chunk-yg42bpjr.js";import"../chunk-6d38ff76.js";import"../chunk-y6r6tzfh.js";export{Io as EditedFilesCard,Hr as fileChanges,Dr as filePatch,_r as patchStatsByFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ko}from"../chunk-jd61cfkk.js";export{ko as historyTimeline};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{J,t,ee,we,o,qe}from"../chunk-6d38ff76.js";import"../chunk-y6r6tzfh.js";export{J as TimelineProvider,qe as reportError,o as useClientState,we as useStoreState,ee as useTimelineClient,t as useTimelineHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Br,$o,qo}from"../chunk-367b1yab.js";import"../chunk-gtddnhdy.js";import"../chunk-f0sbnmcs.js";import"../chunk-0mf7yh69.js";import"../chunk-17wjmyj7.js";import"../chunk-rd94eyan.js";import"../chunk-0grd0g0x.js";import"../chunk-rgkhm4s4.js";import"../chunk-0fvpmcps.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{qo as TimelineNavigationRail,Br as navigationAudio,$o as toNavigationRailItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ho}from"../chunk-6pq1xmwg.js";import"../chunk-rkqe8p8n.js";import"../chunk-y6r6tzfh.js";export{Ho as TurnPlan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bo,zo}from"../chunk-3ryhmzsq.js";export{Bo as questionReply,zo as questionReplyParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{wr,L}from"../chunk-3x1eq95a.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{L as ResourceContent,wr as chatFileName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{go}from"../chunk-yhmb3z56.js";import"../chunk-0d8k5bmd.js";import"../chunk-hhw1pjz6.js";import"../chunk-hmj7yqyb.js";import"../chunk-s44rx1sz.js";import"../chunk-zc2hdmk1.js";import"../chunk-kh1tc15g.js";import"../chunk-jd61cfkk.js";import"../chunk-3wsg6710.js";import"../chunk-94k9byb1.js";import"../chunk-78ew0821.js";import"../chunk-yg42bpjr.js";import"../chunk-65jedxc3.js";import"../chunk-gsq8mzr7.js";import"../chunk-q98941j2.js";import"../chunk-syv6gady.js";import"../chunk-x053g6f2.js";import"../chunk-m4mfw5s4.js";import"../chunk-ttk21631.js";import"../chunk-acrrwrzy.js";import"../chunk-y438yezf.js";import"../chunk-p2s04v76.js";import"../chunk-z4zm74ge.js";import"../chunk-3x1eq95a.js";import"../chunk-6pq1xmwg.js";import"../chunk-rkqe8p8n.js";import"../chunk-8p0074ye.js";import"../chunk-q4y1q1na.js";import"../chunk-4jagfjhm.js";import"../chunk-tzjk7zkc.js";import"../chunk-3ryhmzsq.js";import"../chunk-8fn5n4yv.js";import{Br}from"../chunk-367b1yab.js";import"../chunk-gtddnhdy.js";import"../chunk-f0sbnmcs.js";import"../chunk-0mf7yh69.js";import"../chunk-17wjmyj7.js";import"../chunk-rd94eyan.js";import"../chunk-0grd0g0x.js";import"../chunk-rgkhm4s4.js";import"../chunk-0fvpmcps.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import{J}from"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{go as SessionTimeline,J as TimelineProvider,Br 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{Yt,Co,To,bi}from"../chunk-94k9byb1.js";export{To as clearTimeline,Co as publishTimeline,bi as revealTimelineTurn,Yt as timelineRegistry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Oo}from"../chunk-8p0074ye.js";import"../chunk-q4y1q1na.js";export{Oo as projectTurnActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{tn,nn}from"../chunk-tzjk7zkc.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{tn as ErrorCard,nn as TurnErrorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mo}from"../chunk-syv6gady.js";export{Mo as capacityRetryDelay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ue}from"../chunk-4jagfjhm.js";export{Ue 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{qr,Jo,er,an,q,$e,sn,tr,nr,or,rr}from"../chunk-0fvpmcps.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-cg97byvk.js";export{or as activeTurnKey,nr as continuesTurn,er as groupTurns,$e as isHistoryInterrupted,an as isHistoryItem,qr as isMcpStartup,Jo as isSessionStatus,sn as isTurnInterrupted,q as messageText,rr as turnPresentation,tr as turnTiming};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Uo}from"../chunk-8fn5n4yv.js";export{Uo as useTimelineScroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{So}from"../chunk-65jedxc3.js";import"../chunk-gsq8mzr7.js";import"../chunk-q98941j2.js";import"../chunk-3x1eq95a.js";import"../chunk-3ryhmzsq.js";import"../chunk-0fvpmcps.js";import"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-6d38ff76.js";import"../chunk-cg97byvk.js";import"../chunk-y6r6tzfh.js";export{So as UserMessage};
|
package/dist/ui/alert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O,$t,F,
|
|
1
|
+
import{O,$t,F,di}from"../chunk-a2ftkzak.js";export{O as Alert,di as AlertAction,F as AlertDescription,$t as AlertTitle};
|
package/dist/ui/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Rr,Ae}from"../chunk-hjm26kwf.js";export{Ae as Badge,Rr 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{qn,Vn,Gn,Wn,ni,jn,Kn}from"../chunk-scddkjv8.js";export{qn as Card,ni as CardAction,jn as CardContent,Wn as CardDescription,Kn as CardFooter,Vn as CardHeader,Gn as CardTitle};
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ue}from"../chunk-1drkvxzk.js";export{ue as Checkbox};
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,
|
|
1
|
+
import{d,gi,Ar,lo,Lr,u,w,z,m,k}from"../chunk-1txn4b0v.js";import"../chunk-cg97byvk.js";export{d as Dialog,lo as DialogClose,u as DialogContent,k as DialogDescription,z as DialogFooter,w as DialogHeader,Lr as DialogOverlay,Ar as DialogPortal,m as DialogTitle,gi as DialogTrigger};
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{me,li,pe,W,ge,mt,fe,Le,De,_e,Ot,Jn,eo,P,ci}from"../chunk-5s2wpbdt.js";export{me as DropdownMenu,Ot as DropdownMenuCheckboxItem,W as DropdownMenuContent,ge as DropdownMenuGroup,fe as DropdownMenuItem,mt as DropdownMenuLabel,li as DropdownMenuPortal,Jn as DropdownMenuRadioGroup,eo as DropdownMenuRadioItem,P as DropdownMenuSeparator,ci as DropdownMenuShortcut,Le as DropdownMenuSub,_e as DropdownMenuSubContent,De as DropdownMenuSubTrigger,pe as DropdownMenuTrigger};
|
package/dist/ui/empty.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{oe,re,Zr,ie,ae,Jr}from"../chunk-qgfq5vrz.js";export{oe as Empty,Jr as EmptyContent,ae as EmptyDescription,re as EmptyHeader,Zr as EmptyMedia,ie as EmptyTitle};
|
package/dist/ui/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At,Lt,
|
|
1
|
+
import{At,Lt,Qn,Xn,oi,Yn,ri,ut,ii,ai}from"../chunk-sj7jdb7m.js";import"../chunk-qbdqh38y.js";import"../chunk-nx91ewps.js";export{Xn as Field,oi as FieldContent,ut as FieldDescription,ai as FieldError,Qn as FieldGroup,Yn as FieldLabel,Lt as FieldLegend,ii as FieldSeparator,At as FieldSet,ri as FieldTitle};
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Re,Me,Ee}from"../chunk-sqh158m4.js";export{Re as HoverCard,Ee as HoverCardContent,Me as HoverCardTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ht}from"../chunk-
|
|
1
|
+
import{Ht}from"../chunk-gy63n5pz.js";import"../chunk-xjtqdp82.js";export{Ht as InputGroupTextarea};
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Zn,Dt,_t,si}from"../chunk-mgt5j803.js";import{Ht}from"../chunk-gy63n5pz.js";import"../chunk-xjtqdp82.js";import"../chunk-cg97byvk.js";export{Zn as InputGroup,Dt as InputGroupAddon,_t as InputGroupButton,si as InputGroupText,Ht as InputGroupTextarea};
|
package/dist/ui/kbd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Un,ei}from"../chunk-93q2dm10.js";export{Un as Kbd,ei as KbdGroup};
|
package/dist/ui/label.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h}from"../chunk-nx91ewps.js";export{h as Label};
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V,
|
|
1
|
+
import{V,R}from"../chunk-ehh31hzz.js";export{V as RadioGroup,R as RadioGroupItem};
|
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{qt,
|
|
1
|
+
import{qt,ui,Vt,Gt,ao,mi,K,pi,Mr,Er}from"../chunk-c6w4bp15.js";export{qt as Select,ao as SelectContent,ui as SelectGroup,K as SelectItem,mi as SelectLabel,Er as SelectScrollDownButton,Mr as SelectScrollUpButton,pi as SelectSeparator,Gt as SelectTrigger,Vt as SelectValue};
|
package/dist/ui/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ne}from"../chunk-5wyxvpgt.js";export{Ne 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{ti,se,le,ce}from"../chunk-z75zbdq8.js";export{se as Tooltip,ce as TooltipContent,ti as TooltipProvider,le 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.4",
|
|
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-0pa5t12s.js
DELETED
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-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-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-asxwsg2p.js
DELETED
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-d25r0vq3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-yx02h2ja.js";import{te,Pe,at}from"./chunk-ptt7q7za.js";import{jsx as n,jsxs as m,Fragment as r}from"react/jsx-runtime";var c=[];function it({sessionId:s}){let e=o((i)=>i.actions),l=e.some((i)=>i.sessionId===s)?e.filter((i)=>i.sessionId===s):c,t=l.filter(te),a=l.filter((i)=>!te(i));return m(r,{children:[a.length>0&&n("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:a.map((i)=>n(at,{action:i},i.id))}),t[0]!==void 0&&n(Pe,{action:t[0],total:t.length},t[0].id)]})}
|
|
2
|
-
export{it};
|
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};
|
package/dist/chunk-hr9d9zpb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-yx02h2ja.js";import{Re}from"./chunk-51qsyrd6.js";import{e}from"./chunk-a7mr12yc.js";import{tt}from"./chunk-jf5651fz.js";import{FileIcon as m,XIcon as r}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function Rn({mentions:n,onRemove:s}){let{t:i}=t();if(n.length===0)return null;return a("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:n.map((o)=>l(Re,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(m,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:tt(o)}),a(e,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:tt(o)}),onClick:()=>s(o),children:a(r,{className:"size-3"})})]},o))})}
|
|
2
|
-
export{Rn};
|
package/dist/chunk-jf5651fz.js
DELETED
package/dist/chunk-jmx0awnf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-a7mr12yc.js";import{l}from"./chunk-1hy64ewz.js";import{cn as v}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function Hn({ref:p,value:i,onChange:d,onFind:o,onClose:s,placeholder:m,autoFocusOpen:a=!0,prevTitle:c,nextTitle:u,className:h}){let r=E(null);N(p,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!a)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus(),t.select()},[a]);let f=!i;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",h),children:[n(l,{ref:r,value:i,onChange:(t)=>d(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),s();return}if(t.key==="Enter"){if(t.preventDefault(),i)o(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>o(!0),title:c?`${c} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>o(!1),title:u?`${u} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
|
|
2
|
-
export{Hn};
|
package/dist/chunk-maepz12p.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,h}from"./chunk-1wc83vxg.js";import{A}from"./chunk-3nmqebb6.js";import{xo}from"./chunk-mmdpwbef.js";import{U}from"./chunk-rkqe8p8n.js";import{No,Be}from"./chunk-vyzzs0nc.js";import{Co}from"./chunk-cgxcxfh1.js";import{Yt}from"./chunk-2b185a0a.js";import{cn as w}from"cn";import{jsx as o,jsxs as m}from"react/jsx-runtime";var v=new WeakMap,P=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=P++;return v.set(t,s),`${t.type}:${s}`}function I({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return m("div",{className:"codex-assistant-message",children:[o(h,{text:t.text,streaming:n}),s]})}function E({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(I,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(h,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(U,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var _=new Set;function fi({message:t,isMostRecentTurn:n,hiddenTools:s=_,time:i,beforeCopy:r,afterCopy:p,providerIcon:T,renderText:B,renderEditedFiles:g}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let y=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),M=!t.streaming&&y.trim().length>0?o(Kt,{text:y,isMostRecentTurn:n,beforeCopy:r,afterCopy:p,time:i}):null,d=xo(t.content,"compact"),u=d.reduce((e,c,l)=>c.kind==="codexActivityGroup"?l:e,-1),C=d.findIndex((e,c)=>c>u&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),x=t.content.filter((e)=>e.type==="tool_use"&&A(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let c=e.blocks.filter((l)=>l.type!=="tool_use"||!s.has(l.name));return c.length===0?null:o(Be,{blocks:c},`activity:${R(c[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(E,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?M:void 0,renderText:B},R(e.block))},f=u===-1?0:C===-1?d.length:C;return o(Qt,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:T,work:d.slice(0,f).map(k),answer:d.length>f?d.slice(f).map(k):null,footer:u!==-1&&x.length>0&&(g===void 0?o(Co,{blocks:x}):g(x))})}function Kt({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let{t:p}=a();return m("div",{className:w("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Yt,{text:t,label:p("actions.copy")}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N(){let{t}=a();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t("message.thinking")})})}function Qt({work:t,answer:n,footer:s,loading:i=!1,...r}){if(i)return o(N,{});return m("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(No,{...r,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{fi,Kt,Qt};
|
package/dist/chunk-r41p7378.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Rt(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Gr(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Rt(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Rt,Gr};
|
package/dist/chunk-rzajhyrq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h}from"./chunk-1wc83vxg.js";import{U}from"./chunk-rkqe8p8n.js";import{isPlanItems as n,isPlanMarkdown as r}from"@alwith/api";import{jsx as e}from"react/jsx-runtime";function Ao({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(h,{text:t.content,streaming:!1})});if(!n(t))return null;return e(U,{entries:t.entries})}
|
|
2
|
-
export{Ao};
|
package/dist/chunk-sc746nr6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-a7mr12yc.js";import{de,ue,W,me,ut,pe,Ae,Le,De,Ot,I}from"./chunk-8r010kvn.js";import{Ee}from"./chunk-4mnf89r3.js";import{ne,oe,re}from"./chunk-k50475tn.js";import{It}from"./chunk-b5g1j1zv.js";import{p}from"./chunk-kbvkr5mr.js";import{cn as m}from"cn";import{ArrowUpRight as E,ChevronUp as j,Loader2Icon as B,Zap as G}from"lucide-react";import{Fragment as ee,useState as P}from"react";import{jsx as n,jsxs as s,Fragment as c}from"react/jsx-runtime";function xn({value:h,onChange:F,models:v,modelGroups:S,compactCatalog:l,effortPresentation:V="slider",unavailableEffort:N,providerMenu:w,header:g,className:z,condensed:f,stripLabelPrefix:C,showDescription:U,showModelList:Z=!0,loading:q,switching:_,isLoading:H,effortConfig:i,booleanOptions:y,onBooleanChange:T,selectOptions:J=[],t:u,...r}){let[K,Q]=P(!1),[X,Y]=P(!1),d=y?.find((a)=>a.id==="fast_mode"),O=l?y?.filter((a)=>a!==d):y,R=(a)=>C&&a.startsWith(C)?a.slice(C.length):a;if(q)return n("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:s(e,{variant:"ghost",disabled:!0,className:m("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",z),children:[n(B,{className:"size-3 animate-spin"}),n("span",{className:"text-muted-foreground truncate",children:u("model.loadingModels")})]})});return s("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[w&&s(de,{open:K,onOpenChange:Q,children:[s(ne,{children:[n(oe,{render:n(ue,{render:s(e,{"data-testid":"provider-trigger",variant:"ghost",disabled:r.disabled,className:m("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[w.icon,n(j,{className:"size-2.5 shrink-0 opacity-60"})]})})}),n(re,{children:u("model.switchProvider")})]}),s(W,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[w.groups.map((a,t)=>s(ee,{children:[t>0&&a.length>0&&n(I,{}),n(p,{value:w.value,onValueChange:w.onChange,options:a})]},t)),w.moreAction&&s(c,{children:[n(I,{}),s(pe,{onClick:w.moreAction,className:"whitespace-nowrap",children:[n("span",{className:"min-w-0 flex-1 truncate",children:u("model.moreModels")}),n(E,{className:"size-4"})]})]})]})]}),s(de,{open:X,onOpenChange:Y,children:[s(ne,{children:[n(oe,{render:n(ue,{render:s(e,{"data-testid":"model-trigger","aria-busy":_,variant:"ghost",className:m("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",f&&"h-7 gap-1 px-1.5 text-[11px]",z),...r,children:[h.icon,y?.some((a)=>a.id==="fast_mode"&&a.currentValue&&!a.disabled)&&n(G,{"aria-hidden":"true",className:"size-3 shrink-0"}),n("span",{className:m("min-w-0 flex-1 truncate text-start",f&&"text-[11px]"),children:R(h.label)||u("model.selectModel")}),i&&s("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[n("span",{className:"invisible col-start-1 row-start-1",children:i.sizer??i.levels.reduce((a,t)=>t.name.length>a.length?t.name:a,"")}),n("span",{className:"col-start-1 row-start-1",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),_?n(B,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):n(j,{className:m("size-3 shrink-0",f&&"size-2.5")})]})})}),n(re,{children:u("model.switchModel")})]}),s(W,{side:"top",align:"end",sideOffset:4,className:m("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",l&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[l&&s(c,{children:[s(me,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-1 py-1",children:[i?V==="slider"?n("div",{role:"menuitem","aria-label":i.name,className:"min-w-0 [&>div]:justify-start [&>div]:gap-3 [&>div]:px-2 [&>div]:py-1.5",children:n(It,{...i,disabled:r.disabled})}):s(Ae,{children:[s(Le,{disabled:r.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[n("span",{children:i.name}),n("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(De,{children:n(p,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):N?s(pe,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[n("span",{children:N.name}),n("span",{className:"text-muted-foreground truncate text-xs",children:N.label})]}):n(ut,{className:"min-w-0 flex-1 truncate",children:g?.name}),d&&n(Ot,{"aria-label":d.name,title:d.title??d.name,disabled:r.disabled||d.disabled,checked:d.currentValue,closeOnClick:!1,onCheckedChange:(a)=>T?.(d.id,a),className:m("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ml-auto size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",d.currentValue&&!d.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:d.icon??n(G,{className:"size-4","aria-hidden":"true"})})]}),n(I,{className:"shrink-0"})]}),g&&!l&&s(c,{children:[s("div",{className:"flex items-center gap-2 px-2 py-2",children:[g.icon,n("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:g.name}),g.action]}),n(I,{})]}),s(me,{"data-model-menu-list":l?"":void 0,className:l?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[Z&&(H?n(pe,{disabled:!0,className:"text-muted-foreground",children:u("model.loadingModels")}):v.length===0?n(pe,{disabled:!0,className:"text-muted-foreground",children:u("model.noModelsAvailable")}):(()=>{let a=v.filter((o)=>!o.more),t=v.filter((o)=>o.more),A=a.length>0&&t.length>0,M=(o,b)=>({disabled:r.disabled,icon:o.icon,value:o.api_id,label:R(o.label),description:b?.noDescription?void 0:U?o.description:void 0}),D=(o)=>{let b=v.find((k)=>k.api_id===o);if(b)F(b)};if(l)return n(p,{value:h.api_id,onValueChange:D,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:v.map((o)=>M(o))});return s(c,{children:[S?S.map((o)=>{let b=o.models.filter((x)=>!x.more),k=o.models.filter((x)=>x.more),L=b.length>0&&k.length>0;return s(me,{children:[n(ut,{className:"text-muted-foreground text-xs font-normal",children:o.name}),n(p,{value:h.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(L?b:o.models).map((x)=>M(x))}),L&&s(Ae,{children:[n(Le,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(De,{children:n(p,{value:h.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:k.map((x)=>M(x,{noDescription:!0}))})})]})]},o.id)}):n(p,{value:h.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:(A?a:v).map((o)=>M(o))}),!S&&A&&s(Ae,{children:[n(Le,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(De,{children:n(p,{value:h.api_id,onValueChange:D,itemClassName:"font-medium whitespace-nowrap",options:t.map((o)=>M(o,{noDescription:!0}))})})]})]})})()),!l&&i&&s(c,{children:[n(I,{}),V==="menu"?s(Ae,{children:[s(Le,{disabled:r.disabled,children:[n("span",{className:"flex-1",children:i.name}),n("span",{className:"text-muted-foreground",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(De,{children:n(p,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):n(It,{...i,disabled:r.disabled})]}),!l&&!i&&N&&s(c,{children:[n(I,{}),s(pe,{disabled:!0,children:[n("span",{className:"flex-1",children:N.name}),n("span",{children:N.label})]})]}),J.map((a)=>s(me,{children:[n(I,{}),n(ut,{children:a.name}),n(p,{value:a.value,onValueChange:a.onChange,options:a.options,itemClassName:"whitespace-nowrap"})]},a.id)),O&&O.length>0&&s(c,{children:[!i&&n(I,{}),O.map((a)=>l?s(Ot,{"aria-label":a.name,title:a.title,disabled:r.disabled||a.disabled,checked:a.currentValue,closeOnClick:!1,onCheckedChange:(t)=>T?.(a.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[s("span",{className:"flex items-center gap-2",children:[a.icon,a.name]}),n("span",{"aria-hidden":"true",className:m("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",a.currentValue?"bg-primary":"bg-input"),children:n("span",{className:m("bg-background size-3.5 rounded-full shadow-xs transition-transform",a.currentValue&&"translate-x-3.5")})})]},a.id):s("div",{title:a.title,className:m("flex items-center justify-between gap-3 px-2 py-2.5",a.disabled&&"opacity-50"),children:[s("span",{className:"flex items-center gap-2 text-sm font-medium",children:[a.icon,a.name]}),n(Ee,{"aria-label":a.name,disabled:r.disabled||a.disabled,checked:a.currentValue,onCheckedChange:(t)=>T?.(a.id,t)})]},a.id))]})]}),l&&g?.action&&s(c,{children:[n(I,{className:"shrink-0"}),n(me,{"data-model-menu-footer":!0,className:"shrink-0",children:g.action})]})]})]})]})}
|
|
2
|
-
export{xn};
|