@alwith/module-chat 0.6.10 → 0.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/dist/activity-host.js +1 -1
- package/dist/app-reference.d.ts +9 -0
- package/dist/app-reference.js +1 -0
- 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-vw7pqffn.js → chunk-06yzz0yx.js} +2 -2
- package/dist/chunk-0aqnqk7b.js +2 -0
- package/dist/{chunk-q6ymd3n1.js → chunk-0d0bfb8e.js} +2 -2
- package/dist/chunk-0r4b11t4.js +2 -0
- package/dist/chunk-0srja8yh.js +2 -0
- package/dist/{chunk-4jh2wk80.js → chunk-0xmj4d4z.js} +2 -2
- package/dist/chunk-1647cyqx.js +2 -0
- package/dist/{chunk-4bba521x.js → chunk-19yjze8m.js} +5 -5
- package/dist/{chunk-ttk7b5mr.js → chunk-1axvr26t.js} +2 -2
- package/dist/{chunk-8fnjpx11.js → chunk-1bt8a25d.js} +2 -2
- package/dist/chunk-1g54ee1j.js +2 -0
- package/dist/{chunk-ss918bxh.js → chunk-1mf3b58j.js} +2 -2
- package/dist/{chunk-q4rad054.js → chunk-1sxmqb44.js} +2 -2
- package/dist/{chunk-7mfkaftt.js → chunk-1tb3d2x4.js} +2 -2
- package/dist/chunk-1ye5ygbk.js +2 -0
- package/dist/chunk-24dqkjvg.js +2 -0
- package/dist/chunk-26bm75r2.js +2 -0
- package/dist/{chunk-f2a9rqfz.js → chunk-2761tcb3.js} +2 -2
- package/dist/{chunk-4jb5eb68.js → chunk-290e7g1q.js} +2 -2
- package/dist/chunk-2s5598rk.js +2 -0
- package/dist/{chunk-xrsa8v3g.js → chunk-2wex96dp.js} +2 -2
- package/dist/{chunk-khdjy444.js → chunk-3ab38s9g.js} +2 -2
- package/dist/{chunk-ny85vn0b.js → chunk-3ddgyzhz.js} +3 -3
- package/dist/chunk-3kzmec3f.js +2 -0
- package/dist/{chunk-qdw6bkg1.js → chunk-3pcbgsm6.js} +2 -2
- package/dist/{chunk-2wqn18x2.js → chunk-3tsy36rq.js} +2 -2
- package/dist/chunk-4gstmex3.js +2 -0
- package/dist/chunk-52tcfvz0.js +2 -0
- package/dist/{chunk-18j37y1m.js → chunk-53ptmmsx.js} +2 -2
- package/dist/chunk-5q0kb3yb.js +2 -0
- package/dist/{chunk-48fj5m0p.js → chunk-5s85tvas.js} +2 -2
- package/dist/chunk-5y5b3w22.js +2 -0
- package/dist/{chunk-xphfecws.js → chunk-5ykpe629.js} +2 -2
- package/dist/{chunk-23g1j51d.js → chunk-5zq0s9fd.js} +3 -3
- package/dist/chunk-677dyzb1.js +4 -0
- package/dist/chunk-6cbj9r2x.js +2 -0
- package/dist/{chunk-4nnyn9b2.js → chunk-6fvrhr9x.js} +2 -2
- package/dist/chunk-6g5z3pff.js +2 -0
- package/dist/chunk-6tkjdrnj.js +2 -0
- package/dist/chunk-6z3nch41.js +1 -0
- package/dist/{chunk-gt343hrf.js → chunk-782x5ryb.js} +2 -2
- package/dist/chunk-799h4586.js +2 -0
- package/dist/{chunk-76a04a6j.js → chunk-7cj104ba.js} +2 -2
- package/dist/chunk-7m08m4m1.js +2 -0
- package/dist/chunk-7p3nx5bx.js +2 -0
- package/dist/chunk-7qmj50a2.js +2 -0
- package/dist/{chunk-xmt5r1xe.js → chunk-7wgt5rjw.js} +2 -2
- package/dist/{chunk-7d7rq137.js → chunk-7wj3dcpj.js} +2 -2
- package/dist/chunk-7xc69d48.js +2 -0
- package/dist/chunk-844s61q1.js +2 -0
- package/dist/chunk-87br10bq.js +2 -0
- package/dist/chunk-88j29hzx.js +2 -0
- package/dist/chunk-8a1th59e.js +2 -0
- package/dist/{chunk-jxgn4r9q.js → chunk-8c7x6vrs.js} +3 -3
- package/dist/{chunk-d9mmpjrr.js → chunk-8jgstab4.js} +2 -2
- package/dist/{chunk-k7y6dqf2.js → chunk-8pdapsc7.js} +2 -2
- package/dist/{chunk-rzx4tyx8.js → chunk-8t1brzbh.js} +2 -2
- package/dist/chunk-8wydj0hv.js +2 -0
- package/dist/{chunk-2vq4ee43.js → chunk-8xn58z0x.js} +3 -3
- package/dist/{chunk-0bqjz323.js → chunk-9he6963p.js} +2 -2
- package/dist/chunk-9n2wwk4g.js +2 -0
- package/dist/{chunk-91ppvzvv.js → chunk-a953k2dj.js} +3 -3
- package/dist/chunk-aardrb6e.js +2 -0
- package/dist/{chunk-1jae0var.js → chunk-acmc2r2s.js} +3 -3
- package/dist/chunk-akk3k2sc.js +4 -0
- package/dist/chunk-b0bd8abz.js +2 -0
- package/dist/{chunk-hx3mqvkw.js → chunk-b8c460mr.js} +2 -2
- package/dist/{chunk-czp860hf.js → chunk-ba4fa6fc.js} +2 -2
- package/dist/{chunk-4ytrtcdb.js → chunk-bp6f5tv8.js} +2 -2
- package/dist/chunk-bqdnxftw.js +2 -0
- package/dist/{chunk-9cqpn67f.js → chunk-btrg3ywt.js} +2 -2
- package/dist/chunk-bv175dn9.js +2 -0
- package/dist/{chunk-ne804jep.js → chunk-cctw9m9a.js} +2 -2
- package/dist/{chunk-vdjhch6s.js → chunk-cdgfr4n0.js} +2 -2
- package/dist/{chunk-y583je9q.js → chunk-cqskn18r.js} +2 -2
- package/dist/chunk-crg1ttkp.js +2 -0
- package/dist/{chunk-n14f6z0f.js → chunk-cx1sg5dt.js} +2 -2
- package/dist/{chunk-v931rjk2.js → chunk-d51rg15n.js} +2 -2
- package/dist/chunk-der9jtk9.js +2 -0
- package/dist/{chunk-0e6fsbhg.js → chunk-djk0ebpk.js} +2 -2
- package/dist/{chunk-x210arqv.js → chunk-eeqppv9j.js} +3 -3
- package/dist/chunk-eg9c12vk.js +2 -0
- package/dist/{chunk-6k7249zb.js → chunk-ehhzhjyb.js} +2 -2
- package/dist/{chunk-h4r8cx37.js → chunk-ex20n22v.js} +2 -2
- package/dist/{chunk-118vx38k.js → chunk-f2wy8jza.js} +2 -2
- package/dist/{chunk-z4jk07k1.js → chunk-f8tv9m81.js} +2 -2
- package/dist/{chunk-stqqrke0.js → chunk-fgre64ge.js} +2 -2
- package/dist/chunk-fkmka3v9.js +2 -0
- package/dist/{chunk-4cb0c8ae.js → chunk-fnvjemhq.js} +2 -2
- package/dist/chunk-fp3rp1qc.js +2 -0
- package/dist/{chunk-snd4q8wg.js → chunk-ggkjq8rk.js} +2 -2
- package/dist/{chunk-1zfg0nxv.js → chunk-gnpvd7wg.js} +2 -2
- package/dist/{chunk-yftn8cw0.js → chunk-h1embxgj.js} +2 -2
- package/dist/chunk-h9rwby5r.js +2 -0
- package/dist/chunk-hhdeh622.js +2 -0
- package/dist/chunk-hqdbv5hw.js +2 -0
- package/dist/chunk-j5trhvx8.js +4 -0
- package/dist/{chunk-wq9hmwvb.js → chunk-j71h60r0.js} +2 -2
- package/dist/{chunk-vfkhj17k.js → chunk-j7w4jr8y.js} +2 -2
- package/dist/{chunk-x15sq8ff.js → chunk-jgseey5x.js} +3 -3
- package/dist/{chunk-42v3qgdq.js → chunk-jpm15hcd.js} +2 -2
- package/dist/{chunk-3k1vzaxd.js → chunk-jzyj96ws.js} +2 -2
- package/dist/{chunk-ynfp9w3s.js → chunk-k5cjaeza.js} +2 -2
- package/dist/{chunk-yqnjd8mp.js → chunk-kgjdh49d.js} +2 -2
- package/dist/{chunk-jnpb9sqy.js → chunk-m7exm1n3.js} +5 -5
- package/dist/{chunk-ccmcm6sv.js → chunk-mdp2zdqm.js} +2 -2
- package/dist/{chunk-f17jdv7p.js → chunk-mmywt5fq.js} +2 -2
- package/dist/{chunk-fqgz93sy.js → chunk-mxh0vcye.js} +2 -2
- package/dist/chunk-mz8tjgre.js +2 -0
- package/dist/{chunk-5e5hvfzj.js → chunk-mzwwsacy.js} +2 -2
- package/dist/{chunk-ewjh6s2b.js → chunk-n13y99dj.js} +2 -2
- package/dist/chunk-nktaekpq.js +2 -0
- package/dist/chunk-nrvd7njv.js +2 -0
- package/dist/{chunk-5pk4srmv.js → chunk-nxjr0z23.js} +2 -2
- package/dist/chunk-p95ndy0b.js +3 -0
- package/dist/{chunk-7zsa59w7.js → chunk-pfqz31kk.js} +2 -2
- package/dist/{chunk-qephgzb6.js → chunk-pjgym6rx.js} +2 -2
- package/dist/{chunk-va11ek5z.js → chunk-pnavf2zs.js} +2 -2
- package/dist/{chunk-xnszvze2.js → chunk-pr5wv14q.js} +2 -2
- package/dist/{chunk-fw2jj4hh.js → chunk-q2z9w661.js} +2 -2
- package/dist/{chunk-k4dg1jep.js → chunk-q4f8zazc.js} +2 -2
- package/dist/chunk-qyj4d255.js +5 -0
- package/dist/chunk-r29b0ap8.js +2 -0
- package/dist/{chunk-7x150rqz.js → chunk-r6b9fdnm.js} +2 -2
- package/dist/{chunk-0aakfvnm.js → chunk-r9ny4bqk.js} +2 -2
- package/dist/{chunk-vttgk30b.js → chunk-r9szj8sp.js} +2 -2
- package/dist/{chunk-tv1frh1m.js → chunk-rb4p3h5b.js} +2 -2
- package/dist/{chunk-ydxrj4as.js → chunk-rge2pazt.js} +2 -2
- package/dist/chunk-rgn6pdaa.js +2 -0
- package/dist/chunk-rhcpe6m6.js +2 -0
- package/dist/{chunk-9098ssbp.js → chunk-rhxyb55x.js} +2 -2
- package/dist/{chunk-3b6m3wgn.js → chunk-rq7t6qry.js} +2 -2
- package/dist/{chunk-7nckaz1t.js → chunk-rtdjp07m.js} +2 -2
- package/dist/{chunk-gbsqs904.js → chunk-rvbbb9rf.js} +2 -2
- package/dist/chunk-rvjfb004.js +2 -0
- package/dist/{chunk-rkww8p94.js → chunk-rwh1yvqn.js} +2 -2
- package/dist/chunk-s267ztm1.js +2 -0
- package/dist/{chunk-ktknydpy.js → chunk-s4v10afm.js} +3 -3
- package/dist/{chunk-8n1rq3xt.js → chunk-sjes4cxr.js} +2 -2
- package/dist/chunk-snee6rb9.js +5 -0
- package/dist/{chunk-hpjh92s8.js → chunk-st0gd22t.js} +2 -2
- package/dist/{chunk-zyjcpz4s.js → chunk-sygx6n0s.js} +2 -2
- package/dist/chunk-t3sqxded.js +2 -0
- package/dist/chunk-tbv1mfdg.js +3 -0
- package/dist/{chunk-rnb0q6bt.js → chunk-tme1d6xh.js} +2 -2
- package/dist/{chunk-0f4hevya.js → chunk-v28fv6c4.js} +2 -2
- package/dist/chunk-vdc46qt2.js +2 -0
- package/dist/{chunk-kc56dhwd.js → chunk-vk7kqa6a.js} +2 -2
- package/dist/{chunk-as79cv4d.js → chunk-vkbaa74h.js} +2 -2
- package/dist/{chunk-ncs6yc8v.js → chunk-vpzjhbfa.js} +2 -2
- package/dist/chunk-vxexg361.js +2 -0
- package/dist/chunk-vxn8gfy4.js +2 -0
- package/dist/{chunk-1341xyde.js → chunk-wj2xjzds.js} +2 -2
- package/dist/{chunk-nrz6w8rd.js → chunk-wz6a2j26.js} +2 -2
- package/dist/chunk-x2ayy0ys.js +7 -0
- package/dist/{chunk-wyr7zv2j.js → chunk-xary32dg.js} +2 -2
- package/dist/{chunk-x29s0dbq.js → chunk-xvfvxjyp.js} +2 -2
- package/dist/{chunk-mveefs0j.js → chunk-xztxaq9k.js} +2 -2
- package/dist/{chunk-ag4vzemv.js → chunk-y3mk12gg.js} +2 -2
- package/dist/{chunk-7vcwgkhs.js → chunk-y7gzr914.js} +2 -2
- package/dist/{chunk-dnn1fcg8.js → chunk-y8md080p.js} +2 -2
- package/dist/{chunk-5c1wx64d.js → chunk-y8sc8n3j.js} +2 -2
- package/dist/{chunk-4s8gw49m.js → chunk-ycj91akv.js} +2 -2
- package/dist/chunk-ym0pvy7y.js +2 -0
- package/dist/{chunk-2kz2z86n.js → chunk-yzhqbz2p.js} +2 -2
- package/dist/chunk-z8ymt0ny.js +2 -0
- package/dist/{chunk-tptx1zs3.js → chunk-z94nsbnw.js} +2 -2
- package/dist/chunk-z9ch23p0.js +2 -0
- package/dist/chunk-z9q7rgbf.js +2 -0
- package/dist/chunk-zfjpfj30.js +2 -0
- package/dist/{chunk-85nkcdqg.js → chunk-zntkqbcv.js} +2 -2
- package/dist/{chunk-tsfpx3fp.js → chunk-zxwvq5f4.js} +2 -2
- package/dist/chunk-zyznsm1p.js +2 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.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/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-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.d.ts +3 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.d.ts +12 -0
- package/dist/composer/inline-document.js +1 -0
- package/dist/composer/inline-dom.d.ts +10 -0
- package/dist/composer/inline-dom.js +1 -0
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.d.ts +20 -0
- package/dist/composer/prompt-input-inline.js +1 -0
- package/dist/composer/prompt-input-textarea.d.ts +3 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.d.ts +4 -2
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.d.ts +2 -0
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.d.ts +2 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.d.ts +3 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/conversation/types.d.ts +2 -0
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.d.ts +12 -0
- package/dist/lib/app-reference.js +1 -0
- package/dist/lib/application-metadata.d.ts +6 -0
- package/dist/lib/application-metadata.js +1 -0
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/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/lib/tool-artifacts.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/oauth/claude-login.d.ts +16 -0
- package/dist/oauth/claude-login.js +1 -0
- package/dist/oauth.d.ts +2 -0
- package/dist/oauth.js +1 -0
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/pane.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +7 -2
- package/dist/chunk-0knwqeea.js +0 -2
- package/dist/chunk-1gwv9823.js +0 -2
- package/dist/chunk-1wdq75b1.js +0 -2
- package/dist/chunk-2fh11ysa.js +0 -2
- package/dist/chunk-2kskj0w5.js +0 -2
- package/dist/chunk-2yy6y89g.js +0 -2
- package/dist/chunk-384sh0aw.js +0 -2
- package/dist/chunk-3azwj6wd.js +0 -5
- package/dist/chunk-3r69g00w.js +0 -3
- package/dist/chunk-3svrvg8g.js +0 -2
- package/dist/chunk-4pxxxt8s.js +0 -2
- package/dist/chunk-57p1s7hy.js +0 -2
- package/dist/chunk-5q93tpax.js +0 -2
- package/dist/chunk-67swkna1.js +0 -2
- package/dist/chunk-6f7e67x1.js +0 -2
- package/dist/chunk-8xtp7pxb.js +0 -2
- package/dist/chunk-9rt2pfsm.js +0 -2
- package/dist/chunk-ak2frpw9.js +0 -2
- package/dist/chunk-bktb5ys5.js +0 -2
- package/dist/chunk-c162bdr0.js +0 -2
- package/dist/chunk-cbp0q0yt.js +0 -2
- package/dist/chunk-d0ta9y85.js +0 -2
- package/dist/chunk-dwpx56ge.js +0 -2
- package/dist/chunk-evs7bhpp.js +0 -2
- package/dist/chunk-exkwydhf.js +0 -3
- package/dist/chunk-f0g5k1d0.js +0 -2
- package/dist/chunk-fvg2w21q.js +0 -4
- package/dist/chunk-gp0bxakd.js +0 -2
- package/dist/chunk-h5zbmv4r.js +0 -2
- package/dist/chunk-h800j36s.js +0 -2
- package/dist/chunk-jkyepwr1.js +0 -2
- package/dist/chunk-jt54wp2c.js +0 -2
- package/dist/chunk-k7d2y0wx.js +0 -2
- package/dist/chunk-km434w1k.js +0 -2
- package/dist/chunk-kvkpd69n.js +0 -2
- package/dist/chunk-m58ryg53.js +0 -2
- package/dist/chunk-mma530jr.js +0 -2
- package/dist/chunk-ncsdkb8h.js +0 -2
- package/dist/chunk-pj7m1bs8.js +0 -2
- package/dist/chunk-pmzkz6hg.js +0 -2
- package/dist/chunk-pnm040ke.js +0 -2
- package/dist/chunk-pp1rr3jj.js +0 -2
- package/dist/chunk-ps3vgzbn.js +0 -2
- package/dist/chunk-q06r0t1d.js +0 -2
- package/dist/chunk-qcj6f1rq.js +0 -2
- package/dist/chunk-r5xd9p8p.js +0 -2
- package/dist/chunk-ts8edszy.js +0 -4
- package/dist/chunk-v9nbx36v.js +0 -2
- package/dist/chunk-vnwb90j9.js +0 -2
- package/dist/chunk-w0dfvr05.js +0 -2
- package/dist/chunk-w7p443ya.js +0 -1
- package/dist/chunk-w89hdkar.js +0 -2
- package/dist/chunk-wg45j5yr.js +0 -2
- package/dist/chunk-wjr2cjt1.js +0 -2
- package/dist/chunk-wsny5ye8.js +0 -2
- package/dist/chunk-wteebw32.js +0 -2
- package/dist/chunk-x2vms9xf.js +0 -2
- package/dist/chunk-yathdy79.js +0 -2
- package/dist/chunk-ye7bksyy.js +0 -7
- package/dist/chunk-zns42kp5.js +0 -2
- package/dist/chunk-zx63zvpy.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function
|
|
2
|
-
export{
|
|
1
|
+
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function Xt(t,o=50){return t.slice(0,o).map((e)=>{let r=a(e);return{key:r,label:e.path,payload:r,description:e.match_type==="directory"?"/":""}})}
|
|
2
|
+
export{Xt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{cn as a}from"cn";import{useRef as u,useState as M}from"react";import{jsx as l}from"react/jsx-runtime";var d=45,w=8;function E({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=M(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>w)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/d}s linear`},children:p})})}
|
|
2
|
+
export{E};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,s,n,m}from"./chunk-hqdbv5hw.js";import{D}from"./chunk-sjes4cxr.js";import{P,J,Se}from"./chunk-bv175dn9.js";import{we,j,ae}from"./chunk-rhcpe6m6.js";import{To}from"./chunk-5y5b3w22.js";import{xe}from"./chunk-ex20n22v.js";import{ye}from"./chunk-rgn6pdaa.js";import{be}from"./chunk-zntkqbcv.js";import{Gt}from"./chunk-mmywt5fq.js";import{Po}from"./chunk-tme1d6xh.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as G,useMemo as A}from"react";import{Kbd as K}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as C,Fragment as T}from"react/jsx-runtime";function M(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function qr({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=a(),{t:N}=h,p=n((t)=>t.runStates),v=n((t)=>t.drafts),u=n((t)=>t.sessionList),g=j((t)=>t.activityOrder),f=A(()=>g.flatMap((t)=>{let e=p[t];return e&&we({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:M(u,e)}]:[]}),[g,p,v,u]),b=A(()=>{let t=new Map;for(let e of f){let r=e.sid===i||l?.(e.sid)?"foreground":"background",S=t.get(r)??[];S.push(e),t.set(r,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,l]),y=j((t)=>t.activityCollapsedGroups),o=ae(),L=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),x=(t)=>{if(w?.(t))return;d(t)},O=Po();G(()=>{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 r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let S=L[r-1];if(!S)return;e.preventDefault(),x(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let I=(t)=>{let e=L.indexOf(t);return c(H,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:k?.(t.sid),actions:R?.(t.sessionRow),hint:e<9&&O?c(K,{children:be(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(P,{children:b.map((t)=>t.key==="foreground"?c(P,{children:t.rows.map(I)},t.key):c(J,{open:!y.has(t.key),onOpenChange:(e)=>{let r=new Set(y);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(I)},t.key))})}function H({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:p,hint:v}){let u=a(),g=s(),{t:f}=u,b=i.title??f("sessionList.untitled"),y=Gt(i.sessionId,d);return C(T,{children:[c(Se,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(ye,{sessionRow:i,actions:N}),onClick:p,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),p()},state:d,interruption:l,title:b,preview:y,listeningPorts:R,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:h,hint:v,actions:c(xe,{title:f("sessionList.stop"),onStop:()=>m(u,g.stopSession(i.sessionId))})}),k.map((o)=>C("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(D,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
|
|
2
|
+
export{qr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-844s61q1.js";import{un,e,y}from"./chunk-rvjfb004.js";import{Wt}from"./chunk-eg9c12vk.js";import{cn}from"./chunk-z8ymt0ny.js";import{qt}from"./chunk-7xc69d48.js";import{jt,$t}from"./chunk-tbv1mfdg.js";import{Kt}from"./chunk-f8tv9m81.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function ea({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:jt},[t]);return i(un,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r($t,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),u=()=>y(d,R.open(t.id,t.cwd)),x=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!x&&r(qt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(C,{children:[r(k,{}),r(h,{children:n("conversation.stopped")}),r(N,{children:r(w,{size:"sm",variant:"outline",onClick:u,children:n("conversation.reconnect")})})]})}),x?E??r(M,{className:"flex-1",children:i(z,{children:[r(B,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(P,{children:n("conversation.welcomeDescription")})]})}):r(cn,{session:t,timeline:m}),r(Kt,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(h,{children:n("conversation.readOnlyTitle")}),r(N,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:u,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??r(Wt,{session:t})]}),T]})}
|
|
2
|
+
export{ea};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c}from"./chunk-8pdapsc7.js";import{P,p}from"./chunk-bv175dn9.js";import{yt}from"./chunk-yzhqbz2p.js";import{Ee,l,Le,Ke,i}from"./chunk-aardrb6e.js";import{U,O,ne,B,G,me,bt}from"./chunk-6z3nch41.js";import{pe}from"./chunk-gnpvd7wg.js";import{$e}from"./chunk-ggkjq8rk.js";import{x}from"./chunk-btrg3ywt.js";import{wt,L}from"./chunk-2761tcb3.js";import{z,fe}from"./chunk-h1embxgj.js";import{Ct}from"./chunk-7wj3dcpj.js";import{xt}from"./chunk-6g5z3pff.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as se,CircleArrowUpIcon as ie,MoreVerticalIcon as le,PlusIcon as F,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as de,XIcon as ue}from"lucide-react";import{memo as ge,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as I}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Se}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as E}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Z}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function De({plugin:t,marketplace:d}){let{t:u}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=u(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(se,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?u("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(E,{"aria-hidden":"true"}):e(F,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Me({plugin:t,marketplace:d,actions:u,onOpen:g}){let a=X(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(me,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(B,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(L,{name:t.name})})}),s(O,{className:"pointer-events-none relative min-w-0",children:[e(bt,{className:"mb-0.5",children:T(t)}),e(ne,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(ne,{"data-toolbox-metadata":"",children:r})]}),e(U,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function J(){return Ke((t)=>t.connection==="ready"&&ee(t.agent))}var D=48;function ze({marketplace:t,plugins:d,onOpen:u}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=I(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/D)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(Pe,{children:[e(Ie,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(le,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(G,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*D,(r+1)*D).map((n)=>e(Me,{onOpen:u,plugin:n,marketplace:t,actions:e(De,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>D&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/D)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*D>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Oe=ge(function({query:d,onOpen:u}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),X(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:h})=>({marketplace:v,plugins:h.filter(({plugin:y,text:b})=>d===""?v.path!==null||n.has(y.id):b.includes(d)).map(({plugin:y})=>y)}))},[m,f,d]);return s(Z,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:u},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Be(){let{t}=l(),d=J(),u=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=I(""),[r,n]=I(!1),[v,h]=I(!1),[y,b]=I(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),b(null);try{await u({source:N}),m(""),h(!1)}catch(S){b(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(E,{}):e(ie,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)h(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(F,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(Se,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(E,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Te({onOpen:t,query:d}){let u=J(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,f=ve(d.trim().toLowerCase());return e(x,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${z} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(pe,{}):e(Oe,{query:f,onOpen:t})]})})}function fr({cwd:t,active:d,extensions:u,onOpenCatalog:g}){let{t:a}=l(),f=Le(),m=Ee(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[h,y]=I("plugins"),[b,A]=I({plugins:"",skills:""}),N=h==="skills"?b.skills:b.plugins,S=(o)=>A((M)=>({...M,[h]:o})),Y=Ke((o)=>JSON.stringify([...new Set(o.sessionList.map((M)=>$e(M.cwd,o.projectContext)).filter((M)=>M!==null))].toSorted())),H=JSON.stringify([...new Set([$e(t,f.state.projectContext),...JSON.parse(Y)].filter((o)=>o!==null))].toSorted()),R=i((o)=>o.installed),q=a(h==="skills"?"plugins.skills.search":"plugins.search"),[w,V]=I(null),C=J();K(()=>{if(!d||!C)return;if(m.getState().loadedScope!==H)r(JSON.parse(H))},[d,C,r,H,m]),K(()=>{if(!C)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,f]);let j=(o)=>{g?.(),y("plugins"),V(o)},_=(o)=>{g?.(),y(o),V(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(wt,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(p,{className:`${c} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(p,{className:`${c} h-8 gap-2 px-2`,active:!u?.active&&h===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(x,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(P,{children:!C||n&&R.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(E,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):R.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):R.map((o)=>s(p,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!u?.active&&w?.plugin.id===o.plugin.id,onClick:()=>j(o),children:[e(L,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(Z,{children:[w&&e(Ct,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(fe,{children:e(yt,{title:a(`plugins.headings.${h}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":q,value:N,onChange:(o)=>S(o.target.value),placeholder:q}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(ue,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(E,{}):e(re,{})}),h==="plugins"&&e(Be,{})]})})}),(h==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[h==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Te,{query:b.plugins,onOpen:j})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(xt,{query:b.skills,ready:C,onOpenPlugin:j})})]})]})]})})]})}
|
|
3
|
+
export{fr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function Do({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=N(null);B(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),z(()=>{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:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(E,{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(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(h,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(b,{className:"size-3.5"})})]})}
|
|
2
|
+
export{Do};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{D}from"./chunk-sjes4cxr.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as d,DropdownMenuContent as m,DropdownMenuGroup as w,DropdownMenuItem as i,DropdownMenuLabel as S,DropdownMenuTrigger as c}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as a}from"react/jsx-runtime";var M=["requires_action","running","done","idle"];function Kr({sessions:l,onSelect:p,t:n}){return e("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":n("sessionList.states.title"),children:M.map((o)=>{let s=l.filter((t)=>t.state===o),r=n(`sessionList.states.${o}`);return a(d,{children:[a(c,{render:e(u,{variant:"ghost",size:"xs"}),"aria-label":`${r}: ${s.length}`,children:[e(D,{state:o,pulse:!1}),e("span",{className:"tabular-nums",children:s.length})]}),e(m,{"aria-label":r,className:"w-72 max-w-[calc(100vw-1rem)]",children:a(w,{children:[e(S,{children:r}),s.length===0?e(i,{disabled:!0,children:n("sessionList.states.empty")}):s.map((t)=>a(i,{onClick:()=>p(t),children:[e(D,{state:t.state,pulse:!1}),e("span",{className:"min-w-0 flex-1 truncate",children:t.title||n("sessionList.untitled")})]},t.sessionId))]})})]},o)})})}
|
|
2
|
+
export{Kr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Wi}from"./chunk-0d0bfb8e.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function qi(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Wi(a,r)}
|
|
2
|
+
export{qi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{$o}from"./chunk-3ab38s9g.js";import{f}from"./chunk-6cbj9r2x.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function Oo({data:t,t:n,className:l,...m}){let c=f(),[u,h]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,g=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return g(b+p);return g(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),h(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e($o,{containerRef:C,filename:a||n("input.image"),onOpenChange:h,onScaleChange:d,open:u,scale:I,url:t.url})]})}function Bo({children:t,className:n,...l}){let m=f();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
|
|
2
|
+
export{Oo,Bo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function
|
|
2
|
-
export{
|
|
1
|
+
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function en(t,i,a,l){let e=p(()=>t.items.findLast((u)=>u.kind==="user"),[t.items]),n=JSON.stringify([t.id,m(e?._meta)]),[r,d]=c(null),o=l&&i&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!e?.replayed;return{text:o&&!a&&r!==n?s(t._meta):null,invalidate:()=>{if(o)d(n)}}}
|
|
2
|
+
export{en};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function _i(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
|
|
2
|
+
export{_i};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{d}from"./chunk-z9ch23p0.js";function Vo(a,s){let i=document.createDocumentFragment(),o="",r=()=>{if(o)i.append(document.createTextNode(o));o=""};for(let e of d(s)){if(typeof e==="string"){o+=e;continue}r();let c=document.createElement("span");c.contentEditable="false",c.dataset.inlineApp=e.id,c.setAttribute("aria-label",e.name),c.className="inline-flex items-center gap-1 align-middle whitespace-nowrap text-xs leading-none font-normal text-[color:var(--app-reference-foreground,var(--color-blue-500))] select-all me-1";let t=(u,m)=>{let f=document.createElement("img");f.src=u,f.alt="",f.draggable=!1,f.className=`size-3 shrink-0 object-contain ${m}`,c.append(f)};if(e.iconUrl)t(e.iconUrl,e.iconUrlDark?"dark:hidden":"");if(e.iconUrlDark)t(e.iconUrlDark,e.iconUrl?"hidden dark:block":"");let l=document.createElement("span");l.textContent=e.name,c.append(l),i.append(c);let p=document.createElement("span");p.dataset.inlineAnchor="",p.textContent="",i.append(p)}r();let n=document.createElement("br");n.dataset.inlineCaret="",i.append(n),a.replaceChildren(i)}function wn(a,s){let i=[],o=new Map(s.map((n)=>[n.id,n])),r=(n)=>{if(n.nodeType===Node.TEXT_NODE){i.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){i.push(...(n.textContent??"").replace("","").split(""));return}let e=n.dataset.inlineApp;if(e!==void 0){let t=o.get(e);if(t)i.push(t);return}if(n.tagName==="BR"){i.push(`
|
|
2
|
+
`);return}if((n.tagName==="DIV"||n.tagName==="P")&&i.length&&i.at(-1)!==`
|
|
3
|
+
`)i.push(`
|
|
4
|
+
`)}for(let e of n.childNodes)r(e)};for(let n of a.childNodes)r(n);return i}function jo(a,s,i){let o=window.getSelection();if(!o?.rangeCount)return i;let r=o.getRangeAt(0);if(!a.contains(r.startContainer)||!a.contains(r.endContainer))return i;let n=(e,c)=>{let t=document.createRange();return t.selectNodeContents(a),t.setEnd(e,c),wn(t.cloneContents(),s).length};return{start:n(r.startContainer,r.startOffset),end:n(r.endContainer,r.endOffset)}}function kn(a,s){let i=(n)=>{let e=Math.max(0,n);for(let[c,t]of[...a.childNodes].entries())if(t.nodeType===Node.TEXT_NODE){let l=t.textContent?.length??0;if(e<=l)return[t,e];e-=l}else if(t instanceof HTMLElement&&t.hasAttribute("data-inline-anchor")){let l=t.firstChild,p=(t.textContent??"").replace("","").length;if(l&&e<=p)return[l,e+(l.textContent?.startsWith("")?1:0)];e-=p}else if(t instanceof HTMLElement&&t.dataset.inlineApp!==void 0){if(e===0)return[a,c];e--}else if(t instanceof HTMLElement&&t.tagName==="BR")return[a,c];return[a,a.childNodes.length]},o=document.createRange();o.setStart(...i(s.start)),o.setEnd(...i(s.end));let r=window.getSelection();r?.removeAllRanges(),r?.addRange(o)}
|
|
5
|
+
export{Vo,wn,jo,kn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function ro(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function pn(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Fe(t){return t.type==="array"}function St(t){return(Fe(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{ro,pn,Fe,St};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Bt({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function F({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
|
|
2
|
+
export{Bt,F};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{N}from"./chunk-0xmj4d4z.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Qo({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]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{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(N,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{Qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var qe="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function Tt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(qe))n()}),[e]);return d(t,()=>o(e.get(qe)))}async function Nt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[qe])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[qe]:i}})}
|
|
2
|
+
export{qe,Tt,Nt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=(e)=>String(e).padStart(2,"0");function
|
|
2
|
-
export{
|
|
1
|
+
var a=(e)=>String(e).padStart(2,"0");function gt(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
|
|
2
|
+
export{gt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{M}from"./chunk-acmc2r2s.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Na(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function er(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=M(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(M(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function tr(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Na(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(Zn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>j(x,c,b<v,a[b-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Zn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ce(t){return S(t.content)}function ft(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Qn(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function nr(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function or(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function ir(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!or(t,e[n-1],o))break;n--}return e[n]?.key}function rr(t,e,n){let o=n,s=n;while(o>0&&or(t,e[o-1],e[o]))o--;while(s+1<e.length&&or(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
|
|
2
|
+
export{Na,er,tr,Zn,ce,ft,Qn,nr,or,ir,rr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-hqdbv5hw.js";import{Bt}from"./chunk-r6b9fdnm.js";import{E}from"./chunk-nktaekpq.js";import{zt,ke}from"./chunk-bv175dn9.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function Ye(t,n){let i=n==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:i})}function ye({sessionRow:t,actions:n,shortcut:i,renaming:r=!1,onRename:m}){let{t:s,i18n:C,PathAction:u}=a(),f=ke(),y=zt();g(()=>{f(r)},[r,f]);let[I,p]=D(t.title??"");g(()=>{if(r)p(t.title??"")},[r,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?s("sessionList.archived"):t.updatedAt!==null?Ye(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Bt,{title:r?o(w,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":s("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(E,{className:"min-w-0 flex-1",children:t.title??s("sessionList.untitled")})}),i]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:l||n!==void 0?h(O,{children:[l,l&&n!==void 0&&o(M,{}),n]}):void 0})}
|
|
2
|
+
export{Ye,ye};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s}from"./chunk-hqdbv5hw.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function we(t,n){let e=t.runStates[n];return e!==void 0&&(!e.reusableDraft||t.drafts[n]!==void 0)}function d(t,n,e){let a=t.filter((o)=>we(e,o)),S=new Set(a),c=e.runStates!==n.runStates&&l(e.runStates)==="event";for(let[o,i]of Object.entries(e.runStates)){if(S.has(o)||!we(e,o))continue;let r=n.runStates[o],g=!r||i.state!==r.state||i.since!==r.since||i.lastActivityAt!==r.lastActivityAt||i.interruption!==r.interruption;if(i.reusableDraft&&e.drafts[o]!==void 0||c&&g&&(!r||i.state!=="idle")&&i.interruption!=="runtime restarted")a.push(o)}return a.length===t.length&&a.every((o,i)=>o===t[i])?t:a}var u=new WeakMap;function v(t){return{view:"sessions",activityOrder:d([],t.state,t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function yn(t){let n=u.get(t);if(n)return n;let e=v(t),a=new Set,S=(i)=>{e={...e,...i};for(let r of a)r()},c=t.state;t.store.subscribe(()=>{let i=t.store.getState(),r=d(e.activityOrder,c,i);if(c=i,r!==e.activityOrder)S({activityOrder:r})});let o={get:()=>e,set:S,subscribe:(i)=>(a.add(i),()=>a.delete(i))};return u.set(t,o),o}function Wr(t){u.get(t)?.set(v(t))}function j(t){let n=yn(s());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function ae(){return yn(s()).set}function Zr(){let t=j((e)=>e.view),n=ae();return[t,(e)=>n({view:e})]}
|
|
2
|
+
export{we,yn,Wr,j,ae,Zr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{_}from"./chunk-s267ztm1.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as b}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function Qe({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=_();return n(x,{open:m,onOpenChange:r,children:[o(b,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
|
|
2
|
+
export{Qe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{hi}from"./chunk-52tcfvz0.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 fi({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=hi(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{fi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{bn}from"./chunk-0aqnqk7b.js";async function Ho(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 tt(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of bn(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{Ho,tt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var Xe="group/trailing";function Ue({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Je({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
|
|
2
|
+
export{Xe,Ue,Je};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Me}from"./chunk-844s61q1.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function un({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Me,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function y(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{un,e,y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ti}from"./chunk-4ytrtcdb.js";import{Se,t,_e,o,ct}from"./chunk-cbp0q0yt.js";import{Di,st,Rn,Ui,Bi}from"./chunk-ydxrj4as.js";import{it}from"./chunk-tv1frh1m.js";import{ci}from"./chunk-23g1j51d.js";import{si}from"./chunk-48fj5m0p.js";import{Pi,Ti}from"./chunk-42v3qgdq.js";import{Wi,Zi}from"./chunk-n14f6z0f.js";import{ai}from"./chunk-k4dg1jep.js";import{li}from"./chunk-kc56dhwd.js";import{Ci}from"./chunk-fvg2w21q.js";import{codexExtensionCapabilities as Me,codexMessageError as ze,codexRetryNotice as Ve,codexTurnError as Be,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as qe}from"lucide-react";import{useCallback as M,useEffect as N,useLayoutEffect as ve,useMemo as Q,useRef as h,useState as U}from"react";import{flushSync as Te}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var ye=24;function Oe(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Fe({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function Ke({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=_e(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return N(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((_)=>{if(_.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function Ue(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:Di(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function tt(e){return i(Se,{host:e.host,client:e.client,children:i(We,{...e})})}function We({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=Fe}){let v=_e(),A=t(),T=o((n)=>n.historyNavigation[e.id]),c=Ue(e,T?.turns),L=c.at(-1)?.key,xe=Ui(e,c),y=e.state==="running"||e.state==="requires_action",W=Q(()=>si(c,T),[c,T]),Z=Q(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),he=Q(()=>S===void 0?[]:Pi(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,D=h(c);D.current=c;let[l,be]=U(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),we=o((n)=>Me(n.agent).sessionRetry),te=x!==void 0;N(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[Re,ke]=U(!1),O=h(null),[Pe,ne]=U(!1),re=h(0),j=h({key:L,running:y});j.current={key:L,running:y};let[ie,F]=U(0),I=h(0),H=h(null);I.current=ie;let Ie=M(()=>{if(H.current!==null)H.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:X,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=li(l,y,Ie),se=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&j.current.running&&j.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Oe({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});H.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,Te(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ae,y,l,c]);ve(()=>{if(!w||y)return;ue(),H.current=null,I.current=0,F(0)},[w,ue,y]);let G=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);N(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(ke(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)G()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,G,l,e.restoring,T?.complete]),N(()=>{Wi({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),N(()=>()=>Zi(e.id),[e.id]);let He=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=D.current.find((m)=>m.user?.id===(n.messageId??n.id))??D.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ge(P)===n.nativeTurnId));if(!r?.user)return null;let p=r.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),Ne=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);N(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=H.current,r=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,Te(()=>F(p)),p===0)H.current=null}if(p>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),N(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);ve(()=>{if(l===null)return;let n=c.at(-1),a=ce.current;if(ce.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))H.current=null,I.current=0,F(0),se()}else if(n.key!==a.key)X()},[se,w,y,X,l,e.turnEndedAt,c]);let Ee=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(Ke,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Pe})}let p=c.indexOf(r),f=r.key===xe,m=Bi(e,c,p),P=!f&&m.continued,K=r.key===L,q=r.errors.at(-1),de=q===void 0?null:ze(q),J=q===void 0?null:ge(q),Ae=!e.subagent&&K&&!f&&k&&we&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&Be(de).kind==="overloaded"&&J!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(r)??null,pe=s?.(r)??null,Le=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||f||me!==null||st(r)||Rn(r)||K&&(e.error!==null||e.lastStopReason==="cancelled"),fe=r.user===null?null:it(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(Ci,{item:r.user,messageTime:fe}):V(r.user,fe)),Le&&i(ci,{sessionId:e.id,turn:r,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?Ve(e._meta)??void 0:void 0,retry:Ae?{turnId:J,delaySeconds:ai(c),run:(Ce)=>v.retrySession(e.id,J,Ce)}:void 0,interrupted:Rn(r)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:me}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(_,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(ti,{ref:O,entries:W,renderTurn:Ee,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),Re&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:G,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(Ti,{items:he,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ne,onRevealError:(n)=>ct(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:X,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(qe,{})})]})}
|
|
2
|
-
export{
|
|
1
|
+
import{bi}from"./chunk-bp6f5tv8.js";import{Me,t,Ae,o,vt}from"./chunk-844s61q1.js";import{tr,ft,Qn,ir,rr}from"./chunk-rge2pazt.js";import{gt}from"./chunk-rb4p3h5b.js";import{Hi}from"./chunk-5zq0s9fd.js";import{Fi}from"./chunk-5s85tvas.js";import{Pi,Ii}from"./chunk-jpm15hcd.js";import{cr,dr}from"./chunk-cx1sg5dt.js";import{_i}from"./chunk-q4f8zazc.js";import{Di}from"./chunk-vk7kqa6a.js";import{Zi}from"./chunk-677dyzb1.js";import{codexExtensionCapabilities as ze,codexMessageError as Ve,codexRetryNotice as Be,codexTurnError as qe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Oe}from"lucide-react";import{useCallback as M,useEffect as N,useLayoutEffect as ve,useMemo as Q,useRef as h,useState as U}from"react";import{flushSync as Te}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var ye=24;function Fe(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ke({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function Ue({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=Ae(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return N(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((_)=>{if(_.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function _e(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:tr(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function dt(e){return i(Me,{host:e.host,client:e.client,children:i(We,{...e})})}function We({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:_=Ke}){let v=Ae(),A=t(),T=o((n)=>n.historyNavigation[e.id]),c=_e(e,T?.turns),L=c.at(-1)?.key,xe=ir(e,c),y=e.state==="running"||e.state==="requires_action",W=Q(()=>Fi(c,T),[c,T]),Z=Q(()=>W.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[W]),he=Q(()=>S===void 0?[]:Pi(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,D=h(c);D.current=c;let[l,be]=U(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),we=o((n)=>ze(n.agent).sessionRetry),te=x!==void 0;N(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[Re,Se]=U(!1),O=h(null),[ke,ne]=U(!1),re=h(0),j=h({key:L,running:y});j.current={key:L,running:y};let[ie,F]=U(0),I=h(0),H=h(null);I.current=ie;let Pe=M(()=>{if(H.current!==null)H.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:X,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=Di(l,y,Pe),se=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&j.current.running&&j.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Fe({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});H.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,Te(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ae,y,l,c]);ve(()=>{if(!w||y)return;ue(),H.current=null,I.current=0,F(0)},[w,ue,y]);let G=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);N(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(Se(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)G()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,G,l,e.restoring,T?.complete]),N(()=>{cr({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),N(()=>()=>dr(e.id),[e.id]);let Ie=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=D.current.find((m)=>m.user?.id===(n.messageId??n.id))??D.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ge(P)===n.nativeTurnId));if(!r?.user)return null;let p=r.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),He=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);N(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=H.current,r=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,Te(()=>F(p)),p===0)H.current=null}if(p>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),N(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);ve(()=>{if(l===null)return;let n=c.at(-1),a=ce.current;if(ce.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))H.current=null,I.current=0,F(0),se()}else if(n.key!==a.key)X()},[se,w,y,X,l,e.turnEndedAt,c]);let Ne=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(Ue,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!ke})}let p=c.indexOf(r),f=r.key===xe,m=rr(e,c,p),P=!f&&m.continued,K=r.key===L,q=r.errors.at(-1),de=q===void 0?null:Ve(q),J=q===void 0?null:ge(q),Ee=!e.subagent&&K&&!f&&k&&we&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&qe(de).kind==="overloaded"&&J!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(r)??null,pe=s?.(r)??null,Le=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||f||me!==null||ft(r)||Qn(r)||K&&(e.error!==null||e.lastStopReason==="cancelled"),fe=r.user===null?null:gt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(Zi,{item:r.user,messageTime:fe}):V(r.user,fe)),Le&&i(Hi,{sessionId:e.id,turn:r,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?Be(e._meta)??void 0:void 0,retry:Ee?{turnId:J,delaySeconds:_i(c),run:(Ce)=>v.retrySession(e.id,J,Ce)}:void 0,interrupted:Qn(r)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:me}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(_,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(bi,{ref:O,entries:W,renderTurn:Ne,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),Re&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:G,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(Ii,{items:he,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:Ie,onPreviewItem:He,onRevealError:(n)=>vt(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:X,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Oe,{})})]})}
|
|
2
|
+
export{dt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{No}from"./chunk-hqdbv5hw.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Lr({host:o,children:t}){return s(n,{value:o,children:t})}function _(){let o=i(n),e={...No(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Co(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function ie(){let o=_();return(t)=>Co(o,t)}function wo(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
+
export{Lr,_,Co,ie,wo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`),b=!t.streaming&&C.trim().length>0?o(
|
|
3
|
-
export{
|
|
1
|
+
import{u,A}from"./chunk-1647cyqx.js";import{q}from"./chunk-eeqppv9j.js";import{Ui}from"./chunk-06yzz0yx.js";import{le}from"./chunk-7cj104ba.js";import{Gi,mt}from"./chunk-19yjze8m.js";import{Bi}from"./chunk-8c7x6vrs.js";import{Wn}from"./chunk-24dqkjvg.js";import{cn as M}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,w=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=w++;return v.set(t,s),`${t.type}:${s}`}function P({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(A,{text:t.text,streaming:n}),s]})}function I({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(P,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(A,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(le,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var E=new Set;function qa({message:t,isMostRecentTurn:n,hiddenTools:s=E,time:i,beforeCopy:r,afterCopy:c,providerIcon:p,renderText:T,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),b=!t.streaming&&C.trim().length>0?o(Un,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:c,time:i}):null,d=Ui(t.content,"compact"),x=d.reduce((e,a,l)=>a.kind==="codexActivityGroup"?l:e,-1),h=d.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),B=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&q(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((l)=>l.type!=="tool_use"||!s.has(l.name));return a.length===0?null:o(mt,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(I,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===B?b:void 0,renderText:T},R(e.block))},m=x===-1?0:h===-1?d.length:h;return o(On,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:p,work:d.slice(0,m).map(k),answer:d.length>m?d.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(Bi,{blocks:f}):y(f))})}function Un({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let c=u(),{t:p}=c;return g("div",{className:M("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Wn,{text:t,label:p("actions.copy"),host:c}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=u();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function On({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...c}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(Gi,{...c,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
+
export{qa,Un,On};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var Ao={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},Eo={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function D({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=Ao[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",Eo.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{Ao,Eo,D};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{v,mr}from"./chunk-zfjpfj30.js";import{isResourceLink as g,isText as h}from"@nyssance/codex-acp-v2/client";import{useRef as R}from"react";function Yo(o,m,x,y=!1){let i=R(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!==o.id||e.value!==n.value))i.current=null,e=null;let s=t.key==="ArrowUp";if(s?n.value.slice(0,n.selectionStart).includes(`
|
|
2
|
+
`):n.value.slice(n.selectionEnd).includes(`
|
|
3
|
+
`))return;if(!e){if(!s||n.value!==""||y)return;let u=o.items.flatMap((a)=>{if(a.kind!=="user")return[];let f=a.content.filter(h).map((l)=>l.text).join(`
|
|
4
|
+
`),p=a.content.filter(g).flatMap((l)=>{let d=v(l.uri);return d===null?[]:[{id:d,name:l.name}]});return f.trim()||p.length?[{text:mr(f,p),apps:p}]:[]});if(!u.length)return;e={sessionId:o.id,entries:u,index:u.length,value:""},i.current=e}t.preventDefault(),e.index=Math.max(0,Math.min(e.entries.length,e.index+(s?-1:1)));let c=e.entries[e.index],r=c?.text??"";if(x?.(c?.apps??[]),e.value=r,m(r),n.value=r,n.setSelectionRange(r.length,r.length),e.index===e.entries.length)i.current=null}}
|
|
5
|
+
export{Yo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ot}from"./chunk-vxexg361.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function Fr({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(Ot,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
|
|
2
|
+
export{Fr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{o}from"./chunk-844s61q1.js";import{e}from"./chunk-rvjfb004.js";import{h,Z}from"./chunk-7qmj50a2.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let n=Math.min(100,a/t*100),p=n>=90?"text-destructive":n>=70?"text-foreground":"text-muted-foreground";return{pct:n,className:p}}function G(a){let t=h(a.configOptions,"model");return t===void 0?void 0:Z(t)}function Oe(a,t){let n=a.windowDurationMins;if(n===null)return t("usage.usage");if(n%1440===0)return t("usage.windowDays",{count:n/1440});return t("usage.windowHours",{count:Math.round(n/60)})}function P(a){let{client:t}=e(),n=o((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!n){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[n,t]),n?p:null}function _({session:a}){let{t}=e().host,n=h(a.configOptions,"model"),p=n!==void 0&&(L(n.options)?n.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===n.currentValue)):!n.currentValue.startsWith("gateway:")&&n.options.some((i)=>i.value===n.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,x=7,b=2*Math.PI*x,N=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||N+k+g+w,R=N+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(N)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],v=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[v!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:v,children:v})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:Oe(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var Yt=W(_);
|
|
2
|
+
export{Oe,Yt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c}from"./chunk-8pdapsc7.js";import{s,n}from"./chunk-hqdbv5hw.js";import{P,g,p,J}from"./chunk-bv175dn9.js";import{_,ie,wo}from"./chunk-s267ztm1.js";import{Qe}from"./chunk-rhxyb55x.js";import{R,Y}from"./chunk-kgjdh49d.js";import{ve,oe}from"./chunk-1tb3d2x4.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as W,useSensors as Se}from"@dnd-kit/core";import{SortableContext as X,sortableKeyboardCoordinates as De,useSortable as ae,verticalListSortingStrategy as Z}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as G}from"cn";import{BrushCleaningIcon as we,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as de,StarIcon as be,Trash2Icon as me}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as k}from"react";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ee,DialogContent as te,DialogDescription as ne,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:y,children:b}){let{attributes:v,listeners:N,setNodeRef:i,transform:u,transition:f,isDragging:x}=ae({id:JSON.stringify([l,y]),data:{type:"session",collectionId:l,sessionId:y}});return e("div",{ref:i,style:{transform:ce.Transform.toString(u),transition:f},className:G("w-full min-w-0",x&&"opacity-50"),...v,...N,role:"group",children:b})}function Be({collection:l,children:y,onEdit:b,onConfirm:v,onNewChat:N}){let{t:i}=_(),u=oe(),f=ie(),{attributes:x,listeners:m,setNodeRef:I,transform:L,transition:T,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===R,droppable:!1},data:{type:"collection"}});return e("div",{ref:I,style:{transform:ce.Transform.toString(L),transition:T},className:G("w-full min-w-0",z&&"opacity-50"),children:e(J,{open:!l.collapsed,onOpenChange:(d)=>f(u({type:"collapse",id:l.id,collapsed:!d})),label:Y(l,i),count:l.sessionIds.length,leading:l.id===R?e(be,{className:"size-3.5"}):e(Qe,{emoji:l.emoji,onChange:(d)=>f(u({type:"emoji",id:l.id,emoji:d}))}),wrapHeader:(d)=>e("div",{...x,...m,role:"group",children:d}),actions:a(Ee,{children:[e(Re,{onClick:(d)=>d.stopPropagation(),onPointerDown:(d)=>d.stopPropagation(),render:e(w,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:Y(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:a(Le,{children:[l.id!==R&&a(H,{onClick:b,children:[e(he,{}),i("collection.rename")]}),a(H,{onClick:N,children:[e(de,{}),i("collection.newChat")]}),a(H,{onClick:()=>v("clear"),children:[e(we,{}),i("collection.clearCollection")]}),l.id!==R&&a(H,{variant:"destructive",onClick:()=>v("delete"),children:[e(me,{}),i("collection.deleteCollection")]})]})})]}),children:y})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Tr({renderRow:l,onSelect:y,onNewChat:b,Scroll:v=He}){let N=_(),{t:i}=N,u=oe(),f=ie(),x=s(),{collections:m,order:I}=ve(),L=n((o)=>o.sessionList),T=n((o)=>o.archivedSessions),z=n((o)=>o.sessionListLoaded),d=n((o)=>o.sessionListError),F=Me(()=>new Map([...T,...L].map((o)=>[o.sessionId,o])),[T,L]),U=N.isMac??wo(),[S,M]=k(null),[E,K]=k(""),[q,O]=k(""),[D,B]=k(null),[C,A]=k(!1),pe=Se(W(ye,{activationConstraint:{distance:5}}),W(Ce,{coordinateGetter:De})),j=I.flatMap((o)=>m[o].collapsed?[]:m[o].sessionIds.flatMap((t)=>{let r=F.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(U?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;t.preventDefault(),y(j[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[j,U,y]);let ue=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,h=t.data.current;if(r?.type==="session"&&h!==void 0){let V=h.type==="session"?String(h.collectionId):String(t.id);f(u({type:"move",sourceCollectionId:String(r.collectionId),collectionId:V,sessionId:String(r.sessionId),index:h.type==="session"?m[V].sessionIds.indexOf(String(h.sessionId)):void 0}))}else if(r?.type==="collection"&&h?.type==="collection"&&String(t.id)!==R)f(u({type:"reorder",id:String(o.id),index:I.indexOf(String(t.id))}))},Q=(o,t)=>{A(!0),f(o.then(t).finally(()=>A(!1)))};return a(ze,{children:[e(v,{children:a(P,{children:[a(p,{className:G(c,"font-normal"),onClick:()=>{M("new"),K(""),O("")},children:[e(g,{children:e(de,{})}),e("span",{children:i("collection.newCollection")})]}),d&&a("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:d}),e(w,{variant:"ghost",onClick:()=>f(x.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:pe,collisionDetection:ge,onDragEnd:ue,children:e(X,{items:I,strategy:Z,children:e(P,{children:I.map((o)=>e(Be,{collection:m[o],onNewChat:()=>b(o),onEdit:()=>{M(o),K(m[o].name),O(m[o].emoji??"")},onConfirm:(t)=>B({id:o,type:t}),children:e(X,{items:m[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:Z,children:m[o].sessionIds.map((t)=>{let r=F.get(t);if(r?.archived)return null;if(!r)return z?a("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(g,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(w,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>f(u({type:"remove",sessionId:t,collectionId:o})),children:e(me,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(ee,{open:S!==null,onOpenChange:(o)=>{if(!o&&!C)M(null)},children:a(te,{children:[a(re,{children:[e(se,{children:i(S==="new"?"collection.newCollection":"collection.rename")}),e(ne,{children:i("collection.collectionName")})]}),a("form",{onSubmit:(o)=>{if(o.preventDefault(),S===null||!E.trim()||C)return;let t=S==="new"?`collection-${crypto.randomUUID()}`:S;Q(u([S==="new"?{type:"create",id:t,name:E}:{type:"rename",id:t,name:E},{type:"emoji",id:t,emoji:q}]),()=>M(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:E,onChange:(o)=>K(o.target.value),disabled:C}),S!=="new"&&e(Qe,{emoji:q,onChange:O}),a(le,{children:[e(w,{type:"button",variant:"outline",disabled:C,onClick:()=>M(null),children:i("collection.cancel")}),e(w,{type:"submit",disabled:C||!E.trim(),children:i("collection.confirm")})]})]})]})}),e(ee,{open:D!==null,onOpenChange:(o)=>{if(!o&&!C)B(null)},children:a(te,{children:[a(re,{children:[e(se,{children:i(D?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ne,{children:i("collection.confirmCollectionChange",{name:D===null?"":Y(m[D.id],i)})})]}),a(le,{children:[e(w,{variant:"outline",disabled:C,onClick:()=>B(null),children:i("collection.cancel")}),e(w,{disabled:C,onClick:()=>{if(D!==null)Q(u({type:D.type,id:D.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{Tr};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{yi,ct}from"./chunk-a953k2dj.js";import{t,te}from"./chunk-844s61q1.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 jt(e){c.setState({request:{path:e.path,patch:Ro(e.patch,e.path)}})}function Ro(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 $t(){let{t:e,theme:a}=t(),n=te(c,(o)=>o.request),s=n===null?null:yi(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(ct,{patch:n.patch,theme:a})})]})})}
|
|
3
|
+
export{jt,Ro,$t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ce}from"./chunk-5y5b3w22.js";import{useEffect as s,useState as w}from"react";function Po(){let[i,e]=w(!1);return s(()=>{let t=Ce()?"Meta":"Control",o=(n)=>{if(n.key===t)e(!0)},r=(n)=>{if(n.key===t)e(!1)},d=()=>e(!1);return window.addEventListener("keydown",o),window.addEventListener("keyup",r),window.addEventListener("blur",d),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",r),window.removeEventListener("blur",d)}},[]),i}
|
|
2
|
+
export{Po};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function qo({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
|
|
2
|
+
export{qo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{I}from"./chunk-cdgfr4n0.js";import{a}from"./chunk-hqdbv5hw.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as s}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Gr({children:p}){let{t:n}=a(),[o,l]=s(!1),r=c(null),[u,d]=s();return I(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}l(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:u},children:p})]})}
|
|
2
|
+
export{Gr};
|