@alwith/module-chat 0.5.12 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-tm4ee7m3.js → chunk-0keppemg.js} +2 -2
- package/dist/{chunk-8a1j96d1.js → chunk-0mze2qnw.js} +2 -2
- package/dist/{chunk-vcbv30ph.js → chunk-195y00jd.js} +2 -2
- package/dist/chunk-19a0ehyy.js +2 -0
- package/dist/{chunk-ana59z25.js → chunk-1ghceftn.js} +1 -1
- package/dist/chunk-1gmz5kxh.js +2 -0
- package/dist/{chunk-58bs5f2z.js → chunk-1wpdb17m.js} +2 -2
- package/dist/{chunk-chwg3na0.js → chunk-1z6v9pjq.js} +2 -2
- package/dist/{chunk-reaxcamj.js → chunk-20mzyay7.js} +2 -2
- package/dist/{chunk-ddtb692j.js → chunk-215c1t1e.js} +2 -2
- package/dist/{chunk-wmk2dwpf.js → chunk-2bkh8cjr.js} +2 -2
- package/dist/{chunk-tjykfxrd.js → chunk-2pj3pcc7.js} +2 -2
- package/dist/{chunk-tjpr0adf.js → chunk-2qhbm5y9.js} +2 -2
- package/dist/{chunk-q256c3hn.js → chunk-2r3sfmyf.js} +2 -2
- package/dist/chunk-2wxea30c.js +2 -0
- package/dist/{chunk-sn80gr8g.js → chunk-3ccatjcc.js} +3 -3
- package/dist/chunk-3fvwqfm2.js +2 -0
- package/dist/{chunk-qg1b5k6m.js → chunk-3wwkzyxs.js} +2 -2
- package/dist/{chunk-fnbs3dq1.js → chunk-40d5the9.js} +2 -2
- package/dist/{chunk-qwyvq7bk.js → chunk-4p7yyxq8.js} +2 -2
- package/dist/{chunk-9t8ptjct.js → chunk-4q7rpdzc.js} +2 -2
- package/dist/chunk-4r3ch7fk.js +2 -0
- package/dist/{chunk-hw99hhjf.js → chunk-4tst6wwf.js} +1 -1
- package/dist/{chunk-c9k66x5g.js → chunk-4z4tec0p.js} +2 -2
- package/dist/{chunk-kbwjcnf6.js → chunk-5cnw6yc7.js} +1 -1
- package/dist/{chunk-3dvx2q8w.js → chunk-5mpabjpm.js} +2 -2
- package/dist/{chunk-8712sy9s.js → chunk-5pr21n80.js} +1 -1
- package/dist/{chunk-bcrq96dw.js → chunk-5x4an3fb.js} +2 -2
- package/dist/chunk-6acs2hzs.js +2 -0
- package/dist/{chunk-4hv66fey.js → chunk-6t3tgzps.js} +2 -2
- package/dist/chunk-6y5d4j79.js +2 -0
- package/dist/chunk-7cm1jptm.js +2 -0
- package/dist/{chunk-023yzyq8.js → chunk-7h1m9nbx.js} +2 -2
- package/dist/chunk-7x4dpkzh.js +2 -0
- package/dist/{chunk-mwd0ed0c.js → chunk-8q0nz9fp.js} +2 -2
- package/dist/chunk-8x43r6fk.js +2 -0
- package/dist/{chunk-1hy64ewz.js → chunk-9mxxxkzq.js} +1 -1
- package/dist/{chunk-mk379yt7.js → chunk-9v7x6sqy.js} +2 -2
- package/dist/chunk-9wgngtx8.js +2 -0
- package/dist/{chunk-0qm0fy2r.js → chunk-a4j8mjg1.js} +2 -2
- package/dist/{chunk-a2hygrpr.js → chunk-aac5y6xt.js} +1 -1
- package/dist/chunk-afd3bq7v.js +2 -0
- package/dist/{chunk-anfrrs5x.js → chunk-ajmyr2zy.js} +1 -1
- package/dist/{chunk-ks05sstp.js → chunk-apqdf6y3.js} +1 -1
- package/dist/chunk-b0zk92wd.js +2 -0
- package/dist/chunk-b7afpbwn.js +3 -0
- package/dist/chunk-b9hjn4a5.js +2 -0
- package/dist/{chunk-zw3h5xgf.js → chunk-bk0ezksw.js} +1 -1
- package/dist/chunk-bm68x7xa.js +3 -0
- package/dist/chunk-bx2rafbd.js +3 -0
- package/dist/{chunk-27vftbhf.js → chunk-c2bkhrcc.js} +4 -4
- package/dist/{chunk-fteek5h4.js → chunk-c4t2a146.js} +2 -2
- package/dist/{chunk-b65vdzz3.js → chunk-can1xpx6.js} +1 -1
- package/dist/chunk-cc0tan75.js +2 -0
- package/dist/chunk-cj9htyem.js +2 -0
- package/dist/{chunk-s2k5xynq.js → chunk-d0q5kbq8.js} +2 -2
- package/dist/{chunk-m6h92nq4.js → chunk-d1z2ns5m.js} +2 -2
- package/dist/chunk-de85vphg.js +2 -0
- package/dist/{chunk-hwfwd04r.js → chunk-dnsmr5nf.js} +2 -2
- package/dist/{chunk-3ah1ez70.js → chunk-e4a1cf50.js} +5 -5
- package/dist/{chunk-dxt9j0da.js → chunk-e8ngg07w.js} +2 -2
- package/dist/{chunk-ksv9pjc2.js → chunk-emdw6cpb.js} +1 -1
- package/dist/chunk-ey5vrsya.js +2 -0
- package/dist/{chunk-mvv5xmap.js → chunk-fexvhys2.js} +2 -2
- package/dist/chunk-fsyc5ybt.js +2 -0
- package/dist/{chunk-d6840cvf.js → chunk-ftcydsbs.js} +2 -2
- package/dist/{chunk-bftrddmr.js → chunk-gqxjp1xf.js} +2 -2
- package/dist/chunk-gtyab797.js +2 -0
- package/dist/{chunk-fpx4ng0t.js → chunk-hfaarm10.js} +2 -2
- package/dist/{chunk-36t9x2qc.js → chunk-hhwdk46d.js} +3 -3
- package/dist/{chunk-6kn920c5.js → chunk-htnp024d.js} +1 -1
- package/dist/{chunk-dgnk7h62.js → chunk-j3tka93v.js} +2 -2
- package/dist/{chunk-62m11b37.js → chunk-j5047dxn.js} +3 -3
- package/dist/{chunk-cy6grsx0.js → chunk-jgvbf3sx.js} +1 -1
- package/dist/{chunk-kw487283.js → chunk-jkwf97cs.js} +2 -2
- package/dist/{chunk-ds6avzj3.js → chunk-k7gn0faf.js} +2 -2
- package/dist/{chunk-ek06eyp4.js → chunk-kjtd3wc3.js} +1 -1
- package/dist/{chunk-63zq5nr8.js → chunk-ksb110ef.js} +2 -2
- package/dist/{chunk-hz1pgnqp.js → chunk-kv0tnq8g.js} +2 -2
- package/dist/chunk-kzcrcs7q.js +2 -0
- package/dist/{chunk-c0ac9k7h.js → chunk-m4dgha79.js} +2 -2
- package/dist/{chunk-kfs19vc5.js → chunk-m5k1xtjr.js} +2 -2
- package/dist/{chunk-qnk5jk1b.js → chunk-mbjv33a2.js} +2 -2
- package/dist/chunk-mqxg6cgm.js +4 -0
- package/dist/{chunk-4wkpatzz.js → chunk-mrfy48hg.js} +2 -2
- package/dist/{chunk-1drkvxzk.js → chunk-ms49ecg4.js} +1 -1
- package/dist/{chunk-hh498geh.js → chunk-mst2ng40.js} +6 -6
- package/dist/{chunk-svt0t387.js → chunk-mzh48e09.js} +2 -2
- package/dist/{chunk-r0t8zj4g.js → chunk-n9f80j0a.js} +2 -2
- package/dist/chunk-ns6yd5s6.js +3 -0
- package/dist/{chunk-vyccmpdn.js → chunk-nt59nkbj.js} +2 -2
- package/dist/chunk-ntegv7av.js +2 -0
- package/dist/{chunk-c7km8xgd.js → chunk-nvqy2rd1.js} +2 -2
- package/dist/{chunk-8jpm8fnf.js → chunk-p12g8enf.js} +1 -1
- package/dist/{chunk-znyyzs85.js → chunk-phq6b35v.js} +2 -2
- package/dist/{chunk-xxkdv1zf.js → chunk-pv35kspb.js} +1 -1
- package/dist/chunk-q6km9nha.js +2 -0
- package/dist/{chunk-zg2342s2.js → chunk-qa6kb660.js} +2 -2
- package/dist/{chunk-gszy4mhj.js → chunk-qp7aywgn.js} +2 -2
- package/dist/{chunk-a1kmc6t8.js → chunk-qpdgh554.js} +3 -3
- package/dist/{chunk-xa20eex9.js → chunk-qx9j4bnh.js} +1 -1
- package/dist/{chunk-y6r6tzfh.js → chunk-qxabrz98.js} +2 -2
- package/dist/{chunk-2w576ygb.js → chunk-qz8gpb9j.js} +2 -2
- package/dist/{chunk-phy911dk.js → chunk-r8mszb32.js} +3 -3
- package/dist/{chunk-7avpdkmf.js → chunk-rf9yxbes.js} +2 -2
- package/dist/{chunk-3g66qg03.js → chunk-rwczpvta.js} +2 -2
- package/dist/{chunk-sbyn62qx.js → chunk-rxwqvya2.js} +2 -2
- package/dist/{chunk-w45d5th9.js → chunk-s0ef3h7b.js} +2 -2
- package/dist/{chunk-ckft9abb.js → chunk-s55n9cby.js} +2 -2
- package/dist/{chunk-6nyba0m4.js → chunk-t1j88bvm.js} +2 -2
- package/dist/chunk-t1m9ysv5.js +2 -0
- package/dist/{chunk-2pha46d9.js → chunk-tc7qxw3f.js} +1 -1
- package/dist/{chunk-ak0k5vg6.js → chunk-tc85dd04.js} +1 -1
- package/dist/chunk-tq6ekz3s.js +2 -0
- package/dist/chunk-tv74s60m.js +2 -0
- package/dist/chunk-vbgfrh23.js +2 -0
- package/dist/{chunk-zmpbfbnn.js → chunk-wdy20cvh.js} +2 -2
- package/dist/chunk-wf9bna6z.js +2 -0
- package/dist/{chunk-xj0y094j.js → chunk-wmeebq8x.js} +2 -2
- package/dist/{chunk-vc9ts6wp.js → chunk-wmp3w889.js} +2 -2
- package/dist/{chunk-gtqwgjjg.js → chunk-wtkn1jej.js} +2 -2
- package/dist/chunk-x2wg6e97.js +2 -0
- package/dist/chunk-x8kxqtva.js +2 -0
- package/dist/{chunk-mkw0twsb.js → chunk-xpdv1aed.js} +2 -2
- package/dist/chunk-xqr05vqf.js +2 -0
- package/dist/chunk-xw93fypz.js +3 -0
- package/dist/{chunk-xd5rqbwp.js → chunk-xx4tnhcy.js} +1 -1
- package/dist/{chunk-bbwb4555.js → chunk-y2z94rrh.js} +2 -2
- package/dist/chunk-y6xhz68r.js +2 -0
- package/dist/{chunk-y0psrvcc.js → chunk-yh9qdb2k.js} +3 -3
- package/dist/{chunk-1k03fpcj.js → chunk-yhxs6266.js} +2 -2
- package/dist/{chunk-6ss1981q.js → chunk-ykp85wc1.js} +2 -2
- package/dist/{chunk-753s76b6.js → chunk-zrx7qt5g.js} +2 -2
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +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.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.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.d.ts +1 -0
- 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/conversation/subagent-sessions.d.ts +3 -0
- package/dist/conversation/subagent-sessions.js +1 -0
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +143 -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/locales.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.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/ui/alert.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/empty.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input-group-textarea.js +1 -1
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/input.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/tooltip.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-1dh0q11h.js +0 -4
- package/dist/chunk-24b1z856.js +0 -2
- package/dist/chunk-31x6chk8.js +0 -2
- package/dist/chunk-3q6ssrs3.js +0 -2
- package/dist/chunk-76w1a72z.js +0 -2
- package/dist/chunk-9hvbm4be.js +0 -2
- package/dist/chunk-9v94xnhp.js +0 -2
- package/dist/chunk-aprxk7c2.js +0 -2
- package/dist/chunk-b1vw42he.js +0 -2
- package/dist/chunk-b3nt7axf.js +0 -2
- package/dist/chunk-b5z75meq.js +0 -2
- package/dist/chunk-bna24ggr.js +0 -2
- package/dist/chunk-bzk6wn2s.js +0 -3
- package/dist/chunk-e15f3anm.js +0 -3
- package/dist/chunk-ee9pzqnq.js +0 -2
- package/dist/chunk-evx9d147.js +0 -2
- package/dist/chunk-f3e3ged2.js +0 -2
- package/dist/chunk-f7n8erng.js +0 -2
- package/dist/chunk-fa0kzj3j.js +0 -2
- package/dist/chunk-gbbpdhg6.js +0 -2
- package/dist/chunk-gpz9f9zq.js +0 -2
- package/dist/chunk-hgj33wbd.js +0 -2
- package/dist/chunk-hpyaxv6h.js +0 -2
- package/dist/chunk-ht28382s.js +0 -2
- package/dist/chunk-jr591zg2.js +0 -2
- package/dist/chunk-jtv179nm.js +0 -2
- package/dist/chunk-nad1erxy.js +0 -3
- package/dist/chunk-nwrbpw97.js +0 -2
- package/dist/chunk-qv4x469a.js +0 -2
- package/dist/chunk-rag9xsg5.js +0 -2
- package/dist/chunk-rrrpp44m.js +0 -2
- package/dist/chunk-rtg6xfgr.js +0 -2
- package/dist/chunk-shsyer15.js +0 -2
- package/dist/chunk-tt40vzdd.js +0 -2
- package/dist/chunk-x2tsybks.js +0 -3
- package/dist/chunk-y1kkt0m2.js +0 -3
- package/dist/chunk-zp5ntx27.js +0 -2
package/dist/chunk-b5z75meq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Hn}from"./chunk-s2k5xynq.js";import{e}from"./chunk-6kn920c5.js";import{re,t,ie,o,Ve}from"./chunk-f3e3ged2.js";import{vo,Ee,Wt,bo,wo}from"./chunk-753s76b6.js";import{Re}from"./chunk-c0ac9k7h.js";import{ao}from"./chunk-nad1erxy.js";import{ro}from"./chunk-tm4ee7m3.js";import{jn,Kn}from"./chunk-qg1b5k6m.js";import{$n,qn}from"./chunk-m6h92nq4.js";import{Un}from"./chunk-tjpr0adf.js";import{io}from"./chunk-kw487283.js";import{Vn}from"./chunk-1dh0q11h.js";import{codexExtensionCapabilities as ze,codexMessageError as Be,codexRetryNotice as qe,codexTurnError as Oe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as V,useEffect as A,useLayoutEffect as ve,useMemo as Q,useRef as b,useState as _}from"react";import{flushSync as Te}from"react-dom";import{jsx as l,jsxs as L}from"react/jsx-runtime";var ye=24;function Ke(n){let m=Math.max(0,n.turnTopPx-ye),v=Math.max(0,n.scrollHeightPx-n.viewportHeightPx),c=m-v;return{scrollTopPx:m,spacerPx:c>0?n.spacerPx+c:n.spacerPx}}function Ue({viewportRef:n,viewportProps:m,children:v}){return l("div",{ref:n,...m,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function _e({sessionId:n,turnId:m,root:v,error:c,connected:S}){let C=b(null),w=ie(),{t:N}=t(),R=V(()=>{w.loadHistoryTurn(n,m).catch(()=>{})},[w,n,m]);return A(()=>{if(!v||!C.current||!S||c)return;let B=new IntersectionObserver((T)=>{if(T.some((P)=>P.isIntersecting))B.disconnect(),R()},{root:v,rootMargin:"800px 0px"});return B.observe(C.current),()=>B.disconnect()},[v,S,c,R]),l("div",{ref:C,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":m,"data-markdown-pending":!0,children:c?L("div",{className:"flex flex-col items-center gap-2",children:[l("p",{role:"alert",className:"text-destructive text-xs",children:c}),l(e,{variant:"outline",size:"sm",onClick:R,disabled:!S,children:N("timeline.navigationRetry")})]}):L("div",{role:"status","aria-label":N("timeline.navigationLoading"),className:"space-y-3",children:[l("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),l("div",{className:"bg-muted h-3 w-4/5 rounded"}),l("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function $e(n,m){let v=b([]),c=b(null);if(c.current?.items!==n.items||c.current.state!==n.state||c.current.ended!==n.turnEndedAt||c.current.usage!==n.turnUsage||c.current.historyOrder!==m)c.current={state:n.state,items:n.items,ended:n.turnEndedAt,usage:n.turnUsage,historyOrder:m,turns:vo(n,v.current,m)};let S=c.current.turns;return v.current=S,S}function _n(n){return l(re,{host:n.host,client:n.client,children:l(De,{...n})})}function De({session:n,leading:m,afterTurn:v,answerActions:c,turnFooter:S,renderUserMessage:C,insert:w,navigation:N,anchorNewTurn:R=!1,Viewport:B=Ue}){let T=ie(),P=t(),y=o((r)=>r.historyNavigation[n.id]),d=$e(n,y?.turns),M=d.at(-1)?.key,xe=bo(n,d),x=n.state!=="idle",D=Q(()=>ro(d,y),[d,y]),Y=Q(()=>D.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[D]),he=Q(()=>N===void 0?[]:jn(d,n.turnUsage,y),[N,d,n.turnUsage,y]),Z=w&&w.afterItemId!==null?d.findIndex((r)=>r.items.some((u)=>u.id===w.afterItemId)):-1,j=b(d);j.current=d;let[a,be]=_(null),h=o((r)=>r.historyPages[n.id]),I=o((r)=>r.connection==="ready"),we=o((r)=>ze(r.agent).sessionRetry),ee=h!==void 0;A(()=>{if(I&&ee&&!n.restoring)T.loadHistoryNavigation(n.id).catch(()=>{})},[T,I,ee,n.id,n.restoring]);let[Se,Pe]=_(!1),F=b(null),[Ie,te]=_(!1),ne=b(0),W=b({key:M,running:x});W.current={key:M,running:x};let[oe,K]=_(0),k=b(0),E=b(null);k.current=oe;let He=V(()=>{if(E.current!==null)E.current.keepTop=!1},[]),{isFollowing:z,scrollToBottom:X,stopFollowing:q,schedulePin:le,contentResized:ae,beginLocate:ue,cancelLocation:se}=io(a,x,He),ce=V(()=>{if(a===null||!x)return;let r=d.at(-1)?.key;if(r===void 0)return;let u=ue(!0),s=()=>u.isCurrent()&&W.current.running&&W.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!s())return;let g=a.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(g===null)return;let f=a.scrollTop+g.getBoundingClientRect().top-a.getBoundingClientRect().top,H=Ke({turnTopPx:f,scrollHeightPx:a.scrollHeight,viewportHeightPx:a.clientHeight,spacerPx:k.current});E.current=H.spacerPx>0?{element:g,heightPx:g.getBoundingClientRect().height+H.spacerPx,keepTop:!0}:null,Te(()=>K(H.spacerPx)),requestAnimationFrame(()=>{if(s())u.finish(H.scrollTopPx)})})),p=F.current;if(p===null)return;p.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(s())i()})},[ue,x,a,d]);ve(()=>{if(!R||x)return;se(),E.current=null,k.current=0,K(0)},[R,se,x]);let G=V(()=>{q(),T.loadOlderHistory(n.id).catch(()=>{})},[T,n.id,q]);A(()=>{if(a===null)return;let r=()=>{let u=a.scrollTop<600;if(Pe(u),u&&!y?.complete&&I&&!n.restoring&&!z&&h?.cursor&&!h.loading&&!h.error)G()};return r(),a.addEventListener("scroll",r,{passive:!0}),()=>a.removeEventListener("scroll",r)},[I,h,z,G,a,n.restoring,y?.complete]),A(()=>{$n({sessionId:n.id,turns:Y,api:F.current,beforeReveal:q,terminals:n.terminals})},[n.id,n.terminals,Y,q]),A(()=>()=>qn(n.id),[n.id]);let Ne=V(async(r,u)=>{let s=++ne.current;te(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await T.loadHistoryTurn(n.id,r.nativeTurnId),await new Promise((f)=>requestAnimationFrame(()=>f()));if(!u())return null;let i=j.current.find((f)=>f.user?.id===(r.messageId??r.id))??j.current.find((f)=>f.user!==null&&r.nativeTurnId!==void 0&&f.items.some((H)=>ge(H)===r.nativeTurnId));if(!i?.user)return null;let p=i.user.id,g=F.current;if(g===null)throw Error("Virtual timeline is not mounted");return await g.scrollToKey(i.key,(f)=>f.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(ne.current===s)te(!1)}},[T,n.id]),ke=V(async(r)=>{if(r.nativeTurnId!==void 0)await T.previewHistoryTurn(n.id,r.nativeTurnId)},[T,n.id]);A(()=>{if(a===null)return;let r=a.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let s=E.current,i=null;if(s!==null){let p=Math.max(0,s.heightPx-s.element.getBoundingClientRect().height);if(p!==k.current&&(p<k.current||s.keepTop)){if(k.current=p,Te(()=>K(p)),p===0)E.current=null}if(p>0&&s.keepTop)i=a.scrollTop+s.element.getBoundingClientRect().top-a.getBoundingClientRect().top-ye}ae(i)});if(u.observe(r),u.observe(a),M!==void 0){let s=a.querySelector(`[data-codex-turn="${CSS.escape(M)}"]`);if(s===null)throw Error("Latest turn is not mounted");u.observe(s)}return()=>u.disconnect()},[ae,M,a]),A(()=>{if(n.items.length===0)return;le()},[le,n.items]);let de=b(null);ve(()=>{if(a===null)return;let r=d.at(-1),u=de.current;if(de.current=r===void 0?null:{key:r.key,running:x},r===void 0||u===null||r.user===null||r.replayed)return;if(R){if(x&&n.turnEndedAt[r.user.id]===void 0&&(r.key!==u.key||!u.running))E.current=null,k.current=0,K(0),ce()}else if(r.key!==u.key)X()},[ce,R,x,X,a,n.turnEndedAt,d]);let Ae=(r,u)=>{let s=r,i=s.turn;if(i===void 0){if(s.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return l(_e,{sessionId:n.id,turnId:s.nativeTurnId,root:a,error:y?.turnErrors[s.nativeTurnId],connected:I&&!z&&!Ie})}let p=d.indexOf(i),g=i.key===xe,f=wo(n,d,p),H=!g&&f.continued,U=i.key===M,O=i.errors.at(-1),me=O===void 0?null:Be(O),J=O===void 0?null:ge(O),Le=U&&!g&&I&&we&&n.attached&&!n.readOnly&&!n.restoring&&O===n.items.at(-1)&&me!==null&&Oe(me).category==="overloaded"&&J!==null&&n.lastStopReason!=="end_turn"&&n.lastStopReason!=="cancelled",fe=S?.(i)??null,Ce=i.work.length>0||i.final.length>0||i.errors.length>0||g||fe!==null||Ee(i)||Wt(i)||U&&(n.error!==null||n.lastStopReason==="cancelled"),pe=i.user===null?null:Re(i);return L("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(C===void 0?l(Vn,{item:i.user,messageTime:pe}):C(i.user,pe)),Ce&&l(ao,{sessionId:n.id,turn:i,terminals:n.terminals,active:g,blocked:n.state==="requires_action",continued:H,edits:f.edits,activityItems:f.items,workStartedAt:f.startedAt,isLast:U,error:n.error,retrying:g?qe(n._meta)??void 0:void 0,retry:Le?{turnId:J,delaySeconds:Un(d),run:(Me)=>T.retrySession(n.id,J,Me)}:void 0,interrupted:Wt(i)||!g&&U&&n.lastStopReason==="cancelled",answerActions:c?.(i),footer:fe}),u===Z&&w?.node,v?.(i)]})};return L("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[l(B,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":P.t("timeline.label")},children:l("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:L("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[w&&Z===-1&&w.node,l(Hn,{ref:F,entries:D,renderTurn:Ae,scrollElement:a,sessionKey:n.id,preserveViewport:!z,leadingInsetPx:12,leadingContent:m===void 0?void 0:l("div",{className:"pt-3",children:m})}),R&&l("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:oe}}),l("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),l("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),y?.error&&l("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:l(e,{variant:"outline",size:"sm",disabled:!I,title:y.error,onClick:()=>{T.loadHistoryNavigation(n.id).catch(()=>{})},children:P.t("timeline.navigationRetry")})}),Se&&h?.cursor&&!y?.complete&&L("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[l(e,{variant:"outline",size:"sm",disabled:!I||n.restoring||h.loading,onClick:G,children:h.loading?P.t("timeline.loadingEarlier"):P.t("timeline.loadEarlier")}),h.error&&l("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:h.error})]}),N!==void 0&&l(Kn,{items:he,audio:N.audio,scrollRoot:a,beforeReveal:q,ensureItemMounted:Ne,onPreviewItem:ke,onRevealError:(r)=>Ve(P,r),targetTopMarginPx:16},n.id),l("button",{type:"button",className:z?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:z?-1:void 0,onClick:X,"aria-label":P.t("timeline.scrollToBottom"),children:x?L("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"})]}):l(Fe,{})})]})}
|
|
2
|
-
export{_n};
|
package/dist/chunk-bna24ggr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-6kn920c5.js";import{ue}from"./chunk-1drkvxzk.js";import{d,u,b,X,m,w}from"./chunk-a2hygrpr.js";import{f}from"./chunk-ek06eyp4.js";import{At,Lt,En,An,Ln,at}from"./chunk-8jpm8fnf.js";import{l}from"./chunk-1hy64ewz.js";import{j,P}from"./chunk-ana59z25.js";import{$e}from"./chunk-ak0k5vg6.js";import{k}from"./chunk-ncekagm6.js";import{isArrayProperty as S,isBooleanProperty as A,isNumberProperty as C,isStringProperty as E}from"@nyssance/codex-acp-v2/client";import{useEffect as N,useMemo as V,useState as R}from"react";import{jsx as o,jsxs as p}from"react/jsx-runtime";function q(r){if(!E(r))return null;if(r.oneOf&&r.oneOf.length>0)return r.oneOf.map((t)=>({value:t.const,label:t.title??t.const,...t.description?{description:t.description}:{}}));if(r.enum&&r.enum.length>0)return r.enum.map((t)=>({value:t,label:t}));return null}function L(r){let t=r,n=t._meta?.alwith?.options;if(Array.isArray(n)&&Array.isArray(t.enum))return n.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));if(Array.isArray(t.enum))return t.enum.map((i)=>({value:String(i),label:String(i)}));if(Array.isArray(t.oneOf))return t.oneOf.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));return null}function Nr(r){let t=new Set(r.required??[]);return Object.entries(r.properties??{}).map(([n,i])=>({key:n,property:i,title:i.title??n,description:i.description??null,required:t.has(n),options:q(i),multiOptions:S(i)?L(i.items):null}))}function hr(r){let t={};for(let n of r){let i=n.property.default;if(i!==void 0&&i!==null)t[n.key]=i;else if(n.options)t[n.key]=n.options[0].value;else if(A(n.property))t[n.key]=!1;else if(S(n.property))t[n.key]=[]}return t}function Mr(r,t){if(r.multiOptions)return Array.isArray(t)&&t.length>0;if(!r.required)return!0;return t!==void 0&&t!==""&&!(Array.isArray(t)&&t.length===0)}function D({id:r,label:t,description:n,control:i}){return p("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[i,p(f,{htmlFor:r,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[o("div",{className:"text-foreground text-sm",children:t}),n&&o("div",{className:"text-muted-foreground text-xs",children:n})]})]})}function G({id:r,field:t,value:n,onChange:i}){if(t.multiOptions){let a=new Set(Array.isArray(n)?n:[]);return p(At,{children:[o(Lt,{variant:"label",children:t.title}),t.description&&o(at,{children:t.description}),o("div",{className:"flex flex-col gap-1",children:t.multiOptions.map((c)=>{let g=`${r}:${c.value}`;return o(D,{id:g,...c,control:o(ue,{id:g,checked:a.has(c.value),onCheckedChange:(F)=>{let y=new Set(a);if(F)y.add(c.value);else y.delete(c.value);i([...y])}})},c.value)})})]})}if(t.options)return p(At,{children:[o(Lt,{variant:"label",children:t.title}),t.description&&o(at,{children:t.description}),o(j,{value:typeof n==="string"?n:"",onValueChange:(a)=>i(String(a)),className:"flex flex-col gap-1",children:t.options.map((a)=>{let c=`${r}:${a.value}`;return o(D,{id:c,...a,control:o(P,{value:a.value,id:c})},a.value)})})]});return p(An,{children:[o(Ln,{htmlFor:r,children:t.title}),A(t.property)?o($e,{id:r,checked:n===!0,onCheckedChange:(a)=>i(a)}):C(t.property)?o(l,{id:r,type:"number",required:t.required,value:typeof n==="number"?n:"",onChange:(a)=>i(a.target.value===""?void 0:Number(a.target.value))}):o(k,{id:r,rows:2,required:t.required,value:typeof n==="string"?n:"",onChange:(a)=>i(a.target.value)}),t.description&&o(at,{children:t.description})]})}function kn({requestId:r,schema:t,message:n,total:i,t:a,onRespond:c}){let g=V(()=>Nr(t),[t]),[F,y]=R(()=>hr(g));N(()=>y(hr(g)),[r,g]);let x=g.every((s)=>Mr(s,F[s.key])),O=()=>{if(!x)return;let s={};for(let[h,v]of Object.entries(F))if(v!==void 0)s[h]=v;c({action:"accept",content:s})};return o(d,{open:!0,onOpenChange:(s)=>!s&&c({action:"cancel"}),children:p(u,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(s)=>{if(s.key==="Enter"&&(s.metaKey||s.ctrlKey))s.preventDefault(),O()},children:[p(b,{children:[p("div",{className:"flex items-center justify-between gap-2 pe-8",children:[o(m,{children:t.title??a("approval.needed")}),i>1&&o("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${i}`})]}),o(w,{children:n})]}),o("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o(En,{children:g.map((s)=>o(G,{id:`${r}:${s.key}`,field:s,value:F[s.key],onChange:(h)=>y((v)=>({...v,[s.key]:h}))},s.key))})}),p(X,{children:[o(e,{variant:"ghost",onClick:()=>c({action:"decline"}),children:a("actions.decline")}),o(e,{disabled:!x,onClick:O,children:a("actions.submit")})]})]})})}
|
|
2
|
-
export{Nr,hr,Mr,kn};
|
package/dist/chunk-bzk6wn2s.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,v}from"./chunk-y6r6tzfh.js";import{S}from"./chunk-sn80gr8g.js";import{co}from"./chunk-bftrddmr.js";import{G}from"./chunk-w45d5th9.js";import{so,Me}from"./chunk-hh498geh.js";import{po}from"./chunk-a1kmc6t8.js";import{qt}from"./chunk-8a1j96d1.js";import{cn as M}from"cn";import{jsx as o,jsxs as g}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 g("div",{className:"codex-assistant-message",children:[o(v,{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(v,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(G,{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 mi({message:t,isMostRecentTurn:n,hiddenTools:s=E,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:T,renderEditedFiles:y}){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 C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),b=!t.streaming&&C.trim().length>0?o(Ft,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=co(t.content,"compact"),x=l.reduce((e,c,p)=>c.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,c)=>c>x&&e.kind==="block"&&e.block.type==="text"),B=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&S(e).category==="edit"),k=(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===B?b:void 0,renderText:T},N(e.block))},m=x===-1?0:h===-1?l.length:h;return o(Bt,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(po,{blocks:f}):y(f))})}function Ft({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=a(),{t:u}=d;return g("div",{className:M("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(qt,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function A({label:t}){let{t:n}=a();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function Bt({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(A,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(so,{...d,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{mi,Ft,Bt};
|
package/dist/chunk-e15f3anm.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{q,V}from"./chunk-kbwjcnf6.js";import{e}from"./chunk-6kn920c5.js";import{d,u,b,X,m,w}from"./chunk-a2hygrpr.js";import{l}from"./chunk-1hy64ewz.js";import{Nt,Mt,Rt,xn,Z}from"./chunk-xd5rqbwp.js";import{ce}from"./chunk-xxkdv1zf.js";import{p,s,r}from"./chunk-b3nt7axf.js";import{le,U,D}from"./chunk-f7n8erng.js";import{sessionGroup as F}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Y,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as f}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:v,...n}){return i(xn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",v)})}function H(v){return v instanceof Error?v.message:String(v)}function Le({children:v}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:v})})}function mr({Scroll:v=Le}){let{t:n,i18n:B}=p(),g=s(),N=r((t)=>t.archivedSessions),A=r((t)=>t.connection),[O,se]=f(""),[C,ie]=f("all"),[x,ne]=f("all"),[ae,re]=f(0),[G,K]=f(!0),[z,Q]=f(null),[_,R]=f(null),[I,j]=f(!1),S=ye(!1),[P,y]=f(null),[W,T]=f(null),[oe,J]=f(!1);Se(()=>{if(A!=="ready")return;let t=!1;K(!0),Q(null);async function h(){try{await g.listArchived({reset:!0});let o=new Set;while(!t&&g.state.archivedCursor!==null){let L=g.state.archivedCursor;if(o.has(L))throw Error("Archive pagination returned a repeated cursor");o.add(L),await g.listArchived()}}catch(o){if(!t)Q(H(o))}finally{if(!t)K(!1)}}return h(),()=>{t=!0}},[g,A,ae]);let c=r((t)=>t.projectContext),E=!(c!==null&&A==="ready"&&!G&&z===null)||I,k=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(N.filter((t)=>c&&F(c,t).id!==D).map((t)=>c?F(c,t).id:t.cwd))].toSorted(),ue=O.trim().toLocaleLowerCase(B.language),M=N.filter((t)=>{let h=c?F(c,t).id:null,o=h===D;return k(t).toLocaleLowerCase(B.language).includes(ue)&&(C==="all"||(C==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:h===x))}),me=new Intl.DateTimeFormat(B.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,j(!0),R(null);try{await g.unarchive(t.sessionId)}catch(h){R(H(h))}finally{S.current=!1,j(!1)}}async function he(){if(S.current||!P)return;S.current=!0,j(!0),T(null);let t=[],h=[];try{for(let o of P){if(!g.state.archivedSessions.some((L)=>L.sessionId===o.sessionId))continue;try{await g.delete(o.sessionId)}catch(L){t.push(o),h.push(`${k(o)}: ${H(L)}`)}}if(t.length)y(t),T(h.join(`
|
|
2
|
-
`));else y(null)}finally{S.current=!1,j(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:E||N.length===0,onClick:()=>{T(null),J(!0),y([...N])},children:[i(ee,{className:"size-4","aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:O,onChange:(t)=>se(t.target.value),className:"rounded-md ps-9"})]}),a(Nt,{value:C,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ie(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Mt,{children:n(`sessionList.archives.${C==="all"?"allChats":C==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allChats")}),i(Z,{value:"quick",children:n("sessionList.archives.quickChats")}),i(Z,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Nt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");ne(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Mt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):U(x,c??void 0)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allProjects")}),i(Z,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(Z,{value:t,title:t,children:U(t,c??void 0)},t))]})]})]}),a(v,{children:[A!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):G?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(ce,{}),n("sessionList.archives.loading")]}):z?i(q,{variant:"destructive",children:a(V,{className:"flex items-center justify-between gap-4",children:[i("span",{children:z}),i(e,{variant:"outline",onClick:()=>re((t)=>t+1),children:n("sessionList.archives.retry")})]})}):N.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):M.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?le(M,c):[]).filter(([,t])=>t.length>0).map(([t,h])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===D?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===D?n("sessionList.archives.noProject"):U(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:h.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:h.map((o)=>a("article",{"aria-label":k(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:k(o),children:k(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:E,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),J(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:E,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),_&&i(q,{variant:"destructive",children:i(V,{children:_})})]})]}),i(d,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(u,{showCloseButton:!I,children:[a(b,{children:[i(m,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(oe?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),W&&i(q,{variant:"destructive",children:i(V,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:W})}),a(X,{children:[i(e,{variant:"outline",disabled:I,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-sm font-normal",disabled:E,onClick:()=>void he(),children:[I&&i(ce,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{mr};
|
package/dist/chunk-ee9pzqnq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{et,Y}from"./chunk-aprxk7c2.js";import{L}from"./chunk-tjykfxrd.js";import{z}from"./chunk-fteek5h4.js";import{J}from"./chunk-ht28382s.js";import{Ie,se,Se}from"./chunk-q256c3hn.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 fn(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 Te({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 Xe({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 Pt({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(Ie,"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(Te,{children:s}),f??e(L,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Se,{content:r!==void 0?e(se,{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,Y),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(fn,{className:"mt-0.5",children:C})]})}var H=S(()=>{}),O=S(()=>{});function Ye(){return k(O)}function Ze(){return k(H)}function Je({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(Ie,et,"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(Te,{children:t!=null?e(z,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(L,{className:p("leading-none",t==="done"&&"font-semibold"),children:r}),N!=null&&e(L,{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(Se,{content:C!=null?e(se,{children:C}):b??e(se,{}),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(_,{row:y,onOpenChange:l,children:a})}function _({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 J(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{fn,Te,Xe,Pt,Ye,Ze,Je};
|
package/dist/chunk-evx9d147.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g,Qt,ko,Xt,Co,Yt,To}from"./chunk-36t9x2qc.js";import{t,ie,ke,o}from"./chunk-f3e3ged2.js";import{ee}from"./chunk-zmpbfbnn.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 p(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[...Yt(n._meta),...n.content.filter(k).flatMap((s)=>Yt(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=ie(),{t:l}=t(),S=Qt(e.id,a),d=JSON.stringify([i,S]),u=ke(x,(r)=>r.entries[d]),c=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??ko(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,y=b!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(x.getState().entries[d]?.pending||y!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!q(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Xt(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};p(d,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:Co(w),_meta:{codex:{questionReply:w}}}]),p(d,{draft:f,accepted:I})}catch(Q){p(d,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(y==="closed")return null;return m(To,{question:n,draft:f,status:y,answer:b,error:y==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(d,{draft:r}),onSkip:()=>p(d,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function Kt({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=g(e._meta);if(n===void 0||n.readOnly||!q(n,e))return m(ee,{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,l)=>m(O,{sessionId:i,item:e,question:s,index:l},Qt(e.id,l)))})}
|
|
2
|
-
export{Kt};
|
package/dist/chunk-f3e3ged2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{lr}from"./chunk-y6r6tzfh.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function re({host:e,client:n,children:i}){return r(lr,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function ie(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function ke(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=ie();return ke(n.store,e)}function Ve(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{re,t,ie,ke,o,Ve};
|
package/dist/chunk-f7n8erng.js
DELETED
package/dist/chunk-fa0kzj3j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v}from"./chunk-y6r6tzfh.js";import{G}from"./chunk-w45d5th9.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function So({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(v,{text:t.content,streaming:!1})});if(!n(t))return null;return e(G,{entries:t.entries})}
|
|
2
|
-
export{So};
|
package/dist/chunk-gbbpdhg6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ze}from"./chunk-vcbv30ph.js";import{K,Jo}from"./chunk-gtqwgjjg.js";import{t}from"./chunk-f3e3ged2.js";import{Go}from"./chunk-cy6grsx0.js";import{ye,be,we}from"./chunk-hw99hhjf.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{jsx as o,jsxs as n,Fragment as h}from"react/jsx-runtime";var f=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Wo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=ze(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(h,{children:[a&&o(K,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(ye,{children:[o(be,{render:o(Jo,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(we,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(Go,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
|
|
2
|
-
export{Wo};
|
package/dist/chunk-gpz9f9zq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i,A,vt}from"./chunk-fnbs3dq1.js";var Vo=5000;function xe(t){return"pastedText"in t}function $r(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Fe(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;A(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":$r(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),vt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function ft(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<Vo)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};A(e,(a)=>[...a,s]),Fe(e,s,n)}
|
|
2
|
-
export{Vo,xe,$r,Fe,ft};
|
package/dist/chunk-hgj33wbd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{K}from"./chunk-gtqwgjjg.js";import{t}from"./chunk-f3e3ged2.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function jo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(K,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{jo};
|
package/dist/chunk-hpyaxv6h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{rr,y}from"./chunk-vcbv30ph.js";import{Eo}from"./chunk-phy911dk.js";import{oe}from"./chunk-qv4x469a.js";import{Ko,Qo,Xo,Yo,Zo,K}from"./chunk-gtqwgjjg.js";import{Mo,Ro}from"./chunk-znyyzs85.js";import{Jt}from"./chunk-62m11b37.js";import{t,o}from"./chunk-f3e3ged2.js";import{n}from"./chunk-9hvbm4be.js";import{nn}from"./chunk-shsyer15.js";import{i,ar,A,xt}from"./chunk-fnbs3dq1.js";import{ut}from"./chunk-svt0t387.js";import{xe,ft}from"./chunk-gpz9f9zq.js";import{yt,wt}from"./chunk-31x6chk8.js";import{sr}from"./chunk-rrrpp44m.js";import{gt}from"./chunk-b1vw42he.js";import{Bo}from"./chunk-3dvx2q8w.js";import{mt}from"./chunk-zp5ntx27.js";import{pt}from"./chunk-reaxcamj.js";import{jo}from"./chunk-hgj33wbd.js";import{Wo}from"./chunk-gbbpdhg6.js";import{dt}from"./chunk-9v94xnhp.js";import{hasFuzzyFileSearch as Bt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as _t}from"lucide-react";import{useCallback as S,useEffect as Lt,useLayoutEffect as Q,useMemo as Z,useRef as V,useState as F}from"react";import{jsx as c,jsxs as I}from"react/jsx-runtime";var zt=["image/png","image/jpeg","image/webp","image/gif"],tt=[];async function Ut(e){let d=await(await fetch(e.url)).blob();return new Promise((l,R)=>{let T=new FileReader;T.onerror=()=>R(T.error),T.onload=()=>{let L=T.result;l(L.slice(L.indexOf(",")+1))},T.readAsDataURL(d)})}function Wt(e){let{t:d}=t(),l=y();return c(K,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>l.openFileDialog(),...e,children:c(_t,{className:"size-4"})})}function lt({session:e,onSubmit:d,onShellCommand:l,onHandOff:R,modelSelector:T,modelMenu:L,inputHeader:et,actions:It,children:Tt,attachmentPolicy:At,predictions:Mt=!0,disabled:Ct=!1,preparing:rt=!1,allowPendingInput:Et=!1}){let{host:k,client:N}=n(),{t:p}=k,D=S((r)=>{if(k.reportError)k.reportError(r);else console.error(r)},[k]),[nt,B]=F(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:b}=nt,[M,Rt]=F(()=>i.get(e.id)?.attachments??tt),[u,z]=F(()=>i.get(e.id)?.mentions??[]),X=M.some((r)=>xe(r)&&r.pastedText.status!=="ready"),[C,ot]=F(!1),[U,Nt]=F(!1),[q,at]=F(!1),f=V(null),it=V(null),a=V(nt),W=S((r)=>{it.current?.(),a.current={text:r,revision:a.current.revision+1},B(a.current)},[]),ct=Z(()=>({read:()=>{let s=f.current?.getTextarea(),g=s===null||s===void 0?[a.current.text.length,a.current.text.length]:[s.selectionStart,s.selectionEnd];return{target:e.id,...a.current,selection:g}},compareAndSet(s,g,E){if(s.target!==e.id||s.revision!==a.current.revision)return null;a.current={text:g,revision:a.current.revision+1},B(a.current);let x=f.current?.getTextarea();if(x!==null&&x!==void 0)x.value=g,x.setSelectionRange(E[0],E[1]);return{target:e.id,...a.current,selection:E}}}),[e.id]),_=V(null),st=S((r)=>(_.current=r,()=>{if(_.current===r)_.current=null}),[]),j=e.state!=="idle",v=l!==void 0&&b.startsWith("!"),h=!Ct&&!rt&&e.attached&&!e.restoring&&!e.readOnly,O=!e.readOnly&&(Et||h),H=pt(e,h&&!C&&!U&&!X&&!q,b.length>0||M.length>0||u.length>0,Mt&&!v),ht=H.invalidate;Q(()=>{i.set(e.id,{text:b,attachments:M,mentions:u,modelId:i.get(e.id)?.modelId??null})},[e.id,b,M,u]),Q(()=>ar(e.id,Rt),[e.id]),Q(()=>xt(e.id,(r)=>{if(!O||C)throw Error("The composer cannot take text now; try again later");if(b.length||M.length||u.length)throw Error("The composer already has a draft; send or clear it first");W(r)}),[e.id,O,C,b,M,u,W]);let Pt=o((r)=>Bt(r.agent)),Ot=Z(()=>Pt&&h?async(r)=>ut((await N.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[N,Pt,h,e.cwd]),J=S((r)=>{z((s)=>s.includes(r)?s:[...s,r])},[]);Lt(()=>{f.current?.focus()},[]);let bt=S(async({text:r,files:s})=>{let g=l!==void 0&&r.startsWith("!")?r.slice(1):null;if(g!==null){if(g.trim().length===0)return;if(s.length||u.length)throw Error("Shell commands cannot include file references or attachments");if(e.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let E=r.trim();if(E.length===0&&s.length===0&&u.length===0)return;let x=_.current;ot(!0);let w=i.get(e.id),Dt=a.current.revision,G=null;try{let P=[];for(let m of u){let Y={kind:"file",absPath:m};P.push({type:"resource_link",uri:yt(Y),name:wt(Y)})}if(E.length>0)P.push({type:"text",text:E});for(let m of s)if(xe(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 Ut(m),mimeType:m.mediaType});if(a.current.revision===Dt&&i.get(e.id)===w)a.current={text:"",revision:a.current.revision+1},G=a.current.revision,B(a.current),z([]),A(e.id,()=>tt),i.set(e.id,{text:"",attachments:tt,mentions:[],modelId:w?.modelId??null}),f.current?.resetHeight();if(g!==null&&l)await l(g);else if(d)if(x===null)await d(P);else await d(P,(m)=>{if(x.signal.aborted||_.current!==x)return;x.accept(m),R?.(e.id,m)});else if(x===null)await N.prompt(e.id,P);else{let m=await N.prompt(e.id,P);x.accept(m)}ht();for(let m of w?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((Y)=>Y.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(w&&G!==null&&a.current.revision===G&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:w.text,revision:G+1},B(a.current),z(w.mentions),i.set(e.id,w),A(e.id,()=>w.attachments);throw P}finally{ot(!1),f.current?.focus()}},[N,e.id,e.state,u,d,l,R,ht]),St=()=>{N.cancel(e.id).catch(D)},Ft=S((r)=>{let s=r.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:oe})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});D(s)},[D,p]),kt=Z(()=>({session:e,ready:h,inputReady:O,sending:C,textareaRef:f,draft:ct,interruptRef:it,observeReceipts:st,addMention:J,setAdding:Nt,shellMode:v,handsFree:!v&&(d===void 0||R!==void 0)}),[e,h,O,C,ct,st,J,d,R,v]),vt=k.writeTextAttachment;return c(nn,{value:kt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:I("div",{className:"relative",children:[et&&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:et}),I(rr,{attachmentPolicy:At,value:b,revision:a.current.revision,onValueChange:W,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},B(a.current)},attachments:M,onAttachmentsChange:(r)=>A(e.id,()=>r),children:[c(Eo,{bashMode:l!==void 0,handleRef:f,commands:e.commands,searchFiles:Ot,onMention:J,onSearchError:D,forcedOpen:q,onForcedOpenChange:at,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),I(Ko,{"data-shell-mode":v||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:zt.join(","),onError:Ft,onSubmit:bt,onSubmitAsync:bt,onSubmitError:D,canSubmit:()=>h&&!C&&!U&&!X&&(!v||!j&&b.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Tt,I(Xo,{className:"px-3 pt-3 pb-0 empty:hidden",children:[U&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),c(sr,{mentions:u,onRemove:(r)=>z((s)=>s.filter((g)=>g!==r))}),c(Ro,{children:(r)=>xe(r)?c(Bo,{data:r,sessionId:e.id}):c(Mo,{data:r,t:p})})]}),I(Qo,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(r)=>{if(!H.text||f.current?.isComposing()||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey||r.target!==f.current?.getTextarea())return;if(r.key==="Tab")r.preventDefault(),r.stopPropagation(),W(H.text)},children:[v&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(Jt,{className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,bashMode:l!==void 0,disabled:!O,onPasteCapture:vt?(r)=>ft(r,e.id,p("composer.pastedTextFilename"),vt):void 0,placeholder:v?"! command":H.text||(j?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),c(Yo,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:I("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[I("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Wt,{className:"text-foreground",disabled:!O}),c(jo,{textareaRef:f,menuOpen:q,onOpenChange:at,disabled:!h||e.commands.length===0}),c(mt,{sessionId:e.id,options:e.configOptions,disabled:!h})]}),I(Zo,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(dt,{session:e}),T??c(gt,{...L,sessionId:e.id,options:e.configOptions,disabled:!h}),It,c(Wo,{active:j,sending:C||rt||U,ready:h&&!X&&(!v||!j&&b.slice(1).trim().length>0),hasMentions:u.length>0,onStop:St})]})]})})]})]})]})})})}
|
|
2
|
-
export{lt};
|
package/dist/chunk-ht28382s.js
DELETED
package/dist/chunk-jr591zg2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var vr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Tn(e){return[...e].toSorted((o,n)=>(vr[o.kind]??99)-(vr[n.kind]??99))}function Zr(e){return e==="allow_once"||e==="allow_always"}function Jr(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{vr,Tn,Zr,Jr};
|
package/dist/chunk-jtv179nm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f3e3ged2.js";import{de,Pe,it}from"./chunk-y1kkt0m2.js";import{jsx as t,jsxs as d,Fragment as r}from"react/jsx-runtime";var a=[];function rt({sessionId:s}){let e=o((n)=>n.actions),c=e.some((n)=>n.sessionId===s)?e.filter((n)=>n.sessionId===s):a,i=c.filter(de),l=c.filter((n)=>!de(n));return d(r,{children:[l.length>0&&t("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:l.map((n)=>t(it,{action:n},n.id))}),i[0]!==void 0&&t(Pe,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
-
export{rt};
|
package/dist/chunk-nad1erxy.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Ft,Bt}from"./chunk-bzk6wn2s.js";import{g}from"./chunk-36t9x2qc.js";import{Zt}from"./chunk-zg2342s2.js";import{t}from"./chunk-f3e3ged2.js";import{ho,W,Ee,xo}from"./chunk-753s76b6.js";import{zt}from"./chunk-wmk2dwpf.js";import{ee}from"./chunk-zmpbfbnn.js";import{Kt}from"./chunk-evx9d147.js";import{mo}from"./chunk-3ah1ez70.js";import{So}from"./chunk-fa0kzj3j.js";import{Po}from"./chunk-2w576ygb.js";import{Gt,jt}from"./chunk-0qm0fy2r.js";import{Re}from"./chunk-c0ac9k7h.js";import{codexMessageError as J,codexTurnError as U,isContentEntry as ae,isEmbeddedResource as X,isImage as Y,isResourceLink as me,isText as le,nativeTurnId as de}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as ce,SparklesIcon as ge}from"lucide-react";import{Fragment as ue,memo as pe,useEffect as fe,useState as ye}from"react";import{jsx as s,jsxs as m,Fragment as E}from"react/jsx-runtime";function q(i){if(Y(i))return`${i.mimeType.toLowerCase()}:${i.data}`;if(X(i)&&"blob"in i.resource&&i.resource.mimeType?.toLowerCase().startsWith("image/"))return`${i.resource.mimeType.toLowerCase()}:${i.resource.blob}`;return null}function he({item:i}){let{t:n}=t(),l=i.status==="in_progress",[o,c]=ye(()=>Date.now()-i.at>=1e4);return fe(()=>{if(!l)return;let a=Math.max(0,i.at+1e4-Date.now());if(c(a===0),a===0)return;let y=setTimeout(()=>c(!0),a);return()=>clearTimeout(y)},[i.id,i.at,l]),m("div",{className:"codex-context-compaction",children:[s(ge,{"aria-hidden":"true"}),s("span",{children:i.status==="completed"?n("stream.codex.contextCompacted"):i.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:i,entry:n,terminals:l,streaming:o,streamingThoughtId:c}){let{t:a}=t();switch(n.kind){case"activity":return s(zt,{sessionId:i,items:n.items,terminals:l,streamingThoughtId:c});case"text":return g(n.item._meta).length>0?s(Kt,{sessionId:i,item:n.item}):s(ee,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(So,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Gt,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return s(he,{item:n.item})}}function xe({sessionId:i,turn:n,terminals:l,active:o,blocked:c=!1,continued:a=!1,edits:y=n.edits,activityItems:M=n.items,workStartedAt:Z=n.startedAt,isLast:F,error:h,interrupted:L,retry:K,retrying:p,answerActions:O,footer:te}){let{t:d}=t(),C=n.errors.map((e)=>{let r=J(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let v=K?.turnId===de(e)?K:void 0;return s(jt,{error:r,retry:v},`${e.id}:${v?.delaySeconds??"manual"}`)});if(F&&h!==null&&!n.errors.some((e)=>{let r=J(e);return r!==null&&r.stopReason===h.stopReason&&U(r).message===U(h).message}))C.push(s(jt,{error:h},"current-run-error"));let x=C.length>0?s("div",{className:"codex-turn-errors",children:C}):null,A=n.items.filter(Zt);if(A.length>0&&A.length===n.items.length)return m(E,{children:[s(zt,{sessionId:i,items:A,terminals:l,streamingThoughtId:null}),x]});let k=n.work,T=k.length>0&&k.every((e)=>e.kind==="compaction");if(ho(n)||T&&n.final.length===0)return m(E,{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(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),x]});let P=Ee(n),D=n.final.filter((e)=>g(e._meta).length===0).map(W).join(`
|
|
2
|
-
`),w=o?null:Re(n,"assistant"),G=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),B=new Set(n.final.flatMap((e)=>e.content.map(q).filter((r)=>r!==null))),b=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(ae).flatMap((r,v)=>{let u=r.content,re=e.name==="image_generation"&&Y(u),oe=e.toolKind!=="read"&&e.toolKind!=="search"&&(me(u)||X(u)&&("blob"in u.resource));if(!re&&!oe)return[];let _=q(u);if(_!==null){if(B.has(_))return[];B.add(_)}return[{key:`${e.id}:${v}`,block:u}]})}),R=n.final.some((e)=>g(e._meta).length===0&&e.content.some((r)=>!le(r)||r.text.trim().length>0)),ne=G.length>0||b.length>0||T||R||n.final.some((e)=>g(e._meta).length>0),I=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),H=k.filter((e)=>I===-1||S(e)<I),se=k.filter((e)=>I!==-1&&S(e)>I),ie=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...se.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,r)=>e.index-r.index),Q=!o&&!a&&(D.trim().length>0?s(Ft,{text:D,isMostRecentTurn:F,time:w,afterCopy:O}):m("div",{className:"flex items-center gap-0.5",children:[O,w&&s("span",{className:"codex-user-time ms-1",title:w.full,children:w.short})]})),f=Po({...n,items:M},{running:o,blocked:c,retrying:p!==void 0}),V=f.kind==="reasoning"?f.ownerKey??null:null,j=f.kind==="thinking",z=xo({...n,items:M});return m(E,{children:[s(Bt,{stateKey:JSON.stringify([i,n.replayed?"history":"live",n.key]),active:o&&!R,defaultExpanded:o&&!R||!n.replayed&&(L||P),...z,startedAt:z.startedAt??Z,loading:(j||f.kind==="working")&&n.work.length===0,loadingLabel:f.kind==="working"?d("stream.codex.working"):void 0,work:a||T?[]:H.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:o,streamingThoughtId:V},e.key)),answer:ne||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&H.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),ie.map((e)=>{if(e.kind==="work")return s(N,{sessionId:i,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:V},e.entry.key);let r=e.item;return m(ue,{children:[g(r._meta).length>0?s(Kt,{sessionId:i,item:r}):s(ee,{content:r.content,messageId:r.id,streaming:o}),r===n.final.at(-1)&&Q]},r.id)}),G.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(ce,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),b.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:b.map((e)=>s(ee,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&Q]}):null,footer:m(E,{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")})}),te,y.length>0&&!o&&!a&&s(mo,{items:y}),L&&!P&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&x]})}),o&&p!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&x]})}var ao=pe(xe);
|
|
3
|
-
export{ao};
|
package/dist/chunk-nwrbpw97.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l}from"./chunk-1hy64ewz.js";import{Q}from"./chunk-ksv9pjc2.js";import{p}from"./chunk-b3nt7axf.js";import{Ke}from"./chunk-6ss1981q.js";import{L}from"./chunk-tjykfxrd.js";import{Ye,Ze}from"./chunk-ee9pzqnq.js";import{formatDistanceToNowStrict as H}from"date-fns";import{enUS as z,zhCN as E}from"date-fns/locale";import{ClockIcon as A,MessageSquareIcon as D}from"lucide-react";import{useEffect as S,useState as w}from"react";import{jsx as o,jsxs as C,Fragment as M}from"react/jsx-runtime";var h={en:z,"zh-CN":E};function Ce(t,a){let r=a==="zh-CN"?h["zh-CN"]:h.en;return H(new Date(t),{locale:r})}function je({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:y,PathAction:u}=p(),f=Ze(),I=Ye();S(()=>{f(n)},[n,f]);let[x,d]=w(t.title??"");S(()=>{if(n)d(t.title??"")},[n,t.title]);let N=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},v=t.archived?i("sessionList.archived"):t.updatedAt!==null?Ce(t.updatedAt,y.language):null,g=[];if(v!==null)g.push({icon:o(A,{className:"size-3.5"}),text:v});let s=u&&o(u,{cwd:t.cwd,onOpened:I});return o(Ke,{title:n?o(l,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>d(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")N(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>N(e.target.value)}):C("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(L,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(D,{className:"size-3.5"}),details:g,actions:s||a!==void 0?C(M,{children:[s,s&&a!==void 0&&o(Q,{}),a]}):void 0})}
|
|
2
|
-
export{Ce,je};
|
package/dist/chunk-qv4x469a.js
DELETED
package/dist/chunk-rag9xsg5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p,s,tt,r,T}from"./chunk-b3nt7axf.js";import{B}from"./chunk-6ss1981q.js";import{Je}from"./chunk-ee9pzqnq.js";import{Qe}from"./chunk-qnk5jk1b.js";import{Ce,je}from"./chunk-nwrbpw97.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 St({sessionRow:e,active:f,onSelect:u,onForked:v=u,onHoverCardOpenChange:a,actions:c}){let i=p(),{t:m,i18n:S}=i,k=s(),l=r((o)=>o.runStates[e.sessionId]),h=tt(),d=()=>u(e);return n(Je,{"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:()=>h(e),onForked:v,actions:c}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ce(e.updatedAt,S.language)}):void 0,actions:l!=null?n(Qe,{title:m("sessionList.stop"),onStop:()=>T(i,k.stopSession(e.sessionId))}):void 0})}function R({sessionRow:e,onDelete:f,onForked:u,actions:v}){let a=p(),{t:c}=a,i=s(),m=r((t)=>L(t.agent)),S=r((t)=>t.connection==="ready"&&t.agent?.capabilities?.session?.fork!=null),[k,l]=g(!1),[h,d]=g(!1),o=N(!1);return n(je,{sessionRow:e,renaming:k,onRename:(t)=>{if(l(!1),t!==null)T(a,i.renameSession(e.sessionId,t))},actions:C(y,{children:[m&&n(B,{icon:n(A,{}),label:c("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?n(B,{icon:n(D,{}),label:c("sessionList.unarchive"),onClick:()=>void T(a,i.unarchive(e.sessionId))}):C(y,{children:[n(B,{icon:n(x,{}),label:c("sessionList.fork"),disabled:!S||h,onClick:()=>{if(o.current)return;o.current=!0,d(!0),T(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(B,{icon:n(F,{}),label:c("sessionList.archive"),onClick:()=>void T(a,i.archive(e.sessionId))})]}),n(B,{variant:"destructive",icon:n(H,{}),label:c("sessionList.delete"),onClick:f})]})})}
|
|
2
|
-
export{St};
|
package/dist/chunk-rrrpp44m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-f3e3ged2.js";import{qe}from"./chunk-xa20eex9.js";import{e}from"./chunk-6kn920c5.js";import{bt}from"./chunk-31x6chk8.js";import{FileIcon as m,XIcon as r}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function sr({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(qe,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(m,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:bt(o)}),a(e,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:bt(o)}),onClick:()=>s(o),children:a(r,{className:"size-3"})})]},o))})}
|
|
2
|
-
export{sr};
|
package/dist/chunk-rtg6xfgr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f3e3ged2.js";import{e}from"./chunk-6kn920c5.js";import{_n}from"./chunk-b5z75meq.js";import{ge,fe,he,ve}from"./chunk-anfrrs5x.js";import{n,C}from"./chunk-9hvbm4be.js";import{Loader2Icon as f}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";function st({session:t,timeline:c}){let{host:s,client:a}=n(),{t:r}=s,l=o((y)=>y.historyPages[t.id]?.cursor!=null),d=()=>C(s,a.open(t.id,t.cwd)),p=i(_n,{...c,session:t,client:a,host:s});if(t.restoring)return t.items.length===0?m("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[i(f,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return m(ge,{className:"flex-1",children:[m(fe,{children:[i(he,{children:r("conversation.reopen")}),i(ve,{children:r("conversation.detached")})]}),i(e,{onClick:d,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!l)return i(ge,{className:"flex-1",children:m(fe,{children:[i(he,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),i(ve,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{st};
|
package/dist/chunk-shsyer15.js
DELETED
package/dist/chunk-tt40vzdd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*kt(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 jr(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 kt(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{kt,jr};
|
package/dist/chunk-x2tsybks.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Dn,Ne}from"./chunk-y0psrvcc.js";import{t,ke}from"./chunk-f3e3ged2.js";import{d,u,b,m,w}from"./chunk-a2hygrpr.js";import{createStore as f}from"@alwith/api/client";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=f({request:null});function nt(e){c.setState({request:{path:e.path,patch:bn(e.patch,e.path)}})}function bn(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function ot(){let{t:e,theme:a}=t(),n=ke(c,(o)=>o.request),s=n===null?null:Dn(n.patch);return i(d,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(u,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(b,{children:[i(m,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(w,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Ne,{patch:n.patch,theme:a})})]})})}
|
|
3
|
-
export{nt,bn,ot};
|
package/dist/chunk-y1kkt0m2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{wn}from"./chunk-mkw0twsb.js";import{kn}from"./chunk-bna24ggr.js";import{Cn}from"./chunk-4wkpatzz.js";import{Ne}from"./chunk-y0psrvcc.js";import{n}from"./chunk-9hvbm4be.js";import{isContentEntry as d,isDiffEntry as f,isFormElicitation as x,isText as g,isToolCallSubject as h,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as u}from"react/jsx-runtime";function de(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let o=e.description;return typeof o==="string"?o:null}function b(t){let e=t.rawInput;if(typeof e!=="object"||e===null)return null;let o=e.command;if(typeof o==="string")return o;if(Array.isArray(o))return o.map(String).join(" ");return null}function A(t){for(let e of t.content??[])if(f(e)&&e.patch&&e.patch.text.length>0)return e.patch.text;return null}function v(t){return(t.content??[]).filter(d).map((e)=>g(e.content)?e.content.text:"").filter((e)=>e.length>0).join(`
|
|
2
|
-
`)}function R({subject:t,requestTitle:e}){let{host:o}=n();if(!h(t))return null;let r=t.toolCall,s=b(r),i=A(r),c=v(r),a=o.toolTitle?.(r)??r.title;return u("div",{className:"flex flex-col gap-2",children:[a&&a!==e&&s===null&&l("div",{className:"text-sm font-medium",children:a}),s!==null&&u("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[l("span",{className:"text-muted-foreground select-none",children:"$ "}),s]}),i!==null&&l("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:l(Ne,{patch:i,theme:o.theme})}),i===null&&s===null&&c.length>0&&l("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&l("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((p)=>l("li",{className:"truncate font-mono",children:p.path},`${p.path}:${p.line??""}`))})]})}function m(t,e){let{host:o,client:r}=n();return(s)=>{try{if(e)e(t.id,s);else r.respond(t.id,s)}catch(i){if(o.reportError)o.reportError(i);else console.error(i)}}}function T({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o),i=t.params,c=r.permissionTitle?.(i)??i.title;return u(wn,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:e,options:i.options.map((a)=>({...a,description:y(a)??void 0})),onRespond:(a)=>s({outcome:a===null?{outcome:"cancelled"}:{outcome:"selected",optionId:a}}),children:[i.description&&l("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&l(R,{subject:i.subject,requestTitle:c})]})}function Pe({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o);return l(kn,{requestId:t.id,schema:t.params.requestedSchema,message:t.params.message,total:e,t:r.t,onRespond:s})}function it({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o);if(t.kind==="permission")return l(T,{action:t,total:e,onRespond:o});if(de(t))return l(Pe,{action:t,total:e??1,onRespond:o});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return l(Cn,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>s(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{de,Pe,it};
|
package/dist/chunk-zp5ntx27.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{zo}from"./chunk-9t8ptjct.js";import{n,C}from"./chunk-9hvbm4be.js";import{E,x}from"./chunk-3q6ssrs3.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as y,ShieldCheckIcon as c}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var S=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":w,"workspace-write":c,agent:S,"agent-full-access":y},O={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function mt({sessionId:u,options:g,disabled:m,onConfigChange:r}){let{host:l,client:f}=n(),{t:a}=l,o=x(g,"mode");if(!o)return null;let s=o.currentValue,p=E(o).map((e)=>{let i=O[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),h=p.find((e)=>e.value===s),I=d[s]??c,M=(e)=>{if(e===s)return;C(l,r?r(o.configId,e):f.setConfig(u,o.configId,e))};return t(zo,{value:s,warning:s==="agent-full-access",currentName:h?.name??s,icon:t(I,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:m,label:a("composer.switchPermissionMode"),onValueChange:M,options:p.map((e)=>{let i=d[e.value]??c,v=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":v?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
|
|
2
|
-
export{mt};
|