@alwith/module-chat 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/{chunk-8t3hyxk4.js → chunk-0717ykjj.js} +2 -2
- package/dist/{chunk-9yrctk84.js → chunk-0n01x7fz.js} +2 -2
- package/dist/{chunk-4xp0q7vs.js → chunk-0neph1kr.js} +3 -3
- package/dist/{chunk-8fnjpx11.js → chunk-0qy6n5bv.js} +2 -2
- package/dist/{chunk-qcj6f1rq.js → chunk-0t3g2phv.js} +2 -2
- package/dist/{chunk-p0egvanw.js → chunk-152mrdb6.js} +2 -2
- package/dist/{chunk-dbrs7sen.js → chunk-1qm96wyd.js} +2 -2
- package/dist/chunk-1xz7zmz5.js +2 -0
- package/dist/chunk-228cdk3n.js +2 -0
- package/dist/chunk-234jnd72.js +2 -0
- package/dist/chunk-23k0jcxd.js +2 -0
- package/dist/{chunk-bb1y2fy7.js → chunk-2c6ewztm.js} +2 -2
- package/dist/chunk-2gwj90sw.js +2 -0
- package/dist/chunk-2n86qe6v.js +3 -0
- package/dist/chunk-30tynyrt.js +2 -0
- package/dist/{chunk-w0dfvr05.js → chunk-36han2kw.js} +2 -2
- package/dist/{chunk-3stf1tm2.js → chunk-3adsd6wf.js} +2 -2
- package/dist/{chunk-g7v2xgfh.js → chunk-3fxbypd3.js} +2 -2
- package/dist/chunk-3rvvac37.js +2 -0
- package/dist/{chunk-nk266xxm.js → chunk-3wxx62gz.js} +2 -2
- package/dist/{chunk-8wdkc41j.js → chunk-41t41g5h.js} +2 -2
- package/dist/{chunk-zn9xn0pj.js → chunk-4ae0few5.js} +2 -2
- package/dist/chunk-4chswhrw.js +2 -0
- package/dist/{chunk-yjk5a037.js → chunk-505zj2bz.js} +2 -2
- package/dist/chunk-5hp37r8q.js +3 -0
- package/dist/chunk-5k7rhfkh.js +2 -0
- package/dist/chunk-5kv1p9nd.js +2 -0
- package/dist/{chunk-mmm1rq2a.js → chunk-5w96v6hf.js} +2 -2
- package/dist/{chunk-76a04a6j.js → chunk-67vzyv97.js} +2 -2
- package/dist/{chunk-4xjzvwg4.js → chunk-6j09pkr4.js} +2 -2
- package/dist/{chunk-n9fwnebe.js → chunk-6ra6vmy1.js} +2 -2
- package/dist/{chunk-7zcr1wzv.js → chunk-6vtcbh85.js} +2 -2
- package/dist/{chunk-6zcjn8ra.js → chunk-73gtwm77.js} +2 -2
- package/dist/chunk-7pv05p7j.js +2 -0
- package/dist/chunk-7vpy078b.js +2 -0
- package/dist/{chunk-brqgdzhr.js → chunk-7x2hqdxv.js} +2 -2
- package/dist/{chunk-hp9h8njw.js → chunk-82xjggwn.js} +2 -2
- package/dist/{chunk-9ff3htdp.js → chunk-8h8zr2s0.js} +2 -2
- package/dist/{chunk-v3jehrgj.js → chunk-8q6wpmar.js} +2 -2
- package/dist/{chunk-y2g8d94r.js → chunk-8qkhwpmk.js} +2 -2
- package/dist/{chunk-ezhzktjg.js → chunk-9271avsa.js} +2 -2
- package/dist/{chunk-rg5jhh45.js → chunk-97z2dafr.js} +2 -2
- package/dist/chunk-9pcbtreq.js +2 -0
- package/dist/{chunk-1341xyde.js → chunk-a63k8tht.js} +2 -2
- package/dist/chunk-ambjth0x.js +2 -0
- package/dist/{chunk-hp1w7xrp.js → chunk-aq0reck8.js} +2 -2
- package/dist/{chunk-r0v0wxn7.js → chunk-ar81v2x8.js} +2 -2
- package/dist/{chunk-ehcpnhfw.js → chunk-arzgbze4.js} +2 -2
- package/dist/{chunk-cn9g220k.js → chunk-b3jjd5nv.js} +2 -2
- package/dist/{chunk-ce3wg766.js → chunk-bdt3y6w6.js} +2 -2
- package/dist/chunk-bptqs82k.js +2 -0
- package/dist/{chunk-9cqpn67f.js → chunk-btrg3ywt.js} +2 -2
- package/dist/{chunk-bjfcyfp5.js → chunk-btrhrh42.js} +2 -2
- package/dist/{chunk-6m54xxts.js → chunk-by0ecrb5.js} +2 -2
- package/dist/chunk-c3neqj3h.js +2 -0
- package/dist/chunk-c9d65ta8.js +2 -0
- package/dist/{chunk-1b2jsf2v.js → chunk-ccn44b81.js} +2 -2
- package/dist/chunk-cg8ekwka.js +2 -0
- package/dist/{chunk-qznyjv2c.js → chunk-cgbjtg32.js} +2 -2
- package/dist/chunk-cpcfd1a1.js +2 -0
- package/dist/{chunk-ggqv2qpg.js → chunk-cyb27m7n.js} +2 -2
- package/dist/chunk-d499mw7g.js +2 -0
- package/dist/chunk-d7evpw1z.js +2 -0
- package/dist/{chunk-718drhrv.js → chunk-dbc5121m.js} +2 -2
- package/dist/{chunk-m33eg346.js → chunk-drrram2y.js} +2 -2
- package/dist/{chunk-fzfmg9pk.js → chunk-dwbc8r1m.js} +2 -2
- package/dist/{chunk-4jh2wk80.js → chunk-dxgha4a2.js} +2 -2
- package/dist/{chunk-xecs5c6a.js → chunk-e6r2sx79.js} +2 -2
- package/dist/{chunk-abjr18n6.js → chunk-e8t49fma.js} +4 -4
- package/dist/{chunk-t8n1ny7h.js → chunk-egzt0en6.js} +2 -2
- package/dist/{chunk-v0h2wsj4.js → chunk-ek1c345m.js} +2 -2
- package/dist/{chunk-41nq4hjc.js → chunk-ekq4d1bs.js} +2 -2
- package/dist/{chunk-mfnq8nnd.js → chunk-er0nrf55.js} +3 -3
- package/dist/chunk-etpnhtgg.js +4 -0
- package/dist/chunk-ewctpsb4.js +2 -0
- package/dist/{chunk-hfzt777k.js → chunk-ewf8fb64.js} +2 -2
- package/dist/{chunk-aarpb5np.js → chunk-f1ha808d.js} +2 -2
- package/dist/chunk-ff987rah.js +2 -0
- package/dist/{chunk-7nb0qea6.js → chunk-fhkmhxks.js} +3 -3
- package/dist/{chunk-c11c29rv.js → chunk-fnhcyga2.js} +5 -5
- package/dist/{chunk-53k7yvr8.js → chunk-g6k07w9b.js} +2 -2
- package/dist/{chunk-0fmepk2y.js → chunk-g9q3ktfj.js} +3 -3
- package/dist/{chunk-j5engcds.js → chunk-gan9srhm.js} +2 -2
- package/dist/{chunk-zd40j8qb.js → chunk-gfx3hvr5.js} +2 -2
- package/dist/chunk-h1z98eg8.js +2 -0
- package/dist/{chunk-be7ja8gh.js → chunk-h2sk8xmm.js} +3 -3
- package/dist/chunk-h51hfb0t.js +2 -0
- package/dist/{chunk-maa70rv4.js → chunk-hacpxv1k.js} +2 -2
- package/dist/{chunk-wnsk4tw5.js → chunk-hvm4b6n2.js} +2 -2
- package/dist/{chunk-yf39xswe.js → chunk-j2zx58ja.js} +2 -2
- package/dist/{chunk-n6dbc0md.js → chunk-j6svz91p.js} +2 -2
- package/dist/chunk-jfa9vg5s.js +2 -0
- package/dist/{chunk-eryds6y3.js → chunk-jq1mmpqr.js} +2 -2
- package/dist/chunk-jqvp4gfc.js +2 -0
- package/dist/{chunk-ksyb8hyt.js → chunk-js9y1x0n.js} +2 -2
- package/dist/{chunk-yq55kqn1.js → chunk-jsjyrkcq.js} +2 -2
- package/dist/{chunk-31t5ap7s.js → chunk-jtc52w45.js} +3 -3
- package/dist/{chunk-nx701kdw.js → chunk-jxcvqmrk.js} +2 -2
- package/dist/{chunk-h4r8cx37.js → chunk-jyg1gsqg.js} +2 -2
- package/dist/{chunk-6wv99fdt.js → chunk-k1wjbbcq.js} +2 -2
- package/dist/{chunk-5azv8vz6.js → chunk-k4kdxztk.js} +2 -2
- package/dist/{chunk-6pwy0ncf.js → chunk-kf9zjtr3.js} +2 -2
- package/dist/{chunk-9n028hnr.js → chunk-kj1xdw76.js} +2 -2
- package/dist/{chunk-9hskky1n.js → chunk-kxv78gj0.js} +2 -2
- package/dist/{chunk-dj8e2ymr.js → chunk-m2b57yqn.js} +2 -2
- package/dist/{chunk-npsgbfh2.js → chunk-m66tt5vt.js} +2 -2
- package/dist/chunk-me85j3xg.js +2 -0
- package/dist/{chunk-db0g8rr1.js → chunk-mw9586vr.js} +2 -2
- package/dist/{chunk-z4nv1j97.js → chunk-n25773ea.js} +2 -2
- package/dist/{chunk-sqwscqfk.js → chunk-n7y86xxv.js} +2 -2
- package/dist/{chunk-35z0nr4v.js → chunk-n9234ftx.js} +2 -2
- package/dist/{chunk-h3hzsg0s.js → chunk-ngmgp7a4.js} +2 -2
- package/dist/{chunk-c2a0x69n.js → chunk-njq7f390.js} +2 -2
- package/dist/{chunk-d67ypca2.js → chunk-npqa1nz9.js} +2 -2
- package/dist/chunk-nthrcswc.js +2 -0
- package/dist/{chunk-7bcm8mpx.js → chunk-p1z376qx.js} +2 -2
- package/dist/{chunk-9w4fg6bn.js → chunk-p73qyyrt.js} +2 -2
- package/dist/{chunk-6d5c94rn.js → chunk-pvx9s60k.js} +2 -2
- package/dist/{chunk-8hen6y4t.js → chunk-pzsx1s8z.js} +2 -2
- package/dist/{chunk-k20e64v3.js → chunk-qafx5yjp.js} +2 -2
- package/dist/{chunk-v5wqxqrh.js → chunk-qdh9z547.js} +2 -2
- package/dist/{chunk-3aadhvbj.js → chunk-qem8a6w1.js} +2 -2
- package/dist/{chunk-eb12xkn0.js → chunk-qvbaga5z.js} +2 -2
- package/dist/{chunk-vwzkw97t.js → chunk-r03bbt2f.js} +2 -2
- package/dist/chunk-rdx8hc3g.js +2 -0
- package/dist/{chunk-7xe2v72q.js → chunk-rh5zgmh5.js} +2 -2
- package/dist/{chunk-vkc6mwyb.js → chunk-rrb47vhw.js} +2 -2
- package/dist/chunk-rxpytgjq.js +3 -0
- package/dist/chunk-smwn4wrd.js +2 -0
- package/dist/{chunk-601kr76a.js → chunk-spez62xj.js} +3 -3
- package/dist/chunk-t67m7g8q.js +2 -0
- package/dist/{chunk-bydgccyt.js → chunk-t83h0z1y.js} +2 -2
- package/dist/{chunk-18j37y1m.js → chunk-tp3gzh0b.js} +2 -2
- package/dist/{chunk-yr6ar090.js → chunk-tpppzcvp.js} +2 -2
- package/dist/{chunk-3mrdv5yq.js → chunk-v2kz1m1e.js} +2 -2
- package/dist/{chunk-67x8znmk.js → chunk-vsney1vb.js} +2 -2
- package/dist/chunk-w30rf96r.js +2 -0
- package/dist/{chunk-b5ywqwnr.js → chunk-w8d5b5ta.js} +2 -2
- package/dist/{chunk-pp9fngkx.js → chunk-wdfh0xr6.js} +2 -2
- package/dist/{chunk-rch4xpj1.js → chunk-wej76mmp.js} +2 -2
- package/dist/{chunk-yd6ae6py.js → chunk-wg6yp27g.js} +2 -2
- package/dist/{chunk-9k4f13c1.js → chunk-wgph2nb9.js} +2 -2
- package/dist/{chunk-0ag4ewq9.js → chunk-wk0w29fc.js} +2 -2
- package/dist/{chunk-2bbspcb4.js → chunk-wrfxjyt2.js} +2 -2
- package/dist/{chunk-5vh4z4yp.js → chunk-ws07yjfe.js} +2 -2
- package/dist/{chunk-g4frp0r0.js → chunk-wyyazt81.js} +2 -2
- package/dist/{chunk-c4dk6j2h.js → chunk-x0dn6sdq.js} +2 -2
- package/dist/{chunk-07srtfz3.js → chunk-x1gdzj12.js} +2 -2
- package/dist/{chunk-xvzz0xh6.js → chunk-x9eeb7ns.js} +2 -2
- package/dist/{chunk-x4qnkn8f.js → chunk-xjx9aw6t.js} +2 -2
- package/dist/chunk-xq196p3v.js +2 -0
- package/dist/chunk-xqe0qa9f.js +2 -0
- package/dist/{chunk-a45jg9xv.js → chunk-xr3sd5r7.js} +6 -6
- package/dist/chunk-y4ewhx9t.js +2 -0
- package/dist/chunk-ydqnz0pb.js +2 -0
- package/dist/{chunk-gyps0vc5.js → chunk-yms6983x.js} +4 -4
- package/dist/{chunk-9c8cyz7r.js → chunk-yr5y9dp6.js} +2 -2
- package/dist/chunk-yxtr7x25.js +2 -0
- package/dist/chunk-yyzxpnm0.js +2 -0
- package/dist/{chunk-v4cf374m.js → chunk-z0e6twca.js} +2 -2
- package/dist/{chunk-gha517v4.js → chunk-z2v008kc.js} +2 -2
- package/dist/chunk-z3xg96j6.js +3 -0
- package/dist/chunk-z8bbv8qd.js +2 -0
- package/dist/chunk-zd2c750t.js +2 -0
- package/dist/chunk-zz3wm06f.js +1 -0
- 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-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/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-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/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/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-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/types.d.ts +2 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2z1cpz8a.js +0 -2
- package/dist/chunk-57p1s7hy.js +0 -2
- package/dist/chunk-6hxa1n8n.js +0 -2
- package/dist/chunk-6wtrmxev.js +0 -3
- package/dist/chunk-753z0tkd.js +0 -2
- package/dist/chunk-7eq01k20.js +0 -3
- package/dist/chunk-7jx2k96e.js +0 -2
- package/dist/chunk-8hgrrycr.js +0 -2
- package/dist/chunk-9b8y72yf.js +0 -3
- package/dist/chunk-9g7qvbhx.js +0 -2
- package/dist/chunk-9rgrb198.js +0 -3
- package/dist/chunk-az434tgy.js +0 -2
- package/dist/chunk-bk80xpsy.js +0 -2
- package/dist/chunk-bt01an6h.js +0 -2
- package/dist/chunk-cm5rcd9q.js +0 -2
- package/dist/chunk-d1pc0mrb.js +0 -2
- package/dist/chunk-e24d6hfs.js +0 -2
- package/dist/chunk-e4h6f6dh.js +0 -2
- package/dist/chunk-e8jfja20.js +0 -2
- package/dist/chunk-enr3j794.js +0 -2
- package/dist/chunk-g3snk3nb.js +0 -2
- package/dist/chunk-gjg213m6.js +0 -2
- package/dist/chunk-gvwmyxwf.js +0 -2
- package/dist/chunk-hrgtpvkw.js +0 -2
- package/dist/chunk-j6mkqhey.js +0 -2
- package/dist/chunk-k7y6dqf2.js +0 -2
- package/dist/chunk-k8xqzrg6.js +0 -2
- package/dist/chunk-m9mvh1gy.js +0 -2
- package/dist/chunk-mhnhkg65.js +0 -2
- package/dist/chunk-mz18hxbn.js +0 -2
- package/dist/chunk-p9ra3xxb.js +0 -2
- package/dist/chunk-q92p35wp.js +0 -2
- package/dist/chunk-qexqjw6k.js +0 -2
- package/dist/chunk-qez4ygej.js +0 -2
- package/dist/chunk-qyp7c0j8.js +0 -1
- package/dist/chunk-r1sdshyw.js +0 -2
- package/dist/chunk-stghje2t.js +0 -2
- package/dist/chunk-teg61ef5.js +0 -2
- package/dist/chunk-tjjqaf65.js +0 -2
- package/dist/chunk-v7dyjpv3.js +0 -2
- package/dist/chunk-vpm5ddtt.js +0 -4
- package/dist/chunk-wyjzpncq.js +0 -2
- package/dist/chunk-xhtpqc8p.js +0 -2
- package/dist/chunk-y7v0ghc9.js +0 -2
- package/dist/chunk-z49yf5bx.js +0 -2
- package/dist/chunk-zb14ervr.js +0 -2
- package/dist/chunk-zr2a9z0m.js +0 -2
|
@@ -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 Nn({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{Nn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import"@alwith/module-chat/plugins.css";import{jsx as o}from"react/jsx-runtime";var H="toolbox-content pb-8",ce="toolbox-detail flex max-h-[85dvh] flex-col gap-6 overflow-hidden rounded-2xl p-6 sm:max-w-3xl";function de({children:e}){return o("div",{className:"toolbox-content shrink-0 pt-8",children:o("div",{className:"toolbox-toolbar flex min-h-9 items-center [&>header]:w-full [&>nav]:w-full","data-plugin-page-header":"",children:e})})}
|
|
2
|
+
export{H,ce,de};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function k({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
|
|
2
|
+
export{k};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{fe}from"./chunk-2gwj90sw.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function Gt({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(fe,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function f(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{Gt,e,f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(f&&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(
|
|
3
|
-
${m.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(
|
|
4
|
-
export{
|
|
1
|
+
import{li,ci,It}from"./chunk-nthrcswc.js";import{qe,I}from"./chunk-y4ewhx9t.js";import{cn as M}from"cn";import{forwardRef as R,useCallback as F,useEffect as x,useImperativeHandle as K,useRef as d}from"react";import{InputGroupTextarea as z}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as q}from"react/jsx-runtime";var L=(c)=>!c.shiftKey,N=()=>!1,hn=R(({onChange:c,onKeyDown:T,onCompositionStart:b,onCompositionEnd:y,className:E,placeholder:C,bashMode:H=!1,isSendShortcut:S=L,isNewlineShortcut:P=N,...h},w)=>{let n=qe(),p=I(),u=d(!1),i=d(!1),a=d(null),l=d(null),o=F(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);x(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([s])=>{if(s&&s.contentRect.width!==t)t=s.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),x(o,[o,n?.textInput.value,h.value]);let f=H&&(n?.textInput.value??"").startsWith("!"),k=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||i.current)return;if(T?.(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(f&&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:s,value:m}=t,g=`${m.slice(0,r)}
|
|
3
|
+
${m.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(S(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:s}=li(t),m=ci(t);if(r.length>0)e.preventDefault(),p.add(r);else if(s&&!m)e.preventDefault()},D=n?{value:u.current&&a.current?a.current.value:f?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:It(e.currentTarget);n.textInput.setInput(f?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)It(e.currentTarget);o(),c?.(e)}};return K(w,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||i.current,getTextarea:()=>a.current}),[]),q(z,{"data-chat-input":!0,ref:a,rows:3,className:M("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",E),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=It(e.currentTarget);n?.textInput.setInput(f?`!${t}`:t),o(),y?.(e),i.current=!0,requestAnimationFrame(()=>{i.current=!1})},onCompositionStart:(e)=>{i.current=!1,u.current=!0,b?.(e)},onKeyDown:k,onPaste:A,placeholder:C,...h,...D})});hn.displayName="PromptInputTextarea";
|
|
4
|
+
export{hn};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var hi=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
|
|
4
4
|
<stop stop-color="#2BBFFF"/>
|
|
@@ -1286,4 +1286,4 @@ var Un=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
|
1286
1286
|
</symbol>
|
|
1287
1287
|
</svg>
|
|
1288
1288
|
`;
|
|
1289
|
-
export{
|
|
1289
|
+
export{hi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-2gwj90sw.js";import{Be}from"./chunk-by0ecrb5.js";import{e,f}from"./chunk-e6r2sx79.js";import{nn}from"./chunk-3fxbypd3.js";import{Loader2Icon as x}from"lucide-react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as u}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function lt({session:o,timeline:s}){let{host:m,client:a}=e(),{t:n}=m,y=t((v)=>v.historyPages[o.id]?.cursor!=null),E=nn(o,s?.turnWork),h=()=>f(m,a.open(o.id,o.cwd)),p=r(Be,{...s,session:o,client:a,host:m,turnWork:E});if(o.restoring)return o.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[r(x,{className:"size-4 animate-spin","aria-hidden":"true"}),n("conversation.restoring")]}):p;if(!o.attached&&o.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[r(u,{children:n("conversation.reopen")}),r(l,{children:n("conversation.detached")})]}),r(g,{onClick:h,children:n("conversation.reopen")})]});if(o.items.length===0&&o.state==="idle"&&!y)return r(c,{className:"flex-1",children:i(d,{children:[r(u,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(l,{className:"truncate font-mono",children:o.cwd})]})});return p}
|
|
2
|
+
export{lt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-2gwj90sw.js";import{e,f}from"./chunk-e6r2sx79.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as j}from"cn";import{FolderClosedIcon as g,FolderPlusIcon as G,XIcon as x}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as r,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(n){return n.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||n}function Qi({cwd:n,onChange:u,preparing:b=!1,recentProjects:w}){let{host:i,client:p}=e(),{t:l}=i,v=t((o)=>o.projectContext),h=t((o)=>o.sessionList),y=R(()=>w??[...new Set([...h].toSorted((o,m)=>(m.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[w,h]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let o=!0;return f(i,p.refreshProjectContext(!0).then((m)=>{if(o)N(m.chatDirectory)})),()=>{o=!1}},[i,p]);let D=[...n!==null?[n]:[],...y.filter((o)=>o!==n)].filter((o)=>o!==c&&(!v||z(v,{cwd:o}).id!==I)),a=n!==null&&n!==c,P=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":b,className:j("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(C,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:P,children:[r(g,{className:"size-4 group-hover/project:opacity-0"}),r("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:r(x,{className:"size-3"})})]}),s(_,{render:r(C,{variant:"ghost",size:"sm",className:j("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&r(g,{className:"size-4"}),r("span",{className:"truncate",children:a?M(n):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[D.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:n??"",onValueChange:u,children:D.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(g,{}),r("span",{className:"truncate",children:M(o)})]},o))})}),(d!==void 0||a)&&r(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{f(i,d(n).then((o)=>{if(o!==null)u(o)}))},children:[r(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:P,children:[r(x,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
+
export{Qi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e}from"./chunk-xecs5c6a.js";import{ht}from"./chunk-ggqv2qpg.js";import{B,Ge,q,wt}from"./chunk-07srtfz3.js";import{bt,Ct}from"./chunk-wyjzpncq.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as j}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as O,FieldDescription as de,FieldLabel as _}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as H,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as Q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as X}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function zn({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,V(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function er({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=Ct(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(B[0]?.id??""),[F,U]=y(0),[z,M]=y({}),J=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)M((L)=>{let G={...L};return delete G[r.id],G});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(M((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else M((a)=>{let L={...a};return delete L[r.id],L}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},E=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(B[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await bt(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=B.find((o)=>o.id===x)??null,A=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||P||A)return;k(B[0]?.id??"")},[c,x,P,A]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(ht,{bridge:d})]}),C&&t(zn,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(Vn,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),B.map((o)=>t("div",{hidden:x!==o.id,children:t($n,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>J(r,o,f),testResult:z[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(tn,{provider:o,revision:c.revision,busy:b!==null,testResult:z[o.id],onTest:()=>I(o.id),onRemove:()=>E(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(tn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{U((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function Vn({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[B.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:j("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:j("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:j("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function jn({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(jn,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function $n({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,U]=y(q(s,d?.region)?.id),[z,M]=y(d?.base_url??""),J=s.logo,I=d!==null,T=c.trim(),E=wt(s,F),K=F!==q(s,x.saved?.region)?.id,P=z.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),U(q(s,d?.region)?.id),M(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let A=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let L=c,G=F,m=await C(x.revision,a);if(!m)return;let D=m.providers[s.id]??null;k({saved:D,revision:m.revision}),w((g)=>g===L?"":g),U((g)=>g===G?q(s,D?.region)?.id:g),M((g)=>g===z?D?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:z.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(J,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>U(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(O,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(_,{htmlFor:o,children:n("provider.apiKey")}),E!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(E)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(H,{children:[t(Q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&A)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(O,{className:"gap-2",children:[t(_,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(H,{children:t(Q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:q(s,F)?.baseUrl??s.baseUrl,value:z,onChange:(a)=>M(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!A,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!A?S:void 0,children:i(R,{size:"sm",disabled:!A,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function tn({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[U,z]=y(s===null),[M,J]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
1
|
+
import{e}from"./chunk-e6r2sx79.js";import{Ot}from"./chunk-cyb27m7n.js";import{j,nt,Q,jt}from"./chunk-x1gdzj12.js";import{zt,Vt}from"./chunk-228cdk3n.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as J}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as D,FieldDescription as de,FieldLabel as O}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as H,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as X}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function wi({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,V(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function vr({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=Vt(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(j[0]?.id??""),[F,B]=y(0),[U,A]=y({}),_=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)A((M)=>{let L={...M};return delete L[r.id],L});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(A((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else A((a)=>{let M={...a};return delete M[r.id],M}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},z=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(j[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await zt(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=j.find((o)=>o.id===x)??null,E=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||P||E)return;k(j[0]?.id??"")},[c,x,P,E]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Ot,{bridge:d})]}),C&&t(wi,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(ki,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),j.map((o)=>t("div",{hidden:x!==o.id,children:t(_i,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>_(r,o,f),testResult:U[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(En,{provider:o,revision:c.revision,busy:b!==null,testResult:U[o.id],onTest:()=>I(o.id),onRemove:()=>z(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(En,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{B((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function ki({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[j.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:J("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:J("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:J("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function Si({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(Si,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function _i({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,B]=y(Q(s,d?.region)?.id),[U,A]=y(d?.base_url??""),_=s.logo,I=d!==null,T=c.trim(),z=jt(s,F),K=F!==Q(s,x.saved?.region)?.id,P=U.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),B(Q(s,d?.region)?.id),A(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let E=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let M=c,L=F,m=await C(x.revision,a);if(!m)return;let G=m.providers[s.id]??null;k({saved:G,revision:m.revision}),w((g)=>g===M?"":g),B((g)=>g===L?Q(s,G?.region)?.id:g),A((g)=>g===U?G?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:U.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(_,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>B(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(O,{htmlFor:o,children:n("provider.apiKey")}),z!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(z)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(H,{children:[t(q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&E)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(D,{className:"gap-2",children:[t(O,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(H,{children:t(q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:Q(s,F)?.baseUrl??s.baseUrl,value:U,onChange:(a)=>A(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!E,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!E?S:void 0,children:i(R,{size:"sm",disabled:!E,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function En({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[B,U]=y(s===null),[A,_]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
2
2
|
{ "label": "My Model", "api_id": "model-id" }
|
|
3
|
-
]`),[
|
|
4
|
-
export{
|
|
3
|
+
]`),[z,K]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),E=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),M=(m)=>{if(!m)try{_(nt(I)),K(null)}catch(G){K(W(G));return}U(m)},L=async()=>{let m;try{m=nt(I),K(null)}catch(g){K(W(g)),U(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(ie,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[t(O,{htmlFor:E,children:n("provider.name")}),t(ee,{id:E,value:h,onChange:(m)=>c(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:o,children:n("provider.baseUrl")}),t(ee,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:r,children:n("provider.apiKey")}),i(H,{children:[t(q,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(ne,{}):t(oe,{})})})]})]})]}),t(X,{}),i(re,{open:B,onOpenChange:M,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(B?"provider.previewModels":"provider.editModels"),t(se,{className:J("size-4",B&&"rotate-180")})]})]}),!B&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:A.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(ae,{children:i(D,{className:"gap-2","data-invalid":z!==null,children:[t(O,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":z!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),K(null)}}),t(de,{id:`${f}-description`,className:J("text-xs",z&&"text-destructive"),role:z?"alert":void 0,children:z??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void L(),children:[u&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
|
|
4
|
+
export{wi,vr,ki,Si,_i,En};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Xo}from"./chunk-btrhrh42.js";import{n}from"./chunk-2gwj90sw.js";import{mo,go}from"./chunk-j2zx58ja.js";import{W}from"./chunk-8qkhwpmk.js";import{te}from"./chunk-41t41g5h.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var to=p(function({item:t,messageTime:c}){let l=n(),o=go(t._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
+
${e.text}`).join(`
|
|
3
|
+
`):te(t),a=t.content.filter(d),i=t.content.filter((e)=>f(e)||g(e)),u=o??t.content.filter(x).map((e)=>{let s=mo(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":t.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,s)=>r(W,{block:e},`${t.id}:${s}`))}),r(Xo,{host:l,message:t,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
|
|
4
|
+
export{to};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{S}from"./chunk-d499mw7g.js";import{ne}from"./chunk-67vzyv97.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function io({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(S,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ne,{entries:t.entries})}
|
|
2
|
+
export{io};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ii(t,e){if(e===0)return null;let r=e-1;while(r>=0){let n=t[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":t[r-1],s=r===0||i===`
|
|
3
3
|
`;if(n==="/"?s&&!/[/\\]/.test(t.slice(r+1,e)):s||i===" "||i==="\t")return{kind:n==="/"?"slash":"at",start:r,end:e,query:t.slice(r+1,e)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{ii};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function gi({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
|
|
2
|
+
export{gi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r,s,o,p}from"./chunk-30tynyrt.js";import{L}from"./chunk-pzsx1s8z.js";import{P,X,be}from"./chunk-1xz7zmz5.js";import{we,K,re}from"./chunk-yyzxpnm0.js";import{qi}from"./chunk-jqvp4gfc.js";import{ve}from"./chunk-jyg1gsqg.js";import{ye}from"./chunk-xq196p3v.js";import{ke}from"./chunk-wgph2nb9.js";import{Yt}from"./chunk-g6k07w9b.js";import{Gi}from"./chunk-x0dn6sdq.js";import{ActivityIcon as E}from"lucide-react";import{useEffect as G,useMemo as C}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function zr({selectedId:i,onSelect:d,isForeground:l,onOpen:w,accessory:k,rowActions:R}){let h=r(),{t:N}=h,m=o((t)=>t.runStates),v=o((t)=>t.drafts),u=o((t)=>t.sessionList),g=K((t)=>t.activityOrder),f=C(()=>g.flatMap((t)=>{let e=m[t];return e&&we({runStates:m,drafts:v},t)?[{sid:t,record:e,sessionRow:H(u,e)}]:[]}),[g,m,v,u]),b=C(()=>{let t=new Map;for(let e of f){let a=e.sid===i||l?.(e.sid)?"foreground":"background",S=t.get(a)??[];S.push(e),t.set(a,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,l]),y=K((t)=>t.activityCollapsedGroups),n=re(),x=b.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(w?.(t))return;d(t)},O=Gi();G(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!qi(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let a=Number(e.key);if(!Number.isInteger(a)||a<1||a>9)return;let S=x[a-1];if(!S)return;e.preventDefault(),I(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:k?.(t.sid),actions:R?.(t.sessionRow),hint:e<9&&O?c(M,{children:ke(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(P,{children:b.map((t)=>t.key==="foreground"?c(P,{children:t.rows.map(A)},t.key):c(X,{open:!y.has(t.key),onOpenChange:(e)=>{let a=new Set(y);if(e)a.delete(t.key);else a.add(t.key);n({activityCollapsedGroups:a})},leading:c(E,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function T({sessionRow:i,state:d,interruption:l,active:w,tasks:k,listeningPorts:R,accessory:h,actions:N,onOpen:m,hint:v}){let u=r(),g=s(),{t:f}=u,b=i.title??f("sessionList.untitled"),y=Yt(i.sessionId,d);return D(q,{children:[c(be,{"data-session-id":i.sessionId,active:w,role:"button",tabIndex:0,hoverCard:c(ye,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:b,preview:y,listeningPorts:R,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:h,hint:v,actions:c(ve,{title:f("sessionList.stop"),onStop:()=>p(u,g.stopSession(i.sessionId))})}),k.map((n)=>D("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(L,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
+
export{zr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-d499mw7g.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 na(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=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+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function oi({blocks:e}){return s(kn,{files:na(e)})}function kn({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,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":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,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]})]})]}),l&&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:r===void 0?t.path:r(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{na,oi,kn};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function
|
|
3
|
-
`)){if(t.startsWith("diff --git ")){e=null;continue}if(t.startsWith("+++ ")){let i=t.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(t.startsWith("--- ")){let i=t.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(t.startsWith("+"))e.additions+=1;else if(t.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[t,i]of o)if(e===t||e.endsWith(`/${t}`))return i;return{additions:0,deletions:0}}function
|
|
4
|
-
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function
|
|
5
|
-
export{
|
|
1
|
+
import{kn}from"./chunk-fhkmhxks.js";import{n}from"./chunk-2gwj90sw.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function Zr(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
|
|
2
|
+
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Qr(o){let s=new Map,e=null;for(let t of o.split(`
|
|
3
|
+
`)){if(t.startsWith("diff --git ")){e=null;continue}if(t.startsWith("+++ ")){let i=t.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(t.startsWith("--- ")){let i=t.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(t.startsWith("+"))e.additions+=1;else if(t.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[t,i]of o)if(e===t||e.endsWith(`/${t}`))return i;return{additions:0,deletions:0}}function Yr(o){let s=new Map;for(let e of o)for(let t of e.content){if(!p(t))continue;let i=t.patch?Qr(t.patch.text):new Map;for(let a of t.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=t.patch?Zr(t.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
+
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function _o({items:o}){let s=n(),{openDiff:e,FileIcon:t}=s;return c(kn,{files:Yr(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:t===void 0?void 0:(i)=>g(h,{children:[c(t,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
+
export{Zr,Qr,Yr,_o};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{s,o}from"./chunk-30tynyrt.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Yt(e,r){let a=s(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await a.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[a,e,c,f,i,r]),i?u:p??u}
|
|
2
|
+
export{Yt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function
|
|
3
|
-
export{
|
|
1
|
+
import{Ai,et}from"./chunk-0neph1kr.js";import{n,Z}from"./chunk-2gwj90sw.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function ut(e){c.setState({request:{path:e.path,patch:Hn(e.patch,e.path)}})}function Hn(e,a){let t=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(t.length<=1)return e;return t.find((o)=>{let r=o.split(`
|
|
2
|
+
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function pt(){let{t:e,theme:a}=n(),t=Z(c,(o)=>o.request),s=t===null?null:Ai(t.patch);return i(f,{open:t!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:t?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:t!==null&&i(et,{patch:t.patch,theme:a})})]})})}
|
|
3
|
+
export{ut,Hn,pt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{si}from"./chunk-r03bbt2f.js";import{e,f}from"./chunk-e6r2sx79.js";import{z,g}from"./chunk-36han2kw.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as a}from"lucide-react";import{memo as O}from"react";import{jsx as t}from"react/jsx-runtime";var b=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":y,"workspace-write":a,agent:b,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:h,onConfigChange:c}){let{host:l,client:M}=e(),{t:r}=l,s=g(m,"mode");if(!s)return null;let o=s.currentValue,p=z(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),I=p.find((n)=>n.value===o),C=d[o]??a,v=(n)=>{if(n===o)return;f(l,c?c(s.configId,n):M.setConfig(u,s.configId,n))};return t(si,{value:o,warning:o==="agent-full-access",currentName:I?.name??o,icon:t(C,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:h,label:r("composer.switchPermissionMode"),onValueChange:v,options:p.map((n)=>{let i=d[n.value]??a,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var gt=O(N);
|
|
2
|
+
export{gt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-e6r2sx79.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function Bt({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
|
|
2
|
+
export{Bt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{pi}from"./chunk-j6svz91p.js";import{t}from"./chunk-2gwj90sw.js";import{e,f}from"./chunk-e6r2sx79.js";import{z,g,V}from"./chunk-36han2kw.js";import{isBooleanOption as A,isGroupedSelect as Z,isSelectOption as D}from"@nyssance/codex-acp-v2/client";import{Zap as F}from"lucide-react";import{memo as H,useRef as J}from"react";import{jsx as G}from"react/jsx-runtime";function K({sessionId:l,options:p,disabled:I,onModelChange:b,onConfigChange:O,defaultGroup:x={id:"models",name:"Models"},catalog:L=(c)=>c,headerAction:N}){let{host:c,client:P}=e(),{t:i}=c,k=t((o)=>Boolean(o.configPending[l])),M=J({sessionId:l,model:!0}),v=k&&(M.current.sessionId!==l||M.current.model),R=t((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),n=g(p,"model"),a=g(p,"thought_level"),_=p.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==n&&o!==a)),S=_.filter(D),m=_.filter(A);if(!n&&!a&&S.length===0&&m.length===0)return null;let u=(o,r)=>{if(r===o.currentValue)return Promise.resolve();M.current={sessionId:l,model:o===n};let d=O?O(o.configId,r):P.setConfig(l,o.configId,r);return f(c,d),d},h=a?z(a):[],E=h.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),U=n?V(n):i("composer.model"),y=(o)=>({api_id:o.value,label:o.name}),w=L(n&&Z(n.options)?n.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(y)})):[{...x,models:n?z(n).map(y):[]}]),B=w.flatMap((o)=>o.models),C=B.find((o)=>o.api_id===n?.currentValue)??{api_id:n?.currentValue??"",label:U},s=m.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return G(pi,{disabled:I||v||R,switching:v,value:{...C,label:C.shortLabel??C.label},compactCatalog:!0,models:B,showModelList:Boolean(n),onChange:(o)=>{if(o.api_id===n?.currentValue)return;if(b)b(o.api_id);else if(n)u(n,o.api_id)},header:{name:n?.name??i("composer.model"),action:N},modelGroups:w,t:i,effortConfig:a&&h.length>0?{name:"Effort",value:a.currentValue,levels:h,sizer:E,onChange:(o)=>u(a,o)}:void 0,selectOptions:S.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:z(o).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>u(o,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:G(F,{className:"size-4","aria-hidden":"true"})},...m.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:m.find((q)=>q.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);u(d,r)}})}var ft=H(K);
|
|
2
|
+
export{ft};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as v,useId as R,useRef as k}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as S}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as _}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function w(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 vn(e,n){return JSON.stringify(["request_user_input_async",e,n])}function Wo(e){return{selected:e.options?.length?0:null,text:""}}function Tt(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function Zo(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 yn(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 Qo({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:A,t:u}){let g=R(),h=k(!1),a=k(null);v(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",N=o==="answered"||o==="skipped",f=e.options??[],Q=l&&Tt(e,n).trim().length>0,b="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:N?c(_,{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(),Q)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:b,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:b,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(S,{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&&Tt(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(C,{size:"sm"}),disabled:!Q,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(C,{size:"sm",variant:"ghost"}),disabled:!l,onClick:A,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{w,vn,Wo,Tt,Zo,yn,Qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Te,_t}from"./chunk-njq7f390.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function Yn(o){if(o===null||o===void 0)return Te();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function ir(o,{reportError:t=console.error}={}){let e=S(Te()),r=async()=>{e.setState(Yn(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(_t,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function rr({store:o,children:t}){return w(f,{value:o,children:t})}function an(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function ae(o){let{store:t}=an(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function J(){return an().dispatch}
|
|
2
|
+
export{Yn,ir,rr,an,ae,J};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{gi}from"./chunk-f1ha808d.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function mi({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?gi({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{mi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function mo(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function go(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
|
|
2
|
+
export{mo,go};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Nn}from"./chunk-drrram2y.js";import{k}from"./chunk-dxgha4a2.js";import{cn as r}from"cn";import{ArrowUpRight as pe,ChevronUp as H,Loader2Icon as W,Zap as Z}from"lucide-react";import{Fragment as ce,useState as q}from"react";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as J,DropdownMenuCheckboxItem as K,DropdownMenuContent as Q,DropdownMenuGroup as D,DropdownMenuItem as y,DropdownMenuLabel as L,DropdownMenuSeparator as u,DropdownMenuSub as T,DropdownMenuSubContent as C,DropdownMenuSubTrigger as O,DropdownMenuTrigger as X}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as he}from"@nyssance/shadcn/vega/components/ui/switch";import{Tooltip as Y,TooltipContent as E,TooltipTrigger as ee}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as e,jsxs as a,Fragment as p}from"react/jsx-runtime";function pi({value:c,onChange:ne,models:x,modelGroups:V,compactCatalog:o,catalogHeight:ae="fixed",effortPresentation:j="slider",unavailableEffort:v,providerMenu:h,header:w,className:B,condensed:z,stripLabelPrefix:_,showDescription:se,showModelList:ie=!0,loading:oe,switching:G,isLoading:te,effortConfig:s,booleanOptions:f,onBooleanChange:R,selectOptions:le=[],t:m,...d}){let[de,re]=q(!1),[me,ue]=q(!1),l=f?.find((n)=>n.id==="fast_mode"),I=o?f?.filter((n)=>n!==l):f,P=(n)=>_&&n.startsWith(_)?n.slice(_.length):n;if(oe)return e("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:a(A,{variant:"ghost",disabled:!0,className:r("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",B),children:[e(W,{className:"size-3 animate-spin"}),e("span",{className:"text-muted-foreground truncate",children:m("model.loadingModels")})]})});return a("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[h&&a(J,{open:de,onOpenChange:re,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"provider-trigger",variant:"ghost",disabled:d.disabled,className:r("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[h.icon,e(H,{className:"size-2.5 shrink-0 opacity-60"})]})})}),e(E,{children:m("model.switchProvider")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((n,t)=>a(ce,{children:[t>0&&n.length>0&&e(u,{}),e(k,{value:h.value,onValueChange:h.onChange,options:n})]},t)),h.moreAction&&a(p,{children:[e(u,{}),a(y,{onClick:h.moreAction,className:"whitespace-nowrap",children:[e("span",{className:"min-w-0 flex-1 truncate",children:m("model.moreModels")}),e(pe,{className:"size-4"})]})]})]})]}),a(J,{open:me,onOpenChange:ue,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"model-trigger","aria-busy":G,variant:"ghost",className:r("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",z&&"h-7 gap-1 px-1.5 text-[11px]",B),...d,children:[c.icon,f?.some((n)=>n.id==="fast_mode"&&n.currentValue&&!n.disabled)&&e(Z,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),e("span",{className:r("min-w-0 flex-1 truncate text-start",z&&"text-[11px]"),children:P(c.label)||m("model.selectModel")}),s&&a("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[e("span",{className:"invisible col-start-1 row-start-1",children:s.sizer??s.levels.reduce((n,t)=>t.name.length>n.length?t.name:n,"")}),e("span",{className:"col-start-1 row-start-1",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),G?e(W,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(H,{className:r("size-3 shrink-0",z&&"size-2.5")})]})})}),e(E,{children:m("model.switchModel")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:r("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",o&&"flex w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5",o&&(ae==="content"?"max-h-[min(350px,var(--available-height))]":"h-[350px]")),children:[o&&a(p,{children:[a(D,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-2 py-1",children:[s?j==="slider"?e("div",{role:"menuitem","aria-label":s.name,className:"min-w-0 flex-1 [&>div]:justify-between [&>div]:gap-3 [&>div]:px-0 [&>div]:py-1.5",children:e(Nn,{...s,disabled:d.disabled})}):a(T,{children:[a(O,{disabled:d.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[e("span",{children:s.name}),e("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(C,{children:e(k,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):v?a(y,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[e("span",{children:v.name}),e("span",{className:"text-muted-foreground truncate text-xs",children:v.label})]}):e(L,{className:"min-w-0 flex-1 truncate",children:w?.name}),l&&e(K,{"aria-label":l.name,title:l.title??l.name,disabled:d.disabled||l.disabled,checked:l.currentValue,closeOnClick:!1,onCheckedChange:(n)=>R?.(l.id,n),className:r("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ms-auto -me-2 size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",l.currentValue&&!l.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:l.icon??e(Z,{className:"size-4","aria-hidden":"true"})})]}),e(u,{className:"shrink-0"})]}),w&&!o&&a(p,{children:[a("div",{className:"flex items-center gap-2 px-2 py-2",children:[w.icon,e("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:w.name}),w.action]}),e(u,{})]}),a(D,{"data-model-menu-list":o?"":void 0,className:o?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[ie&&(te?e(y,{disabled:!0,className:"text-muted-foreground",children:m("model.loadingModels")}):x.length===0?e(y,{disabled:!0,className:"text-muted-foreground",children:m("model.noModelsAvailable")}):(()=>{let n=x.filter((i)=>!i.more),t=x.filter((i)=>i.more),F=n.length>0&&t.length>0,N=(i,g)=>({disabled:d.disabled,icon:i.icon,value:i.api_id,label:P(i.label),description:g?.noDescription?void 0:se?i.description:void 0}),M=(i)=>{let g=x.find((S)=>S.api_id===i);if(g)ne(g)};if(o)return e(k,{value:c.api_id,onValueChange:M,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:x.map((i)=>N(i))});return a(p,{children:[V?V.map((i)=>{let g=i.models.filter((b)=>!b.more),S=i.models.filter((b)=>b.more),U=g.length>0&&S.length>0;return a(D,{children:[e(L,{className:"text-muted-foreground text-xs font-normal",children:i.name}),e(k,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(U?g:i.models).map((b)=>N(b))}),U&&a(T,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(C,{children:e(k,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:S.map((b)=>N(b,{noDescription:!0}))})})]})]},i.id)}):e(k,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(F?n:x).map((i)=>N(i))}),!V&&F&&a(T,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(C,{children:e(k,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:t.map((i)=>N(i,{noDescription:!0}))})})]})]})})()),!o&&s&&a(p,{children:[e(u,{}),j==="menu"?a(T,{children:[a(O,{disabled:d.disabled,children:[e("span",{className:"flex-1",children:s.name}),e("span",{className:"text-muted-foreground",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(C,{children:e(k,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(Nn,{...s,disabled:d.disabled})]}),!o&&!s&&v&&a(p,{children:[e(u,{}),a(y,{disabled:!0,children:[e("span",{className:"flex-1",children:v.name}),e("span",{children:v.label})]})]}),le.map((n)=>a(D,{children:[e(u,{}),e(L,{children:n.name}),e(k,{value:n.value,onValueChange:n.onChange,options:n.options,itemClassName:"whitespace-nowrap"})]},n.id)),I&&I.length>0&&a(p,{children:[!s&&e(u,{}),I.map((n)=>o?a(K,{"aria-label":n.name,title:n.title,disabled:d.disabled||n.disabled,checked:n.currentValue,closeOnClick:!1,onCheckedChange:(t)=>R?.(n.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[a("span",{className:"flex items-center gap-2",children:[n.icon,n.name]}),e("span",{"aria-hidden":"true",className:r("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",n.currentValue?"bg-primary":"bg-input"),children:e("span",{className:r("bg-background size-3.5 rounded-full shadow-xs transition-transform",n.currentValue&&"translate-x-3.5")})})]},n.id):a("div",{title:n.title,className:r("flex items-center justify-between gap-3 px-2 py-2.5",n.disabled&&"opacity-50"),children:[a("span",{className:"flex items-center gap-2 text-sm font-medium",children:[n.icon,n.name]}),e(he,{"aria-label":n.name,disabled:d.disabled||n.disabled,checked:n.currentValue,onCheckedChange:(t)=>R?.(n.id,t)})]},n.id))]})]}),o&&w?.action&&a(p,{children:[e(u,{className:"shrink-0"}),e(D,{"data-model-menu-footer":!0,className:"shrink-0",children:w.action})]})]})]})]})}
|
|
2
|
+
export{pi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-2gwj90sw.js";import{codexTurnError as C}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as k,useRef as u,useState as a}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as f}from"react/jsx-runtime";function Pt({children:i}){return f("div",{className:"codex-error-message",role:"alert",children:[t(R,{"aria-hidden":"true"}),t("div",{className:"min-w-0 flex-1",children:i})]})}function ln({error:i,retry:e}){let{t:p,renderTurnError:N}=n(),c=C(i),[l]=a(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[v,y]=a(e?.delaySeconds??null),[h,E]=a(!1),[g,x]=a(null),o=u(!1),w=u(!1),S=u(e?.run);S.current=e?.run;let T=u((b)=>{let s=S.current;if(o.current||s===void 0)return;o.current=!0,E(!0),x(null),s(b).catch((r)=>{w.current=!0,o.current=!1,y(null),E(!1),x(r instanceof Error?r.message:String(r))})}),d=N?.(c.message),m=d===void 0&&e!==void 0&&c.retryable;if(k(()=>{if(!m||l===null)return;let s=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(y(r),r===0)T.current("automatic")},1000);return()=>clearInterval(s)},[l,m]),d!==void 0)return t(Pt,{children:d});return f(Pt,{children:[f("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),m&&t(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>T.current("manual"),children:v===null?p("timeline.retry"):p("timeline.retryCountdown",{seconds:v})})]}),g!==null&&t("div",{className:"text-muted-foreground mt-2 text-sm",children:g})]})}
|
|
2
|
+
export{Pt,ln};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-2gwj90sw.js";import{e}from"./chunk-e6r2sx79.js";import{Re,Je,ge}from"./chunk-jtc52w45.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function ct({sessionId:n}){let o=t((s)=>s.sessions),{host:u}=e(),d=t((s)=>s.actions),a=d.some((s)=>m(o,n,s.sessionId))?d.filter((s)=>m(o,n,s.sessionId)):p,i=a.filter(Re).filter((s)=>{if(s.sessionId!==n||o[n]?.subagent!==void 0)return!0;let r=s.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((s)=>!Re(s));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((s)=>f("div",{children:[s.sessionId!==n&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:s.sessionId===null?"":o[s.sessionId]?.title??u.t("subagents.untitled")}),l(ge,{action:s})]},s.id))}),i[0]!==void 0&&l(Je,{action:i[0],total:i.length},i[0].id)]})}
|
|
2
|
+
export{ct};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{I}from"./chunk-y4ewhx9t.js";import{e}from"./chunk-e6r2sx79.js";import{Oe}from"./chunk-234jnd72.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Bn({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=I(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>Oe(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
|
|
2
|
+
export{Bn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function Jo({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{Jo};
|