@alwith/module-chat 0.5.24 → 0.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-f5gsffbv.js → chunk-03x33m2h.js} +2 -2
- package/dist/chunk-04xjj6q3.js +2 -0
- package/dist/{chunk-855w49k0.js → chunk-09zfz3ap.js} +2 -2
- package/dist/{chunk-pz0v5f2k.js → chunk-0kb39fpp.js} +2 -2
- package/dist/{chunk-qwfw4xpn.js → chunk-0kdemqjf.js} +2 -2
- package/dist/{chunk-vnsgjnp3.js → chunk-0kvfbr22.js} +2 -2
- package/dist/{chunk-95mynf7q.js → chunk-10emnq39.js} +2 -2
- package/dist/{chunk-9j9rx57q.js → chunk-1fr9rhkn.js} +2 -2
- package/dist/{chunk-wb8sf2ww.js → chunk-1fxadr5w.js} +2 -2
- package/dist/{chunk-kmdag4vy.js → chunk-1zh28e39.js} +2 -2
- package/dist/{chunk-fmjez7xp.js → chunk-22tg663v.js} +2 -2
- package/dist/{chunk-nj9y0bwb.js → chunk-2ac213n3.js} +2 -2
- package/dist/{chunk-wm0jty6e.js → chunk-2apyrry0.js} +2 -2
- package/dist/{chunk-99fh3f1v.js → chunk-2djv6s3a.js} +2 -2
- package/dist/{chunk-3bsk6xcf.js → chunk-2dvryx1q.js} +2 -2
- package/dist/{chunk-ececn091.js → chunk-2gg3gcmb.js} +1 -1
- package/dist/{chunk-7absxkjt.js → chunk-2hzdkgrk.js} +2 -2
- package/dist/{chunk-kz1kjzmq.js → chunk-33tyec6w.js} +2 -2
- package/dist/{chunk-f1x483c9.js → chunk-3fm507f7.js} +2 -2
- package/dist/{chunk-mnzqtg7h.js → chunk-3k33zp9m.js} +1 -1
- package/dist/{chunk-ypk1gwzc.js → chunk-3p9g44yz.js} +5 -5
- package/dist/chunk-3v3bd582.js +2 -0
- package/dist/{chunk-vt6cyes7.js → chunk-46phvpzh.js} +2 -2
- package/dist/{chunk-8dbx6g7q.js → chunk-4hwtb6yn.js} +1 -1
- package/dist/{chunk-gsfgdnfp.js → chunk-4jghs8rf.js} +2 -2
- package/dist/{chunk-jgd6dcgy.js → chunk-4qp43adx.js} +2 -2
- package/dist/{chunk-pbf73n1s.js → chunk-4vk86bbk.js} +2 -2
- package/dist/{chunk-tgskd2p2.js → chunk-517bhxvr.js} +2 -2
- package/dist/{chunk-0wa9yjg3.js → chunk-5c5z2b48.js} +2 -2
- package/dist/chunk-5dkj3ntx.js +5 -0
- package/dist/{chunk-j322kgxf.js → chunk-5r081sme.js} +2 -2
- package/dist/{chunk-5ap6fvrp.js → chunk-6fefnp6e.js} +1 -1
- package/dist/{chunk-36m8zstj.js → chunk-6g7btgsr.js} +2 -2
- package/dist/{chunk-drhzcs6e.js → chunk-6rgyckw8.js} +2 -2
- package/dist/{chunk-2rkrmpa7.js → chunk-6wmdpam5.js} +2 -2
- package/dist/{chunk-jxntqarp.js → chunk-725wv6ca.js} +2 -2
- package/dist/{chunk-azfmr99x.js → chunk-77cd8tev.js} +2 -2
- package/dist/{chunk-rbv1scqm.js → chunk-7a668qzy.js} +2 -2
- package/dist/{chunk-1e0e41vw.js → chunk-7e1wvb6e.js} +1 -1
- package/dist/{chunk-8hf11jas.js → chunk-7p80b5jc.js} +2 -2
- package/dist/{chunk-mvs2dzyt.js → chunk-81r1geaz.js} +2 -2
- package/dist/{chunk-qmzb07jg.js → chunk-8e5ytb0f.js} +2 -2
- package/dist/{chunk-yg3xhn5m.js → chunk-8xdak312.js} +2 -2
- package/dist/{chunk-k7ye738q.js → chunk-8zrfdjy4.js} +2 -2
- package/dist/{chunk-sqjgh9e2.js → chunk-9183jr6z.js} +3 -3
- package/dist/{chunk-ckyat78p.js → chunk-96tcqne6.js} +2 -2
- package/dist/chunk-99ftqpgg.js +4 -0
- package/dist/{chunk-7k64wn19.js → chunk-9jep8zjg.js} +3 -3
- package/dist/{chunk-1kbxsxft.js → chunk-9n2vrkkh.js} +2 -2
- package/dist/{chunk-btanfat4.js → chunk-9zth7avc.js} +1 -1
- package/dist/{chunk-g44hhdha.js → chunk-a5htm58g.js} +2 -2
- package/dist/{chunk-6t5war9h.js → chunk-ap6sr2c6.js} +2 -2
- package/dist/{chunk-r19q0w11.js → chunk-awfvvmjt.js} +2 -2
- package/dist/{chunk-bnbc6q4p.js → chunk-b9y436vs.js} +3 -3
- package/dist/{chunk-qd1z91fm.js → chunk-bfcswk98.js} +2 -2
- package/dist/{chunk-7170hbdr.js → chunk-bg0cf6kz.js} +2 -2
- package/dist/{chunk-3yxjh7b1.js → chunk-ce3wg766.js} +2 -2
- package/dist/{chunk-3s94ekrs.js → chunk-chq163r8.js} +2 -2
- package/dist/{chunk-agqnt7xq.js → chunk-cpe2b276.js} +2 -2
- package/dist/{chunk-pwjz3yxb.js → chunk-crx8p5zx.js} +2 -2
- package/dist/{chunk-3e6wcamp.js → chunk-dfcks9g4.js} +2 -2
- package/dist/{chunk-cw76pj9b.js → chunk-dv4d6mrb.js} +2 -2
- package/dist/{chunk-tpbqg729.js → chunk-dx745syv.js} +1 -1
- package/dist/chunk-e24jv7zb.js +2 -0
- package/dist/{chunk-rr36dnn9.js → chunk-e5twctz7.js} +2 -2
- package/dist/{chunk-jhzs9ab0.js → chunk-ef99py8a.js} +2 -2
- package/dist/{chunk-988sgbn9.js → chunk-ewvb59ye.js} +2 -2
- package/dist/{chunk-bg03czcx.js → chunk-f06zyvek.js} +2 -2
- package/dist/chunk-f50rww1k.js +2 -0
- package/dist/{chunk-kc56dhwd.js → chunk-f7ggbprz.js} +2 -2
- package/dist/{chunk-rjw63t34.js → chunk-fgk4f0jq.js} +2 -2
- package/dist/chunk-fprj3wy4.js +2 -0
- package/dist/{chunk-4r7j0ymq.js → chunk-g93wzhsv.js} +2 -2
- package/dist/{chunk-ddv00vjf.js → chunk-g9gktxv9.js} +2 -2
- package/dist/{chunk-cqnqwa54.js → chunk-gnwa39me.js} +2 -2
- package/dist/{chunk-dte0n4kf.js → chunk-h09ez7fc.js} +2 -2
- package/dist/{chunk-hdw3mwmb.js → chunk-h9m4z5dk.js} +3 -3
- package/dist/chunk-hq06m42h.js +2 -0
- package/dist/{chunk-t6vcdf4j.js → chunk-hswtp9wv.js} +1 -1
- package/dist/{chunk-vfhxerxt.js → chunk-hza92pfj.js} +2 -2
- package/dist/{chunk-qtp1xer1.js → chunk-jamq0frz.js} +1 -1
- package/dist/{chunk-1vf83jdk.js → chunk-jsabvejp.js} +2 -2
- package/dist/{chunk-1rg3nab3.js → chunk-jst7n5r4.js} +1 -1
- package/dist/chunk-k0dnnn77.js +2 -0
- package/dist/{chunk-j0m35s05.js → chunk-k1vkc88d.js} +1 -1
- package/dist/{chunk-m0834n5y.js → chunk-k2gwmccn.js} +2 -2
- package/dist/{chunk-n625g0h1.js → chunk-k727wnh1.js} +1 -1
- package/dist/{chunk-3cssygmg.js → chunk-kbbq3y2j.js} +2 -2
- package/dist/{chunk-9tp0z23q.js → chunk-kwp1fere.js} +2 -2
- package/dist/{chunk-pmkk6e5x.js → chunk-kz8zf6y0.js} +2 -2
- package/dist/chunk-mttcvwhx.js +2 -0
- package/dist/{chunk-g2qcyqc6.js → chunk-n5dkkw01.js} +2 -2
- package/dist/{chunk-x3y5htkt.js → chunk-n7qcezk8.js} +2 -2
- package/dist/{chunk-z3nybrbb.js → chunk-n8yww1mr.js} +2 -2
- package/dist/{chunk-509kwzxq.js → chunk-nr3spt0n.js} +2 -2
- package/dist/{chunk-f2w2sct6.js → chunk-nsb0d92p.js} +1 -1
- package/dist/{chunk-4bb6dzzs.js → chunk-p0s2pg33.js} +1 -1
- package/dist/chunk-p272qmbv.js +2 -0
- package/dist/{chunk-acb8t4jt.js → chunk-p3hxcpfy.js} +2 -2
- package/dist/{chunk-apyfztsv.js → chunk-p58e9z34.js} +2 -2
- package/dist/{chunk-n2e3a7n4.js → chunk-pf5655kt.js} +1 -1
- package/dist/{chunk-ttqy9d4r.js → chunk-pncx4r2c.js} +1 -1
- package/dist/{chunk-60neqgfx.js → chunk-ps722b9k.js} +2 -2
- package/dist/{chunk-pprt7ntb.js → chunk-pv5g85k0.js} +4 -4
- package/dist/{chunk-1mn2t6ga.js → chunk-pw1pws10.js} +2 -2
- package/dist/{chunk-qdg5zphd.js → chunk-pyznxtyg.js} +1 -1
- package/dist/chunk-q0fhp33b.js +2 -0
- package/dist/{chunk-7z4gtfkd.js → chunk-qjrgbqhy.js} +2 -2
- package/dist/{chunk-f1gj3yzt.js → chunk-qn2jfxff.js} +2 -2
- package/dist/chunk-qn4zvgc9.js +2 -0
- package/dist/{chunk-6trv0snh.js → chunk-qqqcqvrv.js} +2 -2
- package/dist/{chunk-9tn2n7xv.js → chunk-r1as1cra.js} +1 -1
- package/dist/{chunk-a4apcx3e.js → chunk-r4vfytjv.js} +3 -3
- package/dist/{chunk-ar4a6nyv.js → chunk-rb0cqdjg.js} +1 -1
- package/dist/{chunk-mj7094yh.js → chunk-rezwwmw7.js} +2 -2
- package/dist/{chunk-wgrmjfyp.js → chunk-rsp574n3.js} +2 -2
- package/dist/chunk-s2w7e9pg.js +2 -0
- package/dist/{chunk-4a46cpnm.js → chunk-s7yzvpmc.js} +3 -3
- package/dist/{chunk-pzjag1mt.js → chunk-sdf73s05.js} +3 -3
- package/dist/{chunk-74qvpvzv.js → chunk-syhh17rh.js} +2 -2
- package/dist/{chunk-x2jd9bpn.js → chunk-tdn5g8xd.js} +3 -3
- package/dist/chunk-v0p94epn.js +2 -0
- package/dist/{chunk-wvry7t79.js → chunk-vgrjqwbq.js} +2 -2
- package/dist/{chunk-48fj5m0p.js → chunk-vr0dfq9w.js} +2 -2
- package/dist/{chunk-1qyxrh0n.js → chunk-w233xc7k.js} +3 -3
- package/dist/{chunk-ddk8v2g9.js → chunk-w8qn76a1.js} +3 -3
- package/dist/{chunk-yakar0e2.js → chunk-wnn9r2r6.js} +2 -2
- package/dist/chunk-wsbh4n9e.js +2 -0
- package/dist/{chunk-g2zznfan.js → chunk-wtf1eyzy.js} +1 -1
- package/dist/{chunk-76a04a6j.js → chunk-x2nemdjf.js} +2 -2
- package/dist/chunk-x68b6rmk.js +2 -0
- package/dist/{chunk-0pzyavch.js → chunk-xdvbb3av.js} +2 -2
- package/dist/{chunk-5a6xc345.js → chunk-y7ngqt59.js} +2 -2
- package/dist/{chunk-3ka3bt0t.js → chunk-yez26qfc.js} +2 -2
- package/dist/chunk-ymy8d3hp.js +4 -0
- package/dist/{chunk-m271yxxm.js → chunk-yyba5e1c.js} +2 -2
- package/dist/{chunk-h9v3pks1.js → chunk-z18fvy7d.js} +1 -1
- package/dist/{chunk-swpy2b9a.js → chunk-z1aqmqgc.js} +2 -2
- package/dist/{chunk-mz8a6292.js → chunk-zacep5bq.js} +2 -2
- package/dist/{chunk-3vkkmyjm.js → chunk-zp8rq8nh.js} +2 -2
- package/dist/{chunk-jm6zxy9h.js → chunk-zyvvk8b2.js} +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/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/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/effort-slider.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-textarea.d.ts +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/composer.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.d.ts +3 -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.d.ts +3 -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.d.ts +3 -0
- package/dist/conversation/composer/prompt-history.js +1 -0
- 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.d.ts +3 -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/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/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-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/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-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/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/package.json +1 -1
- package/dist/chunk-0p6y2t9b.js +0 -2
- package/dist/chunk-6dbswsek.js +0 -2
- package/dist/chunk-b13pahat.js +0 -2
- package/dist/chunk-bmey8et5.js +0 -2
- package/dist/chunk-c32z3wjq.js +0 -2
- package/dist/chunk-d8q2qv1m.js +0 -2
- package/dist/chunk-dy92pv7q.js +0 -2
- package/dist/chunk-fnpf84rf.js +0 -4
- package/dist/chunk-hxtxrtpm.js +0 -2
- package/dist/chunk-jmb8r6aj.js +0 -2
- package/dist/chunk-jwt7q6yx.js +0 -4
- package/dist/chunk-nwtambg5.js +0 -2
- package/dist/chunk-pk2rvqd0.js +0 -2
- package/dist/chunk-q9zawfn1.js +0 -2
- package/dist/chunk-qn6ppn0r.js +0 -2
- package/dist/chunk-z7sswh39.js +0 -2
- package/dist/chunk-zxp0mb14.js +0 -2
- /package/dist/{chunk-a1czzft3.js → chunk-py0zbgaj.js} +0 -0
package/dist/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ui,c,S}from"./chunk-rezwwmw7.js";export{Ui as ActivityHostProvider,S as ActivityMarkdown,c as useActivityHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Dn,Xt,Te,pt}from"../chunk-nr3spt0n.js";import{Badge as j}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as I}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as L}from"@nyssance/shadcn/vega/components/ui/input";import{Label as q}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as G,RadioGroupItem as B}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as V}from"@nyssance/shadcn/vega/components/ui/textarea";import{autoUpdate as W}from"@floating-ui/dom";import{cn as H}from"cn";import{useCallback as T,useEffect as M,useLayoutEffect as O,useMemo as _,useRef as K,useState as C}from"react";import{createPortal as X}from"react-dom";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=_(()=>n?Dn(n.requestedSchema):[],[n]),[b,g]=C({}),S=K(null);M(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Te(i)){let c=pt(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),M(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);O(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),O(()=>{let e=x.current;if(!n||!e||!k)return;return W(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=_(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Te(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Te(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=pt(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return X(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=pt(r),m=Te(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(j,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:Xt(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:Xt(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(I,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(I,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(L,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(G,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:H("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(B,{value:t.value,id:o}),d(q,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:H("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(B,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(q,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(L,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(V,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(A,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(A,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Dn,Xt,Te,pt}from"../chunk-nr3spt0n.js";export{Dn as elicitationFields,Xt as elicitationLabels,pt as elicitationOptions,Te as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ir,Bo,ia,ra}from"../chunk-k0dnnn77.js";export{Ir as PERMISSION_KIND_GROUP_ORDER,ia as isAllowKind,ra as isAlwaysKind,Bo as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Uo}from"../chunk-1zh28e39.js";import"../chunk-k0dnnn77.js";export{Uo as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ur,Nr,Br,Go}from"../chunk-dfcks9g4.js";export{Go as SchemaElicitationForm,Ur as elicitationFields,Nr as initialValues,Br as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Oo}from"../chunk-qjrgbqhy.js";export{Oo as UrlElicitationCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function
|
|
2
|
-
export{
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function pi(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function da(){c()}function mi(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function gi(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Mr(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function ua(e,n,t,i,o,a){if(a==="none")return;_(o,[Mr(e,n,t,i,a)])}function Mr(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return qr(t,i);return Ar(e,n)}function qr(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function Ar(e,n){return y+Wr(e,n)}function pa(e,n){return D(Ar(e,n))}function Wr(e,n){if(n<=l)return Zr(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Zr(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function ma(){return r.context?.state}function ga(e){return g(e).ready}
|
|
2
|
+
export{pi,da,mi,gi,ua,Mr,qr,Ar,pa,Wr,Zr,ma,ga};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ii(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{ii};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,r,o,u}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{s,r,o,u}from"./chunk-pw1pws10.js";import{A}from"./chunk-2f9vjmxz.js";import{b,W,ve}from"./chunk-py0zbgaj.js";import{pe,O,ee}from"./chunk-9n2vrkkh.js";import{to}from"./chunk-fprj3wy4.js";import{ge}from"./chunk-yyba5e1c.js";import{ue}from"./chunk-k727wnh1.js";import{me}from"./chunk-8xdak312.js";import{Nt}from"./chunk-dx745syv.js";import{eo}from"./chunk-jst7n5r4.js";import{ActivityIcon as G}from"lucide-react";import{useEffect as K,useMemo as P}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(i,d){return i.find((m)=>m.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function lr({selectedId:i,onSelect:d,isForeground:m,onOpen:k,accessory:R,rowActions:h}){let N=s(),{t:L}=N,p=o((t)=>t.runStates),v=o((t)=>t.drafts),l=o((t)=>t.sessionList),g=O((t)=>t.activityOrder),f=P(()=>g.flatMap((t)=>{let e=p[t];return e&&pe({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:H(l,e)}]:[]}),[g,p,v,l]),w=P(()=>{let t=new Map;for(let e of f){let a=e.sid===i||m?.(e.sid)?"foreground":"background",S=t.get(a)??[];S.push(e),t.set(a,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,m]),y=O((t)=>t.activityCollapsedGroups),n=ee(),x=w.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(k?.(t))return;d(t)},E=eo();K(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!to(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let a=Number(e.key);if(!Number.isInteger(a)||a<1||a>9)return;let S=x[a-1];if(!S)return;e.preventDefault(),I(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let C=(t)=>{let e=x.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&E?c(M,{children:me(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(b,{children:w.map((t)=>t.key==="foreground"?c(b,{children:t.rows.map(C)},t.key):c(W,{open:!y.has(t.key),onOpenChange:(e)=>{let a=new Set(y);if(e)a.delete(t.key);else a.add(t.key);n({activityCollapsedGroups:a})},leading:c(G,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(C)},t.key))})}function T({sessionRow:i,state:d,interruption:m,active:k,tasks:R,listeningPorts:h,accessory:N,actions:L,onOpen:p,hint:v}){let l=s(),g=r(),{t:f}=l,w=i.title??f("sessionList.untitled"),y=Nt(i.sessionId,d);return D(q,{children:[c(ve,{"data-session-id":i.sessionId,active:k,role:"button",tabIndex:0,hoverCard:c(ue,{sessionRow:i,actions:L}),onClick:p,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),p()},state:d,interruption:m,title:w,preview:y,listeningPorts:h,onOpenPort:l.openLink&&((n)=>l.openLink?.(`http://localhost:${n}`)),accessory:N,hint:v,actions:c(ge,{title:f("sessionList.stop"),onStop:()=>u(l,g.stopSession(i.sessionId))})}),R.map((n)=>D("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(A,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
+
export{lr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sn,
|
|
2
|
-
export{an,
|
|
1
|
+
import{sn,vo}from"./chunk-hza92pfj.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function an(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=sn(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function Yr(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return vo(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
|
|
2
|
+
export{an,Yr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{r,o}from"./chunk-pw1pws10.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function pr(c){let t=r(),e=o((s)=>s.projectContext),u=c===null?m:e?a(e,{cwd:t.projectPath(c)}).id:null,d=o((s)=>s.sessionList),l=o((s)=>s.connection),i=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&n===null)t.listSessions().catch(()=>{return})},[t,l,i,n]),{result:L(()=>{if(i&&e)return{status:"ready",sessionRows:d.filter((s)=>a(e,{...s,cwd:t.projectPath(s.cwd)}).id===u).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,d,i,n,u,e]),retry:f}}
|
|
2
|
+
export{pr};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ln=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
|
|
4
4
|
<stop stop-color="#2BBFFF"/>
|
|
@@ -1286,4 +1286,4 @@ var Rn=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
|
1286
1286
|
</symbol>
|
|
1287
1287
|
</svg>
|
|
1288
1288
|
`;
|
|
1289
|
-
export{
|
|
1289
|
+
export{Ln};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}function T({subject:t,requestTitle:o}){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!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Xe,{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,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(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:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(
|
|
1
|
+
import{Uo}from"./chunk-1zh28e39.js";import{Go}from"./chunk-dfcks9g4.js";import{Oo}from"./chunk-qjrgbqhy.js";import{Xe}from"./chunk-fgk4f0jq.js";import{n}from"./chunk-zyvvk8b2.js";import{e}from"./chunk-k1vkc88d.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 Le(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
+
`)}function T({subject:t,requestTitle:o}){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!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Xe,{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,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(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:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Uo,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,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 Ye({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=n((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Go,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:r.t,onRespond:l})}function be({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:o,onRespond:s});if(Le(t))return a(Ye,{action:t,total:o??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Oo,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
3
|
export{Le,Ye,be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,r,At,o,u}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{s,r,At,o,u}from"./chunk-pw1pws10.js";import{M}from"./chunk-667z0pac.js";import{ve}from"./chunk-py0zbgaj.js";import{ge}from"./chunk-yyba5e1c.js";import{Ve,ue}from"./chunk-k727wnh1.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 n,jsxs as b,Fragment as C}from"react/jsx-runtime";function nn({sessionRow:e,active:v,onSelect:f,onForked:S=f,onHoverCardOpenChange:c,actions:l}){let a=s(),{t:p,i18n:k}=a,h=r(),d=o((t)=>t.runStates[e.sessionId]),I=At(),m=()=>f(e);return n(ve,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:m,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),m()},state:d?.state,interruption:d?.interruption??null,title:e.title??p("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(B,{sessionRow:e,onDelete:()=>I(e),onForked:S,actions:l}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ve(e.updatedAt,k.language)}):void 0,actions:d!=null?n(ge,{title:p("sessionList.stop"),onStop:()=>u(a,h.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:v,onForked:f,actions:S}){let c=s(),{t:l}=c,a=r(),p=o((i)=>F(i.agent)),k=o((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,d]=y(!1),[I,m]=y(!1),t=R(!1);return n(ue,{sessionRow:e,renaming:h,onRename:(i)=>{if(d(!1),i!==null)u(c,a.renameSession(e.sessionId,i))},actions:b(C,{children:[p&&n(M,{icon:n(H,{}),label:l("sessionList.rename"),onClick:()=>d(!0)}),S,e.archived?n(M,{icon:n(x,{}),label:l("sessionList.unarchive"),onClick:()=>void u(c,a.unarchive(e.sessionId))}):b(C,{children:[n(M,{icon:n(A,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,m(!0),u(c,a.fork(e.sessionId,e.cwd).then((i)=>{let g=a.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");f(g)}).finally(()=>{t.current=!1,m(!1)}))}}),n(M,{icon:n(D,{}),label:l("sessionList.archive"),onClick:()=>void u(c,a.archive(e.sessionId))})]}),n(M,{variant:"destructive",icon:n(N,{}),label:l("sessionList.delete"),onClick:v})]})})}
|
|
2
|
+
export{nn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Bo}from"./chunk-k0dnnn77.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Uo({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=Bo(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
+
export{Uo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var N="collection-default";function K(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ie(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Pt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function
|
|
2
|
-
export{N,K,Ie,Pt,
|
|
1
|
+
var N="collection-default";function K(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ie(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Pt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function or(o,e=Ie()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{N,K,Ie,Pt,or};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-zyvvk8b2.js";import{e,g}from"./chunk-k1vkc88d.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as j}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as x}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as r,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(t){return t.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||t}function Tr({cwd:t,onChange:u,preparing:b=!1,recentProjects:w}){let{host:i,client:p}=e(),{t:l}=i,v=n((o)=>o.projectContext),h=n((o)=>o.sessionList),y=R(()=>w??[...new Set([...h].toSorted((o,f)=>(f.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[w,h]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let o=!0;return g(i,p.refreshProjectContext(!0).then((f)=>{if(o)N(f.chatDirectory)})),()=>{o=!1}},[i,p]);let D=[...t!==null?[t]:[],...y.filter((o)=>o!==t)].filter((o)=>o!==c&&(!v||z(v,{cwd:o}).id!==I)),a=t!==null&&t!==c,P=()=>{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":b,className:j("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(C,{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:P,children:[r(m,{className:"size-4 group-hover/project:opacity-0"}),r("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:r(x,{className:"size-3"})})]}),s(_,{render:r(C,{variant:"ghost",size:"sm",className:j("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&&r(m,{className:"size-4"}),r("span",{className:"truncate",children:a?M(t):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[D.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:t??"",onValueChange:u,children:D.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(m,{}),r("span",{className:"truncate",children:M(o)})]},o))})}),(d!==void 0||a)&&r(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{g(i,d(t).then((o)=>{if(o!==null)u(o)}))},children:[r(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:P,children:[r(x,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
+
export{Tr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{An}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{An}from"./chunk-zacep5bq.js";async function Li(i,c){let s=new WeakSet;while(!c.aborted){let r=[...i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')].filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function it(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of An(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,o-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
|
|
2
|
+
export{Li,it};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,U,
|
|
2
|
-
export{
|
|
1
|
+
import{a,U,Gt}from"./chunk-2dvryx1q.js";var Eo=5000;function Ee(t){return"pastedText"in t}function Or(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Ke(t,e,o){let n=(r,s)=>{for(let[i,x]of a){if(!x.attachments.some((p)=>p.id===e.id))continue;U(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Or(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!a.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),Gt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function Ut(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Eo)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};U(e,(i)=>[...i,s]),Ke(e,s,n)}
|
|
2
|
+
export{Eo,Ee,Or,Ke,Ut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=new Map,i=new Map,f=new Map;function
|
|
2
|
-
export{a,
|
|
1
|
+
var a=new Map,i=new Map,f=new Map;function Ro(t,r){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,r),()=>{if(i.get(t)===r)i.delete(t)}}function U(t,r){let n=a.get(t);if(!n)return;let e=r(n.attachments);a.set(t,{...n,attachments:e}),i.get(t)?.(e)}function Gt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function kr(t){for(;;){let e=a.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=a.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Sr(t,r){if(r===null)a.delete(t);else a.set(t,r)}var s=new Map;function zt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function _r(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=a.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),a.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
|
|
2
|
+
export{a,Ro,U,Gt,kr,Sr,zt,_r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
1
|
+
import{t}from"./chunk-zyvvk8b2.js";import{Button as T}from"@nyssance/shadcn/vega/components/ui/button";import{codexTurnError as h}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as C,useRef as s,useState as u}from"react";import{jsx as n,jsxs as d}from"react/jsx-runtime";function Sn({children:i}){return d("div",{className:"codex-error-message",role:"alert",children:[n(R,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:i})]})}function _n({error:i,retry:e}){let{t:m}=t(),f=h(i),[c]=u(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=u(e?.delaySeconds??null),[N,y]=u(!1),[x,g]=u(null),o=s(!1),w=s(!1),E=s(e?.run);E.current=e?.run;let S=s((b)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(b).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),l=e!==void 0&&f.retryable;return C(()=>{if(!l||c===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((c-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[c,l]),d(Sn,{children:[d("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:f.message}),l&&n(T,{variant:"outline",size:"sm",disabled:N,onClick:()=>S.current("manual"),children:p===null?m("timeline.retry"):m("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
2
|
export{Sn,_n};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{We}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{We}from"./chunk-7a668qzy.js";import{ne,To}from"./chunk-5r081sme.js";import{t}from"./chunk-zyvvk8b2.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function bo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=We(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(ne,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(To,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{bo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as v}from"@nyssance/shadcn/vega/components/ui/input";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as t,jsxs as k}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as v}from"@nyssance/shadcn/vega/components/ui/input";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as t,jsxs as k}from"react/jsx-runtime";function Ri({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=E(null);N(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),B(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(v,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(b,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(z,{className:"size-3.5"})})]})}
|
|
2
|
+
export{Ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w}from"./chunk-b12v22de.js";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as f,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{useState as M}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{w}from"./chunk-b12v22de.js";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as f,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{useState as M}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Do({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=M(!1);return o(f,{open:m,onOpenChange:c,children:[e(b,{render:o(g,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(w,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{Do};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l}from"./chunk-
|
|
1
|
+
import{l}from"./chunk-wtf1eyzy.js";import{L,R,F,D}from"./chunk-z18fvy7d.js";import{Item as m}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function re({skills:o=!1}){let{t}=l();return a("div",{role:"status","aria-label":t(o?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(D,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((i)=>a(m,{size:"xs",className:"toolbox-row",children:[e(F,{children:e(s,{className:"size-10 rounded-xl"})}),a(R,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(L,{children:e(s,{className:"size-8 rounded-full"})})]},i))})]})}
|
|
2
2
|
export{re};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function
|
|
3
|
-
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function
|
|
4
|
-
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function
|
|
5
|
-
export{
|
|
1
|
+
import{hn}from"./chunk-w233xc7k.js";import{t}from"./chunk-zyvvk8b2.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function Gr(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
|
|
2
|
+
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function zr(o){let s=new Map,e=null;for(let n of o.split(`
|
|
3
|
+
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Vr(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?zr(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?Gr(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
+
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Qo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(hn,{files:Vr(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
+
export{Gr,zr,Vr,Qo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Do}from"./chunk-3fm507f7.js";import{e,g}from"./chunk-k1vkc88d.js";import{B,m}from"./chunk-v5mzxjzc.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":y,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:f,disabled:h,onConfigChange:c}){let{host:l,client:M}=e(),{t:r}=l,s=m(f,"mode");if(!s)return null;let o=s.currentValue,p=B(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),I=p.find((n)=>n.value===o),C=d[o]??a,v=(n)=>{if(n===o)return;g(l,c?c(s.configId,n):M.setConfig(u,s.configId,n))};return t(Do,{value:o,warning:o==="agent-full-access",currentName:I?.name??o,icon:t(C,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:h,label:r("composer.switchPermissionMode"),onValueChange:v,options:p.map((n)=>{let i=d[n.value]??a,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Kt=O(N);
|
|
2
|
+
export{Kt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{si}from"./chunk-6g7btgsr.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function xn({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(si,{src:c,alt:"",onClose:()=>a(!1)})]})}function ai({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(xn,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
|
|
2
|
+
export{xn,ai};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k,Tn,
|
|
1
|
+
import{k,Tn,Ii,Zt,Ni,In,Mi}from"./chunk-sdf73s05.js";import{t,ke,Q,n}from"./chunk-zyvvk8b2.js";import{Ce}from"./chunk-pf5655kt.js";import{createStore as M}from"@alwith/api/client";import{isText as A,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var v=M({entries:{}});function p(r,e){v.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=b(e),a=r.items.findLast((i)=>b(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&b(a)===s}function O(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...In(s._meta),...s.content.filter(A).flatMap((i)=>In(i._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:r,item:e,question:s,index:a}){let i=ke(),{t:l}=t(),m=Tn(e.id,a),c=JSON.stringify([r,m]),u=Q(v,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),h=n((o)=>o.connection==="ready"),f=u?.draft??Ii(s),q=d===void 0?u?.accepted:O(d,m)??u?.accepted,D=d!==void 0&&x(d,e),C=!d?.subagent&&h&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!D?"closed":!C?"unavailable":"pending",E=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Zt(s,f);if(!S.trim())return;let w={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Ni(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Mi,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function Pn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=k(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return y(Ce,{content:e.content.some((i)=>!A(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(R,{sessionId:r,item:e,question:i,index:l},Tn(e.id,l)))})}
|
|
2
2
|
export{Pn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var aa=280;function jo({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function Re({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function mn({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function $o({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function Ko({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function qo({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{aa,jo,Re,mn,$o,Ko,qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function li(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function ci(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
|
|
2
|
+
export{li,ci};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function Lt(){let{t:e,theme:a}=t(),n=Q(c,(o)=>o.request),s=n===null?null:
|
|
1
|
+
import{zo,Xe}from"./chunk-fgk4f0jq.js";import{t,Q}from"./chunk-zyvvk8b2.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function Et(e){c.setState({request:{path:e.path,patch:lo(e.patch,e.path)}})}function lo(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
|
+
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function Lt(){let{t:e,theme:a}=t(),n=Q(c,(o)=>o.request),s=n===null?null:zo(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Xe,{patch:n.patch,theme:a})})]})})}
|
|
3
3
|
export{Et,lo,Lt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ne}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{ne}from"./chunk-5r081sme.js";import{t}from"./chunk-zyvvk8b2.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Co({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(ne,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
+
export{Co};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{hi}from"./chunk-f06zyvek.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function fi({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(hi,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
+
export{fi};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{isText as f}from"@nyssance/codex-acp-v2/client";import{useRef as p}from"react";function Ho(l,c){let i=p(null);return(t)=>{if(t.defaultPrevented||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.key!=="ArrowUp"&&t.key!=="ArrowDown")return;let n=t.currentTarget;if(n.selectionStart!==n.selectionEnd)return;let e=i.current;if(e&&(e.sessionId!==l.id||e.value!==n.value))i.current=null,e=null;let u=t.key==="ArrowUp";if(u?n.value.slice(0,n.selectionStart).includes(`
|
|
2
|
+
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
|
+
`))return;if(!e){if(!u||n.value!=="")return;let s=l.items.flatMap((o)=>{if(o.kind!=="user")return[];let a=o.content.filter(f).map((d)=>d.text).join(`
|
|
4
|
+
`);return a.trim()?[a]:[]});if(!s.length)return;e={sessionId:l.id,entries:s,index:s.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(u?-1:1)));let r=e.entries[e.index]??"";if(e.value=r,c(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
+
export{Ho};
|