@alwith/module-chat 0.5.2 → 0.5.3
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.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-0j15twx6.js +2 -0
- package/dist/chunk-0n82kdek.js +2 -0
- package/dist/chunk-0pa5t12s.js +2 -0
- package/dist/chunk-0vvn08gg.js +2 -0
- package/dist/chunk-14a9wet3.js +2 -0
- package/dist/chunk-1dp50khb.js +2 -0
- package/dist/{chunk-7q7c0mds.js → chunk-1hy64ewz.js} +1 -1
- package/dist/chunk-1wc83vxg.js +2 -0
- package/dist/chunk-20bww40d.js +2 -0
- package/dist/chunk-20gtemb9.js +2 -0
- package/dist/chunk-20re64ta.js +2 -0
- package/dist/{chunk-bkbemt8g.js → chunk-23wzpgbs.js} +2 -2
- package/dist/{chunk-w3yddw6n.js → chunk-2b185a0a.js} +2 -2
- package/dist/chunk-2snmjnz9.js +2 -0
- package/dist/{chunk-p6558tbk.js → chunk-2sy8cs84.js} +2 -2
- package/dist/chunk-30g0y24x.js +2 -0
- package/dist/chunk-33mgpcnd.js +2 -0
- package/dist/chunk-3jcxkpvs.js +2 -0
- package/dist/chunk-3m06tqqk.js +2 -0
- package/dist/{chunk-d8gwsw6j.js → chunk-3nmqebb6.js} +3 -3
- package/dist/chunk-4d8q9bpy.js +2 -0
- package/dist/chunk-4dcagj01.js +1 -0
- package/dist/chunk-4mnf89r3.js +1 -0
- package/dist/{chunk-6qn5srgg.js → chunk-51qsyrd6.js} +1 -1
- package/dist/{chunk-15nwm04a.js → chunk-543v9eke.js} +2 -2
- package/dist/chunk-61vxy6yd.js +1 -0
- package/dist/chunk-67txww0x.js +2 -0
- package/dist/{chunk-vhat5rbz.js → chunk-691gxr2e.js} +2 -2
- package/dist/chunk-6fht8rx9.js +2 -0
- package/dist/{chunk-jn2pj92h.js → chunk-6ndz2pf9.js} +2 -2
- package/dist/chunk-7gaper2w.js +2 -0
- package/dist/chunk-802bgza1.js +2 -0
- package/dist/chunk-86kkb0z4.js +2 -0
- package/dist/{chunk-j2mcvb68.js → chunk-87t0qtkr.js} +6 -6
- package/dist/{chunk-dgp9q950.js → chunk-8kjsqjy6.js} +1 -1
- package/dist/chunk-8mvg9a32.js +2 -0
- package/dist/chunk-8r010kvn.js +1 -0
- package/dist/chunk-9bjywaze.js +1 -0
- package/dist/chunk-9hqz5fbc.js +2 -0
- package/dist/chunk-9v2gk9ex.js +2 -0
- package/dist/chunk-9x4et210.js +2 -0
- package/dist/{chunk-801v0awm.js → chunk-a7mr12yc.js} +1 -1
- package/dist/chunk-aaqk0jrt.js +2 -0
- package/dist/chunk-acrrwrzy.js +2 -0
- package/dist/chunk-asxwsg2p.js +2 -0
- package/dist/{chunk-ypvjzkfb.js → chunk-awrzpp7x.js} +2 -2
- package/dist/{chunk-8vvn71rf.js → chunk-aygzz2yg.js} +2 -2
- package/dist/chunk-b5g1j1zv.js +2 -0
- package/dist/{chunk-2f19pcpn.js → chunk-bycbj1aq.js} +2 -2
- package/dist/chunk-cgxcxfh1.js +3 -0
- package/dist/chunk-cj5pkg2y.js +4 -0
- package/dist/chunk-ckp6661s.js +2 -0
- package/dist/chunk-cr294svm.js +1 -0
- package/dist/chunk-ctedwb0a.js +3 -0
- package/dist/chunk-cw68hvkc.js +1 -0
- package/dist/chunk-czahfwp7.js +2 -0
- package/dist/chunk-d25r0vq3.js +2 -0
- package/dist/chunk-d4yhdesy.js +2 -0
- package/dist/{chunk-6qa5dt1k.js → chunk-d6nxypzc.js} +1 -1
- package/dist/{chunk-9ab18v07.js → chunk-dfengqjx.js} +2 -2
- package/dist/chunk-dnn8064m.js +2 -0
- package/dist/chunk-dqw30cz4.js +2 -0
- package/dist/chunk-dzydvx7r.js +4 -0
- package/dist/{chunk-8e7xf2tb.js → chunk-e3mkvx24.js} +1 -1
- package/dist/chunk-e43pfcrt.js +2 -0
- package/dist/{chunk-hx6wfscz.js → chunk-ek06eyp4.js} +1 -1
- package/dist/chunk-eyre28p1.js +2 -0
- package/dist/chunk-fqj76wq8.js +2 -0
- package/dist/chunk-h4sw0pez.js +2 -0
- package/dist/chunk-h80g3eme.js +2 -0
- package/dist/{chunk-d675nr2b.js → chunk-hesyytcd.js} +2 -2
- package/dist/{chunk-5j3wnans.js → chunk-hmtgx7fw.js} +2 -2
- package/dist/chunk-hr9d9zpb.js +2 -0
- package/dist/chunk-hwwhxb3x.js +1 -0
- package/dist/chunk-j4teycge.js +2 -0
- package/dist/{chunk-ea7zsd2s.js → chunk-jdv29apq.js} +2 -2
- package/dist/chunk-jf5651fz.js +2 -0
- package/dist/{chunk-b5mkvr4d.js → chunk-jmx0awnf.js} +2 -2
- package/dist/{chunk-h0dq9ztv.js → chunk-jnfp7j32.js} +2 -2
- package/dist/{chunk-cw9tg2sz.js → chunk-k50475tn.js} +1 -1
- package/dist/{chunk-42zr8zpv.js → chunk-kbvkr5mr.js} +2 -2
- package/dist/chunk-maepz12p.js +3 -0
- package/dist/chunk-maj7m5s7.js +4 -0
- package/dist/chunk-mgakm5yv.js +2 -0
- package/dist/chunk-mk10tgjk.js +2 -0
- package/dist/{chunk-t5nstx0k.js → chunk-mmdpwbef.js} +2 -2
- package/dist/chunk-n3raktzz.js +2 -0
- package/dist/{chunk-c4621n0b.js → chunk-ncekagm6.js} +1 -1
- package/dist/chunk-npjw8dm5.js +2 -0
- package/dist/chunk-p0cc67an.js +2 -0
- package/dist/{chunk-9dsa5vm7.js → chunk-pb6xtb3n.js} +2 -2
- package/dist/chunk-pcngn73n.js +2 -0
- package/dist/chunk-ptt7q7za.js +3 -0
- package/dist/{chunk-7kcdf82d.js → chunk-px7xxz3v.js} +2 -2
- package/dist/{chunk-h38yw8y3.js → chunk-qbdqh38y.js} +1 -1
- package/dist/chunk-qf3a35g4.js +2 -0
- package/dist/chunk-qpz97p1m.js +1 -0
- package/dist/chunk-r41p7378.js +2 -0
- package/dist/{chunk-h6df4xfd.js → chunk-r6e2abj6.js} +2 -2
- package/dist/{chunk-v0zn87k5.js → chunk-rkqe8p8n.js} +2 -2
- package/dist/{chunk-8k7wzkna.js → chunk-rqbbb37p.js} +2 -2
- package/dist/chunk-rzajhyrq.js +2 -0
- package/dist/chunk-sc746nr6.js +2 -0
- package/dist/chunk-sgbde4dv.js +2 -0
- package/dist/chunk-st90r31c.js +1 -0
- package/dist/{chunk-6vky4fcv.js → chunk-t2ceq16d.js} +2 -2
- package/dist/chunk-t9vvcy09.js +3 -0
- package/dist/chunk-tgb70x2n.js +2 -0
- package/dist/chunk-tj44vjyv.js +2 -0
- package/dist/chunk-tptnjbrd.js +2 -0
- package/dist/chunk-tre0r8qm.js +2 -0
- package/dist/chunk-vxnjsga5.js +2 -0
- package/dist/chunk-vyzzs0nc.js +7 -0
- package/dist/chunk-w0y1svj7.js +3 -0
- package/dist/{chunk-1d4c9j8w.js → chunk-w2tmm1va.js} +2 -2
- package/dist/{chunk-jeyvacx6.js → chunk-w92s8704.js} +5 -5
- package/dist/chunk-w99ah6qt.js +3 -0
- package/dist/chunk-wf4tq3fn.js +1 -0
- package/dist/chunk-wqwqx3hc.js +2 -0
- package/dist/chunk-wtk721nx.js +2 -0
- package/dist/chunk-x3b4dpac.js +2 -0
- package/dist/chunk-x71x2atx.js +2 -0
- package/dist/chunk-xem94nq0.js +4 -0
- package/dist/chunk-yx02h2ja.js +2 -0
- package/dist/chunk-z8fdvq3v.js +2 -0
- package/dist/{chunk-k7zzrns3.js → chunk-zcrct67v.js} +1 -1
- package/dist/chunk-zjg9n6zj.js +2 -0
- package/dist/chunk-zwvyfjj8.js +2 -0
- package/dist/chunk-zy6338m6.js +2 -0
- package/dist/{chunk-q7e2bdav.js → chunk-zzwnpk4q.js} +2 -2
- 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/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 +17 -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 +1120 -0
- package/dist/locales.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/archived-sessions.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 +95 -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.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.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 +16 -3
- 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-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-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-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-x9pramem.js +0 -2
- package/dist/chunk-xjen1yt6.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{O,F}from"./chunk-4dcagj01.js";import{e}from"./chunk-a7mr12yc.js";import{d,u,b,z,m,w}from"./chunk-cw68hvkc.js";import{l}from"./chunk-1hy64ewz.js";import{qt,Vt,Gt,oo,K}from"./chunk-hwwhxb3x.js";import{ve}from"./chunk-61vxy6yd.js";import{g,s,r}from"./chunk-33mgpcnd.js";import{Q,E,he,B}from"./chunk-1dp50khb.js";import{cn as me}from"cn";import{ArchiveIcon as pe,FolderIcon as Y,ListFilterIcon as fe,SearchIcon as ge,Trash2Icon as Z}from"lucide-react";import{useEffect as xe,useRef as Se,useState as h}from"react";import{jsx as i,jsxs as n}from"react/jsx-runtime";function ee({className:p,...a}){return i(oo,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...a,className:me("max-w-(--available-width) min-w-0 p-1",p)})}function _(p){return p instanceof Error?p.message:String(p)}function ye({children:p}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:p})})}function fr({Scroll:p=ye}){let{t:a,i18n:T}=g(),f=s(),L=r((t)=>t.archivedSessions),k=r((t)=>t.connection),[V,te]=h(""),[N,se]=h("all"),[v,ie]=h("all"),[re,ae]=h(0),[H,U]=h(!0),[q,G]=h(null),[R,W]=h(null),[D,A]=h(!1),x=Se(!1),[I,S]=h(null),[J,j]=h(null),[ne,M]=h(!1);xe(()=>{if(k!=="ready")return;let t=!1;U(!0),G(null);async function c(){try{await f.listArchived({reset:!0});let o=new Set;while(!t&&f.state.archivedCursor!==null){let y=f.state.archivedCursor;if(o.has(y))throw Error("Archive pagination returned a repeated cursor");o.add(y),await f.listArchived()}}catch(o){if(!t)G(_(o))}finally{if(!t)U(!1)}}return c(),()=>{t=!0}},[f,k,re]);let P=!(k==="ready"&&!H&&q===null)||D,C=(t)=>t.title??a("sessionList.untitled"),le=[...new Set(L.filter((t)=>!E(t.cwd)).map((t)=>t.cwd))].toSorted(),oe=V.trim().toLocaleLowerCase(T.language),X=L.filter((t)=>{let c=E(t.cwd);return C(t).toLocaleLowerCase(T.language).includes(oe)&&(N==="all"||(N==="quick"?c:!c))&&(v==="all"||(v==="quick"?c:t.cwd===v))}),ce=new Intl.DateTimeFormat(T.language,{dateStyle:"medium",timeStyle:"short"});async function ue(t){if(x.current)return;x.current=!0,A(!0),W(null);try{await f.unarchive(t.sessionId)}catch(c){W(_(c))}finally{x.current=!1,A(!1)}}async function de(){if(x.current||!I)return;x.current=!0,A(!0),j(null);let t=[],c=[];try{for(let o of I){if(!f.state.archivedSessions.some((y)=>y.sessionId===o.sessionId))continue;try{await f.delete(o.sessionId)}catch(y){t.push(o),c.push(`${C(o)}: ${_(y)}`)}}if(t.length)S(t),j(c.join(`
|
|
2
|
+
`));else S(null)}finally{x.current=!1,A(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":a("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex shrink-0 flex-wrap items-center justify-between gap-4",children:[i("h1",{className:"text-2xl font-semibold tracking-tight",children:a("sessionList.archives.title")}),n(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:P||L.length===0,onClick:()=>{j(null),M(!0),S([...L])},children:[i(Z,{"aria-hidden":"true"}),a("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[i(ge,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":a("sessionList.archives.search"),placeholder:a("sessionList.archives.search"),value:V,onChange:(t)=>te(t.target.value),className:"rounded-md ps-9"})]}),n(qt,{value:N,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");se(t)},children:[n(Gt,{"aria-label":a("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(fe,{"aria-hidden":"true"}),i(Vt,{children:a(`sessionList.archives.${N==="all"?"allChats":N==="quick"?"quickChats":"projectChats"}`)})]}),n(ee,{children:[i(K,{value:"all",children:a("sessionList.archives.allChats")}),i(K,{value:"quick",children:a("sessionList.archives.quickChats")}),i(K,{value:"project",children:a("sessionList.archives.projectChats")})]})]}),n(qt,{value:v,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");ie(t)},children:[n(Gt,{"aria-label":a("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Vt,{className:"truncate",children:v==="all"?a("sessionList.archives.allProjects"):v==="quick"?a("sessionList.archives.noProject"):B(v)})]}),n(ee,{children:[i(K,{value:"all",children:a("sessionList.archives.allProjects")}),i(K,{value:"quick",children:a("sessionList.archives.noProject")}),le.map((t)=>i(K,{value:t,title:t,children:B(t)},t))]})]})]}),n(p,{children:[k!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:a("sessionList.archives.connecting")}):H?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(ve,{}),a("sessionList.archives.loading")]}):q?i(O,{variant:"destructive",children:n(F,{className:"flex items-center justify-between gap-4",children:[i("span",{children:q}),i(e,{variant:"outline",onClick:()=>ae((t)=>t+1),children:a("sessionList.archives.retry")})]})}):L.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(pe,{"aria-hidden":"true",className:"size-8"}),i("p",{children:a("sessionList.archives.empty")})]}):X.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:a("sessionList.archives.noResults")}):he(X).filter(([,t])=>t.length>0).map(([t,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===Q?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===Q?a("sessionList.archives.noProject"):B(t)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:a("sessionList.archives.count",{count:c.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((o)=>n("article",{"aria-label":C(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:C(o),children:C(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:a("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:ce.format(new Date(o.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":a("sessionList.delete"),title:a("sessionList.delete"),disabled:P,className:"text-muted-foreground hover:text-destructive",onClick:()=>{j(null),M(!1),S([o])},children:i(Z,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:P,onClick:()=>void ue(o),children:a("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),R&&i(O,{variant:"destructive",children:i(F,{children:R})})]})]}),i(d,{open:I!==null,onOpenChange:(t)=>{if(!t&&!x.current)S(null)},children:n(u,{showCloseButton:!D,children:[n(b,{children:[i(m,{children:a("sessionList.archives.deleteTitle")}),i(w,{children:a(ne?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:I?.length??0})})]}),J&&i(O,{variant:"destructive",children:i(F,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:J})}),n(z,{children:[i(e,{variant:"outline",disabled:D,onClick:()=>S(null),children:a("sessionList.cancel")}),n(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:P,onClick:()=>void de(),children:[D&&i(ve,{}),a("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
+
export{fr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function bo(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
+
export{bo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function
|
|
3
|
-
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function
|
|
4
|
-
${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function
|
|
5
|
-
export{
|
|
1
|
+
import{Xt}from"./chunk-cgxcxfh1.js";import{t}from"./chunk-yx02h2ja.js";import{isDiffEntry as p}from"@alwith/api";import{jsx as f,jsxs as g,Fragment as h}from"react/jsx-runtime";function Rr(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
|
|
2
|
+
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Er(o){let s=new Map,e=null;for(let n of o.split(`
|
|
3
|
+
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Ar(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Er(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let c=u(i,r),d=n.patch?Rr(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=c.additions,l.deletions+=c.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
+
${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function wo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return f(Xt,{files:Ar(o),onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[f(n,{path:i.path,className:"codex-edited-file-icon"}),f("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
+
export{Rr,Er,Ar,wo};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function An(e){let t=0,i=0;for(let o of e.split(`
|
|
2
|
+
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Ie({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
|
|
3
|
+
export{An,Ie};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as t}from"cn";import{jsx as n}from"react/jsx-runtime";function Ft({className:e,...o}){return n("div",{"data-slot":"skeleton",className:t("bg-muted animate-pulse rounded-md",e),...o})}export{Ft};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{k}from"./chunk-ncekagm6.js";import{cn as n}from"cn";import{jsx as o}from"react/jsx-runtime";function Ht({className:r,...e}){return o(k,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",r),...e})}
|
|
2
|
+
export{Ht};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function br(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 un(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(br(n,i))}return{imageFiles:e,sawNonImageFile:o}}function mn(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 wr(t){return[...t].filter((e)=>!s(e)).join("")}function ar(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 Ge(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=wr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-ar(e,o)),r=Math.max(0,i-ar(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
+
export{br,un,mn,wr,ar,Ge};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Rt}from"./chunk-r41p7378.js";function lt(d,f){if(!f)return[];let h=[],s="",n=[],a=()=>{let t=0,e=0;for(let{start:r,end:o}of Rt(s,f)){while(t<n.length&&n[t].end<=r)t++;e=Math.max(e,t);while(e<n.length&&n[e].end<o)e++;let l=n[t],c=n[e];if(!l||!c)throw Error("Search text offset has no DOM node");let i=document.createRange();i.setStart(l.node,r-l.start),i.setEnd(c.node,o-c.start),h.push(i)}s="",n=[]},u=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),E=(t)=>{if(t.nodeType===Node.TEXT_NODE){let r=t.parentElement;if(!r||r.offsetParent===null&&r.tagName!=="BODY")return;let o=t.nodeValue??"";n.push({node:t,start:s.length,end:s.length+o.length}),s+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){a();return}if(t.tagName==="BR"){a();return}let e=u.has(t.tagName);if(e)a();for(let r of t.childNodes)E(r);if(e)a()};return E(d),a(),h}
|
|
2
|
+
export{lt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h}from"./chunk-1wc83vxg.js";import{t}from"./chunk-yx02h2ja.js";import{L}from"./chunk-h80g3eme.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@alwith/api";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(h,{text:e.text,streaming:o})})}if(i.isImage(e))return n(L,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(L,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ct({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{Ct};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{To}from"./chunk-2b185a0a.js";import{t}from"./chunk-yx02h2ja.js";import{Lo,Do}from"./chunk-543v9eke.js";import{L}from"./chunk-h80g3eme.js";import{q}from"./chunk-dqw30cz4.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@alwith/api";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var ko=p(function({item:s,messageTime:c}){let l=t(),o=Do(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
+
${e.text}`).join(`
|
|
3
|
+
`):q(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=Lo(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(L,{block:e},`${s.id}:${n}`))}),r(To,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
+
export{ko};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{nr}from"./chunk-1wc83vxg.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function Z({host:e,client:n,children:i}){return r(nr,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function J(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function be(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=J();return be(n.store,e)}function $e(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
+
export{Z,t,J,be,o,$e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{xn}from"./chunk-sc746nr6.js";import{o}from"./chunk-yx02h2ja.js";import{n,y}from"./chunk-vxnjsga5.js";import{P,x,G}from"./chunk-tgb70x2n.js";import{isBooleanOption as R,isGroupedSelect as U,isSelectOption as A}from"@alwith/api";import{Zap as Z}from"lucide-react";import{jsx as V}from"react/jsx-runtime";function Ke({sessionId:u,options:p,disabled:I,onModelChange:g,onConfigChange:M,defaultGroup:w={id:"models",name:"Models"},catalog:B=(s)=>s,headerAction:E}){let{host:s,client:L}=n(),{t:r}=s,h=o((e)=>Boolean(e.configPending[u])),t=x(p,"model"),l=x(p,"thought_level"),b=p.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==t&&e!==l)),C=b.filter(A),d=b.filter(R);if(!t&&!l&&C.length===0&&d.length===0)return null;let c=(e,a)=>{if(a===e.currentValue)return;y(s,M?M(e.configId,a):L.setConfig(u,e.configId,a))},f=l?P(l):[],N=f.reduce((e,a)=>a.name.length>=e.length?a.name:e,""),z=t?G(t):r("composer.model"),O=(e)=>({api_id:e.value,label:e.name}),v=B(t&&U(t.options)?t.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(O)})):[{...w,models:t?P(t).map(O):[]}]),_=v.flatMap((e)=>e.models),m=_.find((e)=>e.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:z},i=d.find((e)=>e.configId==="fast-mode");return V(xn,{disabled:I||h,switching:h,value:{...m,label:m.shortLabel??m.label},compactCatalog:!0,unavailableEffort:{name:"Effort",label:r("composer.unsupported")},models:_,showModelList:Boolean(t),onChange:(e)=>{if(e.api_id===t?.currentValue)return;if(g)g(e.api_id);else if(t)c(t,e.api_id)},header:{name:t?.name??r("composer.model"),action:E},modelGroups:v,t:r,effortConfig:l&&f.length>0?{name:"Effort",value:l.currentValue,levels:f,sizer:N,onChange:(e)=>c(l,e)}:void 0,selectOptions:C.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:P(e).map((a)=>({value:a.value,label:a.name})),onChange:(a)=>c(e,a)})),booleanOptions:[{id:"fast_mode",name:r("composer.fastMode"),currentValue:i?.currentValue??!1,disabled:!i,title:!i?r("composer.fastModeUnsupported"):void 0,icon:V(Z,{className:"size-4","aria-hidden":"true"})},...d.filter((e)=>e!==i).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,a)=>{let S=e==="fast_mode"?i:d.find((k)=>k.configId===e);if(!S)throw Error(`Unknown boolean config: ${e}`);c(S,a)}})}
|
|
2
|
+
export{Ke};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as d}from"@base-ui/react/radio-group";import{cn as o}from"cn";import{jsx as i}from"react/jsx-runtime";function
|
|
1
|
+
import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as d}from"@base-ui/react/radio-group";import{cn as o}from"cn";import{jsx as i}from"react/jsx-runtime";function V({className:r,...a}){return i(d,{"data-slot":"radio-group",className:o("grid w-full gap-3",r),...a})}function M({className:r,...a}){return i(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item 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 aspect-square size-4 shrink-0 rounded-full border outline-none 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:i(e.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:i("span",{className:"bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"})})})}export{V,M};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as f}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,s=32,g=6;function zt({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=f({start:0,end:g}),[d,R]=f(()=>new Set),[E,M]=f(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),h=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/s)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/s)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>h()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,h()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[h,r]);let i=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)i.add(e);if(t.length>0)i.add(0),i.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))i.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)i.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*s-(s-y)},children:[...i].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*s,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{zt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a=(e)=>String(e).padStart(2,"0");function ze(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{ze};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e}from"./chunk-a7mr12yc.js";import{Jn}from"./chunk-d4yhdesy.js";import{Se,Ne,Me}from"./chunk-8kjsqjy6.js";import{v}from"./chunk-j4teycge.js";import{cn as h}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as N}from"react";import{jsx as t,jsxs as o,Fragment as R}from"react/jsx-runtime";function E(n){return t(Me,{align:"start",...n})}function cn({data:n,t:r,className:u,...c}){let p=v(),[d,g]=N(!1),[I,f]=N(1),C=z(null),s=n.filename||"",i=(n.mediaType?.startsWith("image/")&&n.url?"image":"file")==="image",A=s||(i?r("input.image"):r("input.attachment"));return L(()=>{if(!d)return;let l=0.1,y=(a)=>Math.min(10,Math.max(0.1,a)),x=(a)=>{if(!(a.ctrlKey||a.metaKey))return;let m=a.key,w=m==="+"||m==="=",H=m==="-"||m==="_",b=m==="0";if(!w&&!H&&!b)return;a.preventDefault(),f((P)=>{if(b)return 1;if(w)return y(P+l);return y(P-l)})};return window.addEventListener("keydown",x,{passive:!1}),()=>window.removeEventListener("keydown",x)},[d]),o(R,{children:[o(Se,{children:[t(Ne,{render:o("div",{className:h("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",u),...c,children:[o("div",{className:"relative size-5 shrink-0",children:[i?t(e,{type:"button",variant:"ghost",size:"icon-xs","aria-label":r("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{f(1),g(!0)},children:t("img",{alt:s||"attachment",className:"size-5 object-cover",height:20,src:n.url,width:20})}):t("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:t(k,{className:"size-3"})}),o(e,{"aria-label":r("input.removeAttachment"),className:h("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(l)=>{l.stopPropagation(),p.remove(n.id)},type:"button",variant:"ghost",children:[t(T,{}),t("span",{className:"sr-only",children:r("input.removeAttachment")})]})]}),!i&&t("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),t(E,{className:"w-auto p-2",children:o("div",{className:"w-auto space-y-3",children:[i&&t("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:t("img",{alt:s||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:n.url,width:448})}),t("div",{className:"flex items-center gap-2.5",children:o("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[t("h4",{className:"truncate text-sm leading-none font-semibold",children:s||(i?"Image":"Attachment")}),n.mediaType&&t("p",{className:"text-muted-foreground truncate font-mono text-xs",children:n.mediaType})]})})]})})]}),i&&n.url&&t(Jn,{containerRef:C,filename:s||r("input.image"),onOpenChange:g,onScaleChange:f,open:d,scale:I,url:n.url})]})}function dn({children:n,className:r,...u}){let c=v();if(!c.files.length)return null;return t("div",{className:h("flex w-full flex-wrap items-center gap-1",r),...u,children:c.files.map((p)=>t(M,{children:n(p)},p.id))})}
|
|
2
|
+
export{cn,dn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function Po({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{Po};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{No,Be}from"../chunk-vyzzs0nc.js";import"../chunk-20re64ta.js";import"../chunk-acrrwrzy.js";import"../chunk-3nmqebb6.js";import"../chunk-px7xxz3v.js";import"../chunk-rkqe8p8n.js";import"../chunk-1wc83vxg.js";export{Be as CodexActivityGroup,No as CodexWorkSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{fi,Kt,Qt}from"../chunk-maepz12p.js";import"../chunk-mmdpwbef.js";import"../chunk-cgxcxfh1.js";import"../chunk-2b185a0a.js";import"../chunk-zzwnpk4q.js";import"../chunk-vyzzs0nc.js";import"../chunk-20re64ta.js";import"../chunk-acrrwrzy.js";import"../chunk-3nmqebb6.js";import"../chunk-px7xxz3v.js";import"../chunk-rkqe8p8n.js";import"../chunk-1wc83vxg.js";export{fi as CodexAssistantMessage,Qt as CodexAssistantTurn,Kt as CodexMessageActions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C,rn,Jo,an,er,sn,tr}from"../chunk-cj5pkg2y.js";import"../chunk-ek06eyp4.js";import"../chunk-zcrct67v.js";import"../chunk-ncekagm6.js";import"../chunk-a7mr12yc.js";export{tr as AsyncQuestionCard,rn as asyncQuestionId,C as asyncQuestions,Jo as initialQuestionDraft,an as questionAnswer,sn as questionReplies,er as questionReplyEnvelope};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{N}from"../chunk-acrrwrzy.js";export{N as useCodexDisclosureState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Lr,Co,Xt}from"../chunk-cgxcxfh1.js";import"../chunk-1wc83vxg.js";export{Co as CodexEditedFilesCard,Xt as EditedFilesCard,Lr as fileChanges};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ye,Mo}from"../chunk-20re64ta.js";import"../chunk-acrrwrzy.js";import"../chunk-1wc83vxg.js";export{Mo as ImageViewActivity,ye as isImageView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Uo}from"../chunk-87t0qtkr.js";import"../chunk-hesyytcd.js";import"../chunk-23wzpgbs.js";import"../chunk-awrzpp7x.js";export{Uo as CodexMarkdownRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fo,xi,Bo,zo,yi,xr,Hr,yr,bi,Or,Fr,wi,Ci}from"../chunk-bycbj1aq.js";export{xi as armTimelineUserMessageNavigationAudio,Hr as automaticNavigationMidiNote,wi as getNavigationAudioContextState,Ci as getNavigationInstrumentReady,Bo as installTimelineUserMessageNavigationAudioUnlock,Or as itemPianoKeyIndex,xr as navigationMidiNote,Fr as navigationPianoKeyIndexes,bi as pianoKeyFrequency,yr as pianoKeyMidiNote,yi as playTimelineUserMessageNavigationNote,zo as playTimelineUserMessageNavigationSequence,Fo as preloadTimelineUserMessageNavigationInstrument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{qo}from"../chunk-pb6xtb3n.js";export{qo as NavigationPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$o}from"../chunk-6ndz2pf9.js";import"../chunk-pb6xtb3n.js";export{$o as TimelineUserMessageNavigationRail};
|
package/dist/codex/patch-view.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function f({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}export{f as PatchView,d as patchStats};
|
|
1
|
+
import{An,Ie}from"../chunk-w99ah6qt.js";export{Ie as PatchView,An as patchStats};
|
package/dist/codex/plan.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{U}from"../chunk-rkqe8p8n.js";export{U as CodexPlan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gi,po,xe,jt,go,fo,ho}from"../chunk-3jcxkpvs.js";export{gi as CODEX_UNKNOWN_TURN_HEIGHT,xe as calculateCodexThreadVirtualRange,fo as calculateCodexTurnCenterDistanceFromBottom,ho as calculateCodexTurnTargetDistanceFromBottom,po as createCodexThreadVirtualLayout,go as preserveCodexThreadDistanceFromBottom,jt as preserveCodexThreadRenderedWindow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yt,To}from"../chunk-2b185a0a.js";import"../chunk-zzwnpk4q.js";export{To as CodexUserMessage,Yt as CopyAction};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mo}from"../chunk-pcngn73n.js";import"../chunk-3jcxkpvs.js";export{mo as VirtualizedTurnList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Tt,Ur}from"../chunk-9v2gk9ex.js";import"../chunk-r6e2abj6.js";export{Ur as filterFiles,Tt as filterSlashCommands};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)?l:`${l}
|
|
3
|
-
`}/${t.payload} `,s=o.length,f?.(!1);else return;z.textInput.setInput(o),requestAnimationFrame(()=>{n.focus(),n.setSelectionRange(s,s)})}v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=(o)=>{if(!m)return;if(a.current?.isComposing()||o.isComposing||o.keyCode===229)return;if(o.key==="ArrowDown")o.preventDefault(),o.stopPropagation(),L((s)=>d.length===0?0:Math.min(d.length-1,s+1));else if(o.key==="ArrowUp")o.preventDefault(),o.stopPropagation(),L((s)=>Math.max(0,s-1));else if(o.key==="Enter"||o.key==="Tab"){o.preventDefault(),o.stopPropagation();let s=d[b];if(s)Q(s)}else if(o.key==="Escape")if(o.preventDefault(),o.stopPropagation(),r)U(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",n,!0),()=>t.removeEventListener("keydown",n,!0)});let[k,G]=g(null),[S,ot]=g(null),T=at(()=>{let t=c?.current;if(!t)return;let n=t.getBoundingClientRect();G({left:n.left,width:n.width,bottom:window.innerHeight-n.top+8})},[c]);if(Z(()=>{if(!m){G(null);return}T()},[m,T]),Z(()=>{let t=c?.current;if(!m||!t||!S)return;return st(t,S,T,{animationFrame:!0})},[m,S,c,T]),!m||c&&!k)return null;let w=r?r.kind==="slash":i,rt=w?it:lt,J=p("div",{ref:ot,className:c?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:c&&k?{left:k.left,width:k.width,bottom:k.bottom}:void 0,children:E("div",{ref:V,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[d.length===0&&w&&p("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:O}),d.length===0&&!w&&h&&p("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:y?.query===x&&y.search===u?h.empty:h.loading}),d.map((t,n)=>E(e,{type:"button",variant:"ghost",role:"option","aria-selected":n===b,"data-idx":n,onMouseDown:(o)=>{o.preventDefault(),Q(t)},onMouseEnter:()=>L(n),className:Y("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",n===b&&"bg-muted"),children:[p(rt,{className:Y("size-4 shrink-0",w?"text-blue-500":"text-muted-foreground")}),p("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&p("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),w&&D&&E(mt,{children:[p(B,{}),E(e,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[p(ut,{"data-icon":"inline-start"}),D.label]})]})]})});return c?ct(J,document.body):J}export{Et as CompletionMenu};
|
|
1
|
+
import{pn}from"../chunk-maj7m5s7.js";import"../chunk-t2ceq16d.js";import"../chunk-9v2gk9ex.js";import"../chunk-j4teycge.js";import"../chunk-qbdqh38y.js";import"../chunk-r6e2abj6.js";import"../chunk-a7mr12yc.js";export{pn as CompletionMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gn}from"../chunk-t2ceq16d.js";export{gn as detectTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{It}from"../chunk-b5g1j1zv.js";export{It as EffortSlider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p}from"../chunk-kbvkr5mr.js";import"../chunk-8r010kvn.js";export{p as MenuRadioSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xn}from"../chunk-sc746nr6.js";import"../chunk-b5g1j1zv.js";import"../chunk-kbvkr5mr.js";import"../chunk-k50475tn.js";import"../chunk-4mnf89r3.js";import"../chunk-8r010kvn.js";import"../chunk-a7mr12yc.js";export{xn as ModelSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Sn}from"../chunk-h4sw0pez.js";import"../chunk-kbvkr5mr.js";import"../chunk-8r010kvn.js";import"../chunk-a7mr12yc.js";export{Sn as PermissionModeSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import{cn,dn}from"../chunk-zy6338m6.js";import"../chunk-j4teycge.js";import"../chunk-8kjsqjy6.js";import"../chunk-d4yhdesy.js";import"../chunk-cw68hvkc.js";import"../chunk-jnfp7j32.js";import"../chunk-a7mr12yc.js";export{cn as PromptInputAttachment,dn as PromptInputAttachments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{br,un,mn,wr,ar,Ge}from"../chunk-wtk721nx.js";export{mn as clipboardHasStringItem,ar as countControlCharsBeforeIndex,br as normalizePastedImageFile,Ge as sanitizeTextareaTargetValue,wr as sanitizeTextareaValue,un as scanClipboardForImageFiles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{St,$r,Nt,qr,we,Ce,ke,Vr,In,Mt,v}from"../chunk-j4teycge.js";export{Mt as LocalAttachmentsContext,In as PromptInputProvider,Nt as PromptInputSubmissionContext,St as PromptInputSubmitContext,we as ProviderAttachmentsContext,ke as useOptionalPromptInputController,v as usePromptInputAttachments,Ce as usePromptInputController,qr as usePromptInputSubmission,$r as usePromptInputSubmit,Vr as useProviderAttachments};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
2
|
-
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(c&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(C(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:a,selectionEnd:m,value:p}=t,d=`${p.slice(0,a)}
|
|
3
|
-
${p.slice(m)}`;if(n)n.textInput.setInput(d);else t.value=d;let h=a+1;t.setSelectionRange(h,h),s();return}if(I(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let a=t.querySelector('button[type="submit"]');if(!a||a.disabled)return;t.requestSubmit(a)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&l.files.length>0){e.preventDefault();let t=l.files.at(-1);if(t)l.remove(t.id)}},k=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:a,sawNonImageFile:m}=Le(t),p=Ae(t);if(a.length>0)e.preventDefault(),l.add(a);else if(m&&!p)e.preventDefault()},w=n?{value:o.current&&r.current?r.current.value:c?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=o.current?e.currentTarget.value:q(e.currentTarget);n.textInput.setInput(c?`!${t}`:t),s(),i?.(e)}}:{onChange:(e)=>{if(!o.current)q(e.currentTarget);s(),i?.(e)}};return L(P,()=>({resetHeight:()=>{if(r.current)r.current.style.height="auto"},focus:()=>{r.current?.focus()},isComposing:()=>o.current||u.current,getTextarea:()=>r.current}),[]),z(ce,{"data-chat-input":!0,ref:r,rows:3,className:A("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",x),name:"message",onCompositionEnd:(e)=>{o.current=!1;let t=q(e.currentTarget);n?.textInput.setInput(c?`!${t}`:t),s(),v?.(e),u.current=!0,requestAnimationFrame(()=>{u.current=!1})},onCompositionStart:(e)=>{u.current=!1,o.current=!0,g?.(e)},onKeyDown:S,onPaste:k,placeholder:T,...H,...w})});N.displayName="PromptInputTextarea";export{N as PromptInputTextarea};
|
|
1
|
+
import{kt}from"../chunk-dzydvx7r.js";import"../chunk-wtk721nx.js";import"../chunk-j4teycge.js";import"../chunk-wqwqx3hc.js";import"../chunk-ncekagm6.js";export{kt as PromptInputTextarea};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bn,wn,Cn,kn,Tn,D,Pn}from"../chunk-p0cc67an.js";import"../chunk-j4teycge.js";import"../chunk-e3mkvx24.js";import"../chunk-wqwqx3hc.js";import"../chunk-jdv29apq.js";import{Y}from"../chunk-0pa5t12s.js";import"../chunk-dfengqjx.js";import"../chunk-ncekagm6.js";import"../chunk-a7mr12yc.js";export{Y as MAX_TOTAL_IMAGE_MB,bn as PromptInput,wn as PromptInputBody,D as PromptInputButton,kn as PromptInputFooter,Cn as PromptInputHeader,Pn as PromptInputSubmit,Tn as PromptInputTools};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import { type FormElicitation } from "@alwith/api";
|
|
3
|
+
import type { PendingAction } from "@alwith/api/client";
|
|
4
|
+
export type FormAction = PendingAction & {
|
|
5
|
+
kind: "elicitation";
|
|
6
|
+
params: FormElicitation;
|
|
7
|
+
};
|
|
8
|
+
export declare function isFormAction(action: PendingAction): action is FormAction;
|
|
9
|
+
export type ActionAnswer = acp.RequestPermissionResponse | acp.CreateElicitationResponse;
|
|
10
|
+
export type RespondTo = (actionId: string, answer: ActionAnswer) => void;
|
|
11
|
+
export declare function ElicitationForm({ action, total, onRespond }: {
|
|
12
|
+
action: FormAction;
|
|
13
|
+
total: number;
|
|
14
|
+
onRespond?: RespondTo;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export declare function ActionCard({ action, total, onRespond }: {
|
|
17
|
+
action: PendingAction;
|
|
18
|
+
total?: number;
|
|
19
|
+
onRespond?: RespondTo;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{te,Pe,at}from"../chunk-ptt7q7za.js";import"../chunk-w99ah6qt.js";import"../chunk-vxnjsga5.js";import"../chunk-tre0r8qm.js";import"../chunk-sgbde4dv.js";import"../chunk-86kkb0z4.js";import"../chunk-30g0y24x.js";import"../chunk-d6nxypzc.js";import"../chunk-st90r31c.js";import"../chunk-4mnf89r3.js";import"../chunk-9bjywaze.js";import"../chunk-qbdqh38y.js";import"../chunk-1hy64ewz.js";import"../chunk-cw68hvkc.js";import"../chunk-ek06eyp4.js";import"../chunk-zcrct67v.js";import"../chunk-ncekagm6.js";import"../chunk-yx02h2ja.js";import"../chunk-a7mr12yc.js";import"../chunk-1wc83vxg.js";export{at as ActionCard,Pe as ElicitationForm,te as isFormAction};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import type { Session } from "@alwith/api";
|
|
3
|
+
import { type ReactNode } from "react";
|
|
4
|
+
import { type AttachmentPolicy } from "../../composer/prompt-input-context";
|
|
5
|
+
import { type ModelMenuProps } from "./model-menu";
|
|
6
|
+
export interface ComposerProps {
|
|
7
|
+
session: Session;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
preparing?: boolean;
|
|
10
|
+
allowPendingInput?: boolean;
|
|
11
|
+
onSubmit?: (prompt: acp.ContentBlock[], accept?: (receipt: string) => void) => Promise<void>;
|
|
12
|
+
onHandOff?: (sessionId: string, receipt: string) => void;
|
|
13
|
+
modelSelector?: ReactNode;
|
|
14
|
+
modelMenu?: Pick<ModelMenuProps, "catalog" | "defaultGroup" | "headerAction">;
|
|
15
|
+
inputHeader?: ReactNode;
|
|
16
|
+
actions?: ReactNode;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
attachmentPolicy?: AttachmentPolicy;
|
|
19
|
+
predictions?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function Composer({ session, onSubmit, onHandOff, modelSelector, modelMenu, inputHeader, actions, children, attachmentPolicy, predictions, disabled, preparing, allowPendingInput }: ComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ve}from"../../chunk-czahfwp7.js";import"../../chunk-zy6338m6.js";import"../../chunk-dzydvx7r.js";import"../../chunk-wtk721nx.js";import"../../chunk-maj7m5s7.js";import"../../chunk-t2ceq16d.js";import"../../chunk-9v2gk9ex.js";import"../../chunk-9x4et210.js";import"../../chunk-asxwsg2p.js";import"../../chunk-eyre28p1.js";import"../../chunk-mgakm5yv.js";import"../../chunk-fqj76wq8.js";import"../../chunk-z8fdvq3v.js";import"../../chunk-sc746nr6.js";import"../../chunk-b5g1j1zv.js";import"../../chunk-0j15twx6.js";import"../../chunk-p0cc67an.js";import"../../chunk-j4teycge.js";import"../../chunk-tj44vjyv.js";import"../../chunk-h4sw0pez.js";import"../../chunk-kbvkr5mr.js";import"../../chunk-6fht8rx9.js";import"../../chunk-67txww0x.js";import"../../chunk-0n82kdek.js";import"../../chunk-tgb70x2n.js";import"../../chunk-hr9d9zpb.js";import"../../chunk-jf5651fz.js";import"../../chunk-vxnjsga5.js";import"../../chunk-cr294svm.js";import"../../chunk-k50475tn.js";import"../../chunk-8kjsqjy6.js";import"../../chunk-51qsyrd6.js";import"../../chunk-e3mkvx24.js";import"../../chunk-wqwqx3hc.js";import"../../chunk-4mnf89r3.js";import"../../chunk-8r010kvn.js";import"../../chunk-jdv29apq.js";import"../../chunk-d4yhdesy.js";import"../../chunk-qbdqh38y.js";import"../../chunk-cw68hvkc.js";import"../../chunk-0pa5t12s.js";import"../../chunk-jnfp7j32.js";import"../../chunk-r6e2abj6.js";import"../../chunk-dfengqjx.js";import"../../chunk-ncekagm6.js";import"../../chunk-yx02h2ja.js";import"../../chunk-a7mr12yc.js";import"../../chunk-1wc83vxg.js";export{Ve as Composer};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
|
|
2
|
+
import { type SelectOption } from "@alwith/api";
|
|
3
|
+
export type ConfigChange = (configId: string, value: string | boolean) => Promise<void>;
|
|
4
|
+
export declare function flattenSelectOptions(option: SelectOption): acp.SessionConfigSelectOption[];
|
|
5
|
+
export declare function selectOption(options: acp.SessionConfigOption[], category: string): SelectOption | undefined;
|
|
6
|
+
export declare function currentName(option: SelectOption): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P,x,G}from"../../chunk-tgb70x2n.js";export{G as currentName,P as flattenSelectOptions,x as selectOption};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Session } from "@alwith/api";
|
|
2
|
+
import { type RefObject } from "react";
|
|
3
|
+
import type { PromptInputTextareaHandle } from "../../composer/prompt-input-textarea";
|
|
4
|
+
export interface ComposerDraftSnapshot {
|
|
5
|
+
target: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
text: string;
|
|
8
|
+
selection: readonly [number, number];
|
|
9
|
+
}
|
|
10
|
+
export interface ComposerDraftPort {
|
|
11
|
+
read: () => ComposerDraftSnapshot;
|
|
12
|
+
compareAndSet: (expected: ComposerDraftSnapshot, text: string, selection: readonly [number, number]) => ComposerDraftSnapshot | null;
|
|
13
|
+
}
|
|
14
|
+
export interface ReceiptObserver {
|
|
15
|
+
accept: (receipt: string) => void;
|
|
16
|
+
signal: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
export interface ComposerState {
|
|
19
|
+
session: Session;
|
|
20
|
+
ready: boolean;
|
|
21
|
+
inputReady: boolean;
|
|
22
|
+
sending: boolean;
|
|
23
|
+
textareaRef: RefObject<PromptInputTextareaHandle | null>;
|
|
24
|
+
draft: ComposerDraftPort;
|
|
25
|
+
interruptRef: RefObject<(() => void) | null>;
|
|
26
|
+
observeReceipts: (observer: ReceiptObserver) => () => void;
|
|
27
|
+
addMention: (path: string) => void;
|
|
28
|
+
setAdding: (busy: boolean) => void;
|
|
29
|
+
handsFree: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const ComposerContext: import("react").Context<ComposerState | null>;
|
|
32
|
+
export declare function useComposer(): ComposerState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pt,sr}from"../../chunk-asxwsg2p.js";export{Pt as ComposerContext,sr as useComposer};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Attachment } from "../../composer/prompt-input-context";
|
|
2
|
+
export type ComposerDraft = {
|
|
3
|
+
text: string;
|
|
4
|
+
attachments: Attachment[];
|
|
5
|
+
mentions: string[];
|
|
6
|
+
modelId: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const drafts: Map<string, ComposerDraft>;
|
|
9
|
+
export declare function registerDraftAttachmentWriter(sessionId: string, write: (attachments: Attachment[]) => void): () => void;
|
|
10
|
+
export declare function updateDraftAttachments(sessionId: string, update: (attachments: Attachment[]) => Attachment[]): void;
|
|
11
|
+
export declare function trackDraftAttachmentWrite(attachmentId: string, write: Promise<void>): void;
|
|
12
|
+
export declare function exportDraft(sessionId: string): Promise<ComposerDraft | null>;
|
|
13
|
+
export declare function importDraft(sessionId: string, draft: ComposerDraft | null): void;
|
|
14
|
+
export declare function registerComposerWriter(sessionId: string, write: (text: string) => void): () => void;
|
|
15
|
+
export declare function setComposerDraft(sessionId: string, text: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i,Mn,T,Ze,lr,cr,Je,dr}from"../../chunk-0n82kdek.js";export{i as drafts,lr as exportDraft,cr as importDraft,Je as registerComposerWriter,Mn as registerDraftAttachmentWriter,dr as setComposerDraft,Ze as trackDraftAttachmentWrite,T as updateDraftAttachments};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{je}from"../../chunk-mgakm5yv.js";export{je as fileItems};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ClipboardEvent } from "react";
|
|
2
|
+
import type { Attachment, FileUIPart } from "../../composer/prompt-input-context";
|
|
3
|
+
export type TextAttachmentWriter = (name: string, text: string) => Promise<string>;
|
|
4
|
+
export type PastedTextAttachment = Attachment & {
|
|
5
|
+
pastedText: {
|
|
6
|
+
text: string;
|
|
7
|
+
status: "pending" | "ready" | "error";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const LONG_TEXT_LENGTH = 5000;
|
|
11
|
+
export declare function isPastedTextAttachment(file: FileUIPart): file is PastedTextAttachment;
|
|
12
|
+
export declare function fileUrl(path: string): string;
|
|
13
|
+
export declare function writePastedTextAttachment(sessionId: string, attachment: PastedTextAttachment, write: TextAttachmentWriter): void;
|
|
14
|
+
export declare function pasteLongText(event: ClipboardEvent<HTMLTextAreaElement>, sessionId: string, filename: string, write: TextAttachmentWriter): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Nn,ee,Cr,Te,Xe}from"../../chunk-6fht8rx9.js";import"../../chunk-0n82kdek.js";export{Nn as LONG_TEXT_LENGTH,Cr as fileUrl,ee as isPastedTextAttachment,Xe as pasteLongText,Te as writePastedTextAttachment};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rn}from"../../chunk-hr9d9zpb.js";import"../../chunk-jf5651fz.js";import"../../chunk-51qsyrd6.js";import"../../chunk-yx02h2ja.js";import"../../chunk-a7mr12yc.js";import"../../chunk-1wc83vxg.js";export{Rn as MentionChips};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{et,tt,nt}from"../../chunk-jf5651fz.js";export{tt as baseName,et as formatMentionUri,nt as mentionDisplayName};
|