@alwith/module-chat 0.6.24 → 0.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -34
- package/dist/activity-host.js +1 -1
- package/dist/agent/client.d.ts +25 -9
- 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-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +27 -13
- 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-n0q8e6sq.js → chunk-0bv3tw1m.js} +2 -2
- package/dist/{chunk-qvw0kyse.js → chunk-0e5dx357.js} +2 -2
- package/dist/{chunk-6cjjwry2.js → chunk-0enb3f4n.js} +2 -2
- package/dist/{chunk-t3m57q06.js → chunk-0jg7hgp5.js} +2 -2
- package/dist/{chunk-m6080rsp.js → chunk-0m4s668v.js} +2 -2
- package/dist/{chunk-7a70nd7e.js → chunk-16dyzkha.js} +2 -2
- package/dist/{chunk-g751pxzk.js → chunk-18kdsdmy.js} +2 -2
- package/dist/{chunk-ck2ax5f6.js → chunk-1gr60c40.js} +2 -2
- package/dist/{chunk-az3g3a94.js → chunk-1wr1ef9x.js} +2 -2
- package/dist/chunk-24y0mvqf.js +2 -0
- package/dist/chunk-2bbdgf43.js +2 -0
- package/dist/chunk-2f8s5gtn.js +2 -0
- package/dist/{chunk-znagg8v9.js → chunk-2yvj9k42.js} +2 -2
- package/dist/{chunk-7wpcdwan.js → chunk-30nre2gw.js} +2 -2
- package/dist/chunk-317w17va.js +2 -0
- package/dist/{chunk-mtn6vdf8.js → chunk-3hsft68c.js} +2 -2
- package/dist/{chunk-rqa21qrv.js → chunk-3nawfa7b.js} +2 -2
- package/dist/{chunk-dxsjz3re.js → chunk-3q8vw3wb.js} +2 -2
- package/dist/{chunk-a6ysp1fp.js → chunk-3qedn07q.js} +2 -2
- package/dist/{chunk-jg4c3zg4.js → chunk-3tvq6xr2.js} +2 -2
- package/dist/{chunk-h8r785ne.js → chunk-3z86hy2s.js} +2 -2
- package/dist/{chunk-1pb43y89.js → chunk-4a4awnss.js} +2 -2
- package/dist/{chunk-jydhbkm8.js → chunk-4d9sajzj.js} +2 -2
- package/dist/{chunk-8h4e3654.js → chunk-4g1s7gdh.js} +2 -2
- package/dist/{chunk-v581r9vt.js → chunk-4sfxcw58.js} +3 -3
- package/dist/{chunk-542c9tpr.js → chunk-4vayk46h.js} +2 -2
- package/dist/chunk-51xk5tw2.js +2 -0
- package/dist/{chunk-ymgc4317.js → chunk-52wrk1mh.js} +2 -2
- package/dist/chunk-53r6pr16.js +2 -0
- package/dist/{chunk-s05ftq29.js → chunk-55m88zbv.js} +2 -2
- package/dist/{chunk-79ayc6qy.js → chunk-5bhp61sd.js} +2 -2
- package/dist/chunk-5mjs63fv.js +2 -0
- package/dist/chunk-5x5n3b15.js +2 -0
- package/dist/{chunk-5xe89qwh.js → chunk-64apxzn7.js} +2 -2
- package/dist/{chunk-z8sheg2r.js → chunk-64cbt3ym.js} +2 -2
- package/dist/{chunk-bane0xc8.js → chunk-6e84zbgs.js} +2 -2
- package/dist/chunk-6ym1a5wa.js +2 -0
- package/dist/{chunk-7wd0kfqr.js → chunk-747qe35q.js} +2 -2
- package/dist/{chunk-11vn501z.js → chunk-75dr7tyz.js} +2 -2
- package/dist/{chunk-73541c5k.js → chunk-7ng6qs9c.js} +2 -2
- package/dist/{chunk-1e83qr49.js → chunk-7rtwekkz.js} +2 -2
- package/dist/{chunk-mfn37eme.js → chunk-7s7cevjh.js} +2 -2
- package/dist/{chunk-r7paw6ba.js → chunk-7tw7rn0m.js} +2 -2
- package/dist/chunk-7zww33h8.js +2 -0
- package/dist/chunk-81838qem.js +2 -0
- package/dist/chunk-84ncszbf.js +2 -0
- package/dist/{chunk-gec6q1jb.js → chunk-84p483n0.js} +2 -2
- package/dist/{chunk-kk9dbwd1.js → chunk-84zzf0ys.js} +2 -2
- package/dist/{chunk-8ew2e3y7.js → chunk-88ysxbdh.js} +2 -2
- package/dist/chunk-8gt8yn8k.js +4 -0
- package/dist/{chunk-zm6b6zyr.js → chunk-8wk3e4z7.js} +2 -2
- package/dist/chunk-94m77zyn.js +2 -0
- package/dist/{chunk-vx6shb4g.js → chunk-95ywdfe0.js} +2 -2
- package/dist/chunk-9nbkggqn.js +2 -0
- package/dist/chunk-9neb2f30.js +2 -0
- package/dist/chunk-9wc4emwt.js +2 -0
- package/dist/chunk-a11wvd8e.js +2 -0
- package/dist/chunk-acf4sdp7.js +2 -0
- package/dist/{chunk-0ne2mz2q.js → chunk-ag2t01q7.js} +3 -3
- package/dist/chunk-aht6f6tf.js +2 -0
- package/dist/chunk-amf0m4tb.js +2 -0
- package/dist/chunk-ax7c2kam.js +2 -0
- package/dist/{chunk-zwyd2bhy.js → chunk-axvjn527.js} +2 -2
- package/dist/{chunk-mc40zb3c.js → chunk-b2n5sj31.js} +2 -2
- package/dist/chunk-bapn03er.js +2 -0
- package/dist/{chunk-jw1c8r97.js → chunk-bbrx6m7n.js} +2 -2
- package/dist/{chunk-x621s275.js → chunk-bf7sgpzq.js} +2 -2
- package/dist/{chunk-81hv0s07.js → chunk-bgnxw313.js} +2 -2
- package/dist/{chunk-rff6c87z.js → chunk-brv52tgj.js} +2 -2
- package/dist/chunk-bztkz3dz.js +2 -0
- package/dist/{chunk-6tvq472s.js → chunk-bzzx1y15.js} +2 -2
- package/dist/{chunk-wf7kfk3p.js → chunk-c13rnm7b.js} +2 -2
- package/dist/{chunk-dypeezvv.js → chunk-c22xq7a3.js} +3 -3
- package/dist/{chunk-4fmn1kk4.js → chunk-c7qzvt21.js} +3 -3
- package/dist/chunk-cans04tz.js +3 -0
- package/dist/{chunk-geh3wyxw.js → chunk-cgnzqmqd.js} +2 -2
- package/dist/chunk-chn1mkv0.js +2 -0
- package/dist/{chunk-qdyyvd2w.js → chunk-cp4wxmh5.js} +2 -2
- package/dist/chunk-cv0qbty5.js +3 -0
- package/dist/{chunk-zzqbe5r0.js → chunk-d582db8v.js} +2 -2
- package/dist/{chunk-2cc8d35c.js → chunk-d71nz1je.js} +2 -2
- package/dist/{chunk-5pmr5dby.js → chunk-dd9k5bbt.js} +2 -2
- package/dist/{chunk-ffs5nkt0.js → chunk-dheg4bs2.js} +2 -2
- package/dist/{chunk-tknyjndw.js → chunk-dx5hh359.js} +3 -3
- package/dist/{chunk-zz582m73.js → chunk-dxwbgg69.js} +2 -2
- package/dist/{chunk-gak8579e.js → chunk-e00dz09f.js} +2 -2
- package/dist/chunk-e1fzfaqj.js +2 -0
- package/dist/{chunk-x4enakra.js → chunk-e3nccytb.js} +1 -1
- package/dist/{chunk-qxssxzws.js → chunk-e9nvbe3j.js} +2 -2
- package/dist/{chunk-mgmv8kap.js → chunk-ermc9p1p.js} +2 -2
- package/dist/{chunk-xadfbbwt.js → chunk-erp1g3as.js} +2 -2
- package/dist/{chunk-nh56sb8e.js → chunk-etvdqkvb.js} +2 -2
- package/dist/{chunk-zsrjzx7g.js → chunk-exrd2xzz.js} +2 -2
- package/dist/{chunk-mbsmb8jn.js → chunk-eynwjzqp.js} +2 -2
- package/dist/chunk-fnm2xznx.js +2 -0
- package/dist/{chunk-rb4p3h5b.js → chunk-ftsnryz8.js} +2 -2
- package/dist/{chunk-4ntxjy8v.js → chunk-fwb6tf7m.js} +2 -2
- package/dist/{chunk-0xshzqb6.js → chunk-fwghjmd1.js} +2 -2
- package/dist/chunk-g1tbd3pd.js +2 -0
- package/dist/{chunk-5kje89r8.js → chunk-g3y0r56h.js} +2 -2
- package/dist/{chunk-ym6jphs4.js → chunk-gbsn1qep.js} +3 -3
- package/dist/{chunk-5d138vq3.js → chunk-gdtpwbqn.js} +1 -1
- package/dist/{chunk-wsyfhh7y.js → chunk-gjtxked2.js} +2 -2
- package/dist/{chunk-js3nhatr.js → chunk-gpv1dc5y.js} +2 -2
- package/dist/{chunk-d5gt1x0n.js → chunk-grfrfh7s.js} +2 -2
- package/dist/chunk-h1kvdf3t.js +2 -0
- package/dist/{chunk-mdercwm8.js → chunk-h3mwzf3d.js} +3 -3
- package/dist/{chunk-4h9ee02f.js → chunk-h5mdgrq6.js} +2 -2
- package/dist/{chunk-bdrcreqs.js → chunk-ha9n1k24.js} +2 -2
- package/dist/chunk-hd11bfmp.js +2 -0
- package/dist/{chunk-tyka859b.js → chunk-hf5bpahd.js} +2 -2
- package/dist/{chunk-wyxa2tfm.js → chunk-j2ffde9c.js} +5 -5
- package/dist/{chunk-fe83mqnb.js → chunk-j4w2hbbe.js} +2 -2
- package/dist/chunk-j62heyzq.js +2 -0
- package/dist/{chunk-h0k80cxs.js → chunk-j8zpjnf8.js} +2 -2
- package/dist/{chunk-q7ka46hb.js → chunk-jdwd4ta9.js} +3 -3
- package/dist/{chunk-ww3f6z4x.js → chunk-je27hf3t.js} +3 -3
- package/dist/{chunk-q01vmp9m.js → chunk-jgqt7k0h.js} +2 -2
- package/dist/{chunk-csbv8m51.js → chunk-jmc7ddz8.js} +3 -3
- package/dist/{chunk-jcyv1q0x.js → chunk-jp4xjks0.js} +2 -2
- package/dist/{chunk-nypr6qtz.js → chunk-jvy6p83k.js} +3 -3
- package/dist/chunk-k2nbrerw.js +2 -0
- package/dist/{chunk-kj3a1k2q.js → chunk-k5nd3vyq.js} +2 -2
- package/dist/chunk-knrc6kks.js +2 -0
- package/dist/chunk-kqwfwck2.js +2 -0
- package/dist/{chunk-vsh9vh4s.js → chunk-m2n6sxf8.js} +2 -2
- package/dist/{chunk-3z5zyra7.js → chunk-m68t534g.js} +2 -2
- package/dist/{chunk-w4bye56s.js → chunk-ma6ycen5.js} +2 -2
- package/dist/{chunk-hcat58sr.js → chunk-masqfje4.js} +2 -2
- package/dist/chunk-mckz9qv5.js +2 -0
- package/dist/{chunk-79pvfyd0.js → chunk-mfmh7ztq.js} +2 -2
- package/dist/{chunk-d6ke5e80.js → chunk-n4wp3h3j.js} +2 -2
- package/dist/{chunk-6r5nzsw8.js → chunk-ncgwbdmj.js} +2 -2
- package/dist/{chunk-8v53bkyr.js → chunk-ne4b53kn.js} +2 -2
- package/dist/chunk-njqan8zg.js +2 -0
- package/dist/{chunk-heqa4swe.js → chunk-nqt9gyz9.js} +2 -2
- package/dist/{chunk-sjqhtpzr.js → chunk-nrpgmawz.js} +2 -2
- package/dist/{chunk-m9ttf96p.js → chunk-p3gawvqr.js} +2 -2
- package/dist/{chunk-et2pdaz7.js → chunk-p96vgnxw.js} +2 -2
- package/dist/{chunk-84eye2j0.js → chunk-pebkk426.js} +2 -2
- package/dist/chunk-pg9gckmw.js +2 -0
- package/dist/{chunk-e04g26qm.js → chunk-pqz2471h.js} +2 -2
- package/dist/chunk-ps408sxd.js +2 -0
- package/dist/{chunk-j3g21ext.js → chunk-pxr5snwm.js} +2 -2
- package/dist/{chunk-2fx3qhyb.js → chunk-q3s59jyn.js} +2 -2
- package/dist/{chunk-w2xjhfm2.js → chunk-qa9p0a64.js} +3 -3
- package/dist/{chunk-7v7wc7k5.js → chunk-qceex4vv.js} +2 -2
- package/dist/chunk-qkn0y5wx.js +2 -0
- package/dist/{chunk-76smt4zv.js → chunk-qzerhkyb.js} +3 -3
- package/dist/chunk-qzn6qtmy.js +2 -0
- package/dist/{chunk-q4nx04sy.js → chunk-r5f77gtx.js} +2 -2
- package/dist/{chunk-rzxnxj25.js → chunk-rkwq0grt.js} +2 -2
- package/dist/{chunk-qghq84r4.js → chunk-rn54592t.js} +2 -2
- package/dist/chunk-rv3k0kfr.js +2 -0
- package/dist/chunk-s1nfyggb.js +2 -0
- package/dist/chunk-s8cj6aw6.js +2 -0
- package/dist/{chunk-76c0cx40.js → chunk-sjm9p42x.js} +2 -2
- package/dist/chunk-stv8pr4v.js +2 -0
- package/dist/{chunk-m8tt5bf9.js → chunk-swqbbw8q.js} +2 -2
- package/dist/{chunk-stc4ctrx.js → chunk-syjt7y4v.js} +2 -2
- package/dist/chunk-t9t53gsj.js +3 -0
- package/dist/{chunk-xk0dt0es.js → chunk-tgnftxyb.js} +2 -2
- package/dist/{chunk-nhstvqjy.js → chunk-tr0bmqn9.js} +2 -2
- package/dist/{chunk-t686zwxk.js → chunk-v0wmy9b3.js} +2 -2
- package/dist/{chunk-vkj5fznh.js → chunk-v2pa8yak.js} +3 -3
- package/dist/{chunk-tctdn4kk.js → chunk-v32jvbgx.js} +2 -2
- package/dist/{chunk-6vdayg6w.js → chunk-v96vkrw2.js} +2 -2
- package/dist/{chunk-qv23mh24.js → chunk-v9weanq6.js} +2 -2
- package/dist/chunk-vd6eqshg.js +2 -0
- package/dist/{chunk-9ts08sma.js → chunk-vdt7cp6c.js} +2 -2
- package/dist/{chunk-wz6765xb.js → chunk-vev9q4t4.js} +3 -3
- package/dist/{chunk-whzs7yxf.js → chunk-vmfhnkxj.js} +2 -2
- package/dist/{chunk-7s3f142h.js → chunk-vqby71fp.js} +2 -2
- package/dist/chunk-vzgn8exd.js +2 -0
- package/dist/{chunk-e5m9kg1w.js → chunk-w562jf57.js} +2 -2
- package/dist/chunk-w5q2ygsa.js +2 -0
- package/dist/{chunk-bcnh0z8e.js → chunk-w5zvy4ex.js} +2 -2
- package/dist/{chunk-50eym2q3.js → chunk-wde0m4pf.js} +3 -3
- package/dist/{chunk-xdcp8tj9.js → chunk-why9g2kd.js} +2 -2
- package/dist/{chunk-whb8ttdy.js → chunk-wpacvdsv.js} +2 -2
- package/dist/{chunk-kbfe7gqw.js → chunk-x49qjrbk.js} +2 -2
- package/dist/{chunk-4r0ffb0s.js → chunk-xe7ep70k.js} +2 -2
- package/dist/{chunk-8mzbkjhk.js → chunk-xnbvdqnt.js} +2 -2
- package/dist/{chunk-e641842r.js → chunk-xqb4thy8.js} +2 -2
- package/dist/{chunk-2sc2z6g5.js → chunk-xwwjj45a.js} +2 -2
- package/dist/{chunk-2qs1ss40.js → chunk-y3mx5sf0.js} +2 -2
- package/dist/chunk-y4tj08c1.js +2 -0
- package/dist/chunk-y8gz9rsc.js +2 -0
- package/dist/{chunk-bfb8bpwc.js → chunk-y8yawx3d.js} +2 -2
- package/dist/{chunk-3a5sn0v8.js → chunk-ypdh88cj.js} +2 -2
- package/dist/{chunk-pnh5t6pc.js → chunk-yryg27yy.js} +2 -2
- package/dist/{chunk-1rwkdezk.js → chunk-z6dx6dnt.js} +2 -2
- package/dist/{chunk-859359n0.js → chunk-z6x70w62.js} +2 -2
- package/dist/chunk-zft4afb8.js +2 -0
- package/dist/chunk-zm0j9nw3.js +2 -0
- package/dist/{chunk-vbbndjfd.js → chunk-zv3bm3np.js} +2 -2
- package/dist/{chunk-3zae491f.js → chunk-zw4ehzza.js} +3 -3
- package/dist/{chunk-wwj743gm.js → chunk-zyn0ys4m.js} +2 -2
- package/dist/{chunk-6w8p1hwb.js → chunk-zypgrbd9.js} +2 -2
- package/dist/chunk-zzz6kmh8.js +2 -0
- package/dist/client.d.ts +2 -3
- 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.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/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.d.ts +20 -21
- 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/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-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/lib/tool-artifacts.js +1 -1
- package/dist/locales.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/new-chat-directory.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.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/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.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-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +4 -3
- package/dist/agent/application-client.d.ts +0 -30
- package/dist/agent/application-client.js +0 -1
- package/dist/chunk-0myf2ak0.js +0 -2
- package/dist/chunk-1smyy9mt.js +0 -2
- package/dist/chunk-2q1xxs3t.js +0 -2
- package/dist/chunk-36ttr22w.js +0 -2
- package/dist/chunk-3mm1d99e.js +0 -2
- package/dist/chunk-3qwtda21.js +0 -3
- package/dist/chunk-4gxpna3p.js +0 -2
- package/dist/chunk-5ryfm4ka.js +0 -4
- package/dist/chunk-7cab9zy0.js +0 -2
- package/dist/chunk-7xvrsw7x.js +0 -2
- package/dist/chunk-9hjfc08t.js +0 -2
- package/dist/chunk-a8r3mggj.js +0 -2
- package/dist/chunk-a9grdyep.js +0 -3
- package/dist/chunk-ayt0bzr9.js +0 -2
- package/dist/chunk-b42vv8f2.js +0 -2
- package/dist/chunk-b61qhh61.js +0 -2
- package/dist/chunk-bgav9cq2.js +0 -2
- package/dist/chunk-bh0h7fz7.js +0 -2
- package/dist/chunk-bshgrwe9.js +0 -2
- package/dist/chunk-bsnmj69j.js +0 -2
- package/dist/chunk-capkej8s.js +0 -2
- package/dist/chunk-cer4dxas.js +0 -2
- package/dist/chunk-cq7bbgcg.js +0 -2
- package/dist/chunk-d29xbf16.js +0 -2
- package/dist/chunk-dp1nnwk2.js +0 -2
- package/dist/chunk-dpfjxym1.js +0 -2
- package/dist/chunk-eqbp85f3.js +0 -2
- package/dist/chunk-f9z37ptq.js +0 -2
- package/dist/chunk-fn68kh69.js +0 -2
- package/dist/chunk-gkyvgjyx.js +0 -2
- package/dist/chunk-gpcsb4tg.js +0 -3
- package/dist/chunk-j2cdjycf.js +0 -2
- package/dist/chunk-jjgwfpmp.js +0 -2
- package/dist/chunk-mcrd86tx.js +0 -2
- package/dist/chunk-n9jaz2pd.js +0 -2
- package/dist/chunk-nbaxn7jx.js +0 -2
- package/dist/chunk-nvgnan7w.js +0 -2
- package/dist/chunk-p1tcxky2.js +0 -2
- package/dist/chunk-p811gdar.js +0 -2
- package/dist/chunk-p8cm3xw1.js +0 -2
- package/dist/chunk-pr36m3qx.js +0 -2
- package/dist/chunk-q73jne25.js +0 -2
- package/dist/chunk-qm2jq2bq.js +0 -2
- package/dist/chunk-qwet39v5.js +0 -2
- package/dist/chunk-r3hsjwjn.js +0 -2
- package/dist/chunk-rg8kj085.js +0 -2
- package/dist/chunk-s2k0g1hc.js +0 -2
- package/dist/chunk-s3j71dbh.js +0 -2
- package/dist/chunk-sdv06e2k.js +0 -2
- package/dist/chunk-sgbn37kz.js +0 -2
- package/dist/chunk-tfj6v7y4.js +0 -2
- package/dist/chunk-tsdb5jnj.js +0 -2
- package/dist/chunk-v3dq3hx2.js +0 -2
- package/dist/chunk-xk306vq1.js +0 -2
- package/dist/chunk-ymk7ampx.js +0 -2
- package/dist/chunk-zpqj0ka8.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$s,qs,Ks}from"../chunk-3q8vw3wb.js";import"../chunk-2bbdgf43.js";import"../chunk-vdt7cp6c.js";import"../chunk-q3s59jyn.js";import"../chunk-1wr1ef9x.js";import"../chunk-c22xq7a3.js";import"../chunk-c13rnm7b.js";import"../chunk-y8gz9rsc.js";import"../chunk-acf4sdp7.js";import"../chunk-cans04tz.js";import"../chunk-w5q2ygsa.js";import"../chunk-mckz9qv5.js";import{Jt}from"../chunk-v32jvbgx.js";import{Zt,di,Qt}from"../chunk-4a4awnss.js";import{Hn,Un,Bn,Gn}from"../chunk-dd9k5bbt.js";import{R,bt,Ct,he,S,ya,se,Dn,Fn,xa,wt,ba}from"../chunk-3z86hy2s.js";import"../chunk-4d9sajzj.js";import{Di,Fi,Pn,fa,In,Ue}from"../chunk-bztkz3dz.js";import{si,Ws,ai,li,ci,Xn}from"../chunk-jmc7ddz8.js";import{pt,Xt,Yt}from"../chunk-bgnxw313.js";import{Zs}from"../chunk-0e5dx357.js";export{Qt as CodexAccountCard,di as CodexAccountSummary,Xn as CustomProviderEditor,Hn as DeepSeekLogo,Un as GrokLogo,Jt as LoginCard,pt as MODEL_ALIASES_KEY,wt as MODEL_PRESENTATION,si as ManagedProviderSection,Zs as ModelAliasSettings,Bn as OpenRouterLogo,R as PROVIDERS,Di as PROVIDERS_CHANGED,Fi as PROVIDERS_REVOKED,ci as ProviderRow,Ws as ProviderSection,ai as ProviderTabs,Gn as QwenLogo,li as TestFeedback,Zt as UsageLimitRow,In as applyProvidersWhenIdle,$s as codexSettingsBridge,fa as createManagedProvidersPort,Pn as createProvidersPort,Ks as createSettingsBridgeClient,xa as customModelEffort,S as gatewayModelId,bt as isAccountModel,Ct as parseCustomModels,ba as presentModel,Fn as providerApplicationPending,he as providerGroups,Dn as providerKeyUrl,se as providerRegion,ya as resolveSessionModel,Yt as saveModelAlias,qs as serveSettingsBridge,Xt as useModelAliases,Ue as useProviders};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
355
|
"peerDependencies": {
|
|
356
|
-
"@agentclientprotocol/sdk": "^2.
|
|
356
|
+
"@agentclientprotocol/sdk": "^2.7.0",
|
|
357
357
|
"@alwith/api": "^0.6.0",
|
|
358
358
|
"react": "^19.3.1",
|
|
359
359
|
"react-dom": "^19.3.1",
|
|
@@ -406,7 +406,8 @@
|
|
|
406
406
|
"@dnd-kit/sortable": "^10.0.0",
|
|
407
407
|
"@dnd-kit/utilities": "^3.2.2",
|
|
408
408
|
"@floating-ui/dom": "^1.8.0",
|
|
409
|
-
"@
|
|
409
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
410
|
+
"@nyssance/codex-acp-v2": "^0.7.77",
|
|
410
411
|
"@nyssance/shadcn": "^4.23.4",
|
|
411
412
|
"@shadcn/react": "^0.3.1",
|
|
412
413
|
"@solar-icons/react": "^2.6.0",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Agent, type AgentRequest, type AppsInstalledParams, type ClientOptions as AdapterOptions, CodexClient as AdapterClient, type CodexClientState, type SessionOperation, type SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
|
|
2
|
-
import { type ApplicationTools, type ApplicationToolSelection } from "../application-tools";
|
|
3
|
-
export type ClientOptions = AdapterOptions & {
|
|
4
|
-
applicationTools?: ApplicationTools;
|
|
5
|
-
};
|
|
6
|
-
export declare class ApplicationClient<State extends CodexClientState = CodexClientState> extends AdapterClient<State> {
|
|
7
|
-
private readonly applicationRegistry;
|
|
8
|
-
private readonly toolSelection;
|
|
9
|
-
constructor(openPort: ConstructorParameters<typeof AdapterClient>[0], options: ClientOptions, extraState?: Omit<State, keyof CodexClientState>);
|
|
10
|
-
protected applicationToolsFor(selection: ApplicationToolSelection): Promise<readonly import("../application-tools").ApplicationTool[]> | readonly import("../application-tools").ApplicationTool[];
|
|
11
|
-
protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<AdapterClient<State>["requestContext"]>;
|
|
12
|
-
protected acceptsPendingRequest(request: AgentRequest): boolean;
|
|
13
|
-
protected handleNotification(method: string, params: unknown): boolean;
|
|
14
|
-
protected handleAgentRequest(agent: Agent, request: AgentRequest): boolean;
|
|
15
|
-
protected onDisconnected(): void;
|
|
16
|
-
protected onSessionDropped(id: string): void;
|
|
17
|
-
cancel(id: string): Promise<void>;
|
|
18
|
-
close(id: string): Promise<void>;
|
|
19
|
-
stopSession(id: string): Promise<void>;
|
|
20
|
-
installedApps(params?: AppsInstalledParams): Promise<{
|
|
21
|
-
apps: {
|
|
22
|
-
id: string;
|
|
23
|
-
runtimeName: string | null;
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
callable: boolean;
|
|
26
|
-
iconUrl?: string | null | undefined;
|
|
27
|
-
iconUrlDark?: string | null | undefined;
|
|
28
|
-
}[];
|
|
29
|
-
}>;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{wo}from"../chunk-nbaxn7jx.js";import"../chunk-qv23mh24.js";import"../chunk-pr36m3qx.js";export{wo as ApplicationClient};
|
package/dist/chunk-0myf2ak0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{xe}from"./chunk-g751pxzk.js";function w(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ot(e){if(!e.includes("app://"))return[];let n=xe(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=w(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function os(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function is(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
-
export{w,Ot,Pa,os,is};
|
package/dist/chunk-1smyy9mt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ae}from"./chunk-ffs5nkt0.js";import{r,J,mn}from"./chunk-rzxnxj25.js";var zi=5000;function Ye(t){return"pastedText"in t}function vt(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;J(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Ae(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),mn(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function pn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<zi)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};J(e,(i)=>[...i,o]),vt(e,o,n)}
|
|
2
|
-
export{zi,Ye,vt,pn};
|
package/dist/chunk-2q1xxs3t.js
DELETED
package/dist/chunk-36ttr22w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Fa(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function kt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Fa(t,o))}return{imageFiles:n,sawNonImageFile:i}}function St(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Ln(e){return e.replace(s,"")}function ea(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Dn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Ln(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-ea(n,i)),r=Math.max(0,o-ea(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
-
export{Fa,kt,St,Ln,ea,Dn};
|
package/dist/chunk-3mm1d99e.js
DELETED
package/dist/chunk-3qwtda21.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{Ji}from"./chunk-9ts08sma.js";import{Qi}from"./chunk-2fx3qhyb.js";import{Zi}from"./chunk-az3g3a94.js";import{Lt}from"./chunk-dypeezvv.js";import{o}from"./chunk-f9z37ptq.js";import{e}from"./chunk-bshgrwe9.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ke(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
|
|
2
|
-
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Lt,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Ji,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function dt({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Qi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function we({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(Ke(t))return a(dt,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Zi,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
-
export{Ke,dt,we};
|
package/dist/chunk-4gxpna3p.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Zs={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Xi(e){return[...e].toSorted((o,n)=>(Zs[o.kind]??99)-(Zs[n.kind]??99))}function qa(e){return e==="allow_once"||e==="allow_always"}function Ka(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{Zs,Xi,qa,Ka};
|
package/dist/chunk-5ryfm4ka.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Er}from"./chunk-xk0dt0es.js";import{Nr}from"./chunk-nypr6qtz.js";import{os}from"./chunk-0myf2ak0.js";import{p,_,Ct}from"./chunk-11vn501z.js";import{Fe}from"./chunk-ayt0bzr9.js";import{Cr,wr,kr,Sr,_r}from"./chunk-5kje89r8.js";import{rr,sr}from"./chunk-xdcp8tj9.js";import{U}from"./chunk-542c9tpr.js";import{go}from"./chunk-3zae491f.js";import{ho}from"./chunk-w2xjhfm2.js";import{o}from"./chunk-f9z37ptq.js";import{e}from"./chunk-bshgrwe9.js";import{po,ji}from"./chunk-8mzbkjhk.js";import{uo}from"./chunk-jjgwfpmp.js";import{r,Vi,J,gn}from"./chunk-rzxnxj25.js";import{dn}from"./chunk-j3g21ext.js";import{Ye,pn}from"./chunk-1smyy9mt.js";import{rn,an}from"./chunk-q73jne25.js";import{Hi}from"./chunk-zzqbe5r0.js";import{fn}from"./chunk-qm2jq2bq.js";import{Gi}from"./chunk-2cc8d35c.js";import{un}from"./chunk-d5gt1x0n.js";import{ln}from"./chunk-pnh5t6pc.js";import{Ui}from"./chunk-mdercwm8.js";import{Bi}from"./chunk-6vdayg6w.js";import{hn}from"./chunk-rg8kj085.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as jt,useLayoutEffect as rt,useMemo as lt,useRef as N,useState as M}from"react";import{jsx as m,jsxs as R}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(n){let T=await(await fetch(n.url)).blob();return new Promise((I,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Ne({session:n,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:st,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:kt,attachmentPolicy:Dt,predictions:Nt=!0,disabled:St=!1,preparing:mt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[dt,H]=M(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=dt,[C,Ot]=M(()=>r.get(n.id)?.attachments??pt),[y,Q]=M(()=>r.get(n.id)?.mentions??[]),[d,L]=M(()=>r.get(n.id)?.apps??[]),[ut,K]=M(()=>(r.get(n.id)?.apps?.length??0)>0||U(v,n.commands.map((t)=>t.name)).length>0),W=N(void 0),z=N(void 0);rt(()=>{if(d.length>0)K(!0)},[d.length]);let nt=C.some((t)=>Ye(t)&&t.pastedText.status!=="ready"),[k,ft]=M(!1),[Y,_t]=M(!1),[ot,Lt]=M(!1),it=N(null),f=N(null),ht=N(null),c=N(dt),P=w((t)=>{ht.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),gt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),Wt=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,ct=`${a.slice(0,l)}${t} ${a.slice(h)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(ct),K(!0)},[P]),xt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Ui(n,P,L,d.length>0||y.length>0||C.length>0),yt=lt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:n.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==n.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},H(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:n.id,...c.current,selection:u}}}),[n.id]),j=N(null),bt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=n.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),X=(ut||d.length>0)&&!x,b=!St&&!mt&&n.attached&&!n.restoring&&!n.readOnly,D=!n.readOnly&&(Ft||b),Z=ln(n,b&&!k&&!Y&&!nt&&!ot,v.length>0||C.length>0||y.length>0||d.length>0,Nt&&!x),vt=Z.invalidate;rt(()=>{r.set(n.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,C,y,d]),rt(()=>Vi(n.id,Ot),[n.id]),rt(()=>gn(n.id,(t)=>{if(!D||k)throw Error("The composer cannot take text now; try again later");if(v.length||C.length||y.length||d.length)throw Error("The composer already has a draft; send or clear it first");P(t)}),[n.id,D,k,v,C,y,d,P]);let Pt=o((t)=>Kt(t.agent)),Ut=lt(()=>Pt&&b?async(t)=>dn((await O.fuzzyFileSearch({query:t,roots:[n.cwd],cancellationToken:null})).files):void 0,[O,Pt,b,n.cwd]),at=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let It=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ft(!0);let h=r.get(n.id),ct=c.current.revision,tt=null;try{let A=d.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:rn(et),name:an(et)})}let Tt=os(u,d);if(Tt.length>0)A.push({type:"text",text:Tt});for(let s of i)if(Ye(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===ct&&r.get(n.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,H(c.current),Q([]),L([]),W.current=void 0,z.current=void 0,J(n.id,()=>pt),r.set(n.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(s)=>{if(l.signal.aborted||j.current!==l)return;l.accept(s),S?.(n.id,s)});else if(l===null)await O.prompt(n.id,A);else{let s=await O.prompt(n.id,A);l.accept(s)}vt();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:h.text,revision:tt+1},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(n.id,h),J(n.id,()=>h.attachments);throw A}finally{ft(!1),f.current?.focus()}},[O,n.id,n.state,y,d,T,I,S,vt]),zt=()=>{O.cancel(n.id).catch(B)},Bt=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Fe})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Ht=lt(()=>({session:n,ready:b,inputReady:D,sending:k,textareaRef:f,draft:yt,interruptRef:ht,observeReceipts:bt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[n,b,D,k,yt,bt,at,T,S,x]),At=F.writeTextAttachment,wt={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!D,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||Et||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!X&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=Ct(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=p(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(At)pn(t,n.id,g("composer.pastedTextFilename"),At)}};return m(uo,{value:Ht,children:m("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[st&&m("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:st}),m(Er,{attachmentPolicy:Dt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>J(n.id,()=>t),children:R("div",{ref:it,className:"relative",children:[G&&!ot&&m(Nr,{bashMode:I!==void 0,handleRef:f,commands:n.commands,renderSlashMenu:(t)=>m(po,{anchorRef:it,commands:n.commands,query:t.query,includeAttachment:!1,disabled:!D,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>gt(i)),focusInput:xt}),searchFiles:Ut,onMention:at,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},X?"inline":"textarea"),R(Cr,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:It,onSubmitAsync:It,onSubmitError:B,canSubmit:()=>b&&!k&&!Y&&!nt&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[kt,R(kr,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&m("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),m(Hi,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),m(sr,{children:(t)=>Ye(t)?m(Gi,{data:t,sessionId:n.id}):m(rr,{data:t,t:g})})]}),R(wr,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab"||t.key==="ArrowRight"||t.key==="Enter")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&m("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),X?m(go,{...wt,skillIcon:F.skillIcon,skillNames:n.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):m(ho,{...wt,autoFocus:ut&&x})]}),m(Sr,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[m(ji,{anchorRef:it,commands:n.commands,disabled:!D,agentDisabled:!b||x,agentControls:G,open:ot,onOpenChange:Lt,focusInput:xt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
-
`)?i:`${i}
|
|
3
|
-
`,u=t.startsWith("$")?t:`/${t}`,l=`${a}${u} `;if(!X)z.current={text:i,apps:[]},W.current=l.length,K(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:gt}),Rt,G&&m(un,{sessionId:n.id,options:n.configOptions,disabled:!b})]}),R(_r,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&m(hn,{session:n}),E??m(fn,{...q,sessionId:n.id,options:n.configOptions,disabled:!b}),Mt,m(Bi,{active:V,sending:k||mt||Y,ready:b&&!nt&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
|
-
export{Ne};
|
package/dist/chunk-7cab9zy0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Oe}from"./chunk-mgmv8kap.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function Lr({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:Oe(t)}):null}function Dr({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Lr,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function zn({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Dr,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{Lr,Dr,zn};
|
package/dist/chunk-7xvrsw7x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u,mo}from"./chunk-jydhbkm8.js";import{In}from"./chunk-h8r785ne.js";import{useEffect as p,useRef as P,useState as m}from"react";var $i="providers:changed",qi="providers:managed-revoked",i=(e)=>e;function bn(){return{read:()=>i(u.providersRead()),save:(e,r,t)=>i(u.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(u.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(u.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>u.providersTest({providerId:e}),apply:()=>i(u.providersApply()),onChanged:(e)=>mo[$i].listen((r)=>e(r.payload))}}function qs(){return{bind:(e)=>u.providersAccountBind({account:e}),refresh:(e,r)=>i(u.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await u.providersClearManaged()},onRevoked:(e)=>mo[qi].listen((r)=>e(r.payload.sessionIds))}}async function Cn(e){try{return await e.apply()}catch(r){if(!In(r))throw r;return e.read()}}function Ee(e,r=console.error){let[t,d]=m(null),a=P(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
-
export{$i,qi,bn,qs,Cn,Ee};
|
package/dist/chunk-9hjfc08t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Pt}from"./chunk-b42vv8f2.js";import{isContentEntry as m,isImage as d,isText as p}from"@nyssance/codex-acp-v2/client";var Oa="generate_image",Ha=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],Za={model:"wham",size:"auto"},Io={version:1,revision:"images-v1",definitions:[{name:Oa,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1}}]};function yr(o){return o.items.flatMap((t)=>{if(!Pt(t))return[];let r=t.rawInput,i={};for(let n of t.content.filter(m)){if(!p(n.content)||!n.content.text.startsWith("{"))continue;try{let e=JSON.parse(n.content.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")i={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return t.content.filter(m).flatMap((n,e)=>{if(!d(n.content))return[];let{mimeType:s,data:a}=n.content;return[{id:`${t.id}:${e}`,toolId:t.id,...i,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:s,data:a,src:`data:${s};base64,${a}`}]})})}function ee(o){let t=Ha.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Qa(o,t,r){let i=ee(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
|
|
2
|
-
export{Oa,Ha,Za,Io,yr,ee,Qa};
|
package/dist/chunk-a8r3mggj.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ze,m}from"./chunk-sgbn37kz.js";import{H}from"./chunk-8hygfx41.js";import{V}from"./chunk-z8sheg2r.js";import{L}from"./chunk-q4nx04sy.js";import{Et,rt,Rt}from"./chunk-q01vmp9m.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as _,useLayoutEffect as D,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as j}from"react/jsx-runtime";function R(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function v({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function f({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function se({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:g,wrapHeader:u,onHeaderClick:b,children:P}){let y=()=>{b?.(),t(!o)},x=p(Et,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),S=d(j,{children:[r!=null&&e(v,{children:r}),g??e(H,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Rt,{content:s!==void 0?e(rt,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),k=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,m),onClick:y,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),y()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?k:u(k),o&&e(R,{className:"mt-0.5",children:P})]})}var E=T(()=>{}),G=T(()=>{});function Vn(){return _(G)}function Be(){return _(E)}function Ge({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:g,listeningPorts:u,onOpenPort:b,accessory:P,meta:y,hint:x,actions:S,className:k,...c}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Et,ze,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||u!=null&&u.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...c,children:[e(v,{children:t!=null?e(V,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(H,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(H,{className:"text-muted-foreground text-xs",children:C}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(Rt,{content:P!=null?e(rt,{children:P}):y??e(rt,{}),actions:S}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return O;return e(M,{row:O,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(E.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(q,{open:l,onOpenChange:i,trigger:o,children:t})})})}function q({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return L(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
-
export{R,v,f,se,Vn,Be,Ge};
|
package/dist/chunk-a9grdyep.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-sgbn37kz.js";import{R,f}from"./chunk-a8r3mggj.js";import{Xt}from"./chunk-0xshzqb6.js";import{We,d,Ze,ut,i}from"./chunk-mcrd86tx.js";import{q,K,ce,W,Z,_e,tn}from"./chunk-5d138vq3.js";import{Se}from"./chunk-mtn6vdf8.js";import{pt}from"./chunk-8v53bkyr.js";import{k}from"./chunk-qk1yqepm.js";import{Yt,B}from"./chunk-3z5zyra7.js";import{Q,Ie}from"./chunk-e04g26qm.js";import{Jt}from"./chunk-znagg8v9.js";import{en}from"./chunk-et2pdaz7.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as ne,CircleArrowUpIcon as se,MoreVerticalIcon as ie,PlusIcon as _,PuzzleIcon as le,RefreshCwIcon as oe,SearchIcon as re,Trash2Icon as de,XIcon as me}from"lucide-react";import{memo as ue,useDeferredValue as pe,useEffect as V,useMemo as G,useState as C}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ge,DialogContent as fe,DialogDescription as ve,DialogHeader as xe,DialogTitle as he,DialogTrigger as Ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as ke,DropdownMenuContent as ye,DropdownMenuItem as be,DropdownMenuTrigger as Pe}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as U}from"@nyssance/shadcn/vega/components/ui/input";import{Label as we}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as M}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as X}from"react/jsx-runtime";function E(t){return t.interface?.displayName??t.name}function F(t){return t.interface?.shortDescription??""}function Ce({plugin:t,marketplace:r}){let{t:u}=d(),p=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),g=i((n)=>n.install),c=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",o=u(p?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!p)return e(ne,{className:"text-muted-foreground size-4 shrink-0","aria-label":o});return e(N,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:p||a||c,"aria-label":o,title:c?u("plugins.disabledReason.unknown"):o,onClick:()=>void g({plugin:t,marketplace:r}).catch(()=>{}),children:p?e(M,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function De({plugin:t,marketplace:r,actions:u,onOpen:p}){let a=F(t),g=t.interface?.developerName,c=t.localVersion??t.version,o=[g,c?`v${c}`:null].filter(Boolean).join(" · ");return s(_e,{className:"toolbox-row relative",children:[e(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":E(t),onClick:()=>p({plugin:t,marketplace:r})}),e(W,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(B,{name:t.name})})}),s(K,{className:"pointer-events-none relative min-w-0",children:[e(tn,{className:"mb-0.5",children:E(t)}),e(ce,{className:"line-clamp-1",title:a,children:a||r.interface?.displayName||r.name}),o&&e(ce,{"data-toolbox-metadata":"",children:o})]}),e(q,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function L(){return ut((t)=>t.connection==="ready"&&ee(t.agent))}var S=48;function Me({marketplace:t,plugins:r,onOpen:u}){let{t:p}=d(),a=i((n)=>n.removeMarketplace),[g,c]=C(0),o=Math.min(g,Math.max(0,Math.ceil(r.length/S)-1));if(r.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:r.length}),t.path!==null&&s(ke,{children:[e(Pe,{render:e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":p("plugins.pageActions")}),children:e(ie,{})}),e(ye,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(be,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),p("plugins.marketplace.remove")]})})]})]}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:r.slice(o*S,(o+1)*S).map((n)=>e(De,{onOpen:u,plugin:n,marketplace:t,actions:e(Ce,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),r.length>S&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(N,{variant:"outline",size:"sm",className:"h-9",disabled:o===0,onClick:()=>c(o-1),children:p("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[o+1," / ",Math.ceil(r.length/S)]}),e(N,{variant:"outline",size:"sm",className:"h-9",disabled:(o+1)*S>=r.length,onClick:()=>c(o+1),children:p("plugins.nextPage")})]})]},t.name)}var Ee=ue(function({query:r,onOpen:u}){let{t:p}=d(),a=i((n)=>n.marketplaces),g=i((n)=>n.featuredPluginIds),c=G(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,E(v),F(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
-
`).toLowerCase()}))})),[a]),o=G(()=>{let n=new Set(g);return c.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:y,text:b})=>r===""?v.path!==null||n.has(y.id):b.includes(r)).map(({plugin:y})=>y)}))},[c,g,r]);return s(X,{children:[o.map(({marketplace:n,plugins:v})=>e(Me,{marketplace:n,plugins:v,onOpen:u},JSON.stringify([n.name,n.path,r]))),o.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("plugins.empty")})]})});function ze(){let{t}=d(),r=L(),u=i((h)=>h.addMarketplace),p=i((h)=>h.upgradeAll),a=i((h)=>h.upgrading),[g,c]=C(""),[o,n]=C(!1),[v,x]=C(!1),[y,b]=C(null),z=async()=>{let h=g.trim();if(!h||o)return;n(!0),b(null);try{await u({source:h}),c(""),x(!1)}catch(I){b(I instanceof Error?I.message:String(I))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r||a,"aria-busy":a,onClick:()=>void p(),children:[a?e(M,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(ge,{open:v,onOpenChange:(h)=>{if(!o)x(h)},children:[s(Ne,{render:e(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r}),children:[e(_,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(fe,{children:[s(xe,{children:[e(he,{children:t("plugins.marketplace.addTitle")}),e(ve,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(h)=>{h.preventDefault(),z()},children:[e(we,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(U,{id:"marketplace-source",value:g,disabled:o,onChange:(h)=>c(h.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(N,{type:"button",variant:"ghost",disabled:o,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(N,{type:"submit",disabled:o||g.trim()==="",children:[o&&e(M,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Oe({onOpen:t,query:r}){let u=L(),p=i((c)=>c.marketplaceLoadErrors),a=i((c)=>c.loading)||!u,g=pe(r.trim().toLowerCase());return e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} flex flex-col gap-8`,children:[p.map((c)=>s("p",{className:"text-destructive px-2 text-xs",children:[c.marketplacePath,": ",c.message]},c.marketplacePath)),a?e(Se,{}):e(Ee,{query:g,onOpen:t})]})})}function Ls({cwd:t,active:r,extensions:u,onOpenCatalog:p}){let{t:a}=d(),g=Ze(),c=We(g),o=i((l)=>l.refresh),n=i((l)=>l.loading),v=i((l)=>l.error),[x,y]=C("plugins"),[b,z]=C({plugins:"",skills:""}),h=x==="skills"?b.skills:b.plugins,I=(l)=>z((D)=>({...D,[x]:l})),Y=ut((l)=>JSON.stringify([...new Set(l.sessionList.map((D)=>pt(D.cwd,l.projectContext)).filter((D)=>D!==null))].toSorted())),O=JSON.stringify([...new Set([pt(t,g.state.projectContext),...JSON.parse(Y)].filter((l)=>l!==null))].toSorted()),T=i((l)=>l.installed),H=a(x==="skills"?"plugins.skills.search":"plugins.search"),[P,j]=C(null),w=L();V(()=>{if(!r||!w)return;if(c.getState().loadedScope!==O)o(JSON.parse(O))},[r,w,o,O,c]),V(()=>{if(!w)return;return g.onSkillsChanged(()=>void o(void 0,{background:!0,catalog:!1}))},[w,o,g]);let A=(l)=>{p?.(),y("plugins"),j(l)},J=(l)=>{p?.(),y(l),j(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(Yt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(f,{className:`${m} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((l)=>s(f,{className:`${m} h-8 gap-2 px-2`,active:!u?.active&&x===l&&P===null,onClick:()=>J(l),children:[l==="plugins"?e(le,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${l}`)})]},l))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(k,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(R,{children:!w||n&&T.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(M,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):T.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):T.map((l)=>s(f,{title:E(l.plugin),className:`${m} gap-2 px-2`,active:!u?.active&&P?.plugin.id===l.plugin.id,onClick:()=>A(l),children:[e(B,{name:l.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:E(l.plugin)})]},l.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(X,{children:[P&&e(Jt,{entry:P,onBack:()=>J("plugins")},JSON.stringify([P.marketplace.name,P.marketplace.path,P.plugin.id,t])),s("div",{hidden:P!==null,className:P?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(Ie,{children:e(Xt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(re,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(U,{className:"h-9 rounded-full ps-9 pe-9","aria-label":H,value:h,onChange:(l)=>I(l.target.value),placeholder:H}),h&&e(N,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>I(""),children:e(me,{})})]}),e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!w||n,onClick:()=>void o(void 0,{forceRefetch:!0}),children:n?e(M,{}):e(oe,{})}),x==="plugins"&&e(ze,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(N,{size:"sm",className:"h-9",variant:"outline",disabled:n||!w,onClick:()=>void o(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Oe,{query:b.plugins,onOpen:A})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(en,{query:b.skills,ready:w,onOpenPlugin:A})})]})]})]})})]})}
|
|
3
|
-
export{Ls};
|
package/dist/chunk-ayt0bzr9.js
DELETED
package/dist/chunk-b42vv8f2.js
DELETED
package/dist/chunk-b61qhh61.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f9z37ptq.js";import{e,b}from"./chunk-bshgrwe9.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as P}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as j}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as C,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as s,Fragment as H}from"react/jsx-runtime";function k(n){return n.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||n}function _s({cwd:n,onChange:u,preparing:M=!1,recentProjects:g}){let{host:i,client:p}=e(),{t:l}=i,w=o((r)=>r.projectContext),v=o((r)=>r.sessionList),y=R(()=>g??[...new Set([...v].toSorted((r,f)=>(f.updatedAt??"").localeCompare(r.updatedAt??"")).map((r)=>r.cwd))],[g,v]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let r=!0;return b(i,p.refreshProjectContext(!0).then((f)=>{if(r)N(f.chatDirectory)})),()=>{r=!1}},[i,p]);let h=[...n!==null?[n]:[],...y.filter((r)=>r!==n)].filter((r)=>r!==c&&(!w||z(w,{cwd:r}).id!==I)),a=n!==null&&n!==c,D=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":M,className:P("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(x,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:D,children:[t(m,{className:"size-4 group-hover/project:opacity-0"}),t("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:t(j,{className:"size-3"})})]}),s(_,{render:t(x,{variant:"ghost",size:"sm",className:P("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&t(m,{className:"size-4"}),t("span",{className:"truncate",children:a?k(n):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[h.length>0&&s(H,{children:[t("div",{className:"max-h-64 overflow-y-auto",children:t(B,{value:n??"",onValueChange:u,children:h.map((r)=>s(E,{value:r,title:r,closeOnClick:!0,children:[t(m,{}),t("span",{className:"truncate",children:k(r)})]},r))})}),(d!==void 0||a)&&t(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(C,{onClick:()=>{b(i,d(n).then((r)=>{if(r!==null)u(r)}))},children:[t(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(C,{onClick:D,children:[t(j,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
-
export{_s};
|
package/dist/chunk-bgav9cq2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D,Do,qr,Kn,Kr,Fo,Wr}from"./chunk-50eym2q3.js";import{t,qe,y,o}from"./chunk-f9z37ptq.js";import{Me}from"./chunk-6w8p1hwb.js";import{createStore as M}from"@alwith/api/client";import{isText as k,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var v=M({entries:{}});function p(i,e){v.setState((n)=>({entries:{...n.entries,[i]:e}}))}function x(i,e){let n=b(e),a=i.items.findLast((s)=>b(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&b(a)===n}function O(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...Fo(n._meta),...n.content.filter(k).flatMap((s)=>Fo(s._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:i,item:e,question:n,index:a}){let s=qe(),{t:l}=t(),S=Do(e.id,a),c=JSON.stringify([i,S]),u=y(v,(r)=>r.entries[c]),d=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??qr(n),q=d===void 0?u?.accepted:O(d,S)??u?.accepted,h=d!==void 0&&x(d,e),C=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!C?"unavailable":"pending",E=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!x(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Kn(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};p(c,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:Kr(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:I})}catch(Q){p(c,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(g==="closed")return null;return m(Wr,{question:n,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(c,{draft:r}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function lo({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=D(e._meta);if(n===void 0||n.subagent!==void 0||n.readOnly||!x(n,e))return m(Me,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,l)=>m(R,{sessionId:i,item:e,question:s,index:l},Do(e.id,l)))})}
|
|
2
|
-
export{lo};
|
package/dist/chunk-bh0h7fz7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,n}from"./chunk-n9jaz2pd.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function $n(e,o){let s=a(),c=n((t)=>t.connection),r=n((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=n((t)=>v(t.sessions[e]?.items)),f=n((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||r)return;let t=!1,l,i=0,m=async()=>{try{let d=await s.activityReply(e);if(i=0,!t)y(d??void 0)}catch{i++}finally{if(!t&&(o==="running"||i>0&&i<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,r,o]),r?u:p??u}
|
|
2
|
-
export{$n};
|
package/dist/chunk-bshgrwe9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$e}from"./chunk-f9z37ptq.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function kn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r($e,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function b(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{kn,e,b};
|
package/dist/chunk-bsnmj69j.js
DELETED
package/dist/chunk-capkej8s.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-sgbn37kz.js";import{a,n}from"./chunk-n9jaz2pd.js";import{R,v,f,se}from"./chunk-a8r3mggj.js";import{N,pe,Wi}from"./chunk-r3hsjwjn.js";import{ht}from"./chunk-7a70nd7e.js";import{G,oe}from"./chunk-gak8579e.js";import{Te,ue}from"./chunk-4ntxjy8v.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as V,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as De,useSortable as le,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as re}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as we,MessageSquareIcon as ve,MoreHorizontalIcon as Ne,PencilIcon as Ie,PlusIcon as ae,StarIcon as he,Trash2Icon as ce}from"lucide-react";import{useEffect as be,useMemo as xe,useState as L}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as ee,DialogFooter as te,DialogHeader as ne,DialogTitle as ie}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Me,DropdownMenuContent as Ee,DropdownMenuGroup as ke,DropdownMenuItem as H,DropdownMenuTrigger as Le}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Re}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Pe({collectionId:l,sessionId:C,children:x}){let{attributes:w,listeners:I,setNodeRef:i,transform:p,transition:u,isDragging:M}=le({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:re.Transform.toString(p),transition:u},className:F("w-full min-w-0",M&&"opacity-50"),...w,...I,role:"group",children:x})}function Be({collection:l,children:C,onEdit:x,onConfirm:w,onNewChat:I}){let{t:i}=N(),p=ue(),u=pe(),{attributes:M,listeners:d,setNodeRef:h,transform:P,transition:T,isDragging:z}=le({id:l.id,disabled:{draggable:l.id===G,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:re.Transform.toString(P),transition:T},className:F("w-full min-w-0",z&&"opacity-50"),children:e(se,{open:!l.collapsed,onOpenChange:(c)=>u(p({type:"collapse",id:l.id,collapsed:!c})),label:oe(l,i),count:l.sessionIds.length,leading:l.id===G?e(he,{className:"size-3.5"}):e(ht,{emoji:l.emoji,onChange:(c)=>u(p({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...d,role:"group",children:c}),actions:s(Me,{children:[e(Le,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:oe(l,i)}),children:e(Ne,{className:"size-3.5"})})}),e(Ee,{children:s(ke,{children:[l.id!==G&&s(H,{onClick:x,children:[e(Ie,{}),i("collection.rename")]}),s(H,{onClick:I,children:[e(ae,{}),i("collection.newChat")]}),s(H,{onClick:()=>w("clear"),children:[e(we,{}),i("collection.clearCollection")]}),l.id!==G&&s(H,{variant:"destructive",onClick:()=>w("delete"),children:[e(ce,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Os({renderRow:l,onSelect:C,onNewChat:x,Scroll:w=He}){let I=N(),{t:i}=I,p=ue(),u=pe(),M=a(),{collections:d,order:h}=Te(),P=n((o)=>o.sessionList),T=n((o)=>o.archivedSessions),z=n((o)=>o.sessionListLoaded),c=n((o)=>o.sessionListError),U=xe(()=>new Map([...T,...P].map((o)=>[o.sessionId,o])),[T,P]),_=I.isMac??Wi(),[y,E]=L(null),[k,K]=L(""),[q,O]=L(""),[S,B]=L(null),[g,J]=L(!1),de=Se(V(ye,{activationConstraint:{distance:5}}),V(Ce,{coordinateGetter:De})),j=h.flatMap((o)=>d[o].collapsed?[]:d[o].sessionIds.flatMap((t)=>{let r=U.get(t);return r&&!r.archived?[r]:[]}));be(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(_?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;t.preventDefault(),C(j[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[j,_,C]);let me=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let Q=b.type==="session"?String(b.collectionId):String(t.id);u(p({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Q,sessionId:String(r.sessionId),index:b.type==="session"?d[Q].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==G)u(p({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},A=(o,t)=>{J(!0),u(o.then(t).finally(()=>J(!1)))};return s(ze,{children:[e(w,{children:s(R,{children:[s(f,{className:F(m,"font-normal"),onClick:()=>{E("new"),K(""),O("")},children:[e(v,{children:e(ae,{})}),e("span",{children:i("collection.newCollection")})]}),c&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>u(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:de,collisionDetection:ge,onDragEnd:me,children:e(W,{items:h,strategy:X,children:e(R,{children:h.map((o)=>e(Be,{collection:d[o],onNewChat:()=>x(o),onEdit:()=>{E(o),K(d[o].name),O(d[o].emoji??"")},onConfirm:(t)=>B({id:o,type:t}),children:e(W,{items:d[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:X,children:d[o].sessionIds.map((t)=>{let r=U.get(t);if(r?.archived)return null;if(!r)return z?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(v,{children:e(ve,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>u(p({type:"remove",sessionId:t,collectionId:o})),children:e(ce,{})})]},t):null;return e(Pe,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(Y,{open:y!==null,onOpenChange:(o)=>{if(!o&&!g)E(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(o)=>{if(o.preventDefault(),y===null||!k.trim()||g)return;let t=y==="new"?`collection-${crypto.randomUUID()}`:y;A(p([y==="new"?{type:"create",id:t,name:k}:{type:"rename",id:t,name:k},{type:"emoji",id:t,emoji:q}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Re,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(o)=>K(o.target.value),disabled:g}),y!=="new"&&e(ht,{emoji:q,onChange:O}),s(te,{children:[e(D,{type:"button",variant:"outline",disabled:g,onClick:()=>E(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:g||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:S!==null,onOpenChange:(o)=>{if(!o&&!g)B(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:S===null?"":oe(d[S.id],i)})})]}),s(te,{children:[e(D,{variant:"outline",disabled:g,onClick:()=>B(null),children:i("collection.cancel")}),e(D,{disabled:g,onClick:()=>{if(S!==null)A(p({type:S.type,id:S.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{Os};
|
package/dist/chunk-cer4dxas.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{xs}from"./chunk-qxssxzws.js";import{Zo,$e,t,qe,o,le}from"./chunk-f9z37ptq.js";import{Ni,ft,ao,Ri,Li}from"./chunk-stc4ctrx.js";import{gt}from"./chunk-rb4p3h5b.js";import{vi}from"./chunk-gpcsb4tg.js";import{Oi}from"./chunk-js3nhatr.js";import{Ii,Ti}from"./chunk-79ayc6qy.js";import{ki,Si}from"./chunk-76c0cx40.js";import{hi}from"./chunk-5xe89qwh.js";import{Pi}from"./chunk-gec6q1jb.js";import{mi}from"./chunk-vkj5fznh.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as Oe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as Te,useMemo as K,useRef as b,useState as U}from"react";import{flushSync as ye}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var xe=24;function De(e){let f=Math.max(0,e.turnTopPx-xe),v=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),c=f-v;return{scrollTopPx:f,spacerPx:c>0?e.spacerPx+c:e.spacerPx}}function Ke({viewportRef:e,viewportProps:f,children:v}){return i("div",{ref:e,...f,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function Ue({sessionId:e,turnId:f,root:v,error:c,connected:S}){let z=b(null),V=qe(),{t:w}=t(),k=M(()=>{V.loadHistoryTurn(e,f).catch(()=>{})},[V,e,f]);return H(()=>{if(!v||!z.current||!S||c)return;let R=new IntersectionObserver((_)=>{if(_.some((g)=>g.isIntersecting))R.disconnect(),k()},{root:v,rootMargin:"800px 0px"});return R.observe(z.current),()=>R.disconnect()},[v,S,c,k]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":f,"data-markdown-pending":!0,children:c?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:c}),i(Y,{variant:"outline",size:"sm",onClick:k,disabled:!S,children:w("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":w("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function _e(e,f){let v=b([]),c=b(null);if(c.current?.items!==e.items||c.current.state!==e.state||c.current.ended!==e.turnEndedAt||c.current.usage!==e.turnUsage||c.current.historyOrder!==f)c.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:f,turns:Ni(e,v.current,f)};let S=c.current.turns;return v.current=S,S}function mt(e){return i($e,{host:e.host,client:e.client,children:i(Zo,{value:e.session.cwd,children:i(We,{...e})})})}function We({session:e,leading:f,afterTurn:v,turnWork:c,answerActions:S,turnFooter:z,renderUserMessage:V,insert:w,navigation:k,anchorNewTurn:R=!1,Viewport:_=Ke}){let g=qe(),L=t(),T=o((n)=>n.historyNavigation[e.id]),he=K(()=>e.commands.map((n)=>n.name),[e.commands]),m=_e(e,T?.turns),A=m.at(-1)?.key,be=Ri(e,m),y=e.state==="running"||e.state==="requires_action",W=K(()=>Oi(m,T),[m,T]),Z=K(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),we=K(()=>k===void 0?[]:Ii(m,e.turnUsage,T),[k,m,e.turnUsage,T]),ee=w&&w.afterItemId!==null?m.findIndex((n)=>n.items.some((u)=>u.id===w.afterItemId)):-1,j=b(m);j.current=m;let[l,Re]=U(null),x=o((n)=>n.historyPages[e.id]),P=o((n)=>n.connection==="ready"),Se=o((n)=>ze(n.agent).sessionRetry),te=x!==void 0;H(()=>{if(P&&te&&!e.restoring)g.loadHistoryNavigation(e.id).catch(()=>{})},[g,P,te,e.id,e.restoring]);let[ke,Pe]=U(!1),q=b(null),[Ie,ne]=U(!1),re=b(0),X=b({key:A,running:y});X.current={key:A,running:y};let[ie,F]=U(0),I=b(0),N=b(null);I.current=ie;let Ne=M(()=>{if(N.current!==null)N.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:G,stopFollowing:B,schedulePin:oe,contentResized:ae,beginLocate:ue,cancelLocation:se}=Pi(l,y,Ne),ce=M(()=>{if(l===null||!y)return;let n=m.at(-1)?.key;if(n===void 0)return;let u=ue(!0),d=()=>u.isCurrent()&&X.current.running&&X.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!d())return;let a=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(a===null)return;let s=l.scrollTop+a.getBoundingClientRect().top-l.getBoundingClientRect().top,p=De({turnTopPx:s,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=p.spacerPx>0?{element:a,heightPx:a.getBoundingClientRect().height+p.spacerPx,keepTop:!0}:null,ye(()=>F(p.spacerPx)),requestAnimationFrame(()=>{if(d())u.finish(p.scrollTopPx)})})),h=q.current;if(h===null)return;h.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(d())r()})},[ue,y,l,m]);Te(()=>{if(!R||y)return;se(),N.current=null,I.current=0,F(0)},[R,se,y]);let J=M(()=>{B(),g.loadOlderHistory(e.id).catch(()=>{})},[g,e.id,B]);H(()=>{if(l===null)return;let n=()=>{let u=l.scrollTop<600;if(Pe(u),u&&!T?.complete&&P&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)J()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[P,x,C,J,l,e.restoring,T?.complete]),H(()=>{ki({sessionId:e.id,turns:Z,api:q.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>Si(e.id),[e.id]);let He=M(async(n,u)=>{let d=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await g.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((s)=>requestAnimationFrame(()=>s()));if(!u())return null;let r=j.current.find((s)=>s.user?.id===(n.messageId??n.id))??j.current.find((s)=>s.user!==null&&n.nativeTurnId!==void 0&&s.items.some((p)=>ge(p)===n.nativeTurnId));if(!r?.user)return null;let h=r.user.id,a=q.current;if(a===null)throw Error("Virtual timeline is not mounted");return await a.scrollToKey(r.key,(s)=>s.querySelector(`[data-content-search-unit-key="${CSS.escape(h)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(h)}"]`)}finally{if(re.current===d)ne(!1)}},[g,e.id]),Ee=M(async(n)=>{if(n.nativeTurnId!==void 0)await g.previewHistoryTurn(e.id,n.nativeTurnId)},[g,e.id]);H(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let a=N.current,s=null;if(a!==null){let p=Math.max(0,a.heightPx-a.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||a.keepTop)){if(I.current=p,ye(()=>F(p)),p===0)N.current=null}if(p>0&&a.keepTop)s=l.scrollTop+a.element.getBoundingClientRect().top-l.getBoundingClientRect().top-xe}ae(s)});u.observe(n),u.observe(l);let d=null,r=()=>{let a=A===void 0?null:n.querySelector(`[data-codex-turn="${CSS.escape(A)}"]`);if(a===d)return;if(d!==null)u.unobserve(d);if(d=a,d!==null)u.observe(d)};r();let h=new MutationObserver(r);return h.observe(n,{childList:!0,subtree:!0}),()=>{h.disconnect(),u.disconnect()}},[ae,A,l]),H(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let de=b(null);Te(()=>{if(l===null)return;let n=m.at(-1),u=de.current;if(de.current=n===void 0?null:{key:n.key,running:y},n===void 0||u===null||n.user===null||n.replayed)return;if(R){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==u.key||!u.running))N.current=null,I.current=0,F(0),ce()}else if(n.key!==u.key)G()},[ce,R,y,G,l,e.turnEndedAt,m]);let Le=(n,u)=>{let d=n,r=d.turn;if(r===void 0){if(d.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return i(Ue,{sessionId:e.id,turnId:d.nativeTurnId,root:l,error:T?.turnErrors[d.nativeTurnId],connected:P&&!C&&!Ie})}let h=m.indexOf(r),a=r.key===be,s=Li(e,m,h),p=!a&&s.continued,D=r.key===A,O=r.errors.at(-1),me=O===void 0?null:Ve(O),Q=O===void 0?null:ge(O),Ae=!e.subagent&&D&&!a&&P&&Se&&e.attached&&!e.readOnly&&!e.restoring&&O===e.items.at(-1)&&me!==null&&Oe(me).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",fe=z?.(r)??null,pe=c?.(r)??null,Ce=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||a||fe!==null||ft(r)||ao(r)||D&&(e.error!==null||e.lastStopReason==="cancelled"),ve=r.user===null?null:gt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(mi,{item:r.user,messageTime:ve,skillNames:he}):V(r.user,ve)),Ce&&i(vi,{sessionId:e.id,turn:r,terminals:e.terminals,active:a,blocked:e.state==="requires_action",continued:p,edits:s.edits,activityItems:s.items,workStartedAt:s.startedAt,isLast:D,error:e.error,retrying:a?Be(e._meta)??void 0:void 0,retry:Ae?{turnId:Q,delaySeconds:hi(m),run:(Me)=>g.retrySession(e.id,Q,Me)}:void 0,interrupted:ao(r)||!a&&D&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:S?.(r),footer:fe}),u===ee&&w?.node,v?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(_,{viewportRef:Re,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":L.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[w&&ee===-1&&w.node,i(xs,{ref:q,entries:W,renderTurn:Le,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:f===void 0?void 0:i("div",{className:"pt-3",children:f})}),R&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!P,title:T.error,onClick:()=>{g.loadHistoryNavigation(e.id).catch(()=>{})},children:L.t("timeline.navigationRetry")})}),ke&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!P||e.restoring||x.loading,onClick:J,children:x.loading?L.t("timeline.loadingEarlier"):L.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),k!==void 0&&i(Ti,{items:we,audio:k.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ee,onRevealError:(n)=>le(L,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:G,"aria-label":L.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Fe,{})})]})}
|
|
2
|
-
export{mt};
|
package/dist/chunk-cq7bbgcg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function*Yn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function oi(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Yn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
-
export{Yn,oi};
|
package/dist/chunk-d29xbf16.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-wf7kfk3p.js";import{Ce}from"./chunk-m8tt5bf9.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function yi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(O,{text:t.content,streaming:!1})});if(!n(t))return null;return e(Ce,{entries:t.entries})}
|
|
2
|
-
export{yi};
|
package/dist/chunk-dp1nnwk2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,n}from"./chunk-n9jaz2pd.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function aa(i){let t=a(),e=n((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=n((s)=>s.sessionList),d=n((s)=>s.connection),r=n((s)=>s.sessionListLoaded),o=n((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&o===null)t.listSessions().catch(()=>{return})},[t,d,r,o]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(o!==null)return{status:"failed",error:o};return{status:"loading"}},[t,u,r,o,c,e]),retry:f}}
|
|
2
|
-
export{aa};
|
package/dist/chunk-dpfjxym1.js
DELETED
package/dist/chunk-eqbp85f3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M}from"./chunk-pxv38ttf.js";import{o}from"./chunk-f9z37ptq.js";import{mt}from"./chunk-cer4dxas.js";import{x,Y}from"./chunk-p8cm3xw1.js";import{e}from"./chunk-bshgrwe9.js";import{Jn}from"./chunk-bane0xc8.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=Jn(s.id,u,d,r,s);if(a.length===0)return c;let h=`${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(h),content:p(as,{children:[t(Xo,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(h)?i:new Set([...i,h]))}),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??Jn(s,l,u,c,d),h=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"}),h?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,h=o((b)=>b.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&&x(a.configOptions,"model"),z=s.title??c("subagents.untitled"),W=n?O(n,a):a,U=h&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=a?.cwd??l,T=ss(async(b)=>{if(!m.readSubagentHistory||H===null||B.current)return;_.current=!0,B.current=!0,P(!0),v(null);try{let y=await m.readSubagentHistory(H,D,b);E((K)=>K===null?y.session:O(y.session,K)),Q(y.cursor)}catch(y){v(y instanceof Error?y.message:String(y))}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(b){v(b instanceof Error?b.message:String(b))}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};
|
package/dist/chunk-f9z37ptq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ys}from"./chunk-wf7kfk3p.js";import{createContext as s,useContext as i,useSyncExternalStore as m}from"react";import{jsx as l}from"react/jsx-runtime";var u=s(null),c=s(null),Zo=s(null);function ae(){return i(Zo)}function $e({host:e,client:n,children:r}){return l(ys,{host:e,children:l(u,{value:e,children:l(c,{value:n,children:r})})})}function t(){let e=i(u);if(e===null)throw Error("Timeline host is missing");return e}function qe(){let e=i(c);if(e===null)throw Error("Timeline client is missing");return e}function y(e,n){return m((r)=>e.subscribe(r),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=qe();return y(n.store,e)}function Qo(){return i(u)!==null}function le(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
-
export{Zo,ae,$e,t,qe,y,o,Qo,le};
|
package/dist/chunk-fn68kh69.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,n,h}from"./chunk-n9jaz2pd.js";import{V}from"./chunk-z8sheg2r.js";import{R,se,Ge}from"./chunk-a8r3mggj.js";import{je,te,ye}from"./chunk-rqa21qrv.js";import{Hr}from"./chunk-2q1xxs3t.js";import{Ve}from"./chunk-heqa4swe.js";import{Ue}from"./chunk-7s3f142h.js";import{Oe}from"./chunk-mgmv8kap.js";import{$n}from"./chunk-bh0h7fz7.js";import{Fr}from"./chunk-nhstvqjy.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function ba({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let N=s(),{t:L}=N,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=te((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&je({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=te((t)=>t.activityCollapsedGroups),o=ye(),x=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),I=(t)=>{if(b?.(t))return;d(t)},D=Fr();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Hr(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=x[r-1];if(!y)return;e.preventDefault(),I(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&D?c(G,{children:Oe(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(R,{children:g.map((t)=>t.key==="foreground"?c(R,{children:t.rows.map(A)},t.key):c(se,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:N,actions:L,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=$n(i.sessionId,d);return P(H,{children:[c(Ge,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Ue,{sessionRow:i,actions:L}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:N,hint:S,actions:c(Ve,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((o)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(V,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
-
export{ba};
|
package/dist/chunk-gkyvgjyx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f9z37ptq.js";import{mt}from"./chunk-cer4dxas.js";import{e,b}from"./chunk-bshgrwe9.js";import{Qn}from"./chunk-eqbp85f3.js";import{Loader2Icon as v}from"lucide-react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function Gt({session:t,timeline:s}){let{host:m,client:a}=e(),{t:n}=m,u=o((h)=>h.historyPages[t.id]?.cursor!=null),y=Qn(t,s?.turnWork),E=()=>b(m,a.open(t.id,t.cwd)),p=r(mt,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[r(v,{className:"size-4 animate-spin","aria-hidden":"true"}),n("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[r(f,{children:n("conversation.reopen")}),r(l,{children:n("conversation.detached")})]}),r(x,{onClick:E,children:n("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return r(c,{className:"flex-1",children:i(d,{children:[r(f,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
-
export{Gt};
|
package/dist/chunk-gpcsb4tg.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-f9z37ptq.js";import{Vo,jo}from"./chunk-ww3f6z4x.js";import{D}from"./chunk-50eym2q3.js";import{Pt}from"./chunk-b42vv8f2.js";import{ro}from"./chunk-vx6shb4g.js";import{Mi,de,ft,Ai}from"./chunk-stc4ctrx.js";import{to}from"./chunk-84eye2j0.js";import{Me}from"./chunk-6w8p1hwb.js";import{no}from"./chunk-7v7wc7k5.js";import{lo}from"./chunk-bgav9cq2.js";import{wi}from"./chunk-wyxa2tfm.js";import{xi}from"./chunk-t686zwxk.js";import{yi}from"./chunk-d29xbf16.js";import{Ci}from"./chunk-wwj743gm.js";import{oo,io}from"./chunk-mfn37eme.js";import{gt}from"./chunk-rb4p3h5b.js";import{codexMessageError as q,codexTurnError as z,isContentEntry as me,isEmbeddedResource as Z,isImage as ee,isResourceLink as le,isText as ce,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{SparklesIcon as ue}from"lucide-react";import{Fragment as X,memo as pe,useEffect as fe,useState as ye}from"react";import{jsx as i,jsxs as m,Fragment as A}from"react/jsx-runtime";function Y(s){if(ee(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(Z(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function he({item:s}){let{t:n}=t(),l=s.status==="in_progress",[o,g]=ye(()=>Date.now()-s.at>=1e4);return fe(()=>{if(!l)return;let a=Math.max(0,s.at+1e4-Date.now());if(g(a===0),a===0)return;let h=setTimeout(()=>g(!0),a);return()=>clearTimeout(h)},[s.id,s.at,l]),m("div",{className:"codex-context-compaction",children:[i(ue,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?n("stream.codex.contextCompacted"):s.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:s,entry:n,terminals:l,streaming:o,streamingThoughtId:g}){let{t:a}=t();switch(n.kind){case"activity":return i(to,{sessionId:s,items:n.items,terminals:l,streamingThoughtId:g});case"text":return D(n.item._meta).length>0?i(lo,{sessionId:s,item:n.item}):i(Me,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return i(yi,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(oo,{children:[i("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&i("div",{children:n.item.error})]});return i(he,{item:n.item})}}function ke({sessionId:s,turn:n,terminals:l,active:o,blocked:g=!1,continued:a=!1,edits:h=n.edits,activityItems:M=n.items,workStartedAt:te=n.startedAt,isLast:F,error:k,interrupted:L,retry:P,retrying:p,extraWork:d=null,answerActions:G,footer:ne}){let{t:c}=t(),b=n.errors.map((e)=>{let r=q(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let E=P?.turnId===ge(e)?P:void 0;return i(io,{error:r,retry:E},`${e.id}:${E?.delaySeconds??"manual"}`)});if(F&&k!==null&&!n.errors.some((e)=>{let r=q(e);return r!==null&&r.stopReason===k.stopReason&&z(r).message===z(k).message}))b.push(i(io,{error:k},"current-run-error"));let x=b.length>0?i("div",{className:"codex-turn-errors",children:b}):null,C=n.items.filter(ro);if(d===null&&C.length>0&&C.length===n.items.length)return m(A,{children:[i(to,{sessionId:s,items:C,terminals:l,streamingThoughtId:null}),x]});let T=n.work,w=T.length>0&&T.every((e)=>e.kind==="compaction");if(d===null&&(Mi(n)||w&&n.final.length===0))return m(A,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),x]});let O=ft(n),W=n.final.filter((e)=>D(e._meta).length===0).map((e)=>de({...e,content:no(e.content,n.items)})).join(`
|
|
2
|
-
`),I=o?null:gt(n,"assistant"),B=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="alwith_client_generate_image"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),H=new Set(n.final.flatMap((e)=>e.content.map(Y).filter((r)=>r!==null))),f=n.items.flatMap((e)=>{if(!Pt(e))return[];return e.content.filter(me).flatMap((r,E)=>{let u=r.content,oe=ee(u),ae=le(u)||Z(u)&&"blob"in u.resource;if(!oe&&!ae)return[];let S=Y(u);if(S!==null){if(H.has(S))return[];H.add(S)}return[{key:`${e.id}:${E}`,block:u}]})}),K=n.final.some((e)=>D(e._meta).length===0&&e.content.some((r)=>!ce(r)||r.text.trim().length>0)),ie=B.length>0||f.length>0||w||K||n.final.some((e)=>D(e._meta).length>0),v=n.items.findIndex((e)=>n.final.includes(e)),R=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=T.filter((e)=>v===-1||R(e)<v),se=T.filter((e)=>v!==-1&&R(e)>v),re=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...se.map((e)=>({kind:"work",entry:e,index:R(e)}))].toSorted((e,r)=>e.index-r.index),V=!o&&!a&&(W.trim().length>0?i(Vo,{text:W,isMostRecentTurn:F,time:I,afterCopy:G}):m("div",{className:"flex items-center gap-0.5",children:[G,I&&i("span",{className:"codex-user-time ms-1",title:I.full,children:I.short})]})),y=Ci({...n,items:M},{running:o,blocked:g,retrying:p!==void 0}),j=y.kind==="reasoning"?y.ownerKey??null:null,J=y.kind==="thinking",_=Ai({...n,items:M}),U=o&&!K||d?.active===!0;return m(A,{children:[i(jo,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:U,defaultExpanded:U||d?.defaultExpanded===!0||!n.replayed&&(L||O),..._,durationMs:d?.active?void 0:_.durationMs,startedAt:_.startedAt??te,loading:(J||y.kind==="working")&&n.work.length===0&&d===null,loadingLabel:y.kind==="working"?c("stream.codex.working"):void 0,work:[...a||w?[]:Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:j},e.key)),...d===null?[]:[i(X,{children:d.content},"additional-work")]],answer:ie||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||w)&&Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),re.map((e)=>{if(e.kind==="work")return i(N,{sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:j},e.entry.key);let r=e.item;return m(X,{children:[D(r._meta).length>0?i(lo,{sessionId:s,item:r}):i(Me,{content:no(r.content,n.items),messageId:r.id,streaming:o}),r===n.final.at(-1)&&f.length===0&&V]},r.id)}),B.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&i(xi,{startedAt:e.at}),!o&&c("timeline.imageStopped")]})]},e.id)),f.length>0&&i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:f.map((e)=>i(Me,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),(n.final.length===0||f.length>0)&&V]}):null,footer:m(A,{children:[J&&n.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:c("message.thinking")})}),ne,h.length>0&&!o&&!a&&i(wi,{items:h}),L&&!O&&i("div",{className:"codex-interrupted-turn",role:"status",children:c("timeline.interrupted")}),!o&&x]})}),o&&p!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&x]})}var vi=pe(ke);
|
|
3
|
-
export{vi};
|
package/dist/chunk-j2cdjycf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ge}from"./chunk-r7paw6ba.js";import{C}from"./chunk-zpqj0ka8.js";import{y}from"./chunk-f9z37ptq.js";import{cn}from"./chunk-jjgwfpmp.js";import{Ne}from"./chunk-5ryfm4ka.js";import{bn}from"./chunk-7xvrsw7x.js";import{Le}from"./chunk-s3j71dbh.js";import{Re}from"./chunk-whzs7yxf.js";import{xn}from"./chunk-bfb8bpwc.js";import{vn,yn}from"./chunk-1rwkdezk.js";import{jsx as t,jsxs as d,Fragment as u}from"react/jsx-runtime";var n;function P(){return n??=bn(),n}function f(){let o=cn();return t(yn,{sessionId:o.session.id,enabled:o.inputReady&&!o.sending&&!o.shellMode,onMention:o.addMention,onBusyChange:o.setAdding})}function zs({client:o,providers:m,catalog:i,shellCommands:p=!0,modelMenu:l,children:a,...s}){let{session:e}=s,c=y(o.store,(r)=>r.modelRecovery[e.id]??!1);return d(u,{children:[c&&!ge(e.error?.error)&&t(xn,{client:o,session:e,providers:m??P(),catalog:i},e.id),d(Ne,{modelMenu:l??{defaultGroup:C,catalog:(r)=>Le(r,i),headerAction:t(Re,{})},...s,attachmentPolicy:vn,onShellCommand:p?(r)=>o.executeShell(e.id,r):void 0,children:[t(f,{}),a]})]})}
|
|
2
|
-
export{zs};
|
package/dist/chunk-jjgwfpmp.js
DELETED
package/dist/chunk-mcrd86tx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{nn}from"./chunk-s05ftq29.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function We(e){let t=r.get(e);if(!t)t=nn(e),r.set(e,t);return t}function Ds({host:e,client:t,children:n}){let s=We(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Ze(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function ut(e){let t=Ze();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=We(Ze());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Qe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{We,Ds,d,Ze,ut,i,Qe};
|
package/dist/chunk-n9jaz2pd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{L}from"./chunk-q4nx04sy.js";import{createContext as c,useContext as p,useState as f,useSyncExternalStore as x}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as y,DialogContent as D,DialogDescription as w,DialogFooter as P,DialogHeader as H,DialogTitle as R}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as o,jsxs as d}from"react/jsx-runtime";var S=c(null),g=c(null),C=c(null);function ka({host:e,client:t,children:i}){let[r,l]=f(null);L(r!==null);let{t:u}=e;return o(S,{value:e,children:o(g,{value:t,children:d(C,{value:l,children:[i,o(y,{open:r!==null,onOpenChange:(v)=>!v&&l(null),children:d(D,{children:[d(H,{children:[o(R,{children:u("sessionList.deleteTitle")}),o(w,{children:u("sessionList.deleteDescription")})]}),d(P,{children:[o(m,{variant:"outline",onClick:()=>l(null),children:u("sessionList.cancel")}),o(m,{onClick:()=>{if(r)h(e,t.delete(r.sessionId));l(null)},children:u("sessionList.delete")})]})]})})]})})})}function s(){let e=p(S);if(e===null)throw Error("Session list host is missing");return e}function Gr(){return p(S)}function a(){let e=p(g);if(e===null)throw Error("Session list client is missing");return e}function qn(){let e=p(C);if(e===null)throw Error("Session list provider is missing");return e}function n(e){let t=a();return x((i)=>t.store.subscribe(i),()=>e(t.store.getState()),()=>e(t.store.getState()))}function h(e,t){return t.then(()=>{},(i)=>{if(e.reportError)e.reportError(i);else console.error(i)})}
|
|
2
|
-
export{ka,s,Gr,a,qn,n,h};
|
package/dist/chunk-nbaxn7jx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Gn,Po}from"./chunk-pr36m3qx.js";import{vr}from"./chunk-qv23mh24.js";import{CodexClient as p}from"@nyssance/codex-acp-v2/client";class wo extends p{applicationRegistry=new Po((t)=>this.holds(t)?this.session(t):void 0);toolSelection;constructor(t,e,n={}){let{applicationTools:i=[],...o}=e;super(t,o,n);this.toolSelection=i}applicationToolsFor(t){return typeof this.toolSelection==="function"?this.toolSelection(t):this.toolSelection}async requestContext(t,e,n){let i=(await this.applicationToolsFor({cwd:t,operation:e,options:n})).map((s)=>({...s,inputSchema:structuredClone(s.inputSchema)})),o=await super.requestContext(t,e,n),a=Gn(i),r=o._meta?.alwith;if(i.length&&r?.tools!==void 0)throw Error("Application tools must be registered through the client");return{...o,...i.length?{_meta:{...o._meta,alwith:{...r,tools:a}}}:{},bind:async(s)=>{await o.bind?.(s),this.applicationRegistry.bind(s,i,a.revision)}}}acceptsPendingRequest(t){return t.method!=="_alwith/tool/call"&&super.acceptsPendingRequest(t)}handleNotification(t,e){if(t==="$/cancel_request"&&this.applicationRegistry.withdraw(e?.requestId))return!0;return super.handleNotification(t,e)}handleAgentRequest(t,e){return this.applicationRegistry.handle(t,e)||super.handleAgentRequest(t,e)}onDisconnected(){this.applicationRegistry.clear(),super.onDisconnected()}onSessionDropped(t){this.applicationRegistry.drop(t),super.onSessionDropped(t)}async cancel(t){this.applicationRegistry.cancel(t),await super.cancel(t)}async close(t){this.applicationRegistry.drop(t),await super.close(t)}async stopSession(t){this.applicationRegistry.drop(t),await super.stopSession(t)}async installedApps(t){let e=this.live(),n=await super.installedApps(t),i=await vr((o,a)=>e.request(o,a),n.apps.map((o)=>o.id),t?.threadId);if(e!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:n.apps.map((o)=>({...o,...i.get(o.id)}))}}}
|
|
2
|
-
export{wo};
|
package/dist/chunk-nvgnan7w.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function lr(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function fo(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function tt(t){return t.type==="array"}function En(t){return(tt(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{lr,fo,tt,En};
|
package/dist/chunk-p1tcxky2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C}from"./chunk-zpqj0ka8.js";import{wt}from"./chunk-tyka859b.js";import{e}from"./chunk-bshgrwe9.js";import{me,S}from"./chunk-h8r785ne.js";import{Sn,Le}from"./chunk-s3j71dbh.js";import{Re}from"./chunk-whzs7yxf.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function wn({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:C.id,name:C.name,models:t===void 0?[{api_id:"",label:C.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:me(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:S(o.id,i.id),label:i.label??i.id}))}))],p=Le(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(wt,{value:{...m,label:Sn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Re,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
|
|
2
|
-
export{wn};
|
package/dist/chunk-p811gdar.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f9z37ptq.js";import{kn,e,b}from"./chunk-bshgrwe9.js";import{Ne}from"./chunk-5ryfm4ka.js";import{Gt}from"./chunk-gkyvgjyx.js";import{$t}from"./chunk-73541c5k.js";import{zt,Vt}from"./chunk-q7ka46hb.js";import{jt}from"./chunk-v3dq3hx2.js";import{LockIcon as k,UnplugIcon as O}from"lucide-react";import{useMemo as S,useRef as M}from"react";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as P,EmptyDescription as z,EmptyHeader as B,EmptyTitle as I}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function Ss({host:t,client:c,...s}){let m=S(()=>t.openDiff?t:{...t,openDiff:zt},[t]);return i(kn,{host:m,client:c,children:[r(L,{...s}),!t.openDiff&&r(Vt,{})]})}function L({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,recovery:g,welcome:E,children:R,rootRef:l,search:T=!0}){let{host:d,client:A}=e(),p=M(null),H=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),y=()=>b(d,A.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:H,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[T&&!u&&r($t,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(x,{children:[r(O,{}),r(N,{children:n("conversation.stopped")}),r(C,{children:r(h,{size:"sm",variant:"outline",onClick:y,children:n("conversation.reconnect")})})]})}),u?E??r(P,{className:"flex-1",children:i(B,{children:[r(I,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(z,{children:n("conversation.welcomeDescription")})]})}):r(Gt,{session:t,timeline:m}),r(jt,{sessionId:t.id}),g??(t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(x,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(k,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(N,{children:n("conversation.readOnlyTitle")}),r(C,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??r(Ne,{session:t}))]}),R]})}
|
|
2
|
-
export{Ss};
|
package/dist/chunk-p8cm3xw1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function X(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function x(e,t){return e.find((n)=>n.category===t&&o(n))}function Y(e){return X(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
-
export{X,x,Y};
|
package/dist/chunk-pr36m3qx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{isToolCallSubject as u}from"@nyssance/codex-acp-v2/client";function Bn(o){let{parse:e,execute:r,...t}=o;return{...t,execute:(i,n)=>r(e(i),n)}}function Gn(o){let e=new Set;if(o.length>128)throw Error("Too many application tools");let r=o.map((t)=>{if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||e.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.revision.trim()||!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);return e.add(t.name),{name:t.name,description:t.description,inputSchema:structuredClone(t.inputSchema)}});return{version:1,revision:JSON.stringify(o.map((t)=>[t.name,t.revision])),definitions:r}}function m(o){if(!o||typeof o!=="object"||Array.isArray(o))throw Error("Invalid application tool call");let e=o;if(!["sessionId","turnId","toolCallId","name","toolSetRevision"].every((r)=>typeof e[r]==="string"&&e[r].length>0)||!("arguments"in e))throw Error("Invalid application tool call");return e}var g=(o)=>({success:!1,contentItems:[{type:"text",text:o instanceof Error?o.message:String(o)}]});class Po{sessions=new Map;calls=new Map;session;constructor(o){this.session=o}bind(o,e,r){this.drop(o),this.sessions.set(o,{revision:r,tools:new Map(e.map((t)=>[t.name,{...t}])),active:new Set})}cancel(o){for(let e of this.sessions.get(o)?.active??[])e.abort()}drop(o){this.cancel(o),this.sessions.delete(o)}clear(){for(let o of this.sessions.keys())this.drop(o)}attached(o){let e=this.session(o);return e?.attached&&!e.readOnly}withdraw(o){let e=this.calls.get(JSON.stringify(o));if(!e)return!1;return e.abort(),!0}handle(o,e){if(e.method==="session/request_permission"){let t=e.params,i=t._meta?.alwith?.tool,n=this.sessions.get(t.sessionId),a=this.session(t.sessionId);if(!t.subject||!u(t.subject))return!1;let s=t.subject.toolCall.toolCallId,l=a?.items.find((c)=>c.id===s),p=a&&!a.restoring&&(a.state==="running"||a.state==="requires_action")&&l?.kind==="tool"&&!l.replayed&&l.endedAt===null&&(l.status==="pending"||l.status==="in_progress")?l.name:null,d=i!==void 0?typeof i?.name==="string"&&i.toolSetRevision===n?.revision?n?.tools.get(i.name):void 0:p?.startsWith("alwith_client_")?n?.tools.get(p.slice(14)):void 0;if(!n||!d||!this.attached(t.sessionId)||!t.subject||!u(t.subject)||!t.options.some((c)=>c.optionId==="allow_once"&&c.kind==="allow_once")||!d.autoApprove?.(t.sessionId))return!1;return o.respond(e.id,{outcome:{outcome:"selected",optionId:"allow_once"}}).catch(()=>{return}),!0}if(e.method!=="_alwith/tool/call")return!1;return(async()=>{let t=m(e.params),i=t.sessionId,n=this.sessions.get(i);if(!n||!this.attached(i))throw Error("Application tool session is not attached");if(t.toolSetRevision!==n.revision)throw Error("Invalid application tool revision");let a=n.tools.get(t.name);if(!a)throw Error(`Application tool is not registered: ${t.name}`);let s=new AbortController,l=JSON.stringify(e.id);if(this.calls.has(l))throw Error("Duplicate application tool request");this.calls.set(l,s),n.active.add(s);let p=Promise.withResolvers(),d=()=>p.reject(Error("Application tool call was cancelled"));s.signal.addEventListener("abort",d,{once:!0});try{let c=await Promise.race([Promise.resolve().then(()=>(s.signal.throwIfAborted(),a.execute(t.arguments,{sessionId:i,toolCallId:t.toolCallId,turnId:t.turnId,signal:s.signal,agent:o}))),p.promise]);if(s.signal.throwIfAborted(),this.sessions.get(i)!==n||!this.attached(i))throw Error("Application tool session was replaced");return c}finally{if(s.signal.removeEventListener("abort",d),n.active.delete(s),this.calls.get(l)===s)this.calls.delete(l)}})().catch(g).then((t)=>o.respond(e.id,t)).catch(()=>{return}),!0}}
|
|
2
|
-
export{Bn,Gn,Po};
|
package/dist/chunk-q73jne25.js
DELETED
package/dist/chunk-qm2jq2bq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{wt}from"./chunk-tyka859b.js";import{o}from"./chunk-f9z37ptq.js";import{e,b}from"./chunk-bshgrwe9.js";import{X,x,Y}from"./chunk-p8cm3xw1.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as w}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:B,onModelChange:h,onConfigChange:C,defaultGroup:G={id:"models",name:"Models"},catalog:I=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),p=F({sessionId:l,model:!0}),O=P&&(p.current.sessionId!==l||p.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=x(u,"model"),a=x(u,"thought_level"),v=u.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),_=v.filter(A),m=v.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(n,r)=>{if(r===n.currentValue)return Promise.resolve();p.current={sessionId:l,model:n===t};let d=C?C(n.configId,r):N.setConfig(l,n.configId,r);return b(c,d),d},g=a?X(a):[],z=g.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?Y(t):i("composer.model"),S=(n)=>({api_id:n.value,label:n.name}),V=I(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(S)})):[{...G,models:t?X(t).map(S):[]}]),y=V.flatMap((n)=>n.models),M=y.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return w(wt,{disabled:B||O||k,switching:O,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:y,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(h)h(n.api_id);else if(t)f(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:V,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(n)=>f(a,n)}:void 0,selectOptions:_.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:X(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:w(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);f(d,r)}})}var fn=D(H);
|
|
2
|
-
export{fn};
|
package/dist/chunk-qwet39v5.js
DELETED
package/dist/chunk-r3hsjwjn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Gr}from"./chunk-n9jaz2pd.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Ks({host:o,children:t}){return s(n,{value:o,children:t})}function N(){let o=i(n),e={...Gr(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Ki(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function pe(){let o=N();return(t)=>Ki(o,t)}function Wi(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{Ks,N,Ki,pe,Wi};
|
package/dist/chunk-rg8kj085.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-f9z37ptq.js";import{e}from"./chunk-bshgrwe9.js";import{x,Y}from"./chunk-p8cm3xw1.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let n=Math.min(100,a/t*100),p=n>=90?"text-destructive":n>=70?"text-foreground":"text-muted-foreground";return{pct:n,className:p}}function G(a){let t=x(a.configOptions,"model");return t===void 0?void 0:Y(t)}function et(a,t){let n=a.windowDurationMins;if(n===null)return t("usage.usage");if(n%1440===0)return t("usage.windowDays",{count:n/1440});return t("usage.windowHours",{count:Math.round(n/60)})}function P(a){let{client:t}=e(),n=o((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!n){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[n,t]),n?p:null}function _({session:a}){let{t}=e().host,n=x(a.configOptions,"model"),p=n!==void 0&&(L(n.options)?n.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===n.currentValue)):!n.currentValue.startsWith("gateway:")&&n.options.some((i)=>i.value===n.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,h=7,b=2*Math.PI*h,N=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||N+k+g+w,R=N+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(N)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],v=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[v!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:v,children:v})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:et(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var hn=W(_);
|
|
2
|
-
export{et,hn};
|
package/dist/chunk-s2k0g1hc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,qn,n,h}from"./chunk-n9jaz2pd.js";import{j}from"./chunk-jcyv1q0x.js";import{Ge}from"./chunk-a8r3mggj.js";import{Ve}from"./chunk-heqa4swe.js";import{At,Ue}from"./chunk-7s3f142h.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as o,jsxs as b,Fragment as C}from"react/jsx-runtime";function Eo({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=s(),{t:f,i18n:S}=t,k=a(),l=n((i)=>i.runStates[e.sessionId]),I=qn(),u=()=>m(e);return o(Ge,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:p,onClick:u,onKeyDown:(i)=>{if(i.key==="Enter"||i.key===" ")i.preventDefault(),u()},media:t.SessionMedia?o(t.SessionMedia,{sessionId:e.sessionId,state:l?.state}):void 0,state:l?.state,interruption:l?.interruption??null,title:e.title??f("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:o(B,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:d}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:At(e.updatedAt,S.language)}):void 0,actions:l!=null?o(Ve,{title:f("sessionList.stop"),onStop:()=>h(t,k.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:p,onForked:m,actions:v}){let c=s(),{t:d}=c,t=a(),f=n((r)=>F(r.agent)),S=n((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,u]=y(!1),i=R(!1);return o(Ue,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)h(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&o(j,{icon:o(H,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?o(j,{icon:o(x,{}),label:d("sessionList.unarchive"),onClick:()=>void h(c,t.unarchive(e.sessionId))}):b(C,{children:[o(j,{icon:o(A,{}),label:d("sessionList.fork"),disabled:!S||I,onClick:()=>{if(i.current)return;i.current=!0,u(!0),h(c,t.fork(e.sessionId,e.cwd).then((r)=>{let g=t.state.sessionList.find((L)=>L.sessionId===r);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{i.current=!1,u(!1)}))}}),o(j,{icon:o(D,{}),label:d("sessionList.archive"),onClick:()=>void h(c,t.archive(e.sessionId))})]}),o(j,{variant:"destructive",icon:o(N,{}),label:d("sessionList.delete"),onClick:p})]})})}
|
|
2
|
-
export{Eo};
|