@alwith/module-chat 0.6.10 → 0.6.13
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.d.ts +24 -0
- 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/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +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
|
-
import{l,i}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{l,i}from"./chunk-aardrb6e.js";import{x}from"./chunk-btrg3ywt.js";import{L}from"./chunk-2761tcb3.js";import{he}from"./chunk-9he6963p.js";import{z,ge,fe}from"./chunk-h1embxgj.js";import{ExternalLinkIcon as W,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as y}from"react";import{Badge as O}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as T}from"react/jsx-runtime";function Ct({entry:r,onBack:p}){let u=l(),{t}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),v=i((a)=>a.busyIds[r.plugin.id]),H=i((a)=>a.install),V=i((a)=>a.uninstall),j=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,U]=y(null),[R,M]=y(0),[c,I]=y(null);q(()=>{let a=!0;return U(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,R]);let d=o?.summary??r.plugin,m=C?.plugin??d,s=d.interface,b=s?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",E=s?.longDescription??o?.description??s?.shortDescription,A=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(fe,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:b})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(L,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:b})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?n(T,{children:[e(X,{checked:m.enabled,disabled:!!v||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void j(m,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void V(m),children:v?e(S,{}):t("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(k?"plugins.detail.unavailable":"plugins.detail.install"),title:t(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||k,onClick:()=>void H({...r,plugin:d}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(x,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${z} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(O,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(N,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(N,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(N,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(N,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(N,{label:t("plugins.detail.website"),children:e(w,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!D&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),t("plugins.detail.loading")]}),D&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>M((a)=>a+1),children:t("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:b,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(h,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(O,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(h,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(L,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(h,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>I(a),children:[e(L,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(h,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(h,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(w,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(w,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(F,{open:c!==null,onOpenChange:(a)=>{if(!a)I(null)},children:e(G,{className:ge,children:c&&n(T,{children:[e("div",{className:"shrink-0 pr-8",children:e(L,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(he,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function N({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function h({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(W,{className:"size-3.5"})]})}
|
|
2
|
+
export{Ct};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{xn}from"./chunk-8t1brzbh.js";import{Fo}from"./chunk-j7w4jr8y.js";import{te}from"./chunk-844s61q1.js";import{je,ur}from"./chunk-cx1sg5dt.js";import{e}from"./chunk-rvjfb004.js";import{useCallback as s}from"react";import"@alwith/module-chat/search.css";import{jsx as m}from"react/jsx-runtime";var h="alwith-chat:find";function ta(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function qt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=te(je,(r)=>r),w=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),y=s((r)=>u.sessionId===t?xn(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>ur(t,r,i),[t]),b=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,g=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return m("div",{className:"absolute inset-x-0 top-0 z-30",children:m(Fo,{placement:"body",getViewport:w,findSourceMatches:y,revealTurn:S,prepareSource:b,subscribeOpen:g,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
|
|
2
|
+
export{ta,qt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{gr}from"./chunk-1647cyqx.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function Me({host:e,client:n,children:i}){return r(gr,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function Ae(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function te(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=Ae();return te(n.store,e)}function vt(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
|
|
2
|
+
export{Me,t,Ae,te,o,vt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s,n}from"./chunk-hqdbv5hw.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function Ur(c){let e=s(),o=n((t)=>t.projectContext),u=c===null?m:o?a(o,{cwd:e.projectPath(c)}).id:null,d=n((t)=>t.sessionList),l=n((t)=>t.connection),i=n((t)=>t.sessionListLoaded),r=n((t)=>t.sessionListError),f=()=>e.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&r===null)e.listSessions().catch(()=>{return})},[e,l,i,r]),{result:L(()=>{if(i&&o)return{status:"ready",sessionRows:d.filter((t)=>a(o,{...t,cwd:e.projectPath(t.cwd)}).id===u).toSorted((t,p)=>(p.updatedAt??"").localeCompare(t.updatedAt??""))};if(r!==null)return{status:"failed",error:r};return{status:"loading"}},[e,d,i,r,u,o]),retry:f}}
|
|
2
|
+
export{Ur};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A}from"./chunk-1647cyqx.js";import{le}from"./chunk-7cj104ba.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function Ki({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(A,{text:t.content,streaming:!1})});if(!n(t))return null;return e(le,{entries:t.entries})}
|
|
2
|
+
export{Ki};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A}from"./chunk-1647cyqx.js";import{t}from"./chunk-844s61q1.js";import{ee}from"./chunk-2s5598rk.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(A,{text:e.text,streaming:o})})}if(i.isImage(e))return n(ee,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(ee,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ne({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{Ne};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{u}from"./chunk-1647cyqx.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function Pa(e){let a=new Map;for(let l of e)for(let r of l.content){if(r.type!=="diff")continue;let d=r,f=d._meta?.alwith?.hunks??[],c=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=c,i.deletions+=h;else a.set(n.path,{path:n.path,additions:c,deletions:h})}}return[...a.values()]}function Bi({blocks:e}){return s(Bn,{files:Pa(e)})}function Bn({files:e,onOpen:a,renderPath:l,actions:r}){let{t:d,openLink:f}=u(),[c,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":c,children:d(c?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),r,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),c&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:l===void 0?t.path:l(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{Pa,Bi,Bn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function Mn({name:p,value:M,levels:h,disabled:c,onChange:P,trackWidth:f=100}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
+
export{Mn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var _e="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",c="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
|
|
2
|
+
export{_e,c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Uo}from"./chunk-0aqnqk7b.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function xn(t,r,e={}){let o=r.trim();if(o.length===0)return[];return Uo(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
|
|
2
|
+
export{xn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function Lo(e=d){if(e.env.CLAUDE_CODE_SIMPLE&&["1","true","yes","on"].includes(e.env.CLAUDE_CODE_SIMPLE.toLowerCase()))throw Error("Claude OAuth is disabled by CLAUDE_CODE_SIMPLE");if(e.env.CLAUDE_CODE_CUSTOM_OAUTH_URL||e.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Custom Claude OAuth endpoints and descriptor credentials are not supported by the local-login reader");let r=e.env.CLAUDE_CODE_OAUTH_TOKEN;if(r!==void 0){if(!r.trim())throw Error("CLAUDE_CODE_OAUTH_TOKEN is empty");return{accessToken:r,expiresAt:null,scopes:["user:inference"],source:"environment"}}let t=e.env.CLAUDE_CONFIG_DIR;if(t==="")throw Error("CLAUDE_CONFIG_DIR is empty");let i=(t??u(e.home,".claude")).normalize("NFC");if(e.platform==="darwin"){let s=t===void 0?"":`-${new Bun.CryptoHasher("sha256").update(i).digest("hex").slice(0,8)}`,o=await e.keychain(`Claude Code-credentials${s}`,e.username());if(o!==null)return c(o,"keychain")}else if(e.platform!=="win32")throw Error(`Unsupported Claude login platform: ${e.platform}`);let n=await e.file(u(i,".credentials.json"));return n===null?null:c(n,"file")}async function Xr(e=d,r=Date.now()){let t=await Lo(e);if(!t)throw Error("No existing Claude subscription login; sign in through Claude Code or ALwith Desktop");if(t.expiresAt!==null&&t.expiresAt<=r+60000)throw Error("The existing Claude access token is expired or expiring; refresh it in the owning Claude Code or ALwith CLI before retrying");return t.accessToken}
|
|
2
|
+
export{Lo,Xr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(
|
|
3
|
-
export{
|
|
1
|
+
import{fi}from"./chunk-rq7t6qry.js";import{vi}from"./chunk-ehhzhjyb.js";import{gi}from"./chunk-j71h60r0.js";import{ct}from"./chunk-a953k2dj.js";import{o}from"./chunk-844s61q1.js";import{e}from"./chunk-rvjfb004.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ge(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
|
|
2
|
+
`)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(ct,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(fi,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function lt({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(vi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function Te({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(Ge(t))return a(lt,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(gi,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
+
export{Ge,lt,Te};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ut}from"./chunk-x2ayy0ys.js";import{l,Re}from"./chunk-aardrb6e.js";import{x}from"./chunk-btrg3ywt.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as c}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as a,Fragment as F}from"react/jsx-runtime";function oo(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let i=n.replaceAll("\\","/"),t=i.lastIndexOf("/");return t<=0?"/":i.slice(0,t)}function I(n){let i=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(i.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${i.replace(/\/$/,"")}/${t.join("/")}`}function he({path:n,renderHeader:i,description:t}){let e=l(),{t:r}=e,d=e.readFile,[u,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{let s=!1;return f(null),w(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!s)f(m)},(m)=>{if(!s)w(String(m))}),()=>{s=!0}},[n,t,M,d]);let k=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:a(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":r("plugins.card.moreActions")}),children:o(y,{})}),a(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Re(e,e.openPath(n)),children:r("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Re(e,e.revealPath(n)),children:r("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:u===null,onClick:()=>{if(u!==null)Re(e,e.copyText(u))},children:r("plugins.skills.document.copy")})]})]});return a(F,{children:[i?i(k):o("div",{className:"flex justify-end",children:k}),o(x,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":r("plugins.skills.document.content")},children:v?a("div",{role:"alert",className:"space-y-3",children:[a("p",{className:"text-destructive text-sm break-words",children:[r("plugins.skills.document.error"),": ",v]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((s)=>s+1),children:r("plugins.loadError.retry")})]}):u===null?a("div",{role:"status","aria-label":r("plugins.skills.loading"),className:"space-y-3",children:[o(c,{className:"h-6 w-1/3"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-2/3"})]}):o(ut,{text:oo(u),host:{theme:e.theme,copyLabel:r("plugins.copy"),openLink:(s)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(s)||n===null?s:I(`${C(n)}/${s}`))}})})]})}
|
|
2
|
+
export{oo,he};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r=new Map,i=new Map,m=new Map;function pi(e,t){if(i.has(e))throw Error("An attachment writer is already registered for this session");return i.set(e,t),()=>{if(i.get(e)===t)i.delete(e)}}function K(e,t){let o=r.get(e);if(!o)return;let n=t(o.attachments);r.set(e,{...o,attachments:n}),i.get(e)?.(n)}function on(e,t){m.set(e,t),t.finally(()=>{if(m.get(e)===t)m.delete(e)})}async function ia(e){for(;;){let n=r.get(e)?.attachments.flatMap((p)=>{let c=m.get(p.id);return c?[c]:[]})??[];if(!n.length)break;await Promise.all(n)}let t=r.get(e);if(!t)return null;let o=await Promise.all(t.attachments.map(async(n)=>{if(!n.url.startsWith("blob:"))return n;let p=await fetch(n.url);if(!p.ok)throw Error("Cannot read draft image");let c=await p.blob(),f=await new Promise((l,g)=>{let a=new FileReader;a.onload=()=>l(a.result),a.onerror=()=>g(a.error),a.readAsDataURL(c)});return{...n,url:f}}));return{...t,...t.apps?{apps:t.apps.map((n)=>({...n}))}:{},text:t.text,mentions:[...t.mentions],attachments:o,modelId:t.modelId}}function ra(e,t){if(t===null)r.delete(e);else r.set(e,t)}var s=new Map;function rn(e,t){if(s.has(e))throw Error("A composer is already registered for this session");return s.set(e,t),()=>{if(s.get(e)===t)s.delete(e)}}function aa(e,t){if(typeof t!=="string"||!t.trim())throw Error("The draft is empty");let o=s.get(e);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(e);if(n&&(n.text.length||n.attachments.length||n.mentions.length||n.apps?.length))throw Error("The composer already has a draft; send or clear it first");o(t),r.set(e,{text:t,attachments:[],mentions:[],modelId:n?.modelId??null})}
|
|
2
|
+
export{r,pi,K,on,ia,ra,rn,aa};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function
|
|
2
|
-
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function
|
|
3
|
-
export{
|
|
1
|
+
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function yi(e){let t=0,i=0;for(let o of e.split(`
|
|
2
|
+
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function ct({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
|
|
3
|
+
export{yi,ct};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{kt}from"./chunk-fnvjemhq.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Ee(e){let t=r.get(e);if(!t)t=kt(e),r.set(e,t);return t}function hr({host:e,client:t,children:n}){let s=Ee(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function Le(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Ke(e){let t=Le();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ee(Le());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Re(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
+
export{Ee,hr,l,Le,Ke,i,Re};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function M(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function Yn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function ar(e){return{selected:e.options?.length?0:null,text:""}}function dn(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function sr(e){return`<send_user_message_question_reply>
|
|
2
2
|
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function
|
|
4
|
-
export{
|
|
3
|
+
</send_user_message_question_reply>`}function Xn(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function lr({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:C,t:u}){let g=v(),h=b(!1),a=b(null);N(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",A=o==="answered"||o==="skipped",f=e.options??[],w=l&&dn(e,n).trim().length>0,Q="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:A?c(S,{children:[i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:u("asyncQuestion.skipped")})]}):c(r.Root,{items:f.length>0?[{name:"answer",choices:[...f.map((s,d)=>({value:String(d)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),w)x()},children:[c(r.Item,{name:"answer",className:"m-0 flex min-w-0 flex-col gap-3 border-0 p-0",children:[i(r.Title,{render:i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),f.length>0&&c(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[f.map((s,d)=>c(r.Choice,{value:String(d),checked:n.selected===d,onChange:()=>l&&y({...n,selected:d}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{className:"whitespace-pre-wrap",children:s})]},d)),c(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&y({...n,selected:null}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{children:u("asyncQuestion.other")})]})]}),i(r.Input,{render:i(R,{rows:1,className:"min-h-0 resize-none"}),onCompositionStart:()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null,h.current=!0},onCompositionEnd:()=>{if(h.current=!1,a.current!==null)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{a.current=null})},onKeyDown:(s)=>{if(s.key==="Enter")s.stopPropagation();if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||h.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&dn(e,{...n,text:s.currentTarget.value}).trim().length>0)x()},"aria-label":u("asyncQuestion.answer"),placeholder:u("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>y({selected:null,text:s.target.value})}),m&&i("p",{role:"alert",className:"text-destructive text-sm",children:m})]}),c("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(k,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(k,{size:"sm",variant:"ghost"}),disabled:!l,onClick:C,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{M,Yn,ar,dn,sr,Xn,lr};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{nt,ot,Qt}from"./chunk-h9rwby5r.js";import{st,f}from"./chunk-6cbj9r2x.js";import{cn as R}from"cn";import{forwardRef as M,useCallback as F,useEffect as T,useImperativeHandle as K,useRef as h}from"react";import{InputGroupTextarea as L}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,Sn=M(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:E,className:I,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...g},k)=>{let n=st(),p=f(),u=h(!1),s=h(!1),a=h(null),i=h(null),o=F(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||i.current!==null)return;i.current=requestAnimationFrame(()=>{i.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([l])=>{if(l&&l.contentRect.width!==t)t=l.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),i.current!==null)cancelAnimationFrame(i.current);i.current=null}},[o]),T(o,[o,n?.textInput.value,g.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
|
+
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:l,value:d}=t,v=`${d.slice(0,r)}
|
|
3
|
+
${d.slice(l)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:l}=nt(t),d=ot(t);if(r.length>0)e.preventDefault(),p.add(r);else if(l&&!d)e.preventDefault()},D=n?{value:u.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:Qt(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)Qt(e.currentTarget);o(),c?.(e)}};return K(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||s.current,getTextarea:()=>a.current}),[]),q(L,{"data-chat-input":!0,ref:a,rows:3,className:R("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",I),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=Qt(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),E?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,u.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...g,...D})});Sn.displayName="PromptInputTextarea";
|
|
4
|
+
export{Sn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function zn(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
|
|
2
|
+
export{zn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Mi(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function
|
|
2
|
-
export{Mi,
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Mi(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function za(){c()}function Ai(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function Ei(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return ua(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function Va(e,n,t,i,o,a){if(a==="none")return;_(o,[ua(e,n,t,i,a)])}function ua(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return ba(t,i);return pa(e,n)}function ba(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function pa(e,n){return y+Ca(e,n)}function ja(e,n){return D(pa(e,n))}function Ca(e,n){if(n<=l)return wa(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function wa(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function $a(){return r.context?.state}function Ka(e){return g(e).ready}
|
|
2
|
+
export{Mi,za,Ai,Ei,Va,ua,ba,pa,ja,Ca,wa,$a,Ka};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ci,ze,Dn,wi,ki,Si}from"./chunk-782x5ryb.js";import{forwardRef as ye,useCallback as K,useEffect as ge,useImperativeHandle as ve,useLayoutEffect as w,useMemo as ne,useRef as s,useState as F}from"react";import{jsx as R,jsxs as re}from"react/jsx-runtime";var pe=12,X=2,V=800,he=new Map;function Re({turnKey:q,heightPx:x,placeholder:W=!1,deferUntilReady:n=!1,observe:b,onReady:L,children:z}){let h=s(null),[H,_]=F(!1),U=K((m)=>{h.current=m,b(q,m)},[b,q]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let T=()=>{L(m),_(!0)};if(m.querySelector("[data-markdown-pending]")===null){T();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),T()});return d.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-markdown-pending"]}),()=>d.disconnect()},[L]),re("div",{style:H?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:U,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":q,"aria-busy":!H||void 0,style:!H&&!W&&n?{visibility:"hidden"}:void 0,"data-turn-ready":H?"":void 0,children:z}),!H&&!W&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:re("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var bi=ye(function({entries:x,renderTurn:W,scrollElement:n,sessionKey:b,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},H){let _=s(null),[U,m]=F(z),T=L!==void 0&&L!==null;w(()=>{let e=_.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[T]);let d=ne(()=>he.get(b),[b]),[j,J]=F(()=>d?.turnHeightsByKey??{}),i=ne(()=>Ci({entries:x,gapPx:pe,measuredHeightsByKey:j,leadingInsetPx:T?U:z}),[x,j,T,U,z]),me=ne(()=>{let e=ze({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:X,viewportHeightPx:V}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return Dn({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,ie]=F(me),[y,oe]=F(V),[c,ue]=F(null),N=s(d?.distanceFromBottomPx??0),k=s(M),ae=s(i.turnKeys),l=s(j),S=s(i),se=s(i),P=s(new Map),v=s(null),C=s(null),E=s(null),D=s(new Map),Q=s(!1),ce=s(()=>{}),O=s(null),de=K(()=>{if(!h||n===null||v.current!==null||O.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=S.current.turnIndexByKey.get(r),B=g===void 0?a.height:S.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)O.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Y=s(de);Y.current=de;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=ze({distanceFromBottomPx:o,layout:i,overscanCount:X,viewportHeightPx:t}),u=k.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(N.current=o,k.current=a,ae.current=i.turnKeys,oe(t),a!==u)ie(a)},[i]),A=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),fe=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Y.current();let r={...l.current,[t]:o};l.current=r,J(r)},[]),Z=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);D.current.set(r,u)}if(E.current!==null||D.current.size===0)return;E.current=requestAnimationFrame(()=>{E.current=null;let t=[...D.current].filter(([r,u])=>l.current[r]!==u);if(D.current.clear(),t.length===0)return;Y.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,J(o)})}),C.current},[]),xe=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)Z().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),Z().observe(t)},[Z]);ge(()=>()=>{if(C.current?.disconnect(),E.current!==null)cancelAnimationFrame(E.current);D.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{ce.current=()=>{if(n===null)return;let e=A(n);if(v.current!==null){N.current=e,oe(n.clientHeight||V);return}p(e,n.clientHeight||V)}},[A,n,p]),w(()=>{if(n===null)return;if(!Q.current){Q.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?S.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>ce.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,J(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=Si({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||V),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ue(null)})},[i,c,n,p]),w(()=>{let e=se.current;if(se.current=i,S.current=i,n===null||c!==null){O.current=null;return}let t=O.current;O.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(A(n),n.clientHeight);return}let r=N.current;if(h&&e!==i&&Q.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=A(n);if(u<=96&&!h){p(u,y);return}let a=ze({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=wi({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,A,n,p,y,h]),w(()=>{k.current=M},[M]),ge(()=>()=>{v.current?.complete(),v.current=null;let e=k.current,o=S.current.turnKeys[e.startIndex];he.set(b,{distanceFromBottomPx:N.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[b]),ve(H,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=ki({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=ze({distanceFromBottomPx:a,layout:i,overscanCount:X,viewportHeightPx:y});return k.current=g,ie(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ue(f)})}}),[i,y]);let I=M,G=ae.current;if(!(G===i.turnKeys||G.length===i.turnKeys.length&&G.every((e,t)=>e===i.turnKeys[t]))){let e=G[M.startIndex];I=(e===void 0?null:Dn({anchorKey:e,layout:i,previousRange:M}))??ze({distanceFromBottomPx:N.current,layout:i,overscanCount:X,viewportHeightPx:y})}let ee=x.length-1,le=x[ee],te=x.slice(I.startIndex,Math.min(I.endIndex,ee)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(le!==void 0)te.push({entry:le,index:ee});return re("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":te.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[T&&R("div",{ref:_,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),te.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(Re,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:xe,onReady:fe,children:W(e,t)})},e.turnKey))]})});
|
|
2
|
+
export{bi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Qo}from"./chunk-r9ny4bqk.js";import{e,y}from"./chunk-rvjfb004.js";import{W,h}from"./chunk-7qmj50a2.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":w,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=e(),{t:r}=l,s=h(m,"mode");if(!s)return null;let o=s.currentValue,p=W(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),M=p.find((n)=>n.value===o),I=d[o]??a,C=(n)=>{if(n===o)return;y(l,c?c(s.configId,n):f.setConfig(u,s.configId,n))};return t(Qo,{value:o,warning:o==="agent-full-access",currentName:M?.name??o,icon:t(I,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:g,label:r("composer.switchPermissionMode"),onValueChange:C,options:p.map((n)=>{let i=d[n.value]??a,v=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":v?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Jt=O(N);
|
|
2
|
+
export{Jt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function x({nativeScroll:f=!1,className:t,viewportClassName:n,viewportRef:i,onScroll:s,viewportProps:a,children:c,...m}){let[p,l]=v(!1);if(f)return e("div",{className:o("relative flex min-h-0 flex-1",t),...m,children:e("div",{ref:i,onScroll:s,...a,className:o("min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",n,a?.className),children:c})});return u(r.Root,{"data-slot":"scroll-area",className:o("relative min-h-0 flex-1 pe-[var(--app-scrollbar-track-size)]",t),...m,children:[e(r.Viewport,{ref:i,onScroll:s,"data-slot":"scroll-area-viewport",...a,className:o("size-full rounded-[inherit] pe-2 outline-none",n,a?.className),children:c}),e(r.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":"vertical",orientation:"vertical","data-dragging":p?"":void 0,onPointerDownCapture:(d)=>{if(d.button===0)l(!0)},onPointerUpCapture:()=>l(!1),onPointerCancelCapture:()=>l(!1),onLostPointerCapture:()=>l(!1),className:"flex h-full w-[var(--app-scrollbar-track-size)] touch-none px-[var(--app-scrollbar-edge-gap)] select-none",children:e(r.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}),e(r.Corner,{})]})}
|
|
2
|
+
export{x};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_e,c}from"./chunk-8pdapsc7.js";import{E}from"./chunk-nktaekpq.js";import{D}from"./chunk-sjes4cxr.js";import{I}from"./chunk-cdgfr4n0.js";import{Xe,Ue,Je}from"./chunk-rvbbb9rf.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as u}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as M,useState as O}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as K}from"react/jsx-runtime";function P(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:u("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:u("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function g({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:u("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function p({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:u("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function J({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:m,wrapHeader:f,onHeaderClick:b,children:y}){let R=()=>{b?.(),t(!o)},x=u(Xe,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),S=d(K,{children:[r!=null&&e(g,{children:r}),m??e(E,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Je,{content:s!==void 0?e(Ue,{className:u("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),k=m==null?d("div",{"data-active":l?"":void 0,title:n,className:u(x,c),onClick:R,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),R()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?k:f(k),o&&e(P,{className:"mt-0.5",children:y})]})}var _=T(()=>{}),G=T(()=>{});function zt(){return L(G)}function ke(){return L(_)}function Se({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:m,listeningPorts:f,onOpenPort:b,accessory:y,meta:R,hint:x,actions:S,className:k,...v}){let H=d("div",{"data-slot":"navigation-session-item","data-active":o,className:u(Xe,_e,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(m||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...v,children:[e(g,{children:t!=null?e(D,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(E,{className:u("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(E,{className:"text-muted-foreground text-xs",children:C}),m&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:m}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(Je,{content:y!=null?e(Ue,{children:y}):R??e(Ue,{}),actions:S}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return H;return e(q,{row:H,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=O(!1),[s,a]=O(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(_.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return I(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
+
export{P,g,p,J,zt,ke,Se};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function Nn(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function Ko(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=Nn(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{Nn,Ko};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as o,useContext as n,useEffect as r}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{createContext as o,useContext as n,useEffect as r}from"react";var Mo=o(null);function I(t){let e=n(Mo);r(()=>{if(t&&e!==null)return e()},[t,e])}
|
|
2
|
+
export{Mo,I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useId as c}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{useId as c}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function vo(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Claude"}),l("path",{fill:"#D97757",fillRule:"nonzero",d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]})}function Rt(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"DeepSeek"}),l("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]})}function Ft(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Grok"}),l("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]})}function Dt(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"OpenRouter"}),l("path",{d:"M2 7h3.5c1.6 0 2.6.5 3.6 1.7l3 3.6c1 1.2 2 1.7 3.6 1.7H20"}),l("path",{d:"M2 17h3.5c1.6 0 2.6-.5 3.6-1.7l3-3.6c1-1.2 2-1.7 3.6-1.7H20"}),l("path",{d:"M17.5 4.5L21 7l-3.5 2.5M17.5 14.5L21 17l-3.5 2.5"})]})}var r="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z";function Ht(e){let o=c().replaceAll(":","");return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Qwen"}),l("path",{d:r,fill:`url(#${o})`,fillRule:"nonzero"}),l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[l("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),l("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})}
|
|
2
|
+
export{vo,Rt,Ft,Dt,Ht};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{H}from"./chunk-2wex96dp.js";import{t}from"./chunk-844s61q1.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Wo({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(H,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
|
|
2
|
+
export{Wo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as r}from"@alwith/api/client";var
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as r}from"@alwith/api/client";var je=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function cr(e){je.setState({...e,terminals:e.terminals??{}})}function dr(e){if(je.getState().sessionId===e)je.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function ur(e,n,t){let i=je.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
|
|
2
|
+
export{je,cr,dr,ur};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=new Map;var a=0;function
|
|
2
|
-
export{
|
|
1
|
+
var t=new Map;var a=0;function Hn(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Hn(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Ri(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
+
export{Hn,Ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-844s61q1.js";import{useLayoutEffect as b,useRef as g,useState as h}from"react";import{jsx as x}from"react/jsx-runtime";var d=[[0,3],[0.1,25],[0.55,58],[0.85,88],[1,90]];function Ta(a,u){let e=Math.max(0,(u-a)/45000);for(let n=1;n<d.length;n+=1){let[c,r]=d[n-1],[s,l]=d[n];if(e<=s){let o=(e-c)/(s-c);return Math.floor(r+o*(l-r))}}return Math.min(99,Math.floor(90+10*(1-Math.exp(-1.5*(e-1)))))}function ji({startedAt:a}){let{t:u}=t(),e=g(null),[n,c]=h(3);b(()=>{let s=e.current.ownerDocument,l=!1,o,m=()=>{clearInterval(o),o=void 0},f=()=>{let i=Ta(a,Date.now());if(c(i),i===99)m();return i},p=()=>{if(m(),l&&!s.hidden&&f()<99)o=setInterval(f,500)};f();let v=new IntersectionObserver(([i])=>{l=i.isIntersecting,p()});return v.observe(e.current),s.addEventListener("visibilitychange",p),()=>{v.disconnect(),s.removeEventListener("visibilitychange",p),m()}},[a]);let r=u("timeline.imageProgressPercent",{percent:n});return x("span",{ref:e,role:"status",title:r,"aria-label":r,className:"text-xs tabular-nums",children:r})}
|
|
2
|
+
export{Ta,ji};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var Wa=["full","compact","codexUI"];function Vi(t){return t==="compact"||t==="codexUI"}var Ia=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function q(t){let o=Ia.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function Za(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{Wa,Vi,Ia,q,Za};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{pr}from"./chunk-zfjpfj30.js";import{Pe}from"./chunk-5q0kb3yb.js";import{ui,f}from"./chunk-6cbj9r2x.js";import{ni,oi,ii,ri,ai,H}from"./chunk-2wex96dp.js";import{t,o}from"./chunk-844s61q1.js";import{e}from"./chunk-rvjfb004.js";import{Xo}from"./chunk-0r4b11t4.js";import{d,T,it}from"./chunk-z9ch23p0.js";import{Cn}from"./chunk-j5trhvx8.js";import{Go}from"./chunk-1axvr26t.js";import{Oo,Bo}from"./chunk-pr5wv14q.js";import{Sn}from"./chunk-akk3k2sc.js";import{Rn}from"./chunk-fkmka3v9.js";import{r,pi,K,rn}from"./chunk-9n2wwk4g.js";import{Xt}from"./chunk-n13y99dj.js";import{Be,nn}from"./chunk-hhdeh622.js";import{an,ln}from"./chunk-26bm75r2.js";import{mi}from"./chunk-f2wy8jza.js";import{tn}from"./chunk-vxn8gfy4.js";import{Zo}from"./chunk-vkbaa74h.js";import{Jt}from"./chunk-bqdnxftw.js";import{en}from"./chunk-q2z9w661.js";import{Yo}from"./chunk-snee6rb9.js";import{Wo}from"./chunk-crg1ttkp.js";import{ti}from"./chunk-y8sc8n3j.js";import{Yt}from"./chunk-sygx6n0s.js";import{hasFuzzyFileSearch as jt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Gt}from"lucide-react";import{useCallback as _,useEffect as Ct,useLayoutEffect as et,useMemo as pt,useRef as L,useState as D}from"react";import{jsx as p,jsxs as E,Fragment as Qt}from"react/jsx-runtime";var Vt=["image/png","image/jpeg","image/webp","image/gif"],st=[];async function $t(n){let A=await(await fetch(n.url)).blob();return new Promise((P,U)=>{let N=new FileReader;N.onerror=()=>U(N.error),N.onload=()=>{let G=N.result;P(G.slice(G.indexOf(",")+1))},N.readAsDataURL(A)})}function qt(n){let{t:A}=t(),P=f();return p(H,{"aria-label":A("composer.attachImage"),title:A("composer.attachImage"),onClick:()=>P.openFileDialog(),...n,children:p(Gt,{className:"size-4"})})}function Wt({session:n,onSubmit:A,onShellCommand:P,onHandOff:U,modelSelector:N,modelMenu:G,inputHeader:mt,actions:Mt,leadingTools:Et,agentControls:rt=!0,placeholder:Rt,children:Dt,attachmentPolicy:Nt,predictions:St=!0,disabled:kt=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:z,client:M}=e(),{t:x}=z,S=_((i)=>{if(z.reportError)z.reportError(i);else console.error(i)},[z]),[ut,W]=D(()=>({text:r.get(n.id)?.text??"",revision:0})),{text:v}=ut,[R,Ot]=D(()=>r.get(n.id)?.attachments??st),[I,Y]=D(()=>r.get(n.id)?.mentions??[]),[u,k]=D(()=>r.get(n.id)?.apps??[]);Ct(()=>{if(!M.installedApps||!r.get(n.id)?.apps?.length)return;let i=!0;return M.installedApps().then(({apps:a})=>{if(!i)return;let l=new Map(a.map((g)=>[g.id,g]));k((g)=>g.map((s)=>{let y=l.get(s.id);return y?{...s,iconUrl:y.iconUrl,iconUrlDark:y.iconUrlDark}:s}))},S),()=>{i=!1}},[M,n.id,S]);let[ft,nt]=D(()=>(r.get(n.id)?.apps?.length??0)>0),V=L(void 0),X=L(void 0);et(()=>{if(u.length>0)nt(!0)},[u.length]);let ot=R.some((i)=>Be(i)&&i.pastedText.status!=="ready"),[F,gt]=D(!1),[q,Ut]=D(!1),[at,ht]=D(!1),h=L(null),xt=L(null),c=L(ut),O=_((i)=>{xt.current?.(),c.current={text:i,revision:c.current.revision+1},W(c.current)},[]),Bt=Yo(n,O,k,u.length>0||I.length>0||R.length>0),bt=pt(()=>({read:()=>{let a=h.current?.getTextarea(),l=a===null||a===void 0?[c.current.text.length,c.current.text.length]:[a.selectionStart,a.selectionEnd];return{target:n.id,...c.current,selection:l}},compareAndSet(a,l,g){if(h.current?.isComposing())return null;if(a.target!==n.id||a.revision!==c.current.revision)return null;c.current={text:l,revision:c.current.revision+1},W(c.current);let s=h.current?.getTextarea();if(s!==null&&s!==void 0)s.value=l,s.setSelectionRange(g[0],g[1]);return{target:n.id,...c.current,selection:g}}}),[n.id]),j=L(null),yt=_((i)=>(j.current=i,()=>{if(j.current===i)j.current=null}),[]),J=n.state!=="idle",b=P!==void 0&&u.length===0&&v.startsWith("!"),ct=(ft||u.length>0)&&!b,w=!kt&&!dt&&n.attached&&!n.restoring&&!n.readOnly,B=!n.readOnly&&(Ft||w),Q=en(n,w&&!F&&!q&&!ot&&!at,v.length>0||R.length>0||I.length>0||u.length>0,St&&!b),Pt=Q.invalidate;et(()=>{r.set(n.id,{text:v,attachments:R,mentions:I,...u.length>0?{apps:u}:{},modelId:r.get(n.id)?.modelId??null})},[n.id,v,R,I,u]),et(()=>pi(n.id,Ot),[n.id]),et(()=>rn(n.id,(i)=>{if(!B||F)throw Error("The composer cannot take text now; try again later");if(v.length||R.length||I.length||u.length)throw Error("The composer already has a draft; send or clear it first");O(i)}),[n.id,B,F,v,R,I,u,O]);let vt=o((i)=>jt(i.agent)),_t=pt(()=>vt&&w?async(i)=>Xt((await M.fuzzyFileSearch({query:i,roots:[n.cwd],cancellationToken:null})).files):void 0,[M,vt,w,n.cwd]),lt=_((i)=>{Y((a)=>a.includes(i)?a:[...a,i])},[]);Ct(()=>{h.current?.focus()},[]);let It=_(async({text:i,files:a})=>{let l=P!==void 0&&u.length===0&&i.startsWith("!")?i.slice(1):null;if(l!==null){if(l.trim().length===0)return;if(a.length||I.length||u.length)throw Error("Shell commands cannot include file references or attachments");if(n.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let g=i.trim();if(g.length===0&&a.length===0&&I.length===0&&u.length===0)return;let s=j.current;gt(!0);let y=r.get(n.id),Kt=c.current.revision,Z=null;try{let C=u.map((m)=>({type:"resource_link",name:m.name,uri:`app://${m.id}`}));for(let m of I){let tt={kind:"file",absPath:m};C.push({type:"resource_link",uri:an(tt),name:ln(tt)})}let Tt=pr(g,u);if(Tt.length>0)C.push({type:"text",text:Tt});for(let m of a)if(Be(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");C.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else C.push({type:"image",data:await $t(m),mimeType:m.mediaType});if(c.current.revision===Kt&&r.get(n.id)===y)c.current={text:"",revision:c.current.revision+1},Z=c.current.revision,W(c.current),Y([]),k([]),V.current=void 0,X.current=void 0,K(n.id,()=>st),r.set(n.id,{text:"",attachments:st,mentions:[],apps:[],modelId:y?.modelId??null}),h.current?.resetHeight();if(l!==null&&P)await P(l);else if(A)if(s===null)await A(C);else await A(C,(m)=>{if(s.signal.aborted||j.current!==s)return;s.accept(m),U?.(n.id,m)});else if(s===null)await M.prompt(n.id,C);else{let m=await M.prompt(n.id,C);s.accept(m)}Pt();for(let m of y?.attachments??[])if(m.url.startsWith("blob:")&&!r.get(n.id)?.attachments.some((tt)=>tt.id===m.id))URL.revokeObjectURL(m.url)}catch(C){if(y&&Z!==null&&c.current.revision===Z&&r.get(n.id)?.attachments.length===0&&r.get(n.id)?.mentions.length===0&&!r.get(n.id)?.apps?.length)c.current={text:y.text,revision:Z+1},W(c.current),Y(y.mentions),k(y.apps??[]),r.set(n.id,y),K(n.id,()=>y.attachments);throw C}finally{gt(!1),h.current?.focus()}},[M,n.id,n.state,I,u,A,P,U,Pt]),Lt=()=>{M.cancel(n.id).catch(S)},zt=_((i)=>{let a=i.code==="max_total_size"?Object.assign(Error(x("composer.imageTooLargeTitle")),{description:x("composer.imageTooLargeDescription",{mb:Pe})}):Object.assign(Error(x("composer.unsupportedAttachmentTitle")),{description:x("composer.unsupportedAttachmentDescription")});S(a)},[S,x]),Ht=pt(()=>({session:n,ready:w,inputReady:B,sending:F,textareaRef:h,draft:bt,interruptRef:xt,observeReceipts:yt,addMention:lt,setAdding:Ut,shellMode:b,handsFree:!b&&(A===void 0||U!==void 0)}),[n,w,B,F,bt,yt,lt,A,U,b]),wt=z.writeTextAttachment,At={className:"min-h-10 bg-transparent text-sm font-normal",ref:h,rows:2,onKeyDown:Bt,bashMode:P!==void 0,disabled:!B,"aria-label":x("composer.placeholder"),placeholder:b?"! command":Q.text||Rt||(J?x("composer.steerPlaceholder"):x("composer.placeholder")),onPasteCapture:(i)=>{if(!ct&&!b&&!i.currentTarget.disabled&&![...i.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/"))){let a=it(i.clipboardData);if(a?.apps.length){i.preventDefault();let l=i.currentTarget,g=d(a),s=T([...l.value.slice(0,l.selectionStart).split(""),...g,...l.value.slice(l.selectionEnd).split("")]);X.current={text:v,apps:[]},V.current=l.selectionStart+g.length,nt(!0),k(s.apps),O(s.text);return}}if(wt)nn(i,n.id,x("composer.pastedTextFilename"),wt)}};return p(Rn,{value:Ht,children:p("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:E("div",{className:"relative",children:[mt&&p("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:mt}),E(ui,{attachmentPolicy:Nt,value:v,revision:c.current.revision,onValueChange:O,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},W(c.current)},attachments:R,onAttachmentsChange:(i)=>K(n.id,()=>i),children:[rt&&p(Go,{bashMode:P!==void 0,handleRef:h,commands:n.commands,searchFiles:_t,onMention:lt,onSearchError:S,forcedOpen:at,onForcedOpenChange:ht,emptyLabel:x("composer.noCommands"),fileStatusLabels:{loading:x("composer.searchingFiles"),empty:x("composer.noMatchingFiles")}},ct?"inline":"textarea"),E(ni,{"data-shell-mode":b||void 0,bashMode:P!==void 0,globalDrop:!0,multiple:!0,accept:Vt.join(","),onError:zt,onSubmit:It,onSubmitAsync:It,onSubmitError:S,canSubmit:()=>w&&!F&&!q&&!ot&&(!b||!J&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,E(ii,{className:"px-3 pt-3 pb-0 empty:hidden",children:[q&&p("span",{role:"status",className:"text-muted-foreground text-xs",children:x("composer.addingFiles")}),p(mi,{mentions:I,onRemove:(i)=>Y((a)=>a.filter((l)=>l!==i))}),p(Bo,{children:(i)=>Be(i)?p(Zo,{data:i,sessionId:n.id}):p(Oo,{data:i,t:x})})]}),E(oi,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(i)=>{if(!Q.text||h.current?.isComposing()||i.nativeEvent.isComposing||i.nativeEvent.keyCode===229||i.shiftKey||i.ctrlKey||i.altKey||i.metaKey||i.target!==h.current?.getTextarea())return;if(i.key==="Tab")i.preventDefault(),i.stopPropagation(),O(Q.text)},children:[b&&p("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),ct?p(Cn,{...At,applications:u,onApplicationsChange:k,initialCaret:V.current,initialUndo:X.current}):p(Sn,{...At,autoFocus:ft&&b})]}),p(ri,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:E("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[E("div",{className:"flex min-w-0 items-center gap-[5px]",children:[p(qt,{className:"text-foreground",disabled:!B}),Et,rt&&E(Qt,{children:[p(Wo,{textareaRef:h,menuOpen:at,onOpenChange:ht,disabled:!w||n.commands.length===0}),p(Xo,{disabled:!w||b,focusAfterSelect:()=>(h.current?.focus(),h.current?.getTextarea()??null),onSelect:(i)=>{let a=h.current;if(a?.insertApplication){a.insertApplication(i);return}let l=a?.getTextarea()?.selectionStart??v.length;X.current={text:v,apps:[]},V.current=l+1,nt(!0),O(c.current.text),k((g)=>g.some((s)=>s.id===i.id)?g:[...g,{...i,offset:l}])}}),p(Jt,{sessionId:n.id,options:n.configOptions,disabled:!w})]})]}),E(ai,{className:"w-full min-w-0 items-center justify-end gap-1",children:[rt&&p(Yt,{session:n}),N??p(tn,{...G,sessionId:n.id,options:n.configOptions,disabled:!w}),Mt,p(ti,{active:J,sending:F||dt||q,ready:w&&!ot&&(!b||!J&&v.slice(1).trim().length>0),hasMentions:I.length>0||u.length>0,onStop:Lt})]})]})})]})]})]})})})}
|
|
2
|
+
export{Wt};
|