@alwith/module-chat 0.5.18 → 0.5.19
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-w38vbf7h.js → chunk-01rfnabj.js} +2 -2
- package/dist/chunk-04mj5ftg.js +7 -0
- package/dist/{chunk-ahtyazfy.js → chunk-09r35ts9.js} +2 -2
- package/dist/chunk-0jvfabsq.js +2 -0
- package/dist/{chunk-rvr6zj7p.js → chunk-0vy6cqmw.js} +2 -2
- package/dist/{chunk-6nnwmqqp.js → chunk-0zp04d1m.js} +2 -2
- package/dist/{chunk-yh9qdb2k.js → chunk-0zph0gwq.js} +3 -3
- package/dist/chunk-107y8e8x.js +2 -0
- package/dist/{chunk-65m4bm74.js → chunk-210b2kk6.js} +2 -2
- package/dist/chunk-22h5rh2h.js +2 -0
- package/dist/{chunk-qp7aywgn.js → chunk-2hk04fh3.js} +2 -2
- package/dist/chunk-31yt34hy.js +2 -0
- package/dist/chunk-3hp5t5wf.js +2 -0
- package/dist/chunk-3jcx1ns0.js +2 -0
- package/dist/chunk-3jjc06nd.js +3 -0
- package/dist/chunk-3z8ajtxp.js +2 -0
- package/dist/chunk-4b3g7acq.js +2 -0
- package/dist/chunk-4jkg9p4g.js +2 -0
- package/dist/chunk-4xhvh2dn.js +2 -0
- package/dist/chunk-4xmbve71.js +4 -0
- package/dist/chunk-50mckd2p.js +2 -0
- package/dist/chunk-54qxv3er.js +2 -0
- package/dist/chunk-5bz1bzsw.js +2 -0
- package/dist/chunk-5dk4xga8.js +2 -0
- package/dist/{chunk-01dqjas2.js → chunk-5e10bzg2.js} +2 -2
- package/dist/chunk-5my9w4vd.js +2 -0
- package/dist/{chunk-s55n9cby.js → chunk-5n4mefej.js} +2 -2
- package/dist/{chunk-nxk65z2e.js → chunk-5nj2fjej.js} +2 -2
- package/dist/chunk-5tqygmg9.js +2 -0
- package/dist/{chunk-ykp85wc1.js → chunk-6p41wmgs.js} +2 -2
- package/dist/chunk-7dd374an.js +2 -0
- package/dist/chunk-7s7txz2j.js +2 -0
- package/dist/chunk-8hbwf0qe.js +2 -0
- package/dist/chunk-8yj3q7n2.js +2 -0
- package/dist/{chunk-qz8gpb9j.js → chunk-9ebnn34t.js} +2 -2
- package/dist/{chunk-mzh48e09.js → chunk-9ej4c7a8.js} +2 -2
- package/dist/{chunk-6t3tgzps.js → chunk-9eqezb4k.js} +2 -2
- package/dist/chunk-9xfv8jdn.js +2 -0
- package/dist/{chunk-2g8targj.js → chunk-9xkp5x7h.js} +2 -2
- package/dist/chunk-a3s36z4s.js +3 -0
- package/dist/chunk-a414w7ah.js +3 -0
- package/dist/{chunk-2qhbm5y9.js → chunk-a4wrn6ep.js} +2 -2
- package/dist/chunk-a9s3m9fs.js +2 -0
- package/dist/chunk-am6tss41.js +2 -0
- package/dist/chunk-b53ky6rb.js +2 -0
- package/dist/chunk-b65w6x23.js +2 -0
- package/dist/chunk-c2h76vnt.js +2 -0
- package/dist/{chunk-wrkwz65x.js → chunk-cdrmg9jj.js} +2 -2
- package/dist/chunk-cv2j9sjp.js +2 -0
- package/dist/chunk-d1trg76g.js +2 -0
- package/dist/chunk-d6c0mnth.js +2 -0
- package/dist/chunk-dgm4gxkj.js +2 -0
- package/dist/{chunk-2pj3pcc7.js → chunk-dj4e0q7k.js} +2 -2
- package/dist/{chunk-d7gjvz8z.js → chunk-e44hny11.js} +2 -2
- package/dist/chunk-e6ddpdxn.js +2 -0
- package/dist/chunk-e92r4g3v.js +2 -0
- package/dist/chunk-e9znmqdj.js +2 -0
- package/dist/{chunk-n56csv51.js → chunk-eeq8d3x7.js} +2 -2
- package/dist/chunk-ekd97p2x.js +2 -0
- package/dist/chunk-eyf9bxyx.js +2 -0
- package/dist/chunk-eyfdn4p3.js +2 -0
- package/dist/{chunk-4z4tec0p.js → chunk-f8wzz84b.js} +2 -2
- package/dist/chunk-fcqwzmkd.js +2 -0
- package/dist/{chunk-w390ewja.js → chunk-fcy4sv9f.js} +2 -2
- package/dist/{chunk-as1cvbzm.js → chunk-fgzq0ktw.js} +2 -2
- package/dist/chunk-fkwafga0.js +2 -0
- package/dist/chunk-gap8n0vv.js +5 -0
- package/dist/{chunk-dnsmr5nf.js → chunk-gcx4fk1a.js} +2 -2
- package/dist/{chunk-kv0tnq8g.js → chunk-gr1nnczz.js} +2 -2
- package/dist/{chunk-djmnmbm2.js → chunk-h3antqdd.js} +2 -2
- package/dist/{chunk-c2bkhrcc.js → chunk-hwh88n0v.js} +4 -4
- package/dist/chunk-j5rd55qs.js +3 -0
- package/dist/chunk-j9q2s4kq.js +2 -0
- package/dist/{chunk-5x4an3fb.js → chunk-jc52024g.js} +2 -2
- package/dist/{chunk-s0ef3h7b.js → chunk-jnena0v6.js} +2 -2
- package/dist/{chunk-m9en74e3.js → chunk-jt8h82c2.js} +2 -2
- package/dist/chunk-jx1cngyb.js +2 -0
- package/dist/chunk-k9mbpf0g.js +2 -0
- package/dist/chunk-kjswq0tx.js +2 -0
- package/dist/chunk-kkps1qd4.js +4 -0
- package/dist/{chunk-0mze2qnw.js → chunk-kvx8fv1e.js} +2 -2
- package/dist/{chunk-hfaarm10.js → chunk-m2hpfdch.js} +2 -2
- package/dist/chunk-mpnv2rht.js +2 -0
- package/dist/chunk-mtydzse4.js +2 -0
- package/dist/chunk-mw9k08ky.js +3 -0
- package/dist/{chunk-m4dgha79.js → chunk-nkqe2e8s.js} +2 -2
- package/dist/chunk-px6nrr87.js +2 -0
- package/dist/chunk-pzmd5d3m.js +2 -0
- package/dist/{chunk-rf9yxbes.js → chunk-q4q4f03j.js} +2 -2
- package/dist/chunk-q5az5kp2.js +4 -0
- package/dist/chunk-qmc18ejg.js +2 -0
- package/dist/chunk-qqm07rfv.js +2 -0
- package/dist/chunk-qv7kkv47.js +2 -0
- package/dist/{chunk-d5w1nvrz.js → chunk-qy2prx7m.js} +2 -2
- package/dist/chunk-rq04p6pn.js +3 -0
- package/dist/chunk-rsfwc38x.js +4 -0
- package/dist/chunk-rx9sdjtn.js +2 -0
- package/dist/chunk-s0b5g8nc.js +2 -0
- package/dist/{chunk-yy4tw3nj.js → chunk-sf1z4r7v.js} +2 -2
- package/dist/chunk-syp06z39.js +2 -0
- package/dist/chunk-t6cfjn19.js +2 -0
- package/dist/{chunk-fexvhys2.js → chunk-tzyc5myt.js} +2 -2
- package/dist/chunk-vsff9djs.js +2 -0
- package/dist/chunk-vvq50011.js +2 -0
- package/dist/chunk-wkvm8f2e.js +2 -0
- package/dist/chunk-ww223tm5.js +2 -0
- package/dist/chunk-x0tbzjqc.js +2 -0
- package/dist/chunk-x480gyp7.js +2 -0
- package/dist/chunk-yjhypkmc.js +2 -0
- package/dist/{chunk-fydcbjsx.js → chunk-yjtq166b.js} +3 -3
- package/dist/{chunk-1wpdb17m.js → chunk-z5tstgsh.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/styles.css +2 -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.d.ts +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.d.ts +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.d.ts +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.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.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/package.json +7 -5
- package/dist/chunk-01denvg2.js +0 -5
- package/dist/chunk-074x98ak.js +0 -2
- package/dist/chunk-0c8fy456.js +0 -4
- package/dist/chunk-0dnwqm94.js +0 -2
- package/dist/chunk-0nkvfecf.js +0 -1
- package/dist/chunk-0ss92kxr.js +0 -2
- package/dist/chunk-12fcr66z.js +0 -2
- package/dist/chunk-14r2ktqe.js +0 -3
- package/dist/chunk-180zvfd6.js +0 -2
- package/dist/chunk-1fm5vx1n.js +0 -1
- package/dist/chunk-2a3tezgr.js +0 -1
- package/dist/chunk-2r3sfmyf.js +0 -2
- package/dist/chunk-2rperg04.js +0 -1
- package/dist/chunk-2swp3nfs.js +0 -2
- package/dist/chunk-3919sqde.js +0 -2
- package/dist/chunk-39sbgvd3.js +0 -2
- package/dist/chunk-3dckftt6.js +0 -2
- package/dist/chunk-3k5n3809.js +0 -2
- package/dist/chunk-3z6rx5qv.js +0 -4
- package/dist/chunk-4s1rhts0.js +0 -1
- package/dist/chunk-4zzhckab.js +0 -2
- package/dist/chunk-58wt406v.js +0 -1
- package/dist/chunk-59g9h4v1.js +0 -2
- package/dist/chunk-59j0p8hy.js +0 -2
- package/dist/chunk-6s7z09b0.js +0 -2
- package/dist/chunk-6wqbetcx.js +0 -1
- package/dist/chunk-75zcgcqm.js +0 -2
- package/dist/chunk-7ap638hx.js +0 -2
- package/dist/chunk-7g79m27w.js +0 -2
- package/dist/chunk-7jdjdnh6.js +0 -2
- package/dist/chunk-7wyrcphh.js +0 -1
- package/dist/chunk-83sz9mv9.js +0 -3
- package/dist/chunk-88cfz41t.js +0 -2
- package/dist/chunk-8bfnjqkg.js +0 -2
- package/dist/chunk-8g09jrj1.js +0 -2
- package/dist/chunk-8v1bjdgv.js +0 -2
- package/dist/chunk-90wm9rxz.js +0 -2
- package/dist/chunk-91h14q3y.js +0 -2
- package/dist/chunk-96x0d2vd.js +0 -1
- package/dist/chunk-9gv1zffv.js +0 -1
- package/dist/chunk-9j609g4n.js +0 -1
- package/dist/chunk-afd3bq7v.js +0 -2
- package/dist/chunk-bew4srqj.js +0 -2
- package/dist/chunk-bj5ma2sv.js +0 -2
- package/dist/chunk-bv4adcrd.js +0 -2
- package/dist/chunk-c1vavp0q.js +0 -2
- package/dist/chunk-c26vy827.js +0 -2
- package/dist/chunk-cazdmcwd.js +0 -2
- package/dist/chunk-cc0tan75.js +0 -2
- package/dist/chunk-d5ga13n0.js +0 -1
- package/dist/chunk-d94rmh12.js +0 -2
- package/dist/chunk-da4m33bg.js +0 -2
- package/dist/chunk-da6d6wze.js +0 -1
- package/dist/chunk-e99sdapw.js +0 -2
- package/dist/chunk-ea3582qy.js +0 -1
- package/dist/chunk-ebmbz9tg.js +0 -2
- package/dist/chunk-frbeen15.js +0 -2
- package/dist/chunk-ftcydsbs.js +0 -2
- package/dist/chunk-gdpa9dp5.js +0 -1
- package/dist/chunk-gz7adphb.js +0 -2
- package/dist/chunk-gzeg6bqp.js +0 -2
- package/dist/chunk-h68f23r0.js +0 -1
- package/dist/chunk-h99fy0g3.js +0 -4
- package/dist/chunk-jdjk6tf4.js +0 -1
- package/dist/chunk-jjnmq2zj.js +0 -3
- package/dist/chunk-jp73gpbp.js +0 -2
- package/dist/chunk-khj3ye94.js +0 -7
- package/dist/chunk-kjtd3wc3.js +0 -1
- package/dist/chunk-kmhwwzga.js +0 -2
- package/dist/chunk-kzq1797a.js +0 -3
- package/dist/chunk-mr1azhef.js +0 -1
- package/dist/chunk-n0xzhjdg.js +0 -2
- package/dist/chunk-n1tjf64a.js +0 -2
- package/dist/chunk-n5xqjct2.js +0 -1
- package/dist/chunk-nqv69z6n.js +0 -2
- package/dist/chunk-pv35kspb.js +0 -1
- package/dist/chunk-pw6p654f.js +0 -3
- package/dist/chunk-q6km9nha.js +0 -2
- package/dist/chunk-qca5mhqd.js +0 -2
- package/dist/chunk-qxabrz98.js +0 -2
- package/dist/chunk-r1988zpy.js +0 -2
- package/dist/chunk-sespfp7t.js +0 -4
- package/dist/chunk-sf6ze845.js +0 -2
- package/dist/chunk-sxgc25gz.js +0 -2
- package/dist/chunk-tq6ekz3s.js +0 -2
- package/dist/chunk-txn8v2yc.js +0 -2
- package/dist/chunk-vp8fb7r8.js +0 -2
- package/dist/chunk-w1awbykg.js +0 -2
- package/dist/chunk-wpdn3rx8.js +0 -1
- package/dist/chunk-x1xh8y2s.js +0 -2
- package/dist/chunk-x8kxqtva.js +0 -2
- package/dist/chunk-xfx689xm.js +0 -3
- package/dist/chunk-y6afvrnv.js +0 -2
- package/dist/chunk-zb4mqy8f.js +0 -2
- package/dist/ui/alert.d.ts +0 -10
- package/dist/ui/alert.js +0 -1
- package/dist/ui/badge.d.ts +0 -7
- package/dist/ui/badge.js +0 -1
- package/dist/ui/button.d.ts +0 -8
- package/dist/ui/button.js +0 -1
- package/dist/ui/card.d.ts +0 -11
- package/dist/ui/card.js +0 -1
- package/dist/ui/checkbox.d.ts +0 -3
- package/dist/ui/checkbox.js +0 -1
- package/dist/ui/dialog.d.ts +0 -17
- package/dist/ui/dialog.js +0 -1
- package/dist/ui/dropdown-menu.d.ts +0 -29
- package/dist/ui/dropdown-menu.js +0 -1
- package/dist/ui/empty.d.ts +0 -11
- package/dist/ui/empty.js +0 -1
- package/dist/ui/field.d.ts +0 -24
- package/dist/ui/field.js +0 -1
- package/dist/ui/hover-card.d.ts +0 -5
- package/dist/ui/hover-card.js +0 -1
- package/dist/ui/input-group.d.ts +0 -18
- package/dist/ui/input-group.js +0 -1
- package/dist/ui/input.d.ts +0 -3
- package/dist/ui/input.js +0 -1
- package/dist/ui/kbd.d.ts +0 -3
- package/dist/ui/kbd.js +0 -1
- package/dist/ui/label.d.ts +0 -3
- package/dist/ui/label.js +0 -1
- package/dist/ui/radio-group.d.ts +0 -5
- package/dist/ui/radio-group.js +0 -1
- package/dist/ui/select.d.ts +0 -15
- package/dist/ui/select.js +0 -1
- package/dist/ui/separator.d.ts +0 -3
- package/dist/ui/separator.js +0 -1
- package/dist/ui/skeleton.d.ts +0 -2
- package/dist/ui/skeleton.js +0 -1
- package/dist/ui/spinner.d.ts +0 -2
- package/dist/ui/spinner.js +0 -1
- package/dist/ui/switch.d.ts +0 -5
- package/dist/ui/switch.js +0 -1
- package/dist/ui/textarea.d.ts +0 -3
- package/dist/ui/textarea.js +0 -1
- package/dist/ui/tooltip.d.ts +0 -6
- package/dist/ui/tooltip.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var l={ar:{untitled:"دردشة جديدة",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة"},de:{untitled:"Neuer Chat",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"}},es:{untitled:"Nuevo chat",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados"},fr:{untitled:"Nouveau chat",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées"},hi:{untitled:"नई चैट",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत"},id:{untitled:"Obrolan baru",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan"},it:{untitled:"Nuova chat",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate"},ja:{untitled:"新しいチャット",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み"},ko:{untitled:"새 채팅",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨"},"pt-BR":{untitled:"Novo chat",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas"},ru:{untitled:"Новый чат",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"}}};
|
|
2
|
+
export{l};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{oe}from"./chunk-04mj5ftg.js";import{hn}from"./chunk-eeq8d3x7.js";import{e}from"./chunk-7dd374an.js";import{k}from"./chunk-qmc18ejg.js";import{lt}from"./chunk-8hbwf0qe.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as v,useMemo as R}from"react";import{jsx as l,jsxs as u,Fragment as x}from"react/jsx-runtime";function T({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((t)=>y(t.content)||g(t.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((t,s)=>l(k,{block:t.content},`${n.id}:${s}`))]})}var tt=v(function({sessionId:r,items:t,terminals:s,streamingThoughtId:d}){let p=e(),i=t.every(lt),c=p.toolBlock,a=R(()=>t.map((o)=>{let m={...hn(o,s,o.kind==="thought"&&o.id===d),id:JSON.stringify([r,i?"history":"live",o.id])};return m.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(m,o):m}),[r,i,t,s,d,c]);return u(x,{children:[l(oe,{blocks:a,defaultExpanded:!i}),t.map((o)=>o.kind==="tool"&&l(T,{item:o},o.id))]})});
|
|
2
|
+
export{tt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Yt}from"./chunk-b65w6x23.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Xt({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=Yt(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
+
export{Xt};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Xt}from"./chunk-9xkp5x7h.js";import{Zt}from"./chunk-ekd97p2x.js";import{Qt}from"./chunk-4xhvh2dn.js";import{te}from"./chunk-0zph0gwq.js";import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function U(e){return e.kind==="elicitation"&&x(e.params)}function y(e){let o=e._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(e){let o=e.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(e){for(let o of e.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(e){return(e.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
+
`)}function T({subject:e,requestTitle:o}){let{host:s}=n();if(!b(e))return null;let r=e.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(te,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("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&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(e,o){let{host:s,client:r}=n();return(l)=>{try{if(o)o(e.id,l);else r.respond(e.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s),i=e.params,c=r.permissionTitle?.(i)??i.title;return m(Xt,{requestId:e.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function ee({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s),i=t((c)=>e.sessionId===null?void 0:c.sessions[e.sessionId]);return a(Zt,{requestId:e.id,schema:e.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${e.params.message}`:e.params.message,total:o,t:r.t,onRespond:l})}function Pe({action:e,total:o,onRespond:s}){let{host:r}=n(),l=d(e,s);if(e.kind==="permission")return a(C,{action:e,total:o,onRespond:s});if(U(e))return a(ee,{action:e,total:o??1,onRespond:s});let i=e.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Qt,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
+
export{U,ee,Pe};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Jt,te}from"./chunk-0zph0gwq.js";import{e,W}from"./chunk-7dd374an.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function xe(t){c.setState({request:{path:t.path,patch:Ct(t.patch,t.path)}})}function Ct(t,a){let n=t.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return t;return n.find((o)=>{let r=o.split(`
|
|
2
|
+
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??t}function ye(){let{t,theme:a}=e(),n=W(c,(o)=>o.request),s=n===null?null:Jt(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{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(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:t("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(te,{patch:n.patch,theme:a})})]})})}
|
|
3
|
+
export{xe,Ct,ye};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function pn(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||a(l).category!=="overloaded")break;if(n++,o.user!==null)break}return c[n-1]??null}
|
|
2
|
+
export{pn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{S}from"./chunk-h3antqdd.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as d,DropdownMenuContent as m,DropdownMenuGroup as w,DropdownMenuItem as i,DropdownMenuLabel as c,DropdownMenuTrigger as M}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as a}from"react/jsx-runtime";var D=["requires_action","running","done","idle"];function Zn({sessions:l,onSelect:p,t:n}){return e("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":n("sessionList.states.title"),children:D.map((o)=>{let s=l.filter((t)=>t.state===o),r=n(`sessionList.states.${o}`);return a(d,{children:[a(M,{render:e(u,{variant:"ghost",size:"xs"}),"aria-label":`${r}: ${s.length}`,children:[e(S,{state:o,pulse:!1}),e("span",{className:"tabular-nums",children:s.length})]}),e(m,{"aria-label":r,className:"w-72 max-w-[calc(100vw-1rem)]",children:a(w,{children:[e(c,{children:r}),s.length===0?e(i,{disabled:!0,children:n("sessionList.states.empty")}):s.map((t)=>a(i,{onClick:()=>p(t),children:[e(S,{state:t.state,pulse:!1}),e("span",{className:"min-w-0 flex-1 truncate",children:t.title||n("sessionList.untitled")})]},t.sessionId))]})})]},o)})})}
|
|
2
|
+
export{Zn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var io={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Yt(e){return[...e].toSorted((o,n)=>(io[o.kind]??99)-(io[n.kind]??99))}function Fo(e){return e==="allow_once"||e==="allow_always"}function Oo(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{io,Yt,Fo,Oo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as v}from"@nyssance/shadcn/vega/components/ui/input";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as t,jsxs as k}from"react/jsx-runtime";function ht({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=E(null);N(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),B(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(v,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(b,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(z,{className:"size-3.5"})})]})}
|
|
2
|
+
export{ht};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function qn(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
|
|
2
|
+
export{qn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e}from"./chunk-7dd374an.js";import{Button as T}from"@nyssance/shadcn/vega/components/ui/button";import{codexTurnError as h}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as C,useRef as s,useState as u}from"react";import{jsx as n,jsxs as d}from"react/jsx-runtime";function dt({children:i}){return d("div",{className:"codex-error-message",role:"alert",children:[n(R,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:i})]})}function ut({error:i,retry:r}){let{t:m}=e(),f=h(i),[c]=u(()=>r?.delaySeconds==null?null:Date.now()+r.delaySeconds*1000),[p,v]=u(r?.delaySeconds??null),[N,y]=u(!1),[x,g]=u(null),o=s(!1),w=s(!1),E=s(r?.run);E.current=r?.run;let S=s((b)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(b).catch((t)=>{w.current=!0,o.current=!1,v(null),y(!1),g(t instanceof Error?t.message:String(t))})}),l=r!==void 0&&f.retryable;return C(()=>{if(!l||c===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let t=Math.max(0,Math.ceil((c-Date.now())/1000));if(v(t),t===0)S.current("automatic")},1000);return()=>clearInterval(a)},[c,l]),d(dt,{children:[d("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:f.message}),l&&n(T,{variant:"outline",size:"sm",disabled:N,onClick:()=>S.current("manual"),children:p===null?m("timeline.retry"):m("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{dt,ut};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{s,v}from"./chunk-e6ddpdxn.js";import{HoverCard as L,HoverCardContent as H,HoverCardTrigger as W}from"@nyssance/shadcn/vega/components/ui/hover-card";import{hasAccount as T,isGroupedSelect as F}from"@nyssance/codex-acp-v2/client";import{cn as z}from"cn";import{useEffect as O,useState as A}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var p=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),I=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),U=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function g(r){return typeof r==="number"&&!Number.isNaN(r)?Math.max(0,r):0}function V(r,e){let o=Math.min(100,r/e*100),f=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:f}}function G(r){let e=s(r.configOptions,"model");return e===void 0?void 0:v(e)}function Lt(r,e){let o=r.windowDurationMins;if(o===null)return e("usage.usage");if(o%1440===0)return e("usage.windowDays",{count:o/1440});return e("usage.windowHours",{count:Math.round(o/60)})}function P(r){let{client:e}=n(),o=t((a)=>r&&a.connection==="ready"&&T(a.agent)),[f,c]=A(null);return O(()=>{if(!o){c(null);return}let a=!0;e.readRateLimits().then((m)=>{if(a)c(m)},()=>{return});let d=e.onRateLimits((m)=>{if(a)c(m)});return()=>{a=!1,d()}},[o,e]),o?f:null}function ke({session:r}){let{t:e}=n().host,o=s(r.configOptions,"model"),f=o!==void 0&&(F(o.options)?o.options.some((u)=>u.groupId==="chatgpt"&&u.options.some((b)=>b.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((u)=>u.value===o.currentValue)),c=P(f),{usage:a,lastTurnUsage:d}=r;if(a===null&&d===null)return null;let m=a&&a.size>0?V(a.used,a.size):null,h=7,k=2*Math.PI*h,N=g(d?.inputTokens),w=g(d?.outputTokens),x=g(d?.cachedReadTokens),R=g(d?.cachedWriteTokens),C=g(d?.totalTokens)||N+w+x+R,S=N+x,D=S>0?I.format(x/S):e("tokens.notAvailable"),M=[[e("tokens.input"),p.format(N)],[e("tokens.output"),p.format(w)],[e("tokens.cachedRead"),p.format(x)],[e("tokens.cachedWrite"),p.format(R)],[e("tokens.cacheHitRate"),D],[e("tokens.total"),p.format(C)]],y=G(r);return l(L,{children:[i(W,{delay:100,closeDelay:100,render:l("button",{type:"button",className:z("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":e("tokens.openDetails"),children:[l("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[i("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&i("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:k,strokeDashoffset:k*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&l("span",{children:[Math.round(m.pct),"%"]})]})}),l(H,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[y!==void 0&&i("div",{className:"border-b px-3 py-2",children:i("p",{className:"text-foreground truncate text-xs font-semibold",title:y,children:y})}),l("div",{className:"flex flex-col gap-3 p-3",children:[d!==null&&l("div",{className:"flex flex-col gap-1.5",children:[i("p",{className:"text-xs font-medium",children:e("tokens.openDetails")}),i("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([u,b])=>l("div",{className:"contents",children:[i("dt",{className:"text-muted-foreground",children:u}),i("dd",{className:"text-end tabular-nums",children:b})]},u))})]}),a!==null&&a.size>0&&l("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[i("p",{className:"text-xs font-medium",children:e("tokens.context")}),i("p",{className:"text-muted-foreground text-xs tabular-nums",children:e("tokens.contextSummary",{used:p.format(a.used),limit:p.format(a.size),percent:U.format(a.used/a.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&l("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[i("p",{className:"text-xs font-medium",children:e("usage.limits")}),i("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((u)=>u!==null).map((u)=>l("div",{className:"contents",children:[i("dt",{className:"text-muted-foreground",children:Lt(u,e)}),i("dd",{className:"text-end tabular-nums",children:e("usage.used",{percent:Math.round(Math.min(100,Math.max(0,u.usedPercent)))})})]},`${u.windowDurationMins??"window"}`))})]})]})]})]})}
|
|
2
|
+
export{Lt,ke};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r=new Map,i=new Map,f=new Map;function Vn(t,e){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,e),()=>{if(i.get(t)===e)i.delete(t)}}function b(t,e){let o=r.get(t);if(!o)return;let n=e(o.attachments);r.set(t,{...o,attachments:n}),i.get(t)?.(n)}function Le(t,e){f.set(t,e),e.finally(()=>{if(f.get(t)===e)f.delete(t)})}async function uo(t){for(;;){let n=r.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!n.length)break;await Promise.all(n)}let e=r.get(t);if(!e)return null;let o=await Promise.all(e.attachments.map(async(n)=>{if(!n.url.startsWith("blob:"))return n;let c=await fetch(n.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let a=new FileReader;a.onload=()=>g(a.result),a.onerror=()=>p(a.error),a.readAsDataURL(m)});return{...n,url:l}}));return{text:e.text,mentions:[...e.mentions],attachments:o,modelId:e.modelId}}function mo(t,e){if(e===null)r.delete(t);else r.set(t,e)}var s=new Map;function De(t,e){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,e),()=>{if(s.get(t)===e)s.delete(t)}}function po(t,e){if(typeof e!=="string"||!e.trim())throw Error("The draft is empty");let o=s.get(t);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(t);if(n&&(n.text.length||n.attachments.length||n.mentions.length))throw Error("The composer already has a draft; send or clear it first");o(e),r.set(t,{text:e,attachments:[],mentions:[],modelId:n?.modelId??null})}
|
|
2
|
+
export{r,Vn,b,Le,uo,mo,De,po};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function C({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
|
|
2
|
+
export{C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Et({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
|
|
2
|
+
export{Et};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function h(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function s(e,t){return e.find((n)=>n.category===t&&o(n))}function v(e){return h(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
+
export{h,s,v};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,o}from"./chunk-107y8e8x.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Jn(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
|
|
2
|
+
export{Jn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{U,ee,Pe}from"./chunk-a3s36z4s.js";import{J}from"./chunk-0jvfabsq.js";import{inSessionTree as d}from"@nyssance/codex-acp-v2/client";import{jsx as o,jsxs as c,Fragment as p}from"react/jsx-runtime";var u=[];function be({sessionId:e}){let l=t((s)=>s.sessions),{host:f}=n(),a=t((s)=>s.actions),r=a.some((s)=>d(l,e,s.sessionId))?a.filter((s)=>d(l,e,s.sessionId)):u,i=r.filter(U),m=r.filter((s)=>!U(s));return c(p,{children:[o("div",{className:"mx-auto max-h-[50vh] w-full max-w-3xl shrink-0 overflow-y-auto px-3","data-subagent-shelf":!0,children:o(J,{sessionId:e})}),m.length>0&&o("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:m.map((s)=>c("div",{children:[s.sessionId!==e&&o("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:s.sessionId===null?"":l[s.sessionId]?.title??f.t("subagents.untitled")}),o(Pe,{action:s})]},s.id))}),i[0]!==void 0&&o(ee,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
+
export{be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function rt(n){if(n.kind!=="tool")return!1;let t=n._meta?.codex;return typeof t==="object"&&t!==null&&"commandSource"in t&&t.commandSource==="userShell"}function hn(n,t,r){if(n.kind!=="tool"){let o=p(n.content),d=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(o);return{type:"thinking",id:n.id,thinking:d?d[1]:o,isComplete:!r}}if(n.name==="subagent"){let o=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:g(o.agentPath,n.id),threadId:f(o.agentThreadId,"agentThreadId",n.id),activity:y(o.activity,n.id),model:l(o.model,"model",n.id),reasoningEffort:l(o.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let o=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof o.tool!=="string"||!Array.isArray(o.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:o.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:o.agents}}let a=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},i=u(n,t);if(Array.isArray(a.command))a.command=a.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof a.command!=="string"){let o=i?.command??n.title;if(o!==null)a.command=o}let e=n.rawOutput;if(typeof e==="object"&&e!==null&&"output"in e&&typeof e.output==="string")e=e.output;if(i!==null&&i.output.length>0)e=i.output;let c=i?.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:a,rawOutput:e,...rt(n)?{userShell:!0}:{},...typeof c==="number"?{exitCode:c}:{}}}function s(n,t){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${t} is missing an object codex-acp-v2 always sends`);return n}function l(n,t,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${t}`)}function g(n,t){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${t} has no agent path`);return r}function f(n,t,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${t}`)}function y(n,t){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${t} has an unknown activity ${String(n)}`)}
|
|
2
|
+
export{rt,hn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as O}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as w,DialogContent as D,DialogDescription as S,DialogFooter as A,DialogHeader as C,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as N,FieldDescription as f,FieldGroup as V,FieldLabel as R,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as q}from"@nyssance/shadcn/vega/components/ui/input";import{Label as P}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as L,RadioGroupItem as G}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as I}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as B}from"@nyssance/shadcn/vega/components/ui/textarea";import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as K,isStringProperty as T}from"@nyssance/codex-acp-v2/client";import{useEffect as j,useMemo as H,useState as M}from"react";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!T(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function vo(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function ao(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function xo(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(P,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(O,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(L,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(G,{value:o.value,id:l})},o.value)})})]});return s(N,{children:[r(R,{htmlFor:n,children:e.title}),k(e.property)?r(I,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):K(e.property)?r(q,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(B,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Zt({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=H(()=>vo(e),[e]),[m,u]=M(()=>ao(c));j(()=>u(ao(c)),[n,c]);let g=c.every((a)=>xo(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(w,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(D,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(C,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(E,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(S,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(V,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(A,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
|
|
2
|
+
export{vo,ao,xo,Zt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as u}from"@nyssance/shadcn/vega/components/ui/spinner";import{SquareIcon as c}from"lucide-react";import{useRef as f,useState as p}from"react";import{jsx as r}from"react/jsx-runtime";function ue({title:t,onStop:i}){let[o,a]=p(!1),e=f(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(l,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(u,{className:"size-3","aria-label":t}):r(c,{className:"size-3 fill-current"})})}
|
|
2
|
+
export{ue};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u,pt,Wn,Ee,jn,gt,Kn}from"./chunk-4xmbve71.js";import{e,_,W,t}from"./chunk-7dd374an.js";import{L}from"./chunk-qv7kkv47.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var v=E({entries:{}});function l(r,n){v.setState((s)=>({entries:{...s.entries,[r]:n}}))}function x(r,n){let s=b(n),a=r.items.findLast((i)=>b(i)!==null);return!n.replayed&&s!==null&&a!==void 0&&b(a)===s}function M(r,n){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...gt(s._meta),...s.content.filter(k).flatMap((i)=>gt(i._meta))])if(a.questionItemId===n)return a.answer}return}function O({sessionId:r,item:n,question:s,index:a}){let i=_(),{t:g}=e(),S=pt(n.id,a),c=JSON.stringify([r,S]),f=W(v,(o)=>o.entries[c]),d=t((o)=>o.sessions[r]),A=t((o)=>o.connection==="ready"),p=f?.draft??Wn(s),q=d===void 0?f?.accepted:M(d,S)??f?.accepted,h=d!==void 0&&x(d,n),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,y=q!==void 0?"answered":f?.skipped?"skipped":f?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(v.getState().entries[c]?.pending||y!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,n)||!o.attached||o.readOnly||o.restoring)return;let I=Ee(s,p);if(!I.trim())return;let w={questionItemId:S,question:s.title,answer:I};l(c,{draft:p,pending:!0});try{await i.prompt(r,[{type:"text",text:jn(w),_meta:{codex:{questionReply:w}}}]),l(c,{draft:p,accepted:I})}catch(Q){l(c,{draft:p,error:Q instanceof Error?Q.message:String(Q)})}};if(y==="closed")return null;return m(Kn,{question:s,draft:p,status:y,answer:q,error:y==="pending"?f?.error:void 0,t:g,onChange:(o)=>l(c,{draft:o}),onSkip:()=>l(c,{draft:p,skipped:!0}),onSubmit:()=>{C()}})}function mt({sessionId:r,item:n}){let s=t((i)=>i.sessions[r]),a=u(n._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,n))return m(L,{content:n.content.some((i)=>!k(i)||i.text.trim().length>0)?n.content:a.map((i)=>({type:"text",text:i.title})),messageId:n.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":n.id,children:a.map((i,g)=>m(O,{sessionId:r,item:n,question:i,index:g},pt(n.id,g)))})}
|
|
2
|
+
export{mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function yn(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{yn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createContext as r,useContext as s}from"react";import{jsx as e}from"react/jsx-runtime";var n=r(null);function Qn({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function i(){let t=s(n);if(t===null)throw Error("Activity host is missing");return t}function m(t){let{Markdown:o}=i();return e(o,{...t})}
|
|
2
|
+
export{Qn,i,m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Oe}from"./chunk-s0b5g8nc.js";async function ft(i,c){let s=new WeakSet;while(!c.aborted){let r=Array.from(i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')).filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function se(i,c){if(!c)return[];let s=[],r="",e=[],o=()=>{let t=0,n=0;for(let{start:a,end:l}of Oe(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<l)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,l-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let l=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+l.length}),r+=l;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){o();return}if(t.tagName==="BR"){o();return}let n=m.has(t.tagName);if(n)o();for(let a of t.childNodes)u(a);if(n)o()};return u(i),o(),s}
|
|
2
|
+
export{ft,se};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function $n(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
+
export{$n};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Y}from"./chunk-wkvm8f2e.js";import{N,Wt}from"./chunk-vvq50011.js";import{e}from"./chunk-7dd374an.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Ot({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t}=e(),s=Y(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?t("composer.steer"):t("composer.send");return n(P,{children:[a&&o(N,{"aria-label":t("composer.stop"),title:t("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(Wt,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{Ot};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{et}from"./chunk-j5rd55qs.js";import{e}from"./chunk-7dd374an.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function yo(o,s){let n=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(n.length<=1)return o;return n.find((i)=>{let a=i.split(`
|
|
2
|
+
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function bo(o){let s=new Map,n=null;for(let t of o.split(`
|
|
3
|
+
`)){if(t.startsWith("diff --git ")){n=null;continue}if(t.startsWith("+++ ")){let i=t.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)n={additions:0,deletions:0},s.set(a,n);continue}if(t.startsWith("--- ")){let i=t.slice(4).trim();if(i!=="/dev/null"&&n===null)n={additions:0,deletions:0},s.set(i.replace(/^a\//,""),n);continue}if(n===null)continue;if(t.startsWith("+"))n.additions+=1;else if(t.startsWith("-"))n.deletions+=1}return s}function u(o,s){let n=s.replaceAll("\\","/");for(let[t,i]of o)if(n===t||n.endsWith(`/${t}`))return i;return{additions:0,deletions:0}}function wo(o){let s=new Map;for(let n of o)for(let t of n.content){if(!p(t))continue;let i=t.patch?bo(t.patch.text):new Map;for(let a of t.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=t.patch?yo(t.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
+
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function sn({items:o}){let s=e(),{openDiff:n,FileIcon:t}=s;return c(et,{files:wo(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:n===void 0?void 0:(i)=>n({path:i.path,patch:i.patch}),renderPath:t===void 0?void 0:(i)=>g(h,{children:[c(t,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
+
export{yo,bo,wo,sn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function
|
|
2
|
-
export{
|
|
1
|
+
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function Ln(i,e){return n??=new s,n.connect(i,e)}
|
|
2
|
+
export{Ln};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function nt(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
|
|
2
|
+
export{nt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var yt={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},bt={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function S({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=yt[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",bt.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{yt,bt,S};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ln}from"./chunk-gcx4fk1a.js";import{st,_n}from"./chunk-m2hpfdch.js";import{at}from"./chunk-q4q4f03j.js";import{decodeHTMLAttribute as C,decodeHTMLStrict as R}from"entities";import oe from"katex";import{CheckIcon as z,ChevronLeftIcon as ae,ChevronRightIcon as se,CopyIcon as ie,DownloadIcon as ce,FileIcon as de,LinkIcon as le,MailIcon as ue,XIcon as me}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as ge,createElement as U,memo as B,startTransition as fe,useContext as he,useEffect as k,useLayoutEffect as D,useMemo as X,useRef as w,useState as p}from"react";import{jsx as a,jsxs as f,Fragment as te}from"react/jsx-runtime";var G=ge(null);function y(){let e=he(G);if(e===null)throw Error("Markdown host is missing");return e}var pe=80,A=/\[([^\]\n]+)\]\(([^)\n]+)$/,ke=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,we=/\uE200[^\uE201]*$/,be=4,xe=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function N(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function J(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Te(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)&&!J(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ve(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!N(e,t)&&!J(e,t,n))return t;return-1}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e){return Ce(e,"```")%2===1}function V(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!N(e,t))n+=1;t+=1}return n%2===1}function Ne(e){return e.endsWith(`
|
|
2
2
|
`)?`${e}\`\`\``:`${e}
|
|
3
3
|
\`\`\``}function H(e,n){if(!e.includes(n)||Te(e,n)%2===0)return e;let t=ve(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
4
|
`)||V(r))return e;return`${e}${n}`}function Me(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Z(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ee(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Z(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>be&&!xe.has(u))return!1}return!0}function Le(e){let{path:n}=Z(e);if(Me(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Ie(e){let n=e.match(A);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ee(t)||Le(t)?e.replace(A,"$1"):`${e})`}function $e(e){let n=e.replace(we,"");if(n.length===0||n.includes("`")&&V(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&ye(n))return{isCodeFenceOpen:!0,markdown:Ne(n)};if(n.includes(")n=Ie(n);return n=H(n,"**"),n=H(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Re(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function _(e){return Re(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Y(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Y(t.tokens);if(!_(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!_(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function O(e){return{type:"text",raw:e,text:e}}function Pe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function I(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[O(s)]:[O(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Pe(o):o);I(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))I(n.tokens)}}function Se(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function Fe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function Ae(e){let n=Fe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function He({href:e}){let n=X(()=>Ae(e),[e]),[t,r]=p(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ue:o?de:le;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function _e({children:e,href:n,title:t}){let r=y();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Se(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(He,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Oe({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=w(null),[c,d]=p(null),[u,h]=p(null),[M,b]=p(!1);if(k(()=>{let g=
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,pe)}function Xe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${W(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return W(e.text);default:return""}}function ee(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${Q(Xe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ee(r),s=t.get(o)??0;return t.set(o,s+1),ne(r,`${n}-${o}-${s}`)})}function Ge(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function Je(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function q(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return U(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ve(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>q(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=Q(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>q(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=C(e.href);if(!
|
|
7
|
-
export{
|
|
5
|
+
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function O(e){return{type:"text",raw:e,text:e}}function Pe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function I(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[O(s)]:[O(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Pe(o):o);I(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))I(n.tokens)}}function Se(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function Fe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function Ae(e){let n=Fe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function He({href:e}){let n=X(()=>Ae(e),[e]),[t,r]=p(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ue:o?de:le;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function _e({children:e,href:n,title:t}){let r=y();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Se(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(He,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Oe({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=w(null),[c,d]=p(null),[u,h]=p(null),[M,b]=p(!1);if(k(()=>{let g=Ln(d,h);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let x=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:M?a(z,{}):a(ie,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function je({code:e,language:n}){return y().preview?a("span",{children:e}):a(We,{code:e,language:n})}function We({code:e,language:n}){let t=w(null),[r,o]=p(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(Oe,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function qe(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ke({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(ae,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(ce,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(se,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(me,{})})]})]})}function ze(e){return y().preview?a(te,{children:e.alt}):a(Ue,{...e})}function Ue({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=p();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(te,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(qe(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ke,{preview:s,setPreview:i})})]})}function Be({value:e,display:n}){let t=w(null);return D(()=>{if(t.current===null)throw Error("Codex math root is not mounted");oe.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var De=150,v=null;function j(e,n){let t=v;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function Q(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function W(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
+
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,pe)}function Xe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${W(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return W(e.text);default:return""}}function ee(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${Q(Xe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ee(r),s=t.get(o)??0;return t.set(o,s+1),ne(r,`${n}-${o}-${s}`)})}function Ge(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function Je(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function q(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return U(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ve(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>q(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=Q(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>q(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=C(e.href);if(!at(r))return null;return a(ze,{src:r,alt:R(e.text),title:e.title==null?void 0:C(e.title),allowWide:t},n)}function ne(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return U(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>K(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?j(R(t.text),n):m(t.tokens,n)}case"escape":return j(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=C(t.href);return at(o)?a(_e,{href:o,title:t.title==null?void 0:C(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(je,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Je(e,n);case"list_item":return Ge(e,n);case"table":return Ve(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Be,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function T(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?R(n.text):n.tokens.map(T).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(T).join("");case"list":return e.items.map(T).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(T).join("")).join("")).join("")}default:return""}}function Ze({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=v;try{return v={cursor:t,runs:r,generation:o},ne(e,n)}finally{v=s}}var Ye=B(function({result:n}){let{text:t,isStreaming:r}=n,o=X(()=>{let l=n.tokens;if(n.source.includes("!["))Y(l);I(l);let g=new Map,P=0;return l.map((E)=>{let L=ee(E),S=g.get(L)??0;g.set(L,S+1);let F=T(E),re={token:E,tokenKey:`root-${L}-${S}`,offset:P,visibleText:F};return P+=F.length,re})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,h=performance.now(),M=r&&d?c.runs.filter((l)=>h-l.firstSeenAtMs<De):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:M.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)x.runs.push({start:u,end:s.length,firstSeenAtMs:h});return D(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Ze,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:x.runs,generation:b},l.tokenKey))})}),Qe=B(function({text:n,isStreaming:t}){let r=w(null),[o,s]=p(()=>st(n,t)),i=w(o!==null),[c,d]=p(null);if(k(()=>{let u=_n((h)=>{if(!i.current)i.current=!0,s(h);else fe(()=>s(h))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let h=t?$e(n).markdown:n;u.update({source:h,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(Ye,{result:o})});function Nn({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=p(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(G.Provider,{value:t,children:a(Qe,{text:r?o:e,isStreaming:r})})}
|
|
7
|
+
export{Nn};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{i}from"./chunk-fcqwzmkd.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function Co(e){let c=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let a=u,f=a._meta?.alwith?.hunks??[],l=f.reduce((n,s)=>n+x(s.newText),0),h=f.reduce((n,s)=>n+x(s.oldText),0);for(let n of a.changes){let s=c.get(n.path);if(s)s.additions+=l,s.deletions+=h;else c.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...c.values()]}function ln({blocks:e}){return d(et,{files:Co(e)})}function et({files:e,onOpen:c,renderPath:r,actions:u}){let{t:a,openLink:f}=i(),[l,h]=m(!0),[n,s]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[d("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:d(k,{})}),o("div",{className:"codex-edited-files-summary",children:[d("strong",{children:a("stream.codex.editedFilesCount",{count:e.length})}),d("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),s(!1)},"aria-expanded":l,children:a(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:a("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[d("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>c===void 0?f(t.path):c(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>s((t)=>!t),children:[a(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?d(C,{size:16,"aria-hidden":"true"}):d(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{Co,ln,et};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Ht}from"./chunk-ww223tm5.js";import{t}from"./chunk-7dd374an.js";import{n,g}from"./chunk-3hp5t5wf.js";import{h,s,v}from"./chunk-e6ddpdxn.js";import{isBooleanOption as A,isGroupedSelect as Z,isSelectOption as D}from"@nyssance/codex-acp-v2/client";import{Zap as F}from"lucide-react";import{useRef as H}from"react";import{jsx as I}from"react/jsx-runtime";function Ne({sessionId:l,options:p,disabled:x,onModelChange:O,onConfigChange:_,defaultGroup:L={id:"models",name:"Models"},catalog:N=(f)=>f,headerAction:P}){let{host:f,client:k}=n(),{t:i}=f,z=t((e)=>Boolean(e.configPending[l])),M=H({sessionId:l,model:!0}),S=z&&(M.current.sessionId!==l||M.current.model),R=t((e)=>{let r=e.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),o=s(p,"model"),a=s(p,"thought_level"),V=p.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==o&&e!==a)),y=V.filter(D),m=V.filter(A);if(!o&&!a&&y.length===0&&m.length===0)return null;let u=(e,r)=>{if(r===e.currentValue)return Promise.resolve();M.current={sessionId:l,model:e===o};let c=_?_(e.configId,r):k.setConfig(l,e.configId,r);return g(f,c),c},C=a?h(a):[],E=C.reduce((e,r)=>r.name.length>=e.length?r.name:e,""),U=o?v(o):i("composer.model"),w=(e)=>({api_id:e.value,label:e.name}),B=N(o&&Z(o.options)?o.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(w)})):[{...L,models:o?h(o).map(w):[]}]),G=B.flatMap((e)=>e.models),b=G.find((e)=>e.api_id===o?.currentValue)??{api_id:o?.currentValue??"",label:U},d=m.find((e)=>e.configId==="fast_mode"||e.configId==="fast-mode");return I(Ht,{disabled:x||S||R,switching:S,value:{...b,label:b.shortLabel??b.label},compactCatalog:!0,models:G,showModelList:Boolean(o),onChange:(e)=>{if(e.api_id===o?.currentValue)return;if(O)O(e.api_id);else if(o)u(o,e.api_id)},header:{name:o?.name??i("composer.model"),action:P},modelGroups:B,t:i,effortConfig:a&&C.length>0?{name:"Effort",value:a.currentValue,levels:C,sizer:E,onChange:(e)=>u(a,e)}:void 0,selectOptions:y.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:h(e).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>u(e,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:d?.currentValue??!1,disabled:!d,title:!d?i("composer.fastModeUnsupported"):void 0,icon:I(F,{className:"size-4","aria-hidden":"true"})},...m.filter((e)=>e!==d).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,r)=>{let c=e==="fast_mode"?d:m.find((q)=>q.configId===e);if(!c)throw Error(`Unknown boolean config: ${e}`);u(c,r)}})}
|
|
2
|
+
export{Ne};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function Pn({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
|
|
2
|
+
export{Pn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function M({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
|
|
2
|
+
export{M};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function Ue({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{Ue};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Et}from"./chunk-e44hny11.js";import{Dialog as E,DialogClose as X,DialogContent as _,DialogTitle as L}from"@nyssance/shadcn/vega/components/ui/dialog";import{cn as v}from"cn";import{XIcon as j}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as A,useRef as N,useState as b}from"react";import{jsx as i,jsxs as F}from"react/jsx-runtime";function Pt({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=A(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(E,{open:l,onOpenChange:y,children:F(_,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(L,{className:"sr-only",children:M||"Image preview"}),i(X,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(j,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Et({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{Pt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t}from"./chunk-7dd374an.js";import{n}from"./chunk-3hp5t5wf.js";import{codexExtensionCapabilities as T,codexTurnId as w,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function Se(r,g,c,y){let{client:S}=n(),R=t((e)=>T(e.agent).composerPredictions),k=r.items.findLast((e)=>e.kind==="user"),i=w(k?._meta),O=r.configOptions.flatMap((e)=>F(e)||B(e)?[[e.configId,e.currentValue]]:[]).sort(([e],[u])=>String(e).localeCompare(String(u))),o=JSON.stringify([r.id,i,O]),s=j(r._meta),d=r._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&r.state==="idle"&&r.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===o||l.current?.key===o||i===null)return;let e={key:o,previousResult:m};l.current=e,x(null),S.requestPrediction(r.id,i).catch((u)=>{if(f.current&&l.current===e)x({key:o,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,o,m,r.id,i]);let I=p&&!c&&a!==o&&l.current?.key===o&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&r.state==="idle"&&!c&&a!==o?v?.key===o?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(o)}}}
|
|
2
|
+
export{Se};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d}from"./chunk-mpnv2rht.js";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{useState as M}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function _t({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:l=!1,disabled:u=!1,warning:m=!1}){let[c,g]=M(!1);return o(w,{open:c,onOpenChange:g,children:[e(b,{render:o(f,{disabled:u,"data-permission-warning":m?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:l?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(d,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{_t};
|