@alwith/module-chat 0.5.10 → 0.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.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-8tn17nw7.js → chunk-023yzyq8.js} +2 -2
- package/dist/{chunk-j8fybkv1.js → chunk-0qm0fy2r.js} +2 -2
- package/dist/chunk-1dh0q11h.js +4 -0
- package/dist/{chunk-9bjywaze.js → chunk-1drkvxzk.js} +1 -1
- package/dist/{chunk-94r5frad.js → chunk-1k03fpcj.js} +2 -2
- package/dist/chunk-24b1z856.js +2 -0
- package/dist/{chunk-12swy4za.js → chunk-27vftbhf.js} +4 -4
- package/dist/{chunk-ybwgmphj.js → chunk-2pha46d9.js} +1 -1
- package/dist/{chunk-d8rf7rff.js → chunk-2w576ygb.js} +2 -2
- package/dist/chunk-31x6chk8.js +2 -0
- package/dist/chunk-36t9x2qc.js +4 -0
- package/dist/{chunk-zbnjrtye.js → chunk-3ah1ez70.js} +5 -5
- package/dist/{chunk-xv3qen27.js → chunk-3dvx2q8w.js} +2 -2
- package/dist/{chunk-b616t3fp.js → chunk-3g66qg03.js} +2 -2
- package/dist/chunk-3q6ssrs3.js +2 -0
- package/dist/{chunk-vxm45kym.js → chunk-4wkpatzz.js} +2 -2
- package/dist/{chunk-ptws0wtt.js → chunk-58bs5f2z.js} +2 -2
- package/dist/{chunk-zse2yz8e.js → chunk-62m11b37.js} +3 -3
- package/dist/{chunk-rg5vskrr.js → chunk-63zq5nr8.js} +2 -2
- package/dist/chunk-6nyba0m4.js +2 -0
- package/dist/{chunk-bm4s6n8a.js → chunk-6ss1981q.js} +2 -2
- package/dist/{chunk-34a7aha4.js → chunk-753s76b6.js} +2 -2
- package/dist/chunk-76w1a72z.js +2 -0
- package/dist/{chunk-dzx4rypz.js → chunk-7avpdkmf.js} +2 -2
- package/dist/{chunk-gthvary5.js → chunk-8712sy9s.js} +1 -1
- package/dist/{chunk-83dkw1mh.js → chunk-8a1j96d1.js} +2 -2
- package/dist/{chunk-wp673je0.js → chunk-8jpm8fnf.js} +1 -1
- package/dist/chunk-9hvbm4be.js +2 -0
- package/dist/{chunk-r55p44ys.js → chunk-9t8ptjct.js} +2 -2
- package/dist/chunk-9v94xnhp.js +2 -0
- package/dist/{chunk-5f4m4ptz.js → chunk-a1kmc6t8.js} +3 -3
- package/dist/{chunk-et0rpfh9.js → chunk-a2hygrpr.js} +1 -1
- package/dist/{chunk-tc85dd04.js → chunk-ak0k5vg6.js} +1 -1
- package/dist/{chunk-erzjz56d.js → chunk-ana59z25.js} +1 -1
- package/dist/{chunk-anshr0mw.js → chunk-anfrrs5x.js} +1 -1
- package/dist/chunk-aprxk7c2.js +2 -0
- package/dist/chunk-b1vw42he.js +2 -0
- package/dist/chunk-b3nt7axf.js +2 -0
- package/dist/chunk-b5z75meq.js +2 -0
- package/dist/{chunk-rawfwgmw.js → chunk-b65vdzz3.js} +1 -1
- package/dist/{chunk-f4e289mj.js → chunk-bbwb4555.js} +2 -2
- package/dist/{chunk-90c0tynf.js → chunk-bcrq96dw.js} +2 -2
- package/dist/{chunk-gq30yqjk.js → chunk-bftrddmr.js} +2 -2
- package/dist/chunk-bna24ggr.js +2 -0
- package/dist/chunk-bzk6wn2s.js +3 -0
- package/dist/{chunk-vyf9wx2w.js → chunk-c0ac9k7h.js} +2 -2
- package/dist/{chunk-6z9r27t2.js → chunk-c7km8xgd.js} +2 -2
- package/dist/{chunk-bq05e911.js → chunk-c9k66x5g.js} +2 -2
- package/dist/{chunk-rmv0t2ee.js → chunk-chwg3na0.js} +2 -2
- package/dist/{chunk-kgkrtc3r.js → chunk-cy6grsx0.js} +1 -1
- package/dist/{chunk-9w0w5by0.js → chunk-d6840cvf.js} +2 -2
- package/dist/{chunk-nsns7rgs.js → chunk-ddtb692j.js} +2 -2
- package/dist/{chunk-y8qmxd0j.js → chunk-dgnk7h62.js} +2 -2
- package/dist/{chunk-13y1xqbb.js → chunk-ds6avzj3.js} +2 -2
- package/dist/{chunk-bhrnw36x.js → chunk-dxt9j0da.js} +2 -2
- package/dist/chunk-e15f3anm.js +3 -0
- package/dist/chunk-ee9pzqnq.js +2 -0
- package/dist/{chunk-kjtd3wc3.js → chunk-ek06eyp4.js} +1 -1
- package/dist/chunk-evx9d147.js +2 -0
- package/dist/chunk-f3e3ged2.js +2 -0
- package/dist/chunk-f7n8erng.js +2 -0
- package/dist/chunk-fa0kzj3j.js +2 -0
- package/dist/{chunk-gajhc4bp.js → chunk-fnbs3dq1.js} +2 -2
- package/dist/{chunk-5nqhvv28.js → chunk-fpx4ng0t.js} +2 -2
- package/dist/{chunk-r828rqdv.js → chunk-fteek5h4.js} +2 -2
- package/dist/chunk-gbbpdhg6.js +2 -0
- package/dist/chunk-gpz9f9zq.js +2 -0
- package/dist/{chunk-951wn2bd.js → chunk-gszy4mhj.js} +2 -2
- package/dist/{chunk-115a3p9z.js → chunk-gtqwgjjg.js} +2 -2
- package/dist/chunk-hgj33wbd.js +2 -0
- package/dist/chunk-hh498geh.js +7 -0
- package/dist/chunk-hpyaxv6h.js +2 -0
- package/dist/chunk-ht28382s.js +2 -0
- package/dist/{chunk-7q07tm0w.js → chunk-hw99hhjf.js} +1 -1
- package/dist/{chunk-5c4z345j.js → chunk-hwfwd04r.js} +2 -2
- package/dist/{chunk-dnhmnmgf.js → chunk-hz1pgnqp.js} +2 -2
- package/dist/chunk-jr591zg2.js +2 -0
- package/dist/chunk-jtv179nm.js +2 -0
- package/dist/{chunk-1k1e55de.js → chunk-kbwjcnf6.js} +1 -1
- package/dist/{chunk-s4tydqhr.js → chunk-kfs19vc5.js} +2 -2
- package/dist/{chunk-tjhwk02y.js → chunk-ks05sstp.js} +1 -1
- package/dist/{chunk-5d94195x.js → chunk-ksv9pjc2.js} +1 -1
- package/dist/{chunk-vdeh7n7d.js → chunk-kw487283.js} +2 -2
- package/dist/{chunk-y0ppdmcv.js → chunk-m6h92nq4.js} +2 -2
- package/dist/chunk-mk379yt7.js +2 -0
- package/dist/{chunk-eg1d1gbc.js → chunk-mkw0twsb.js} +2 -2
- package/dist/{chunk-jbz530rv.js → chunk-mvv5xmap.js} +2 -2
- package/dist/{chunk-grncrd31.js → chunk-mwd0ed0c.js} +2 -2
- package/dist/chunk-nad1erxy.js +3 -0
- package/dist/{chunk-xjtqdp82.js → chunk-ncekagm6.js} +1 -1
- package/dist/chunk-nwrbpw97.js +2 -0
- package/dist/{chunk-k583q9wq.js → chunk-phy911dk.js} +3 -3
- package/dist/{chunk-9cbpmdqf.js → chunk-q256c3hn.js} +2 -2
- package/dist/{chunk-gc1m6aw5.js → chunk-qg1b5k6m.js} +2 -2
- package/dist/{chunk-4t6bd8j7.js → chunk-qnk5jk1b.js} +2 -2
- package/dist/chunk-qv4x469a.js +2 -0
- package/dist/{chunk-sx4fhs54.js → chunk-qwyvq7bk.js} +2 -2
- package/dist/{chunk-b81yxz7f.js → chunk-r0t8zj4g.js} +2 -2
- package/dist/chunk-rag9xsg5.js +2 -0
- package/dist/{chunk-vpt3vyfc.js → chunk-reaxcamj.js} +2 -2
- package/dist/chunk-rrrpp44m.js +2 -0
- package/dist/chunk-rtg6xfgr.js +2 -0
- package/dist/chunk-s2k5xynq.js +2 -0
- package/dist/chunk-sbyn62qx.js +2 -0
- package/dist/chunk-shsyer15.js +2 -0
- package/dist/{chunk-2ymhbrf9.js → chunk-sn80gr8g.js} +3 -3
- package/dist/{chunk-btjqewxj.js → chunk-svt0t387.js} +2 -2
- package/dist/{chunk-v2bbgpvw.js → chunk-tjpr0adf.js} +2 -2
- package/dist/{chunk-2pj3pcc7.js → chunk-tjykfxrd.js} +2 -2
- package/dist/{chunk-r67bkrmr.js → chunk-tm4ee7m3.js} +2 -2
- package/dist/chunk-tt40vzdd.js +2 -0
- package/dist/{chunk-76xfekar.js → chunk-vc9ts6wp.js} +2 -2
- package/dist/{chunk-3wg25354.js → chunk-vcbv30ph.js} +2 -2
- package/dist/{chunk-7awdgc0t.js → chunk-vyccmpdn.js} +2 -2
- package/dist/{chunk-fjwg3y8h.js → chunk-w45d5th9.js} +2 -2
- package/dist/{chunk-pmpeh7e8.js → chunk-wmk2dwpf.js} +2 -2
- package/dist/{chunk-0fr24sxr.js → chunk-x2tsybks.js} +3 -3
- package/dist/{chunk-vvk1knxf.js → chunk-xa20eex9.js} +1 -1
- package/dist/{chunk-t1yd4a57.js → chunk-xd5rqbwp.js} +1 -1
- package/dist/{chunk-x66yhg5y.js → chunk-xj0y094j.js} +2 -2
- package/dist/{chunk-64hrczd9.js → chunk-xxkdv1zf.js} +1 -1
- package/dist/{chunk-2879v3ps.js → chunk-y0psrvcc.js} +2 -2
- package/dist/{chunk-ct5wk01a.js → chunk-y1kkt0m2.js} +3 -3
- package/dist/{chunk-46gb51y9.js → chunk-y6r6tzfh.js} +2 -2
- package/dist/chunk-zg2342s2.js +2 -0
- package/dist/chunk-zmpbfbnn.js +2 -0
- package/dist/{chunk-0sdhavk8.js → chunk-znyyzs85.js} +2 -2
- package/dist/{chunk-akcs13sj.js → chunk-zp5ntx27.js} +2 -2
- package/dist/{chunk-wqrn3428.js → chunk-zw3h5xgf.js} +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.d.ts +2 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.d.ts +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/composer.d.ts +2 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.d.ts +1 -0
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.d.ts +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-parser.worker.js +43 -39
- 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 +13 -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.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.d.ts +2 -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-activity.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/types.d.ts +1 -0
- package/dist/ui/alert.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input-group-textarea.js +1 -1
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/kbd.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/spinner.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-1jzxmw98.js +0 -2
- package/dist/chunk-1wxebrbt.js +0 -2
- package/dist/chunk-1xg1qw4g.js +0 -4
- package/dist/chunk-3g8ck68k.js +0 -2
- package/dist/chunk-3xnbypjz.js +0 -2
- package/dist/chunk-4ecdn9z1.js +0 -2
- package/dist/chunk-60ks28ef.js +0 -2
- package/dist/chunk-62x983rq.js +0 -2
- package/dist/chunk-6f2h379x.js +0 -2
- package/dist/chunk-6xp64b2e.js +0 -2
- package/dist/chunk-78x93ef2.js +0 -2
- package/dist/chunk-7e1m1d9x.js +0 -2
- package/dist/chunk-8dtaq4eh.js +0 -2
- package/dist/chunk-9h86hvc3.js +0 -2
- package/dist/chunk-9tgtskz4.js +0 -2
- package/dist/chunk-a7nqzhxj.js +0 -2
- package/dist/chunk-aafg3jqm.js +0 -3
- package/dist/chunk-b8ywzj88.js +0 -2
- package/dist/chunk-b9ew8dwr.js +0 -2
- package/dist/chunk-cc6vp2sg.js +0 -2
- package/dist/chunk-fb6vxbmc.js +0 -2
- package/dist/chunk-fcyzhbmn.js +0 -2
- package/dist/chunk-fw3emcqw.js +0 -2
- package/dist/chunk-h7ks1p6h.js +0 -2
- package/dist/chunk-j4cm74nv.js +0 -4
- package/dist/chunk-jegkf64h.js +0 -2
- package/dist/chunk-jjtgsnj0.js +0 -2
- package/dist/chunk-jnrcqphc.js +0 -2
- package/dist/chunk-jyy20tw1.js +0 -2
- package/dist/chunk-k7wta28t.js +0 -2
- package/dist/chunk-kathd6f3.js +0 -2
- package/dist/chunk-ksmcznp2.js +0 -3
- package/dist/chunk-m2ab6p4w.js +0 -2
- package/dist/chunk-n89jvr5q.js +0 -2
- package/dist/chunk-nvya2g1d.js +0 -2
- package/dist/chunk-rqnvygqy.js +0 -7
- package/dist/chunk-rw9bsnyp.js +0 -2
- package/dist/chunk-s1z1418w.js +0 -2
- package/dist/chunk-sgy6b5me.js +0 -2
- package/dist/chunk-sk14wfkj.js +0 -2
- package/dist/chunk-vmcxp5e2.js +0 -2
- package/dist/chunk-wzjq9j6g.js +0 -3
package/dist/chunk-b8ywzj88.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{yt,oe}from"./chunk-n89jvr5q.js";import{_}from"./chunk-2pj3pcc7.js";import{V}from"./chunk-r828rqdv.js";import{ne}from"./chunk-k7wta28t.js";import{_e,pe,He}from"./chunk-9cbpmdqf.js";import{PreviewCard as x}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as I}from"lucide-react";import{createContext as S,useContext as k,useLayoutEffect as T,useState as R}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as G}from"react/jsx-runtime";function qo(o){if(o.as==="ul"){let{as:i,className:r,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",r),...a})}let{as:t,className:n,...s}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...s})}function De({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function gt({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[30px] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function Yt({open:o,onOpenChange:t,tooltip:n,leading:s,label:i,count:r,countLabel:a,active:l=!1,actions:N,headerChildren:f,wrapHeader:u,onHeaderClick:w,children:C}){let b=()=>{w?.(),t(!o)},m=p(_e,"relative flex h-[30px] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),h=d(G,{children:[s!=null&&e(De,{children:s}),f??e(_,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(He,{content:r!==void 0?e(pe,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??r})}):void 0,actions:N})})]}),P=f==null?d("div",{"data-active":l?"":void 0,title:n,className:p(m,oe),onClick:b,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),b()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),h]}):e("div",{"data-active":l?"":void 0,className:m,children:h});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?P:u(P),o&&e(qo,{className:"mt-0.5",children:C})]})}var H=S(()=>{}),O=S(()=>{});function ft(){return k(O)}function ht(){return k(H)}function vt({active:o=!1,state:t,interruption:n=null,leased:s=!1,media:i,title:r,hoverCard:a,onHoverCardOpenChange:l,subtitle:N,preview:f,listeningPorts:u,onOpenPort:w,accessory:C,meta:b,hint:m,actions:h,className:P,...c}){let y=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(_e,yt,"group/navigation-row focus-visible:outline-ring flex h-[30px] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(f||u!=null&&u.length>0)&&"h-auto min-h-[30px] py-2.5",P),...c,children:[e(De,{children:t!=null?e(V,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(_,{className:p("leading-none",t==="done"&&"font-semibold"),children:r}),N!=null&&e(_,{className:"text-muted-foreground text-xs",children:N}),f&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:f}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((v)=>w?d("button",{type:"button",className:"underline",onPointerDown:(g)=>g.stopPropagation(),onKeyDown:(g)=>g.stopPropagation(),onClick:(g)=>{g.stopPropagation(),w(v)},children:[":",v]},v):d("span",{children:[":",v]},v))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[s&&e(I,{className:"text-muted-foreground size-3"}),e(He,{content:C!=null?e(pe,{children:C}):b??e(pe,{}),actions:h}),m!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:m})]})]});if(a==null)return y;return e(L,{row:y,onOpenChange:l,children:a})}function L({row:o,children:t,onOpenChange:n}){let[s,i]=R(!1),[r,a]=R(!1),l=s||r;return T(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(H.Provider,{value:a,children:e(O.Provider,{value:()=>{i(!1),a(!1)},children:e(E,{open:l,onOpenChange:i,trigger:o,children:t})})})}function E({open:o,onOpenChange:t,trigger:n,children:s,side:i="inline-end",sideOffset:r=2,align:a="start",alignOffset:l}){return ne(o),d(x.Root,{open:o,onOpenChange:t,children:[e(x.Trigger,{render:n,delay:700,closeDelay:100}),e(x.Portal,{children:e(x.Positioner,{side:i,sideOffset:r,align:a,alignOffset:l,className:"isolate z-50",children:e(x.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:s})})})})]})}
|
|
2
|
-
export{qo,De,gt,Yt,ft,ht,vt};
|
package/dist/chunk-b9ew8dwr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-3g8ck68k.js";import{Ue}from"./chunk-vvk1knxf.js";import{e}from"./chunk-6kn920c5.js";import{nt}from"./chunk-7e1m1d9x.js";import{FileIcon as m,XIcon as r}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function fn({mentions:n,onRemove:s}){let{t:i}=t();if(n.length===0)return null;return a("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:n.map((o)=>l(Ue,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(m,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:nt(o)}),a(e,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:nt(o)}),onClick:()=>s(o),children:a(r,{className:"size-3"})})]},o))})}
|
|
2
|
-
export{fn};
|
package/dist/chunk-cc6vp2sg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Rt(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function ei(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Rt(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Rt,ei};
|
package/dist/chunk-fb6vxbmc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l}from"./chunk-1hy64ewz.js";import{X}from"./chunk-5d94195x.js";import{h}from"./chunk-fw3emcqw.js";import{bt}from"./chunk-bm4s6n8a.js";import{_}from"./chunk-2pj3pcc7.js";import{ft,ht}from"./chunk-b8ywzj88.js";import{formatDistanceToNowStrict as H}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{jsx as o,jsxs as C,Fragment as w}from"react/jsx-runtime";var S={en:L,"zh-CN":z};function Le(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return H(new Date(t),{locale:r})}function pt({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:y,PathAction:u}=h(),f=ht(),I=ft();g(()=>{f(n)},[n,f]);let[x,p]=D(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?Le(t.updatedAt,y.language):null,v=[];if(N!==null)v.push({icon:o(E,{className:"size-3.5"}),text:N});let s=u&&o(u,{cwd:t.cwd,onOpened:I});return o(bt,{title:n?o(l,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):C("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(_,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:s||a!==void 0?C(w,{children:[s,s&&a!==void 0&&o(X,{}),a]}):void 0})}
|
|
2
|
-
export{Le,pt};
|
package/dist/chunk-fcyzhbmn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-6kn920c5.js";import{H,O,N,F,re,M,Oe,Fe,Be,Zt,R}from"./chunk-wqrn3428.js";import{ze}from"./chunk-tc85dd04.js";import{be,we,ke}from"./chunk-7q07tm0w.js";import{Gt}from"./chunk-kathd6f3.js";import{f}from"./chunk-94r5frad.js";import{cn as m}from"cn";import{ArrowUpRight as se,ChevronUp as P,Loader2Icon as U,Zap as W}from"lucide-react";import{Fragment as ie,useState as Z}from"react";import{jsx as n,jsxs as s,Fragment as p}from"react/jsx-runtime";function Co({value:c,onChange:q,models:x,modelGroups:C,compactCatalog:l,effortPresentation:I="slider",unavailableEffort:v,providerMenu:h,header:w,className:A,condensed:T,stripLabelPrefix:V,showDescription:J,showModelList:K=!0,loading:Q,switching:L,isLoading:X,effortConfig:i,booleanOptions:k,onBooleanChange:z,selectOptions:Y=[],t:u,...r}){let[E,ee]=Z(!1),[ne,ae]=Z(!1),d=k?.find((a)=>a.id==="fast_mode"),_=l?k?.filter((a)=>a!==d):k,j=(a)=>V&&a.startsWith(V)?a.slice(V.length):a;if(Q)return n("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:s(e,{variant:"ghost",disabled:!0,className:m("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",A),children:[n(U,{className:"size-3 animate-spin"}),n("span",{className:"text-muted-foreground truncate",children:u("model.loadingModels")})]})});return s("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[h&&s(H,{open:E,onOpenChange:ee,children:[s(be,{children:[n(we,{render:n(O,{render:s(e,{"data-testid":"provider-trigger",variant:"ghost",disabled:r.disabled,className:m("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[h.icon,n(P,{className:"size-2.5 shrink-0 opacity-60"})]})})}),n(ke,{children:u("model.switchProvider")})]}),s(N,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((a,t)=>s(ie,{children:[t>0&&a.length>0&&n(R,{}),n(f,{value:h.value,onValueChange:h.onChange,options:a})]},t)),h.moreAction&&s(p,{children:[n(R,{}),s(M,{onClick:h.moreAction,className:"whitespace-nowrap",children:[n("span",{className:"min-w-0 flex-1 truncate",children:u("model.moreModels")}),n(se,{className:"size-4"})]})]})]})]}),s(H,{open:ne,onOpenChange:ae,children:[s(be,{children:[n(we,{render:n(O,{render:s(e,{"data-testid":"model-trigger","aria-busy":L,variant:"ghost",className:m("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",T&&"h-7 gap-1 px-1.5 text-[11px]",A),...r,children:[c.icon,k?.some((a)=>a.id==="fast_mode"&&a.currentValue&&!a.disabled)&&n(W,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),n("span",{className:m("min-w-0 flex-1 truncate text-start",T&&"text-[11px]"),children:j(c.label)||u("model.selectModel")}),i&&s("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[n("span",{className:"invisible col-start-1 row-start-1",children:i.sizer??i.levels.reduce((a,t)=>t.name.length>a.length?t.name:a,"")}),n("span",{className:"col-start-1 row-start-1",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),L?n(U,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):n(P,{className:m("size-3 shrink-0",T&&"size-2.5")})]})})}),n(ke,{children:u("model.switchModel")})]}),s(N,{side:"top",align:"end",sideOffset:4,className:m("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",l&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[l&&s(p,{children:[s(F,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-1 py-1",children:[i?I==="slider"?n("div",{role:"menuitem","aria-label":i.name,className:"min-w-0 [&>div]:justify-start [&>div]:gap-3 [&>div]:px-2 [&>div]:py-1.5",children:n(Gt,{...i,disabled:r.disabled})}):s(Oe,{children:[s(Fe,{disabled:r.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[n("span",{children:i.name}),n("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Be,{children:n(f,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):v?s(M,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[n("span",{children:v.name}),n("span",{className:"text-muted-foreground truncate text-xs",children:v.label})]}):n(re,{className:"min-w-0 flex-1 truncate",children:w?.name}),d&&n(Zt,{"aria-label":d.name,title:d.title??d.name,disabled:r.disabled||d.disabled,checked:d.currentValue,closeOnClick:!1,onCheckedChange:(a)=>z?.(d.id,a),className:m("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ml-auto size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",d.currentValue&&!d.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:d.icon??n(W,{className:"size-4","aria-hidden":"true"})})]}),n(R,{className:"shrink-0"})]}),w&&!l&&s(p,{children:[s("div",{className:"flex items-center gap-2 px-2 py-2",children:[w.icon,n("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:w.name}),w.action]}),n(R,{})]}),s(F,{"data-model-menu-list":l?"":void 0,className:l?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[K&&(X?n(M,{disabled:!0,className:"text-muted-foreground",children:u("model.loadingModels")}):x.length===0?n(M,{disabled:!0,className:"text-muted-foreground",children:u("model.noModelsAvailable")}):(()=>{let a=x.filter((o)=>!o.more),t=x.filter((o)=>o.more),B=a.length>0&&t.length>0,D=(o,g)=>({disabled:r.disabled,icon:o.icon,value:o.api_id,label:j(o.label),description:g?.noDescription?void 0:J?o.description:void 0}),y=(o)=>{let g=x.find((S)=>S.api_id===o);if(g)q(g)};if(l)return n(f,{value:c.api_id,onValueChange:y,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:x.map((o)=>D(o))});return s(p,{children:[C?C.map((o)=>{let g=o.models.filter((b)=>!b.more),S=o.models.filter((b)=>b.more),G=g.length>0&&S.length>0;return s(F,{children:[n(re,{className:"text-muted-foreground text-xs font-normal",children:o.name}),n(f,{value:c.api_id,onValueChange:y,itemClassName:"font-medium whitespace-nowrap",options:(G?g:o.models).map((b)=>D(b))}),G&&s(Oe,{children:[n(Fe,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Be,{children:n(f,{value:c.api_id,onValueChange:y,itemClassName:"font-medium whitespace-nowrap",options:S.map((b)=>D(b,{noDescription:!0}))})})]})]},o.id)}):n(f,{value:c.api_id,onValueChange:y,itemClassName:"font-medium whitespace-nowrap",options:(B?a:x).map((o)=>D(o))}),!C&&B&&s(Oe,{children:[n(Fe,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Be,{children:n(f,{value:c.api_id,onValueChange:y,itemClassName:"font-medium whitespace-nowrap",options:t.map((o)=>D(o,{noDescription:!0}))})})]})]})})()),!l&&i&&s(p,{children:[n(R,{}),I==="menu"?s(Oe,{children:[s(Fe,{disabled:r.disabled,children:[n("span",{className:"flex-1",children:i.name}),n("span",{className:"text-muted-foreground",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Be,{children:n(f,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):n(Gt,{...i,disabled:r.disabled})]}),!l&&!i&&v&&s(p,{children:[n(R,{}),s(M,{disabled:!0,children:[n("span",{className:"flex-1",children:v.name}),n("span",{children:v.label})]})]}),Y.map((a)=>s(F,{children:[n(R,{}),n(re,{children:a.name}),n(f,{value:a.value,onValueChange:a.onChange,options:a.options,itemClassName:"whitespace-nowrap"})]},a.id)),_&&_.length>0&&s(p,{children:[!i&&n(R,{}),_.map((a)=>l?s(Zt,{"aria-label":a.name,title:a.title,disabled:r.disabled||a.disabled,checked:a.currentValue,closeOnClick:!1,onCheckedChange:(t)=>z?.(a.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[s("span",{className:"flex items-center gap-2",children:[a.icon,a.name]}),n("span",{"aria-hidden":"true",className:m("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",a.currentValue?"bg-primary":"bg-input"),children:n("span",{className:m("bg-background size-3.5 rounded-full shadow-xs transition-transform",a.currentValue&&"translate-x-3.5")})})]},a.id):s("div",{title:a.title,className:m("flex items-center justify-between gap-3 px-2 py-2.5",a.disabled&&"opacity-50"),children:[s("span",{className:"flex items-center gap-2 text-sm font-medium",children:[a.icon,a.name]}),n(ze,{"aria-label":a.name,disabled:r.disabled||a.disabled,checked:a.currentValue,onCheckedChange:(t)=>z?.(a.id,t)})]},a.id))]})]}),l&&w?.action&&s(p,{children:[n(R,{className:"shrink-0"}),n(F,{"data-model-menu-footer":!0,className:"shrink-0",children:w.action})]})]})]})]})}
|
|
2
|
-
export{Co};
|
package/dist/chunk-fw3emcqw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-6kn920c5.js";import{d,u,w,Q,m,k}from"./chunk-et0rpfh9.js";import{ne}from"./chunk-k7wta28t.js";import{createContext as S,useContext as g,useState as D,useSyncExternalStore as y}from"react";import{jsx as i,jsxs as p}from"react/jsx-runtime";var C=S(null),v=S(null),f=S(null);function Tr({host:t,client:o,children:n}){let[l,a]=D(null);ne(l!==null);let{t:c}=t;return i(C,{value:t,children:i(v,{value:o,children:p(f,{value:a,children:[n,i(d,{open:l!==null,onOpenChange:(x)=>!x&&a(null),children:p(u,{children:[p(w,{children:[i(m,{children:c("sessionList.deleteTitle")}),i(k,{children:c("sessionList.deleteDescription")})]}),p(Q,{children:[i(e,{variant:"outline",onClick:()=>a(null),children:c("sessionList.cancel")}),i(e,{onClick:()=>{if(l)P(t,o.delete(l.sessionId));a(null)},children:c("sessionList.delete")})]})]})})]})})})}function h(){let t=g(C);if(t===null)throw Error("Session list host is missing");return t}function s(){let t=g(v);if(t===null)throw Error("Session list client is missing");return t}function xt(){let t=g(f);if(t===null)throw Error("Session list provider is missing");return t}function r(t){let o=s();return y((n)=>o.store.subscribe(n),()=>t(o.store.getState()),()=>t(o.store.getState()))}function P(t,o){return o.then(()=>{},(n)=>{if(t.reportError)t.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Tr,h,s,xt,r,P};
|
package/dist/chunk-h7ks1p6h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i,S,at}from"./chunk-gajhc4bp.js";var vn=5000;function se(t){return"pastedText"in t}function Pr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Te(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;S(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Pr(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),at(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function it(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<vn)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};S(e,(a)=>[...a,s]),Te(e,s,n)}
|
|
2
|
-
export{vn,se,Pr,Te,it};
|
package/dist/chunk-j4cm74nv.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-6kn920c5.js";import{v}from"./chunk-kjtd3wc3.js";import{K,E}from"./chunk-erzjz56d.js";import{C}from"./chunk-xjtqdp82.js";import{useId as w}from"react";import{jsx as r,jsxs as c,Fragment as Q}from"react/jsx-runtime";function a(n){return n!==null&&typeof n==="object"&&!Array.isArray(n)}function p(n){if(!a(n)||!a(n.codex))return[];let s=n.codex,i=s.questions;if(s.delivery!=="async"||!Array.isArray(i))return[];if(!i.every((t)=>a(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((l)=>typeof l==="string"))))return[];return i}function At(n,s){return JSON.stringify(["request_user_input_async",n,s])}function ro(n){return{selected:n.options?.length?0:null,text:""}}function Lt(n,s){return s.selected===null?s.text:n.options?.[s.selected]??""}function io(n){return`<send_user_message_question_reply>
|
|
2
|
-
${JSON.stringify([n])}
|
|
3
|
-
</send_user_message_question_reply>`}function Dt(n){if(!a(n)||!a(n.codex))return[];let s=n.codex;return(Array.isArray(s.questionReplyParts)?s.questionReplyParts.map((t)=>a(t)?{...t,answer:t.text}:t):[s.questionReply]).filter((t)=>a(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:l,answer:d})=>({questionItemId:t,question:l,answer:d}))}function ao({question:n,draft:s,status:i,answer:t,error:l,onChange:d,onSubmit:x,onSkip:f,t:o}){let g=w(),y=i==="pending",b=i==="answered"||i==="skipped";return c("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:[r("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:n.title}),b?r("p",{className:"text-sm whitespace-pre-wrap",children:i==="answered"?t:o("asyncQuestion.skipped")}):c(Q,{children:[(n.options?.length??0)>0&&c(K,{"aria-labelledby":`${g}-title`,disabled:!y,value:s.selected===null?"other":String(s.selected),onValueChange:(u)=>d({...s,selected:u==="other"?null:Number(u)}),children:[n.options?.map((u,m)=>c(v,{className:"flex items-start gap-2 text-sm",children:[r(E,{value:String(m)}),r("span",{className:"whitespace-pre-wrap",children:u})]},m)),c(v,{className:"flex items-center gap-2 text-sm",children:[r(E,{value:"other"}),o("asyncQuestion.other")]})]}),r(C,{"aria-label":o("asyncQuestion.answer"),placeholder:o("asyncQuestion.answer"),value:s.text,readOnly:!y,onChange:(u)=>d({selected:null,text:u.target.value})}),l&&r("p",{role:"alert",className:"text-destructive text-sm",children:l}),c("div",{className:"flex flex-wrap items-center gap-2",children:[r(e,{size:"sm",disabled:!y||Lt(n,s).trim().length===0,onClick:x,children:o(i==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),r(e,{size:"sm",variant:"ghost",disabled:!y,onClick:f,children:o("asyncQuestion.skip")}),(i==="closed"||i==="unavailable")&&r("span",{role:"status",className:"text-muted-foreground text-xs",children:o(`asyncQuestion.${i}`)})]})]})]})}
|
|
4
|
-
export{p,At,ro,Lt,io,Dt,ao};
|
package/dist/chunk-jegkf64h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Fr(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 Io(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(Fr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Po(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 Br(t){return[...t].filter((e)=>!s(e)).join("")}function xr(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 ut(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=Br(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-xr(e,o)),r=Math.max(0,i-xr(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{Fr,Io,Po,Br,xr,ut};
|
package/dist/chunk-jjtgsnj0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g}from"./chunk-46gb51y9.js";import{t}from"./chunk-3g8ck68k.js";import{A}from"./chunk-s4tydqhr.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(g,{text:e.text,streaming:o})})}if(i.isImage(e))return n(A,{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(A,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Z({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
-
export{Z};
|
package/dist/chunk-jnrcqphc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p,At,ro,Lt,io,Dt,ao}from"./chunk-j4cm74nv.js";import{t,ee,ce,o}from"./chunk-3g8ck68k.js";import{Z}from"./chunk-jjtgsnj0.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as v}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var x=E({entries:{}});function l(i,e){x.setState((n)=>({entries:{...n.entries,[i]:e}}))}function q(i,e){let n=v(e),a=i.items.findLast((s)=>v(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&v(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...Dt(n._meta),...n.content.filter(k).flatMap((s)=>Dt(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=ee(),{t:y}=t(),S=At(e.id,a),d=JSON.stringify([i,S]),u=ce(x,(r)=>r.entries[d]),c=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??ro(n),b=c===void 0?u?.accepted:M(c,S)??u?.accepted,h=c!==void 0&&q(c,e),D=A&&c?.attached&&!c.restoring&&!c.readOnly,g=b!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(x.getState().entries[d]?.pending||g!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!q(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Lt(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};l(d,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:io(w),_meta:{codex:{questionReply:w}}}]),l(d,{draft:f,accepted:I})}catch(Q){l(d,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(g==="closed")return null;return m(ao,{question:n,draft:f,status:g,answer:b,error:g==="pending"?u?.error:void 0,t:y,onChange:(r)=>l(d,{draft:r}),onSkip:()=>l(d,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function Tt({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=p(e._meta);if(n===void 0||n.readOnly||!q(n,e))return m(Z,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,y)=>m(O,{sessionId:i,item:e,question:s,index:y},At(e.id,y)))})}
|
|
2
|
-
export{Tt};
|
package/dist/chunk-jyy20tw1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function T(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function x(e,t){return e.find((n)=>n.category===t&&o(n))}function Y(e){return T(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{T,x,Y};
|
package/dist/chunk-k7wta28t.js
DELETED
package/dist/chunk-kathd6f3.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 Gt({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{Gt};
|
package/dist/chunk-ksmcznp2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{_t,Ht}from"./chunk-wzjq9j6g.js";import{p}from"./chunk-j4cm74nv.js";import{t}from"./chunk-3g8ck68k.js";import{On,B,Ie,Bn}from"./chunk-34a7aha4.js";import{An}from"./chunk-pmpeh7e8.js";import{Z}from"./chunk-jjtgsnj0.js";import{Tt}from"./chunk-jnrcqphc.js";import{Dn}from"./chunk-zbnjrtye.js";import{Sn}from"./chunk-6xp64b2e.js";import{In}from"./chunk-d8rf7rff.js";import{St,It}from"./chunk-j8fybkv1.js";import{Se}from"./chunk-vyf9wx2w.js";import{codexMessageError as J,codexTurnError as q,isContentEntry as oe,isEmbeddedResource as U,isImage as X,isResourceLink as ae,isText as me,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as pe}from"react";import{jsx as s,jsxs as m,Fragment as R}from"react/jsx-runtime";function D(r){if(X(r))return`${r.mimeType.toLowerCase()}:${r.data}`;if(U(r)&&"blob"in r.resource&&r.resource.mimeType?.toLowerCase().startsWith("image/"))return`${r.resource.mimeType.toLowerCase()}:${r.resource.blob}`;return null}function T({sessionId:r,entry:n,terminals:l,streaming:o,streamingThoughtId:w}){let{t:a}=t();switch(n.kind){case"activity":return s(An,{sessionId:r,items:n.items,terminals:l,streamingThoughtId:w});case"text":return p(n.item._meta).length>0?s(Tt,{sessionId:r,item:n.item}):s(Z,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Sn,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(St,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:n.item.status==="completed"?a("stream.codex.contextCompacted"):n.item.status==="cancelled"?a("timeline.interrupted"):a("timeline.compacting")})]})}}function ue({sessionId:r,turn:n,terminals:l,active:o,blocked:w=!1,continued:a=!1,edits:S=n.edits,activityItems:_=n.items,workStartedAt:Y=n.startedAt,isLast:F,error:u,interrupted:M,retry:L,retrying:g,answerActions:W,footer:ee}){let{t:d}=t(),I=n.errors.map((e)=>{let i=J(e);if(i===null)throw Error("Turn error item is missing its diagnostics");let k=L?.turnId===le(e)?L:void 0;return s(It,{error:i,retry:k},`${e.id}:${k?.delaySeconds??"manual"}`)});if(F&&u!==null&&!n.errors.some((e)=>{let i=J(e);return i!==null&&i.stopReason===u.stopReason&&q(i).message===q(u).message}))I.push(s(It,{error:u},"current-run-error"));let v=I.length>0?s("div",{className:"codex-turn-errors",children:I}):null,f=n.work,y=f.length>0&&f.every((e)=>e.kind==="compaction");if(On(n)||y&&n.final.length===0)return m(R,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),v]});let K=Ie(n),O=n.final.filter((e)=>p(e._meta).length===0).map(B).join(`
|
|
2
|
-
`),h=o?null:Se(n,"assistant"),P=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(D).filter((i)=>i!==null))),N=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((i,k)=>{let c=i.content,ie=e.name==="image_generation"&&X(c),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(c)||U(c)&&("blob"in c.resource));if(!ie&&!re)return[];let b=D(c);if(b!==null){if(G.has(b))return[];G.add(b)}return[{key:`${e.id}:${k}`,block:c}]})}),A=n.final.some((e)=>p(e._meta).length===0&&e.content.some((i)=>!me(i)||i.text.trim().length>0)),te=P.length>0||N.length>0||y||A||n.final.some((e)=>p(e._meta).length>0),x=n.items.findIndex((e)=>n.final.includes(e)),C=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),H=f.filter((e)=>x===-1||C(e)<x),ne=f.filter((e)=>x!==-1&&C(e)>x),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...ne.map((e)=>({kind:"work",entry:e,index:C(e)}))].toSorted((e,i)=>e.index-i.index),Q=!o&&!a&&(O.trim().length>0?s(_t,{text:O,isMostRecentTurn:F,time:h,afterCopy:W}):m("div",{className:"flex items-center gap-0.5",children:[W,h&&s("span",{className:"codex-user-time ms-1",title:h.full,children:h.short})]})),E=In({...n,items:_},{running:o,blocked:w,retrying:g!==void 0}),V=E.kind==="reasoning"?E.ownerKey??null:null,j=E.kind==="thinking",z=Bn({...n,items:_});return m(R,{children:[s(Ht,{stateKey:JSON.stringify([r,n.replayed?"history":"live",n.key]),active:o&&!A,defaultExpanded:o&&!A||!n.replayed&&(M||K),...z,startedAt:z.startedAt??Y,loading:j&&n.work.length===0,work:a||y?[]:H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:o,streamingThoughtId:V},e.key)),answer:te||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||y)&&H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(T,{sessionId:r,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:V},e.entry.key);let i=e.item;return m(ge,{children:[p(i._meta).length>0?s(Tt,{sessionId:r,item:i}):s(Z,{content:i.content,messageId:i.id,streaming:o}),i===n.final.at(-1)&&Q]},i.id)}),P.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),N.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:N.map((e)=>s(Z,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&Q]}):null,footer:m(R,{children:[j&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),ee,S.length>0&&!o&&!a&&s(Dn,{items:S}),M&&!K&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&v]})}),o&&g!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:g.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(g.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():g.message}),o&&v]})}var Tn=pe(ue);
|
|
3
|
-
export{Tn};
|
package/dist/chunk-m2ab6p4w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{zo,y}from"./chunk-3wg25354.js";import{To}from"./chunk-k583q9wq.js";import{te}from"./chunk-8dtaq4eh.js";import{No,Mo,Ro,Eo,Ao,U}from"./chunk-115a3p9z.js";import{Fo,Bo}from"./chunk-0sdhavk8.js";import{Vt}from"./chunk-zse2yz8e.js";import{t,o}from"./chunk-3g8ck68k.js";import{n}from"./chunk-sgy6b5me.js";import{kt}from"./chunk-vmcxp5e2.js";import{i,xn,S,st}from"./chunk-gajhc4bp.js";import{Ye}from"./chunk-btjqewxj.js";import{se,it}from"./chunk-h7ks1p6h.js";import{tt,ot}from"./chunk-7e1m1d9x.js";import{fn}from"./chunk-b9ew8dwr.js";import{Je}from"./chunk-a7nqzhxj.js";import{hn}from"./chunk-xv3qen27.js";import{Ze}from"./chunk-akcs13sj.js";import{rt}from"./chunk-vpt3vyfc.js";import{mn}from"./chunk-1jzxmw98.js";import{un}from"./chunk-3xnbypjz.js";import{et}from"./chunk-9tgtskz4.js";import{hasFuzzyFileSearch as Et}from"@nyssance/codex-acp-v2/client";import{PlusIcon as St}from"lucide-react";import{useCallback as E,useEffect as Nt,useLayoutEffect as X,useMemo as q,useRef as K,useState as N}from"react";import{jsx as c,jsxs as v}from"react/jsx-runtime";var Ot=["image/png","image/jpeg","image/webp","image/gif"],J=[];async function Ft(e){let d=await(await fetch(e.url)).blob();return new Promise((b,G)=>{let I=new FileReader;I.onerror=()=>G(I.error),I.onload=()=>{let O=I.result;b(O.slice(O.indexOf(",")+1))},I.readAsDataURL(d)})}function Dt(e){let{t:d}=t(),b=y();return c(U,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>b.openFileDialog(),...e,children:c(St,{className:"size-4"})})}function Xe({session:e,onSubmit:d,onHandOff:b,modelSelector:G,modelMenu:I,inputHeader:O,actions:ht,children:xt,attachmentPolicy:yt,predictions:Pt=!0,disabled:bt=!1,preparing:Q=!1,allowPendingInput:vt=!1}){let{host:F,client:T}=n(),{t:s}=F,k=E((r)=>{if(F.reportError)F.reportError(r);else console.error(r)},[F]),[Z,D]=N(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:A}=Z,[w,It]=N(()=>i.get(e.id)?.attachments??J),[g,_]=N(()=>i.get(e.id)?.mentions??[]),W=w.some((r)=>se(r)&&r.pastedText.status!=="ready"),[C,nt]=N(!1),[L,wt]=N(!1),[Y,at]=N(!1),u=K(null),ct=K(null),a=K(Z),z=E((r)=>{ct.current?.(),a.current={text:r,revision:a.current.revision+1},D(a.current)},[]),pt=q(()=>({read:()=>{let p=u.current?.getTextarea(),h=p===null||p===void 0?[a.current.text.length,a.current.text.length]:[p.selectionStart,p.selectionEnd];return{target:e.id,...a.current,selection:h}},compareAndSet(p,h,x){if(p.target!==e.id||p.revision!==a.current.revision)return null;a.current={text:h,revision:a.current.revision+1},D(a.current);let l=u.current?.getTextarea();if(l!==null&&l!==void 0)l.value=h,l.setSelectionRange(x[0],x[1]);return{target:e.id,...a.current,selection:x}}}),[e.id]),B=K(null),mt=E((r)=>(B.current=r,()=>{if(B.current===r)B.current=null}),[]),lt=e.state!=="idle",f=!bt&&!Q&&e.attached&&!e.restoring&&!e.readOnly,M=!e.readOnly&&(vt||f),R=rt(e,f&&!C&&!L&&!W&&!Y,A.length>0||w.length>0||g.length>0,Pt),dt=R.invalidate;X(()=>{i.set(e.id,{text:A,attachments:w,mentions:g,modelId:i.get(e.id)?.modelId??null})},[e.id,A,w,g]),X(()=>xn(e.id,It),[e.id]),X(()=>st(e.id,(r)=>{if(!M||C)throw Error("The composer cannot take text now; try again later");if(A.length||w.length||g.length)throw Error("The composer already has a draft; send or clear it first");z(r)}),[e.id,M,C,A,w,g,z]);let ut=o((r)=>Et(r.agent)),Ct=q(()=>ut&&f?async(r)=>Ye((await T.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[T,ut,f,e.cwd]),V=E((r)=>{_((p)=>p.includes(r)?p:[...p,r])},[]);Nt(()=>{u.current?.focus()},[]);let ft=E(async({text:r,files:p})=>{let h=r.trim();if(h.length===0&&p.length===0&&g.length===0)return;let x=B.current;nt(!0);let l=i.get(e.id),Rt=a.current.revision,j=null;try{let P=[];for(let m of g){let H={kind:"file",absPath:m};P.push({type:"resource_link",uri:tt(H),name:ot(H)})}if(h.length>0)P.push({type:"text",text:h});for(let m of p)if(se(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");P.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else P.push({type:"image",data:await Ft(m),mimeType:m.mediaType});if(a.current.revision===Rt&&i.get(e.id)===l)a.current={text:"",revision:a.current.revision+1},j=a.current.revision,D(a.current),_([]),S(e.id,()=>J),i.set(e.id,{text:"",attachments:J,mentions:[],modelId:l?.modelId??null}),u.current?.resetHeight();if(d)if(x===null)await d(P);else await d(P,(m)=>{if(x.signal.aborted||B.current!==x)return;x.accept(m),b?.(e.id,m)});else if(x===null)await T.prompt(e.id,P);else{let m=await T.prompt(e.id,P);x.accept(m)}dt();for(let m of l?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((H)=>H.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(l&&j!==null&&a.current.revision===j&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:l.text,revision:j+1},D(a.current),_(l.mentions),i.set(e.id,l),S(e.id,()=>l.attachments);throw P}finally{nt(!1),u.current?.focus()}},[T,e.id,g,d,b,dt]),Tt=()=>{T.cancel(e.id).catch(k)},At=E((r)=>{let p=r.code==="max_total_size"?Object.assign(Error(s("composer.imageTooLargeTitle")),{description:s("composer.imageTooLargeDescription",{mb:te})}):Object.assign(Error(s("composer.unsupportedAttachmentTitle")),{description:s("composer.unsupportedAttachmentDescription")});k(p)},[k,s]),Mt=q(()=>({session:e,ready:f,inputReady:M,sending:C,textareaRef:u,draft:pt,interruptRef:ct,observeReceipts:mt,addMention:V,setAdding:wt,handsFree:d===void 0||b!==void 0}),[e,f,M,C,pt,mt,V,d,b]),gt=F.writeTextAttachment;return c(kt,{value:Mt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[O&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:O}),v(zo,{attachmentPolicy:yt,value:A,revision:a.current.revision,onValueChange:z,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},D(a.current)},attachments:w,onAttachmentsChange:(r)=>S(e.id,()=>r),children:[c(To,{handleRef:u,commands:e.commands,searchFiles:Ct,onMention:V,onSearchError:k,forcedOpen:Y,onForcedOpenChange:at,emptyLabel:s("composer.noCommands"),fileStatusLabels:{loading:s("composer.searchingFiles"),empty:s("composer.noMatchingFiles")}}),v(No,{globalDrop:!0,multiple:!0,accept:Ot.join(","),onError:At,onSubmit:ft,onSubmitAsync:ft,onSubmitError:k,canSubmit:()=>f&&!C&&!L&&!W?!0:"chat_not_ready",className:"relative z-10",children:[xt,v(Ro,{className:"px-3 pt-3 pb-0 empty:hidden",children:[L&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:s("composer.addingFiles")}),c(fn,{mentions:g,onRemove:(r)=>_((p)=>p.filter((h)=>h!==r))}),c(Bo,{children:(r)=>se(r)?c(hn,{data:r,sessionId:e.id}):c(Fo,{data:r,t:s})})]}),v(Mo,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(r)=>{if(!R.text||u.current?.isComposing()||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey||r.target!==u.current?.getTextarea())return;if(r.key==="Tab")r.preventDefault(),r.stopPropagation(),z(R.text)},children:[c(Vt,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,bashMode:!1,disabled:!M,onPasteCapture:gt?(r)=>it(r,e.id,s("composer.pastedTextFilename"),gt):void 0,placeholder:R.text||(lt?s("composer.steerPlaceholder"):s("composer.placeholder")),"aria-label":s("composer.placeholder")}),R.error&&c("span",{className:"text-muted-foreground text-xs",role:"status",title:R.error,children:s("composer.predictionUnavailable")})]}),c(Eo,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Dt,{className:"text-foreground",disabled:!M}),c(mn,{textareaRef:u,menuOpen:Y,onOpenChange:at,disabled:!f||e.commands.length===0}),c(Ze,{sessionId:e.id,options:e.configOptions,disabled:!f})]}),v(Ao,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(et,{session:e}),G??c(Je,{...I,sessionId:e.id,options:e.configOptions,disabled:!f}),ht,c(un,{active:lt,sending:C||Q||L,ready:f&&!W,hasMentions:g.length>0,onStop:Tt})]})]})})]})]})]})})})}
|
|
2
|
-
export{Xe};
|
package/dist/chunk-n89jvr5q.js
DELETED
package/dist/chunk-nvya2g1d.js
DELETED
package/dist/chunk-rqnvygqy.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a,g}from"./chunk-46gb51y9.js";import{Ft}from"./chunk-dnhmnmgf.js";import{L}from"./chunk-2ymhbrf9.js";import{I}from"./chunk-ckft9abb.js";import{ue,po}from"./chunk-9w0w5by0.js";import{z}from"./chunk-fjwg3y8h.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as U,useRef as V,useState as _}from"react";import{jsx as n,jsxs as p,Fragment as P}from"react/jsx-runtime";function W(e,t){let[o,i]=_(()=>({key:e,mounted:t})),r=t||o.key===e&&o.mounted;if(o.key!==e||o.mounted!==r)i({key:e,mounted:r});return r}var q=new WeakMap,K=1;function b(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=q.get(e);if(t!==void 0)return`${e.type}:${t}`;let o=K;return K+=1,q.set(e,o),`${e.type}:${o}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t){let o=Math.max(0,Math.round(e/1000)),i=Math.floor(o/3600),r=Math.floor(o%3600/60),s=o%60;if(s>=60)r+=Math.floor(s/60),s%=60;if(r>=60)i+=Math.floor(r/60),r%=60;let l=Intl.DurationFormat;if(l)try{return new l(t,{style:"narrow"}).format({hours:i,minutes:r,seconds:i>0?0:s})}catch{}if(i>0)return r>0?`${i}h ${r}m`:`${i}h`;if(r>0)return s>0?`${r}m ${s}s`:`${r}m`;return`${s}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function M({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function J(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;if(O(e))return n(J,{});let t=L(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(J,{})}function B(e,t){let o=e.rawInput[t];return typeof o==="string"&&o.length>0?o:void 0}function we(e){return L(e).target}function j(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function O(e){return j(e)||e.name==="dynamic_tool"}function te(e,t){let{category:o}=L(e),i=we(e),r=N(e.status);if(O(e))return{leading:e.title};if(o==="execute"){let s=B(e,"command")?.split(`
|
|
2
|
-
`)[0]??i;return s?{leading:t(r?"stream.codex.running":"stream.codex.ran"),trailing:s}:{leading:t(r?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(o==="search"){let s=B(e,"pattern")??B(e,"query")??i;return s?{leading:t(r?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(o==="fetch"){let s=B(e,"query")??B(e,"url")??i;return s?{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(o==="read")return i?{leading:t("stream.codex.readLabel"),trailing:i}:{leading:t("stream.codex.readFiles")};if(o==="edit")return i?{leading:t(r?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:i}:{leading:t(r?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(o==="delete")return i?{leading:t(r?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:i}:{leading:t(r?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(o==="move")return i?{leading:t(r?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:i}:{leading:t(r?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function be(e,t){let o=te(e,t);return o.trailing===void 0?o.leading:`${o.leading} ${o.trailing}`}function Le(e){return e.map((t)=>{if(t.type!=="content")return"";let o=t.content;return o.type==="text"?o.text:""}).filter(Boolean).join(`
|
|
3
|
-
`).trim()}function Ne(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let o=t.content;return o.type==="image"?[{data:o.data,mimeType:o.mimeType}]:[]})}function Te(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let o=t.content;return o.type==="audio"?[{data:o.data,mimeType:o.mimeType}]:[]})}function $e(e){if(typeof e==="string"&&e.length>0)return e;return}function ke(e){return e.type==="diff"}function Ae(e){let t=e.content.find(ke);if(t===void 0)return;return t.changes.map((o)=>`${o.operation} ${o.path}`).join(`
|
|
4
|
-
`)}function ne(e){let t=$e(e.rawOutput);if(t!==void 0)return t;let o=Le(e.content);if(o.length>0)return o;return Ae(e)}function Be({block:e,command:t}){let{t:o,Output:i,commandStatus:r}=a(),[s,l]=_(!1),[c,u]=_(!1),m=ne(e),d=r===void 0?e.exitCode===void 0?void 0:o("stream.codex.exitCode",{code:e.exitCode}):r(e),f=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((x)=>x!==void 0).join(`
|
|
5
|
-
`)),l(!0),setTimeout(()=>l(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!c&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":c,onClick:()=>u((x)=>!x),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":o("actions.copy"),onClick:f,children:s?n(pe,{}):n(ge,{})})]}),m!==void 0&&(i===void 0?n("pre",{className:"codex-command-output",children:m}):n(i,{text:m})),d!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:d})})]})})}function ae({block:e}){let{t,openLink:o,Patch:i,openImage:r,commandStatus:s,expandToolOutput:l=!1}=a(),c=ne(e),u=i===void 0?void 0:e.content.flatMap((C)=>{if(C.type!=="diff")return[];let A=C;return A.patch?.text?[A.patch.text]:[]}).join(`
|
|
6
|
-
`),m=Ne(e.content),d=Te(e.content),[f,x]=I(`tool:${e.id}`,!1),k=W(`tool:${e.id}`,f),h=L(e),w=h.category,y=te(e,t),E=w==="execute"?B(e,"command"):void 0,T=E!==void 0||O(e)||m.length>0||d.length>0||Boolean(u)||l&&c!==void 0,S=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let C=s?.(e);if(C)y={...y,leading:C}}if(w==="read"&&N(e.status))return null;let R=p("span",{className:"codex-activity-label",children:[n(ee,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(P,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(S!==void 0?p(P,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:S,onClick:()=>o(S),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[T?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":f,onClick:()=>x((C)=>!C),children:[R,n(M,{expanded:f})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:R}),n("div",{className:v("codex-activity-details-grid",f&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:k&&p(P,{children:[E!==void 0?n(Be,{block:e,command:E}):i!==void 0&&u?n(i,{patch:u}):c!==void 0&&n("pre",{className:"codex-activity-details",children:c}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((C)=>{let A=`data:${C.mimeType};base64,${C.data}`,G=n("img",{src:A,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${C.mimeType}:${C.data.slice(0,32)}`);return r===void 0?G:n("button",{type:"button",className:"cursor-pointer",onClick:()=>r(A),children:G},A)})}),d.map((C)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${C.mimeType};base64,${C.data}`},`${C.mimeType}:${C.data.slice(0,32)}`))]})})})]})}function oe({block:e}){if(e.type==="tool_use")return n(ae,{block:e});if(e.type==="thinking")return n(le,{block:e});if(e.type==="collab")return n(ce,{block:e});return n(ie,{block:e})}function ie({block:e}){let{t,openSession:o}=a(),i=N(e.status),[r,s]=I(`subagent:${e.id}`,i),l=V(i);U(()=>{if(i)s(!0);if(l.current&&!i)s(!1);l.current=i},[i,s]);let c=`${Re(e.activity,i,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,u=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?r:void 0,disabled:!m,onClick:()=>s((d)=>!d),children:[p("span",{className:"codex-activity-label",children:[n(Se,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:o===void 0||e.threadId===null?i?n("span",{className:"codex-activity-running",children:c}):c:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",i&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(d)=>{d.stopPropagation(),o(u,e.name)},onKeyDown:(d)=>{if(d.key!=="Enter"&&d.key!==" ")return;d.preventDefault(),d.stopPropagation(),o(u,e.name)},children:c})})]}),m&&n(M,{expanded:r})]}),n("div",{className:v("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((d)=>{if(d.type==="tool_use")return n(ae,{block:d},d.id);if(d.type==="thinking")return n(le,{block:d},b(d));if(d.type==="subagent")return n(ie,{block:d},d.id);if(d.type==="collab")return n(ce,{block:d},d.id);if(d.type==="text")return n("div",{className:"codex-reasoning-details",children:n(g,{text:d.text,streaming:!1})},b(d));if(d.type==="plan")return n(z,{entries:d.entries},b(d));if(d.type==="image")return n("img",{src:`data:${d.source.media_type};base64,${d.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},b(d));return null})})})})]})}var Ie=8;function Ee(e){let t=0;for(let o=0;o<e.length;o+=1)t=(t*31+e.charCodeAt(o))%2147483647;return t%Ie}function Se({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ee(e),"aria-hidden":"true"})}function Re(e,t,o,i){switch(e){case"started":return i(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:o});case"interacted":return i("stream.codex.subagentMessaged",{name:o});case"interrupted":return i("stream.codex.subagentInterrupted",{name:o});case"completed":return i("stream.codex.subagentFinished",{name:o})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,o){if(e===null)return"";if(t===null)return` · ${Ft(e)}`;let i=_e.has(t)?o(`stream.codex.reasoningEffort.${t}`):t;return` · ${Ft(e)} · ${i}`}var Fe={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,t,o){if(e.tool==="wait")throw Error("Codex does not present wait calls");let i=se(e.status);if(i==="interrupted")return o("stream.codex.collab.interrupted");return o(`stream.codex.collab.${t}.${Fe[e.tool]}.${i}`)}function De(e){return e.agents.filter((t)=>t.nickname!==null)}function de(e,t){let o=e.agents.length>0?e.agents.length:1;return`${H(e,"header",t)}${t("stream.codex.collab.agentCount",{count:o})}`}var F="\x01";function D(e,t,o,i){let r=Object.fromEntries(Object.keys(i).map((s)=>[s,`${F}${s}${F}`]));return e(t,{...o,...r}).split(new RegExp(`${F}(\\w+)${F}`,"u")).map((s,l)=>n(fe,{children:l%2===1?i[s]:s},`${l}:${s}`))}function Pe({agent:e,showModel:t}){let{t:o,openSession:i}=a(),r=e.nickname??"",s=i===void 0?n("span",{className:"font-medium",children:r}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":o("stream.codex.subagentOpen",{name:r}),onClick:()=>i(e.threadId,r),children:r});return p("span",{children:[s,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,o)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Ue(e,t){let o=e.prompt?.trim()?e.prompt:null,i=se(e.status),r=e.tool==="spawnAgent"&&i==="completed"&&o!==null,s=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&o!==null,l=De(e),c=[];if(l.length===0)c.push({key:"generic",node:H(e,"row",t)});for(let u of l){let m=n(Pe,{agent:u,showModel:e.tool==="spawnAgent"});if(r)c.push({key:u.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:o})})})});else if(s)c.push({key:u.threadId,node:n("span",{className:"codex-collab-line",children:D(t,"stream.codex.collab.messagedWithPrompt",{action:i==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${i}`)},{agent:m,prompt:n(Q,{prompt:o})})})});else{let f=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&u.state!==null&&u.state!==null?u.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${u.state.status}`),message:u.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${u.state.status}`)}):"";c.push({key:u.threadId,node:D(t,"stream.codex.collab.agentRow",{action:H(e,"row",t),state:f},{agent:m})})}}if(!r&&!s&&o!==null)c.push({key:"input",node:D(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:o})})});return c}function ce({block:e}){let{t}=a(),[o,i]=I(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let r=N(e.status),s=de(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":o,onClick:()=>i((l)=>!l),children:[p("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:r?n("span",{className:"codex-activity-running",children:s}):s})]}),n(M,{expanded:o})]}),n("div",{className:v("codex-activity-details-grid",o&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Ue(e,t).map((l)=>n("div",{className:"codex-collab-row",children:l.node},l.key))})})})]})}function le({block:e}){let{t,i18n:o}=a(),i=Boolean(e.isComplete),[r,s]=I(`thinking:${b(e)}`,!1),l=V(null),c=e.thinking.trim().length>0;U(()=>{if(i||!c)return;let d=l.current;if(d===null)throw Error("Thinking details are not mounted");let f=new ResizeObserver(()=>{d.scrollTop=d.scrollHeight}),x=null,k=()=>{let w=d.firstElementChild;if(w===x)return;if(x!==null)f.unobserve(x);if(x=w,x!==null)f.observe(x)},h=new MutationObserver(k);return h.observe(d,{childList:!0}),k(),()=>{h.disconnect(),f.disconnect()}},[c,i]);let u=i?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:Z(e.durationMs,o.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>s((d)=>!d),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:i?u:n("span",{className:"codex-activity-running",children:u})})}),c&&n(M,{expanded:r})]}),n("div",{className:v("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:c&&n("div",{ref:l,className:"codex-reasoning-details",role:"region","aria-label":u,"aria-hidden":!r,tabIndex:0,inert:!r,children:n(g,{text:m,streaming:!i})})})})]})}function Ve(e){if(j(e))return"mcp";let t=L(e).category;return t==="think"||t==="switch_mode"?"other":t}function Oe(e,t,o,i){return i(`stream.codex.summary.${e}.${o?"leading":"following"}`,{count:t})}function Ze(e,t,o){let i=new Map,r=[],s=new Set;for(let c of e){if(j(c)&&typeof c.rawInput.server==="string"){if(s.size===0)r.push({kind:"integrations"});s.add(c.rawInput.server);continue}if(O(c)){if(!r.some((m)=>m.kind==="named"&&m.title===c.title))r.push({kind:"named",title:c.title});continue}let u=Ve(c);if(!i.has(u))r.push({kind:"category",category:u});i.set(u,(i.get(u)??0)+1)}let l=r.map((c,u)=>{if(c.kind==="named")return c.title;if(c.kind==="integrations")return t(`stream.codex.summary.integrations.${u===0?"leading":"following"}`,{count:s.size,sources:new Intl.ListFormat(o,{style:"long",type:"conjunction"}).format([...s])});return Oe(c.category,i.get(c.category),u===0,t)});if(o.startsWith("zh"))return l.join("");return new Intl.ListFormat(o,{style:"long",type:"conjunction"}).format(l)}function uo({stateKey:e,durationMs:t,durationKind:o="work",active:i,defaultExpanded:r=i,startedAt:s,providerId:l,providerIcon:c,children:u}){let{t:m,i18n:d}=a(),[f,x]=I(`work:${e}`,r,!0),k=W(`work:${e}`,f||i),h=V(null),[w,y]=_(0);U(()=>{if(!i||t!==void 0){h.current=null;return}h.current=s??Date.now();let T=()=>{let R=h.current;if(R===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-R)};T();let S=window.setInterval(T,1000);return()=>window.clearInterval(S)},[i,s,t]);let E=t!==void 0?m(o==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:Z(t,d.language)}):i&&w>=1000?m("stream.codex.workingFor",{duration:Z(w,d.language)}):m(i?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":f,onClick:()=>x((T)=>!T),children:[l!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":l,"aria-hidden":"true",children:c}),n("span",{children:E}),n(M,{expanded:f,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",f&&"codex-work-grid-open"),"aria-hidden":!f,inert:!f,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:k&&u})})})]})}function He(e,t){if(e.type==="tool_use")return be(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return de(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function We(e,t,o=1000){let[i,r]=_({text:e,live:t}),s=V(Date.now());return U(()=>{if(e===i.text&&t===i.live)return;let l=Date.now(),c=Math.max(0,s.current+o-l);if(c===0||t!==i.live){s.current=l,r({text:e,live:t});return}let u=window.setTimeout(()=>{s.current=Date.now(),r({text:e,live:t})},c);return()=>window.clearTimeout(u)},[i,t,o,e]),t===i.live?i.text:e}function je({blocks:e,defaultExpanded:t=!0}){let{t:o,i18n:i}=a(),r=e.some(X),s=b(e[0]),[l,c]=I(`group:${s}`,t),u=W(`group:${s}`,l||r),m=e.findLast(X)??e.at(-1);if(m===void 0)throw Error("CodexActivityGroup requires at least one activity block");let d=e.filter((x)=>x.type==="tool_use"),f=We(r?He(m,o):Ze(d,o,i.language),r);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":l,onClick:()=>c((x)=>!x),children:[p("span",{className:"codex-activity-label",children:[n(ee,{block:e[0]}),n("span",{className:"truncate",children:r?n("span",{className:"codex-activity-running",children:f}):f})]}),n(M,{expanded:l})]}),n("div",{className:v("codex-activity-group-grid",l&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:u&&e.map((x)=>n(oe,{block:x},b(x)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(je,{blocks:e,defaultExpanded:t})}function Me({blocks:e,defaultExpanded:t}){if(!e.some(ue))return n(Y,{blocks:e,defaultExpanded:t});let o=[];for(let i of e){let r=o.at(-1);if(r&&ue(r[0])===ue(i))r.push(i);else o.push([i])}return n(P,{children:o.map((i)=>ue(i[0])?n(po,{blocks:i.filter(ue)},b(i[0])):n(Y,{blocks:i,defaultExpanded:t},b(i[0])))})}
|
|
7
|
-
export{uo,Me};
|
package/dist/chunk-rw9bsnyp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as g}from"@nyssance/codex-acp-v2/client";function Ln(n,o,r){if(n.kind!=="tool"){let t=g(n.content),c=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(t);return{type:"thinking",id:n.id,thinking:c?c[1]:t,isComplete:!r}}if(n.name==="subagent"){let t=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:p(t.agentPath,n.id),threadId:f(t.agentThreadId,"agentThreadId",n.id),activity:y(t.activity,n.id),model:l(t.model,"model",n.id),reasoningEffort:l(t.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let t=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof t.tool!=="string"||!Array.isArray(t.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:t.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:t.agents}}let i=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},e=u(n,o);if(Array.isArray(i.command))i.command=i.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof i.command!=="string"){let t=e?.command??n.title;if(t!==null)i.command=t}let a=n.rawOutput;if(typeof a==="object"&&a!==null&&"output"in a&&typeof a.output==="string")a=a.output;if(e!==null&&e.output.length>0)a=e.output;let d=e?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:i,rawOutput:a,...typeof d==="number"?{exitCode:d}:{}}}function s(n,o){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${o} is missing an object codex-acp-v2 always sends`);return n}function l(n,o,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${o}`)}function p(n,o){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${o} has no agent path`);return r}function f(n,o,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${o}`)}function y(n,o){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${o} has an unknown activity ${String(n)}`)}
|
|
2
|
-
export{Ln};
|
package/dist/chunk-s1z1418w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h,s,xt,r,P}from"./chunk-fw3emcqw.js";import{G}from"./chunk-bm4s6n8a.js";import{vt}from"./chunk-b8ywzj88.js";import{mt}from"./chunk-4t6bd8j7.js";import{Le,pt}from"./chunk-fb6vxbmc.js";import{hasRename as L}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as F,ArchiveRestoreIcon as D,GitForkIcon as x,PencilIcon as A,Trash2Icon as H}from"lucide-react";import{useRef as N,useState as g}from"react";import{jsx as n,jsxs as C,Fragment as y}from"react/jsx-runtime";function Xt({sessionRow:e,active:f,onSelect:u,onForked:p=u,onHoverCardOpenChange:a,actions:c}){let i=h(),{t:m,i18n:v}=i,S=s(),l=r((o)=>o.runStates[e.sessionId]),k=xt(),d=()=>u(e);return n(vt,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:f,onClick:d,onKeyDown:(o)=>{if(o.key==="Enter"||o.key===" ")o.preventDefault(),d()},state:l?.state,interruption:l?.interruption??null,title:e.title??m("sessionList.untitled"),onHoverCardOpenChange:a,hoverCard:n(R,{sessionRow:e,onDelete:()=>k(e),onForked:p,actions:c}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Le(e.updatedAt,v.language)}):void 0,actions:l!=null?n(mt,{title:m("sessionList.stop"),onStop:()=>P(i,S.stopSession(e.sessionId))}):void 0})}function R({sessionRow:e,onDelete:f,onForked:u,actions:p}){let a=h(),{t:c}=a,i=s(),m=r((t)=>L(t.agent)),v=r((t)=>t.connection==="ready"&&t.agent?.capabilities?.session?.fork!=null),[S,l]=g(!1),[k,d]=g(!1),o=N(!1);return n(pt,{sessionRow:e,renaming:S,onRename:(t)=>{if(l(!1),t!==null)P(a,i.renameSession(e.sessionId,t))},actions:C(y,{children:[m&&n(G,{icon:n(A,{}),label:c("sessionList.rename"),onClick:()=>l(!0)}),p,e.archived?n(G,{icon:n(D,{}),label:c("sessionList.unarchive"),onClick:()=>void P(a,i.unarchive(e.sessionId))}):C(y,{children:[n(G,{icon:n(x,{}),label:c("sessionList.fork"),disabled:!v||k,onClick:()=>{if(o.current)return;o.current=!0,d(!0),P(a,i.fork(e.sessionId,e.cwd).then((t)=>{let I=i.state.sessionList.find((b)=>b.sessionId===t);if(!I)throw Error("Forked chat is missing from the session list");u(I)}).finally(()=>{o.current=!1,d(!1)}))}}),n(G,{icon:n(F,{}),label:c("sessionList.archive"),onClick:()=>void P(a,i.archive(e.sessionId))})]}),n(G,{variant:"destructive",icon:n(H,{}),label:c("sessionList.delete"),onClick:f})]})})}
|
|
2
|
-
export{Xt};
|
package/dist/chunk-sgy6b5me.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{J}from"./chunk-3g8ck68k.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function lt({host:o,client:e,children:t}){let s=a(()=>({host:o,client:e}),[o,e]);return r(J,{host:o,client:e,children:r(i,{value:s,children:t})})}function n(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function b(o,e){e.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{lt,n,b};
|
package/dist/chunk-sk14wfkj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-3g8ck68k.js";import{W,on,j}from"./chunk-1k1e55de.js";import{e}from"./chunk-6kn920c5.js";import{he,ve,xe,ye}from"./chunk-anshr0mw.js";import{lt,n,b}from"./chunk-sgy6b5me.js";import{Xe}from"./chunk-m2ab6p4w.js";import{Ke}from"./chunk-78x93ef2.js";import{We,je}from"./chunk-0fr24sxr.js";import{Ge}from"./chunk-6f2h379x.js";import{LockIcon as D,UnplugIcon as g}from"lucide-react";import{useMemo as A}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function lr({host:t,client:l,...c}){let s=A(()=>t.openDiff?t:{...t,openDiff:We},[t]);return i(lt,{host:s,client:l,children:[r(R,{...c}),!t.openDiff&&r(je,{})]})}function R({session:t,header:l,overlay:c,timeline:s,composer:y,readOnlyActions:x,welcome:u,children:C,rootRef:N}){let{host:d,client:w}=n(),{t:a}=d,p=o((m)=>m.connection==="ready"),f=o((m)=>m.historyPages[t.id]?.error),v=()=>b(d,w.open(t.id,t.cwd)),h=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:N,className:"flex h-full min-h-0 flex-col",children:[l,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[c,p&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(W,{children:[r(g,{}),r(on,{children:a("conversation.stopped")}),r(j,{children:r(e,{size:"sm",variant:"outline",onClick:v,children:a("conversation.reconnect")})})]})}),h?u??r(he,{className:"flex-1",children:i(ve,{children:[r(xe,{className:"text-[28px] font-normal",children:a("conversation.welcomeTitle")}),r(ye,{children:a("conversation.welcomeDescription")})]})}):r(Ke,{session:t,timeline:s}),r(Ge,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(W,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(D,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(on,{children:a("conversation.readOnlyTitle")}),r(j,{children:a("conversation.readOnlyDescription")}),f&&r("p",{role:"alert",className:"text-destructive break-words",children:f})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(e,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:v,disabled:!p||t.restoring,children:a(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),x]})]})}):y??r(Xe,{session:t})]}),C]})}
|
|
2
|
-
export{lr};
|
package/dist/chunk-vmcxp5e2.js
DELETED
package/dist/chunk-wzjq9j6g.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,g}from"./chunk-46gb51y9.js";import{L}from"./chunk-2ymhbrf9.js";import{so}from"./chunk-gq30yqjk.js";import{z}from"./chunk-fjwg3y8h.js";import{uo,Me}from"./chunk-rqnvygqy.js";import{go}from"./chunk-5f4m4ptz.js";import{Ot}from"./chunk-83dkw1mh.js";import{cn as b}from"cn";import{jsx as o,jsxs as y}from"react/jsx-runtime";var R=new WeakMap,w=1;function N(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=R.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=w++;return R.set(t,s),`${t.type}:${s}`}function P({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return y("div",{className:"codex-assistant-message",children:[o(g,{text:t.text,streaming:n}),s]})}function I({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(P,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(g,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(z,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var E=new Set;function ni({message:t,isMostRecentTurn:n,hiddenTools:s=E,time:i,beforeCopy:r,afterCopy:l,providerIcon:u,renderText:T,renderEditedFiles:C}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(A,{});let h=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),B=!t.streaming&&h.trim().length>0?o(_t,{text:h,isMostRecentTurn:n,beforeCopy:r,afterCopy:l,time:i}):null,d=so(t.content,"compact"),x=d.reduce((e,c,p)=>c.kind==="codexActivityGroup"?p:e,-1),k=d.findIndex((e,c)=>c>x&&e.kind==="block"&&e.block.type==="text"),M=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&L(e).category==="edit"),v=(e)=>{if(e.kind==="codexActivityGroup"){let c=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return c.length===0?null:o(Me,{blocks:c},`activity:${N(c[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(I,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===M?B:void 0,renderText:T},N(e.block))},m=x===-1?0:k===-1?d.length:k;return o(Ht,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:d.slice(0,m).map(v),answer:d.length>m?d.slice(m).map(v):null,footer:x!==-1&&f.length>0&&(C===void 0?o(go,{blocks:f}):C(f))})}function _t({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let l=a(),{t:u}=l;return y("div",{className:b("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Ot,{text:t,label:u("actions.copy"),host:l}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function A(){let{t}=a();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t("message.thinking")})})}function Ht({work:t,answer:n,footer:s,loading:i=!1,...r}){if(i)return o(A,{});return y("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(uo,{...r,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{ni,_t,Ht};
|