@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,7 +1,7 @@
|
|
|
1
|
-
import{c,O}from"./chunk-wf7kfk3p.js";import{qo}from"./chunk-d8f6avcz.js";import{ne}from"./chunk-hygvdjq6.js";import{M}from"./chunk-pxv38ttf.js";import{st,gs}from"./chunk-5hk3k14h.js";import{be}from"./chunk-vhxr0c4c.js";import{cn as v}from"cn";import{BotIcon as ue,CheckIcon as me,CopyIcon as pe}from"lucide-react";import{Fragment as ge,memo as fe,useEffect as D,useRef as P,useState as E}from"react";import{jsx as n,jsxs as p,Fragment as R}from"react/jsx-runtime";function xe(e,t){if(e.status==="pending"||e.status==="in_progress")return;if(e.status==="cancelled"||e.status==="interrupted")return t("stream.codex.commandStopped");if(e.exitCode!==void 0&&e.exitCode!==0)return t("stream.codex.exitCode",{code:e.exitCode});if(e.status==="completed"&&e.exitCode===void 0)return;return t(e.status==="failed"?"stream.codex.commandFailed":"stream.codex.commandSucceeded")}function H(e,t){let[a,o]=E(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var G=new WeakMap,q=1;function L(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=G.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=q;return q+=1,G.set(e,a),`${e.type}:${a}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function V(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var Ce="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function B({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:Ce})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ve(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function he(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function we(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function z(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function Y({block:e}){if(e.type!=="tool_use")return null;if(U(e))return n(z,{});let t=ne(e).category;if(t==="read")return n(ye,{});if(t==="search"||t==="fetch")return n(ve,{});if(t==="execute")return n(he,{});if(t==="edit")return n(we,{});return n(z,{})}function k(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function Le(e){return ne(e).target}function W(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function U(e){return W(e)||e.name==="dynamic_tool"}function ee(e,t){let{category:a}=ne(e),o=Le(e),i=N(e.status);if(U(e))return{leading:e.title};if(a==="execute"){let r=k(e,"command")?.split(`
|
|
2
|
-
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=k(e,"pattern")??k(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=k(e,"query")??k(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function
|
|
1
|
+
import{c,O}from"./chunk-wf7kfk3p.js";import{Ko}from"./chunk-79pvfyd0.js";import{ne}from"./chunk-wz6765xb.js";import{M}from"./chunk-pxv38ttf.js";import{st,fs}from"./chunk-c092x92d.js";import{Ce}from"./chunk-m8tt5bf9.js";import{cn as v}from"cn";import{BotIcon as ue,CheckIcon as me,CopyIcon as pe}from"lucide-react";import{Fragment as ge,memo as fe,useEffect as D,useRef as P,useState as E}from"react";import{jsx as n,jsxs as p,Fragment as R}from"react/jsx-runtime";function xe(e,t){if(e.status==="pending"||e.status==="in_progress")return;if(e.status==="cancelled"||e.status==="interrupted")return t("stream.codex.commandStopped");if(e.exitCode!==void 0&&e.exitCode!==0)return t("stream.codex.exitCode",{code:e.exitCode});if(e.status==="completed"&&e.exitCode===void 0)return;return t(e.status==="failed"?"stream.codex.commandFailed":"stream.codex.commandSucceeded")}function H(e,t){let[a,o]=E(()=>({key:e,mounted:t})),i=t||a.key===e&&a.mounted;if(a.key!==e||a.mounted!==i)o({key:e,mounted:i});return i}var G=new WeakMap,q=1;function L(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=G.get(e);if(t!==void 0)return`${e.type}:${t}`;let a=q;return q+=1,G.set(e,a),`${e.type}:${a}`}function N(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function V(e,t){let a=Math.max(0,Math.round(e/1000)),o=Math.floor(a/3600),i=Math.floor(a%3600/60),r=a%60;if(r>=60)i+=Math.floor(r/60),r%=60;if(i>=60)o+=Math.floor(i/60),i%=60;let u=Intl.DurationFormat;if(u)try{return new u(t,{style:"narrow"}).format({hours:o,minutes:i,seconds:o>0?0:r})}catch{}if(o>0)return i>0?`${o}h ${i}m`:`${o}h`;if(i>0)return r>0?`${i}m ${r}s`:`${i}m`;return`${r}s`}var ye="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function B({expanded:e,className:t}){return n("svg",{className:v("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:ye})})}function ve(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function we(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function Le(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function z(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function Y({block:e}){if(e.type!=="tool_use")return null;if(U(e))return n(z,{});let t=ne(e).category;if(t==="read")return n(ve,{});if(t==="search"||t==="fetch")return n(he,{});if(t==="execute")return n(we,{});if(t==="edit")return n(Le,{});return n(z,{})}function k(e,t){let a=e.rawInput[t];return typeof a==="string"&&a.length>0?a:void 0}function Ne(e){return ne(e).target}function W(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function U(e){return W(e)||e.name==="dynamic_tool"}function ee(e,t){let{category:a}=ne(e),o=Ne(e),i=N(e.status);if(U(e))return{leading:e.title};if(a==="execute"){let r=k(e,"command")?.split(`
|
|
2
|
+
`)[0]??o;return r?{leading:t(i?"stream.codex.running":"stream.codex.ran"),trailing:r}:{leading:t(i?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(a==="search"){let r=k(e,"pattern")??k(e,"query")??o;return r?{leading:t(i?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(a==="fetch"){let r=k(e,"query")??k(e,"url")??o;return r?{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:r})}:{leading:t(i?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(a==="read")return o?{leading:t("stream.codex.readLabel"),trailing:o}:{leading:t("stream.codex.readFiles")};if(a==="edit")return o?{leading:t(i?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:o}:{leading:t(i?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(a==="delete")return o?{leading:t(i?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:o}:{leading:t(i?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(a==="move")return o?{leading:t(i?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:o}:{leading:t(i?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function be(e,t){let a=ee(e,t);return a.trailing===void 0?a.leading:`${a.leading} ${a.trailing}`}function Te(e){return e.map((t)=>{if(t.type!=="content")return"";let a=t.content;return a.type==="text"?a.text:""}).filter(Boolean).join(`
|
|
3
3
|
`).trim()}function $e(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="image"?[{data:a.data,mimeType:a.mimeType}]:[]})}function Ae(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let a=t.content;return a.type==="audio"?[{data:a.data,mimeType:a.mimeType}]:[]})}function ke(e){if(typeof e==="string"&&e.length>0)return e;return}function Be(e){return e.type==="diff"}function Ie(e){let t=e.content.find(Be);if(t===void 0)return;return t.changes.map((a)=>`${a.operation} ${a.path}`).join(`
|
|
4
4
|
`)}function te(e){let t=ke(e.rawOutput);if(t!==void 0)return t;let a=Te(e.content);if(a.length>0)return a;return Ie(e)}function K({block:e,command:t}){let{t:a,Output:o,commandStatus:i}=c(),[r,u]=E(!1),[d,l]=E(!1),m=te(e),s=i===void 0?xe(e,a):i(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
|
|
5
5
|
`)),u(!0),setTimeout(()=>u(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:v("codex-command-line",!d&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":a("actions.copy"),onClick:g,children:r?n(me,{}):n(pe,{})})]}),m!==void 0&&(o===void 0?n("pre",{className:"codex-command-output",children:m}):n(o,{text:m})),s!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:s})})]})})}function ae({block:e}){let{t,openLink:a,Patch:o,openImage:i,commandStatus:r,expandToolOutput:u=!1}=c(),d=te(e),l=o===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let A=x;return A.patch?.text?[A.patch.text]:[]}).join(`
|
|
6
|
-
`),m=$e(e.content),s=Ae(e.content),[g,f]=M(`tool:${e.id}`,!1),C=H(`tool:${e.id}`,g),h=ne(e),w=h.category,y=ee(e,t),b=w==="execute"?k(e,"command"):void 0;if(e.userShell&&b!==void 0)return n(K,{block:e,command:b});let T=b!==void 0||U(e)||m.length>0||s.length>0||Boolean(l)||u&&d!==void 0,I=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(w==="read"&&N(e.status))return null;let S=p("span",{className:"codex-activity-label",children:[n(Y,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(R,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(I!==void 0?p(R,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:I,onClick:()=>a(I),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[T?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[S,n(B,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:S}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(R,{children:[b!==void 0?n(K,{block:e,command:b}):o!==void 0&&l?n(o,{patch:l}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let A=`data:${x.mimeType};base64,${x.data}`,j=n("img",{src:A,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?j:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(A),children:j},A)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}var oe=fe(function({block:t}){if(t.type==="tool_use")return n(ae,{block:t});if(t.type==="thinking")return n(le,{block:t});if(t.type==="collab")return n(ce,{block:t});return n(ie,{block:t})});function ie({block:e}){let{t,openSession:a}=c(),o=N(e.status),[i,r]=M(`subagent:${e.id}`,o),u=P(o);D(()=>{if(o)r(!0);if(u.current&&!o)r(!1);u.current=o},[o,r]);let d=`${_e(e.activity,o,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Ee,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(l,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(l,e.name)},children:d})})]}),m&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ae,{block:s},s.id);if(s.type==="thinking")return n(le,{block:s},L(s));if(s.type==="subagent")return n(ie,{block:s},s.id);if(s.type==="collab")return n(ce,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(O,{text:s.text,streaming:!1})},L(s));if(s.type==="plan")return n(be,{entries:s.entries},L(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},L(s));return null})})})})]})}var Me=8;function Se(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Me}function Ee({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Se(e),"aria-hidden":"true"})}function _e(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var Fe=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,a){if(e===null)return"";if(t===null)return` · ${qo(e)}`;let o=Fe.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${qo(e)} · ${o}`}var Re={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=se(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Re[e.tool]}.${o}`)}function De(e){return e.agents.filter((t)=>t.nickname!==null)}function de(e,t){let a=e.agents.length>0?e.agents.length:1;return`${Z(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var _="\x01";function F(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${_}${r}${_}`]));return e(t,{...a,...i}).split(new RegExp(`${_}(\\w+)${_}`,"u")).map((r,u)=>n(ge,{children:u%2===1?o[r]:r},`${u}:${r}`))}function Pe({agent:e,showModel:t}){let{t:a,openSession:o}=c(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,a)]})}function J({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Ue(e,t){let a=e.prompt?.trim()?e.prompt:null,o=se(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=De(e),d=[];if(u.length===0)d.push({key:"generic",node:Z(e,"row",t)});for(let l of u){let m=n(Pe,{agent:l,showModel:e.tool==="spawnAgent"});if(i)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(J,{prompt:a})})})});else if(r)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(J,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&l.state!==null&&l.state!==null?l.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${l.state.status}`),message:l.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${l.state.status}`)}):"";d.push({key:l.threadId,node:F(t,"stream.codex.collab.agentRow",{action:Z(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:F(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function ce({block:e}){let{t}=c(),[a,o]=M(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=N(e.status),r=de(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[p("span",{className:"codex-activity-label",children:[n(ue,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(B,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Ue(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function le({block:e}){let{t,i18n:a}=c(),o=Boolean(e.isComplete),[i,r]=M(`thinking:${L(e)}`,!1),u=P(null),d=e.thinking.trim().length>0;D(()=>{if(o||!d)return;let s=u.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let w=s.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:V(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?l:n("span",{className:"codex-activity-running",children:l})})}),d&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(O,{text:m,streaming:!o})})})})]})}function Oe(e){if(W(e))return"mcp";let t=ne(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ve(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ze(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(W(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(U(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let l=Oe(d);if(!o.has(l))i.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=i.map((d,l)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ve(d.category,o.get(d.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function ps({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:u,providerIcon:d,children:l}){let{t:m,i18n:s}=c(),[g,f]=M(`work:${e}`,i,!0),C=H(`work:${e}`,g||o),h=P(null),[w,y]=E(0);D(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let T=()=>{let S=h.current;if(S===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-S)};T();let I=window.setInterval(T,1000);return()=>window.clearInterval(I)},[o,r,t]);let b=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:V(t,s.language)}):o&&w>=1000?m("stream.codex.workingFor",{duration:V(w,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((T)=>!T),children:[u!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":u,"aria-hidden":"true",children:d}),n("span",{children:b}),n(B,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&l})})})]})}function He(e,t){if(e.type==="tool_use")return Ne(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return de(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function Q(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function We(e,t,a=1000){let[o,i]=E({text:e,live:t}),r=P(Date.now());return D(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),d=Math.max(0,r.current+a-u);if(d===0||t!==o.live){r.current=u,i({text:e,live:t});return}let l=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function je({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=c(),i=e.some(Q),r=L(e[0]),u=e.every((C)=>C.type==="tool_use"&&ne(C).category==="execute"),[d,l]=M(`group:${r}`,t&&!u),m=H(`group:${r}`,d),s=e.findLast(Q)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=We(i?He(s,a):Ze(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(Y,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(B,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(oe,{block:C},L(C)))})})})]})}function X({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(je,{blocks:e,defaultExpanded:t})}function Ut({blocks:e,defaultExpanded:t}){if(!e.some(st))return n(X,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&st(i[0])===st(o))i.push(o);else a.push([o])}return n(R,{children:a.map((o)=>st(o[0])?n(gs,{blocks:o.filter(st)},L(o[0])):n(X,{blocks:o,defaultExpanded:t},L(o[0])))})}
|
|
7
|
-
export{
|
|
6
|
+
`),m=$e(e.content),s=Ae(e.content),[g,f]=M(`tool:${e.id}`,!1),C=H(`tool:${e.id}`,g),h=ne(e),w=h.category,y=ee(e,t),b=w==="execute"?k(e,"command"):void 0;if(e.userShell&&b!==void 0)return n(K,{block:e,command:b});let T=b!==void 0||U(e)||m.length>0||s.length>0||Boolean(l)||u&&d!==void 0,I=!T&&!N(e.status)?h.filePath:void 0;if(w==="execute"&&!N(e.status)&&e.status!=="completed"){let x=r?.(e);if(x)y={...y,leading:x}}if(w==="read"&&N(e.status))return null;let S=p("span",{className:"codex-activity-label",children:[n(Y,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:N(e.status)?n("span",{className:"codex-activity-running",children:y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`}):p(R,{children:[n("span",{className:"codex-activity-leading",children:y.leading}),y.trailing!==void 0&&(I!==void 0?p(R,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:I,onClick:()=>a(I),children:y.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",y.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[T?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":y.trailing===void 0?y.leading:`${y.leading} ${y.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[S,n(B,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:S}),n("div",{className:v("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:C&&p(R,{children:[b!==void 0?n(K,{block:e,command:b}):o!==void 0&&l?n(o,{patch:l}):d!==void 0&&n("pre",{className:"codex-activity-details",children:d}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let A=`data:${x.mimeType};base64,${x.data}`,j=n("img",{src:A,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return i===void 0?j:n("button",{type:"button",className:"cursor-pointer",onClick:()=>i(A),children:j},A)})}),s.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}var oe=fe(function({block:t}){if(t.type==="tool_use")return n(ae,{block:t});if(t.type==="thinking")return n(le,{block:t});if(t.type==="collab")return n(ce,{block:t});return n(ie,{block:t})});function ie({block:e}){let{t,openSession:a}=c(),o=N(e.status),[i,r]=M(`subagent:${e.id}`,o),u=P(o);D(()=>{if(o)r(!0);if(u.current&&!o)r(!1);u.current=o},[o,r]);let d=`${_e(e.activity,o,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,l=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?i:void 0,disabled:!m,onClick:()=>r((s)=>!s),children:[p("span",{className:"codex-activity-label",children:[n(Ee,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:a===void 0||e.threadId===null?o?n("span",{className:"codex-activity-running",children:d}):d:n("span",{role:"link",tabIndex:0,className:v("codex-agent-link",o&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(s)=>{s.stopPropagation(),a(l,e.name)},onKeyDown:(s)=>{if(s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),a(l,e.name)},children:d})})]}),m&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((s)=>{if(s.type==="tool_use")return n(ae,{block:s},s.id);if(s.type==="thinking")return n(le,{block:s},L(s));if(s.type==="subagent")return n(ie,{block:s},s.id);if(s.type==="collab")return n(ce,{block:s},s.id);if(s.type==="text")return n("div",{className:"codex-reasoning-details",children:n(O,{text:s.text,streaming:!1})},L(s));if(s.type==="plan")return n(Ce,{entries:s.entries},L(s));if(s.type==="image")return n("img",{src:`data:${s.source.media_type};base64,${s.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},L(s));return null})})})})]})}var Me=8;function Se(e){let t=0;for(let a=0;a<e.length;a+=1)t=(t*31+e.charCodeAt(a))%2147483647;return t%Me}function Ee({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Se(e),"aria-hidden":"true"})}function _e(e,t,a,o){switch(e){case"started":return o(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:a});case"interacted":return o("stream.codex.subagentMessaged",{name:a});case"interrupted":return o("stream.codex.subagentInterrupted",{name:a});case"completed":return o("stream.codex.subagentFinished",{name:a})}}var Fe=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,a){if(e===null)return"";if(t===null)return` · ${Ko(e)}`;let o=Fe.has(t)?a(`stream.codex.reasoningEffort.${t}`):t;return` · ${Ko(e)} · ${o}`}var Re={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t,a){if(e.tool==="wait")throw Error("Codex does not present wait calls");let o=se(e.status);if(o==="interrupted")return a("stream.codex.collab.interrupted");return a(`stream.codex.collab.${t}.${Re[e.tool]}.${o}`)}function De(e){return e.agents.filter((t)=>t.nickname!==null)}function de(e,t){let a=e.agents.length>0?e.agents.length:1;return`${Z(e,"header",t)}${t("stream.codex.collab.agentCount",{count:a})}`}var _="\x01";function F(e,t,a,o){let i=Object.fromEntries(Object.keys(o).map((r)=>[r,`${_}${r}${_}`]));return e(t,{...a,...i}).split(new RegExp(`${_}(\\w+)${_}`,"u")).map((r,u)=>n(ge,{children:u%2===1?o[r]:r},`${u}:${r}`))}function Pe({agent:e,showModel:t}){let{t:a,openSession:o}=c(),i=e.nickname??"",r=o===void 0?n("span",{className:"font-medium",children:i}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":a("stream.codex.subagentOpen",{name:i}),onClick:()=>o(e.threadId,i),children:i});return p("span",{children:[r,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,a)]})}function J({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Ue(e,t){let a=e.prompt?.trim()?e.prompt:null,o=se(e.status),i=e.tool==="spawnAgent"&&o==="completed"&&a!==null,r=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&a!==null,u=De(e),d=[];if(u.length===0)d.push({key:"generic",node:Z(e,"row",t)});for(let l of u){let m=n(Pe,{agent:l,showModel:e.tool==="spawnAgent"});if(i)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(J,{prompt:a})})})});else if(r)d.push({key:l.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.messagedWithPrompt",{action:o==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${o}`)},{agent:m,prompt:n(J,{prompt:a})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&l.state!==null&&l.state!==null?l.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${l.state.status}`),message:l.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${l.state.status}`)}):"";d.push({key:l.threadId,node:F(t,"stream.codex.collab.agentRow",{action:Z(e,"row",t),state:g},{agent:m})})}}if(!i&&!r&&a!==null)d.push({key:"input",node:F(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:a})})});return d}function ce({block:e}){let{t}=c(),[a,o]=M(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let i=N(e.status),r=de(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":a,onClick:()=>o((u)=>!u),children:[p("span",{className:"codex-activity-label",children:[n(ue,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:i?n("span",{className:"codex-activity-running",children:r}):r})]}),n(B,{expanded:a})]}),n("div",{className:v("codex-activity-details-grid",a&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Ue(e,t).map((u)=>n("div",{className:"codex-collab-row",children:u.node},u.key))})})})]})}function le({block:e}){let{t,i18n:a}=c(),o=Boolean(e.isComplete),[i,r]=M(`thinking:${L(e)}`,!1),u=P(null),d=e.thinking.trim().length>0;D(()=>{if(o||!d)return;let s=u.current;if(s===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{s.scrollTop=s.scrollHeight}),f=null,C=()=>{let w=s.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(C);return h.observe(s,{childList:!0}),C(),()=>{h.disconnect(),g.disconnect()}},[d,o]);let l=o?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:V(e.durationMs,a.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:v("codex-activity-header",!d&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":d?i:void 0,disabled:!d,onClick:()=>r((s)=>!s),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:o?l:n("span",{className:"codex-activity-running",children:l})})}),d&&n(B,{expanded:i})]}),n("div",{className:v("codex-activity-details-grid",i&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:d&&n("div",{ref:u,className:"codex-reasoning-details",role:"region","aria-label":l,"aria-hidden":!i,tabIndex:0,inert:!i,children:n(O,{text:m,streaming:!o})})})})]})}function Oe(e){if(W(e))return"mcp";let t=ne(e).category;return t==="think"||t==="switch_mode"?"other":t}function Ve(e,t,a,o){return o(`stream.codex.summary.${e}.${a?"leading":"following"}`,{count:t})}function Ze(e,t,a){let o=new Map,i=[],r=new Set;for(let d of e){if(W(d)&&typeof d.rawInput.server==="string"){if(r.size===0)i.push({kind:"integrations"});r.add(d.rawInput.server);continue}if(U(d)){if(!i.some((m)=>m.kind==="named"&&m.title===d.title))i.push({kind:"named",title:d.title});continue}let l=Oe(d);if(!o.has(l))i.push({kind:"category",category:l});o.set(l,(o.get(l)??0)+1)}let u=i.map((d,l)=>{if(d.kind==="named")return d.title;if(d.kind==="integrations")return t(`stream.codex.summary.integrations.${l===0?"leading":"following"}`,{count:r.size,sources:new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format([...r])});return Ve(d.category,o.get(d.category),l===0,t)});if(a.startsWith("zh"))return u.join("");return new Intl.ListFormat(a,{style:"long",type:"conjunction"}).format(u)}function ms({stateKey:e,durationMs:t,durationKind:a="work",active:o,defaultExpanded:i=o,startedAt:r,providerId:u,providerIcon:d,children:l}){let{t:m,i18n:s}=c(),[g,f]=M(`work:${e}`,i,!0),C=H(`work:${e}`,g||o),h=P(null),[w,y]=E(0);D(()=>{if(!o||t!==void 0){h.current=null;return}h.current=r??Date.now();let T=()=>{let S=h.current;if(S===null)throw Error("Codex work section is ticking without a start time");y(Date.now()-S)};T();let I=window.setInterval(T,1000);return()=>window.clearInterval(I)},[o,r,t]);let b=t!==void 0?m(a==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:V(t,s.language)}):o&&w>=1000?m("stream.codex.workingFor",{duration:V(w,s.language)}):m(o?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((T)=>!T),children:[u!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":u,"aria-hidden":"true",children:d}),n("span",{children:b}),n(B,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:v("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:C&&l})})})]})}function He(e,t){if(e.type==="tool_use")return be(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return de(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function Q(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return N(e.status);return!1}function We(e,t,a=1000){let[o,i]=E({text:e,live:t}),r=P(Date.now());return D(()=>{if(e===o.text&&t===o.live)return;let u=Date.now(),d=Math.max(0,r.current+a-u);if(d===0||t!==o.live){r.current=u,i({text:e,live:t});return}let l=window.setTimeout(()=>{r.current=Date.now(),i({text:e,live:t})},d);return()=>window.clearTimeout(l)},[o,t,a,e]),t===o.live?o.text:e}function je({blocks:e,defaultExpanded:t=!0}){let{t:a,i18n:o}=c(),i=e.some(Q),r=L(e[0]),u=e.every((C)=>C.type==="tool_use"&&ne(C).category==="execute"),[d,l]=M(`group:${r}`,t&&!u),m=H(`group:${r}`,d),s=e.findLast(Q)??e.at(-1);if(s===void 0)throw Error("CodexActivityGroup requires at least one activity block");let g=e.filter((C)=>C.type==="tool_use"),f=We(i?He(s,a):Ze(g,a,o.language),i);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":d,onClick:()=>l((C)=>!C),children:[p("span",{className:"codex-activity-label",children:[n(Y,{block:e[0]}),n("span",{className:"truncate",children:i?n("span",{className:"codex-activity-running",children:f}):f})]}),n(B,{expanded:d})]}),n("div",{className:v("codex-activity-group-grid",d&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:m&&e.map((C)=>n(oe,{block:C},L(C)))})})})]})}function X({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(je,{blocks:e,defaultExpanded:t})}function Ut({blocks:e,defaultExpanded:t}){if(!e.some(st))return n(X,{blocks:e,defaultExpanded:t});let a=[];for(let o of e){let i=a.at(-1);if(i&&st(i[0])===st(o))i.push(o);else a.push([o])}return n(R,{children:a.map((o)=>st(o[0])?n(fs,{blocks:o.filter(st)},L(o[0])):n(X,{blocks:o,defaultExpanded:t},L(o[0])))})}
|
|
7
|
+
export{ms,Ut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function
|
|
2
|
-
export{
|
|
1
|
+
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function br(e=d){if(e.env.CLAUDE_CODE_SIMPLE&&["1","true","yes","on"].includes(e.env.CLAUDE_CODE_SIMPLE.toLowerCase()))throw Error("Claude OAuth is disabled by CLAUDE_CODE_SIMPLE");if(e.env.CLAUDE_CODE_CUSTOM_OAUTH_URL||e.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Custom Claude OAuth endpoints and descriptor credentials are not supported by the local-login reader");let r=e.env.CLAUDE_CODE_OAUTH_TOKEN;if(r!==void 0){if(!r.trim())throw Error("CLAUDE_CODE_OAUTH_TOKEN is empty");return{accessToken:r,expiresAt:null,scopes:["user:inference"],source:"environment"}}let t=e.env.CLAUDE_CONFIG_DIR;if(t==="")throw Error("CLAUDE_CONFIG_DIR is empty");let i=(t??u(e.home,".claude")).normalize("NFC");if(e.platform==="darwin"){let s=t===void 0?"":`-${new Bun.CryptoHasher("sha256").update(i).digest("hex").slice(0,8)}`,o=await e.keychain(`Claude Code-credentials${s}`,e.username());if(o!==null)return c(o,"keychain")}else if(e.platform!=="win32")throw Error(`Unsupported Claude login platform: ${e.platform}`);let n=await e.file(u(i,".credentials.json"));return n===null?null:c(n,"file")}async function ra(e=d,r=Date.now()){let t=await br(e);if(!t)throw Error("No existing Claude subscription login; sign in through Claude Code or ALwith Desktop");if(t.expiresAt!==null&&t.expiresAt<=r+60000)throw Error("The existing Claude access token is expired or expiring; refresh it in the owning Claude Code or ALwith CLI before retrying");return t.accessToken}
|
|
2
|
+
export{br,ra};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Zr}from"./chunk-e641842r.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function Ci(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Zr(a,r)}
|
|
2
|
+
export{Ci};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var dl=["full","compact","codexUI"];function
|
|
1
|
+
var dl=["full","compact","codexUI"];function gs(t){return t==="compact"||t==="codexUI"}var ja=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function ne(t){let o=ja.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
2
|
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ul(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
-
export{dl,
|
|
3
|
+
export{dl,gs,ja,ne,ul};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{zo}from"./chunk-vsh9vh4s.js";import{XIcon as i}from"lucide-react";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function be({app:a,remove:e}){return o("span",{"data-app-reference":a.id,title:a.name,className:"inline-flex max-w-full items-baseline gap-1 align-baseline",children:[n(zo,{kind:"app",name:a.name}),e&&n(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:n(i,{className:"size-3","aria-hidden":"true"})})]})}
|
|
2
|
+
export{be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function ls({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
|
|
2
|
+
export{ls};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c,O}from"./chunk-wf7kfk3p.js";import{ne}from"./chunk-
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(
|
|
3
|
-
export{cl,
|
|
1
|
+
import{c,O}from"./chunk-wf7kfk3p.js";import{ne}from"./chunk-wz6765xb.js";import{cs}from"./chunk-bdrcreqs.js";import{Ce}from"./chunk-m8tt5bf9.js";import{ms,Ut}from"./chunk-wrfs7q9f.js";import{ds}from"./chunk-0ne2mz2q.js";import{qo}from"./chunk-m6080rsp.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(O,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(O,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(Ce,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function cl({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),T=!t.streaming&&C.trim().length>0?o(Vo,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=cs(t.content,"compact"),x=l.reduce((e,a,p)=>a.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&ne(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return a.length===0?null:o(Ut,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?l.length:h;return o(jo,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(ds,{blocks:f}):y(f))})}function Vo({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=c(),{t:u}=d;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(qo,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=c();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function jo({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(ms,{...d,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
+
export{cl,Vo,jo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var pl=280;function bs({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function at({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function
|
|
2
|
-
export{pl,bs,at,
|
|
1
|
+
var pl=280;function bs({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function at({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function Jo({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function Cs({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function ws({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function ks({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{pl,bs,at,Jo,Cs,ws,ks};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{xr}from"./chunk-m9ttf96p.js";import{g}from"./chunk-xk0dt0es.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function rr({data:t,t:n,className:l,...m}){let c=g(),[u,f]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return h(b+p);return h(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(xr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function sr({children:t,className:n,...l}){let m=g();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
|
|
2
|
+
export{rr,sr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as I,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as d,useCallback as n,useContext as i,useEffect as V,useMemo as q,useRef as I,useState as z}from"react";import{jsx as D}from"react/jsx-runtime";var F=d(null),Mo=d(null);function tl(){return i(Mo)}var No=d(null);function nl(){return i(No)}var Tt=d(null);function he(){let r=i(F);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use usePromptInputController().");return r}var Mt=()=>i(F);function ol(){let r=i(Tt);if(!r)throw Error("Wrap your component inside <PromptInputProvider> to use useProviderAttachments().");return r}var X=()=>i(Tt);function Er({initialInput:r="",revision:l,onSubmittedClear:c,onRemoveAttachment:A,attachmentPolicy:f,value:R,onValueChange:y,attachments:U,onAttachmentsChange:L,children:B}){let S=n((t)=>{if(t.type)return t.type;let e=(t.name||"").toLowerCase();if(e.endsWith(".png"))return"image/png";if(e.endsWith(".jpg")||e.endsWith(".jpeg"))return"image/jpeg";if(e.endsWith(".webp"))return"image/webp";if(e.endsWith(".gif"))return"image/gif";if(e.endsWith(".bmp"))return"image/bmp";if(e.endsWith(".svg"))return"image/svg+xml";return""},[]),T=R!==void 0,[G,J]=z(r),p=R??G,o=I({value:p,external:l,revision:0});if(o.current.value!==p||o.current.external!==l)o.current={value:p,external:l,revision:o.current.revision+1};let W=n(()=>o.current.revision,[]),P=n((t)=>{if(o.current.value=t,o.current.revision++,T)y?.(t);else J(t)},[T,y]),h=n(()=>P(""),[P]),x=U!==void 0,[K,N]=z([]),v=U??K,b=I(v);b.current=v;let s=n((t)=>{let e=typeof t==="function"?t(b.current):t;if(x)L?.(e);else N(e)},[x,L]),j=I(null),w=I(()=>{}),O=n((t)=>{let e=[...t];if(e.length===0)return;s((a)=>{let m=f===void 0?e:f.uniqueFiles(e,a);return[...a,...m.map((u)=>{let _=f?.sourcePath(u);return{id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(u),mediaType:S(u),filename:u.name,size:u.size,lastModified:u.lastModified,..._===void 0?{}:{sourcePath:_}}})]})},[f,S,s]),M=n((t)=>{s((e)=>{let a=e.find((m)=>m.id===t);if(a?.url)URL.revokeObjectURL(a.url);return e.filter((m)=>m.id!==t)}),A?.()},[A,s]),E=n(()=>{s((t)=>{for(let e of t)if(e.url)URL.revokeObjectURL(e.url);return[]})},[s]);V(()=>{if(x)return;return()=>{for(let t of b.current)if(t.url)URL.revokeObjectURL(t.url)}},[x]);let k=n(()=>{w.current?.()},[]),C=q(()=>({files:v,add:O,remove:M,clear:E,openFileDialog:k,fileInputRef:j}),[v,O,M,E,k]),H=n((t,e)=>{j.current=t.current,w.current=e},[]),Q=q(()=>({textInput:{value:p,setInput:P,clear:h,getRevision:W,clearSubmitted:c??h},attachments:C,__registerFileInput:H}),[p,P,h,W,c,C,H]);return D(F.Provider,{value:Q,children:D(Tt.Provider,{value:C,children:B})})}var Ao=d(null);function g(){let r=X(),l=i(Ao),c=r??l;if(!c)throw Error("usePromptInputAttachments must be used within a PromptInput or PromptInputProvider");return c}
|
|
2
|
+
export{Mo,tl,No,nl,Tt,he,Mt,ol,Er,Ao,g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ee}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{ee}from"./chunk-9hjfc08t.js";import{_t}from"./chunk-nh56sb8e.js";var fe={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:_t,parseConfig(e){if(typeof e.model!=="string"||typeof e.size!=="string"||Object.keys(e).some((t)=>t!=="model"&&t!=="size"))throw Error("Invalid image input config");let o={model:e.model,size:e.size};return ee(o),o},routePrompt(e){return e.image()}};
|
|
2
|
+
export{fe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O}from"./chunk-wf7kfk3p.js";import{t}from"./chunk-
|
|
1
|
+
import{O}from"./chunk-wf7kfk3p.js";import{t}from"./chunk-g4devj8d.js";import{F}from"./chunk-5ygqjna0.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(O,{text:e.text,streaming:o})})}if(i.isImage(e))return n(F,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(F,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Me({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
2
|
export{Me};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-e6ya95ee.js";import{ExternalLink as n}from"lucide-react";import{DropdownMenuItem as m}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as i,jsxs as l}from"react/jsx-runtime";function Re(){let{host:o}=e(),r=o.openSettings;if(!r)return null;return l(m,{className:"h-9 gap-2 rounded-md px-2 text-sm font-normal",onClick:()=>{Promise.resolve(r("provider")).catch((t)=>o.reportError?o.reportError(t):console.error(t))},children:[o.t("model.moreModels"),i(n,{className:"ml-auto size-4","aria-hidden":"true"})]})}
|
|
2
2
|
export{Re};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{rs}from"./chunk-vsh9vh4s.js";import{be}from"./chunk-x4enakra.js";import{Go}from"./chunk-g751pxzk.js";import{C}from"./chunk-dtxc0x7y.js";import{Wo,Bt}from"./chunk-zsrjzx7g.js";import{ae,Qo}from"./chunk-g4devj8d.js";import{Ho}from"./chunk-05zhvfrp.js";import{ts,ns}from"./chunk-v9jqk03c.js";import{Jr}from"./chunk-6r5nzsw8.js";import{Oo,Xr}from"./chunk-zm6b6zyr.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as y}from"entities";import le from"katex";import{CheckIcon as B,ChevronLeftIcon as ue,ChevronRightIcon as me,CopyIcon as ge,DownloadIcon as fe,FileIcon as he,LinkIcon as pe,MailIcon as ke,XIcon as we}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as D,createElement as X,memo as G,startTransition as xe,useContext as J,useEffect as k,useLayoutEffect as V,useMemo as Z,useRef as w,useState as h}from"react";import{jsx as a,jsxs as g,Fragment as ce}from"react/jsx-runtime";var Y=D(!1),Q=D(null);function T(){let e=J(Q);if(e===null)throw Error("Markdown host is missing");return e}var Te=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,ve=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,ye=/\uE200[^\uE201]*$/,Ce=4,Me=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 ee(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Ne(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)&&!ee(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function Le(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!L(e,t)&&!ee(e,t,n))return t;return-1}function Ee(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 Ie(e){return Ee(e,"```")%2===1}function ne(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 Re(e){return e.endsWith(`
|
|
2
|
+
`)?`${e}\`\`\``:`${e}
|
|
3
|
+
\`\`\``}function _(e,n){if(!e.includes(n)||Ne(e,n)%2===0)return e;let t=Le(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
|
+
`)||ne(r))return e;return`${e}${n}`}function $e(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function te(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 Pe(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=te(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 l=d.toLowerCase();if(l.length>Ce&&!Me.has(l))return!1}return!0}function Se(e){let{path:n}=te(e);if($e(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Ae(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 Pe(t)||Se(t)?e.replace(H,"$1"):`${e})`}function Fe(e){let n=e.replace(ye,"");if(n.length===0||n.includes("`")&&ne(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Ie(n))return{isCodeFenceOpen:!0,markdown:Re(n)};if(n.includes(")n=Ae(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function He(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return He(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function re(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))re(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 _e(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"?_e(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Oe(e,n){let t;try{t=Wo(e,n)}catch{return}try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}function je({links:e,children:n}){let t=T(),r=Qo();if(t.preview||!r)return a("p",{className:"codex-markdown-paragraph",children:n});return a(ns,{links:e})}function We(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function qe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function ze(e){let n=qe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Ue({href:e}){let n=Z(()=>ze(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ke:o?he:pe;return g("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 Ke({children:e,href:n,title:t}){let r=T(),o=ae();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:Oe(n,o)??t,onClick:(s)=>We(s,n,r),children:g("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(Ue,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Be({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=T(),i=w(null),[c,d]=h(null),[l,p]=h(null),[E,b]=h(!1);if(k(()=>{let f=Jr(d,p);return i.current=f,()=>{f.dispose(),i.current=null}},[]),k(()=>{let f=i.current;if(f===null)throw Error("Code highlighter is not mounted");f.update(e,n)},[e,n]),l!==null)throw l;let x=c!==null&&c.code===e&&c.language===n?c.html:null,u=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(f){s?.(f)}};return g("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[g("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 u(),children:E?a(B,{}):a(ge,{})})})]}),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 De({code:e,language:n}){let t=T(),r=J(Y),o=Qo();if(t.preview)return a("span",{children:e});if(!r&&o&&n?.toLowerCase()==="mermaid")return a(Ho,{source:e});return a(Xe,{code:e,language:n})}function Xe({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(Be,{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 Ge(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 Je({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 g("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),g("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(ue,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(fe,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(me,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(we,{})})]})]})}function Ve(e){return T().preview?a(ce,{children:e.alt}):a(Ze,{...e})}function Ze(e){let{loadImage:n}=T(),t=ae(),{src:r}=e,s=!r.startsWith("//")&&(!/^[a-z][a-z\d+.-]*:/i.test(r)||/^file:/i.test(r)||/^[a-z]:[\\/]/i.test(r))&&n!==void 0,[i,c]=h();if(k(()=>{if(!s)return;let d=!0;return(async()=>{let l=Bt(r,t);if(l===null)throw Error("The image does not name a local file");return n(l)})().then((l)=>{if(d)c({source:r,directory:t,url:l})},(l)=>{if(d)c({source:r,directory:t,error:l instanceof Error?l.message:String(l)})}),()=>{d=!1}},[s,n,r,t]),!s)return a(W,{...e});if(i?.source!==r||i.directory!==t)return a("span",{role:"status",children:e.alt});if(i.error!==void 0)return g("span",{role:"alert",title:i.error,children:[e.alt,": ",i.error]});if(i.url===void 0)throw Error("The local image result has no URL");return a(W,{...e,src:i.url})}function W({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 g(ce,{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(Ge(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(Je,{preview:s,setPreview:i})})]})}function Ye({value:e,display:n}){let t=w(null);return V(()=>{if(t.current===null)throw Error("Codex math root is not mounted");le.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 Qe=150,M=null;function q(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),l=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,l-r)},`${n}:${t.generation}:${c.start}`)),i=l}if(i<o)s.push(e.slice(i-r));return s}function oe(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 z(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,Te)}function en(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}:${z(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return z(e.text);default:return""}}function se(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${oe(en(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=se(r),s=t.get(o)??0;return t.set(o,s+1),ie(r,`${n}-${o}-${s}`)})}function nn(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return g("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?g("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(B,{}):null]}):null,m(t,n)]},n)}function tn(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 U(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return X(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 rn(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:g("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>U(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=oe(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)=>U(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=N(e.href);if(!Go(r))return null;return a(Ve,{src:r,alt:y(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function ie(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 X(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(ts))return a(je,{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)=>K(c,`${n}-image-${d}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(rs,{text:y(t.text),children:q(y(t.text),n)},n):m(t.tokens,n)}case"escape":return q(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(be,{app:{id:s,name:y(t.text).replace(/^\$/,"")}},n);return Go(o)?a(Ke,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(De,{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 tn(e,n);case"list_item":return nn(e,n);case"table":return rn(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(Ye,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function v(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?y(n.text):n.tokens.map(v).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(v).join("");case"list":return e.items.map(v).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(v).join("")).join("")).join("")}default:return""}}function on({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=M;try{return M={cursor:t,runs:r,generation:o},ie(e,n)}finally{M=s}}var an=G(function({result:n}){let{text:t,isStreaming:r}=n,o=Z(()=>{let u=n.tokens;if(n.source.includes("!["))re(u);P(u);let f=new Map,S=0;return u.map((I)=>{let R=se(I),A=f.get(R)??0;f.set(R,A+1);let F=v(I),de={token:I,tokenKey:`root-${R}-${A}`,offset:S,visibleText:F};return S+=F.length,de})},[n]),s=o.map((u)=>u.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),l=d?c.visibleText.length:0,p=performance.now(),E=r&&d?c.runs.filter((u)=>p-u.firstSeenAtMs<Qe):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:E.filter((u)=>u.start<s.length).map((u)=>({...u,end:Math.min(u.end,s.length)})),generation:b};if(r&&s.length>l)x.runs.push({start:l,end:s.length,firstSeenAtMs:p});return V(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((u)=>a(on,{token:u.token,tokenKey:u.tokenKey,offset:u.offset,runs:x.runs,generation:b},u.tokenKey))})}),sn=G(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>Oo(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let l=Xr((p)=>{if(!i.current)i.current=!0,s(p);else xe(()=>s(p))},d);return r.current=l,()=>{l.dispose(),r.current=null}},[]),k(()=>{let l=r.current;if(l===null)throw Error("Markdown parser is not mounted");let p=t?Fe(n).markdown:n;l.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(an,{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(Q.Provider,{value:t,children:a(Y.Provider,{value:r,children:a(sn,{text:r?o:e,isStreaming:r})})})}
|
|
7
|
+
export{Dt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function
|
|
3
|
-
export{
|
|
1
|
+
import{Qr,Lt}from"./chunk-dypeezvv.js";import{t,w}from"./chunk-g4devj8d.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function Vt(e){c.setState({request:{path:e.path,patch:ti(e.patch,e.path)}})}function ti(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
|
+
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function jt(){let{t:e,theme:a}=t(),n=w(c,(o)=>o.request),s=n===null?null:Qr(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Lt,{patch:n.patch,theme:a})})]})})}
|
|
3
|
+
export{Vt,ti,jt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m}from"./chunk-sgbn37kz.js";import{s}from"./chunk-
|
|
1
|
+
import{m}from"./chunk-sgbn37kz.js";import{s}from"./chunk-n9jaz2pd.js";import{v,f}from"./chunk-a8r3mggj.js";import{Nt}from"./chunk-n0q8e6sq.js";import{cn as r}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as u,DropdownMenuItem as d,DropdownMenuTrigger as g}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as w}from"react/jsx-runtime";function la({onCollapseAll:i}){let{t:n}=s();return w(c,{children:[o(g,{render:o(Nt,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(u,{align:"end",className:"w-52",children:o(d,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function ca({screen:i,onSwitch:n}){let{t:e}=s(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(f,{className:r(m,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(v,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
2
|
export{la,ca};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var Ur={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},Br={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function V({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=Ur[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",Br.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{Ur,Br,V};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=new Map;var a=0;function
|
|
2
|
-
export{
|
|
1
|
+
var t=new Map;var a=0;function Oo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Oo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Xr(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
+
export{Oo,Xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function
|
|
2
|
-
export{
|
|
1
|
+
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function Wo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Bt(t,o){let e=Wo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function hs(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function vs(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
|
|
2
|
+
export{Wo,Bt,hs,vs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M}from"./chunk-pxv38ttf.js";import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{M}from"./chunk-pxv38ttf.js";import{o}from"./chunk-g4devj8d.js";import{mt}from"./chunk-5cf6ny70.js";import{y,Y}from"./chunk-p781sb6h.js";import{e}from"./chunk-e6ya95ee.js";import{Xn}from"./chunk-f7bn0nd2.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Z}from"lucide-react";import{useCallback as ss,useEffect as es,useId as J,useRef as L,useState as N}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as as}from"react/jsx-runtime";function Qn(s,l){let d=o((u)=>u.sessions),r=o((u)=>u.actions),[S,m]=N(()=>new Set);return(u)=>{let c=l?.(u)??null,a=Xn(s.id,u,d,r,s);if(a.length===0)return c;let x=`${s.id}:${u.key}`;return{active:c?.active===!0||a.some((i)=>i.status==="running"||i.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||S.has(x),content:p(as,{children:[t(Xo,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(x)?i:new Set([...i,x]))}),c?.content]})}}}function Xo({sessionId:s,turn:l,parent:d,tasks:r,onExpand:S}){let{host:m}=e(),u=o((n)=>n.sessions),c=o((n)=>n.actions),a=r??Xn(s,l,u,c,d),x=a.some((n)=>n.status==="running"),i=a.some((n)=>n.status==="running"||n.status==="requires_action"),[f,k]=M(`subagents:${s}:${l.key}`,i,!0),w=J();if(a.length===0)return null;let g=new Map;for(let n of a)g.set(n.status,(g.get(n.status)??0)+1);let v=[...g].map(([n,E])=>`${m.t(`subagents.${n}`)} ${E}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":f,"aria-controls":w,onClick:()=>{if(!f)S?.();k(!f)},children:[f?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),x?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",a.length]}),t("span",{className:"truncate",role:"status",children:v})]}),t("div",{id:w,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:a.map((n)=>t(ts,{task:n,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${n.key}`,onRead:()=>{S?.(),k(!0)}},n.key))})]})}function O(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function ts({task:s,cwd:l,stateKey:d,visible:r,onRead:S}){let{client:m,host:u}=e(),{t:c}=u,a=s.session,x=o((h)=>h.connection==="ready"),[i,f]=M(`subagent:${d}`,!1),[k,w]=N(!1),[g,v]=N(null),[n,E]=N(null),[I,Q]=N(null),[R,P]=N(!1),B=L(!1),_=L(!1),j=J(),q=a&&y(a.configOptions,"model"),z=s.title??c("subagents.untitled"),W=n?O(n,a):a,U=x&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=a?.cwd??l,T=ss(async(h)=>{if(!m.readSubagentHistory||H===null||B.current)return;_.current=!0,B.current=!0,P(!0),v(null);try{let b=await m.readSubagentHistory(H,D,h);E((K)=>K===null?b.session:O(b.session,K)),Q(b.cursor)}catch(b){v(b instanceof Error?b.message:String(b))}finally{B.current=!1,P(!1)}},[m,H,D]);es(()=>{if(r&&i&&!_.current)T(null)},[r,i,T]);let V=async()=>{if(!a)throw Error("A live child session is required for cancellation");w(!0),v(null);try{await m.cancel(a.id)}catch(h){v(h instanceof Error?h.message:String(h))}finally{w(!1)}};return p("section",{"aria-label":z,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${c(`subagents.${s.status}`)}`,"aria-expanded":i,"aria-controls":j,onClick:()=>{if(!i)S();f(!i)},children:[i?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:z}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:k,"aria-label":c("subagents.cancel",{name:z}),onClick:()=>{V()},children:k?t(F,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),g&&!i&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!i,className:"min-w-0 ps-4",children:[(s.description||q)&&p("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),q&&t("span",{className:"shrink-0",children:Y(q)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{T(n===null?null:I)},children:c("timeline.retry")})]}),R&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),I&&t(C,{variant:"ghost",size:"sm",disabled:R,onClick:()=>{T(I)},children:c("timeline.loadEarlier")}),r&&i&&(W&&W.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:W})}):!R&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:l,host:d}=e(),r=Qn(s);return t(mt,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
+
export{Qn,Xo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{$a,Ts,
|
|
1
|
+
import{ei}from"./chunk-grxjvm9h.js";import{ni,lt}from"./chunk-7wd0kfqr.js";import{Button as et}from"@nyssance/shadcn/vega/components/ui/button";import{cn as rt}from"cn";import{LoaderCircleIcon as nt,SearchIcon as ot}from"lucide-react";import{useCallback as _,useEffect as f,useMemo as J,useRef as b,useState as v}from"react";import{jsx as H,jsxs as q,Fragment as st}from"react/jsx-runtime";var V="chat-search",W="chat-search-current",X=150;function $a(o){let r=o??"";return[...document.querySelectorAll("[data-chat-scroll]")].find((l)=>l.dataset.chatScroll===r)??null}var ct=12;function Ts(o,r="center"){let l=o.closest("[data-chat-scroll]");if(!l)return;let g=o.getBoundingClientRect(),y=l.getBoundingClientRect(),m=r==="start"?ct:(l.clientHeight-g.height)/2;l.scrollTo({top:l.scrollTop+(g.top-y.top)-m,behavior:"smooth"})}function P(o){let r=o.startContainer.parentElement;if(!r)return;Ts(r)}var M=new Map;function Y(){if(typeof CSS>"u"||!("highlights"in CSS)||typeof Highlight>"u")return;if(M.size===0){CSS.highlights.delete(V),CSS.highlights.delete(W);return}let o=[...M.values()];CSS.highlights.set(V,new Highlight(...o.flatMap((r)=>r.all))),CSS.highlights.set(W,new Highlight(...o.flatMap((r)=>r.current?[r.current]:[])))}function it(){let o=Symbol();return{clearHighlights:()=>{M.delete(o),Y()},applyHighlights:(r,l)=>{M.set(o,{all:r,current:l}),Y()}}}function Yo({getViewport:o,findSourceMatches:r,revealTurn:l,prepareSource:g,subscribeOpen:y,labels:m,placement:K="header"}){let{clearHighlights:s,applyHighlights:p}=J(it,[]),S=r!==void 0,[c,R]=v(!1),[i,O]=v(""),[z,T]=v(!1),[D,L]=v(null),G=i.trim().length>0;f(()=>{if(!c||!G||g===void 0){T(!1),L(null);return}let e=new AbortController;return T(!0),L(null),g(e.signal).catch((t)=>{if(!e.signal.aborted)L(t instanceof Error?t.message:String(t))}).finally(()=>{if(!e.signal.aborted)T(!1)}),()=>e.abort()},[G,c,g]);let u=J(()=>c&&i.trim()&&r?r(i.trim()):[],[r,c,i]),[F,I]=v(0),[Z,E]=v(0),C=b([]),x=b(0),a=b(null),Q=b(null),U=b(null);f(()=>{if(!y)return;return y(()=>{R(!0);let t=U.current;if(t!==null)t.focus({preventScroll:!0}),t.select()})},[y]);let A=_(async(e,t)=>{let n=u[e];if(n===void 0)return;let h=o();if(h===null)throw Error("Chat scroll container is missing");if(l)await l(n.turnKey,t);if(t.aborted)return;let d=h.querySelector(`[data-turn-key="${CSS.escape(n.turnKey)}"]`);if(d===null)throw Error(`Codex turn is missing: ${n.turnKey}`);if(await ni(d,t),t.aborted)return;if(!l)Ts(d,"start");if(await new Promise((tt)=>requestAnimationFrame(()=>tt())),t.aborted)return;let N=lt(d,i.trim());C.current=N;let B=N[n.occurrenceInTurn];if(p(N,B??null),B!==void 0)P(B)},[p,u,o,i,l]),k=b(A);f(()=>{k.current=A},[A]);let w=_(()=>{R(!1),O(""),x.current=0,a.current?.abort(),a.current=null,s(),C.current=[]},[s]);f(()=>{if(!c)return;let e=(t)=>{if(t.key==="Escape"&&Q.current?.contains(document.activeElement))t.preventDefault(),w()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,w]),f(()=>{if(!c||!i.trim()){s(),C.current=[],I(0),E(0),x.current=0;return}let e=setTimeout(()=>{if(S)return;let t=o();if(!t)return;let n=lt(t,i);if(C.current=n,I(n.length),E(0),p(n,n[0]??null),n[0])P(n[0])},X);return()=>{clearTimeout(e),s()}},[p,s,S,c,i,o]),f(()=>{if(!c||!S||!i.trim())return;let e=new AbortController;a.current?.abort(),a.current=e;let t=setTimeout(()=>{C.current=[],x.current=0,I(u.length),E(0),s(),k.current(0,e.signal)},X);return()=>{if(e.abort(),a.current===e)a.current=null;clearTimeout(t),s()}},[s,u.length,S,c,i]),f(()=>()=>{a.current?.abort(),s()},[s]),f(()=>{if(!c)s()},[s,c]);let j=_((e)=>{if(S){if(u.length===0)return;let n=(x.current+(e?-1:1)+u.length)%u.length;x.current=n,E(n),a.current?.abort();let h=new AbortController;a.current=h,k.current(n,h.signal);return}let t=C.current;if(!t.length)return;E((n)=>{let h=(n+(e?-1:1)+t.length)%t.length,d=t[h];return p(t,d),P(d),h})},[p,u.length,S]);return q(st,{children:[K==="header"&&H(et,{variant:"ghost",size:"icon-sm",title:m.search,onClick:()=>c?w():R(!0),children:H(ot,{})}),c&&q("div",{"data-chat-search":!0,"aria-busy":z||void 0,ref:Q,className:rt("bg-background border-b",K==="body"?"relative shrink-0":"absolute inset-x-0 top-full z-30"),children:[H(ei,{ref:U,value:i,onChange:O,onFind:j,onClose:w,placeholder:m.placeholder,prevTitle:m.previous,nextTitle:m.next}),i.trim()&&q("div",{className:"text-muted-foreground border-border border-t px-3 py-1 text-[11px]",children:[z?H(nt,{"aria-hidden":"true",className:"size-3 animate-spin"}):F===0?"0 / 0":`${Z+1} / ${F}`,D!==null&&H("span",{role:"alert",children:D})]})]})]})}
|
|
2
|
+
export{$a,Ts,Yo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L}from"./chunk-
|
|
2
|
-
export{da,ua,
|
|
1
|
+
import{L}from"./chunk-q4nx04sy.js";import{s,h}from"./chunk-n9jaz2pd.js";import{v,f}from"./chunk-a8r3mggj.js";import{GlobeIcon as G,LogOutIcon as R}from"lucide-react";import{useRef as k,useState as c}from"react";import{Avatar as T,AvatarFallback as B,AvatarImage as E}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as d,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as l,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function da(e){return o(d,{...e})}function ua(e){return o(l,{...e})}function Rr({className:e,...r}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function pa({languages:e,value:r,onChange:i}){let a=s();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(G,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(_,{children:o(z,{value:r,onValueChange:(t)=>void h(a,Promise.resolve(i(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function ma({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:N}=t,[g,C]=c(!1),[S,m]=c(!1),M=k(null),[w,O]=c({width:0,offset:0}),P=(x)=>{if(x){let p=M.current,u=p?.closest("[data-sidebar-footer-row]");if(!p||!u)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=u.getBoundingClientRect(),A=p.getBoundingClientRect(),I=getComputedStyle(u).direction==="rtl";O({width:u.clientWidth,offset:I?y.right-A.right:A.left-y.left})}C(x)};L(g);let b=a||S,D=n(T,{className:"size-[18px] after:border-0",children:[o(E,{src:e.avatar??void 0,alt:""}),o(B,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:g,onOpenChange:P,children:[n(J,{ref:M,render:o(f,{disabled:b,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(v,{children:D}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-w.offset,sideOffset:8,style:{width:w.width},children:[n(d,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(v,{children:D}),n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(l,{})]}),r,r!=null&&o(l,{}),o(d,{children:n(Rr,{disabled:b,onClick:()=>{m(!0),h(t,i()).finally(()=>m(!1))},children:[o(R,{}),N("sessionList.signOut")]})})]})]})}
|
|
2
|
+
export{da,ua,Rr,pa,ma};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function ps({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{ps};
|