@alwith/module-chat 0.5.20 → 0.5.22
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-y0q6jwq4.js → chunk-00eytt1z.js} +2 -2
- package/dist/{chunk-95mynf7q.js → chunk-0fs2k5fe.js} +2 -2
- package/dist/{chunk-f1x483c9.js → chunk-0gersbj0.js} +2 -2
- package/dist/{chunk-bbyscgdd.js → chunk-0gy6ngda.js} +2 -2
- package/dist/{chunk-rkfq0c0p.js → chunk-0mp7tyea.js} +2 -2
- package/dist/{chunk-b12v22de.js → chunk-0vhkv9ax.js} +2 -2
- package/dist/{chunk-qd1z91fm.js → chunk-141kppzb.js} +1 -1
- package/dist/chunk-14exd146.js +2 -0
- package/dist/{chunk-rjkpe1fw.js → chunk-156m3888.js} +3 -3
- package/dist/{chunk-4bb6dzzs.js → chunk-1e6x0018.js} +2 -2
- package/dist/{chunk-n66yy1m1.js → chunk-1f628zap.js} +2 -2
- package/dist/{chunk-2f9vjmxz.js → chunk-1ppfn0e1.js} +2 -2
- package/dist/{chunk-ckyat78p.js → chunk-1q2cykp4.js} +2 -2
- package/dist/{chunk-h491shsg.js → chunk-1tkzxktd.js} +2 -2
- package/dist/{chunk-3yxjh7b1.js → chunk-23rjsm3a.js} +2 -2
- package/dist/chunk-2ce8gd89.js +2 -0
- package/dist/{chunk-1rg3nab3.js → chunk-2f1qx13s.js} +2 -2
- package/dist/{chunk-agqnt7xq.js → chunk-2nvsvw67.js} +2 -2
- package/dist/{chunk-1qyxrh0n.js → chunk-2tce3pc5.js} +3 -3
- package/dist/{chunk-28f3zv6v.js → chunk-2tkeevm0.js} +2 -2
- package/dist/{chunk-62jm1gct.js → chunk-33620ca6.js} +2 -2
- package/dist/{chunk-g2qcyqc6.js → chunk-3aq5c12k.js} +2 -2
- package/dist/{chunk-6t5war9h.js → chunk-3jcmv5qf.js} +2 -2
- package/dist/chunk-3n47hknp.js +2 -0
- package/dist/{chunk-yg3xhn5m.js → chunk-3yvd77ph.js} +2 -2
- package/dist/chunk-40bcp4pa.js +2 -0
- package/dist/{chunk-kmdag4vy.js → chunk-42hkbpey.js} +2 -2
- package/dist/{chunk-jwt7q6yx.js → chunk-42nhwnbe.js} +4 -4
- package/dist/{chunk-ktvh4yb5.js → chunk-4s6gx750.js} +2 -2
- package/dist/chunk-52p7kyam.js +2 -0
- package/dist/{chunk-vt6cyes7.js → chunk-59957gfy.js} +2 -2
- package/dist/chunk-59exzf5n.js +2 -0
- package/dist/{chunk-annzfgfq.js → chunk-5cdr7q6f.js} +3 -3
- package/dist/chunk-5nc3dtyt.js +2 -0
- package/dist/{chunk-s8s65pj2.js → chunk-63kxepkh.js} +2 -2
- package/dist/{chunk-bvgqsaey.js → chunk-67hrx4kg.js} +2 -2
- package/dist/{chunk-k7ye738q.js → chunk-6dn3j8a2.js} +2 -2
- package/dist/{chunk-kc56dhwd.js → chunk-72x7rae0.js} +2 -2
- package/dist/{chunk-a63k8tht.js → chunk-77j8n5k5.js} +2 -2
- package/dist/chunk-78s6h7r4.js +2 -0
- package/dist/{chunk-t7drk9ja.js → chunk-7p1r1ha9.js} +2 -2
- package/dist/{chunk-pprt7ntb.js → chunk-7wk3d01c.js} +4 -4
- package/dist/chunk-80ckz04b.js +2 -0
- package/dist/{chunk-p7dd93e5.js → chunk-82xjggwn.js} +2 -2
- package/dist/chunk-85ffkcch.js +2 -0
- package/dist/{chunk-vbab9hc4.js → chunk-8c042xya.js} +2 -2
- package/dist/{chunk-qwfw4xpn.js → chunk-8ch9444t.js} +2 -2
- package/dist/{chunk-36m8zstj.js → chunk-8hte6dh7.js} +2 -2
- package/dist/{chunk-42atrgm1.js → chunk-8jxcdap5.js} +2 -2
- package/dist/chunk-8qw8erv6.js +2 -0
- package/dist/{chunk-3ka3bt0t.js → chunk-8t36vprh.js} +2 -2
- package/dist/{chunk-heyqzkxq.js → chunk-8w22ck92.js} +2 -2
- package/dist/{chunk-q2gfd4jk.js → chunk-908ndb9r.js} +2 -2
- package/dist/{chunk-jxntqarp.js → chunk-983gkw32.js} +2 -2
- package/dist/chunk-9g67z1b4.js +2 -0
- package/dist/chunk-9n79tr1q.js +2 -0
- package/dist/{chunk-581e33tz.js → chunk-9sq2etjk.js} +2 -2
- package/dist/{chunk-nxyrrmz8.js → chunk-a8p82wp7.js} +2 -2
- package/dist/chunk-ajpxjj5m.js +2 -0
- package/dist/{chunk-acb8t4jt.js → chunk-ap0vmczf.js} +2 -2
- package/dist/{chunk-v5pbaf9x.js → chunk-aqvy57zs.js} +2 -2
- package/dist/{chunk-azfmr99x.js → chunk-aza82m2p.js} +2 -2
- package/dist/{chunk-adk7aeyt.js → chunk-b2wczqtd.js} +2 -2
- package/dist/chunk-b3jg6nzv.js +3 -0
- package/dist/{chunk-swpy2b9a.js → chunk-b614gnnv.js} +2 -2
- package/dist/chunk-c1b8z8pa.js +2 -0
- package/dist/{chunk-11484wvv.js → chunk-c38t8809.js} +2 -2
- package/dist/chunk-c9nbavk0.js +2 -0
- package/dist/{chunk-yakar0e2.js → chunk-cbwya2ss.js} +2 -2
- package/dist/chunk-cg8ekwka.js +2 -0
- package/dist/{chunk-x99fyd88.js → chunk-dv65h7z5.js} +2 -2
- package/dist/{chunk-0whxm2f0.js → chunk-dya74vts.js} +2 -2
- package/dist/{chunk-9jp5t3qq.js → chunk-dyqvhn6y.js} +5 -5
- package/dist/{chunk-f2w2sct6.js → chunk-dyrgfdxz.js} +2 -2
- package/dist/{chunk-n5v1h0sk.js → chunk-e9ntencj.js} +2 -2
- package/dist/chunk-ec9rgnt3.js +2 -0
- package/dist/chunk-efrn25h9.js +2 -0
- package/dist/chunk-emcefs0g.js +2 -0
- package/dist/{chunk-z3nybrbb.js → chunk-et8rcxw6.js} +2 -2
- package/dist/chunk-f28hhbf4.js +2 -0
- package/dist/chunk-f3924gdb.js +2 -0
- package/dist/chunk-f8zy35gz.js +2 -0
- package/dist/chunk-f98at4r5.js +2 -0
- package/dist/{chunk-gsfgdnfp.js → chunk-fke98cj0.js} +2 -2
- package/dist/chunk-g242n3dt.js +2 -0
- package/dist/{chunk-wgrmjfyp.js → chunk-g73f62qm.js} +2 -2
- package/dist/{chunk-2t9j90mw.js → chunk-h1bhhqtq.js} +2 -2
- package/dist/{chunk-wvry7t79.js → chunk-h5m2fpp4.js} +2 -2
- package/dist/{chunk-g44hhdha.js → chunk-hv1ejvhg.js} +2 -2
- package/dist/{chunk-mr6k70s4.js → chunk-j86x2rn0.js} +2 -2
- package/dist/{chunk-x2nemdjf.js → chunk-jm6zja6h.js} +2 -2
- package/dist/{chunk-jgd6dcgy.js → chunk-k5rkpqbh.js} +2 -2
- package/dist/{chunk-qdg5zphd.js → chunk-k5wgf59a.js} +2 -2
- package/dist/{chunk-7z4gtfkd.js → chunk-k7k6qsqh.js} +2 -2
- package/dist/{chunk-n9gq2wbz.js → chunk-kc5k5e59.js} +3 -3
- package/dist/chunk-kvc6ewkt.js +4 -0
- package/dist/chunk-kxmajv0m.js +3 -0
- package/dist/{chunk-5a6xc345.js → chunk-m2b8kzpk.js} +2 -2
- package/dist/{chunk-drhzcs6e.js → chunk-m7wn4z9x.js} +2 -2
- package/dist/{chunk-bfhfbrzt.js → chunk-mcjwwxa1.js} +2 -2
- package/dist/{chunk-k64wvbbc.js → chunk-memvzzc6.js} +2 -2
- package/dist/{chunk-48fj5m0p.js → chunk-mg2mkzkk.js} +2 -2
- package/dist/{chunk-f5gsffbv.js → chunk-mgm1x3de.js} +2 -2
- package/dist/chunk-mwpchd85.js +3 -0
- package/dist/chunk-myrdfa3s.js +2 -0
- package/dist/{chunk-4gyd9hx9.js → chunk-n0khj68q.js} +2 -2
- package/dist/chunk-n3xhh6ch.js +2 -0
- package/dist/{chunk-kz1kjzmq.js → chunk-n929wkw7.js} +2 -2
- package/dist/chunk-nacjea1s.js +2 -0
- package/dist/{chunk-mvs2dzyt.js → chunk-nn25kjm4.js} +2 -2
- package/dist/{chunk-855w49k0.js → chunk-nq7gg9vg.js} +2 -2
- package/dist/{chunk-dte0n4kf.js → chunk-nqw4deag.js} +2 -2
- package/dist/{chunk-pwjz3yxb.js → chunk-ns5rnxdj.js} +2 -2
- package/dist/{chunk-667z0pac.js → chunk-nxp1b8ny.js} +2 -2
- package/dist/{chunk-06zh85wp.js → chunk-p4bb313p.js} +3 -3
- package/dist/chunk-py837qjk.js +1 -0
- package/dist/chunk-q7nn5xe5.js +2 -0
- package/dist/{chunk-grr1k5zn.js → chunk-qjhkzdhm.js} +2 -2
- package/dist/{chunk-m271yxxm.js → chunk-qwfwxfhn.js} +2 -2
- package/dist/chunk-qxcnyvps.js +2 -0
- package/dist/chunk-r3qrftds.js +2 -0
- package/dist/chunk-r8rre2zb.js +2 -0
- package/dist/{chunk-1k21j77z.js → chunk-r9dt4bs3.js} +2 -2
- package/dist/chunk-rbqn4725.js +2 -0
- package/dist/{chunk-0643swd4.js → chunk-rcbb4ke2.js} +2 -2
- package/dist/chunk-rekc1q3m.js +2 -0
- package/dist/chunk-rwkkqdcv.js +2 -0
- package/dist/{chunk-b18zr059.js → chunk-rwnz06kr.js} +2 -2
- package/dist/{chunk-1fggcrvs.js → chunk-s55n9cby.js} +2 -2
- package/dist/chunk-sxh0pd3y.js +2 -0
- package/dist/{chunk-hd7bk591.js → chunk-sy5tq3y6.js} +2 -2
- package/dist/chunk-t0cr21e3.js +2 -0
- package/dist/{chunk-8mgypdap.js → chunk-t97yjy4f.js} +2 -2
- package/dist/{chunk-4ygyb91q.js → chunk-v4t0p6pp.js} +2 -2
- package/dist/{chunk-fnpf84rf.js → chunk-vcy5vyp7.js} +2 -2
- package/dist/chunk-vkrgdqnm.js +2 -0
- package/dist/{chunk-r9sweaq4.js → chunk-vs02ry2r.js} +2 -2
- package/dist/{chunk-s4wjckd1.js → chunk-vyk4zh1m.js} +7 -7
- package/dist/{chunk-vfhxerxt.js → chunk-w0hpztj7.js} +2 -2
- package/dist/{chunk-tv0fwt2g.js → chunk-w6rwngm3.js} +2 -2
- package/dist/{chunk-bg03czcx.js → chunk-w9dh298r.js} +2 -2
- package/dist/chunk-wvdncbrt.js +2 -0
- package/dist/{chunk-rbv1scqm.js → chunk-x2yc5748.js} +2 -2
- package/dist/{chunk-r7s7kx38.js → chunk-x334e7wb.js} +3 -3
- package/dist/{chunk-j69t1f4a.js → chunk-x6nz6eyb.js} +2 -2
- package/dist/{chunk-rjw63t34.js → chunk-xf36kt74.js} +3 -3
- package/dist/{chunk-0wa9yjg3.js → chunk-xgjkj9j8.js} +2 -2
- package/dist/{chunk-dfgak1md.js → chunk-xktybk48.js} +2 -2
- package/dist/{chunk-3s94ekrs.js → chunk-xmstt6hh.js} +2 -2
- package/dist/{chunk-g9t2d8hg.js → chunk-xrs7x5ah.js} +2 -2
- package/dist/{chunk-d257n8gj.js → chunk-xyvqcpjx.js} +2 -2
- package/dist/chunk-y7xcync7.js +2 -0
- package/dist/chunk-ye9tsdhn.js +2 -0
- package/dist/{chunk-wccx911q.js → chunk-z2fjwkmt.js} +2 -2
- package/dist/{chunk-gha517v4.js → chunk-z2v008kc.js} +2 -2
- package/dist/{chunk-pzjag1mt.js → chunk-z71pp1mb.js} +3 -3
- package/dist/{chunk-mj7094yh.js → chunk-zxkvvecz.js} +2 -2
- 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/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/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/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/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/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/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/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 +2 -2
- package/dist/chunk-0p6y2t9b.js +0 -2
- package/dist/chunk-1k697ncv.js +0 -2
- package/dist/chunk-1mn2t6ga.js +0 -2
- package/dist/chunk-1r25anvg.js +0 -2
- package/dist/chunk-20k9syde.js +0 -1
- package/dist/chunk-3gk86w24.js +0 -2
- package/dist/chunk-3vsc49pt.js +0 -2
- package/dist/chunk-4d853988.js +0 -2
- package/dist/chunk-4p6svs37.js +0 -2
- package/dist/chunk-5ap6fvrp.js +0 -2
- package/dist/chunk-5m7vc4s6.js +0 -2
- package/dist/chunk-615a0yhh.js +0 -2
- package/dist/chunk-6syhjege.js +0 -2
- package/dist/chunk-8akwfgkq.js +0 -2
- package/dist/chunk-8c8ncw1m.js +0 -2
- package/dist/chunk-c32z3wjq.js +0 -2
- package/dist/chunk-cvz3k5gk.js +0 -2
- package/dist/chunk-d0vhdr07.js +0 -2
- package/dist/chunk-erjscd1r.js +0 -4
- package/dist/chunk-feg5rp9g.js +0 -2
- package/dist/chunk-ffspd86m.js +0 -2
- package/dist/chunk-fh3pjhe6.js +0 -2
- package/dist/chunk-g9yg36dh.js +0 -3
- package/dist/chunk-ha46rhzj.js +0 -2
- package/dist/chunk-hp4a0e8c.js +0 -2
- package/dist/chunk-j8v3sfpv.js +0 -2
- package/dist/chunk-jmb8r6aj.js +0 -2
- package/dist/chunk-kbeme4w0.js +0 -3
- package/dist/chunk-kq48hbd5.js +0 -2
- package/dist/chunk-mv51zgj1.js +0 -2
- package/dist/chunk-mz8a6292.js +0 -2
- package/dist/chunk-p8g927x6.js +0 -2
- package/dist/chunk-pk2rvqd0.js +0 -2
- package/dist/chunk-px1ehzwc.js +0 -2
- package/dist/chunk-q9ef9n7b.js +0 -2
- package/dist/chunk-q9zawfn1.js +0 -2
- package/dist/chunk-qn6ppn0r.js +0 -2
- package/dist/chunk-rq5e0922.js +0 -2
- package/dist/chunk-ssxbxanb.js +0 -2
- package/dist/chunk-tpbqg729.js +0 -2
- package/dist/chunk-ttn8ss6b.js +0 -2
- package/dist/chunk-vnsgjnp3.js +0 -2
- package/dist/chunk-vzgv360q.js +0 -2
- package/dist/chunk-xft0s40a.js +0 -3
- package/dist/chunk-y6kzbbya.js +0 -2
- package/dist/chunk-y97ne5kj.js +0 -2
package/dist/activity-host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ti,c,w}from"./chunk-zxkvvecz.js";export{Ti as ActivityHostProvider,w as ActivityMarkdown,c as useActivityHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Un,Jt,Se,wt}from"../chunk-e9ntencj.js";import{Badge as j}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as I}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as L}from"@nyssance/shadcn/vega/components/ui/input";import{Label as q}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as G,RadioGroupItem as B}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as V}from"@nyssance/shadcn/vega/components/ui/textarea";import{autoUpdate as W}from"@floating-ui/dom";import{cn as H}from"cn";import{useCallback as T,useEffect as M,useLayoutEffect as O,useMemo as _,useRef as K,useState as C}from"react";import{createPortal as X}from"react-dom";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=_(()=>n?Un(n.requestedSchema):[],[n]),[b,g]=C({}),S=K(null);M(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Se(i)){let c=wt(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),M(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);O(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),O(()=>{let e=x.current;if(!n||!e||!k)return;return W(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=_(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Se(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Se(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=wt(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return X(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=wt(r),m=Se(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(j,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:Jt(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:Jt(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(I,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(I,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(L,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(G,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:H("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(B,{value:t.value,id:o}),d(q,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:H("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(B,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(q,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(L,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(V,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(A,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(A,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Un,Jt,Se,wt}from"../chunk-e9ntencj.js";export{Un as elicitationFields,Jt as elicitationLabels,wt as elicitationOptions,Se as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{mr,xi,ma,ga}from"../chunk-emcefs0g.js";export{mr as PERMISSION_KIND_GROUP_ORDER,ma as isAllowKind,ga as isAlwaysKind,xi as sortPermissionOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{vi}from"../chunk-42hkbpey.js";import"../chunk-emcefs0g.js";export{vi as PermissionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Wr,pr,Zr,yi}from"../chunk-9sq2etjk.js";export{yi as SchemaElicitationForm,Wr as elicitationFields,pr as initialValues,Zr as isAnswered};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bi}from"../chunk-k7k6qsqh.js";export{bi as UrlElicitationCard};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var I="collection-default";function V(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function _e(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function kt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function Yi(o,e=_e()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{I,V,_e,kt,Yi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var di=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
|
|
4
4
|
<stop stop-color="#2BBFFF"/>
|
|
@@ -1286,4 +1286,4 @@ var Rn=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
|
1286
1286
|
</symbol>
|
|
1287
1287
|
</svg>
|
|
1288
1288
|
`;
|
|
1289
|
-
export{
|
|
1289
|
+
export{di};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{C}from"./chunk-0vhkv9ax.js";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as f,DropdownMenuContent as w,DropdownMenuTrigger as x}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{useState as b}from"react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Oo({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=b(!1);return o(f,{open:m,onOpenChange:c,children:[e(x,{render:o(g,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(w,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(C,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{Oo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ke}from"./chunk-x2yc5748.js";import{te,Zo}from"./chunk-4s6gx750.js";import{t}from"./chunk-ye9tsdhn.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Ln({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Ke(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(te,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(Zo,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{Ln};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-f3924gdb.js";import{me}from"./chunk-p4bb313p.js";import{Ee}from"./chunk-rcbb4ke2.js";import{$t}from"./chunk-a8p82wp7.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Rt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function hi({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Rt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Rt,{label:Ee(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Rt,{label:Ee(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Ft({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(hi,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t($t,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(me,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
|
|
2
|
+
export{Rt,hi,Ft};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DropdownMenuRadioGroup as l,DropdownMenuRadioItem as r}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{cn as s}from"cn";import{jsx as t,jsxs as a}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{DropdownMenuRadioGroup as l,DropdownMenuRadioItem as r}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{cn as s}from"cn";import{jsx as t,jsxs as a}from"react/jsx-runtime";function C({value:i,onValueChange:n,options:o,itemClassName:d}){return t(l,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(r,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:s("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{C};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M}from"./chunk-1ppfn0e1.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as d,DropdownMenuContent as m,DropdownMenuGroup as w,DropdownMenuItem as i,DropdownMenuLabel as S,DropdownMenuTrigger as c}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as a}from"react/jsx-runtime";var D=["requires_action","running","done","idle"];function xr({sessions:l,onSelect:p,t:n}){return e("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":n("sessionList.states.title"),children:D.map((o)=>{let s=l.filter((t)=>t.state===o),r=n(`sessionList.states.${o}`);return a(d,{children:[a(c,{render:e(u,{variant:"ghost",size:"xs"}),"aria-label":`${r}: ${s.length}`,children:[e(M,{state:o,pulse:!1}),e("span",{className:"tabular-nums",children:s.length})]}),e(m,{"aria-label":r,className:"w-72 max-w-[calc(100vw-1rem)]",children:a(w,{children:[e(S,{children:r}),s.length===0?e(i,{disabled:!0,children:n("sessionList.states.empty")}):s.map((t)=>a(i,{onClick:()=>p(t),children:[e(M,{state:t.state,pulse:!1}),e("span",{className:"min-w-0 flex-1 truncate",children:t.title||n("sessionList.untitled")})]},t.sessionId))]})})]},o)})})}
|
|
2
2
|
export{xr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Kr(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function zo(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(Kr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Vo(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function qr(t){return[...t].filter((e)=>!s(e)).join("")}function or(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function _t(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=qr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-or(e,o)),r=Math.max(0,i-or(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
|
|
2
|
+
export{Kr,zo,Vo,qr,or,_t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var ia=["full","compact","codexUI"];function Lo(t){return t==="compact"||t==="codexUI"}var jr=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function L(t){let o=jr.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ra(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{ia,Lo,jr,L,ra};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ii}from"./chunk-m7wn4z9x.js";import{Dialog as E,DialogClose as X,DialogContent as _,DialogTitle as L}from"@nyssance/shadcn/vega/components/ui/dialog";import{cn as v}from"cn";import{XIcon as j}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as A,useRef as N,useState as b}from"react";import{jsx as i,jsxs as F}from"react/jsx-runtime";function oi({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=A(()=>{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(E,{open:l,onOpenChange:y,children:F(_,{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(L,{className:"sr-only",children:M||"Image preview"}),i(X,{"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(j,{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?ii({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{oi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Jo(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{Jo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var Li={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},Ri={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function M({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=Li[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",Ri.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
|
|
2
|
+
export{Li,Ri,M};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{wn}from"./chunk-xmstt6hh.js";import{C}from"./chunk-0vhkv9ax.js";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as W,DropdownMenuCheckboxItem as Z,DropdownMenuContent as q,DropdownMenuGroup as D,DropdownMenuItem as y,DropdownMenuLabel as L,DropdownMenuSeparator as u,DropdownMenuSub as S,DropdownMenuSubContent as T,DropdownMenuSubTrigger as O,DropdownMenuTrigger as H}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as ue}from"@nyssance/shadcn/vega/components/ui/switch";import{Tooltip as J,TooltipContent as K,TooltipTrigger as Q}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as r}from"cn";import{ArrowUpRight as pe,ChevronUp as X,Loader2Icon as Y,Zap as E}from"lucide-react";import{Fragment as ce,useState as ee}from"react";import{jsx as e,jsxs as a,Fragment as p}from"react/jsx-runtime";function Uo({value:c,onChange:ne,models:x,modelGroups:V,compactCatalog:t,effortPresentation:j="slider",unavailableEffort:v,providerMenu:h,header:w,className:B,condensed:z,stripLabelPrefix:_,showDescription:ae,showModelList:se=!0,loading:ie,switching:G,isLoading:oe,effortConfig:s,booleanOptions:k,onBooleanChange:R,selectOptions:te=[],t:m,...d}){let[le,de]=ee(!1),[re,me]=ee(!1),l=k?.find((n)=>n.id==="fast_mode"),I=t?k?.filter((n)=>n!==l):k,P=(n)=>_&&n.startsWith(_)?n.slice(_.length):n;if(ie)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(Y,{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(W,{open:le,onOpenChange:de,children:[a(J,{children:[e(Q,{render:e(H,{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(X,{className:"size-2.5 shrink-0 opacity-60"})]})})}),e(K,{children:m("model.switchProvider")})]}),a(q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((n,o)=>a(ce,{children:[o>0&&n.length>0&&e(u,{}),e(C,{value:h.value,onValueChange:h.onChange,options:n})]},o)),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(W,{open:re,onOpenChange:me,children:[a(J,{children:[e(Q,{render:e(H,{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,k?.some((n)=>n.id==="fast_mode"&&n.currentValue&&!n.disabled)&&e(E,{"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,o)=>o.name.length>n.length?o.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(Y,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(X,{className:r("size-3 shrink-0",z&&"size-2.5")})]})})}),e(K,{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]",t&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[t&&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(wn,{...s,disabled:d.disabled})}):a(S,{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(T,{children:e(C,{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(Z,{"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(E,{className:"size-4","aria-hidden":"true"})})]}),e(u,{className:"shrink-0"})]}),w&&!t&&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":t?"":void 0,className:t?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[se&&(oe?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),o=x.filter((i)=>i.more),F=n.length>0&&o.length>0,N=(i,g)=>({disabled:d.disabled,icon:i.icon,value:i.api_id,label:P(i.label),description:g?.noDescription?void 0:ae?i.description:void 0}),M=(i)=>{let g=x.find((f)=>f.api_id===i);if(g)ne(g)};if(t)return e(C,{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),f=i.models.filter((b)=>b.more),U=g.length>0&&f.length>0;return a(D,{children:[e(L,{className:"text-muted-foreground text-xs font-normal",children:i.name}),e(C,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(U?g:i.models).map((b)=>N(b))}),U&&a(S,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(C,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:f.map((b)=>N(b,{noDescription:!0}))})})]})]},i.id)}):e(C,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(F?n:x).map((i)=>N(i))}),!V&&F&&a(S,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(C,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:o.map((i)=>N(i,{noDescription:!0}))})})]})]})})()),!t&&s&&a(p,{children:[e(u,{}),j==="menu"?a(S,{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(T,{children:e(C,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(wn,{...s,disabled:d.disabled})]}),!t&&!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})]})]}),te.map((n)=>a(D,{children:[e(u,{}),e(L,{children:n.name}),e(C,{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)=>t?a(Z,{"aria-label":n.name,title:n.title,disabled:d.disabled||n.disabled,checked:n.currentValue,closeOnClick:!1,onCheckedChange:(o)=>R?.(n.id,o),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(ue,{"aria-label":n.name,disabled:d.disabled||n.disabled,checked:n.currentValue,onCheckedChange:(o)=>R?.(n.id,o)})]},n.id))]})]}),t&&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{Uo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-f3924gdb.js";import{Et,Lt}from"./chunk-8t36vprh.js";import{tt}from"./chunk-8c042xya.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function dr({providers:n,store:l}){let{t:m}=e().host,d=Et(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=tt(s.id,o.api_id);return t(S,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function S({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Lt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
|
|
2
|
+
export{dr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function
|
|
2
|
-
export{
|
|
1
|
+
function a(t){if(t.path.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t.path))return t.path;return`${t.root.replace(/[\\/]+$/,"")}/${t.path}`}function pt(t,o=50){return t.slice(0,o).map((e)=>{let r=a(e);return{key:r,label:e.path,payload:r,description:e.match_type==="directory"?"/":""}})}
|
|
2
|
+
export{pt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{be}from"./chunk-3yvd77ph.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function Mi({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:be(t)}):null}function Ai({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Mi,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function qt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Ai,{label:t,shortcut:o}):t})]})}
|
|
2
|
+
export{Mi,Ai,qt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ce}from"./chunk-f8zy35gz.js";import{useEffect as s,useState as w}from"react";function Ei(){let[i,e]=w(!1);return s(()=>{let t=Ce()?"Meta":"Control",o=(n)=>{if(n.key===t)e(!0)},r=(n)=>{if(n.key===t)e(!1)},d=()=>e(!1);return window.addEventListener("keydown",o),window.addEventListener("keyup",r),window.addEventListener("blur",d),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",r),window.removeEventListener("blur",d)}},[]),i}
|
|
2
|
+
export{Ei};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function Yo(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
|
|
2
|
+
export{Yo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-zxkvvecz.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 $r(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 Fo({blocks:e}){return s(yn,{files:$r(e)})}function yn({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{$r,Fo,yn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{d}from"./chunk-xyvqcpjx.js";import{cn as a}from"cn";import{motion as g}from"motion/react";import{jsx as i,jsxs as u}from"react/jsx-runtime";function Ni({active:t,expanded:r=!1,highlight:s=!0,className:o,...l}){return i("button",{type:"button","data-active":t?"":void 0,"aria-current":t?"page":void 0,className:a(s&&d,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height)] min-w-[var(--navigation-row-height)]":"size-[var(--navigation-row-height)]",o),...l})}function Sr({tabs:t,view:r,onViewChange:s,onReset:o,notifications:l,className:p}){return i("div",{className:a("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",p),children:i("div",{role:"tablist",className:`${d} bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-full flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]`,children:t.map((e)=>{let n=r===e.key;return u(Ni,{role:"tab",active:n,expanded:n,highlight:!1,"aria-selected":n,title:e.title,onClick:()=>s(e.key),onDoubleClick:o&&(()=>o(e.key)),className:a("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-4 [&_svg]:shrink-0",n?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[n&&i(g.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-blue-500 pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:a("relative z-10 grid",n?"ms-2 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})})})}
|
|
2
|
+
export{Ni,Sr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-ye9tsdhn.js";import{bt}from"./chunk-cg8ekwka.js";import{Badge as i}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{FileIcon as r,XIcon as l}from"lucide-react";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Rn({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(i,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(r,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:bt(e)}),o(m,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:bt(e)}),onClick:()=>n(e),children:o(l,{className:"size-3"})})]},e))})}
|
|
2
|
+
export{Rn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{S}from"./chunk-8w22ck92.js";import{s}from"./chunk-80ckz04b.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Nr({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return S(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{Nr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function An({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{An};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ce}from"./chunk-f8zy35gz.js";function Hi(r){let s=Ce(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function be(r){return Hi(r).join(Ce()?"":"+")}
|
|
2
|
+
export{Hi,be};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Uo}from"./chunk-1q2cykp4.js";import{n}from"./chunk-ye9tsdhn.js";import{e,m}from"./chunk-f3924gdb.js";import{B,p,G}from"./chunk-y7xcync7.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{useRef as H}from"react";import{jsx as I}from"react/jsx-runtime";function gt({sessionId:l,options:g,disabled:x,onModelChange:b,onConfigChange:O,defaultGroup:L={id:"models",name:"Models"},catalog:N=(c)=>c,headerAction:P}){let{host:c,client:k}=e(),{t:i}=c,z=n((o)=>Boolean(o.configPending[l])),M=H({sessionId:l,model:!0}),_=z&&(M.current.sessionId!==l||M.current.model),R=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=p(g,"model"),a=p(g,"thought_level"),v=g.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),S=v.filter(D),f=v.filter(A);if(!t&&!a&&S.length===0&&f.length===0)return null;let u=(o,r)=>{if(r===o.currentValue)return Promise.resolve();M.current={sessionId:l,model:o===t};let d=O?O(o.configId,r):k.setConfig(l,o.configId,r);return m(c,d),d},h=a?B(a):[],E=h.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),U=t?G(t):i("composer.model"),V=(o)=>({api_id:o.value,label:o.name}),y=N(t&&Z(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(V)})):[{...L,models:t?B(t).map(V):[]}]),w=y.flatMap((o)=>o.models),C=w.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:U},s=f.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return I(Uo,{disabled:x||_||R,switching:_,value:{...C,label:C.shortLabel??C.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(o)=>{if(o.api_id===t?.currentValue)return;if(b)b(o.api_id);else if(t)u(t,o.api_id)},header:{name:t?.name??i("composer.model"),action:P},modelGroups:y,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:B(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:I(F,{className:"size-4","aria-hidden":"true"})},...f.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:f.find((q)=>q.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);u(d,r)}})}
|
|
2
|
+
export{gt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{xi}from"./chunk-emcefs0g.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function vi({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=xi(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
|
|
2
|
+
export{vi};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(
|
|
3
|
-
${f.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{zo,Vo,_t}from"./chunk-14exd146.js";import{qe,_}from"./chunk-x2yc5748.js";import{InputGroupTextarea as A}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as D}from"cn";import{forwardRef as M,useCallback as R,useEffect as x,useImperativeHandle as F,useRef as d}from"react";import{jsx as L}from"react/jsx-runtime";var K=(c)=>!c.shiftKey,z=()=>!1,Cn=M(({onChange:c,onCompositionStart:T,onCompositionEnd:b,className:y,placeholder:E,bashMode:I=!1,isSendShortcut:C=K,isNewlineShortcut:H=z,...h},S)=>{let n=qe(),p=_(),u=d(!1),i=d(!1),a=d(null),l=d(null),o=R(()=>{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 m=I&&(n?.textInput.value??"").startsWith("!"),P=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||i.current)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
|
+
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:s,value:f}=t,g=`${f.slice(0,r)}
|
|
3
|
+
${f.slice(s)}`;if(n)n.textInput.setInput(g);else t.value=g;let v=r+1;t.setSelectionRange(v,v),o();return}if(C(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)}},w=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:s}=zo(t),f=Vo(t);if(r.length>0)e.preventDefault(),p.add(r);else if(s&&!f)e.preventDefault()},k=n?{value:u.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:_t(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!u.current)_t(e.currentTarget);o(),c?.(e)}};return F(S,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||i.current,getTextarea:()=>a.current}),[]),L(A,{"data-chat-input":!0,ref:a,rows:3,className:D("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",y),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=_t(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),b?.(e),i.current=!0,requestAnimationFrame(()=>{i.current=!1})},onCompositionStart:(e)=>{i.current=!1,u.current=!0,T?.(e)},onKeyDown:P,onPaste:w,placeholder:E,...h,...k})});Cn.displayName="PromptInputTextarea";
|
|
4
|
+
export{Cn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Xo,se}from"./chunk-3n47hknp.js";import{Qo}from"./chunk-b614gnnv.js";import{kn,Sn,$e,qe,_n}from"./chunk-x2yc5748.js";import{InputGroup as be,InputGroupAddon as Z,InputGroupButton as ee}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as P}from"cn";import{ArrowUpIcon as ve,Loader2Icon as he,SquareIcon as Pe,XIcon as Ie}from"lucide-react";import{Children as V,useCallback as h,useEffect as F,useMemo as ye,useRef as M,useState as xe}from"react";import{flushSync as Le}from"react-dom";import{jsx as a,jsxs as Te}from"react/jsx-runtime";function Y(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var jo=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:re,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:ne,children:oe,...ie})=>{let s=qe(),l=!!s,ae=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ue,D]=xe([]),c=l?s.attachments.files:ue,U=M(c);U.current=c;let le=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),pe=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let K=[];for(let T of _){let Q=I?.sourcePath(T);K.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...Q===void 0?{}:{sourcePath:Q}})}return[...i,...K]})},[I,O,B,z,H,b]),me=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),ce=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:pe,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(Xo(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${se}MB.`});return}}W(r)},[c,W,b]),G=l?s.attachments.remove:me,N=l?s.attachments.clear:ce,j=l?s.attachments.openFileDialog:le;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let de=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},q=ye(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:G,clear:N,openFileDialog:j,fileInputRef:x}),[c,L,G,N,j]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let X=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Y(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Y(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await Qo(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await ne({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},fe=(e)=>{e.preventDefault(),X(e).catch(y)},ge=h((e)=>{if(!e.trim())return;if(l&&s)Le(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),J=a(Sn.Provider,{value:()=>X(null),children:Te(kn.Provider,{value:ge,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:re,onChange:de,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:fe,ref:A,"data-tour":"chat-input",...ie,children:a(be,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ae&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:oe})})]})});return l?a($e.Provider,{value:q,children:J}):a(_n.Provider,{value:q,children:J})};function $o({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function Ko({className:u,...o}){return a(Z,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function qo({className:u,...o}){return a(Z,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Wo({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var te=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||V.count(y.children)<=1?"icon-xs":"xs";return a(ee,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||V.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},Zo=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ve,{className:"size-4"});if(d==="submitted")g=a(he,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(Pe,{className:"size-3 fill-current"});else if(d==="error")g=a(Ie,{className:"size-4"});return a(ee,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
|
|
2
|
+
export{jo,$o,Ko,qo,Wo,te,Zo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Fi}from"./chunk-80ckz04b.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Xi({host:o,children:t}){return s(n,{value:o,children:t})}function x(){let o=i(n),e={...Fi(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function zn(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function Y(){let o=x();return(t)=>zn(o,t)}function Vn(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
+
export{Xi,x,zn,Y,Vn};
|