@alwith/module-chat 0.6.16 → 0.6.18
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/assets/provider-catalog.json +1 -0
- package/dist/activity-host.js +1 -1
- package/dist/agent/application-client.d.ts +30 -0
- package/dist/agent/application-client.js +1 -0
- package/dist/agent/client.d.ts +125 -0
- package/dist/agent/client.js +1 -0
- package/dist/agent/custom-model-effort.d.ts +4 -0
- package/dist/agent/custom-model-effort.js +1 -0
- package/dist/agent/fork-title.d.ts +1 -0
- package/dist/agent/fork-title.js +1 -0
- package/dist/agent/image-request.d.ts +6 -0
- package/dist/agent/image-request.js +1 -0
- package/dist/agent/image-tools.d.ts +9 -0
- package/dist/agent/image-tools.js +1 -0
- package/dist/agent/input-config.d.ts +17 -0
- package/dist/agent/input-config.js +1 -0
- package/dist/agent/input-modes/chat.d.ts +10 -0
- package/dist/agent/input-modes/chat.js +1 -0
- package/dist/agent/input-modes/execution-meta.d.ts +1 -0
- package/dist/agent/input-modes/execution-meta.js +1 -0
- package/dist/agent/input-modes/image-context.d.ts +1 -0
- package/dist/agent/input-modes/image-context.js +1 -0
- package/dist/agent/input-modes/image.d.ts +14 -0
- package/dist/agent/input-modes/image.js +1 -0
- package/dist/agent/input-modes/index.d.ts +46 -0
- package/dist/agent/input-modes/index.js +1 -0
- package/dist/agent/project-path.d.ts +2 -0
- package/dist/agent/project-path.js +1 -0
- package/dist/agent/request-error.d.ts +3 -0
- package/dist/agent/request-error.js +1 -0
- package/dist/agent/session-list-refresh.d.ts +2 -0
- package/dist/agent/session-list-refresh.js +1 -0
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +1 -1
- package/dist/application-tools.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-zq18ffn0.js → chunk-04c5k3qr.js} +2 -2
- package/dist/chunk-04frqm59.js +2 -0
- package/dist/chunk-0rnh8mhs.js +2 -0
- package/dist/chunk-0rte5dh6.js +2 -0
- package/dist/{chunk-11cbk1je.js → chunk-16db8fh2.js} +2 -2
- package/dist/chunk-1a56svgj.js +2 -0
- package/dist/{chunk-2ss8m0ja.js → chunk-1gv49jt9.js} +4 -4
- package/dist/chunk-1hmt6w4w.js +2 -0
- package/dist/chunk-1qjhvkg0.js +2 -0
- package/dist/{chunk-4qghztvg.js → chunk-1r4y3pfg.js} +2 -2
- package/dist/{chunk-11z072sz.js → chunk-1vtvcar6.js} +2 -2
- package/dist/{chunk-veb90k24.js → chunk-1ycyexae.js} +2 -2
- package/dist/{chunk-bnpwhf5c.js → chunk-23r426sm.js} +2 -2
- package/dist/{chunk-97tgc9ym.js → chunk-26w51q10.js} +2 -2
- package/dist/chunk-29s4mnfw.js +2 -0
- package/dist/{chunk-y1fpm5r2.js → chunk-2a4pq98d.js} +2 -2
- package/dist/chunk-2c2a1wvg.js +2 -0
- package/dist/{chunk-pvd09dx5.js → chunk-2cfhvb3k.js} +2 -2
- package/dist/{chunk-9xhw5zmq.js → chunk-2dm51ksz.js} +2 -2
- package/dist/{chunk-x0h0g1ma.js → chunk-2easwd1n.js} +2 -2
- package/dist/chunk-2ee48v0d.js +3 -0
- package/dist/{chunk-0yqb54zg.js → chunk-2nb1475h.js} +2 -2
- package/dist/{chunk-qtft8hnb.js → chunk-2zy75522.js} +2 -2
- package/dist/{chunk-t96rf4pg.js → chunk-38bpmgjd.js} +2 -2
- package/dist/chunk-38hvm5ca.js +2 -0
- package/dist/{chunk-9eme3n5c.js → chunk-3a3ecayr.js} +2 -2
- package/dist/{chunk-tz8wmvs9.js → chunk-3chhwwwy.js} +2 -2
- package/dist/chunk-3g9qb7vq.js +2 -0
- package/dist/chunk-3gnn1v68.js +2 -0
- package/dist/{chunk-sct2h2dm.js → chunk-3hjcpcnv.js} +2 -2
- package/dist/{chunk-ehmdmfs5.js → chunk-3rmwcar7.js} +2 -2
- package/dist/chunk-41yz7txv.js +2 -0
- package/dist/{chunk-hqykt9hr.js → chunk-4p0zk3mj.js} +2 -2
- package/dist/{chunk-620q6hmz.js → chunk-56rx2rmj.js} +2 -2
- package/dist/{chunk-9072bnjm.js → chunk-5aqqqsa3.js} +2 -2
- package/dist/chunk-5bmxngnx.js +2 -0
- package/dist/chunk-5hk3k14h.js +2 -0
- package/dist/{chunk-7919s3et.js → chunk-5s85tvas.js} +2 -2
- package/dist/chunk-61awcdaq.js +7 -0
- package/dist/{chunk-4gq7ye1a.js → chunk-62qtrk0p.js} +2 -2
- package/dist/chunk-6c18ag8t.js +2 -0
- package/dist/chunk-6dnb0t84.js +2 -0
- package/dist/chunk-6ehhap9k.js +2 -0
- package/dist/{chunk-5ymq8y72.js → chunk-6my4ybpw.js} +3 -3
- package/dist/chunk-6tj5e7fc.js +2 -0
- package/dist/chunk-6w5gfh01.js +2 -0
- package/dist/chunk-6wkcqhkk.js +2 -0
- package/dist/{chunk-8weq6t3q.js → chunk-6xap6hvz.js} +2 -2
- package/dist/{chunk-hn6f6yrp.js → chunk-78vckhxt.js} +2 -2
- package/dist/chunk-7ac4g54f.js +3 -0
- package/dist/chunk-7jk8s061.js +2 -0
- package/dist/chunk-7sp1yqfg.js +2 -0
- package/dist/chunk-814h2ja2.js +3 -0
- package/dist/chunk-81jejgvs.js +2 -0
- package/dist/{chunk-7cv512vy.js → chunk-85tzkdsj.js} +2 -2
- package/dist/{chunk-5ygdb72w.js → chunk-86821qec.js} +2 -2
- package/dist/{chunk-vextf7ba.js → chunk-86r89vrt.js} +2 -2
- package/dist/{chunk-aaqk0jrt.js → chunk-8hygfx41.js} +2 -2
- package/dist/{chunk-3yq0a0f1.js → chunk-8kd74ng1.js} +2 -2
- package/dist/chunk-8ngg5vs4.js +4 -0
- package/dist/{chunk-4hz2ax5w.js → chunk-8q9hq3mg.js} +2 -2
- package/dist/{chunk-82xjggwn.js → chunk-8v53bkyr.js} +2 -2
- package/dist/{chunk-m2x1s408.js → chunk-8y60kexq.js} +2 -2
- package/dist/{chunk-5wsyenq9.js → chunk-8y706gz3.js} +2 -2
- package/dist/{chunk-dcevaazr.js → chunk-933h9gnv.js} +2 -2
- package/dist/{chunk-bsra0akd.js → chunk-9q6hz47j.js} +2 -2
- package/dist/chunk-a71j2n86.js +2 -0
- package/dist/chunk-abgdqy92.js +2 -0
- package/dist/{chunk-adc8e01w.js → chunk-ase4ejxz.js} +2 -2
- package/dist/{chunk-gbc31gbf.js → chunk-at75m9hq.js} +2 -2
- package/dist/chunk-ayademz2.js +2 -0
- package/dist/{chunk-x6f51rt2.js → chunk-ayhxrzsq.js} +2 -2
- package/dist/chunk-b42vv8f2.js +2 -0
- package/dist/{chunk-2pahy4hs.js → chunk-b4kh5nns.js} +2 -2
- package/dist/{chunk-trh02gwn.js → chunk-bane0xc8.js} +2 -2
- package/dist/{chunk-ha5xrc0a.js → chunk-bej9z041.js} +2 -2
- package/dist/chunk-bfwft1b8.js +2 -0
- package/dist/chunk-bv14x0e8.js +6 -0
- package/dist/chunk-bydxp3zj.js +7 -0
- package/dist/chunk-c0mpr4dh.js +2 -0
- package/dist/{chunk-y7n8m9st.js → chunk-c1pvvk0x.js} +2 -2
- package/dist/chunk-c8wdf20g.js +2 -0
- package/dist/chunk-ckjq6690.js +4 -0
- package/dist/{chunk-4dabfz24.js → chunk-csfqkzmr.js} +3 -3
- package/dist/{chunk-segftqt4.js → chunk-cvx7r35k.js} +2 -2
- package/dist/chunk-d2m4xmt4.js +2 -0
- package/dist/{chunk-vkc8ssbv.js → chunk-d8f6avcz.js} +2 -2
- package/dist/{chunk-wv127h6d.js → chunk-df9aqj1m.js} +2 -2
- package/dist/chunk-djd3sjp9.js +2 -0
- package/dist/{chunk-3174p320.js → chunk-dtgbgwby.js} +2 -2
- package/dist/{chunk-00z352ph.js → chunk-dxsjz3re.js} +2 -2
- package/dist/{chunk-qnbr2cmg.js → chunk-e04g26qm.js} +2 -2
- package/dist/chunk-e2qjbqq2.js +2 -0
- package/dist/{chunk-3karja82.js → chunk-e7ndpy02.js} +2 -2
- package/dist/{chunk-tjfjvzv5.js → chunk-easm0z49.js} +2 -2
- package/dist/chunk-ecaedwda.js +2 -0
- package/dist/{chunk-9hmqa3cs.js → chunk-ecdjjnbb.js} +2 -2
- package/dist/chunk-een4e2tr.js +2 -0
- package/dist/chunk-ehpaw624.js +4 -0
- package/dist/chunk-evygj5ka.js +2 -0
- package/dist/{chunk-netp71kb.js → chunk-f4h84pav.js} +2 -2
- package/dist/{chunk-05eg5p11.js → chunk-f6zpqrg3.js} +2 -2
- package/dist/{chunk-1e7gk302.js → chunk-f73x23f9.js} +2 -2
- package/dist/chunk-f7m5zdkp.js +2 -0
- package/dist/chunk-f89s462k.js +3 -0
- package/dist/{chunk-7nehhgej.js → chunk-ffs5nkt0.js} +2 -2
- package/dist/chunk-fhjk81r9.js +2 -0
- package/dist/{chunk-3h3cmjh2.js → chunk-g61xf0ma.js} +2 -2
- package/dist/{chunk-2ptyqcf3.js → chunk-g7cc7gdn.js} +2 -2
- package/dist/chunk-g8w06bdx.js +2 -0
- package/dist/{chunk-fvz27k62.js → chunk-gawrkkbf.js} +2 -2
- package/dist/{chunk-41v0g6sw.js → chunk-gdavg2hq.js} +2 -2
- package/dist/{chunk-gxjg94y5.js → chunk-gea1q14z.js} +2 -2
- package/dist/chunk-ggddhx5x.js +2 -0
- package/dist/chunk-gnctm097.js +2 -0
- package/dist/{chunk-kcra1mgf.js → chunk-gvqvw7ms.js} +2 -2
- package/dist/{chunk-twx75z08.js → chunk-gy4h86mw.js} +2 -2
- package/dist/chunk-gyw21vnb.js +2 -0
- package/dist/{chunk-ex20n22v.js → chunk-heqa4swe.js} +2 -2
- package/dist/{chunk-b9q9d2jh.js → chunk-hygvdjq6.js} +3 -3
- package/dist/{chunk-c05dxz9x.js → chunk-hzhcajx1.js} +2 -2
- package/dist/{chunk-vqkwvrxc.js → chunk-jca8s47n.js} +2 -2
- package/dist/{chunk-fzze5xcw.js → chunk-jg4c3zg4.js} +2 -2
- package/dist/{chunk-hwvr7b0j.js → chunk-jm6y0edw.js} +2 -2
- package/dist/chunk-jq6qs3s6.js +2 -0
- package/dist/{chunk-qdgsg6v4.js → chunk-k4xsxxy7.js} +2 -2
- package/dist/chunk-k99r1r38.js +2 -0
- package/dist/{chunk-64wzvf7k.js → chunk-kh3af9mq.js} +2 -2
- package/dist/{chunk-k86843av.js → chunk-kj3a1k2q.js} +2 -2
- package/dist/chunk-kj3t4mqf.js +2 -0
- package/dist/{chunk-8djjctdj.js → chunk-kk9dbwd1.js} +2 -2
- package/dist/chunk-kv1w4jx4.js +2 -0
- package/dist/chunk-kztrgv9y.js +2 -0
- package/dist/{chunk-6es8tgxc.js → chunk-m8pkmbtf.js} +2 -2
- package/dist/{chunk-tkbs5ev1.js → chunk-m944rgn9.js} +2 -2
- package/dist/{chunk-9pcx42v8.js → chunk-mg7kraha.js} +2 -2
- package/dist/chunk-mhv75thj.js +0 -0
- package/dist/chunk-mqpkm974.js +2 -0
- package/dist/chunk-mr2wcd24.js +2 -0
- package/dist/{chunk-nszq1xrj.js → chunk-ms0h8x63.js} +2 -2
- package/dist/{chunk-a1k3ffay.js → chunk-n0q8e6sq.js} +2 -2
- package/dist/{chunk-fd72zzqm.js → chunk-n3sm0834.js} +3 -3
- package/dist/chunk-n6dqwdg5.js +2 -0
- package/dist/{chunk-p0d6rr6q.js → chunk-n8v6cdq3.js} +2 -2
- package/dist/chunk-nh56sb8e.js +4 -0
- package/dist/{chunk-twbeapwa.js → chunk-nmd5x501.js} +2 -2
- package/dist/chunk-npvcy4tw.js +2 -0
- package/dist/{chunk-j6r44m9g.js → chunk-nrzkzvr0.js} +2 -2
- package/dist/{chunk-ct0xqakr.js → chunk-p14j9ckg.js} +2 -2
- package/dist/chunk-p2tm6tv8.js +1 -0
- package/dist/chunk-p781sb6h.js +2 -0
- package/dist/chunk-pdmayjan.js +2 -0
- package/dist/chunk-pk931bpm.js +2 -0
- package/dist/{chunk-1xaskqdj.js → chunk-pxv38ttf.js} +2 -2
- package/dist/{chunk-yaxsff9s.js → chunk-q01vmp9m.js} +2 -2
- package/dist/{chunk-wyndwb68.js → chunk-q46z21zs.js} +2 -2
- package/dist/{chunk-qwtmwj5m.js → chunk-q5qqhqw4.js} +2 -2
- package/dist/chunk-q9mh8x4r.js +2 -0
- package/dist/chunk-q9y0wjwp.js +2 -0
- package/dist/{chunk-gk0tq3n9.js → chunk-qdcznn2t.js} +2 -2
- package/dist/chunk-qejm75d7.js +2 -0
- package/dist/{chunk-d924by6g.js → chunk-qk1yqepm.js} +2 -2
- package/dist/chunk-r6c9r5yy.js +2 -0
- package/dist/chunk-r6ns1457.js +2 -0
- package/dist/chunk-r8expjyy.js +4 -0
- package/dist/{chunk-mgsxsaj1.js → chunk-r8pm74zf.js} +2 -2
- package/dist/{chunk-f2jc13bq.js → chunk-rb4p3h5b.js} +2 -2
- package/dist/{chunk-j5njgy7p.js → chunk-rh2yx0xq.js} +2 -2
- package/dist/{chunk-n13y99dj.js → chunk-rkejggyx.js} +2 -2
- package/dist/{chunk-t94rfs41.js → chunk-rr9kc3n8.js} +2 -2
- package/dist/{chunk-q2z9w661.js → chunk-rtbpfasb.js} +2 -2
- package/dist/chunk-rx84h0c2.js +2 -0
- package/dist/chunk-s2706gae.js +2 -0
- package/dist/chunk-s6b28p84.js +2 -0
- package/dist/{chunk-qm1z1zcw.js → chunk-s6y31dcb.js} +2 -2
- package/dist/{chunk-wdacgfwp.js → chunk-s88eyv24.js} +2 -2
- package/dist/{chunk-ev9tkjgy.js → chunk-s8djv2dy.js} +3 -3
- package/dist/chunk-sgbn37kz.js +2 -0
- package/dist/{chunk-vypkwd0x.js → chunk-swt6dntp.js} +2 -2
- package/dist/{chunk-xtwpbvdx.js → chunk-t9xkg3pk.js} +2 -2
- package/dist/{chunk-xbp4r3n4.js → chunk-tc3t2sgb.js} +3 -3
- package/dist/chunk-tcs1a1hk.js +2 -0
- package/dist/{chunk-9z9jffth.js → chunk-tec9yhsm.js} +2 -2
- package/dist/{chunk-csgkwny6.js → chunk-tj4b0s68.js} +2 -2
- package/dist/{chunk-mhxgws9c.js → chunk-tzczzqde.js} +2 -2
- package/dist/chunk-v8x5atmn.js +2 -0
- package/dist/chunk-vbbndjfd.js +2 -0
- package/dist/{chunk-7h3f7s97.js → chunk-vgscp6dr.js} +5 -5
- package/dist/{chunk-bqbpded2.js → chunk-vhxr0c4c.js} +2 -2
- package/dist/chunk-vvkp0jqa.js +2 -0
- package/dist/{chunk-gee5kh24.js → chunk-w1yrsbw1.js} +2 -2
- package/dist/chunk-wf7kfk3p.js +2 -0
- package/dist/{chunk-h3xn4d48.js → chunk-wjd2hpnd.js} +2 -2
- package/dist/chunk-wkrnbk0p.js +2 -0
- package/dist/chunk-wnydsth6.js +2 -0
- package/dist/{chunk-rvmbvv03.js → chunk-wxh1m3gg.js} +2 -2
- package/dist/chunk-x1mzrhtd.js +2 -0
- package/dist/{chunk-sg681jnt.js → chunk-x20dy83s.js} +4 -4
- package/dist/{chunk-9rf3qecr.js → chunk-xykmskka.js} +2 -2
- package/dist/chunk-y6p8xspr.js +2 -0
- package/dist/{chunk-vnr9rqs6.js → chunk-y8fmawc6.js} +3 -3
- package/dist/chunk-yc4cdg65.js +2 -0
- package/dist/{chunk-7eqtvqrn.js → chunk-ykz0h1r0.js} +2 -2
- package/dist/chunk-ymgc4317.js +2 -0
- package/dist/{chunk-z38xf1rw.js → chunk-z1qcgb6b.js} +3 -3
- package/dist/{chunk-d1n4w7hn.js → chunk-z6e4ydvm.js} +2 -2
- package/dist/chunk-ztrfygh5.js +2 -0
- package/dist/client.d.ts +9 -30
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.d.ts +9 -0
- package/dist/codex/artifact-links.js +1 -0
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.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/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.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/prompt-history.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/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.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/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/conversation/types.d.ts +1 -0
- package/dist/desktop/desktop-composer.d.ts +13 -0
- package/dist/desktop/desktop-composer.js +1 -0
- package/dist/desktop/desktop.d.ts +7 -0
- package/dist/desktop/desktop.js +1 -0
- package/dist/desktop/draft-model-select.d.ts +10 -0
- package/dist/desktop/draft-model-select.js +1 -0
- package/dist/desktop/load-image.d.ts +1 -0
- package/dist/desktop/load-image.js +1 -0
- package/dist/desktop/model-catalog.d.ts +10 -0
- package/dist/desktop/model-catalog.js +1 -0
- package/dist/desktop/model-recovery.d.ts +10 -0
- package/dist/desktop/model-recovery.js +1 -0
- package/dist/desktop/model-settings-action.d.ts +2 -0
- package/dist/desktop/model-settings-action.js +1 -0
- package/dist/desktop/native-file-drop.d.ts +8 -0
- package/dist/desktop/native-file-drop.js +1 -0
- package/dist/generated/commands.d.ts +103 -48
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.d.ts +4 -0
- package/dist/lib/chat-path.js +1 -0
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-parser.worker.js +39 -38
- 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/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.d.ts +210 -0
- package/dist/locales.js +1 -1
- package/dist/mermaid/diagram.d.ts +3 -0
- package/dist/mermaid/diagram.js +1 -0
- package/dist/mermaid/export.d.ts +6 -0
- package/dist/mermaid/export.js +1 -0
- package/dist/mermaid/index.d.ts +1 -0
- package/dist/mermaid/index.js +1 -0
- package/dist/mermaid/preview.d.ts +11 -0
- package/dist/mermaid/preview.js +1 -0
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.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/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.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-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.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/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.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-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.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-image-references.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.d.ts +3 -0
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.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.d.ts +1 -0
- 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/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.d.ts +4 -0
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.d.ts +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/darwin-arm64/THIRD_PARTY_NOTICES.md +18 -18
- package/native/darwin-arm64/artifact.json +1 -1
- package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
- package/native/darwin-arm64/licenses/zstd-sys-2.1.3+zstd.1.5.7/LICENSE.BSD-2-Clause +29 -0
- package/native/win32-x64/THIRD_PARTY_NOTICES.md +16 -16
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/native/win32-x64/licenses/zstd-sys-2.1.3+zstd.1.5.7/LICENSE.BSD-2-Clause +29 -0
- package/package.json +13 -7
- package/dist/chunk-0307kp7e.js +0 -2
- package/dist/chunk-04vnhbvc.js +0 -2
- package/dist/chunk-07fajk18.js +0 -2
- package/dist/chunk-1renytb3.js +0 -3
- package/dist/chunk-2drcx544.js +0 -2
- package/dist/chunk-2sxxr6j8.js +0 -2
- package/dist/chunk-2tc9kn50.js +0 -2
- package/dist/chunk-3t5cksae.js +0 -2
- package/dist/chunk-4jy404m1.js +0 -2
- package/dist/chunk-4n4gap45.js +0 -2
- package/dist/chunk-4zz6dnqa.js +0 -2
- package/dist/chunk-5m45z6qm.js +0 -4
- package/dist/chunk-6xds0dkq.js +0 -2
- package/dist/chunk-7hwg9r4y.js +0 -2
- package/dist/chunk-856bck34.js +0 -2
- package/dist/chunk-95n1cpnj.js +0 -2
- package/dist/chunk-9h77fcpn.js +0 -2
- package/dist/chunk-9rvf1am9.js +0 -2
- package/dist/chunk-avpdhhdz.js +0 -4
- package/dist/chunk-f0kgxjp1.js +0 -2
- package/dist/chunk-fjk1g303.js +0 -2
- package/dist/chunk-fjseqvmx.js +0 -1
- package/dist/chunk-gez0k8zs.js +0 -7
- package/dist/chunk-gjfhvaxn.js +0 -2
- package/dist/chunk-h4xxyhpn.js +0 -4
- package/dist/chunk-hmet2d96.js +0 -2
- package/dist/chunk-j9snfndd.js +0 -2
- package/dist/chunk-jz6zecb7.js +0 -2
- package/dist/chunk-kp7qa98m.js +0 -2
- package/dist/chunk-ktbszx6r.js +0 -2
- package/dist/chunk-ncwf6pjj.js +0 -3
- package/dist/chunk-nh9gk065.js +0 -2
- package/dist/chunk-nxj8m5bm.js +0 -2
- package/dist/chunk-pn5ghg65.js +0 -2
- package/dist/chunk-pwcw4zp2.js +0 -2
- package/dist/chunk-q1kstf4c.js +0 -2
- package/dist/chunk-q3vvg0de.js +0 -2
- package/dist/chunk-qkw2nhsr.js +0 -4
- package/dist/chunk-rncx5gxz.js +0 -2
- package/dist/chunk-s5c2ha8t.js +0 -2
- package/dist/chunk-sp411z4y.js +0 -7
- package/dist/chunk-sqm2vsf5.js +0 -2
- package/dist/chunk-t4dsmqdq.js +0 -2
- package/dist/chunk-thhtbvj1.js +0 -2
- package/dist/chunk-tvbgjmtw.js +0 -3
- package/dist/chunk-v0y5fepf.js +0 -3
- package/dist/chunk-vctq22tq.js +0 -2
- package/dist/chunk-vepv6ktb.js +0 -2
- package/dist/chunk-vjmgh1q9.js +0 -2
- package/dist/chunk-vmg3evhm.js +0 -2
- package/dist/chunk-w22ch68s.js +0 -2
- package/dist/chunk-xmks1g9y.js +0 -2
- package/dist/chunk-xmpaqxer.js +0 -2
- package/dist/chunk-xqwbn2ph.js +0 -2
- package/dist/chunk-y6kxhkjm.js +0 -2
- package/dist/chunk-yy1pm240.js +0 -2
- package/dist/chunk-z7ehwkcq.js +0 -2
- package/dist/chunk-zah0npdy.js +0 -2
- package/dist/chunk-zcwsc0gx.js +0 -2
- /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{const-oid-0.10.2 → const-oid-0.10.3}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{const-oid-0.10.2 → const-oid-0.10.3}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{crc32fast-1.5.4 → crc32fast-1.5.5}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{crc32fast-1.5.4 → crc32fast-1.5.5}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{errno-0.3.14 → errno-0.3.15}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{errno-0.3.14 → errno-0.3.15}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{itoa-1.0.18 → itoa-1.0.19}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{itoa-1.0.18 → itoa-1.0.19}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{nix-0.31.3 → nix-0.32.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{rusqlite-0.42.0 → rusqlite-0.43.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{rustls-pki-types-1.15.1 → rustls-pki-types-1.16.0}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{rustls-pki-types-1.15.1 → rustls-pki-types-1.16.0}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{syn-3.0.9 → syn-3.0.10}/LICENSE-APACHE +0 -0
- /package/native/darwin-arm64/licenses/{syn-3.0.9 → syn-3.0.10}/LICENSE-MIT +0 -0
- /package/native/darwin-arm64/licenses/{zip-9.4.2 → zip-9.6.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{zstd-0.14.3 → zstd-0.14.4}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{zstd-safe-8.2.0 → zstd-safe-8.3.0}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{zstd-sys-2.1.2+zstd.1.5.7 → zstd-sys-2.1.3+zstd.1.5.7}/LICENSE +0 -0
- /package/native/darwin-arm64/licenses/{zstd-sys-2.1.2+zstd.1.5.7 → zstd-sys-2.1.3+zstd.1.5.7}/LICENSE.BSD-3-Clause +0 -0
- /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{const-oid-0.10.2 → const-oid-0.10.3}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{const-oid-0.10.2 → const-oid-0.10.3}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{crc32fast-1.5.4 → crc32fast-1.5.5}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{crc32fast-1.5.4 → crc32fast-1.5.5}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{itoa-1.0.18 → itoa-1.0.19}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{itoa-1.0.18 → itoa-1.0.19}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{rusqlite-0.42.0 → rusqlite-0.43.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{rustls-pki-types-1.15.1 → rustls-pki-types-1.16.0}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{rustls-pki-types-1.15.1 → rustls-pki-types-1.16.0}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{syn-3.0.9 → syn-3.0.10}/LICENSE-APACHE +0 -0
- /package/native/win32-x64/licenses/{syn-3.0.9 → syn-3.0.10}/LICENSE-MIT +0 -0
- /package/native/win32-x64/licenses/{zip-9.4.2 → zip-9.6.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{zstd-0.14.3 → zstd-0.14.4}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{zstd-safe-8.2.0 → zstd-safe-8.3.0}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{zstd-sys-2.1.2+zstd.1.5.7 → zstd-sys-2.1.3+zstd.1.5.7}/LICENSE +0 -0
- /package/native/win32-x64/licenses/{zstd-sys-2.1.2+zstd.1.5.7 → zstd-sys-2.1.3+zstd.1.5.7}/LICENSE.BSD-3-Clause +0 -0
package/dist/chunk-7hwg9r4y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ii}from"./chunk-y1fpm5r2.js";import{Ee,t,Re,o,Ct}from"./chunk-xqwbn2ph.js";import{cr,xt,ro,pr,mr}from"./chunk-sct2h2dm.js";import{vt}from"./chunk-f2jc13bq.js";import{Ei}from"./chunk-4dabfz24.js";import{$i}from"./chunk-7919s3et.js";import{Ki,qi}from"./chunk-fvz27k62.js";import{tr,nr}from"./chunk-t94rfs41.js";import{Vi}from"./chunk-9z9jffth.js";import{ji}from"./chunk-11cbk1je.js";import{rr}from"./chunk-qkw2nhsr.js";import{codexExtensionCapabilities as Ve,codexMessageError as Be,codexRetryNotice as qe,codexTurnError as Oe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as ve,useMemo as U,useRef as h,useState as _}from"react";import{flushSync as Te}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var ye=24;function Ke(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ue({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function _e({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=Re(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return H(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((W)=>{if(W.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function We(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:cr(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function gt(e){return i(Ee,{host:e.host,client:e.client,children:i($e,{...e})})}function $e({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:W=Ue}){let v=Re(),A=t(),T=o((n)=>n.historyNavigation[e.id]),xe=U(()=>e.commands.map((n)=>n.name),[e.commands]),c=We(e,T?.turns),L=c.at(-1)?.key,he=pr(e,c),y=e.state==="running"||e.state==="requires_action",D=U(()=>$i(c,T),[c,T]),Z=U(()=>D.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[D]),be=U(()=>S===void 0?[]:Ki(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,j=h(c);j.current=c;let[l,we]=_(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),Se=o((n)=>Ve(n.agent).sessionRetry),te=x!==void 0;H(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[ke,Pe]=_(!1),O=h(null),[Ie,ne]=_(!1),re=h(0),X=h({key:L,running:y});X.current={key:L,running:y};let[ie,F]=_(0),I=h(0),N=h(null);I.current=ie;let Ne=M(()=>{if(N.current!==null)N.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:G,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=ji(l,y,Ne),se=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&X.current.running&&X.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Ke({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,Te(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ae,y,l,c]);ve(()=>{if(!w||y)return;ue(),N.current=null,I.current=0,F(0)},[w,ue,y]);let J=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);H(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(Pe(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)J()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,J,l,e.restoring,T?.complete]),H(()=>{tr({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>nr(e.id),[e.id]);let He=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=j.current.find((m)=>m.user?.id===(n.messageId??n.id))??j.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ge(P)===n.nativeTurnId));if(!r?.user)return null;let p=r.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(r.key,(m)=>m.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(re.current===u)ne(!1)}},[v,e.id]),Ae=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);H(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=N.current,r=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,Te(()=>F(p)),p===0)N.current=null}if(p>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),H(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);ve(()=>{if(l===null)return;let n=c.at(-1),a=ce.current;if(ce.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))N.current=null,I.current=0,F(0),se()}else if(n.key!==a.key)G()},[se,w,y,G,l,e.turnEndedAt,c]);let Le=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(_e,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Ie})}let p=c.indexOf(r),f=r.key===he,m=mr(e,c,p),P=!f&&m.continued,K=r.key===L,q=r.errors.at(-1),de=q===void 0?null:Be(q),Q=q===void 0?null:ge(q),Ce=!e.subagent&&K&&!f&&k&&Se&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&Oe(de).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(r)??null,pe=s?.(r)??null,Me=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||f||me!==null||xt(r)||ro(r)||K&&(e.error!==null||e.lastStopReason==="cancelled"),fe=r.user===null?null:vt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(rr,{item:r.user,messageTime:fe,skillNames:xe}):V(r.user,fe)),Me&&i(Ei,{sessionId:e.id,turn:r,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?qe(e._meta)??void 0:void 0,retry:Ce?{turnId:Q,delaySeconds:Vi(c),run:(ze)=>v.retrySession(e.id,Q,ze)}:void 0,interrupted:ro(r)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:me}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(W,{viewportRef:we,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(Ii,{ref:O,entries:D,renderTurn:Le,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),ke&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:J,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(qi,{items:be,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ae,onRevealError:(n)=>Ct(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:G,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Fe,{})})]})}
|
|
2
|
-
export{gt};
|
package/dist/chunk-856bck34.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{we}from"./chunk-mgsxsaj1.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function yo({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:we(t)}):null}function xo({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(yo,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Mt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(xo,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{yo,xo,Mt};
|
package/dist/chunk-95n1cpnj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Tt}from"./chunk-9pcx42v8.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function Le(e){let t=r.get(e);if(!t)t=Tt(e),r.set(e,t);return t}function Pr({host:e,client:t,children:n}){let s=Le(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function c(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Fe(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function Ze(e){let t=Fe();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Le(Fe());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function De(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{Le,Pr,c,Fe,Ze,i,De};
|
package/dist/chunk-9h77fcpn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{me}from"./chunk-620q6hmz.js";function x(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function bt(e){if(!e.includes("app://"))return[];let n=me(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=x(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Sa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function gr(e,n){return[Sa(n),e.trim()].filter(Boolean).join(" ")}function fr(e,n){let r=Sa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
-
export{x,bt,Sa,gr,fr};
|
package/dist/chunk-9rvf1am9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function ei(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function An(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ve(t){return t.type==="array"}function mn(t){return(Ve(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{ei,An,Ve,mn};
|
package/dist/chunk-avpdhhdz.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-pwcw4zp2.js";import{Lt}from"./chunk-twx75z08.js";import{q,Ye,X,Dt}from"./chunk-q1kstf4c.js";import{At,Et}from"./chunk-07fajk18.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as J}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as j,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as D,FieldDescription as de,FieldLabel as O}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as W,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as H}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as Q}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function V(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(V(d));if(s.reportError)s.reportError(u);else console.error(u)}}function wo({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,j(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),j(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(V(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function $r({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=Et(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(q[0]?.id??""),[F,B]=y(0),[U,A]=y({}),_=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)A((M)=>{let L={...M};return delete L[r.id],L});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(A((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else A((a)=>{let M={...a};return delete M[r.id],M}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},z=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(q[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await At(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=q.find((o)=>o.id===x)??null,E=c?.customProviders.find((o)=>o.id===x)??null;return j(()=>{if(!c||x==="new"||P||E)return;k(q[0]?.id??"")},[c,x,P,E]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Lt,{bridge:d})]}),C&&t(wo,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(ko,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),q.map((o)=>t("div",{hidden:x!==o.id,children:t(_o,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>_(r,o,f),testResult:U[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(Sn,{provider:o,revision:c.revision,busy:b!==null,testResult:U[o.id],onTest:()=>I(o.id),onRemove:()=>z(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(Sn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{B((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function ko({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[q.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:J("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:J("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:J("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function So({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(So,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function _o({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,B]=y(X(s,d?.region)?.id),[U,A]=y(d?.base_url??""),_=s.logo,I=d!==null,T=c.trim(),z=Dt(s,F),K=F!==X(s,x.saved?.region)?.id,P=U.trim()!==(x.saved?.base_url??"");j(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),B(X(s,d?.region)?.id),A(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let E=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let M=c,L=F,m=await C(x.revision,a);if(!m)return;let G=m.providers[s.id]??null;k({saved:G,revision:m.revision}),w((g)=>g===M?"":g),B((g)=>g===L?X(s,G?.region)?.id:g),A((g)=>g===U?G?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:U.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(_,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>B(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(O,{htmlFor:o,children:n("provider.apiKey")}),z!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(z)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(W,{children:[t(H,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&E)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(D,{className:"gap-2",children:[t(O,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(W,{children:t(H,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:X(s,F)?.baseUrl??s.baseUrl,value:U,onChange:(a)=>A(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!E,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!E?S:void 0,children:i(R,{size:"sm",disabled:!E,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function Sn({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[B,U]=y(s===null),[A,_]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
2
|
-
{ "label": "My Model", "api_id": "model-id" }
|
|
3
|
-
]`),[z,K]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),E=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),M=(m)=>{if(!m)try{_(Ye(I)),K(null)}catch(G){K(V(G));return}U(m)},L=async()=>{let m;try{m=Ye(I),K(null)}catch(g){K(V(g)),U(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(ie,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[t(O,{htmlFor:E,children:n("provider.name")}),t(ee,{id:E,value:h,onChange:(m)=>c(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:o,children:n("provider.baseUrl")}),t(ee,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:r,children:n("provider.apiKey")}),i(W,{children:[t(H,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(ne,{}):t(oe,{})})})]})]})]}),t(Q,{}),i(re,{open:B,onOpenChange:M,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(B?"provider.previewModels":"provider.editModels"),t(se,{className:J("size-4",B&&"rotate-180")})]})]}),!B&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:A.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(ae,{children:i(D,{className:"gap-2","data-invalid":z!==null,children:[t(O,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":z!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),K(null)}}),t(de,{id:`${f}-description`,className:J("text-xs",z&&"text-destructive"),role:z?"alert":void 0,children:z??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void L(),children:[u&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
|
|
4
|
-
export{wo,$r,ko,So,_o,Sn};
|
package/dist/chunk-f0kgxjp1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function kr({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function p(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function E(t){let{Markdown:o}=p();return e(o,{...t})}
|
|
2
|
-
export{kr,p,E};
|
package/dist/chunk-fjk1g303.js
DELETED
package/dist/chunk-fjseqvmx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Pe}from"./chunk-s5c2ha8t.js";import{R}from"./chunk-aaqk0jrt.js";import{cn as n}from"cn";import{Item as i,ItemActions as B,ItemContent as G,ItemDescription as ie,ItemMedia as z,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function V({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function fe({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Pe,"data-[active=true]:font-medium",e),...r})}function _t({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(R,{children:t})})}export{B,G,ie,z,V,fe,_t};
|
package/dist/chunk-gez0k8zs.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{p,E}from"./chunk-f0kgxjp1.js";import{Yn}from"./chunk-vkc8ssbv.js";import{J}from"./chunk-b9q9d2jh.js";import{_}from"./chunk-1xaskqdj.js";import{Ke,Gi}from"./chunk-vepv6ktb.js";import{de}from"./chunk-bqbpded2.js";import{cn as v}from"cn";import{BotIcon as me,CheckIcon as pe,CopyIcon as ge}from"lucide-react";import{Fragment as fe,memo as xe,useEffect as P,useRef as O,useState as S}from"react";import{jsx as n,jsxs as m,Fragment as D}from"react/jsx-runtime";function H(e,t){let[a,o]=S(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var G=new WeakMap,q=1;function L(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=G.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=q;return q+=1,G.set(e,a),`${e.type}:${a}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function V(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let l=Intl.DurationFormat;if(l)try{return new l(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var Ce="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function B({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:Ce})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ve(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function he(){return m("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function we(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function z(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;if(U(e))return n(z,{});let t=J(e).category;if(t==="read")return n(ye,{});if(t==="search"||t==="fetch")return n(ve,{});if(t==="execute")return n(he,{});if(t==="edit")return n(we,{});return n(z,{})}function A(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function Le(e){return J(e).target}function W(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function U(e){return W(e)||e.name==="dynamic_tool"}function te(e,t){let{category:a}=J(e),o=Le(e),i=N(e.status);if(U(e))return{leading:e.title};if(a==="execute"){let r=A(e,"command")?.split(`
|
|
2
|
-
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=A(e,"pattern")??A(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=A(e,"query")??A(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function Ne(e,t){let a=te(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function be(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
|
|
3
|
-
`).trim()}function Te(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function $e(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="audio"?[{data:a.data,mimeType:a.mimeType}]:[]})}function ke(e){if(typeof e==="string"&&e.length>0)return e;return}function Ae(e){return e.type==="diff"}function Be(e){let t=e.content.find(Ae);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
|
-
`)}function ne(e){let t=ke(e.rawOutput);if(t!==void 0)return t;let a=be(e.content);if(a.length>0)return a;return Be(e)}function K({block:e,command:t}){let{t:a,Output:o,commandStatus:i}=p(),[r,l]=S(!1),[d,c]=S(!1),u=ne(e),s=i===void 0?e.exitCode===void 0?void 0:a("stream.codex.exitCode",{code:e.exitCode}):i(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,u].filter((f)=>f!==void 0).join(`
|
|
5
|
-
`)),l(!0),setTimeout(()=>l(!1),1500)};return n("div",{className:"codex-command-details",children:m("div",{className:"codex-command-card",children:[m("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>c((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(pe,{}):n(ge,{})})]}),u!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:u}):n(o,{text:u})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function ae({block:e}){let{t,openLink:a,Patch:o,openImage:i,commandStatus:r,expandToolOutput:l=!1}=p(),d=ne(e),c=o===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let k=x;return k.patch?.text?[k.patch.text]:[]}).join(`
|
|
6
|
-
`),u=Te(e.content),s=$e(e.content),[g,f]=_(`tool:${e.id}`,!1),C=H(`tool:${e.id}`,g),h=J(e),w=h.category,y=te(e,t),b=w==="execute"?A(e,"command"):void 0;if(e.userShell&&b!==void 0)return n(K,{block:e,command:b});let T=b!==void 0||U(e)||u.length>0||s.length>0||Boolean(c)||l&&d!==void 0,I=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(w==="read"&&N(e.status))return null;let M=m("span",{className:"codex-activity-label",children:[n(ee,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):m(D,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(I!==void 0?m(D,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:I,onClick:()=>a(I),children:y.trailing})]}):m("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return m("div",{className:"codex-activity-item",children:[T?m("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[M,n(B,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:M}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&m(D,{children:[b!==void 0?n(K,{block:e,command:b}):o!==void 0&&c?n(o,{patch:c}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),u.length>0&&n("div",{className:"codex-activity-media",children:u.map((x)=>{let k=`data:${x.mimeType};base64,${x.data}`,j=n("img",{src:k,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?j:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(k),children:j},k)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}var oe=xe(function({block:t}){if(t.type==="tool_use")return n(ae,{block:t});if(t.type==="thinking")return n(ue,{block:t});if(t.type==="collab")return n(le,{block:t});return n(ie,{block:t})});function ie({block:e}){let{t,openSession:a}=p(),o=N(e.status),[i,r]=_(`subagent:${e.id}`,o),l=O(o);P(()=>{if(o)r(!0);if(l.current&&!o)r(!1);l.current=o},[o,r]);let d=`${Se(e.activity,o,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,c=e.threadId??"",u=e.blocks.length>0;return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:v("codex-activity-header",!u&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":u?i:void 0,disabled:!u,onClick:()=>r((s)=>!s),children:[m("span",{className:"codex-activity-label",children:[n(Ee,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(c,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(c,e.name)},children:d})})]}),u&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ae,{block:s},s.id);if(s.type==="thinking")return n(ue,{block:s},L(s));if(s.type==="subagent")return n(ie,{block:s},s.id);if(s.type==="collab")return n(le,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(E,{text:s.text,streaming:!1})},L(s));if(s.type==="plan")return n(de,{entries:s.entries},L(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},L(s));return null})})})})]})}var Ie=8;function Me(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Ie}function Ee({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Me(e),"aria-hidden":"true"})}function Se(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,a){if(e===null)return"";if(t===null)return` · ${Yn(e)}`;let o=_e.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${Yn(e)} · ${o}`}var Re={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=se(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Re[e.tool]}.${o}`)}function Fe(e){return e.agents.filter((t)=>t.nickname!==null)}function ce(e,t){let a=e.agents.length>0?e.agents.length:1;return`${Z(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var R="\x01";function F(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${R}${r}${R}`]));return e(t,{...a,...i}).split(new RegExp(`${R}(\\w+)${R}`,"u")).map((r,l)=>n(fe,{children:l%2===1?o[r]:r},`${l}:${r}`))}function De({agent:e,showModel:t}){let{t:a,openSession:o}=p(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return m("span",{children:[r,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,a)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Pe(e,t){let a=e.prompt?.trim()?e.prompt:null,o=se(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,l=Fe(e),d=[];if(l.length===0)d.push({key:"generic",node:Z(e,"row",t)});for(let c of l){let u=n(De,{agent:c,showModel:e.tool==="spawnAgent"});if(i)d.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.createdWithInstructions",{},{agent:u,instructions:n(Q,{prompt:a})})})});else if(r)d.push({key:c.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:u,prompt:n(Q,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&c.state!==null&&c.state!==null?c.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${c.state.status}`),message:c.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${c.state.status}`)}):"";d.push({key:c.threadId,node:F(t,"stream.codex.collab.agentRow",{action:Z(e,"row",t),state:g},{agent:u})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:F(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function le({block:e}){let{t}=p(),[a,o]=_(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=N(e.status),r=ce(e,t);return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((l)=>!l),children:[m("span",{className:"codex-activity-label",children:[n(me,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(B,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Pe(e,t).map((l)=>n("div",{className:"codex-collab-row",children:l.node},l.key))})})})]})}function ue({block:e}){let{t,i18n:a}=p(),o=Boolean(e.isComplete),[i,r]=_(`thinking:${L(e)}`,!1),l=O(null),d=e.thinking.trim().length>0;P(()=>{if(o||!d)return;let s=l.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let w=s.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let c=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:V(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),u=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return m("div",{className:"codex-activity-item",children:[m("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?c:n("span",{className:"codex-activity-running",children:c})})}),d&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:l,className:"codex-reasoning-details",role:"region","aria-label":c,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(E,{text:u,streaming:!o})})})})]})}function Oe(e){if(W(e))return"mcp";let t=J(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ue(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ve(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(W(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(U(d)){if(!i.some((u)=>u.kind==="named"&&u.title===d.title))i.push({kind:"named",title:d.title});continue}let c=Oe(d);if(!o.has(c))i.push({kind:"category",category:c});o.set(c,(o.get(c)??0)+1)}let l=i.map((d,c)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${c===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ue(d.category,o.get(d.category),c===0,t)});if(a.startsWith("zh"))return l.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(l)}function Ui({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:l,providerIcon:d,children:c}){let{t:u,i18n:s}=p(),[g,f]=_(`work:${e}`,i,!0),C=H(`work:${e}`,g||o),h=O(null),[w,y]=S(0);P(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let T=()=>{let M=h.current;if(M===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-M)};T();let I=window.setInterval(T,1000);return()=>window.clearInterval(I)},[o,r,t]);let b=t!==void 0?u(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:V(t,s.language)}):o&&w>=1000?u("stream.codex.workingFor",{duration:V(w,s.language)}):u(o?"stream.codex.working":"stream.codex.worked");return m("section",{className:"codex-work-section",children:[m("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((T)=>!T),children:[l!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":l,"aria-hidden":"true",children:d}),n("span",{children:b}),n(B,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&c})})})]})}function Ze(e,t){if(e.type==="tool_use")return Ne(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return ce(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function He(e,t,a=1000){let[o,i]=S({text:e,live:t}),r=O(Date.now());return P(()=>{if(e===o.text&&t===o.live)return;let l=Date.now(),d=Math.max(0,r.current+a-l);if(d===0||t!==o.live){r.current=l,i({text:e,live:t});return}let c=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(c)},[o,t,a,e]),t===o.live?o.text:e}function We({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=p(),i=e.some(X),r=L(e[0]),l=e.every((C)=>C.type==="tool_use"&&J(C).category==="execute"),[d,c]=_(`group:${r}`,t&&!l),u=H(`group:${r}`,d),s=e.findLast(X)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=He(i?Ze(s,a):Ve(g,a,o.language),i);return m("div",{className:"codex-activity-group",children:[m("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>c((C)=>!C),children:[m("span",{className:"codex-activity-label",children:[n(ee,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(B,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:u&&e.map((C)=>n(oe,{block:C},L(C)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(We,{blocks:e,defaultExpanded:t})}function ht({blocks:e,defaultExpanded:t}){if(!e.some(Ke))return n(Y,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&Ke(i[0])===Ke(o))i.push(o);else a.push([o])}return n(D,{children:a.map((o)=>Ke(o[0])?n(Gi,{blocks:o.filter(Ke)},L(o[0])):n(Y,{blocks:o,defaultExpanded:t},L(o[0])))})}
|
|
7
|
-
export{Ui,ht};
|
package/dist/chunk-gjfhvaxn.js
DELETED
package/dist/chunk-h4xxyhpn.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{wi}from"./chunk-5ygdb72w.js";import{oi}from"./chunk-fd72zzqm.js";import{gr}from"./chunk-9h77fcpn.js";import{u,C,lt}from"./chunk-gk0tq3n9.js";import{Me}from"./chunk-gjfhvaxn.js";import{si,li,ci,di,ui}from"./chunk-5wsyenq9.js";import{hi,vi}from"./chunk-2ptyqcf3.js";import{L}from"./chunk-pvd09dx5.js";import{Ln}from"./chunk-5m45z6qm.js";import{En}from"./chunk-2ss8m0ja.js";import{o}from"./chunk-xqwbn2ph.js";import{e}from"./chunk-pwcw4zp2.js";import{In,Wo}from"./chunk-3karja82.js";import{Tn}from"./chunk-hmet2d96.js";import{r,qo,W,cn}from"./chunk-3174p320.js";import{Xt}from"./chunk-n13y99dj.js";import{Be,sn}from"./chunk-jz6zecb7.js";import{on,an}from"./chunk-nxj8m5bm.js";import{jo}from"./chunk-41v0g6sw.js";import{nn}from"./chunk-6xds0dkq.js";import{$o}from"./chunk-hwvr7b0j.js";import{tn}from"./chunk-h3xn4d48.js";import{en}from"./chunk-q2z9w661.js";import{Vo}from"./chunk-sg681jnt.js";import{zo}from"./chunk-bnpwhf5c.js";import{un}from"./chunk-0yqb54zg.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as T,useEffect as jt,useLayoutEffect as rt,useMemo as st,useRef as S,useState as R}from"react";import{jsx as p,jsxs as E}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(n){let w=await(await fetch(n.url)).blob();return new Promise((I,F)=>{let D=new FileReader;D.onerror=()=>F(D.error),D.onload=()=>{let G=D.result;I(G.slice(G.indexOf(",")+1))},D.readAsDataURL(w)})}function Yt({session:n,onSubmit:w,onShellCommand:I,onHandOff:F,modelSelector:D,modelMenu:G,inputHeader:mt,actions:Mt,leadingTools:Rt,agentControls:Q=!0,placeholder:Et,children:Dt,attachmentPolicy:Nt,predictions:kt=!0,disabled:St=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:O,client:_}=e(),{t:g}=O,H=T((t)=>{if(O.reportError)O.reportError(t);else console.error(t)},[O]),[ut,K]=R(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[M,Ot]=R(()=>r.get(n.id)?.attachments??pt),[y,Y]=R(()=>r.get(n.id)?.mentions??[]),[m,U]=R(()=>r.get(n.id)?.apps??[]),[ft,j]=R(()=>(r.get(n.id)?.apps?.length??0)>0||L(v,n.commands.map((t)=>t.name)).length>0),z=S(void 0),B=S(void 0);rt(()=>{if(m.length>0)j(!0)},[m.length]);let nt=M.some((t)=>Be(t)&&t.pastedText.status!=="ready"),[N,ht]=R(!1),[V,_t]=R(!1),[ot,Lt]=R(!1),it=S(null),f=S(null),gt=S(null),c=S(ut),P=T((t)=>{gt.current?.(),c.current={text:t,revision:c.current.revision+1},K(c.current)},[]),xt=T((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,d=i?.getTextarea()?.selectionStart??a.length;B.current={text:a,apps:[]},z.current=d+1,j(!0),P(a),U((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:d}])},[P]),Wt=T((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,d=i?.getTextarea(),l=d?.selectionStart??a.length,h=d?.selectionEnd??l,ct=`${a.slice(0,l)}${t} ${a.slice(h)}`;B.current={text:a,apps:[]},z.current=l+t.length+1,P(ct),j(!0)},[P]),yt=T(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Vo(n,P,U,m.length>0||y.length>0||M.length>0),bt=st(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,d){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},K(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(d[0],d[1]);return{target:n.id,...c.current,selection:d}}}),[n.id]),q=S(null),vt=T((t)=>(q.current=t,()=>{if(q.current===t)q.current=null}),[]),X=n.state!=="idle",x=I!==void 0&&m.length===0&&v.startsWith("!"),J=(ft||m.length>0)&&!x,b=!St&&!dt&&n.attached&&!n.restoring&&!n.readOnly,k=!n.readOnly&&(Ft||b),Z=en(n,b&&!N&&!V&&!nt&&!ot,v.length>0||M.length>0||y.length>0||m.length>0,kt&&!x),Pt=Z.invalidate;rt(()=>{r.set(n.id,{text:v,attachments:M,mentions:y,...m.length>0?{apps:m}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,M,y,m]),rt(()=>qo(n.id,Ot),[n.id]),rt(()=>cn(n.id,(t)=>{if(!k||N)throw Error("The composer cannot take text now; try again later");if(v.length||M.length||y.length||m.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,k,N,v,M,y,m,P]);let It=o((t)=>Kt(t.agent)),Ut=st(()=>It&&b?async(t)=>Xt((await _.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[_,It,b,n.cwd]),at=T((t)=>{Y((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let At=T(async({text:t,files:i})=>{let a=I!==void 0&&m.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||m.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let d=t.trim();if(d.length===0&&i.length===0&&y.length===0&&m.length===0)return;let l=q.current;ht(!0);let h=r.get(n.id),ct=c.current.revision,tt=null;try{let A=m.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:on(et),name:an(et)})}let Ct=gr(d,m);if(Ct.length>0)A.push({type:"text",text:Ct});for(let s of i)if(Be(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===ct&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,K(c.current),Y([]),U([]),z.current=void 0,B.current=void 0,W(n.id,()=>pt),r.set(n.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(w)if(l===null)await w(A);else await w(A,(s)=>{if(l.signal.aborted||q.current!==l)return;l.accept(s),F?.(n.id,s)});else if(l===null)await _.prompt(n.id,A);else{let s=await _.prompt(n.id,A);l.accept(s)}Pt();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:tt+1},K(c.current),Y(h.mentions),U(h.apps??[]),r.set(n.id,h),W(n.id,()=>h.attachments);throw A}finally{ht(!1),f.current?.focus()}},[_,n.id,n.state,y,m,w,I,F,Pt]),zt=()=>{_.cancel(n.id).catch(H)},Bt=T((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Me})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});H(i)},[H,g]),Ht=st(()=>({session:n,ready:b,inputReady:k,sending:N,textareaRef:f,draft:bt,interruptRef:gt,observeReceipts:vt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(w===void 0||F!==void 0)}),[n,b,k,N,bt,vt,at,w,F,x]),Tt=O.writeTextAttachment,wt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!k,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(X?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!J&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=lt(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,d=u(i),l=C([...a.value.slice(0,a.selectionStart).split(""),...d,...a.value.slice(a.selectionEnd).split("")]);B.current={text:v,apps:[]},z.current=a.selectionStart+d.length,j(!0),U(l.apps),P(l.text);return}}if(Tt)sn(t,n.id,g("composer.pastedTextFilename"),Tt)}};return p(Tn,{value:Ht,children:p("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:E("div",{className:"relative",children:[mt&&p("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:mt}),p(wi,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},K(c.current)},attachments:M,onAttachmentsChange:(t)=>W(n.id,()=>t),children:E("div",{ref:it,className:"relative",children:[Q&&!ot&&p(oi,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>p(In,{anchorRef:it,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!k,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>xt(i)),focusInput:yt}),searchFiles:Ut,onMention:at,onSearchError:H,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},J?"inline":"textarea"),E(si,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:At,onSubmitAsync:At,onSubmitError:H,canSubmit:()=>b&&!N&&!V&&!nt&&(!x||!X&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,E(ci,{className:"px-3 pt-3 pb-0 empty:hidden",children:[V&&p("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),p(jo,{mentions:y,onRemove:(t)=>Y((i)=>i.filter((a)=>a!==t))}),p(vi,{children:(t)=>Be(t)?p($o,{data:t,sessionId:n.id}):p(hi,{data:t,t:g})})]}),E(li,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&p("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),J?p(Ln,{...wt,skillIcon:O.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:m,onApplicationsChange:U,initialCaret:z.current,initialUndo:B.current}):p(En,{...wt,autoFocus:ft&&x})]}),p(di,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:E("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[E("div",{className:"flex min-w-0 items-center gap-[5px]",children:[p(Wo,{anchorRef:it,commands:n.commands,disabled:!k,agentDisabled:!b||x,agentControls:Q,open:ot,onOpenChange:Lt,focusInput:yt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
-
`)?i:`${i}
|
|
3
|
-
`,d=t.startsWith("$")?t:`/${t}`,l=`${a}${d} `;if(!J)B.current={text:i,apps:[]},z.current=l.length,j(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:xt}),Rt,Q&&p(tn,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),E(ui,{className:"w-full min-w-0 items-center justify-end gap-1",children:[Q&&p(un,{session:n}),D??p(nn,{...G,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,p(zo,{active:X,sending:N||dt||V,ready:b&&!nt&&(!x||!X&&v.slice(1).trim().length>0),hasMentions:y.length>0||m.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
|
-
export{Yt};
|
package/dist/chunk-hmet2d96.js
DELETED
package/dist/chunk-j9snfndd.js
DELETED
package/dist/chunk-jz6zecb7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Te}from"./chunk-7nehhgej.js";import{r,W,ln}from"./chunk-3174p320.js";var Ko=5000;function Be(t){return"pastedText"in t}function it(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;W(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Te(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),ln(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function sn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Ko)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};W(e,(i)=>[...i,o]),it(e,o,n)}
|
|
2
|
-
export{Ko,Be,it,sn};
|
package/dist/chunk-kp7qa98m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D}from"./chunk-kcra1mgf.js";import{Se}from"./chunk-4jy404m1.js";import{T,le}from"./chunk-vctq22tq.js";import{O,te}from"./chunk-p0d6rr6q.js";import{Ie,se}from"./chunk-05eg5p11.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Ro({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:R=n?"none":void 0,allowRemove:x=!0,submenu:g=!1,className:B,onOpenChange:A}){let{t}=T(),c=se(),H=le(),P=Se(),{collections:s,order:C}=Ie(),i=C.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[w,b]=d(!1),[m,h]=d(""),[r,v]=d(!1),I=(o)=>{if(G(o),P(o),A?.(o),!o)b(!1),h("")},p=(o)=>{v(!0),H(o.then(()=>{I(!1)}).finally(()=>v(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,M)=>{if(!o&&w&&M.reason==="trigger-hover"){M.cancel();return}I(o)},children:[e(J,{disabled:r,"data-hover-background":R,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(N,{variant:"ghost",size:"icon-sm",className:B,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===O?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:te(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>b(!0),children:[e(z,{}),t("collection.newCollection")]}),x&&i!==void 0&&a(k,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(Q,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>h(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(N,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function ta({sessionId:l,allowRemove:f=!0}){let{t:n}=T();return e(Ro,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(D,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
|
|
2
|
-
export{Ro,ta};
|
package/dist/chunk-ktbszx6r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-pwcw4zp2.js";import{zt,Vt}from"./chunk-9rf3qecr.js";import{Xe}from"./chunk-q1kstf4c.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Wr({providers:n,store:l}){let{t:m}=e().host,d=zt(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=Xe(s.id,o.api_id);return t(S,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function S({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Vt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
|
|
2
|
-
export{Wr};
|
package/dist/chunk-ncwf6pjj.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{p,E}from"./chunk-f0kgxjp1.js";import{J}from"./chunk-b9q9d2jh.js";import{Ri}from"./chunk-t96rf4pg.js";import{de}from"./chunk-bqbpded2.js";import{Ui,ht}from"./chunk-gez0k8zs.js";import{Di}from"./chunk-5ymq8y72.js";import{oo}from"./chunk-4qghztvg.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(E,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(E,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(de,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function Xa({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:c,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(Kn,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:c,time:i}):null,d=Ri(t.content,"compact"),x=d.reduce((e,a,l)=>a.kind==="codexActivityGroup"?l:e,-1),h=d.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&J(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((l)=>l.type!=="tool_use"||!s.has(l.name));return a.length===0?null:o(ht,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?d.length:h;return o(qn,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:d.slice(0,m).map(k),answer:d.length>m?d.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(Di,{blocks:f}):y(f))})}function Kn({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let c=p(),{t:u}=c;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(oo,{text:t,label:u("actions.copy"),host:c}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=p();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function qn({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...c}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(Ui,{...c,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
-
export{Xa,Kn,qn};
|
package/dist/chunk-nh9gk065.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,s,n,g}from"./chunk-3t5cksae.js";import{H}from"./chunk-7eqtvqrn.js";import{I,ee,_e}from"./chunk-4jy404m1.js";import{Ce,K,re}from"./chunk-w22ch68s.js";import{Co}from"./chunk-j9snfndd.js";import{xe}from"./chunk-ex20n22v.js";import{be}from"./chunk-y6kxhkjm.js";import{we}from"./chunk-mgsxsaj1.js";import{Nt}from"./chunk-hqykt9hr.js";import{vo}from"./chunk-x6f51rt2.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as q}from"react/jsx-runtime";function M(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Or({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=a(),{t:N}=h,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=K((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&Ce({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:M(u,e)}]:[]}),[v,m,S,u]),b=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=K((t)=>t.activityCollapsedGroups),o=re(),L=b.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),x=(t)=>{if(w?.(t))return;d(t)},D=vo();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Co(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=L[r-1];if(!y)return;e.preventDefault(),x(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=L.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:k?.(t.sid),actions:R?.(t.sessionRow),hint:e<9&&D?c(G,{children:we(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(I,{children:b.map((t)=>t.key==="foreground"?c(I,{children:t.rows.map(A)},t.key):c(ee,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function T({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:m,hint:S}){let u=a(),v=s(),{t:p}=u,b=i.title??p("sessionList.untitled"),f=Nt(i.sessionId,d);return P(q,{children:[c(_e,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(be,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:b,preview:f,listeningPorts:R,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:h,hint:S,actions:c(xe,{title:p("sessionList.stop"),onStop:()=>g(u,v.stopSession(i.sessionId))})}),k.map((o)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(H,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
-
export{Or};
|
package/dist/chunk-nxj8m5bm.js
DELETED
package/dist/chunk-pn5ghg65.js
DELETED
package/dist/chunk-pwcw4zp2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ee}from"./chunk-xqwbn2ph.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function pn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Ee,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function y(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{pn,e,y};
|
package/dist/chunk-q1kstf4c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Eo,Ot,Ut,Bt,Gt}from"./chunk-x0h0g1ma.js";var a=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};var p={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var d=a,g={anthropic:Eo,deepseek:Ot,openrouter:Bt,qwen:Gt,xai:Ut};function m(e){let i=g[e];if(!i)throw Error(`Provider ${e} has no logo`);return i}var q=d.filter((e)=>e.source!=="account").map(({source:e,...i})=>({...i,logo:m(i.id)}));function No(e){return e!=null&&d.some((i)=>i.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(i.id)}:`))}function Ye(e){let i=JSON.parse(e);if(!Array.isArray(i)||i.length===0)throw Error("Add at least one model");let o=new Set;return i.map((n)=>{if(typeof n!=="object"||n===null||Array.isArray(n))throw Error("Each model must be an object");let t=n,r=typeof t.label==="string"?t.label.trim():"",s=typeof t.api_id==="string"?t.api_id.trim():"";if(r===""||s==="")throw Error("Model label and API ID cannot be empty");if(o.has(s))throw Error("Model IDs must be unique");if(o.add(s),t.contextWindow!==void 0&&t.contextWindow!==null&&(!Number.isSafeInteger(t.contextWindow)||t.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(t.description!==void 0&&typeof t.description!=="string")throw Error("Model description must be a string");return{label:r,api_id:s,...t.contextWindow===void 0?{}:{contextWindow:t.contextWindow},...t.description===void 0?{}:{description:t.description}}})}function Mo(e){return[...q.filter((i)=>e.providers[i.id]!==void 0).map((i)=>({id:i.id,name:i.name,models:i.models})),...[...e.customProviders,...e.managedProviders??[]].map((i)=>({id:i.id,name:i.name,models:i.models.map((o)=>({id:o.api_id,label:o.label,...o.description==null?{}:{description:o.description}}))}))]}function Xe(e,i){let o=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(n)=>n.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(o)}:${encodeURIComponent(i)}`}function Yr(e,i){let o=Mo(i).flatMap((n)=>n.models.map((t)=>Xe(n.id,t.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(No(e))throw Error("The selected ALwith account model is unavailable. Select another model before sending.");return o[0]??null}function X(e,i){if(!e.regions)return null;let o=e.regions.find((n)=>n.id===i)??e.regions[0];if(!o)throw Error(`Provider ${e.id} declares no regions`);return o}function Dt(e,i){return X(e,i)?.keyUrl??e.keyUrl??null}function Ht(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function Xr(e){let i=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!i)return null;let o=decodeURIComponent(i[1]),n=l.models.find((t)=>t.slug===o);return n?{value:n.default_reasoning_level,hidden:n.supported_reasoning_levels.length===0}:null}var Ao=p;function ea(e){return Ao[e]??{}}
|
|
2
|
-
export{q,No,Ye,Mo,Xe,Yr,X,Dt,Ht,Xr,Ao,ea};
|
package/dist/chunk-q3vvg0de.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Vn}from"./chunk-j5njgy7p.js";import{ki}from"./chunk-2pahy4hs.js";import{oe}from"./chunk-xqwbn2ph.js";import{qe,or}from"./chunk-t94rfs41.js";import{e}from"./chunk-pwcw4zp2.js";import{useCallback as s}from"react";import"@alwith/module-chat/search.css";import{jsx as m}from"react/jsx-runtime";var h="alwith-chat:find";function da(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function Jt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=oe(qe,(r)=>r),w=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),y=s((r)=>u.sessionId===t?Vn(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>or(t,r,i),[t]),b=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,g=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return m("div",{className:"absolute inset-x-0 top-0 z-30",children:m(ki,{placement:"body",getViewport:w,findSourceMatches:y,revealTurn:S,prepareSource:b,subscribeOpen:g,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
|
|
2
|
-
export{da,Jt};
|
package/dist/chunk-qkw2nhsr.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{yn}from"./chunk-veb90k24.js";import{pe}from"./chunk-1e7gk302.js";import{ar}from"./chunk-4qghztvg.js";import{x,bt}from"./chunk-9h77fcpn.js";import{t}from"./chunk-xqwbn2ph.js";import{Cr,wr}from"./chunk-m2x1s408.js";import{ne}from"./chunk-0307kp7e.js";import{ue}from"./chunk-sct2h2dm.js";import{isEmbeddedResource as g,isImage as R,isResourceLink as h,isText as v}from"@nyssance/codex-acp-v2/client";import{memo as y}from"react";import{jsx as i,jsxs as q}from"react/jsx-runtime";var rr=y(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=wr(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):ue(n),l=n.content.filter(R),d=new Set(bt(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(h(e)){let s=x(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(v).map((e)=>{let s=Cr(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return q("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(ne,{block:e},`${n.id}:${s}`))}),i(yn,{value:{names:u,icon:p.skillIcon},children:i(ar,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(pe,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
-
export{rr};
|
package/dist/chunk-rncx5gxz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{yt}from"./chunk-sp411z4y.js";import{c,De}from"./chunk-95n1cpnj.js";import{b}from"./chunk-d924by6g.js";import{MoreHorizontalIcon as N}from"lucide-react";import{useEffect as y,useState as p}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as D,DropdownMenuContent as P,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function go(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function he({path:n,renderHeader:s,description:t}){let e=c(),{t:l}=e,d=e.readFile,[a,f]=p(null),[v,w]=p(null),[h,M]=p(0);y(()=>{let r=!1;return f(null),w(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,h,d]);let k=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(D,{children:[o(z,{render:o(x,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(N,{})}),i(P,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void De(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void De(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)De(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(k):o("div",{className:"flex justify-end",children:k}),o(b,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(x,{variant:"outline",size:"sm",onClick:()=>M((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(yt,{text:go(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
|
-
export{go,he};
|
package/dist/chunk-s5c2ha8t.js
DELETED
package/dist/chunk-sp411z4y.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{xr}from"./chunk-veb90k24.js";import{pe}from"./chunk-1e7gk302.js";import{ao}from"./chunk-620q6hmz.js";import{x}from"./chunk-9h77fcpn.js";import{Zi}from"./chunk-6es8tgxc.js";import{no,Wi}from"./chunk-vextf7ba.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as C}from"entities";import ae from"katex";import{CheckIcon as U,ChevronLeftIcon as se,ChevronRightIcon as ie,CopyIcon as ce,DownloadIcon as de,FileIcon as le,LinkIcon as ue,MailIcon as me,XIcon as ge}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as fe,createElement as B,memo as D,startTransition as he,useContext as ke,useEffect as k,useLayoutEffect as X,useMemo as G,useRef as w,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as re}from"react/jsx-runtime";var J=fe(null);function M(){let e=ke(J);if(e===null)throw Error("Markdown host is missing");return e}var we=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,be=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,xe=/\uE200[^\uE201]*$/,Te=4,ve=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function E(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function V(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)&&!V(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!E(e,t)&&!V(e,t,n))return t;return-1}function Ne(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!E(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Me(e){return Ne(e,"```")%2===1}function Z(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!E(e,t))n+=1;t+=1}return n%2===1}function Ee(e){return e.endsWith(`
|
|
2
|
-
`)?`${e}\`\`\``:`${e}
|
|
3
|
-
\`\`\``}function _(e,n){if(!e.includes(n)||Ce(e,n)%2===0)return e;let t=ye(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
|
-
`)||Z(r))return e;return`${e}${n}`}function Le(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Y(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ie(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Y(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>Te&&!ve.has(u))return!1}return!0}function $e(e){let{path:n}=Y(e);if(Le(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Re(e){let n=e.match(H);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ie(t)||$e(t)?e.replace(H,"$1"):`${e})`}function Pe(e){let n=e.replace(xe,"");if(n.length===0||n.includes("`")&&Z(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Me(n))return{isCodeFenceOpen:!0,markdown:Ee(n)};if(n.includes(")n=Re(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Se(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return Se(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Q(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Q(t.tokens);if(!O(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!O(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function Fe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Fe(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Ae(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function He(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function _e(e){let n=He(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Oe({href:e}){let n=G(()=>_e(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?me:o?le:ue;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function je({children:e,href:n,title:t}){let r=M();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Ae(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(Oe,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function We({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=M(),i=w(null),[c,d]=h(null),[u,p]=h(null),[L,b]=h(!1);if(k(()=>{let g=Zi(d,p);return i.current=g,()=>{g.dispose(),i.current=null}},[]),k(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let T=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:L?a(U,{}):a(ce,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...T===null?{children:e}:{dangerouslySetInnerHTML:{__html:T}}})})]})}function qe({code:e,language:n}){return M().preview?a("span",{children:e}):a(Ke,{code:e,language:n})}function Ke({code:e,language:n}){let t=w(null),[r,o]=h(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(We,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function ze(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ue({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(se,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(de,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(ie,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(ge,{})})]})]})}function Be(e){return M().preview?a(re,{children:e.alt}):a(De,{...e})}function De({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=h();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(re,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(ze(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ue,{preview:s,setPreview:i})})]})}function Xe({value:e,display:n}){let t=w(null);return X(()=>{if(t.current===null)throw Error("Codex math root is not mounted");ae.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var Ge=150,y=null;function W(e,n){let t=y;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function ee(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function q(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,we)}function Je(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${q(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return q(e.text);default:return""}}function ne(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${ee(Je(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ne(r),s=t.get(o)??0;return t.set(o,s+1),te(r,`${n}-${o}-${s}`)})}function Ve(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(U,{}):null]}):null,m(t,n)]},n)}function Ze(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function K(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return B(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ye(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>K(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=ee(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>K(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function z(e,n,t){let r=N(e.href);if(!ao(r))return null;return a(Be,{src:r,alt:C(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function te(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return B(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>z(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(xr,{text:C(t.text),children:W(C(t.text),n)},n):m(t.tokens,n)}case"escape":return W(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=N(t.href),s=x(o);if(s!==null)return a(pe,{app:{id:s,name:C(t.text).replace(/^\$/,"")}},n);return ao(o)?a(je,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return z(e,n,!1);case"code":{let t=e;return a(qe,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Ze(e,n);case"list_item":return Ve(e,n);case"table":return Ye(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Xe,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function v(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?C(n.text):n.tokens.map(v).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(v).join("");case"list":return e.items.map(v).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(v).join("")).join("")).join("")}default:return""}}function Qe({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=y;try{return y={cursor:t,runs:r,generation:o},te(e,n)}finally{y=s}}var en=D(function({result:n}){let{text:t,isStreaming:r}=n,o=G(()=>{let l=n.tokens;if(n.source.includes("!["))Q(l);P(l);let g=new Map,S=0;return l.map((I)=>{let R=ne(I),F=g.get(R)??0;g.set(R,F+1);let A=v(I),oe={token:I,tokenKey:`root-${R}-${F}`,offset:S,visibleText:A};return S+=A.length,oe})},[n]),s=o.map((l)=>l.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,p=performance.now(),L=r&&d?c.runs.filter((l)=>p-l.firstSeenAtMs<Ge):[],b=c.generation+(d?0:1),T={text:t,visibleText:s,runs:L.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)T.runs.push({start:u,end:s.length,firstSeenAtMs:p});return X(()=>{i.current=T}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Qe,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:T.runs,generation:b},l.tokenKey))})}),nn=D(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>no(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let u=Wi((p)=>{if(!i.current)i.current=!0,s(p);else he(()=>s(p))},d);return r.current=u,()=>{u.dispose(),r.current=null}},[]),k(()=>{let u=r.current;if(u===null)throw Error("Markdown parser is not mounted");let p=t?Pe(n).markdown:n;u.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(en,{result:o})});function yt({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(J.Provider,{value:t,children:a(nn,{text:r?o:e,isStreaming:r})})}
|
|
7
|
-
export{yt};
|
package/dist/chunk-sqm2vsf5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c,i}from"./chunk-95n1cpnj.js";import{B,G,ie,z,V,fe}from"./chunk-fjseqvmx.js";import{ge}from"./chunk-ct0xqakr.js";import{b}from"./chunk-d924by6g.js";import{he}from"./chunk-rncx5gxz.js";import{j,ve}from"./chunk-qnbr2cmg.js";import{CheckIcon as F,SparklesIcon as X,XIcon as _}from"lucide-react";import{useDeferredValue as J,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as K,DialogClose as Q,DialogContent as R,DialogDescription as W,DialogHeader as Y,DialogTitle as Z}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as oe}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:m}=c(),[u,s]=v(!1),l=r.interface?.iconSmall,h=l&&m?m(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(X,{className:"text-muted-foreground size-6"})})}function re({skill:r}){let{t:m}=c(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${m(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function St({query:r,ready:m,onOpenPlugin:u}){let{t:s}=c(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!m,M=i((e)=>e.installed),E=i((e)=>e.skillProjects),[L,H]=v(null),[k,O]=v(!1),[q,C]=v(null),x=J(r.trim().toLowerCase()),o=l.find((e)=>e.path===q),N=M.find(({plugin:e})=>e.id===o?.pluginId),p=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(E).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],A=d.map((e)=>e.label);for(let e of d)if(e.path&&A.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===L)??d[0],D=g?p.filter((e)=>g.paths.has(e.path)):[],U=k||x?p:p.slice(0,6),w=(e)=>t(V,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(fe,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(z,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(G,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(ie,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(B,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(F,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(b,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${j} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(ge,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:p.length})})]}),p.length?w(U):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>O((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")H(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(oe,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(K,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(R,{showCloseButton:!1,className:ve,children:o&&n(S,{children:[t(he,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(re,{skill:o}),e,t(Q,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(_,{})})]})]}),n(Y,{className:"gap-3",children:[t(Z,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(W,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
|
-
export{St};
|
package/dist/chunk-t4dsmqdq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-3t5cksae.js";import{Ce,K,re}from"./chunk-w22ch68s.js";import{useEffect as S,useMemo as f}from"react";function Rr(s){let c=K((i)=>i.activityOrder),a=n((i)=>{let o=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&Ce(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(o)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=K((i)=>i.activitySeen),r=re();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,o])=>u.get(i)!==o)}
|
|
2
|
-
export{Rr};
|
package/dist/chunk-thhtbvj1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ht}from"./chunk-gez0k8zs.js";import{zi}from"./chunk-4gq7ye1a.js";import{t}from"./chunk-xqwbn2ph.js";import{ne}from"./chunk-0307kp7e.js";import{io}from"./chunk-sct2h2dm.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(ne,{block:e.content},`${n.id}:${l}`))]})}var Jn=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(io),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...zi(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(ht,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
-
export{Jn};
|
package/dist/chunk-tvbgjmtw.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a,s,n}from"./chunk-3t5cksae.js";import{He,ae,Y}from"./chunk-fjk1g303.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as r}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function Er({Scroll:u=we}){let{t:i,i18n:A}=a(),m=s(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,X]=d(""),[y,Z]=d("all"),[p,ee]=d("all"),[te,se]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,te]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ne=[...new Set(S.filter((e)=>o&&j(o,e).id!==Y).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===Y;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
|
|
2
|
-
`));else f(null)}finally{h.current=!1,w(!1)}}return r("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[r("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:[r("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),r(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),r("div",{className:"flex shrink-0 flex-wrap gap-3",children:[r("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),r(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Z(e)},children:[r(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),r(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[r(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):ae(p,o??void 0)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ne.map((e)=>t(x,{value:e,title:e,children:ae(e,o??void 0)},e))]})]})]}),r(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?r("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:r(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>se((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?r("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(o?He(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>r("section",{className:"flex flex-col gap-3",children:[r("div",{className:"flex items-center justify-between gap-3",children:[r("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===Y?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===Y?i("sessionList.archives.noProject"):ae(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>r("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[r("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(l.updatedAt))})]}),r("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(l),children:i("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:r(ge,{showCloseButton:!C,children:[r(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(ie?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),r(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),r(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
|
|
3
|
-
export{Er};
|
package/dist/chunk-v0y5fepf.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ti,at}from"./chunk-vnr9rqs6.js";import{t,oe}from"./chunk-xqwbn2ph.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function Wt(e){c.setState({request:{path:e.path,patch:Go(e.patch,e.path)}})}function Go(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function Zt(){let{t:e,theme:a}=t(),n=oe(c,(o)=>o.request),s=n===null?null:ti(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(at,{patch:n.patch,theme:a})})]})})}
|
|
3
|
-
export{Wt,Go,Zt};
|
package/dist/chunk-vctq22tq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Uo}from"./chunk-3t5cksae.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function aa({host:o,children:t}){return s(n,{value:o,children:t})}function T(){let o=i(n),e={...Uo(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Ho(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function le(){let o=T();return(t)=>Ho(o,t)}function Oo(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{aa,T,Ho,le,Oo};
|
package/dist/chunk-vepv6ktb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p}from"./chunk-f0kgxjp1.js";import{_}from"./chunk-1xaskqdj.js";import{isContentEntry as k,isImage as b,isResourceLink as N}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as w,ImageIcon as C,LoaderCircleIcon as S,RefreshCwIcon as A}from"lucide-react";import{useEffect as R,useState as h}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";function Ke(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function B(e){let n=[];for(let[r,c]of e.content.entries()){if(!k(c))continue;let i=c.content;if(b(i))n.push({key:`${e.id}:${r}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(N(i))n.push({key:`${e.id}:${r}`,path:i.uri,alt:i.name})}if(n.length)return n;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function T({images:e}){let{loadImage:n,openImageGallery:a,openImage:r,t:c}=p(),[i,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);R(()=>{let t=!0,l=JSON.parse(f);g({});for(let o of l)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&n?n(o.path):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)g((m)=>({...m,[o.key]:{src:u}}))},()=>{if(t)g((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[f,n,v]);let I=e.flatMap((t)=>{let l=i[t.key];return l&&"src"in l?[{src:l.src,alt:t.alt}]:[]});return s("div",{className:"codex-image-thumbnails",children:e.map((t,l)=>{let o=i[t.key];if(!o)return s("div",{className:"codex-image-thumbnail",role:"status","aria-label":c("stream.codex.imageLoading"),children:s(S,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":c("stream.codex.imageFailed"),onClick:()=>x((d)=>d+1),children:s(A,{"aria-hidden":"true"})},t.key);return s("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,l).filter((u)=>{let m=i[u.key];return m&&"src"in m}).length;if(a)a(I,d);else r?.(o.src)},children:s("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Gi({blocks:e}){let{t:n}=p(),a=e.flatMap(B),[r,c]=_(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":r,onClick:()=>c((i)=>!i),children:[y("span",{className:"codex-activity-label",children:[s(C,{className:"codex-activity-icon","aria-hidden":"true"}),s("span",{className:"codex-activity-leading",children:n("stream.codex.viewedImages",{count:a.length})})]}),s(w,{className:r?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),r&&s(T,{images:a})]})}
|
|
2
|
-
export{Ke,Gi};
|
package/dist/chunk-vjmgh1q9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var va={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Xo(e){return[...e].toSorted((o,n)=>(va[o.kind]??99)-(va[n.kind]??99))}function za(e){return e==="allow_once"||e==="allow_always"}function Va(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{va,Xo,za,Va};
|
package/dist/chunk-vmg3evhm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Ta(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function ct(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Ta(t,o))}return{imageFiles:n,sawNonImageFile:i}}function dt(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function fn(e){return e.replace(s,"")}function xa(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function hn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=fn(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-xa(n,i)),r=Math.max(0,o-xa(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{Ta,ct,dt,fn,xa,hn};
|