@alwith/module-chat 0.5.2 → 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/README.md +29 -0
- 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-0d8k5bmd.js +2 -0
- package/dist/chunk-0fvpmcps.js +2 -0
- package/dist/{chunk-d675nr2b.js → chunk-0grd0g0x.js} +2 -2
- package/dist/chunk-0habpww5.js +2 -0
- package/dist/chunk-0hpww4x3.js +2 -0
- package/dist/chunk-0k654tyt.js +2 -0
- package/dist/chunk-0mf7yh69.js +2 -0
- package/dist/{chunk-9dsa5vm7.js → chunk-17wjmyj7.js} +2 -2
- package/dist/chunk-1drkvxzk.js +1 -0
- package/dist/{chunk-7q7c0mds.js → chunk-1hy64ewz.js} +1 -1
- package/dist/chunk-1txn4b0v.js +1 -0
- package/dist/{chunk-6vky4fcv.js → chunk-2s4y2v50.js} +2 -2
- package/dist/chunk-2ysnmwx1.js +2 -0
- package/dist/{chunk-vhat5rbz.js → chunk-367b1yab.js} +2 -2
- package/dist/chunk-3nj26hhf.js +2 -0
- package/dist/{chunk-15nwm04a.js → chunk-3ryhmzsq.js} +2 -2
- package/dist/chunk-3wsg6710.js +2 -0
- package/dist/chunk-3x1eq95a.js +2 -0
- package/dist/chunk-4jagfjhm.js +2 -0
- package/dist/chunk-4pbh3fph.js +2 -0
- package/dist/chunk-5s2wpbdt.js +1 -0
- package/dist/chunk-5t3rrnfd.js +2 -0
- package/dist/chunk-5wyxvpgt.js +1 -0
- package/dist/chunk-61vxy6yd.js +1 -0
- package/dist/chunk-65jedxc3.js +4 -0
- package/dist/chunk-68y66m3v.js +2 -0
- package/dist/chunk-69yx37pv.js +3 -0
- package/dist/chunk-6d38ff76.js +2 -0
- package/dist/chunk-6j4g51ff.js +3 -0
- package/dist/chunk-6pq1xmwg.js +2 -0
- package/dist/chunk-6vqnsdgc.js +2 -0
- package/dist/chunk-76tkqx9n.js +2 -0
- package/dist/{chunk-jeyvacx6.js → chunk-78ew0821.js} +5 -5
- package/dist/chunk-7e1m1d9x.js +2 -0
- package/dist/chunk-88vkk9s3.js +2 -0
- package/dist/chunk-8bzk9e4v.js +2 -0
- package/dist/{chunk-8vvn71rf.js → chunk-8fn5n4yv.js} +2 -2
- package/dist/chunk-8p0074ye.js +2 -0
- package/dist/chunk-91trh8rj.js +2 -0
- package/dist/chunk-93q2dm10.js +1 -0
- package/dist/chunk-94k9byb1.js +2 -0
- package/dist/chunk-9c41y5hw.js +2 -0
- package/dist/chunk-9hqz5fbc.js +2 -0
- package/dist/chunk-a2ftkzak.js +1 -0
- package/dist/chunk-acrrwrzy.js +2 -0
- package/dist/{chunk-h0dq9ztv.js → chunk-an03g9e8.js} +2 -2
- package/dist/chunk-bwas6kp2.js +2 -0
- package/dist/chunk-c6w4bp15.js +1 -0
- package/dist/{chunk-801v0awm.js → chunk-cg97byvk.js} +1 -1
- package/dist/{chunk-42zr8zpv.js → chunk-cywx4qmv.js} +2 -2
- package/dist/chunk-d2rrvka6.js +2 -0
- package/dist/chunk-dcxprfnp.js +2 -0
- package/dist/chunk-dsdxw9s8.js +2 -0
- package/dist/{chunk-k7zzrns3.js → chunk-ehh31hzz.js} +1 -1
- package/dist/chunk-epqjzw63.js +2 -0
- package/dist/{chunk-j2mcvb68.js → chunk-f0sbnmcs.js} +6 -6
- package/dist/chunk-fwd1zewt.js +2 -0
- package/dist/{chunk-ea7zsd2s.js → chunk-fzetrkvd.js} +2 -2
- package/dist/chunk-gb2dmt6b.js +2 -0
- package/dist/chunk-gmhbqxcg.js +2 -0
- package/dist/chunk-gsq8mzr7.js +2 -0
- package/dist/{chunk-2f19pcpn.js → chunk-gtddnhdy.js} +2 -2
- package/dist/chunk-gwav4k8b.js +2 -0
- package/dist/chunk-gy63n5pz.js +2 -0
- package/dist/chunk-h05s12jn.js +3 -0
- package/dist/chunk-h7gq5y52.js +2 -0
- package/dist/chunk-h9tnsvjr.js +2 -0
- package/dist/chunk-hhw1pjz6.js +2 -0
- package/dist/{chunk-6qn5srgg.js → chunk-hjm26kwf.js} +1 -1
- package/dist/chunk-hmj7yqyb.js +3 -0
- package/dist/chunk-hmze7f10.js +2 -0
- package/dist/chunk-hrexfky6.js +2 -0
- package/dist/{chunk-1d4c9j8w.js → chunk-jd61cfkk.js} +2 -2
- package/dist/chunk-jwb3723b.js +2 -0
- package/dist/chunk-k2zg8xva.js +2 -0
- package/dist/chunk-kg1gk77d.js +2 -0
- package/dist/chunk-kh1tc15g.js +2 -0
- package/dist/chunk-m4mfw5s4.js +7 -0
- package/dist/{chunk-h6df4xfd.js → chunk-m5jhw1e6.js} +2 -2
- package/dist/{chunk-8e7xf2tb.js → chunk-mgt5j803.js} +1 -1
- package/dist/chunk-mv8jmv1e.js +2 -0
- package/dist/chunk-n4cseazv.js +3 -0
- package/dist/chunk-nb5wjv92.js +2 -0
- package/dist/{chunk-hx6wfscz.js → chunk-nx91ewps.js} +1 -1
- package/dist/chunk-p2s04v76.js +2 -0
- package/dist/chunk-pkgrt90z.js +2 -0
- 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-q7e2bdav.js → chunk-q98941j2.js} +2 -2
- package/dist/{chunk-h38yw8y3.js → chunk-qbdqh38y.js} +1 -1
- package/dist/chunk-qbj5s8qa.js +2 -0
- package/dist/chunk-qgfq5vrz.js +1 -0
- package/dist/chunk-qqdca2rm.js +2 -0
- package/dist/chunk-r7c0tca8.js +2 -0
- package/dist/chunk-r8z8f31m.js +2 -0
- package/dist/{chunk-ypvjzkfb.js → chunk-rd94eyan.js} +2 -2
- package/dist/chunk-rdtj6bad.js +2 -0
- package/dist/{chunk-bkbemt8g.js → chunk-rgkhm4s4.js} +2 -2
- package/dist/{chunk-v0zn87k5.js → chunk-rkqe8p8n.js} +2 -2
- package/dist/chunk-s44rx1sz.js +3 -0
- package/dist/{chunk-6qa5dt1k.js → chunk-scddkjv8.js} +1 -1
- package/dist/chunk-sj7jdb7m.js +1 -0
- package/dist/chunk-spt7tnqx.js +2 -0
- package/dist/{chunk-dgp9q950.js → chunk-sqh158m4.js} +1 -1
- package/dist/{chunk-5j3wnans.js → chunk-syv6gady.js} +2 -2
- package/dist/chunk-tpx841s3.js +2 -0
- package/dist/chunk-ttk21631.js +2 -0
- package/dist/chunk-twwqgd8e.js +2 -0
- package/dist/{chunk-8k7wzkna.js → chunk-tzjk7zkc.js} +2 -2
- package/dist/chunk-v5wwv2t9.js +4 -0
- package/dist/chunk-wf4tq3fn.js +1 -0
- package/dist/{chunk-9ab18v07.js → chunk-wjs8bwpk.js} +2 -2
- package/dist/chunk-wrs447cs.js +2 -0
- package/dist/chunk-x053g6f2.js +2 -0
- package/dist/chunk-xf14bg2v.js +4 -0
- package/dist/chunk-xfjcwypy.js +4 -0
- package/dist/{chunk-c4621n0b.js → chunk-xjtqdp82.js} +1 -1
- package/dist/chunk-xp0nfvxg.js +2 -0
- package/dist/chunk-xw0gvwh5.js +2 -0
- package/dist/{chunk-d8gwsw6j.js → chunk-y438yezf.js} +3 -3
- package/dist/chunk-y6r6tzfh.js +2 -0
- package/dist/chunk-yegh80h4.js +2 -0
- package/dist/chunk-yf2p44mq.js +2 -0
- package/dist/chunk-yg42bpjr.js +3 -0
- package/dist/chunk-yhmb3z56.js +2 -0
- package/dist/chunk-z3e38981.js +2 -0
- package/dist/{chunk-7kcdf82d.js → chunk-z4zm74ge.js} +2 -2
- package/dist/{chunk-cw9tg2sz.js → chunk-z75zbdq8.js} +1 -1
- package/dist/{chunk-t5nstx0k.js → chunk-zc2hdmk1.js} +2 -2
- package/dist/chunk-zjg9n6zj.js +2 -0
- package/dist/codex/activity-group.d.ts +2 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -2
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.d.ts +14 -0
- package/dist/codex/turn-activity.js +1 -0
- package/dist/codex/user-message.d.ts +3 -2
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -3
- 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 -3
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.d.ts +20 -0
- package/dist/conversation/action-card.js +1 -0
- package/dist/conversation/composer/composer.d.ts +21 -0
- package/dist/conversation/composer/composer.js +1 -0
- package/dist/conversation/composer/config-options.d.ts +6 -0
- package/dist/conversation/composer/config-options.js +1 -0
- package/dist/conversation/composer/context.d.ts +32 -0
- package/dist/conversation/composer/context.js +1 -0
- package/dist/conversation/composer/drafts.d.ts +15 -0
- package/dist/conversation/composer/drafts.js +1 -0
- package/dist/conversation/composer/file-items.d.ts +3 -0
- package/dist/conversation/composer/file-items.js +1 -0
- package/dist/conversation/composer/long-text.d.ts +14 -0
- package/dist/conversation/composer/long-text.js +1 -0
- package/dist/conversation/composer/mention-chips.d.ts +4 -0
- package/dist/conversation/composer/mention-chips.js +1 -0
- package/dist/conversation/composer/mention-uri.d.ts +7 -0
- package/dist/conversation/composer/mention-uri.js +1 -0
- package/dist/conversation/composer/model-menu.d.ts +26 -0
- package/dist/conversation/composer/model-menu.js +1 -0
- package/dist/conversation/composer/pasted-text-attachment.d.ts +5 -0
- package/dist/conversation/composer/pasted-text-attachment.js +1 -0
- package/dist/conversation/composer/permission-mode-menu.d.ts +8 -0
- package/dist/conversation/composer/permission-mode-menu.js +1 -0
- package/dist/conversation/composer/prediction.d.ts +6 -0
- package/dist/conversation/composer/prediction.js +1 -0
- package/dist/conversation/composer/slash-command-button.d.ts +8 -0
- package/dist/conversation/composer/slash-command-button.js +1 -0
- package/dist/conversation/composer/submit-button.d.ts +7 -0
- package/dist/conversation/composer/submit-button.js +1 -0
- package/dist/conversation/composer/usage-meter.d.ts +7 -0
- package/dist/conversation/composer/usage-meter.js +1 -0
- package/dist/conversation/context.d.ts +14 -0
- package/dist/conversation/context.js +1 -0
- package/dist/conversation/conversation-body.d.ts +7 -0
- package/dist/conversation/conversation-body.js +1 -0
- package/dist/conversation/conversation-view.d.ts +18 -0
- package/dist/conversation/conversation-view.js +1 -0
- package/dist/conversation/conversation.d.ts +18 -0
- package/dist/conversation/conversation.js +1 -0
- package/dist/conversation/diff-modal.d.ts +7 -0
- package/dist/conversation/diff-modal.js +1 -0
- package/dist/conversation/session-actions.d.ts +3 -0
- package/dist/conversation/session-actions.js +1 -0
- package/dist/conversation/types.d.ts +21 -0
- package/dist/conversation/types.js +0 -0
- 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 +1136 -0
- 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.d.ts +7 -0
- package/dist/session-list/archived-sessions.js +1 -0
- package/dist/session-list/highlight.d.ts +2 -0
- package/dist/session-list/highlight.js +1 -0
- package/dist/session-list/host.d.ts +43 -0
- package/dist/session-list/host.js +1 -0
- package/dist/session-list/hover-info-card.d.ts +21 -0
- package/dist/session-list/hover-info-card.js +1 -0
- package/dist/session-list/locales.d.ts +247 -0
- package/dist/session-list/locales.js +1 -0
- package/dist/session-list/navigation.d.ts +50 -0
- package/dist/session-list/navigation.js +1 -0
- package/dist/session-list/overflow-marquee.d.ts +2 -0
- package/dist/session-list/overflow-marquee.js +1 -0
- package/dist/session-list/row-stop-button.d.ts +4 -0
- package/dist/session-list/row-stop-button.js +1 -0
- package/dist/session-list/session-groups.d.ts +5 -0
- package/dist/session-list/session-groups.js +1 -0
- package/dist/session-list/session-info-card.d.ts +10 -0
- package/dist/session-list/session-info-card.js +1 -0
- package/dist/session-list/session-list.css +97 -0
- package/dist/session-list/session-list.d.ts +37 -0
- package/dist/session-list/session-list.js +1 -0
- package/dist/session-list/session-row.d.ts +10 -0
- package/dist/session-list/session-row.js +1 -0
- package/dist/session-list/session-state-dot.d.ts +10 -0
- package/dist/session-list/session-state-dot.js +1 -0
- package/dist/session-list/sidebar-overlay.d.ts +2 -0
- package/dist/session-list/sidebar-overlay.js +1 -0
- package/dist/session-list/trailing-swap.d.ts +11 -0
- package/dist/session-list/trailing-swap.js +1 -0
- package/dist/session-list/use-activity-preview.d.ts +2 -0
- package/dist/session-list/use-activity-preview.js +1 -0
- package/dist/session-list/use-project-sessions.d.ts +16 -0
- package/dist/session-list/use-project-sessions.js +1 -0
- package/dist/session-list/virtual-session-rows.d.ts +9 -0
- package/dist/session-list/virtual-session-rows.js +1 -0
- 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.d.ts +10 -0
- package/dist/ui/alert.js +1 -0
- 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.d.ts +11 -0
- package/dist/ui/empty.js +1 -0
- 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/input.js +1 -1
- package/dist/ui/kbd.d.ts +3 -0
- package/dist/ui/kbd.js +1 -0
- package/dist/ui/label.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/select.js +1 -0
- package/dist/ui/separator.js +1 -1
- package/dist/ui/skeleton.d.ts +2 -0
- package/dist/ui/skeleton.js +1 -0
- package/dist/ui/spinner.d.ts +2 -0
- package/dist/ui/spinner.js +1 -0
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +18 -5
- package/dist/chunk-16y5rmm5.js +0 -2
- package/dist/chunk-20zcgxa5.js +0 -4
- package/dist/chunk-2epnn4sq.js +0 -1
- package/dist/chunk-3vt71emt.js +0 -2
- package/dist/chunk-4svwa5p8.js +0 -3
- package/dist/chunk-4tkxmh52.js +0 -2
- package/dist/chunk-5grywgpq.js +0 -4
- package/dist/chunk-5h13saah.js +0 -2
- package/dist/chunk-6p5hgnpq.js +0 -1
- package/dist/chunk-9pdj44jr.js +0 -2
- package/dist/chunk-9s1cgt7s.js +0 -1
- package/dist/chunk-aqj0v5a9.js +0 -7
- package/dist/chunk-azmqtycn.js +0 -2
- package/dist/chunk-b5mkvr4d.js +0 -2
- package/dist/chunk-bfe7xk9m.js +0 -3
- package/dist/chunk-dm31xvh3.js +0 -2
- package/dist/chunk-dr6z453e.js +0 -2
- package/dist/chunk-fgsd4fsd.js +0 -2
- package/dist/chunk-fvnb8ds4.js +0 -2
- package/dist/chunk-h87xp1gv.js +0 -2
- package/dist/chunk-jh8jske0.js +0 -2
- package/dist/chunk-jn2pj92h.js +0 -2
- package/dist/chunk-jrrvpnf3.js +0 -1
- package/dist/chunk-jsb0zged.js +0 -2
- package/dist/chunk-k2y4cpra.js +0 -2
- package/dist/chunk-m2myfd89.js +0 -2
- package/dist/chunk-m2wxz0sj.js +0 -2
- package/dist/chunk-nxarfyj2.js +0 -2
- package/dist/chunk-p1pd1twf.js +0 -2
- package/dist/chunk-p6558tbk.js +0 -2
- package/dist/chunk-phe3an96.js +0 -2
- package/dist/chunk-qh5fhcrh.js +0 -3
- package/dist/chunk-sky795ex.js +0 -1
- package/dist/chunk-t3vgbc9s.js +0 -2
- package/dist/chunk-trgq8rq1.js +0 -2
- package/dist/chunk-v72t4sf9.js +0 -2
- package/dist/chunk-vw2hv2sq.js +0 -2
- package/dist/chunk-w3yddw6n.js +0 -2
- package/dist/chunk-x9pramem.js +0 -2
- package/dist/chunk-xjen1yt6.js +0 -2
package/dist/chunk-fvnb8ds4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-5grywgpq.js";import{textOf as S,turns as E}from"@alwith/api";import{codexMessageError as _,nativeTurnId as m}from"@nyssance/codex-acp-v2/client";function Cn(t){return t.kind==="tool"&&t.name==="mcp_startup"}function j(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Kt(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(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 M(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)M(i,e,n)}function K(t,e,n){switch(e.kind){case"user":break;case"assistant":{if(_(e)!==null){let i=m(e),u=t.errors.findIndex((c)=>i!==null&&m(c)===i);if(u===-1)t.errors.push(e);else t.errors[u]=e;break}let r=j(e);if(a(e._meta).length>0||r==="final_answer")t.final.push(e);else if(r==="commentary"||w(e)||r===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e);break;case"tool":if(T(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 Gt(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)=>!Cn(o))},c=new Map(n.map((o,s)=>[o.turnId,s])),d=[],p=[d],y,I=null;for(let o of u.items){let s=m(o),f=c.get(s??"");if(s!==null&&I!==null&&s!==I||f!==void 0&&y!==void 0&&f>y+1)d=[],p.push(d);if(d.push(o),s!==null||o.kind==="user")I=s;if(f!==void 0)y=f}return p.flatMap((o)=>E({...u,items:o})).map((o)=>{let s=o.prompt===null?[]:[o.prompt];for(let l of o.entries)M(l,s,i);let f=s[0];if(f===void 0)throw Error("A turn without items");let g=`turn:${f.kind}:${f.id}`,b=o.endedAt??Math.max(...s.map((l)=>l.at)),k=r.get(g);if(k!==void 0&&P(k.items,s)&&k.endedAt===b)return k;let x={key:g,user:o.prompt,work:[],final:[],errors:[],edits:[],startedAt:o.startedAt??f.at,endedAt:b,replayed:s.every((l)=>l.replayed),items:s},v=s.findLastIndex((l)=>l.kind!=="user"&&l.kind!=="compaction");return s.forEach((l,A)=>K(x,l,A<v)),x})}function P(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function h(t){return S(t.content)}function U(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Te(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Wt(t){let e=(i)=>{for(let u of t.items){let c=u._meta?.codex;if(typeof c!=="object"||c===null)continue;let d=c[i];if(typeof d==="number"&&Number.isFinite(d)&&d>=0)return d}return},n=e("workDurationMs"),r=e("turnDurationMs");return{durationMs:n??r,durationKind:n===void 0&&r!==void 0?"total":"work",startedAt:e("workStartedAt")}}function jt(t,e,n){if(n?.user==null)return!1;let r=e.items.map(m).find((u)=>u!==null),i=m(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 Qt(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(!jt(t,e[n-1],r))break;n--}return e[n]?.key}function Xt(t,e,n){let r=n,i=n;while(r>0&&jt(t,e[r-1],e[r]))r--;while(i+1<e.length&&jt(t,e[i],e[i+1]))i++;let u=e.slice(r,i+1),c=u.findLast((d)=>d.items.some((p)=>p.kind!=="user"))??u[0];return{continued:e[n]!==c,items:u.flatMap((d)=>d.items),edits:u.flatMap((d)=>d.edits),startedAt:u[0].startedAt}}
|
|
2
|
-
export{Cn,Kt,Gt,h,U,Te,Wt,jt,Qt,Xt};
|
package/dist/chunk-h87xp1gv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./chunk-azmqtycn.js";import{t}from"./chunk-vw2hv2sq.js";import{p}from"./chunk-fgsd4fsd.js";import{ContentBlock as s}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as u,isResourceLink as d}from"@alwith/api";import{jsx as n}from"react/jsx-runtime";function c({block:e,streaming:o}){let r=t();if(s.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(i,{text:e.text,streaming:o})})}if(s.isImage(e))return n(p,{block:e,generated:!0});if(s.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(d(e)||u(e))return n(p,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Q({content:e,messageId:o,streaming:r}){return e.map((a,m)=>n(c,{block:a,streaming:r},`${o}:${m}`))}
|
|
2
|
-
export{Q};
|
package/dist/chunk-jh8jske0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*te(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 En(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 te(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{te,En};
|
package/dist/chunk-jn2pj92h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$t}from"./chunk-9dsa5vm7.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 zt({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($t,{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{zt};
|
package/dist/chunk-jrrvpnf3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Checkbox as i}from"@base-ui/react/checkbox";import{cn as o}from"cn";import{CheckIcon as t}from"lucide-react";import{jsx as e}from"react/jsx-runtime";function P({className:r,...a}){return e(i.Root,{"data-slot":"checkbox",className:o("peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",r),...a,children:e(i.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e(t,{})})})}export{P};
|
package/dist/chunk-jsb0zged.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ut,N,ge,mt,pt,gt}from"./chunk-nxarfyj2.js";import{forwardRef as pe,useCallback as K,useEffect as me,useImperativeHandle as Re,useLayoutEffect as w,useMemo as re,useRef as s,useState as F}from"react";import{jsx as R,jsxs as ie}from"react/jsx-runtime";var He=12,j=2,q=800,fe=new Map;function Te({turnKey:W,heightPx:x,placeholder:_=!1,deferUntilReady:n=!1,observe:H,onReady:L,children:z}){let h=s(null),[T,U]=F(!1),G=K((m)=>{h.current=m,H(W,m)},[H,W]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let b=()=>{L(m),U(!0)};if(m.querySelector("[data-markdown-pending]")===null){b();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),b()});return d.observe(m,{childList:!0,subtree:!0}),()=>d.disconnect()},[L]),ie("div",{style:T?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:G,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":W,"aria-busy":!T||void 0,style:!T&&!_&&n?{visibility:"hidden"}:void 0,"data-turn-ready":T?"":void 0,children:z}),!T&&!_&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:ie("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var ct=pe(function({entries:x,renderTurn:_,scrollElement:n,sessionKey:H,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},T){let U=s(null),[G,m]=F(z),b=L!==void 0&&L!==null;w(()=>{let e=U.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[b]);let d=re(()=>fe.get(H),[H]),[J,Q]=F(()=>d?.turnHeightsByKey??{}),i=re(()=>ut({entries:x,gapPx:He,measuredHeightsByKey:J,leadingInsetPx:b?G:z}),[x,J,b,G,z]),xe=re(()=>{let e=N({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:j,viewportHeightPx:q}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return ge({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,oe]=F(xe),[y,ue]=F(q),[c,ae]=F(null),k=s(d?.distanceFromBottomPx??0),S=s(M),se=s(i.turnKeys),l=s(J),E=s(i),ce=s(i),P=s(new Map),v=s(null),C=s(null),D=s(null),O=s(new Map),Y=s(!1),de=s(()=>{}),A=s(null),le=K(()=>{if(!h||n===null||v.current!==null||A.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=E.current.turnIndexByKey.get(r),B=g===void 0?a.height:E.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)A.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Z=s(le);Z.current=le;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=N({distanceFromBottomPx:o,layout:i,overscanCount:j,viewportHeightPx:t}),u=S.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(k.current=o,S.current=a,se.current=i.turnKeys,ue(t),a!==u)oe(a)},[i]),V=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),ye=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Z.current();let r={...l.current,[t]:o};l.current=r,Q(r)},[]),ee=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);O.current.set(r,u)}if(D.current!==null||O.current.size===0)return;D.current=requestAnimationFrame(()=>{D.current=null;let t=[...O.current].filter(([r,u])=>l.current[r]!==u);if(O.current.clear(),t.length===0)return;Z.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,Q(o)})}),C.current},[]),ve=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)ee().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),ee().observe(t)},[ee]);me(()=>()=>{if(C.current?.disconnect(),D.current!==null)cancelAnimationFrame(D.current);O.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{de.current=()=>{if(n===null)return;let e=V(n);if(v.current!==null){k.current=e,ue(n.clientHeight||q);return}p(e,n.clientHeight||q)}},[V,n,p]),w(()=>{if(n===null)return;if(!Y.current){Y.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?E.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>de.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,Q(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=gt({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||q),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ae(null)})},[i,c,n,p]),w(()=>{let e=ce.current;if(ce.current=i,E.current=i,n===null||c!==null){A.current=null;return}let t=A.current;A.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(V(n),n.clientHeight);return}let r=k.current;if(h&&e!==i&&Y.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=V(n);if(u<=96&&!h){p(u,y);return}let a=N({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=mt({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,V,n,p,y,h]),w(()=>{S.current=M},[M]),me(()=>()=>{v.current?.complete(),v.current=null;let e=S.current,o=E.current.turnKeys[e.startIndex];fe.set(H,{distanceFromBottomPx:k.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[H]),Re(T,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=pt({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=N({distanceFromBottomPx:a,layout:i,overscanCount:j,viewportHeightPx:y});return S.current=g,oe(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ae(f)})}}),[i,y]);let I=M,X=se.current;if(!(X===i.turnKeys||X.length===i.turnKeys.length&&X.every((e,t)=>e===i.turnKeys[t]))){let e=X[M.startIndex];I=(e===void 0?null:ge({anchorKey:e,layout:i,previousRange:M}))??N({distanceFromBottomPx:k.current,layout:i,overscanCount:j,viewportHeightPx:y})}let te=x.length-1,he=x[te],ne=x.slice(I.startIndex,Math.min(I.endIndex,te)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(he!==void 0)ne.push({entry:he,index:te});return ie("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":ne.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[b&&R("div",{ref:U,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),ne.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(Te,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:ve,onReady:ye,children:_(e,t)})},e.turnKey))]})});
|
|
2
|
-
export{ct};
|
package/dist/chunk-k2y4cpra.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-aqj0v5a9.js";import{St}from"./chunk-p6558tbk.js";import{t}from"./chunk-vw2hv2sq.js";import{p}from"./chunk-fgsd4fsd.js";import{isContentEntry as a,isEmbeddedResource as f,isResourceLink as g}from"@alwith/api";import{memo as k,useMemo as y}from"react";import{jsx as s,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(a).filter((e)=>f(e.content)||g(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(p,{block:e.content},`${n.id}:${l}`))]})}var It=k(function({sessionId:r,items:e,terminals:l,streamingThoughtId:m}){let i=t().toolBlock,d=y(()=>e.map((o)=>{let c={...St(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(T,{children:[s(O,{blocks:d}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
-
export{It};
|
package/dist/chunk-m2myfd89.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function cn(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function Le(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(cn(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Ae(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function un(t){return[...t].filter((e)=>!s(e)).join("")}function rn(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function q(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=un(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-rn(e,o)),r=Math.max(0,i-rn(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{cn,Le,Ae,un,rn,q};
|
package/dist/chunk-m2wxz0sj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-azmqtycn.js";import{d}from"./chunk-trgq8rq1.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@alwith/api";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function M(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let r=[];for(let[c,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))r.push({key:`${e.id}:${c}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))r.push({key:`${e.id}:${c}`,path:i.uri,alt:i.name})}if(r.length)return r;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:r,openImageGallery:a,openImage:c,t:l}=n(),[i,y]=v({}),[x,I]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,u=JSON.parse(h);y({});for(let o of u)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&r?r(o.path):Promise.reject(Error("Image loading is unavailable"))).then((m)=>{if(t)y((g)=>({...g,[o.key]:{src:m}}))},()=>{if(t)y((m)=>({...m,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,r,x]);let k=e.flatMap((t)=>{let u=i[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return s("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let o=i[t.key];if(!o)return s("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:s(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((p)=>p+1),children:s(R,{"aria-hidden":"true"})},t.key);return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let p=e.slice(0,u).filter((m)=>{let g=i[m.key];return g&&"src"in g}).length;if(a)a(k,p);else c?.(o.src)},children:s("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Nt({blocks:e}){let{t:r}=n(),a=e.flatMap(T),[c,l]=d(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[s(S,{className:"codex-activity-icon","aria-hidden":"true"}),s("span",{className:"codex-activity-leading",children:r("stream.codex.viewedImages",{count:a.length})})]}),s(C,{className:c?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),c&&s(E,{images:a})]})}
|
|
2
|
-
export{M,Nt};
|
package/dist/chunk-nxarfyj2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Gn=280;function ut({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function N({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function ge({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function mt({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function pt({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function gt({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
-
export{Gn,ut,N,ge,mt,pt,gt};
|
package/dist/chunk-p1pd1twf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a=(e)=>String(e).padStart(2,"0");function z(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
|
|
2
|
-
export{z};
|
package/dist/chunk-p6558tbk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as g}from"@alwith/api";function St(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{St};
|
package/dist/chunk-phe3an96.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function Y({name:p,value:P,levels:h,disabled:c,onChange:v}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===P)),[M,d]=k(null),l=y(null),[I,b]=k(null),x=y(0),s=M??I??g,w=(t)=>{let n=++x.current;b(t);let e=()=>{if(x.current===n)b(null)};try{Promise.resolve(v(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=76,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
-
export{Y};
|
package/dist/chunk-qh5fhcrh.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{fe,he}from"./chunk-bfe7xk9m.js";import{a}from"./chunk-5grywgpq.js";import{t}from"./chunk-vw2hv2sq.js";import{It}from"./chunk-k2y4cpra.js";import{Q}from"./chunk-h87xp1gv.js";import{vt}from"./chunk-3vt71emt.js";import{bt}from"./chunk-jeyvacx6.js";import{Et}from"./chunk-4tkxmh52.js";import{ye,we}from"./chunk-8k7wzkna.js";import{z}from"./chunk-p1pd1twf.js";import{Kt,h,U,Wt}from"./chunk-fvnb8ds4.js";import{isContentEntry as ge,isEmbeddedResource as ee,isImage as te,isResourceLink as pe,isText as ue}from"@alwith/api";import{codexMessageError as X,codexTurnError as Y,nativeTurnId as ke}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as xe,SparklesIcon as Te}from"lucide-react";import{memo as Ie}from"react";import{jsx as s,jsxs as l,Fragment as W}from"react/jsx-runtime";function Z(r){if(te(r))return`${r.mimeType.toLowerCase()}:${r.data}`;if(ee(r)&&"blob"in r.resource&&r.resource.mimeType?.toLowerCase().startsWith("image/"))return`${r.resource.mimeType.toLowerCase()}:${r.resource.blob}`;return null}function u({sessionId:r,entry:n,terminals:d,streaming:o,streamingThoughtId:w}){let{t:m}=t();switch(n.kind){case"activity":return s(It,{sessionId:r,items:n.items,terminals:d,streamingThoughtId:w});case"text":return s(Q,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Et,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return l(ye,{children:[s("div",{children:m("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return l("div",{className:"codex-context-compaction",children:[s(Te,{"aria-hidden":"true"}),s("span",{children:n.item.status==="completed"?m("stream.codex.contextCompacted"):m("timeline.compacting")})]})}}function Ce({sessionId:r,turn:n,terminals:d,active:o,blocked:w=!1,continued:m=!1,edits:F=n.edits,activityItems:C=n.items,workStartedAt:ne=n.startedAt,isLast:O,error:f,interrupted:P,retry:G,retrying:p,answerActions:K,footer:se}){let{t:c}=t(),N=n.errors.map((e)=>{let i=X(e);if(i===null)throw Error("Turn error item is missing its diagnostics");let I=G?.turnId===ke(e)?G:void 0;return s(we,{error:i,retry:I},`${e.id}:${I?.delaySeconds??"manual"}`)});if(O&&f!==null&&!n.errors.some((e)=>{let i=X(e);return i!==null&&i.stopReason===f.stopReason&&Y(i).message===Y(f).message}))N.push(s(we,{error:f},"current-run-error"));let A=N.length>0?s("div",{className:"codex-turn-errors",children:N}):null,b=n.work.filter((e)=>e.kind==="compaction"&&e.item.status==="completed"),v=n.work.filter((e)=>!b.includes(e)),ie=b.length>0&&v.length===0&&n.final.length===0;if(Kt(n)||ie)return l(W,{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(u,{sessionId:r,entry:e,terminals:d,streaming:!1,streamingThoughtId:null},e.key))}),A]});let E=U(n),y=C.findLast((e)=>e.kind!=="user"),R=o&&y?.kind==="thought"?y.id:null,B=n.final.filter((e)=>a(e._meta).length===0).map(h).join(`
|
|
2
|
-
`),k=o?null:z(n,"assistant"),H=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),V=new Set(n.final.flatMap((e)=>e.content.map(Z).filter((i)=>i!==null))),S=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(ge).flatMap((i,I)=>{let g=i.content,de=e.name==="image_generation"&&te(g),ce=e.toolKind!=="read"&&e.toolKind!=="search"&&(pe(g)||ee(g)&&("blob"in g.resource));if(!de&&!ce)return[];let M=Z(g);if(M!==null){if(V.has(M))return[];V.add(M)}return[{key:`${e.id}:${I}`,block:g}]})}),x=n.final.some((e)=>a(e._meta).length===0&&e.content.some((i)=>!ue(i)||i.text.trim().length>0)),oe=H.length>0||S.length>0||x||n.final.some((e)=>a(e._meta).length>0),T=n.items.findIndex((e)=>n.final.includes(e)),_=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),j=v.filter((e)=>T===-1||_(e)<T),J=v.filter((e)=>T!==-1&&_(e)>T),re=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...J.map((e)=>({kind:"work",entry:e,index:_(e)}))].toSorted((e,i)=>e.index-i.index),ae=o&&(!x||J.length>0),me=C.some((e)=>e.kind==="tool"&&(e.status==="pending"||e.status==="in_progress")),L=y?._meta?.codex,le=y?.kind==="assistant"&&!(typeof L==="object"&&L!==null&&("messageCompletedAt"in L)),q=ae&&!w&&!me&&!le&&R===null&&p===void 0,D=Wt({...n,items:C});return l(W,{children:[s(he,{stateKey:JSON.stringify([r,n.key]),active:o&&!x,defaultExpanded:P||E||o&&!x,...D,startedAt:D.startedAt??ne,loading:q&&n.work.length===0,work:m?[]:j.map((e)=>s(u,{sessionId:r,entry:e,terminals:d,streaming:o,streamingThoughtId:R},e.key)),answer:oe||m?l("div",{className:"flex min-w-0 flex-col gap-3",children:[m&&j.map((e)=>s(u,{sessionId:r,entry:e,terminals:d,streaming:!1,streamingThoughtId:null},e.key)),re.map((e)=>{if(e.kind==="work")return s(u,{sessionId:r,entry:e.entry,terminals:d,streaming:o,streamingThoughtId:R},e.entry.key);let i=e.item;return a(i._meta).length>0?s(vt,{sessionId:r,item:i},i.id):s(Q,{content:i.content,messageId:i.id,streaming:o},i.id)}),H.map((e)=>l("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),l("span",{className:"codex-image-generation-status",children:[o&&s(xe,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),c(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),S.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:S.map((e)=>s(Q,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),!o&&!m&&(B.trim().length>0?s(fe,{text:B,isMostRecentTurn:O,time:k,afterCopy:K}):l("div",{className:"flex items-center gap-0.5",children:[K,k&&s("span",{className:"codex-user-time ms-1",title:k.full,children:k.short})]}))]}):null,footer:l(W,{children:[q&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:c("message.thinking")})}),b.map((e)=>s(u,{sessionId:r,entry:e,terminals:d,streaming:!1,streamingThoughtId:null},e.key)),se,F.length>0&&!o&&!m&&s(bt,{items:F}),(P||E)&&s("div",{className:"codex-interrupted-turn",role:"status",children:c(E?"timeline.historyInterrupted":"timeline.interrupted")}),!o&&A]})}),o&&p!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&A]})}var ft=Ie(Ce);
|
|
3
|
-
export{ft};
|
package/dist/chunk-sky795ex.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-hx6wfscz.js";import{B}from"./chunk-h38yw8y3.js";import{cva as p}from"class-variance-authority";import{cn as l}from"cn";import{useMemo as u}from"react";import{jsx as t,jsxs as m}from"react/jsx-runtime";function ne({className:a,...e}){return t("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",a),...e})}function re({className:a,variant:e="legend",...d}){return t("legend",{"data-slot":"field-legend","data-variant":e,className:l("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",a),...d})}function Fe({className:a,...e}){return t("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",a),...e})}var c=p("group/field data-[invalid=true]:text-destructive flex w-full gap-3",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function De({className:a,orientation:e="vertical",...d}){return t("div",{role:"group","data-slot":"field","data-orientation":e,className:l(c({orientation:e}),a),...d})}function Rn({className:a,...e}){return t("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1 leading-snug",a),...e})}function Be({className:a,...e}){return t(o,{"data-slot":"field-label",className:l("group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}function Ln({className:a,...e}){return t("div",{"data-slot":"field-label",className:l("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",a),...e})}function G({className:a,...e}){return t("p",{"data-slot":"field-description",className:l("text-muted-foreground text-left text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),...e})}function An({children:a,className:e,...d}){return m("div",{"data-slot":"field-separator","data-content":!!a,className:l("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",e),...d,children:[t(B,{className:"absolute inset-0 top-1/2"}),a&&t("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:a})]})}function _n({className:a,children:e,errors:d,...n}){let s=u(()=>{if(e)return e;if(!d?.length)return null;let i=[...new Map(d.map((r)=>[r?.message,r])).values()];if(i?.length==1)return i[0]?.message;return t("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:i.map((r,f)=>r?.message&&t("li",{children:r.message},f))})},[e,d]);if(!s)return null;return t("div",{role:"alert","data-slot":"field-error",className:l("text-destructive text-sm font-normal",a),...n,children:s})}export{ne,re,Fe,De,Rn,Be,Ln,G,An,_n};
|
package/dist/chunk-t3vgbc9s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as tt,useMemo as D,useRef as I,useState as B}from"react";import{jsx as G}from"react/jsx-runtime";var C=d(null),Z=d(null);function Pn(){return i(Z)}var J=d(null);function Nn(){return i(J)}var S=d(null);function _e(){let r=i(C);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var E=()=>i(C);function Mn(){let r=i(S);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var et=()=>i(S);function Sn({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:F,attachmentPolicy:f,value:A,onValueChange:R,attachments:U,onAttachmentsChange:L,children:K}){let T=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),W=A!==void 0,[N,Q]=B(r),p=A??N,o=I({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let j=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,W)R?.(t);else Q(t)},[W,R]),g=n(()=>P(""),[P]),x=U!==void 0,[V,X]=B([]),v=U??V,h=I(v);h.current=v;let s=n((t)=>{let e=typeof t==="function"?t(h.current):t;if(x)L?.(e);else X(e)},[x,L]),w=I(null),O=I(()=>{}),M=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let z=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:T(u),filename:u.name,size:u.size,lastModified:u.lastModified,...z===void 0?{}:{sourcePath:z}}})]})},[f,T,s]),k=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),F?.()},[F,s]),H=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);tt(()=>{if(x)return;return()=>{for(let t of h.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let _=n(()=>{O.current?.()},[]),b=D(()=>({files:v,add:M,remove:k,clear:H,openFileDialog:_,fileInputRef:w}),[v,M,k,H,_]),q=n((t,e)=>{w.current=t.current,O.current=e},[]),Y=D(()=>({textInput:{value:p,setInput:P,clear:g,getRevision:j,clearSubmitted:c??g},attachments:b,__registerFileInput:q}),[p,P,g,j,c,b,q]);return G(C.Provider,{value:Y,children:G(S.Provider,{value:b,children:K})})}var ee=d(null);function y(){let r=et(),l=i(ee),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
-
export{Z,Pn,J,Nn,S,_e,E,Mn,Sn,ee,y};
|
package/dist/chunk-trgq8rq1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as r,useState as x}from"react";var t=new Map;function d(o,e,k=!1){let[p,S]=x(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||k&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let b=r((c)=>{S((s)=>{let f=s.key===o?s.expanded:t.get(o)??e,a=typeof c==="function"?c(f):c;return t.set(o,a),s.key===o?{key:o,expanded:a}:s})},[o,e]);return[n,b]}
|
|
2
|
-
export{d};
|
package/dist/chunk-v72t4sf9.js
DELETED
package/dist/chunk-vw2hv2sq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{en}from"./chunk-azmqtycn.js";import{createContext as r,useContext as s,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var l=r(null),c=r(null);function Me({host:e,client:n,children:i}){return o(en,{host:e,children:o(l,{value:e,children:o(c,{value:n,children:i})})})}function t(){let e=s(l);if(e===null)throw Error("Timeline host is missing");return e}function b(){let e=s(c);if(e===null)throw Error("Timeline client is missing");return e}function Se(e,n){return u((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function g(e){let n=b();return Se(n.store,e)}function V(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{Me,t,b,Se,g,V};
|
package/dist/chunk-w3yddw6n.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ct}from"./chunk-q7e2bdav.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 xe({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(Ct,{src:c,alt:"",onClose:()=>i(!1)})]})}function kt({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(xe,{text:o,label:f("actions.copy")}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
|
|
2
|
-
export{xe,kt};
|
package/dist/chunk-x9pramem.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createStore as l}from"@alwith/api/client";var Ee=l({sessionId:null,turns:[],api:null,beforeReveal:null});function tn(e){Ee.setState(e)}function nn(e){if(Ee.getState().sessionId===e)Ee.setState({sessionId:null,turns:[],api:null,beforeReveal:null})}async function tr(e,t,n){let i=Ee.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{Ee,tn,nn,tr};
|
package/dist/chunk-xjen1yt6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{pe,lt}from"./chunk-h6df4xfd.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function X(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=pe(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function In(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return lt(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
|
|
2
|
-
export{X,In};
|