@alwith/module-chat 0.5.17 → 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/README.md +4 -0
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-w38vbf7h.js → chunk-01rfnabj.js} +2 -2
- package/dist/chunk-04mj5ftg.js +7 -0
- package/dist/{chunk-tz96pyvx.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-a3x74cr0.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-2rv3cq7q.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-2mmhpb9s.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-gkv8w3v0.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-a6b2vhmb.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-j3tka93v.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-kq8kz0jn.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-pvj43sjx.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-ktjma5ts.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-2ahqcs3n.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-efcpawhs.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-54941m0z.js → chunk-yjtq166b.js} +3 -3
- package/dist/{chunk-1wpdb17m.js → chunk-z5tstgsh.js} +2 -2
- package/dist/client.d.ts +1 -0
- package/dist/client.js +1 -0
- 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/import.d.ts +1 -0
- package/dist/import.js +1 -0
- 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/dist/stage.d.ts +12 -0
- package/dist/stage.js +1 -0
- package/package.json +25 -14
- package/dist/chunk-0dnwqm94.js +0 -2
- package/dist/chunk-0n3q4g7y.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-1fm5vx1n.js +0 -1
- package/dist/chunk-1gp5f49d.js +0 -4
- package/dist/chunk-1hzdqep7.js +0 -2
- package/dist/chunk-2a3tezgr.js +0 -1
- package/dist/chunk-2cbya1f5.js +0 -2
- 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-3ebdnbcj.js +0 -2
- package/dist/chunk-3k5n3809.js +0 -2
- package/dist/chunk-3my2mbn9.js +0 -2
- package/dist/chunk-465r54av.js +0 -2
- 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-5p1cs4vg.js +0 -2
- package/dist/chunk-6b1hdb25.js +0 -4
- package/dist/chunk-6s7z09b0.js +0 -2
- package/dist/chunk-6wqbetcx.js +0 -1
- package/dist/chunk-74824tng.js +0 -2
- package/dist/chunk-7ap638hx.js +0 -2
- package/dist/chunk-7jdjdnh6.js +0 -2
- package/dist/chunk-7mr1zajc.js +0 -4
- package/dist/chunk-7wyrcphh.js +0 -1
- package/dist/chunk-88cfz41t.js +0 -2
- package/dist/chunk-8bfnjqkg.js +0 -2
- package/dist/chunk-8g09jrj1.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-9scwmd07.js +0 -3
- package/dist/chunk-9v7zgsa9.js +0 -3
- package/dist/chunk-afd3bq7v.js +0 -2
- package/dist/chunk-bew4srqj.js +0 -2
- package/dist/chunk-bj5ma2sv.js +0 -2
- package/dist/chunk-bnj58bev.js +0 -7
- 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-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-e1gwprwe.js +0 -2
- package/dist/chunk-ea3582qy.js +0 -1
- package/dist/chunk-ebmbz9tg.js +0 -2
- package/dist/chunk-ewvhf3wb.js +0 -3
- package/dist/chunk-frbeen15.js +0 -2
- package/dist/chunk-gdpa9dp5.js +0 -1
- package/dist/chunk-h68f23r0.js +0 -1
- package/dist/chunk-jdjk6tf4.js +0 -1
- package/dist/chunk-jfb6a7tz.js +0 -2
- package/dist/chunk-kjtd3wc3.js +0 -1
- package/dist/chunk-kmhwwzga.js +0 -2
- package/dist/chunk-m2xmz1ag.js +0 -2
- package/dist/chunk-mr1azhef.js +0 -1
- 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-q6km9nha.js +0 -2
- package/dist/chunk-qca5mhqd.js +0 -2
- package/dist/chunk-qsg1c5cc.js +0 -2
- package/dist/chunk-qxabrz98.js +0 -2
- package/dist/chunk-s0zbha64.js +0 -2
- package/dist/chunk-sf6ze845.js +0 -2
- package/dist/chunk-t1yzfva7.js +0 -2
- package/dist/chunk-tp1gaw68.js +0 -2
- package/dist/chunk-tq6ekz3s.js +0 -2
- package/dist/chunk-txn8v2yc.js +0 -2
- package/dist/chunk-tyngss2t.js +0 -2
- package/dist/chunk-v29ww61x.js +0 -5
- package/dist/chunk-v8cyw9xa.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-x8kxqtva.js +0 -2
- package/dist/chunk-xe3h32y1.js +0 -4
- package/dist/chunk-xfx689xm.js +0 -3
- package/dist/chunk-y6afvrnv.js +0 -2
- package/dist/chunk-zbe8myhx.js +0 -3
- package/dist/chunk-zynyx32t.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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{tt}from"../chunk-9xfv8jdn.js";import"../chunk-04mj5ftg.js";import"../chunk-px6nrr87.js";import"../chunk-5n4mefej.js";import"../chunk-gr1nnczz.js";import"../chunk-yjtq166b.js";import"../chunk-eeq8d3x7.js";import"../chunk-jnena0v6.js";import"../chunk-8hbwf0qe.js";import"../chunk-qmc18ejg.js";import"../chunk-4xmbve71.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{tt as ActivityGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{rt,hn}from"../chunk-eeq8d3x7.js";export{rt as isUserShell,hn as projectActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{L}from"../chunk-qv7kkv47.js";import"../chunk-qmc18ejg.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{L as AssistantContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{an}from"../chunk-mw9k08ky.js";import"../chunk-3jjc06nd.js";import"../chunk-gap8n0vv.js";import"../chunk-j5rd55qs.js";import"../chunk-9xfv8jdn.js";import"../chunk-04mj5ftg.js";import"../chunk-px6nrr87.js";import"../chunk-5n4mefej.js";import"../chunk-gr1nnczz.js";import"../chunk-5e10bzg2.js";import"../chunk-yjtq166b.js";import"../chunk-nkqe2e8s.js";import"../chunk-eeq8d3x7.js";import"../chunk-3jcx1ns0.js";import"../chunk-jnena0v6.js";import"../chunk-9ebnn34t.js";import"../chunk-f8wzz84b.js";import"../chunk-kvx8fv1e.js";import"../chunk-2hk04fh3.js";import"../chunk-8hbwf0qe.js";import"../chunk-cv2j9sjp.js";import"../chunk-eyfdn4p3.js";import"../chunk-qv7kkv47.js";import"../chunk-qmc18ejg.js";import"../chunk-4xmbve71.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{an as AssistantTurn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mt}from"../chunk-eyfdn4p3.js";import"../chunk-qv7kkv47.js";import"../chunk-qmc18ejg.js";import"../chunk-4xmbve71.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{mt as AsyncQuestions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{yo,bo,wo,sn}from"../chunk-gap8n0vv.js";import"../chunk-j5rd55qs.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{sn as EditedFilesCard,wo as fileChanges,yo as filePatch,bo as patchStatsByFile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$n}from"../chunk-fgzq0ktw.js";export{$n as historyTimeline};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D,e,_,W,t,ae}from"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{D as TimelineProvider,ae as reportError,t as useClientState,W as useStoreState,_ as useTimelineClient,e as useTimelineHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{To,In,Sn}from"../chunk-22h5rh2h.js";import"../chunk-hwh88n0v.js";import"../chunk-tzyc5myt.js";import"../chunk-jc52024g.js";import"../chunk-0zp04d1m.js";import"../chunk-gcx4fk1a.js";import"../chunk-q4q4f03j.js";import"../chunk-m2hpfdch.js";import"../chunk-8hbwf0qe.js";import"../chunk-4xmbve71.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{Sn as TimelineNavigationRail,To as navigationAudio,In as toNavigationRailItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{vn}from"../chunk-3jcx1ns0.js";import"../chunk-jnena0v6.js";import"../chunk-fcqwzmkd.js";export{vn as TurnPlan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{kn,Tn}from"../chunk-z5tstgsh.js";export{kn as questionReply,Tn as questionReplyParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{co,k}from"../chunk-qmc18ejg.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{k as ResourceContent,co as chatFileName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ne}from"../chunk-qqm07rfv.js";import"../chunk-t6cfjn19.js";import"../chunk-pzmd5d3m.js";import"../chunk-mw9k08ky.js";import"../chunk-3jjc06nd.js";import"../chunk-gap8n0vv.js";import"../chunk-j5rd55qs.js";import"../chunk-9xfv8jdn.js";import"../chunk-04mj5ftg.js";import"../chunk-px6nrr87.js";import"../chunk-5n4mefej.js";import"../chunk-gr1nnczz.js";import"../chunk-5e10bzg2.js";import"../chunk-yjtq166b.js";import"../chunk-nkqe2e8s.js";import"../chunk-a4wrn6ep.js";import"../chunk-sf1z4r7v.js";import"../chunk-eeq8d3x7.js";import"../chunk-3jcx1ns0.js";import"../chunk-jnena0v6.js";import"../chunk-9ebnn34t.js";import"../chunk-f8wzz84b.js";import"../chunk-q5az5kp2.js";import"../chunk-kvx8fv1e.js";import"../chunk-2hk04fh3.js";import"../chunk-z5tstgsh.js";import{To}from"../chunk-22h5rh2h.js";import"../chunk-hwh88n0v.js";import"../chunk-tzyc5myt.js";import"../chunk-jc52024g.js";import"../chunk-0zp04d1m.js";import"../chunk-gcx4fk1a.js";import"../chunk-q4q4f03j.js";import"../chunk-m2hpfdch.js";import"../chunk-8hbwf0qe.js";import"../chunk-fgzq0ktw.js";import"../chunk-cdrmg9jj.js";import"../chunk-cv2j9sjp.js";import"../chunk-eyfdn4p3.js";import"../chunk-qv7kkv47.js";import"../chunk-qmc18ejg.js";import"../chunk-4xmbve71.js";import{D}from"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{ne as SessionTimeline,D as TimelineProvider,To as navigationAudio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ot,gn,fn,qo}from"../chunk-sf1z4r7v.js";export{fn as clearTimeline,gn as publishTimeline,qo as revealTimelineTurn,ot as timelineRegistry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{xn}from"../chunk-9ebnn34t.js";import"../chunk-f8wzz84b.js";export{xn as projectTurnActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dt,ut}from"../chunk-cv2j9sjp.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{dt as ErrorCard,ut as TurnErrorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{pn}from"../chunk-a4wrn6ep.js";export{pn as capacityRetryDelay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{re}from"../chunk-nkqe2e8s.js";export{re as formatTurnTime};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Mo,Hn,Fn,lt,P,ie,ct,On,Bn,Un,zn}from"../chunk-8hbwf0qe.js";import"../chunk-4xmbve71.js";export{Un as activeTurnKey,Bn as continuesTurn,Fn as groupTurns,ie as isHistoryInterrupted,lt as isHistoryItem,Mo as isMcpStartup,Hn as isSessionStatus,ct as isTurnInterrupted,P as messageText,zn as turnPresentation,On as turnTiming};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{qn}from"../chunk-cdrmg9jj.js";export{qn as useTimelineScroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bn}from"../chunk-q5az5kp2.js";import"../chunk-kvx8fv1e.js";import"../chunk-2hk04fh3.js";import"../chunk-z5tstgsh.js";import"../chunk-8hbwf0qe.js";import"../chunk-qmc18ejg.js";import"../chunk-4xmbve71.js";import"../chunk-7dd374an.js";import"../chunk-fcqwzmkd.js";export{bn as UserMessage};
|
package/dist/stage.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function chatAdapterArtifact(): {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
entry: string;
|
|
5
|
+
license: string;
|
|
6
|
+
protocolLicense: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function stageChatAdapter(directory: string, licenses: string): {
|
|
9
|
+
name: string;
|
|
10
|
+
version: string;
|
|
11
|
+
entry: string;
|
|
12
|
+
};
|
package/dist/stage.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{copyFileSync as c,mkdirSync as i,readFileSync as s}from"node:fs";import{createRequire as p}from"node:module";import{dirname as a,join as r}from"node:path";function m(){let o=p(import.meta.url).resolve("@nyssance/codex-acp-v2"),e=a(a(o)),{name:t,version:n}=JSON.parse(s(r(e,"package.json"),"utf8"));return{name:t,version:n,entry:o,license:r(e,"LICENSE"),protocolLicense:r(e,"licenses/alwith-protocol.txt")}}function x(o,e){let t=m();i(o,{recursive:!0}),i(e,{recursive:!0});let n=r(o,"codex-acp-v2.mjs");return c(t.entry,n),c(t.license,r(e,"codex-acp-v2.txt")),c(t.protocolLicense,r(e,"codex-acp-v2-protocol.txt")),{name:t.name,version:t.version,entry:n}}export{m as chatAdapterArtifact,x as stageChatAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -302,19 +302,28 @@
|
|
|
302
302
|
"import": "./dist/session-list/session-list.js",
|
|
303
303
|
"default": "./dist/session-list/session-list.js"
|
|
304
304
|
},
|
|
305
|
-
"./session-list.css": "./dist/session-list/session-list.css"
|
|
305
|
+
"./session-list.css": "./dist/session-list/session-list.css",
|
|
306
|
+
"./client": {
|
|
307
|
+
"types": "./dist/client.d.ts",
|
|
308
|
+
"import": "./dist/client.js",
|
|
309
|
+
"default": "./dist/client.js"
|
|
310
|
+
},
|
|
311
|
+
"./import": {
|
|
312
|
+
"types": "./dist/import.d.ts",
|
|
313
|
+
"import": "./dist/import.js",
|
|
314
|
+
"default": "./dist/import.js"
|
|
315
|
+
},
|
|
316
|
+
"./stage": {
|
|
317
|
+
"types": "./dist/stage.d.ts",
|
|
318
|
+
"import": "./dist/stage.js",
|
|
319
|
+
"default": "./dist/stage.js"
|
|
320
|
+
}
|
|
306
321
|
},
|
|
307
322
|
"peerDependencies": {
|
|
308
|
-
"@agentclientprotocol/sdk": "^2.0
|
|
323
|
+
"@agentclientprotocol/sdk": "^2.2.0",
|
|
309
324
|
"@alwith/api": "^0.5.4",
|
|
310
325
|
"react": "^19.3.1",
|
|
311
|
-
"react-dom": "^19.3.1"
|
|
312
|
-
"@nyssance/codex-acp-v2": "^0.7.47"
|
|
313
|
-
},
|
|
314
|
-
"peerDependenciesMeta": {
|
|
315
|
-
"@nyssance/codex-acp-v2": {
|
|
316
|
-
"optional": true
|
|
317
|
-
}
|
|
326
|
+
"react-dom": "^19.3.1"
|
|
318
327
|
},
|
|
319
328
|
"files": [
|
|
320
329
|
"dist",
|
|
@@ -335,10 +344,9 @@
|
|
|
335
344
|
"prepack": "bun run build && bun test ../../scripts/__tests__/chat-worker-distribution.test.ts"
|
|
336
345
|
},
|
|
337
346
|
"devDependencies": {
|
|
338
|
-
"@agentclientprotocol/sdk": "^2.
|
|
347
|
+
"@agentclientprotocol/sdk": "^2.2.0",
|
|
339
348
|
"@alwith/api": "^0.5.4",
|
|
340
349
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
341
|
-
"@nyssance/codex-acp-v2": "^0.7.47",
|
|
342
350
|
"@testing-library/dom": "^10.4.2",
|
|
343
351
|
"@testing-library/jest-dom": "^6.9.1",
|
|
344
352
|
"@testing-library/react": "^16.3.3",
|
|
@@ -351,16 +359,19 @@
|
|
|
351
359
|
"dependencies": {
|
|
352
360
|
"@base-ui/react": "^1.9.0",
|
|
353
361
|
"@floating-ui/dom": "^1.8.0",
|
|
362
|
+
"@nyssance/codex-acp-v2": "^0.7.49",
|
|
363
|
+
"@nyssance/shadcn": "^4.23.2",
|
|
364
|
+
"@shadcn/react": "^0.3.1",
|
|
354
365
|
"ansi_up": "^6.0.6",
|
|
355
366
|
"class-variance-authority": "^0.7.1",
|
|
356
|
-
"cn": "^0.5.
|
|
367
|
+
"cn": "^0.5.1",
|
|
357
368
|
"date-fns": "^4.4.0",
|
|
358
369
|
"diff2html": "^3.4.56",
|
|
359
370
|
"entities": "^9.0.0",
|
|
360
371
|
"highlight.js": "^11.12.0",
|
|
361
372
|
"katex": "^0.19.1",
|
|
362
373
|
"ldrs": "^1.1.9",
|
|
363
|
-
"lucide-react": "^1.
|
|
374
|
+
"lucide-react": "^1.66.0",
|
|
364
375
|
"marked": "^18.1.2",
|
|
365
376
|
"marked-linkify-it": "^4.0.2",
|
|
366
377
|
"smplr": "^1.1.0"
|
package/dist/chunk-0dnwqm94.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-q6km9nha.js";import{o}from"./chunk-0ss92kxr.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 mt(t,g,c,y){let{client:S}=o(),R=n((e)=>T(e.agent).composerPredictions),k=t.items.findLast((e)=>e.kind==="user"),i=w(k?._meta),O=t.configOptions.flatMap((e)=>F(e)||B(e)?[[e.configId,e.currentValue]]:[]).sort(([e],[u])=>String(e).localeCompare(String(u))),r=JSON.stringify([t.id,i,O]),s=j(t._meta),d=t._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&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===r||l.current?.key===r||i===null)return;let e={key:r,previousResult:m};l.current=e,x(null),S.requestPrediction(t.id,i).catch((u)=>{if(f.current&&l.current===e)x({key:r,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,r,m,t.id,i]);let I=p&&!c&&a!==r&&l.current?.key===r&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&t.state==="idle"&&!c&&a!==r?v?.key===r?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(r)}}}
|
|
2
|
-
export{mt};
|
package/dist/chunk-0n3q4g7y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h}from"./chunk-7mr1zajc.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Wr(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Ko(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function M(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=h(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(h(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function Qo(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Wr(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,x=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===x)return y;let b={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:x,replayed:a.every(rn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,g)=>j(b,c,g<v,a[g-1])),b})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function rn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function Q(t){return S(t.content)}function Ve(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function an(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function Xo(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Yo(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function Zo(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!Yo(t,e[n-1],o))break;n--}return e[n]?.key}function Jo(t,e,n){let o=n,s=n;while(o>0&&Yo(t,e[o-1],e[o]))o--;while(s+1<e.length&&Yo(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
-
export{Wr,Ko,Qo,rn,Q,Ve,an,Xo,Yo,Zo,Jo};
|
package/dist/chunk-0nkvfecf.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as t}from"@base-ui/react/radio-group";import{cn as o}from"cn";import{jsx as r}from"react/jsx-runtime";function Y({className:i,...a}){return r(t,{"data-slot":"radio-group",className:o("grid w-full gap-3",i),...a})}function A({className:i,...a}){return r(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",i),...a,children:r(e.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:r("span",{className:"absolute top-1/2 start-1/2 size-2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}export{Y,A};
|
package/dist/chunk-0ss92kxr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{re}from"./chunk-q6km9nha.js";import{createContext as v,useContext as a,useMemo as l}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function yt({host:n,client:e,children:t}){let s=l(()=>({host:n,client:e}),[n,e]);return r(re,{host:n,client:e,children:r(i,{value:s,children:t})})}function o(){let n=a(i);if(n===null)throw Error("Conversation host is missing");return n}function C(n,e){e.catch((t)=>{if(n.reportError)n.reportError(t);else console.error(t)})}
|
|
2
|
-
export{yt,o,C};
|
package/dist/chunk-12fcr66z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,r}from"./chunk-da4m33bg.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function pr(e,o){let s=l(),a=r((t)=>t.connection),i=r((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),c=r((t)=>v(t.sessions[e]?.items)),u=r((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(a!=="ready"||u||i)return;let t=!1,f,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(o==="running"||n>0&&n<3))f=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(f)}},[s,e,a,u,i,o]),i?c:p??c}
|
|
2
|
-
export{pr};
|
package/dist/chunk-14r2ktqe.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{V,W}from"./chunk-jdjk6tf4.js";import{e}from"./chunk-wpdn3rx8.js";import{u,m,b,K,p,w}from"./chunk-n5xqjct2.js";import{s}from"./chunk-96x0d2vd.js";import{Mt,Rt,Et,hn,Z}from"./chunk-gdpa9dp5.js";import{le}from"./chunk-pv35kspb.js";import{g,l,r}from"./chunk-da4m33bg.js";import{se,z,D}from"./chunk-x8kxqtva.js";import{sessionGroup as F}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Y,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as h}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:f,...n}){return i(hn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",f)})}function H(f){return f instanceof Error?f.message:String(f)}function Le({children:f}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:f})})}function dr({Scroll:f=Le}){let{t:n,i18n:B}=g(),v=l(),N=r((t)=>t.archivedSessions),A=r((t)=>t.connection),[O,ie]=h(""),[C,ne]=h("all"),[x,ae]=h("all"),[re,oe]=h(0),[G,Q]=h(!0),[q,U]=h(null),[_,R]=h(null),[I,j]=h(!1),S=ye(!1),[P,y]=h(null),[J,T]=h(null),[ce,M]=h(!1);Se(()=>{if(A!=="ready")return;let t=!1;Q(!0),U(null);async function d(){try{await v.listArchived({reset:!0});let o=new Set;while(!t&&v.state.archivedCursor!==null){let L=v.state.archivedCursor;if(o.has(L))throw Error("Archive pagination returned a repeated cursor");o.add(L),await v.listArchived()}}catch(o){if(!t)U(H(o))}finally{if(!t)Q(!1)}}return d(),()=>{t=!0}},[v,A,re]);let c=r((t)=>t.projectContext),E=!(c!==null&&A==="ready"&&!G&&q===null)||I,k=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(N.filter((t)=>c&&F(c,t).id!==D).map((t)=>c?F(c,t).id:t.cwd))].toSorted(),ue=O.trim().toLocaleLowerCase(B.language),X=N.filter((t)=>{let d=c?F(c,t).id:null,o=d===D;return k(t).toLocaleLowerCase(B.language).includes(ue)&&(C==="all"||(C==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:d===x))}),me=new Intl.DateTimeFormat(B.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,j(!0),R(null);try{await v.unarchive(t.sessionId)}catch(d){R(H(d))}finally{S.current=!1,j(!1)}}async function he(){if(S.current||!P)return;S.current=!0,j(!0),T(null);let t=[],d=[];try{for(let o of P){if(!v.state.archivedSessions.some((L)=>L.sessionId===o.sessionId))continue;try{await v.delete(o.sessionId)}catch(L){t.push(o),d.push(`${k(o)}: ${H(L)}`)}}if(t.length)y(t),T(d.join(`
|
|
2
|
-
`));else y(null)}finally{S.current=!1,j(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:E||N.length===0,onClick:()=>{T(null),M(!0),y([...N])},children:[i(ee,{className:"size-4","aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(s,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:O,onChange:(t)=>ie(t.target.value),className:"rounded-md ps-9"})]}),a(Mt,{value:C,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ne(t)},children:[a(Et,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Rt,{children:n(`sessionList.archives.${C==="all"?"allChats":C==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allChats")}),i(Z,{value:"quick",children:n("sessionList.archives.quickChats")}),i(Z,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Mt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");ae(t)},children:[a(Et,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Rt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):z(x,c??void 0)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allProjects")}),i(Z,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(Z,{value:t,title:t,children:z(t,c??void 0)},t))]})]})]}),a(f,{children:[A!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):G?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(le,{}),n("sessionList.archives.loading")]}):q?i(V,{variant:"destructive",children:a(W,{className:"flex items-center justify-between gap-4",children:[i("span",{children:q}),i(e,{variant:"outline",onClick:()=>oe((t)=>t+1),children:n("sessionList.archives.retry")})]})}):N.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):X.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?se(X,c):[]).filter(([,t])=>t.length>0).map(([t,d])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===D?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===D?n("sessionList.archives.noProject"):z(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:d.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:d.map((o)=>a("article",{"aria-label":k(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:k(o),children:k(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:E,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),M(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:E,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),_&&i(V,{variant:"destructive",children:i(W,{children:_})})]})]}),i(u,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(m,{showCloseButton:!I,children:[a(b,{children:[i(p,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(ce?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),J&&i(V,{variant:"destructive",children:i(W,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:J})}),a(K,{children:[i(e,{variant:"outline",disabled:I,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-sm font-normal",disabled:E,onClick:()=>void he(),children:[I&&i(le,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{dr};
|
package/dist/chunk-1fm5vx1n.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Separator as o}from"@base-ui/react/separator";import{cn as i}from"cn";import{jsx as e}from"react/jsx-runtime";function j({className:a,orientation:r="horizontal",...t}){return e(o,{"data-slot":"separator",orientation:r,className:i("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...t})}export{j};
|
package/dist/chunk-1gp5f49d.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Go}from"./chunk-2ahqcs3n.js";import{t}from"./chunk-q6km9nha.js";import{To,So}from"./chunk-1wpdb17m.js";import{B}from"./chunk-y6afvrnv.js";import{Q}from"./chunk-0n3q4g7y.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var Co=p(function({item:s,messageTime:c}){let l=t(),o=So(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):Q(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=To(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(B,{block:e},`${s.id}:${n}`))}),r(Go,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
-
export{Co};
|
package/dist/chunk-1hzdqep7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Mr(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function In(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(Mr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Pn(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function Rr(t){return[...t].filter((e)=>!s(e)).join("")}function vr(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function lt(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=Rr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-vr(e,o)),r=Math.max(0,i-vr(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
-
export{Mr,In,Pn,Rr,vr,lt};
|
package/dist/chunk-2a3tezgr.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Checkbox as e}from"@base-ui/react/checkbox";import{cn as o}from"cn";import{CheckIcon as t}from"lucide-react";import{jsx as i}from"react/jsx-runtime";function fe({className:r,...a}){return i(e.Root,{"data-slot":"checkbox",className:o("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",r),...a,children:i(e.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:i(t,{})})})}export{fe};
|
package/dist/chunk-2cbya1f5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Zn,y}from"./chunk-cazdmcwd.js";import{Tn}from"./chunk-6b1hdb25.js";import{ne}from"./chunk-bj5ma2sv.js";import{Un,$n,qn,Vn,Wn,G}from"./chunk-kmhwwzga.js";import{kn,Cn}from"./chunk-t1yzfva7.js";import{_t}from"./chunk-xe3h32y1.js";import{t,n}from"./chunk-q6km9nha.js";import{o}from"./chunk-0ss92kxr.js";import{Ot}from"./chunk-afd3bq7v.js";import{i,sr,L,wt}from"./chunk-2swp3nfs.js";import{dt}from"./chunk-mzh48e09.js";import{de,gt}from"./chunk-59j0p8hy.js";import{kt,Tt}from"./chunk-w1awbykg.js";import{lr}from"./chunk-c1vavp0q.js";import{pt}from"./chunk-bew4srqj.js";import{Ln}from"./chunk-qca5mhqd.js";import{ut}from"./chunk-7jdjdnh6.js";import{mt}from"./chunk-0dnwqm94.js";import{En}from"./chunk-7ap638hx.js";import{Bn}from"./chunk-8bfnjqkg.js";import{ct}from"./chunk-d94rmh12.js";import{hasFuzzyFileSearch as Lt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as zt}from"lucide-react";import{useCallback as O,useEffect as Ut,useLayoutEffect as Q,useMemo as Z,useRef as V,useState as S}from"react";import{jsx as c,jsxs as I}from"react/jsx-runtime";var Wt=["image/png","image/jpeg","image/webp","image/gif"],tt=[];async function jt(e){let d=await(await fetch(e.url)).blob();return new Promise((l,E)=>{let T=new FileReader;T.onerror=()=>E(T.error),T.onload=()=>{let _=T.result;l(_.slice(_.indexOf(",")+1))},T.readAsDataURL(d)})}function Ht(e){let{t:d}=t(),l=y();return c(G,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>l.openFileDialog(),...e,children:c(zt,{className:"size-4"})})}function st({session:e,onSubmit:d,onShellCommand:l,onHandOff:E,modelSelector:T,modelMenu:_,inputHeader:et,actions:bt,children:vt,attachmentPolicy:It,predictions:At=!0,disabled:Mt=!1,preparing:rt=!1,allowPendingInput:Ct=!1}){let{host:F,client:R}=o(),{t:p}=F,k=O((r)=>{if(F.reportError)F.reportError(r);else console.error(r)},[F]),[nt,D]=S(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:b}=nt,[A,Et]=S(()=>i.get(e.id)?.attachments??tt),[u,z]=S(()=>i.get(e.id)?.mentions??[]),X=A.some((r)=>de(r)&&r.pastedText.status!=="ready"),[M,ot]=S(!1),[U,Rt]=S(!1),[q,at]=S(!1),f=V(null),it=V(null),a=V(nt),W=O((r)=>{it.current?.(),a.current={text:r,revision:a.current.revision+1},D(a.current)},[]),lt=Z(()=>({read:()=>{let s=f.current?.getTextarea(),g=s===null||s===void 0?[a.current.text.length,a.current.text.length]:[s.selectionStart,s.selectionEnd];return{target:e.id,...a.current,selection:g}},compareAndSet(s,g,C){if(s.target!==e.id||s.revision!==a.current.revision)return null;a.current={text:g,revision:a.current.revision+1},D(a.current);let x=f.current?.getTextarea();if(x!==null&&x!==void 0)x.value=g,x.setSelectionRange(C[0],C[1]);return{target:e.id,...a.current,selection:C}}}),[e.id]),B=V(null),ft=O((r)=>(B.current=r,()=>{if(B.current===r)B.current=null}),[]),j=e.state!=="idle",v=l!==void 0&&b.startsWith("!"),h=!Mt&&!rt&&e.attached&&!e.restoring&&!e.readOnly,N=!e.readOnly&&(Ct||h),H=mt(e,h&&!M&&!U&&!X&&!q,b.length>0||A.length>0||u.length>0,At&&!v),ht=H.invalidate;Q(()=>{i.set(e.id,{text:b,attachments:A,mentions:u,modelId:i.get(e.id)?.modelId??null})},[e.id,b,A,u]),Q(()=>sr(e.id,Et),[e.id]),Q(()=>wt(e.id,(r)=>{if(!N||M)throw Error("The composer cannot take text now; try again later");if(b.length||A.length||u.length)throw Error("The composer already has a draft; send or clear it first");W(r)}),[e.id,N,M,b,A,u,W]);let xt=n((r)=>Lt(r.agent)),Nt=Z(()=>xt&&h?async(r)=>dt((await R.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[R,xt,h,e.cwd]),J=O((r)=>{z((s)=>s.includes(r)?s:[...s,r])},[]);Ut(()=>{f.current?.focus()},[]);let yt=O(async({text:r,files:s})=>{let g=l!==void 0&&r.startsWith("!")?r.slice(1):null;if(g!==null){if(g.trim().length===0)return;if(s.length||u.length)throw Error("Shell commands cannot include file references or attachments");if(e.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let C=r.trim();if(C.length===0&&s.length===0&&u.length===0)return;let x=B.current;ot(!0);let w=i.get(e.id),Bt=a.current.revision,K=null;try{let P=[];for(let m of u){let Y={kind:"file",absPath:m};P.push({type:"resource_link",uri:kt(Y),name:Tt(Y)})}if(C.length>0)P.push({type:"text",text:C});for(let m of s)if(de(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");P.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else P.push({type:"image",data:await jt(m),mimeType:m.mediaType});if(a.current.revision===Bt&&i.get(e.id)===w)a.current={text:"",revision:a.current.revision+1},K=a.current.revision,D(a.current),z([]),L(e.id,()=>tt),i.set(e.id,{text:"",attachments:tt,mentions:[],modelId:w?.modelId??null}),f.current?.resetHeight();if(g!==null&&l)await l(g);else if(d)if(x===null)await d(P);else await d(P,(m)=>{if(x.signal.aborted||B.current!==x)return;x.accept(m),E?.(e.id,m)});else if(x===null)await R.prompt(e.id,P);else{let m=await R.prompt(e.id,P);x.accept(m)}ht();for(let m of w?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((Y)=>Y.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(w&&K!==null&&a.current.revision===K&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:w.text,revision:K+1},D(a.current),z(w.mentions),i.set(e.id,w),L(e.id,()=>w.attachments);throw P}finally{ot(!1),f.current?.focus()}},[R,e.id,e.state,u,d,l,E,ht]),St=()=>{R.cancel(e.id).catch(k)},Ft=O((r)=>{let s=r.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:ne})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});k(s)},[k,p]),Dt=Z(()=>({session:e,ready:h,inputReady:N,sending:M,textareaRef:f,draft:lt,interruptRef:it,observeReceipts:ft,addMention:J,setAdding:Rt,shellMode:v,handsFree:!v&&(d===void 0||E!==void 0)}),[e,h,N,M,lt,ft,J,d,E,v]),Pt=F.writeTextAttachment;return c(Ot,{value:Dt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:I("div",{className:"relative",children:[et&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:et}),I(Zn,{attachmentPolicy:It,value:b,revision:a.current.revision,onValueChange:W,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},D(a.current)},attachments:A,onAttachmentsChange:(r)=>L(e.id,()=>r),children:[c(Tn,{bashMode:l!==void 0,handleRef:f,commands:e.commands,searchFiles:Nt,onMention:J,onSearchError:k,forcedOpen:q,onForcedOpenChange:at,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),I(Un,{"data-shell-mode":v||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Wt.join(","),onError:Ft,onSubmit:yt,onSubmitAsync:yt,onSubmitError:k,canSubmit:()=>h&&!M&&!U&&!X&&(!v||!j&&b.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[vt,I(qn,{className:"px-3 pt-3 pb-0 empty:hidden",children:[U&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),c(lr,{mentions:u,onRemove:(r)=>z((s)=>s.filter((g)=>g!==r))}),c(Cn,{children:(r)=>de(r)?c(Ln,{data:r,sessionId:e.id}):c(kn,{data:r,t:p})})]}),I($n,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(r)=>{if(!H.text||f.current?.isComposing()||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey||r.target!==f.current?.getTextarea())return;if(r.key==="Tab")r.preventDefault(),r.stopPropagation(),W(H.text)},children:[v&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(_t,{className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,bashMode:l!==void 0,disabled:!N,onPasteCapture:Pt?(r)=>gt(r,e.id,p("composer.pastedTextFilename"),Pt):void 0,placeholder:v?"! command":H.text||(j?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),c(Vn,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:I("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[I("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Ht,{className:"text-foreground",disabled:!N}),c(En,{textareaRef:f,menuOpen:q,onOpenChange:at,disabled:!h||e.commands.length===0}),c(ut,{sessionId:e.id,options:e.configOptions,disabled:!h})]}),I(Wn,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(ct,{session:e}),T??c(pt,{..._,sessionId:e.id,options:e.configOptions,disabled:!h}),bt,c(Bn,{active:j,sending:M||rt||U,ready:h&&!X&&(!v||!j&&b.slice(1).trim().length>0),hasMentions:u.length>0,onStop:St})]})]})})]})]})]})})})}
|
|
2
|
-
export{st};
|
package/dist/chunk-2r3sfmyf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var Se="group/trailing";function ce({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Ie({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
|
|
2
|
-
export{Se,ce,Ie};
|
package/dist/chunk-2rperg04.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-wpdn3rx8.js";import{s}from"./chunk-96x0d2vd.js";import{k}from"./chunk-da6d6wze.js";import{cva as u}from"class-variance-authority";import{cn as n}from"cn";import{jsx as r}from"react/jsx-runtime";function Xn({className:a,...t}){return r("div",{"data-slot":"input-group",role:"group",className:n("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",a),...t})}var d=u("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem]","inline-end":"order-last pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Ut({className:a,align:t="inline-start",...i}){return r("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:n(d({align:t}),a),onClick:(o)=>{if(o.target.closest("button"))return;o.currentTarget.parentElement?.querySelector("input")?.focus()},...i})}var l=u("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function $t({className:a,type:t="button",variant:i="ghost",size:o="xs",...p}){return r(e,{type:t,"data-size":o,variant:i,className:n(l({size:o}),a),...p})}function ai({className:a,...t}){return r("span",{className:n("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}function si({className:a,...t}){return r(s,{"data-slot":"input-group-control",className:n("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",a),...t})}function Yn({className:a,...t}){return r(k,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",a),...t})}export{Xn,Ut,$t,ai,si,Yn};
|
package/dist/chunk-2swp3nfs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var i=new Map,a=new Map,f=new Map;function sr(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function L(t,r){let n=i.get(t);if(!n)return;let e=r(n.attachments);i.set(t,{...n,attachments:e}),a.get(t)?.(e)}function bt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function Tr(t){for(;;){let e=i.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=i.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Sr(t,r){if(r===null)i.delete(t);else i.set(t,r)}var s=new Map;function wt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function Ir(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=i.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),i.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
|
|
2
|
-
export{i,sr,L,bt,Tr,Sr,wt,Ir};
|
package/dist/chunk-3919sqde.js
DELETED
package/dist/chunk-39sbgvd3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{x}from"./chunk-qxabrz98.js";import{t}from"./chunk-q6km9nha.js";import{B}from"./chunk-y6afvrnv.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(x,{text:e.text,streaming:o})})}if(i.isImage(e))return n(B,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(B,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function oe({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
-
export{oe};
|
package/dist/chunk-3ebdnbcj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-q6km9nha.js";import{e}from"./chunk-wpdn3rx8.js";import{Ue}from"./chunk-465r54av.js";import{he,ve,xe,ye}from"./chunk-d5ga13n0.js";import{o,C}from"./chunk-0ss92kxr.js";import{Loader2Icon as f}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";function vt({session:t,timeline:c}){let{host:s,client:a}=o(),{t:r}=s,l=n((y)=>y.historyPages[t.id]?.cursor!=null),d=()=>C(s,a.open(t.id,t.cwd)),p=i(Ue,{...c,session:t,client:a,host:s});if(t.restoring)return t.items.length===0?m("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[i(f,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return m(he,{className:"flex-1",children:[m(ve,{children:[i(xe,{children:r("conversation.reopen")}),i(ye,{children:r("conversation.detached")})]}),i(e,{onClick:d,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!l)return i(he,{className:"flex-1",children:m(ve,{children:[i(xe,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),i(ye,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{vt};
|
package/dist/chunk-3k5n3809.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Hn,Fn}from"./chunk-h68f23r0.js";import{cn as l}from"cn";import{jsx as t,jsxs as a}from"react/jsx-runtime";function f({value:i,onValueChange:n,options:o,itemClassName:d}){return t(Hn,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(Fn,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
|
|
2
|
-
export{f};
|
package/dist/chunk-3my2mbn9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$e}from"./chunk-bnj58bev.js";import{or}from"./chunk-kq8kz0jn.js";import{t}from"./chunk-q6km9nha.js";import{B}from"./chunk-y6afvrnv.js";import{rn}from"./chunk-0n3q4g7y.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.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((o,s)=>l(B,{block:o.content},`${n.id}:${s}`))]})}var en=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(rn),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...or(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l($e,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
|
|
2
|
-
export{en};
|
package/dist/chunk-465r54av.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{fo}from"./chunk-txn8v2yc.js";import{e}from"./chunk-wpdn3rx8.js";import{re,t,ie,n,Ge}from"./chunk-q6km9nha.js";import{Qo,Ve,an,Zo,Jo}from"./chunk-0n3q4g7y.js";import{qe}from"./chunk-efcpawhs.js";import{Bo}from"./chunk-ewvhf3wb.js";import{Fo}from"./chunk-as1cvbzm.js";import{Io,Po}from"./chunk-v8cyw9xa.js";import{wo,ko}from"./chunk-yy4tw3nj.js";import{bo}from"./chunk-2qhbm5y9.js";import{Oo}from"./chunk-wrkwz65x.js";import{Co}from"./chunk-1gp5f49d.js";import{codexExtensionCapabilities as Ce,codexMessageError as Me,codexRetryNotice as ze,codexTurnError as Be,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Oe}from"lucide-react";import{useCallback as V,useEffect as A,useLayoutEffect as ve,useMemo as Q,useRef as b,useState as _}from"react";import{flushSync as Te}from"react-dom";import{jsx as a,jsxs as L}from"react/jsx-runtime";var ye=24;function Fe(r){let m=Math.max(0,r.turnTopPx-ye),v=Math.max(0,r.scrollHeightPx-r.viewportHeightPx),c=m-v;return{scrollTopPx:m,spacerPx:c>0?r.spacerPx+c:r.spacerPx}}function Ke({viewportRef:r,viewportProps:m,children:v}){return a("div",{ref:r,...m,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function _e({sessionId:r,turnId:m,root:v,error:c,connected:S}){let C=b(null),w=ie(),{t:N}=t(),R=V(()=>{w.loadHistoryTurn(r,m).catch(()=>{})},[w,r,m]);return A(()=>{if(!v||!C.current||!S||c)return;let B=new IntersectionObserver((T)=>{if(T.some((P)=>P.isIntersecting))B.disconnect(),R()},{root:v,rootMargin:"800px 0px"});return B.observe(C.current),()=>B.disconnect()},[v,S,c,R]),a("div",{ref:C,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":m,"data-markdown-pending":!0,children:c?L("div",{className:"flex flex-col items-center gap-2",children:[a("p",{role:"alert",className:"text-destructive text-xs",children:c}),a(e,{variant:"outline",size:"sm",onClick:R,disabled:!S,children:N("timeline.navigationRetry")})]}):L("div",{role:"status","aria-label":N("timeline.navigationLoading"),className:"space-y-3",children:[a("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),a("div",{className:"bg-muted h-3 w-4/5 rounded"}),a("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function $e(r,m){let v=b([]),c=b(null);if(c.current?.items!==r.items||c.current.state!==r.state||c.current.ended!==r.turnEndedAt||c.current.usage!==r.turnUsage||c.current.historyOrder!==m)c.current={state:r.state,items:r.items,ended:r.turnEndedAt,usage:r.turnUsage,historyOrder:m,turns:Qo(r,v.current,m)};let S=c.current.turns;return v.current=S,S}function Ue(r){return a(re,{host:r.host,client:r.client,children:a(De,{...r})})}function De({session:r,leading:m,afterTurn:v,answerActions:c,turnFooter:S,renderUserMessage:C,insert:w,navigation:N,anchorNewTurn:R=!1,Viewport:B=Ke}){let T=ie(),P=t(),y=n((i)=>i.historyNavigation[r.id]),d=$e(r,y?.turns),M=d.at(-1)?.key,xe=Zo(r,d),x=r.state==="running"||r.state==="requires_action",D=Q(()=>Fo(d,y),[d,y]),Y=Q(()=>D.flatMap((i)=>i.turn===void 0?[]:[{...i.turn,key:i.turnKey}]),[D]),he=Q(()=>N===void 0?[]:Io(d,r.turnUsage,y),[N,d,r.turnUsage,y]),Z=w&&w.afterItemId!==null?d.findIndex((i)=>i.items.some((u)=>u.id===w.afterItemId)):-1,j=b(d);j.current=d;let[l,be]=_(null),h=n((i)=>i.historyPages[r.id]),I=n((i)=>i.connection==="ready"),we=n((i)=>Ce(i.agent).sessionRetry),ee=h!==void 0;A(()=>{if(I&&ee&&!r.restoring)T.loadHistoryNavigation(r.id).catch(()=>{})},[T,I,ee,r.id,r.restoring]);let[Re,Se]=_(!1),F=b(null),[Pe,te]=_(!1),ne=b(0),W=b({key:M,running:x});W.current={key:M,running:x};let[oe,K]=_(0),k=b(0),E=b(null);k.current=oe;let Ie=V(()=>{if(E.current!==null)E.current.keepTop=!1},[]),{isFollowing:z,scrollToBottom:X,stopFollowing:q,schedulePin:ae,contentResized:le,beginLocate:ue,cancelLocation:se}=Oo(l,x,Ie),ce=V(()=>{if(l===null||!x)return;let i=d.at(-1)?.key;if(i===void 0)return;let u=ue(!0),s=()=>u.isCurrent()&&W.current.running&&W.current.key===i,o=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!s())return;let g=l.querySelector(`[data-codex-turn="${CSS.escape(i)}"]`);if(g===null)return;let f=l.scrollTop+g.getBoundingClientRect().top-l.getBoundingClientRect().top,H=Fe({turnTopPx:f,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:k.current});E.current=H.spacerPx>0?{element:g,heightPx:g.getBoundingClientRect().height+H.spacerPx,keepTop:!0}:null,Te(()=>K(H.spacerPx)),requestAnimationFrame(()=>{if(s())u.finish(H.scrollTopPx)})})),p=F.current;if(p===null)return;p.scrollToKey(i,void 0,{align:"top"}).then(()=>{if(s())o()})},[ue,x,l,d]);ve(()=>{if(!R||x)return;se(),E.current=null,k.current=0,K(0)},[R,se,x]);let G=V(()=>{q(),T.loadOlderHistory(r.id).catch(()=>{})},[T,r.id,q]);A(()=>{if(l===null)return;let i=()=>{let u=l.scrollTop<600;if(Se(u),u&&!y?.complete&&I&&!r.restoring&&!z&&h?.cursor&&!h.loading&&!h.error)G()};return i(),l.addEventListener("scroll",i,{passive:!0}),()=>l.removeEventListener("scroll",i)},[I,h,z,G,l,r.restoring,y?.complete]),A(()=>{wo({sessionId:r.id,turns:Y,api:F.current,beforeReveal:q,terminals:r.terminals})},[r.id,r.terminals,Y,q]),A(()=>()=>ko(r.id),[r.id]);let He=V(async(i,u)=>{let s=++ne.current;te(!0);try{if(i.isLoaded===!1&&i.nativeTurnId!==void 0)await T.loadHistoryTurn(r.id,i.nativeTurnId),await new Promise((f)=>requestAnimationFrame(()=>f()));if(!u())return null;let o=j.current.find((f)=>f.user?.id===(i.messageId??i.id))??j.current.find((f)=>f.user!==null&&i.nativeTurnId!==void 0&&f.items.some((H)=>ge(H)===i.nativeTurnId));if(!o?.user)return null;let p=o.user.id,g=F.current;if(g===null)throw Error("Virtual timeline is not mounted");return await g.scrollToKey(o.key,(f)=>f.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(ne.current===s)te(!1)}},[T,r.id]),Ne=V(async(i)=>{if(i.nativeTurnId!==void 0)await T.previewHistoryTurn(r.id,i.nativeTurnId)},[T,r.id]);A(()=>{if(l===null)return;let i=l.querySelector("[data-codex-timeline]");if(i===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let s=E.current,o=null;if(s!==null){let p=Math.max(0,s.heightPx-s.element.getBoundingClientRect().height);if(p!==k.current&&(p<k.current||s.keepTop)){if(k.current=p,Te(()=>K(p)),p===0)E.current=null}if(p>0&&s.keepTop)o=l.scrollTop+s.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(o)});if(u.observe(i),u.observe(l),M!==void 0){let s=l.querySelector(`[data-codex-turn="${CSS.escape(M)}"]`);if(s===null)throw Error("Latest turn is not mounted");u.observe(s)}return()=>u.disconnect()},[le,M,l]),A(()=>{if(r.items.length===0)return;ae()},[ae,r.items]);let de=b(null);ve(()=>{if(l===null)return;let i=d.at(-1),u=de.current;if(de.current=i===void 0?null:{key:i.key,running:x},i===void 0||u===null||i.user===null||i.replayed)return;if(R){if(x&&r.turnEndedAt[i.user.id]===void 0&&(i.key!==u.key||!u.running))E.current=null,k.current=0,K(0),ce()}else if(i.key!==u.key)X()},[ce,R,x,X,l,r.turnEndedAt,d]);let ke=(i,u)=>{let s=i,o=s.turn;if(o===void 0){if(s.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return a(_e,{sessionId:r.id,turnId:s.nativeTurnId,root:l,error:y?.turnErrors[s.nativeTurnId],connected:I&&!z&&!Pe})}let p=d.indexOf(o),g=o.key===xe,f=Jo(r,d,p),H=!g&&f.continued,U=o.key===M,O=o.errors.at(-1),me=O===void 0?null:Me(O),J=O===void 0?null:ge(O),Ee=!r.subagent&&U&&!g&&I&&we&&r.attached&&!r.readOnly&&!r.restoring&&O===r.items.at(-1)&&me!==null&&Be(me).category==="overloaded"&&J!==null&&r.lastStopReason!=="end_turn"&&r.lastStopReason!=="cancelled",fe=S?.(o)??null,Ae=o.work.length>0||o.final.length>0||o.errors.length>0||g||fe!==null||Ve(o)||an(o)||U&&(r.error!==null||r.lastStopReason==="cancelled"),pe=o.user===null?null:qe(o);return L("div",{"data-virtualized-turn-content":!0,"data-codex-turn":o.key,className:"flex flex-col gap-1.5",children:[o.user!==null&&(C===void 0?a(Co,{item:o.user,messageTime:pe}):C(o.user,pe)),Ae&&a(Bo,{sessionId:r.id,turn:o,terminals:r.terminals,active:g,blocked:r.state==="requires_action",continued:H,edits:f.edits,activityItems:f.items,workStartedAt:f.startedAt,isLast:U,error:r.error,retrying:g?ze(r._meta)??void 0:void 0,retry:Ee?{turnId:J,delaySeconds:bo(d),run:(Le)=>T.retrySession(r.id,J,Le)}:void 0,interrupted:an(o)||!g&&U&&r.lastStopReason==="cancelled",answerActions:c?.(o),footer:fe}),u===Z&&w?.node,v?.(o)]})};return L("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[a(B,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":P.t("timeline.label")},children:a("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:L("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[w&&Z===-1&&w.node,a(fo,{ref:F,entries:D,renderTurn:ke,scrollElement:l,sessionKey:r.id,preserveViewport:!z,leadingInsetPx:12,leadingContent:m===void 0?void 0:a("div",{className:"pt-3",children:m})}),R&&a("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:oe}}),a("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),a("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),y?.error&&a("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:a(e,{variant:"outline",size:"sm",disabled:!I,title:y.error,onClick:()=>{T.loadHistoryNavigation(r.id).catch(()=>{})},children:P.t("timeline.navigationRetry")})}),Re&&h?.cursor&&!y?.complete&&L("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[a(e,{variant:"outline",size:"sm",disabled:!I||r.restoring||h.loading,onClick:G,children:h.loading?P.t("timeline.loadingEarlier"):P.t("timeline.loadEarlier")}),h.error&&a("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:h.error})]}),N!==void 0&&a(Po,{items:he,audio:N.audio,scrollRoot:l,beforeReveal:q,ensureItemMounted:He,onPreviewItem:Ne,onRevealError:(i)=>Ge(P,i),targetTopMarginPx:16},r.id),a("button",{type:"button",className:z?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:z?-1:void 0,onClick:X,"aria-label":P.t("timeline.scrollToBottom"),children:x?L("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[a("span",{className:"codex-wave-dot"}),a("span",{className:"codex-wave-dot"}),a("span",{className:"codex-wave-dot"})]}):a(Oe,{})})]})}
|
|
2
|
-
export{Ue};
|
package/dist/chunk-4s1rhts0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Switch as a}from"@base-ui/react/switch";import{cn as d}from"cn";import{jsx as t}from"react/jsx-runtime";function ze({className:e,size:i="default",...r}){return t(a.Root,{"data-slot":"switch","data-size":i,className:d("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:t(a.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=default]/switch:data-checked:-translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=sm]/switch:data-checked:-translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:-translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:-translate-x-0 dark:data-unchecked:bg-foreground"})})}export{ze};
|
package/dist/chunk-4zzhckab.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ki=280;function ho({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function be({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function Kt({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function vo({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function xo({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function yo({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
-
export{ki,ho,be,Kt,vo,xo,yo};
|
package/dist/chunk-58wt406v.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v}from"./chunk-kjtd3wc3.js";import{j}from"./chunk-1fm5vx1n.js";import{useMemo as f}from"react";import{cva as p}from"class-variance-authority";import{cn as l}from"cn";import{jsx as t,jsxs as c}from"react/jsx-runtime";function Gt({className:a,...e}){return t("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",a),...e})}function jt({className:a,variant:e="legend",...o}){return t("legend",{"data-slot":"field-legend","data-variant":e,className:l("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",a),...o})}function co({className:a,...e}){return t("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",a),...e})}var u=p("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function uo({className:a,orientation:e="vertical",...o}){return t("div",{role:"group","data-slot":"field","data-orientation":e,className:l(u({orientation:e}),a),...o})}function fi({className:a,...e}){return t("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1 leading-snug",a),...e})}function mo({className:a,...e}){return t(v,{"data-slot":"field-label",className:l("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}function hi({className:a,...e}){return t("div",{"data-slot":"field-label",className:l("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",a),...e})}function ht({className:a,...e}){return t("p",{"data-slot":"field-description",className:l("text-start text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",a),...e})}function vi({children:a,className:e,...o}){return c("div",{"data-slot":"field-separator","data-content":!!a,className:l("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",e),...o,children:[t(j,{className:"absolute inset-0 top-1/2"}),a&&t("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:a})]})}function xi({className:a,children:e,errors:o,...s}){let i=f(()=>{if(e)return e;if(!o?.length)return null;let r=[...new Map(o.map((d)=>[d?.message,d])).values()];if(r?.length==1)return r[0]?.message;return t("ul",{className:"ms-4 flex list-disc flex-col gap-1",children:r.map((d,n)=>d?.message&&t("li",{children:d.message},n))})},[e,o]);if(!i)return null;return t("div",{role:"alert","data-slot":"field-error",className:l("text-sm font-normal text-destructive",a),...s,children:i})}export{Gt,jt,co,uo,fi,mo,hi,ht,vi,xi};
|
package/dist/chunk-59g9h4v1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l,r}from"./chunk-da4m33bg.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function gr(i){let t=l(),e=r((s)=>s.projectContext),c=i===null?m:e?a(e,{cwd:t.projectPath(i)}).id:null,u=r((s)=>s.sessionList),d=r((s)=>s.connection),n=r((s)=>s.sessionListLoaded),o=r((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!n&&o===null)t.listSessions().catch(()=>{return})},[t,d,n,o]),{result:L(()=>{if(n&&e)return{status:"ready",sessionRows:u.filter((s)=>a(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(o!==null)return{status:"failed",error:o};return{status:"loading"}},[t,u,n,o,c,e]),retry:f}}
|
|
2
|
-
export{gr};
|
package/dist/chunk-59j0p8hy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i,L,bt}from"./chunk-2swp3nfs.js";var On=5000;function de(t){return"pastedText"in t}function Er(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Le(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;L(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Er(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),bt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function gt(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<On)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};L(e,(a)=>[...a,s]),Le(e,s,n)}
|
|
2
|
-
export{On,de,Er,Le,gt};
|
package/dist/chunk-5p1cs4vg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h,dn,er,xt,tr,un,nr}from"./chunk-7mr1zajc.js";import{t,ie,ke,n}from"./chunk-q6km9nha.js";import{oe}from"./chunk-39sbgvd3.js";import{createStore as E}from"@alwith/api/client";import{isText as w,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function v(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function M(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...un(s._meta),...s.content.filter(w).flatMap((i)=>un(i._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:r,item:e,question:s,index:a}){let i=ie(),{t:l}=t(),m=dn(e.id,a),c=JSON.stringify([r,m]),u=ke(b,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),k=n((o)=>o.connection==="ready"),f=u?.draft??er(s),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,A=d!==void 0&&v(d,e),D=!d?.subagent&&k&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!A?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!v(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=xt(s,f);if(!S.trim())return;let q={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:tr(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(nr,{question:s,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function cn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=h(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!v(s,e))return y(oe,{content:e.content.some((i)=>!w(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(O,{sessionId:r,item:e,question:i,index:l},dn(e.id,l)))})}
|
|
2
|
-
export{cn};
|
package/dist/chunk-6b1hdb25.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-wpdn3rx8.js";import{j}from"./chunk-1fm5vx1n.js";import{Ht}from"./chunk-tz96pyvx.js";import{Sn}from"./chunk-w38vbf7h.js";import{_e}from"./chunk-cazdmcwd.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as X}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as v,useLayoutEffect as Y,useMemo as Z,useRef as _,useState as g}from"react";import{createPortal as at}from"react-dom";import{jsx as p,jsxs as E,Fragment as ct}from"react/jsx-runtime";function Tn({handleRef:a,anchorRef:c,commands:C,searchFiles:u,onMention:R,onSearchError:H,fileSearchDebounceMs:M=0,bashMode:A=!1,forcedOpen:i=!1,onForcedOpenChange:f,emptyLabel:F,fileStatusLabels:h,morePlugins:D}){let z=_e(),l=z.textInput.value,[K,U]=g(0),[y,P]=g(null),[b,L]=g(0),V=_(null);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>U(t.selectionStart??0),o=()=>{if(document.activeElement===t)n()};return t.addEventListener("keyup",n),t.addEventListener("click",n),t.addEventListener("input",n),t.addEventListener("select",n),t.addEventListener("focus",n),document.addEventListener("selectionchange",o),()=>{t.removeEventListener("keyup",n),t.removeEventListener("click",n),t.removeEventListener("input",n),t.removeEventListener("select",n),t.removeEventListener("focus",n),document.removeEventListener("selectionchange",o)}});let W=Z(()=>A&&l.startsWith("!")?null:Sn(l,K),[l,K,A]),r=W?.kind==="at"&&!u?null:W,q=`${r?.kind??"forced"}:${r?.query??""}:${i}`,[O,tt]=g(q);if(O!==q)tt(q),L(0);let I=_(null);v(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=l;else if(l!==I.current)f?.(!1)},[i,l,f]);let x=r?.kind==="at"?r.query:null;v(()=>{if(x===null||!u){P(null);return}let t=!0,n=()=>{u(x).then((s)=>{if(t)P({query:x,search:u,items:s})},(s)=>{if(t)P({query:x,search:u,items:[]}),H(s)})},o=M>0?window.setTimeout(n,M):null;if(o===null)n();return()=>{if(t=!1,o!==null)window.clearTimeout(o)}},[x,u,M,H]);let d=Z(()=>{if(r?.kind==="at")return y?.query===r.query&&y.search===u?y.items:[];if(r)return Ht(C,r.query);if(i)return Ht(C,"");return[]},[r,i,C,y,u]),[et,N]=g(!1);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>N(!0),o=()=>{if(N(!1),i)f?.(!1)};return N(document.activeElement===t),t.addEventListener("focus",n),t.addEventListener("blur",o),()=>{t.removeEventListener("focus",n),t.removeEventListener("blur",o)}},[a,i,f]),v(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let m=et&&(r!==null?r.kind==="slash"||d.length>0||!!h:i);v(()=>{if(!m)return;V.current?.querySelector(`[data-idx="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,m]);function Q(t){let n=a.current?.getTextarea();if(!n)return;let o,s;if(r){let B=r.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(o=l.slice(0,r.start)+B+l.slice(r.end),r.kind==="at")R?.(t.payload);s=r.start+B.length}else if(i)o=`${l.length===0||l.endsWith(`
|
|
2
|
-
`)?l:`${l}
|
|
3
|
-
`}/${t.payload} `,s=o.length,f?.(!1);else return;z.textInput.setInput(o),requestAnimationFrame(()=>{n.focus(),n.setSelectionRange(s,s)})}v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=(o)=>{if(!m)return;if(a.current?.isComposing()||o.isComposing||o.keyCode===229)return;if(o.key==="ArrowDown")o.preventDefault(),o.stopPropagation(),L((s)=>d.length===0?0:Math.min(d.length-1,s+1));else if(o.key==="ArrowUp")o.preventDefault(),o.stopPropagation(),L((s)=>Math.max(0,s-1));else if(o.key==="Enter"||o.key==="Tab"){o.preventDefault(),o.stopPropagation();let s=d[b];if(s)Q(s)}else if(o.key==="Escape")if(o.preventDefault(),o.stopPropagation(),r)U(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",n,!0),()=>t.removeEventListener("keydown",n,!0)});let[k,G]=g(null),[S,nt]=g(null),T=ut(()=>{let t=c?.current;if(!t)return;let n=t.getBoundingClientRect();G({left:n.left,width:n.width,bottom:window.innerHeight-n.top+8})},[c]);if(Y(()=>{if(!m){G(null);return}T()},[m,T]),Y(()=>{let t=c?.current;if(!m||!t||!S)return;return rt(t,S,T,{animationFrame:!0})},[m,S,c,T]),!m||c&&!k)return null;let w=r?r.kind==="slash":i,ot=w?st:it,J=p("div",{ref:nt,className:c?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:c&&k?{left:k.left,width:k.width,bottom:k.bottom}:void 0,children:E("div",{ref:V,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[d.length===0&&w&&p("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:F}),d.length===0&&!w&&h&&p("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:y?.query===x&&y.search===u?h.empty:h.loading}),d.map((t,n)=>E(e,{type:"button",variant:"ghost",role:"option","aria-selected":n===b,"data-idx":n,onMouseDown:(o)=>{o.preventDefault(),Q(t)},onMouseEnter:()=>L(n),className:X("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",n===b&&"bg-muted"),children:[p(ot,{className:X("size-4 shrink-0",w?"text-blue-500":"text-muted-foreground")}),p("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&p("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),w&&D&&E(ct,{children:[p(j,{}),E(e,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[p(lt,{"data-icon":"inline-start"}),D.label]})]})]})});return c?at(J,document.body):J}
|
|
4
|
-
export{Tn};
|
package/dist/chunk-6s7z09b0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-wpdn3rx8.js";import{s}from"./chunk-96x0d2vd.js";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 n,jsxs as k}from"react/jsx-runtime";function gn({ref:p,value:o,onChange:d,onFind:i,onClose:a,placeholder:m,autoFocusOpen:l=!0,prevTitle:c,nextTitle:u,className:v}){let r=E(null);N(p,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!l)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus({preventScroll:!0}),t.select()},[l]);let f=!o;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",v),children:[n(s,{ref:r,value:o,onChange:(t)=>d(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),a();return}if(t.key==="Enter"){if(t.preventDefault(),o)i(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!0),title:c?`${c} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!1),title:u?`${u} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:a,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
|
|
2
|
-
export{gn};
|
package/dist/chunk-6wqbetcx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{PreviewCard as i}from"@base-ui/react/preview-card";import{cn as s}from"cn";import{jsx as r}from"react/jsx-runtime";function Pe({...e}){return r(i.Root,{"data-slot":"hover-card",...e})}function Ne({...e}){return r(i.Trigger,{"data-slot":"hover-card-trigger",...e})}function Me({className:e,side:o="bottom",sideOffset:t=4,align:a="center",alignOffset:d=4,...n}){return r(i.Portal,{"data-slot":"hover-card-portal",children:r(i.Positioner,{align:a,alignOffset:d,side:o,sideOffset:t,className:"isolate z-50",children:r(i.Popup,{"data-slot":"hover-card-content",className:s("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})})})}export{Pe,Ne,Me};
|
package/dist/chunk-74824tng.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-q6km9nha.js";import{V,Dt,W}from"./chunk-jdjk6tf4.js";import{e}from"./chunk-wpdn3rx8.js";import{he,ve,xe,ye}from"./chunk-d5ga13n0.js";import{yt,o,C}from"./chunk-0ss92kxr.js";import{st}from"./chunk-2cbya1f5.js";import{vt}from"./chunk-3ebdnbcj.js";import{rt,it}from"./chunk-xfx689xm.js";import{at}from"./chunk-jfb6a7tz.js";import{LockIcon as g,UnplugIcon as A}from"lucide-react";import{useMemo as R}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function hr({host:t,client:l,...c}){let s=R(()=>t.openDiff?t:{...t,openDiff:rt},[t]);return i(yt,{host:s,client:l,children:[r(E,{...c}),!t.openDiff&&r(it,{})]})}function E({session:t,header:l,overlay:c,timeline:s,composer:y,readOnlyActions:x,welcome:u,children:N,rootRef:w}){let{host:d,client:h}=o(),{t:a}=d,p=n((m)=>m.connection==="ready"),f=n((m)=>m.historyPages[t.id]?.error),v=()=>C(d,h.open(t.id,t.cwd)),D=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:w,className:"flex h-full min-h-0 flex-col",children:[l,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[c,p&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(V,{children:[r(A,{}),r(Dt,{children:a("conversation.stopped")}),r(W,{children:r(e,{size:"sm",variant:"outline",onClick:v,children:a("conversation.reconnect")})})]})}),D?u??r(he,{className:"flex-1",children:i(ve,{children:[r(xe,{className:"text-[28px] font-normal",children:a("conversation.welcomeTitle")}),r(ye,{children:a("conversation.welcomeDescription")})]})}):r(vt,{session:t,timeline:s}),r(at,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(V,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(g,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(Dt,{children:a("conversation.readOnlyTitle")}),r(W,{children:a("conversation.readOnlyDescription")}),f&&r("p",{role:"alert",className:"text-destructive break-words",children:f})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(e,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:v,disabled:!p||t.restoring,children:a(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),x]})]})}):y??r(st,{session:t})]}),N]})}
|
|
2
|
-
export{hr};
|
package/dist/chunk-7ap638hx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-kmhwwzga.js";import{t}from"./chunk-q6km9nha.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function En({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(G,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
-
export{En};
|
package/dist/chunk-7jdjdnh6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Dn}from"./chunk-sf6ze845.js";import{o,C}from"./chunk-0ss92kxr.js";import{N,c}from"./chunk-n1tjf64a.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as r}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var O=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),u={"read-only":y,"workspace-write":r,agent:O,"agent-full-access":S},b={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function ut({sessionId:g,options:m,disabled:f,onConfigChange:l}){let{host:p,client:h}=o(),{t:a}=p,s=c(m,"mode");if(!s)return null;let n=s.currentValue,d=N(s).map((e)=>{let i=b[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),I=d.find((e)=>e.value===n),M=u[n]??r,v=(e)=>{if(e===n)return;C(p,l?l(s.configId,e):h.setConfig(g,s.configId,e))};return t(Dn,{value:n,warning:n==="agent-full-access",currentName:I?.name??n,icon:t(M,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:f,label:a("composer.switchPermissionMode"),onValueChange:v,options:d.map((e)=>{let i=u[e.value]??r,k=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":k?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
|
|
2
|
-
export{ut};
|
package/dist/chunk-7mr1zajc.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-wpdn3rx8.js";import{v}from"./chunk-kjtd3wc3.js";import{Y,A}from"./chunk-0nkvfecf.js";import{k}from"./chunk-da6d6wze.js";import{useEffect as R,useId as N,useRef as w}from"react";import{jsx as l,jsxs as p,Fragment as _}from"react/jsx-runtime";function u(n){return n!==null&&typeof n==="object"&&!Array.isArray(n)}function h(n){if(!u(n)||!u(n.codex))return[];let r=n.codex,i=r.questions;if(r.delivery!=="async"||!Array.isArray(i))return[];if(!i.every((t)=>u(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((c)=>typeof c==="string"))))return[];return i}function dn(n,r){return JSON.stringify(["request_user_input_async",n,r])}function er(n){return{selected:n.options?.length?0:null,text:""}}function xt(n,r){return r.selected===null?r.text:n.options?.[r.selected]??""}function tr(n){return`<send_user_message_question_reply>
|
|
2
|
-
${JSON.stringify([n])}
|
|
3
|
-
</send_user_message_question_reply>`}function un(n){if(!u(n)||!u(n.codex))return[];let r=n.codex;return(Array.isArray(r.questionReplyParts)?r.questionReplyParts.map((t)=>u(t)?{...t,answer:t.text}:t):[r.questionReply]).filter((t)=>u(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:c,answer:m})=>({questionItemId:t,question:c,answer:m}))}function nr({question:n,draft:r,status:i,answer:t,error:c,onChange:m,onSubmit:f,onSkip:b,t:a}){let y=N(),g=w(!1),o=w(null);R(()=>()=>{if(o.current!==null)cancelAnimationFrame(o.current)},[]);let d=i==="pending",Q=i==="answered"||i==="skipped";return p("section",{"aria-labelledby":`${y}-title`,className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-4 text-card-foreground",children:[l("h3",{id:`${y}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:n.title}),Q?l("p",{className:"text-sm whitespace-pre-wrap",children:i==="answered"?t:a("asyncQuestion.skipped")}):p(_,{children:[(n.options?.length??0)>0&&p(Y,{"aria-labelledby":`${y}-title`,disabled:!d,value:r.selected===null?"other":String(r.selected),onValueChange:(s)=>m({...r,selected:s==="other"?null:Number(s)}),children:[n.options?.map((s,x)=>p(v,{className:"flex items-start gap-2 text-sm",children:[l(A,{value:String(x)}),l("span",{className:"whitespace-pre-wrap",children:s})]},x)),p(v,{className:"flex items-center gap-2 text-sm",children:[l(A,{value:"other"}),a("asyncQuestion.other")]})]}),l(k,{rows:1,className:"min-h-0 resize-none",onCompositionStart:()=>{if(o.current!==null)cancelAnimationFrame(o.current);o.current=null,g.current=!0},onCompositionEnd:()=>{if(g.current=!1,o.current!==null)cancelAnimationFrame(o.current);o.current=requestAnimationFrame(()=>{o.current=null})},onKeyDown:(s)=>{if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||g.current||o.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),d&&xt(n,{...r,text:s.currentTarget.value}).trim().length>0)f()},"aria-label":a("asyncQuestion.answer"),placeholder:a("asyncQuestion.answer"),value:r.text,readOnly:!d,onChange:(s)=>m({selected:null,text:s.target.value})}),c&&l("p",{role:"alert",className:"text-sm text-destructive",children:c}),p("div",{className:"flex flex-wrap items-center gap-2",children:[l(e,{size:"sm",disabled:!d||xt(n,r).trim().length===0,onClick:f,children:a(i==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),l(e,{size:"sm",variant:"ghost",disabled:!d,onClick:b,children:a("asyncQuestion.skip")}),(i==="closed"||i==="unavailable")&&l("span",{role:"status",className:"text-xs text-muted-foreground",children:a(`asyncQuestion.${i}`)})]})]})]})}
|
|
4
|
-
export{h,dn,er,xt,tr,un,nr};
|
package/dist/chunk-7wyrcphh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cn as t}from"cn";import{jsx as n}from"react/jsx-runtime";function Pt({className:e,...o}){return n("div",{"data-slot":"skeleton",className:t("animate-pulse rounded-md bg-muted",e),...o})}export{Pt};
|
package/dist/chunk-88cfz41t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function fn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function It(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function ae(t){return t.type==="array"}function Ke(t){return(ae(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{fn,It,ae,Ke};
|
package/dist/chunk-8bfnjqkg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_e}from"./chunk-cazdmcwd.js";import{G,Gn}from"./chunk-kmhwwzga.js";import{t}from"./chunk-q6km9nha.js";import{zn}from"./chunk-9j609g4n.js";import{ue,me,pe}from"./chunk-ea3582qy.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{jsx as o,jsxs as n,Fragment as h}from"react/jsx-runtime";var f=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Bn({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=_e(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(h,{children:[a&&o(G,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(ue,{children:[o(me,{render:o(Gn,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(pe,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(zn,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
|
|
2
|
-
export{Bn};
|