@alwith/module-chat 0.6.20 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/application-client.js +1 -1
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/app-reference.js +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-wkrnbk0p.js → chunk-05zhvfrp.js} +2 -2
- package/dist/{chunk-3w6dv0nx.js → chunk-0faa9z99.js} +1 -1
- package/dist/{chunk-csfqkzmr.js → chunk-0n26qaxb.js} +3 -3
- package/dist/{chunk-6my4ybpw.js → chunk-0ne2mz2q.js} +2 -2
- package/dist/{chunk-hzhcajx1.js → chunk-0xshzqb6.js} +2 -2
- package/dist/{chunk-ztrfygh5.js → chunk-1e83qr49.js} +2 -2
- package/dist/{chunk-81jejgvs.js → chunk-1smyy9mt.js} +2 -2
- package/dist/{chunk-6dnb0t84.js → chunk-200zk66j.js} +2 -2
- package/dist/{chunk-swt6dntp.js → chunk-2fx3qhyb.js} +2 -2
- package/dist/{chunk-1a56svgj.js → chunk-2q1xxs3t.js} +2 -2
- package/dist/{chunk-tzczzqde.js → chunk-2qs1ss40.js} +2 -2
- package/dist/{chunk-7jk8s061.js → chunk-2sc2z6g5.js} +2 -2
- package/dist/{chunk-41yz7txv.js → chunk-36ttr22w.js} +2 -2
- package/dist/{chunk-e2qjbqq2.js → chunk-3a5sn0v8.js} +2 -2
- package/dist/{chunk-8kd74ng1.js → chunk-3ek4vddd.js} +2 -2
- package/dist/{chunk-2c2a1wvg.js → chunk-3mm1d99e.js} +1 -1
- package/dist/chunk-3vzbqfsh.js +2 -0
- package/dist/{chunk-nrzkzvr0.js → chunk-3z5zyra7.js} +2 -2
- package/dist/{chunk-ckjq6690.js → chunk-4dp24aja.js} +2 -2
- package/dist/{chunk-6ehhap9k.js → chunk-4gxpna3p.js} +2 -2
- package/dist/{chunk-2zy75522.js → chunk-4h9ee02f.js} +2 -2
- package/dist/{chunk-f6zpqrg3.js → chunk-4ntxjy8v.js} +2 -2
- package/dist/{chunk-s8djv2dy.js → chunk-50eym2q3.js} +3 -3
- package/dist/{chunk-2cfhvb3k.js → chunk-542c9tpr.js} +2 -2
- package/dist/chunk-5cf6ny70.js +2 -0
- package/dist/{chunk-p2tm6tv8.js → chunk-5d138vq3.js} +1 -1
- package/dist/{chunk-bcdw682e.js → chunk-5dgmqyg1.js} +2 -2
- package/dist/{chunk-8y706gz3.js → chunk-5kje89r8.js} +2 -2
- package/dist/{chunk-2easwd1n.js → chunk-5pmr5dby.js} +2 -2
- package/dist/{chunk-gy4h86mw.js → chunk-5pyvgshe.js} +2 -2
- package/dist/{chunk-fvwrc97h.js → chunk-5wqbhb7a.js} +1 -1
- package/dist/{chunk-tec9yhsm.js → chunk-5xe89qwh.js} +2 -2
- package/dist/{chunk-s6b28p84.js → chunk-5ygqjna0.js} +2 -2
- package/dist/{chunk-m944rgn9.js → chunk-689vpcc9.js} +1 -1
- package/dist/{chunk-s6y31dcb.js → chunk-6cjjwry2.js} +2 -2
- package/dist/{chunk-55ya3102.js → chunk-6e9wwjgv.js} +2 -2
- package/dist/{chunk-m8pkmbtf.js → chunk-6r5nzsw8.js} +2 -2
- package/dist/{chunk-rr9kc3n8.js → chunk-76c0cx40.js} +2 -2
- package/dist/{chunk-f89s462k.js → chunk-76smt4zv.js} +2 -2
- package/dist/{chunk-d8f6avcz.js → chunk-79pvfyd0.js} +2 -2
- package/dist/{chunk-1vtvcar6.js → chunk-7a70nd7e.js} +1 -1
- package/dist/chunk-7cab9zy0.js +2 -0
- package/dist/{chunk-npvcy4tw.js → chunk-7e86wygk.js} +2 -2
- package/dist/{chunk-a71j2n86.js → chunk-7s3f142h.js} +1 -1
- package/dist/{chunk-g61xf0ma.js → chunk-7v7wc7k5.js} +2 -2
- package/dist/{chunk-8q9hq3mg.js → chunk-7wd0kfqr.js} +2 -2
- package/dist/{chunk-ecdjjnbb.js → chunk-7wpcdwan.js} +1 -1
- package/dist/{chunk-3gnn1v68.js → chunk-7xvrsw7x.js} +2 -2
- package/dist/{chunk-xykmskka.js → chunk-81hv0s07.js} +2 -2
- package/dist/{chunk-gnctm097.js → chunk-81hxr15a.js} +2 -2
- package/dist/{chunk-3a3ecayr.js → chunk-859359n0.js} +2 -2
- package/dist/{chunk-bej9z041.js → chunk-8a0fd2f5.js} +2 -2
- package/dist/{chunk-78vckhxt.js → chunk-8ew2e3y7.js} +2 -2
- package/dist/{chunk-wxh1m3gg.js → chunk-8h4e3654.js} +2 -2
- package/dist/{chunk-wnydsth6.js → chunk-8rtjn0tg.js} +2 -2
- package/dist/{chunk-04c5k3qr.js → chunk-94gqvrk7.js} +2 -2
- package/dist/{chunk-fhjk81r9.js → chunk-9hjfc08t.js} +2 -2
- package/dist/chunk-9ts08sma.js +2 -0
- package/dist/{chunk-5aqqqsa3.js → chunk-9zgkpv8m.js} +1 -1
- package/dist/{chunk-6tj5e7fc.js → chunk-a8r3mggj.js} +2 -2
- package/dist/{chunk-mr2wcd24.js → chunk-ag8696fb.js} +1 -1
- package/dist/chunk-ayt0bzr9.js +2 -0
- package/dist/{chunk-easm0z49.js → chunk-az3g3a94.js} +2 -2
- package/dist/{chunk-38bpmgjd.js → chunk-bdrcreqs.js} +2 -2
- package/dist/{chunk-4p0zk3mj.js → chunk-bh0h7fz7.js} +2 -2
- package/dist/chunk-bsnmj69j.js +2 -0
- package/dist/{chunk-5hk3k14h.js → chunk-c092x92d.js} +2 -2
- package/dist/{chunk-gdavg2hq.js → chunk-ca4vetrh.js} +2 -2
- package/dist/{chunk-c0mpr4dh.js → chunk-capkej8s.js} +1 -1
- package/dist/{chunk-rh2yx0xq.js → chunk-cc6x7r61.js} +2 -2
- package/dist/{chunk-n6dqwdg5.js → chunk-cfpm71vd.js} +2 -2
- package/dist/{chunk-r8expjyy.js → chunk-cfx5s6fz.js} +3 -3
- package/dist/{chunk-933h9gnv.js → chunk-ck2ax5f6.js} +2 -2
- package/dist/{chunk-gawrkkbf.js → chunk-cn07a5nh.js} +2 -2
- package/dist/chunk-cq7bbgcg.js +2 -0
- package/dist/chunk-d29xbf16.js +2 -0
- package/dist/{chunk-5bmxngnx.js → chunk-dp1nnwk2.js} +1 -1
- package/dist/chunk-dpfjxym1.js +2 -0
- package/dist/{chunk-rx84h0c2.js → chunk-dtxc0x7y.js} +2 -2
- package/dist/{chunk-y8fmawc6.js → chunk-dypeezvv.js} +2 -2
- package/dist/{chunk-1hmt6w4w.js → chunk-e5mn6ern.js} +2 -2
- package/dist/{chunk-at75m9hq.js → chunk-e641842r.js} +2 -2
- package/dist/{chunk-abgdqy92.js → chunk-e6ya95ee.js} +2 -2
- package/dist/{chunk-t9e1sj53.js → chunk-exkacmay.js} +2 -2
- package/dist/{chunk-e7ndpy02.js → chunk-f1awp8vf.js} +2 -2
- package/dist/{chunk-bane0xc8.js → chunk-f7bn0nd2.js} +2 -2
- package/dist/{chunk-6xap6hvz.js → chunk-fe83mqnb.js} +2 -2
- package/dist/{chunk-k99r1r38.js → chunk-fn68kh69.js} +1 -1
- package/dist/{chunk-3tvct295.js → chunk-ft7k6n4g.js} +2 -2
- package/dist/{chunk-pdmayjan.js → chunk-g4devj8d.js} +2 -2
- package/dist/{chunk-56rx2rmj.js → chunk-g751pxzk.js} +2 -2
- package/dist/{chunk-n8v6cdq3.js → chunk-gak8579e.js} +2 -2
- package/dist/{chunk-16db8fh2.js → chunk-gec6q1jb.js} +2 -2
- package/dist/{chunk-gea1q14z.js → chunk-grxjvm9h.js} +2 -2
- package/dist/{chunk-38hvm5ca.js → chunk-h8r785ne.js} +2 -2
- package/dist/{chunk-8y60kexq.js → chunk-hcat58sr.js} +2 -2
- package/dist/{chunk-kh3af9mq.js → chunk-hgtbhvyh.js} +2 -2
- package/dist/{chunk-04frqm59.js → chunk-hp0eqd8x.js} +2 -2
- package/dist/{chunk-rkejggyx.js → chunk-j3g21ext.js} +2 -2
- package/dist/{chunk-qdcznn2t.js → chunk-j64839nf.js} +2 -2
- package/dist/{chunk-gvqvw7ms.js → chunk-jcyv1q0x.js} +2 -2
- package/dist/{chunk-x20dy83s.js → chunk-jj5y2js2.js} +3 -3
- package/dist/chunk-jjgwfpmp.js +2 -0
- package/dist/{chunk-5s85tvas.js → chunk-js3nhatr.js} +2 -2
- package/dist/{chunk-kztrgv9y.js → chunk-jw1c8r97.js} +2 -2
- package/dist/{chunk-kj3t4mqf.js → chunk-jydhbkm8.js} +2 -2
- package/dist/{chunk-9q6hz47j.js → chunk-kbfe7gqw.js} +2 -2
- package/dist/{chunk-1r4y3pfg.js → chunk-m6080rsp.js} +2 -2
- package/dist/{chunk-vhxr0c4c.js → chunk-m8tt5bf9.js} +2 -2
- package/dist/{chunk-q5qqhqw4.js → chunk-m9ttf96p.js} +2 -2
- package/dist/{chunk-r6ns1457.js → chunk-mbsmb8jn.js} +2 -2
- package/dist/{chunk-t9xkg3pk.js → chunk-mc40zb3c.js} +1 -1
- package/dist/{chunk-23r426sm.js → chunk-mc5668pn.js} +2 -2
- package/dist/{chunk-r8pm74zf.js → chunk-mgmv8kap.js} +2 -2
- package/dist/{chunk-jm6y0edw.js → chunk-mvd124vs.js} +2 -2
- package/dist/{chunk-evygj5ka.js → chunk-mwthxh95.js} +2 -2
- package/dist/{chunk-6c18ag8t.js → chunk-n9jaz2pd.js} +2 -2
- package/dist/{chunk-ecaedwda.js → chunk-nbaxn7jx.js} +2 -2
- package/dist/{chunk-ayhxrzsq.js → chunk-nhstvqjy.js} +2 -2
- package/dist/chunk-njwb0rbw.js +3 -0
- package/dist/{chunk-z1qcgb6b.js → chunk-nmtz0797.js} +3 -3
- package/dist/{chunk-2nb1475h.js → chunk-npev9ffr.js} +2 -2
- package/dist/{chunk-yc4cdg65.js → chunk-nvgnan7w.js} +2 -2
- package/dist/{chunk-n3sm0834.js → chunk-nypr6qtz.js} +2 -2
- package/dist/{chunk-rtbpfasb.js → chunk-pnh5t6pc.js} +2 -2
- package/dist/{chunk-cvx7r35k.js → chunk-pr36m3qx.js} +2 -2
- package/dist/{chunk-f4h84pav.js → chunk-q4nx04sy.js} +2 -2
- package/dist/chunk-q73jne25.js +2 -0
- package/dist/{chunk-df9aqj1m.js → chunk-qdyyvd2w.js} +1 -1
- package/dist/{chunk-62wxvxsg.js → chunk-qe4nwsn7.js} +1 -1
- package/dist/{chunk-jca8s47n.js → chunk-qghq84r4.js} +1 -1
- package/dist/{chunk-8ngg5vs4.js → chunk-qkv8wzq1.js} +3 -3
- package/dist/{chunk-3chhwwwy.js → chunk-qv23mh24.js} +2 -2
- package/dist/{chunk-bfwft1b8.js → chunk-qwet39v5.js} +2 -2
- package/dist/{chunk-2a4pq98d.js → chunk-qxssxzws.js} +1 -1
- package/dist/chunk-r3hsjwjn.js +2 -0
- package/dist/{chunk-29s4mnfw.js → chunk-r7paw6ba.js} +2 -2
- package/dist/{chunk-djd3sjp9.js → chunk-rff6c87z.js} +2 -2
- package/dist/{chunk-vgscp6dr.js → chunk-rn5bqc82.js} +3 -3
- package/dist/{chunk-kv1w4jx4.js → chunk-rqa21qrv.js} +2 -2
- package/dist/{chunk-dtgbgwby.js → chunk-rzxnxj25.js} +2 -2
- package/dist/{chunk-e7me5e6n.js → chunk-s0z838qq.js} +2 -2
- package/dist/{chunk-0rnh8mhs.js → chunk-s2k0g1hc.js} +2 -2
- package/dist/{chunk-7sp1yqfg.js → chunk-sdv06e2k.js} +1 -1
- package/dist/{chunk-6wkcqhkk.js → chunk-sjqhtpzr.js} +2 -2
- package/dist/{chunk-3hjcpcnv.js → chunk-stc4ctrx.js} +2 -2
- package/dist/{chunk-ggddhx5x.js → chunk-t3m57q06.js} +2 -2
- package/dist/{chunk-r6c9r5yy.js → chunk-tfj6v7y4.js} +1 -1
- package/dist/{chunk-q9mh8x4r.js → chunk-tsdb5jnj.js} +2 -2
- package/dist/{chunk-pk931bpm.js → chunk-tyka859b.js} +1 -1
- package/dist/{chunk-c1pvvk0x.js → chunk-v0h0jqej.js} +2 -2
- package/dist/{chunk-bv14x0e8.js → chunk-v581r9vt.js} +3 -3
- package/dist/{chunk-wjd2hpnd.js → chunk-v78f93yn.js} +2 -2
- package/dist/{chunk-1qjhvkg0.js → chunk-v9jqk03c.js} +2 -2
- package/dist/{chunk-1ycyexae.js → chunk-vsh9vh4s.js} +2 -2
- package/dist/{chunk-62qtrk0p.js → chunk-vx6shb4g.js} +2 -2
- package/dist/{chunk-1gv49jt9.js → chunk-w2xjhfm2.js} +3 -3
- package/dist/{chunk-ase4ejxz.js → chunk-w4bye56s.js} +2 -2
- package/dist/chunk-wd82qz3x.js +2 -0
- package/dist/{chunk-sjtfxn55.js → chunk-wdph90qk.js} +2 -2
- package/dist/{chunk-61awcdaq.js → chunk-wrfs7q9f.js} +4 -4
- package/dist/{chunk-ms0h8x63.js → chunk-wsyfhh7y.js} +2 -2
- package/dist/{chunk-2dm51ksz.js → chunk-wwj743gm.js} +2 -2
- package/dist/{chunk-hygvdjq6.js → chunk-wz6765xb.js} +2 -2
- package/dist/{chunk-f73x23f9.js → chunk-x4enakra.js} +2 -2
- package/dist/{chunk-q46z21zs.js → chunk-x621s275.js} +2 -2
- package/dist/{chunk-814h2ja2.js → chunk-x6m7zsg1.js} +3 -3
- package/dist/{chunk-nmd5x501.js → chunk-xadfbbwt.js} +2 -2
- package/dist/{chunk-g7cc7gdn.js → chunk-xdcp8tj9.js} +2 -2
- package/dist/{chunk-86821qec.js → chunk-xk0dt0es.js} +2 -2
- package/dist/{chunk-q9y0wjwp.js → chunk-xk306vq1.js} +2 -2
- package/dist/{chunk-v8x5atmn.js → chunk-xqpdvq05.js} +1 -1
- package/dist/{chunk-vvkp0jqa.js → chunk-xre7g1gy.js} +1 -1
- package/dist/chunk-xw6rsyvx.js +7 -0
- package/dist/{chunk-7ac4g54f.js → chunk-y93q3v30.js} +3 -3
- package/dist/{chunk-s2706gae.js → chunk-ymk7ampx.js} +1 -1
- package/dist/{chunk-ykz0h1r0.js → chunk-z8sheg2r.js} +2 -2
- package/dist/{chunk-86r89vrt.js → chunk-zm6b6zyr.js} +2 -2
- package/dist/{chunk-g8w06bdx.js → chunk-zsrjzx7g.js} +2 -2
- package/dist/{chunk-85tzkdsj.js → chunk-ztb6vjcg.js} +2 -2
- package/dist/{chunk-b4kh5nns.js → chunk-ztnq7bts.js} +2 -2
- package/dist/{chunk-s88eyv24.js → chunk-zwyd2bhy.js} +2 -2
- package/dist/{chunk-tj4b0s68.js → chunk-zz582m73.js} +2 -2
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.d.ts +1 -0
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/styles.css +26 -0
- 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/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/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/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/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.js +1 -1
- 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.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/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/mermaid/diagram.js +1 -1
- package/dist/mermaid/export.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/mermaid/preview.js +1 -1
- 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/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/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/host.js +1 -1
- package/dist/session-list/hover-info-card.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.js +1 -1
- package/dist/session-list/platform.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/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.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.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/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.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-3g9qb7vq.js +0 -2
- package/dist/chunk-ayademz2.js +0 -2
- package/dist/chunk-bydxp3zj.js +0 -7
- package/dist/chunk-c8wdf20g.js +0 -2
- package/dist/chunk-een4e2tr.js +0 -2
- package/dist/chunk-gyw21vnb.js +0 -2
- package/dist/chunk-jq6qs3s6.js +0 -2
- package/dist/chunk-k4xsxxy7.js +0 -2
- package/dist/chunk-mqpkm974.js +0 -2
- package/dist/chunk-qejm75d7.js +0 -2
- package/dist/chunk-tc3t2sgb.js +0 -3
- package/dist/chunk-tcs1a1hk.js +0 -2
- package/dist/chunk-v4qzxq4v.js +0 -2
- package/dist/chunk-x1mzrhtd.js +0 -2
- package/dist/chunk-y6p8xspr.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Aa,
|
|
1
|
+
import{Aa,Ii,Ti}from"../chunk-cn07a5nh.js";import"../chunk-stc4ctrx.js";import"../chunk-4h9ee02f.js";import"../chunk-50eym2q3.js";import"../chunk-xw6rsyvx.js";import"../chunk-6r5nzsw8.js";import"../chunk-zm6b6zyr.js";import"../chunk-mhv75thj.js";import"../chunk-05zhvfrp.js";import"../chunk-1e83qr49.js";import"../chunk-rff6c87z.js";import"../chunk-26w51q10.js";import"../chunk-v9jqk03c.js";import"../chunk-5ygqjna0.js";import"../chunk-dtxc0x7y.js";import"../chunk-g751pxzk.js";import"../chunk-x4enakra.js";import"../chunk-vsh9vh4s.js";import"../chunk-542c9tpr.js";import"../chunk-2qs1ss40.js";import"../chunk-x621s275.js";import"../chunk-zsrjzx7g.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{Ti as TimelineNavigationRail,Aa as navigationAudio,Ii as toNavigationRailItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{yi}from"../chunk-d29xbf16.js";import"../chunk-m8tt5bf9.js";import"../chunk-wf7kfk3p.js";export{yi as TurnPlan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gi,fi}from"../chunk-hcat58sr.js";export{gi as questionReply,fi as questionReplyParts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Wn,Bo,F}from"../chunk-5ygqjna0.js";import"../chunk-dtxc0x7y.js";import"../chunk-g751pxzk.js";import"../chunk-x4enakra.js";import"../chunk-vsh9vh4s.js";import"../chunk-542c9tpr.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{F as ResourceContent,Bo as browserDownload,Wn as chatFileName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mt}from"../chunk-
|
|
1
|
+
import{mt}from"../chunk-5cf6ny70.js";import"../chunk-qkv8wzq1.js";import"../chunk-hcat58sr.js";import"../chunk-5xe89qwh.js";import"../chunk-0n26qaxb.js";import"../chunk-d29xbf16.js";import"../chunk-mwthxh95.js";import"../chunk-v0h0jqej.js";import"../chunk-7v7wc7k5.js";import"../chunk-hgtbhvyh.js";import"../chunk-vx6shb4g.js";import"../chunk-wwj743gm.js";import"../chunk-rn5bqc82.js";import"../chunk-76c0cx40.js";import"../chunk-gec6q1jb.js";import"../chunk-rb4p3h5b.js";import{Aa}from"../chunk-cn07a5nh.js";import"../chunk-stc4ctrx.js";import"../chunk-200zk66j.js";import"../chunk-xqpdvq05.js";import"../chunk-js3nhatr.js";import"../chunk-b42vv8f2.js";import"../chunk-4h9ee02f.js";import"../chunk-50eym2q3.js";import"../chunk-e641842r.js";import"../chunk-xw6rsyvx.js";import"../chunk-6r5nzsw8.js";import"../chunk-zm6b6zyr.js";import"../chunk-mhv75thj.js";import"../chunk-05zhvfrp.js";import"../chunk-1e83qr49.js";import"../chunk-rff6c87z.js";import"../chunk-26w51q10.js";import"../chunk-v9jqk03c.js";import"../chunk-5ygqjna0.js";import"../chunk-dtxc0x7y.js";import"../chunk-g751pxzk.js";import"../chunk-x4enakra.js";import"../chunk-vsh9vh4s.js";import"../chunk-542c9tpr.js";import"../chunk-2qs1ss40.js";import"../chunk-x621s275.js";import"../chunk-x6m7zsg1.js";import"../chunk-bdrcreqs.js";import"../chunk-0ne2mz2q.js";import"../chunk-m6080rsp.js";import"../chunk-zz582m73.js";import"../chunk-wrfs7q9f.js";import"../chunk-79pvfyd0.js";import"../chunk-wz6765xb.js";import"../chunk-c092x92d.js";import"../chunk-pxv38ttf.js";import"../chunk-m8tt5bf9.js";import"../chunk-zsrjzx7g.js";import{$e}from"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";import"../chunk-qxssxzws.js";import"../chunk-xadfbbwt.js";export{mt as SessionTimeline,$e as TimelineProvider,Aa as navigationAudio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Je,
|
|
1
|
+
import{Je,ki,Si,_i}from"../chunk-76c0cx40.js";export{Si as clearTimeline,ki as publishTimeline,_i as revealTimelineTurn,Je as timelineRegistry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ci}from"../chunk-wwj743gm.js";import"../chunk-e641842r.js";export{Ci as projectTurnActivity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{oo,io}from"../chunk-hgtbhvyh.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{oo as ErrorCard,io as TurnErrorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hi}from"../chunk-5xe89qwh.js";export{hi as capacityRetryDelay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ea,
|
|
1
|
+
import{Ea,Mi,Ni,so,de,ft,ao,Ai,Ei,Ri,Li}from"../chunk-stc4ctrx.js";import"../chunk-50eym2q3.js";export{Ri as activeTurnKey,Ei as continuesTurn,Ni as groupTurns,ft as isHistoryInterrupted,so as isHistoryItem,Ea as isMcpStartup,Mi as isSessionStatus,ao as isTurnInterrupted,de as messageText,Li as turnPresentation,Ai as turnTiming};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Pi}from"../chunk-gec6q1jb.js";export{Pi as useTimelineScroll};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mi}from"../chunk-qkv8wzq1.js";import"../chunk-hcat58sr.js";import"../chunk-stc4ctrx.js";import"../chunk-50eym2q3.js";import"../chunk-5ygqjna0.js";import"../chunk-dtxc0x7y.js";import"../chunk-g751pxzk.js";import"../chunk-x4enakra.js";import"../chunk-vsh9vh4s.js";import"../chunk-542c9tpr.js";import"../chunk-m6080rsp.js";import"../chunk-zz582m73.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{mi as UserMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Wt,li,Zt}from"../chunk-5pyvgshe.js";import"../chunk-njwb0rbw.js";import"../chunk-3ek4vddd.js";import"../chunk-npev9ffr.js";import"../chunk-p781sb6h.js";import"../chunk-az3g3a94.js";import"../chunk-2fx3qhyb.js";import"../chunk-9ts08sma.js";import"../chunk-4gxpna3p.js";import"../chunk-e6ya95ee.js";import"../chunk-dypeezvv.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{Zt as CodexAccountCard,li as CodexAccountSummary,Wt as UsageLimitRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qt}from"../chunk-3ek4vddd.js";import"../chunk-e6ya95ee.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{Qt as LoginCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ns}from"../chunk-
|
|
1
|
+
import{Ns}from"../chunk-ag8696fb.js";import"../chunk-81hv0s07.js";import"../chunk-e6ya95ee.js";import"../chunk-h8r785ne.js";import"../chunk-5pmr5dby.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{Ns as ModelAliasSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ct
|
|
1
|
+
import{ct,qt,Kt}from"../chunk-81hv0s07.js";export{ct as MODEL_ALIASES_KEY,Kt as saveModelAlias,qt as useModelAliases};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{er,Tn,Mn,Nn,An,tr,nr,or,ir}from"../chunk-5pmr5dby.js";export{tr as AlwithAccountLogo,nr as ChatGPTLogo,er as ClaudeLogo,Tn as DeepSeekLogo,Mn as GrokLogo,or as MiniMaxLogo,Nn as OpenRouterLogo,An as QwenLogo,ir as SeedreamLogo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ii,Ms,ri,si,ai,eo}from"../chunk-4dp24aja.js";import"../chunk-5pyvgshe.js";import"../chunk-njwb0rbw.js";import"../chunk-3ek4vddd.js";import"../chunk-npev9ffr.js";import"../chunk-p781sb6h.js";import"../chunk-7xvrsw7x.js";import"../chunk-az3g3a94.js";import"../chunk-2fx3qhyb.js";import"../chunk-9ts08sma.js";import"../chunk-4gxpna3p.js";import"../chunk-jydhbkm8.js";import"../chunk-e6ya95ee.js";import"../chunk-h8r785ne.js";import"../chunk-5pmr5dby.js";import"../chunk-dypeezvv.js";import"../chunk-g4devj8d.js";import"../chunk-wf7kfk3p.js";export{eo as CustomProviderEditor,ii as ManagedProviderSection,ai as ProviderRow,Ms as ProviderSection,ri as ProviderTabs,si as TestFeedback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$i,qi,bn,qs,Cn,Ee}from"../chunk-7xvrsw7x.js";import"../chunk-jydhbkm8.js";import"../chunk-h8r785ne.js";import"../chunk-5pmr5dby.js";export{$i as PROVIDERS_CHANGED,qi as PROVIDERS_REVOKED,Cn as applyProvidersWhenIdle,qs as createManagedProvidersPort,bn as createProvidersPort,Ee as useProviders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A,yt,xt,
|
|
1
|
+
import{A,yt,xt,me,S,Js,ie,Pn,In,Xs,bt,Ys}from"../chunk-h8r785ne.js";import"../chunk-5pmr5dby.js";export{bt as MODEL_PRESENTATION,A as PROVIDERS,Xs as customModelEffort,S as gatewayModelId,yt as isAccountModel,xt as parseCustomModels,Ys as presentModel,In as providerApplicationPending,me as providerGroups,Pn as providerKeyUrl,ie as providerRegion,Js as resolveSessionModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{As,Es,Rs}from"../chunk-dxsjz3re.js";import"../chunk-
|
|
1
|
+
import{As,Es,Rs}from"../chunk-dxsjz3re.js";import"../chunk-4gxpna3p.js";import"../chunk-9ts08sma.js";import"../chunk-2fx3qhyb.js";import"../chunk-az3g3a94.js";import"../chunk-dypeezvv.js";import"../chunk-wf7kfk3p.js";import"../chunk-g4devj8d.js";import"../chunk-e6ya95ee.js";import"../chunk-njwb0rbw.js";import"../chunk-p781sb6h.js";import"../chunk-npev9ffr.js";import{Qt}from"../chunk-3ek4vddd.js";import{Wt,li,Zt}from"../chunk-5pyvgshe.js";import{Tn,Mn,Nn,An}from"../chunk-5pmr5dby.js";import{A,yt,xt,me,S,Js,ie,Pn,In,Xs,bt,Ys}from"../chunk-h8r785ne.js";import"../chunk-jydhbkm8.js";import{$i,qi,bn,qs,Cn,Ee}from"../chunk-7xvrsw7x.js";import{ii,Ms,ri,si,ai,eo}from"../chunk-4dp24aja.js";import{ct,qt,Kt}from"../chunk-81hv0s07.js";import{Ns}from"../chunk-ag8696fb.js";export{Zt as CodexAccountCard,li as CodexAccountSummary,eo as CustomProviderEditor,Tn as DeepSeekLogo,Mn as GrokLogo,Qt as LoginCard,ct as MODEL_ALIASES_KEY,bt as MODEL_PRESENTATION,ii as ManagedProviderSection,Ns as ModelAliasSettings,Nn as OpenRouterLogo,A as PROVIDERS,$i as PROVIDERS_CHANGED,qi as PROVIDERS_REVOKED,ai as ProviderRow,Ms as ProviderSection,ri as ProviderTabs,An as QwenLogo,si as TestFeedback,Wt as UsageLimitRow,Cn as applyProvidersWhenIdle,As as codexSettingsBridge,qs as createManagedProvidersPort,bn as createProvidersPort,Rs as createSettingsBridgeClient,Xs as customModelEffort,S as gatewayModelId,yt as isAccountModel,xt as parseCustomModels,Ys as presentModel,In as providerApplicationPending,me as providerGroups,Pn as providerKeyUrl,ie as providerRegion,Js as resolveSessionModel,Kt as saveModelAlias,Es as serveSettingsBridge,qt as useModelAliases,Ee as useProviders};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
"@dnd-kit/sortable": "^10.0.0",
|
|
412
412
|
"@dnd-kit/utilities": "^3.2.2",
|
|
413
413
|
"@floating-ui/dom": "^1.8.0",
|
|
414
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
414
|
+
"@nyssance/codex-acp-v2": "^0.7.71",
|
|
415
415
|
"@nyssance/shadcn": "^4.23.4",
|
|
416
416
|
"@shadcn/react": "^0.3.1",
|
|
417
417
|
"@solar-icons/react": "^2.6.0",
|
package/dist/chunk-3g9qb7vq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{vr,ee}from"./chunk-fhjk81r9.js";import{Co}from"./chunk-ecaedwda.js";import{So}from"./chunk-r6ns1457.js";import{Fn}from"./chunk-6wkcqhkk.js";import{mr,wo}from"./chunk-bv14x0e8.js";import{pr}from"./chunk-q9mh8x4r.js";import{On}from"./chunk-kztrgv9y.js";import{ge}from"./chunk-q9y0wjwp.js";import{nt,De}from"./chunk-r6c9r5yy.js";import{ko}from"./chunk-e2qjbqq2.js";import{me,Dn}from"./chunk-29s4mnfw.js";import{configRevisionOf as M,isBooleanOption as S,isGroupedSelect as v,isImage as O,isSelectOption as g,mergeMeta as f,runStateSource as R}from"@nyssance/codex-acp-v2/client";var b={id:"chatgpt",name:"ChatGPT"};function y(e){return e===null?void 0:{alwith:{model:e}}}function h(e){let s=e.find((t)=>t.category==="model"&&t.type==="select");return s?.type==="select"&&typeof s.currentValue==="string"?s.currentValue:null}class dr extends Co{async executeShell(e,s){let t=this.session(e);if(!t.attached||t.restoring||t.readOnly||t.state!=="idle")throw Error("The session is not ready for a shell command");await this.codexCapabilities.executeShell(e,s),this.materializeDraft(e)}modelListeners=new Set;confirmedModelListeners=new Set;savedModels={main:null,chat:null};slotModels={main:null,chat:null};slotTargets={main:null,chat:null};slotVersions={main:0,chat:0};draftDirectoryIntents=new Map;draftOperations=new Map;gatewayModels=new Map;configOwners=new Map;openingOwners=new Map;schedulingConfig=new Set;replayRepairs=new Map;accountRevocations=new Map;accountRecoveries=new Map;resolveModelOption;constructor(e,s){let{resolveModel:t,imageService:i,...n}=s;super(e,n,{sessionWindows:{},draftSessions:{},modelRecovery:{},nativeModels:[]});this.resolveModelOption=t,this.imageService=i,this.imageTool=i?pr(i,(o)=>this.imageRequests.get(o)):void 0}imageTool;imageService;inputModes=new Map;inputSelections=new Map;async readInputConfig(e){let s=this.live(),t=await s.request("_codex/session_input_config_get",{sessionId:e});if(s!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,t)}async writeInputConfig(e,s){let t=this.live(),i=await t.request("_codex/session_input_config_set",{sessionId:e,inputConfig:s});if(t!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,i)}acceptInputConfig(e,s){let t=On(s,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=t.inputConfig;if(i&&nt(i.mode)){if(De(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,ge.parseConfig(i.config))}return t}imageRequests=new Map;prompt(e,s,t={}){if(!this.imageService)return super.prompt(e,s,t);if(!this.inputModes.has(e))return this.imageService.inputMode(e).then((i)=>(this.inputModes.set(e,i),this.prompt(e,s,t)));return De(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageIntent:null,applicationContext:De("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,s,t)})}promptImage(e,s,t){if(!this.imageService)throw Error("Image service is not connected");wo(t.meta?.alwith?.imageAspectRatio);let i=t.meta?.alwith?.imageSelection;if(i!==void 0)ee(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};ee(o);let a=crypto.randomUUID();return this.promptImages.set(a,new Map(s.flatMap((r,c)=>O(r)?[[`attachment:${c}`,`data:${r.mimeType};base64,${r.data}`]]:[]))),super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageSelection:o,imageRequestId:a,applicationContext:ge.applicationContext(t.meta?.alwith?.imageIntent??"generate",mr),imageIntent:t.meta?.alwith?.imageIntent??"generate"}})}).finally(()=>this.promptImages.delete(a))}promptMeta(e,s){let t=s.meta?.alwith?.imageSelection;if(this.inputModes.get(e)==="image"&&t&&this.imageService&&(this.session(e).state==="idle"||!this.imageRequests.has(e))){let i=new Map(vr(this.session(e)).map((o)=>[o.id,o.src]));for(let[o,a]of this.promptImages.get((s.meta?.alwith).imageRequestId)??[])i.set(o,a);let n=wo((s.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:t,references:i,...n?{aspect:n}:{}})}return ko(super.promptMeta(e,s))}promptImages=new Map;promptWithImages(e,s,t={}){return this.prompt(e,s,{...t,meta:f({alwith:{imageIntent:"generate"}},t.meta)})}async applicationToolsFor(e){let s=await super.applicationToolsFor(e),t=e.options.meta?.alwith;return[...s,...t?.nativeTools?.imageGeneration===!1&&this.imageTool?[this.imageTool]:[]]}releaseImages(e){this.imageRequests.delete(e)}onDisconnected(){for(let e of this.imageRequests.keys())this.releaseImages(e);this.promptImages.clear(),super.onDisconnected(),this.setApp({nativeModels:[]})}async cancel(e){this.releaseImages(e),await super.cancel(e)}async close(e){this.releaseImages(e),await super.close(e)}async stopSession(e){this.releaseImages(e),await super.stopSession(e)}setApp(e){this.store.setState(e)}applyRunStates(e,s="event"){let t=this.state.runStates,i=e.map((n)=>{let o=t[n.sessionId];return o&&JSON.stringify(o)===JSON.stringify(n)?o:n});if(R(t)===s&&i.length===Object.keys(t).length&&i.every((n)=>n===t[n.sessionId]))return;super.applyRunStates(i,s)}enqueueSession(e,s,t=!0){let i=!t&&!this.schedulingConfig.has(e);return super.enqueueSession(e,()=>{let n=()=>{let r=this.holds(e)?h(this.session(e).configOptions):null;return s().then(async(c)=>{if(this.holds(e)&&h(this.session(e).configOptions)!==r)await this.normalizeCustomEffort(e,!0);return c})},o=()=>{let r=i?this.normalizeCustomEffort(e,!1):void 0;return r?r.then(n):n()},a=t?void 0:this.replayRepairs.get(e)?.promise;return a?a.then(o):o()},t)}customEffortChange(e,s,t=!1,i){if(!this.holds(e))return;let n=this.session(e);if(!n.attached||n.readOnly)return;let o=h(n.configOptions),a=So(o);if(!a)return;let r=n.configOptions.find((p)=>p.category==="thought_level"&&g(p)),c,d;if(r&&g(r)){let p=v(r.options)?r.options.flatMap((l)=>l.options):r.options;if(r.currentValue===a.value||!s&&p.some((l)=>l.value===r.currentValue))return;if(!p.some((l)=>l.value===a.value))throw Error(`The model does not advertise its default effort: ${o}`);c=r.configId,d=!s&&i!==void 0&&p.some((l)=>l.value===i)?i:a.value}else{if(!a.hidden||!t||o===null)return;let p=n.configOptions.find((l)=>l.category==="model");if(!p)throw Error("The custom model has no model option");c=p.configId,d=o}return{configId:c,value:d}}normalizeCustomEffort(e,s,t=!1,i){let n=this.customEffortChange(e,s,t,i);return n?this.writeCustomEffort(e,n.configId,n.value):void 0}async writeCustomEffort(e,s,t){let i=this.live(),n=this.lifecycle.capture(e),o=await i.request("session/set_config_option",{sessionId:e,configId:s,type:"id",value:t});if(i!==this.agent||!this.lifecycle.isCurrent(n))throw Error("Effort configuration belongs to a retired session");this.publishSession({...this.session(e),configOptions:o.configOptions,configRevision:M(o)??this.session(e).configRevision})}async afterSessionCreated(e){await super.afterSessionCreated(e);try{await super.enqueueSession(e,async()=>this.normalizeCustomEffort(e,!0,!0),!1)}catch(s){try{await this.delete(e)}catch(t){throw AggregateError([s,t],"Failed to initialize and clean up the custom model session",{cause:t})}throw s}}replay(e,s,t){let i=this.replayRepairs.get(e);if(i?.cwd===s)return i.promise;let n=this.replayWithEffort(e,s,t);this.replayRepairs.set(e,{cwd:s,promise:n});let o=()=>{if(this.replayRepairs.get(e)?.promise===n)this.replayRepairs.delete(e)};return n.then(o,o),n}async replayWithEffort(e,s,t){let i=this.holds(e)?this.session(e).configOptions:[],n=i.find((a)=>a.category==="thought_level")?.currentValue;await super.replay(e,s,t);let o=this.lifecycle.capture(e);try{await this.normalizeCustomEffort(e,!1,!0,h(i)===h(this.session(e).configOptions)&&typeof n==="string"?n:void 0)}catch(a){if(this.holds(e)&&this.lifecycle.isCurrent(o))this.publishSession({...this.session(e),attached:!1,restoring:!1});throw a}}async connect(){if(await super.connect(),this.state.projectContext===null)await this.refreshProjectContext()}async listProjectSessions(e){await this.listSessions();let s=this.projectPath(e),t=this.sessionGroup({cwd:s}).id;return this.state.sessionList.filter((i)=>this.sessionGroup(i).id===t)}async newSession(e,s=null,t="main"){if(s!==null&&typeof s==="object")return super.newSession(e,s);let i=++this.slotVersions[t],n=await this.createNativeSession(e,await this.resolveModel(s),null);return this.activateSlot(t,n,i),n}async createNativeSession(e,s,t,i="chat"){let n=await super.newSession(e,{draft:t!==null,meta:f(y(s),this.imageService||t!==null?{alwith:{...this.imageService?{inputMode:i}:{},...t===null?{}:{draft:!0}}}:void 0)});if(t!==null)this.draftDirectoryIntents.set(n,e),this.setApp((o)=>({draftSessions:{...o.draftSessions,[n]:t}}));return this.noteModel(this.session(n)),n}async open(e,s,t="main"){if(typeof t!=="string")return super.open(e,s,t);if(t==="chat"&&this.imageService&&(this.inputModes.get(e)??await this.imageService.inputMode(e))==="image")throw Error("Image conversations must be opened in the main window");this.bindSlot(t,e),++this.slotVersions[t];let i=this.holds(e)?this.session(e):void 0;if(i?.attached&&(!this.imageService||this.inputModes.has(e))&&!i.restoring&&!i.readOnly&&!this.lifecycle.operations.busy(e)&&!this.replayRepairs.has(e)){this.followModel(t,i);return}await this.replayForOwner(e,s,t)}async replayForOwner(e,s,t){this.openingOwners.set(e,t);try{await this.replay(e,s)}finally{if(this.openingOwners.get(e)===t)this.openingOwners.delete(e)}}async requestContext(e,s,t){if(this.imageService){let i=s.kind==="resume"?s.sessionId:s.kind==="fork"?s.sourceSessionId:null,n=i===null?t.meta?.alwith?.inputMode??"chat":await this.imageService.inputMode(i),o=De(n),a=ko(t.meta),r={...a?.alwith,nativeTools:o.nativeTools};delete r.tools;let c=await this.requestModelContext(e,s,{...t,meta:{...a,alwith:r}});return{...c,bind:async(d)=>{await c.bind?.(d),this.inputModes.set(d,n)}}}return this.requestModelContext(e,s,t)}async requestModelContext(e,s,t){if(s.kind!=="resume"||t.meta?.alwith?.model!==void 0)return super.requestContext(e,s,t);let i=s.sessionId,n=this.holds(i)?this.session(i):void 0,o=(n?h(n.configOptions):null)??this.gatewayModels.get(i)??null,a=await this.resolveModel(o),r=o===null?null:a;return super.requestContext(e,s,{...t,meta:f(y(r),t.meta)})}async recoverReplay(e,s,t,i){let n=me(t);if(!n&&!Dn(t))return super.recoverReplay(e,s,t,i);try{await super.afterResume(e,s,i)}catch(o){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;this.setApp((a)=>({historyPages:{...a.historyPages,[e]:{cursor:null,loading:!1,error:o instanceof Error?o.message:String(o)}}}))}if(n){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:t.reason??t.message,data:t.data},meta:null}}),!0}if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.accountRevocations.set(e,(this.accountRevocations.get(e)??0)+1),this.setApp((o)=>({modelRecovery:{...o.modelRecovery,[e]:!0}})),this.publishSession({...this.session(e),cwd:s,attached:!1,restoring:!1,readOnly:!0}),!0}markAccountModelsUnavailable(e){this.setApp((s)=>({modelRecovery:{...s.modelRecovery,...Object.fromEntries(e.map((t)=>[t,!0]))}}));for(let s of e){if(this.accountRevocations.set(s,(this.accountRevocations.get(s)??0)+1),!this.holds(s))continue;this.publishSession({...this.session(s),attached:!1,readOnly:!0})}}async resumeModel(e,s){let t=this.session(e);if(!this.state.modelRecovery[e]&&(t.attached||!me(t.error?.error)))throw Error("Model recovery is not required");if(!s)throw Error("Select a model before continuing");let i=this.accountRevocations.get(e)??0,n=await this.resolveModel(s);if(!n)throw Error("The selected provider connection or model is unavailable");if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");this.accountRecoveries.set(e,i);try{await this.replay(e,t.cwd,{meta:{alwith:{model:n,accountModelSelection:!0}}})}catch(a){if(this.holds(e)&&this.state.modelRecovery[e])this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!0});throw a}finally{this.accountRecoveries.delete(e)}if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");let o=this.session(e);if(!o.attached||o.readOnly)throw Error(o.error?.error?.message??"Cannot resume this conversation");this.accountRevocations.delete(e),this.setApp((a)=>{let{[e]:r,...c}=a.modelRecovery;return{modelRecovery:c}}),this.confirmModel(this.state.sessionWindows[e]??"main",o)}setConfig(e,s,t,i="main"){this.configOwners.set(`${e}:${s}`,i),this.schedulingConfig.add(e);try{return super.setConfig(e,s,t)}finally{this.schedulingConfig.delete(e)}}onConfigChanged(e,s,t){super.onConfigChanged(e,s,t),this.noteModel(this.session(e));let i=this.configOwners.get(`${e}:${s}`)??"main";if(this.configOwners.delete(`${e}:${s}`),t.configOptions.some((n)=>n.configId===s&&n.category==="model"))this.confirmModel(i,this.session(e))}changeDraft(e,s){let t=Promise.allSettled(e.map((i)=>this.draftOperations.get(i)).filter((i)=>i!==void 0)).then(s);for(let i of e)this.draftOperations.set(i,t);return t}prepareDraft(e,s,t=null,i=!1,n="chat"){if(e==="chat"&&n!=="chat")throw Error("The floating chat only supports chat input");let o=++this.slotVersions[e];return this.changeDraft([e],async()=>{let a=s??(await this.refreshProjectContext(!0)).chatDirectory,r=Object.keys(this.state.draftSessions).find((l)=>this.state.draftSessions[l]===e);if(r)await this.lifecycle.admission.pending(r);let c=t??(r?h(this.session(r).configOptions):this.savedModels[e]??this.slotModels[e]),d=i?null:await this.resolveModel(c,t===null?"draft":"session");if(r&&(this.inputModes.get(r)??"chat")===n&&this.session(r).cwd===a&&(!this.draftDirectoryIntents.has(r)||this.draftDirectoryIntents.get(r)===s)&&!i&&!this.state.modelRecovery[r]&&(d===null?!h(this.session(r).configOptions)?.startsWith("gateway:"):h(this.session(r).configOptions)===d)){if(this.activateSlot(e,r,o),!this.session(r).attached)await this.replayForOwner(r,a,e);if(t!==null)this.confirmModel(e,this.session(r));return r}let p=await this.createNativeSession(s,d,e,n);try{if(r&&this.session(r).cwd===a)for(let l of this.session(r).configOptions){if(l.category==="model")continue;if(l.category==="thought_level"&&h(this.session(r).configOptions)!==h(this.session(p).configOptions)&&So(h(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((w)=>w.configId===l.configId);if(!u||u.currentValue===l.currentValue)continue;if(S(l)&&S(u))await this.setConfig(p,l.configId,l.currentValue);else if(g(l)&&g(u)){if((v(u.options)?u.options.flatMap((m)=>m.options):u.options).some((m)=>m.value===l.currentValue))await this.setConfig(p,l.configId,l.currentValue)}}if(r)await this.deleteEmptyDraft(r)}catch(l){throw await this.deleteEmptyDraft(p),l}if(this.activateSlot(e,p,o),t!==null||i||c!==null&&c!==d)this.confirmModel(e,this.session(p));return p})}discardDraft(e){if(e!=="main"&&e!=="chat")return super.discardDraft(e);return this.changeDraft([e],async()=>{for(let[s,t]of Object.entries(this.state.draftSessions))if(t===e)await this.deleteEmptyDraft(s)})}transferDraft(e,s){return this.changeDraft(["main","chat"],async()=>{if(s==="chat"&&this.inputModes.get(e)==="image")throw Error("Image conversations must remain in the main window");if(!this.state.draftSessions[e]||this.state.draftSessions[e]===s)return;for(let[t,i]of Object.entries(this.state.draftSessions))if(i===s)await this.deleteEmptyDraft(t);this.setApp((t)=>t.draftSessions[e]?{draftSessions:{...t.draftSessions,[e]:s}}:{})})}deleteEmptyDraft(e){return this.enqueueSession(e,async()=>{if(!this.state.draftSessions[e])return;await this.delete(e),this.gatewayModels.delete(e)})}onDraftMaterialized(e){super.onDraftMaterialized(e),this.draftDirectoryIntents.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions;return{draftSessions:i}}),this.noteModel(this.session(e))}onSessionDropped(e){super.onSessionDropped(e),this.inputModes.delete(e),this.inputSelections.delete(e),this.draftDirectoryIntents.delete(e),this.gatewayModels.delete(e),this.accountRevocations.delete(e),this.accountRecoveries.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions,{[e]:n,...o}=s.sessionWindows,{[e]:a,...r}=s.modelRecovery;return{draftSessions:i,sessionWindows:o,modelRecovery:r}})}fork(e,s,t){let i=typeof t==="object"?t:t===void 0?{}:{lastTurnId:t};return super.fork(e,s,i)}async forkInternal(e,s,t){let n=[...(await Promise.all([this.indexSessions(),this.indexSessions(void 0,!0)])).flat(),...this.state.sessionList,...this.state.archivedSessions],o=(this.holds(e)?this.session(e).title:null)??n.find((c)=>c.sessionId===e)?.title,a=await super.forkInternal(e,s,{...t,meta:f(y(this.gatewayModels.get(e)??null),t.meta)});await super.enqueueSession(a,async()=>this.normalizeCustomEffort(a,!1,!0),!1);let r=o??this.session(a).title;if(r)await this.renameSession(a,Fn(r,n.flatMap((c)=>c.title?[c.title]:[])));return a}onForked(e,s){super.onForked(e,s),this.noteModel(this.session(e))}onReplayed(e,s){super.onReplayed(e,s);let t=this.accountRevocations.get(e);if(t!==void 0&&this.accountRecoveries.get(e)!==t)this.markAccountModelsUnavailable([e]);this.noteModel(this.session(e))}setModelSelections(e){this.savedModels={...e},this.slotModels={...e}}onConfirmedModel(e){return this.confirmedModelListeners.add(e),()=>this.confirmedModelListeners.delete(e)}onSessionChanged(e){super.onSessionChanged(e);let s=this.accountRevocations.get(e.id);if(s!==void 0&&this.accountRecoveries.get(e.id)!==s&&(e.attached||!e.readOnly)){this.publishSession({...e,attached:!1,readOnly:!0});return}this.followModel("main",e),this.followModel("chat",e)}followModel(e,s){if(this.slotTargets[e]!==s.id||!s.attached||s.restoring)return;let t=h(s.configOptions);if(t!==null)this.slotModels[e]=t}activateSlot(e,s,t){if(this.slotVersions[e]!==t)return;this.bindSlot(e,s),this.followModel(e,this.session(s))}bindSlot(e,s){let t=e==="main"?"chat":"main";if(this.slotTargets[t]===s)this.slotTargets[t]=null,++this.slotVersions[t];this.slotTargets[e]=s,this.setApp((i)=>({sessionWindows:{...i.sessionWindows,[s]:e}}))}confirmModel(e,s){let t=h(s.configOptions);if(t===null)throw Error("Model selection did not return the current model");this.followModel(e,s),this.savedModels[e]=t;for(let i of this.confirmedModelListeners)i(e,t)}resolveModel(e,s="session"){return this.resolveModelOption?this.resolveModelOption(e,s):Promise.resolve(e)}onSessionModel(e){return this.modelListeners.add(e),()=>this.modelListeners.delete(e)}noteModel(e){let s=h(e.configOptions);if(s===null)return;let t=e.configOptions.find((n)=>n.category==="model"&&n.type==="select");if(t&&g(t)){let o=(v(t.options)?t.options.find((a)=>a.groupId===b.id)?.options??[]:t.options.filter((a)=>!a.value.startsWith("gateway:"))).map((a)=>({id:a.value,label:a.name}));if(JSON.stringify(o)!==JSON.stringify(this.state.nativeModels))this.setApp({nativeModels:o})}let i=t!==void 0&&g(t)&&t.options.some((n)=>("groupId"in n)&&n.groupId!==b.id&&n.options.some((o)=>o.value===s));if(i)this.gatewayModels.set(e.id,s);else this.gatewayModels.delete(e.id);if(!this.state.draftSessions[e.id])for(let n of this.modelListeners)n(e.id,s,i)}}
|
|
2
|
-
export{b,dr};
|
package/dist/chunk-ayademz2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Xn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function ni(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Xn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Xn,ni};
|
package/dist/chunk-bydxp3zj.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{is}from"./chunk-1ycyexae.js";import{xe}from"./chunk-f73x23f9.js";import{Bo}from"./chunk-56rx2rmj.js";import{C}from"./chunk-rx84h0c2.js";import{Ko}from"./chunk-g8w06bdx.js";import{Ce,Zo}from"./chunk-pdmayjan.js";import{Oo}from"./chunk-wkrnbk0p.js";import{es,ts}from"./chunk-1qjhvkg0.js";import{Qr}from"./chunk-m8pkmbtf.js";import{Fo,Jr}from"./chunk-86r89vrt.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as v}from"entities";import ce from"katex";import{CheckIcon as z,ChevronLeftIcon as de,ChevronRightIcon as le,CopyIcon as ue,DownloadIcon as me,FileIcon as ge,LinkIcon as fe,MailIcon as pe,XIcon as he}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as B,createElement as D,memo as X,startTransition as ke,useContext as G,useEffect as k,useLayoutEffect as J,useMemo as V,useRef as w,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as se}from"react/jsx-runtime";var Z=B(!1),Y=B(null);function y(){let e=G(Y);if(e===null)throw Error("Markdown host is missing");return e}var we=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,be=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,Te=/\uE200[^\uE201]*$/,ve=4,ye=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 L(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function Q(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Me(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)&&!Q(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function Ne(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!L(e,t)&&!Q(e,t,n))return t;return-1}function Le(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Ee(e){return Le(e,"```")%2===1}function ee(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]==="`"&&!L(e,t))n+=1;t+=1}return n%2===1}function Ie(e){return e.endsWith(`
|
|
2
|
-
`)?`${e}\`\`\``:`${e}
|
|
3
|
-
\`\`\``}function _(e,n){if(!e.includes(n)||Me(e,n)%2===0)return e;let t=Ne(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
|
-
`)||ee(r))return e;return`${e}${n}`}function $e(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function ne(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 Re(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=ne(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>ve&&!ye.has(u))return!1}return!0}function Pe(e){let{path:n}=ne(e);if($e(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Se(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 Re(t)||Pe(t)?e.replace(H,"$1"):`${e})`}function Ae(e){let n=e.replace(Te,"");if(n.length===0||n.includes("`")&&ee(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Ee(n))return{isCodeFenceOpen:!0,markdown:Ie(n)};if(n.includes(")n=Se(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Fe(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return Fe(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function te(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))te(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 He(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"?He(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function _e(e,n){let t;try{t=Ko(e,n)}catch{return}try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}function Oe({links:e,children:n}){let t=y(),r=Zo();if(t.preview||!r)return a("p",{className:"codex-markdown-paragraph",children:n});return a(ts,{links:e})}function je(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function We(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function qe(e){let n=We(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Ke({href:e}){let n=V(()=>qe(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?pe:o?ge:fe;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 Ue({children:e,href:n,title:t}){let r=y(),o=Ce();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:_e(n,o)??t,onClick:(s)=>je(s,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(Ke,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function ze({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=w(null),[c,d]=h(null),[u,p]=h(null),[E,b]=h(!1);if(k(()=>{let g=Qr(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 x=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:E?a(z,{}):a(ue,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function Be({code:e,language:n}){let t=y(),r=G(Z),o=Zo();if(t.preview)return a("span",{children:e});if(!r&&o&&n?.toLowerCase()==="mermaid")return a(Oo,{source:e});return a(De,{code:e,language:n})}function De({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(ze,{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 Xe(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 Ge({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(de,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(me,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(le,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(he,{})})]})]})}function Je(e){return y().preview?a(se,{children:e.alt}):a(Ve,{...e})}function Ve({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(se,{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(Xe(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(Ge,{preview:s,setPreview:i})})]})}function Ze({value:e,display:n}){let t=w(null);return J(()=>{if(t.current===null)throw Error("Codex math root is not mounted");ce.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 Ye=150,M=null;function W(e,n){let t=M;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 re(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 Qe(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 oe(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${re(Qe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=oe(r),s=t.get(o)??0;return t.set(o,s+1),ae(r,`${n}-${o}-${s}`)})}function en(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function nn(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 D(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 tn(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=re(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 U(e,n,t){let r=N(e.href);if(!Bo(r))return null;return a(Je,{src:r,alt:v(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function ae(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 D(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((c)=>c.type!=="space"&&c.type!=="br"),o=t.tokens.filter((c)=>c.type!=="text"||c.raw.trim().length>0);if(o.length>0&&o.every(es))return a(Oe,{links:o,children:m(t.tokens,n)},n);let s=r.length>0&&r.every((c)=>c.type==="image"),i=s&&r.length>1;return a("p",{className:`codex-markdown-paragraph${s?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${i?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":i?"true":void 0,"data-wide-markdown-block":s?"true":void 0,"data-wide-markdown-block-kind":s?"image":void 0,children:s?r.map((c,d)=>U(c,`${n}-image-${d}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(is,{text:v(t.text),children:W(v(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=C(o);if(s!==null)return a(xe,{app:{id:s,name:v(t.text).replace(/^\$/,"")}},n);return Bo(o)?a(Ue,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return U(e,n,!1);case"code":{let t=e;return a(Be,{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 nn(e,n);case"list_item":return en(e,n);case"table":return tn(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(Ze,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function T(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?v(n.text):n.tokens.map(T).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(T).join("");case"list":return e.items.map(T).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(T).join("")).join("")).join("")}default:return""}}function rn({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=M;try{return M={cursor:t,runs:r,generation:o},ae(e,n)}finally{M=s}}var on=X(function({result:n}){let{text:t,isStreaming:r}=n,o=V(()=>{let l=n.tokens;if(n.source.includes("!["))te(l);P(l);let g=new Map,S=0;return l.map((I)=>{let R=oe(I),A=g.get(R)??0;g.set(R,A+1);let F=T(I),ie={token:I,tokenKey:`root-${R}-${A}`,offset:S,visibleText:F};return S+=F.length,ie})},[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(),E=r&&d?c.runs.filter((l)=>p-l.firstSeenAtMs<Ye):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:E.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:b};if(r&&s.length>u)x.runs.push({start:u,end:s.length,firstSeenAtMs:p});return J(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(rn,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:x.runs,generation:b},l.tokenKey))})}),an=X(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>Fo(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let u=Jr((p)=>{if(!i.current)i.current=!0,s(p);else ke(()=>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?Ae(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(on,{result:o})});function Dt({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(Y.Provider,{value:t,children:a(Z.Provider,{value:r,children:a(an,{text:r?o:e,isStreaming:r})})})}
|
|
7
|
-
export{Dt};
|
package/dist/chunk-c8wdf20g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{xs}from"./chunk-2a4pq98d.js";import{Wo,$e,t,qe,o,ae}from"./chunk-pdmayjan.js";import{Mi,ft,so,Ei,Ri}from"./chunk-3hjcpcnv.js";import{gt}from"./chunk-rb4p3h5b.js";import{hi}from"./chunk-csfqkzmr.js";import{Fi}from"./chunk-5s85tvas.js";import{Pi,Ii}from"./chunk-gawrkkbf.js";import{wi,ki}from"./chunk-rr9kc3n8.js";import{fi}from"./chunk-tec9yhsm.js";import{_i}from"./chunk-16db8fh2.js";import{pi}from"./chunk-8ngg5vs4.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as Oe,nativeTurnId as ve}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as Te,useMemo as K,useRef as h,useState as U}from"react";import{flushSync as ye}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 xe=24;function De(e){let d=Math.max(0,e.turnTopPx-xe),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ke({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 Ue({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=qe(),{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((_)=>{if(_.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 _e(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:Mi(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function mt(e){return i($e,{host:e.host,client:e.client,children:i(Wo,{value:e.session.cwd,children:i(We,{...e})})})}function We({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=Ke}){let v=qe(),A=t(),T=o((n)=>n.historyNavigation[e.id]),he=K(()=>e.commands.map((n)=>n.name),[e.commands]),c=_e(e,T?.turns),L=c.at(-1)?.key,be=Ei(e,c),y=e.state==="running"||e.state==="requires_action",W=K(()=>Fi(c,T),[c,T]),Z=K(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),we=K(()=>S===void 0?[]:Pi(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,Re]=U(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),Se=o((n)=>ze(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]=U(!1),O=h(null),[Ie,ne]=U(!1),re=h(0),X=h({key:L,running:y});X.current={key:L,running:y};let[ie,F]=U(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:ue,cancelLocation:se}=_i(l,y,Ne),ce=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ue(!0),u=()=>a.isCurrent()&&X.current.running&&X.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let p=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(p===null)return;let m=l.scrollTop+p.getBoundingClientRect().top-l.getBoundingClientRect().top,P=De({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=P.spacerPx>0?{element:p,heightPx:p.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,ye(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),f=O.current;if(f===null)return;f.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ue,y,l,c]);Te(()=>{if(!w||y)return;se(),N.current=null,I.current=0,F(0)},[w,se,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(()=>{wi({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>ki(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)=>ve(P)===n.nativeTurnId));if(!r?.user)return null;let f=r.user.id,p=O.current;if(p===null)throw Error("Virtual timeline is not mounted");return await p.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(f)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(f)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),Ee=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 f=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(f!==I.current&&(f<I.current||u.keepTop)){if(I.current=f,ye(()=>F(f)),f===0)N.current=null}if(f>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-xe}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 de=h(null);Te(()=>{if(l===null)return;let n=c.at(-1),a=de.current;if(de.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),ce()}else if(n.key!==a.key)G()},[ce,w,y,G,l,e.turnEndedAt,c]);let Ae=(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(Ue,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Ie})}let f=c.indexOf(r),p=r.key===be,m=Ri(e,c,f),P=!p&&m.continued,D=r.key===L,q=r.errors.at(-1),me=q===void 0?null:Ve(q),Q=q===void 0?null:ve(q),Le=!e.subagent&&D&&!p&&k&&Se&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&me!==null&&Oe(me).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",fe=z?.(r)??null,pe=s?.(r)??null,Ce=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||p||fe!==null||ft(r)||so(r)||D&&(e.error!==null||e.lastStopReason==="cancelled"),ge=r.user===null?null:gt(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(pi,{item:r.user,messageTime:ge,skillNames:he}):V(r.user,ge)),Ce&&i(hi,{sessionId:e.id,turn:r,terminals:e.terminals,active:p,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:D,error:e.error,retrying:p?Be(e._meta)??void 0:void 0,retry:Le?{turnId:Q,delaySeconds:fi(c),run:(Me)=>v.retrySession(e.id,Q,Me)}:void 0,interrupted:so(r)||!p&&D&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:fe}),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(_,{viewportRef:Re,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(xs,{ref:O,entries:W,renderTurn:Ae,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(Ii,{items:we,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ee,onRevealError:(n)=>ae(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{mt};
|
package/dist/chunk-een4e2tr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Br}from"./chunk-6c18ag8t.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Ks({host:o,children:t}){return s(n,{value:o,children:t})}function N(){let o=i(n),e={...Br(),...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 qi(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function ue(){let o=N();return(t)=>qi(o,t)}function Ki(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{Ks,N,qi,ue,Ki};
|
package/dist/chunk-gyw21vnb.js
DELETED
package/dist/chunk-jq6qs3s6.js
DELETED
package/dist/chunk-k4xsxxy7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ji}from"./chunk-6ehhap9k.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Qi({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=Ji(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
-
export{Qi};
|
package/dist/chunk-mqpkm974.js
DELETED
package/dist/chunk-qejm75d7.js
DELETED
package/dist/chunk-tc3t2sgb.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Qi}from"./chunk-k4xsxxy7.js";import{Zi}from"./chunk-swt6dntp.js";import{Wi}from"./chunk-easm0z49.js";import{Lt}from"./chunk-y8fmawc6.js";import{o}from"./chunk-pdmayjan.js";import{e}from"./chunk-abgdqy92.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ke(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
|
|
2
|
-
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Lt,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Qi,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function dt({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Zi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function we({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(Ke(t))return a(dt,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Wi,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{Ke,dt,we};
|
package/dist/chunk-tcs1a1hk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-wf7kfk3p.js";import{be}from"./chunk-vhxr0c4c.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function vi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(O,{text:t.content,streaming:!1})});if(!n(t))return null;return e(be,{entries:t.entries})}
|
|
2
|
-
export{vi};
|
package/dist/chunk-v4qzxq4v.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{me}from"./chunk-29s4mnfw.js";import{b}from"./chunk-3g9qb7vq.js";import{w}from"./chunk-pdmayjan.js";import{ln}from"./chunk-y6p8xspr.js";import{Ne}from"./chunk-bcdw682e.js";import{xn}from"./chunk-3gnn1v68.js";import{Le}from"./chunk-wnydsth6.js";import{Re}from"./chunk-vvkp0jqa.js";import{yn}from"./chunk-npvcy4tw.js";import{hn,vn}from"./chunk-gnctm097.js";import{jsx as t,jsxs as d,Fragment as f}from"react/jsx-runtime";var n;function C(){return n??=xn(),n}function P(){let o=ln();return t(vn,{sessionId:o.session.id,enabled:o.inputReady&&!o.sending&&!o.shellMode,onMention:o.addMention,onBusyChange:o.setAdding})}function zs({client:o,providers:m,catalog:i,shellCommands:p=!0,modelMenu:l,children:a,...s}){let{session:e}=s,c=w(o.store,(r)=>r.modelRecovery[e.id]??!1);return d(f,{children:[c&&!me(e.error?.error)&&t(yn,{client:o,session:e,providers:m??C(),catalog:i},e.id),d(Ne,{modelMenu:l??{defaultGroup:b,catalog:(r)=>Le(r,i),headerAction:t(Re,{})},...s,attachmentPolicy:hn,onShellCommand:p?(r)=>o.executeShell(e.id,r):void 0,children:[t(P,{}),a]})]})}
|
|
2
|
-
export{zs};
|
package/dist/chunk-x1mzrhtd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Oe}from"./chunk-r8pm74zf.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 Rr({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:Oe(t)}):null}function Lr({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Rr,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Gn({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Lr,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{Rr,Lr,Gn};
|
package/dist/chunk-y6p8xspr.js
DELETED