@alwith/module-chat 0.5.26 → 0.5.27
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-02mwhdhw.js +2 -0
- package/dist/{chunk-rsp574n3.js → chunk-074wn2jr.js} +2 -2
- package/dist/{chunk-jnc6b9r3.js → chunk-0stda83g.js} +2 -2
- package/dist/{chunk-k2gwmccn.js → chunk-0tzra5rn.js} +1 -1
- package/dist/{chunk-w233xc7k.js → chunk-0v2d2kme.js} +3 -3
- package/dist/chunk-0w6g1w1a.js +2 -0
- package/dist/chunk-0wr12bg8.js +2 -0
- package/dist/{chunk-a63k8tht.js → chunk-1341xyde.js} +2 -2
- package/dist/{chunk-xdm2are3.js → chunk-18j37y1m.js} +2 -2
- package/dist/{chunk-1zh28e39.js → chunk-1mcg9mwq.js} +2 -2
- package/dist/chunk-1sxf2rqx.js +2 -0
- package/dist/chunk-2aw4d623.js +2 -0
- package/dist/chunk-2fgwkj52.js +3 -0
- package/dist/{chunk-3jwbx8ch.js → chunk-2twh547k.js} +2 -2
- package/dist/{chunk-q0fhp33b.js → chunk-3137n54p.js} +2 -2
- package/dist/{chunk-x5swmb1j.js → chunk-31s3s58d.js} +2 -2
- package/dist/{chunk-nv3z0brr.js → chunk-3jd4dkv4.js} +2 -2
- package/dist/chunk-3jw1yt27.js +2 -0
- package/dist/{chunk-f06zyvek.js → chunk-3kk0rxch.js} +2 -2
- package/dist/{chunk-pv5g85k0.js → chunk-41z12m3j.js} +4 -4
- package/dist/{chunk-hf3t1bxh.js → chunk-45542yk3.js} +2 -2
- package/dist/{chunk-t2z4venp.js → chunk-4edeen4z.js} +2 -2
- package/dist/{chunk-wgta9nfd.js → chunk-4j2c9r6m.js} +2 -2
- package/dist/{chunk-81paw5rb.js → chunk-4kbkbvjp.js} +2 -2
- package/dist/chunk-4phhhm7t.js +2 -0
- package/dist/{chunk-a15vdarc.js → chunk-4saf1qa5.js} +2 -2
- package/dist/{chunk-n8yww1mr.js → chunk-53qt3tjb.js} +1 -1
- package/dist/chunk-546h1tk7.js +2 -0
- package/dist/{chunk-6g7btgsr.js → chunk-5b19mbh6.js} +2 -2
- package/dist/{chunk-jsabvejp.js → chunk-5t5y5e8n.js} +1 -1
- package/dist/{chunk-b7z51agd.js → chunk-5yb7twvm.js} +1 -1
- package/dist/{chunk-h9m4z5dk.js → chunk-5ysapftt.js} +3 -3
- package/dist/{chunk-s7yzvpmc.js → chunk-5yzjwrat.js} +3 -3
- package/dist/{chunk-rezwwmw7.js → chunk-6e1bwjtk.js} +2 -2
- package/dist/{chunk-8zrfdjy4.js → chunk-6k8m2c80.js} +2 -2
- package/dist/{chunk-ap6sr2c6.js → chunk-6t5war9h.js} +2 -2
- package/dist/{chunk-v5mzxjzc.js → chunk-6vntcyv6.js} +2 -2
- package/dist/{chunk-rp39j6ed.js → chunk-6w6yy1md.js} +2 -2
- package/dist/{chunk-ef99py8a.js → chunk-6whr1y2s.js} +2 -2
- package/dist/{chunk-81r1geaz.js → chunk-75vtd3ww.js} +2 -2
- package/dist/{chunk-1dbc0cfj.js → chunk-79jjxyb7.js} +2 -2
- package/dist/{chunk-22tg663v.js → chunk-7x1qnb20.js} +2 -2
- package/dist/chunk-7zryea1b.js +2 -0
- package/dist/{chunk-46phvpzh.js → chunk-84yjrafh.js} +2 -2
- package/dist/{chunk-fgk4f0jq.js → chunk-8a61phqa.js} +2 -2
- package/dist/{chunk-725wv6ca.js → chunk-8bdeyvy3.js} +2 -2
- package/dist/chunk-8fnjpx11.js +2 -0
- package/dist/{chunk-awfvvmjt.js → chunk-8gztbvxt.js} +2 -2
- package/dist/chunk-8kwxqckk.js +2 -0
- package/dist/{chunk-3xh0e0ya.js → chunk-8qyb69g5.js} +1 -1
- package/dist/{chunk-qn4zvgc9.js → chunk-8xb3b71p.js} +2 -2
- package/dist/{chunk-92xxp77d.js → chunk-90r8y97z.js} +2 -2
- package/dist/{chunk-vr0dfq9w.js → chunk-91zvyqnt.js} +2 -2
- package/dist/chunk-93y78gn4.js +2 -0
- package/dist/{chunk-10emnq39.js → chunk-95mynf7q.js} +2 -2
- package/dist/{chunk-wtf1eyzy.js → chunk-95qfzbmx.js} +1 -1
- package/dist/{chunk-nh0s0y35.js → chunk-98cbjkvk.js} +3 -3
- package/dist/{chunk-bfcswk98.js → chunk-99w9jq4v.js} +2 -2
- package/dist/{chunk-1k21j77z.js → chunk-9cqpn67f.js} +2 -2
- package/dist/chunk-9gt81b51.js +2 -0
- package/dist/{chunk-ch5v5zsw.js → chunk-9x0qmswv.js} +1 -1
- package/dist/chunk-az5ayr2d.js +2 -0
- package/dist/{chunk-pqphdgp6.js → chunk-b67h7yss.js} +1 -1
- package/dist/chunk-bfqqsv6a.js +2 -0
- package/dist/{chunk-nsb0d92p.js → chunk-br9wsczn.js} +2 -2
- package/dist/{chunk-vgrjqwbq.js → chunk-c0b3zze8.js} +2 -2
- package/dist/chunk-c26xgmyr.js +2 -0
- package/dist/chunk-cd4v63j8.js +2 -0
- package/dist/{chunk-dwn6bx69.js → chunk-d0cb9bks.js} +1 -1
- package/dist/{chunk-gha517v4.js → chunk-d0w04ydg.js} +2 -2
- package/dist/chunk-dtsybj2a.js +2 -0
- package/dist/{chunk-btdrvsgy.js → chunk-dxgha4a2.js} +2 -2
- package/dist/{chunk-2x9mxyxr.js → chunk-e2q5znh5.js} +2 -2
- package/dist/{chunk-rnrs0cqn.js → chunk-e43x30mv.js} +1 -1
- package/dist/{chunk-y1mqx60y.js → chunk-ee0krzt0.js} +2 -2
- package/dist/chunk-eg86g265.js +2 -0
- package/dist/{chunk-crx8p5zx.js → chunk-ehdqspxk.js} +2 -2
- package/dist/chunk-ek4acj2p.js +2 -0
- package/dist/{chunk-k1vkc88d.js → chunk-epg5w48v.js} +2 -2
- package/dist/chunk-eqwga6j5.js +2 -0
- package/dist/{chunk-7a668qzy.js → chunk-famkkndg.js} +2 -2
- package/dist/{chunk-tv0fwt2g.js → chunk-fpmspg92.js} +2 -2
- package/dist/{chunk-htzd730z.js → chunk-frbakxev.js} +2 -2
- package/dist/chunk-g7by9ta9.js +2 -0
- package/dist/{chunk-0kdemqjf.js → chunk-ggehtpkh.js} +2 -2
- package/dist/{chunk-fbq107z8.js → chunk-gsnqwd84.js} +2 -2
- package/dist/{chunk-5c5z2b48.js → chunk-h2ewgw0x.js} +2 -2
- package/dist/chunk-h6jkgcw1.js +2 -0
- package/dist/{chunk-e7j7mnmz.js → chunk-hck587pb.js} +2 -2
- package/dist/{chunk-b6nbarjg.js → chunk-hcwgc3r7.js} +2 -2
- package/dist/{chunk-2ac213n3.js → chunk-hs91aaaz.js} +2 -2
- package/dist/{chunk-w8qn76a1.js → chunk-htjpckp6.js} +5 -5
- package/dist/{chunk-4vk86bbk.js → chunk-jan870w7.js} +3 -3
- package/dist/{chunk-77cd8tev.js → chunk-jgwrjncj.js} +2 -2
- package/dist/{chunk-99ftqpgg.js → chunk-jkvqtwe6.js} +1 -1
- package/dist/{chunk-04kcmpnb.js → chunk-jrmygc4p.js} +1 -1
- package/dist/{chunk-tpwdaz8k.js → chunk-jrnfqqfc.js} +2 -2
- package/dist/{chunk-gjvpthp9.js → chunk-k2q7wjp6.js} +2 -2
- package/dist/{chunk-ymy8d3hp.js → chunk-k3e8wper.js} +3 -3
- package/dist/{chunk-t7drk9ja.js → chunk-kd87rt80.js} +2 -2
- package/dist/{chunk-3p9g44yz.js → chunk-m4eqmf0x.js} +5 -5
- package/dist/{chunk-j2y4wx1h.js → chunk-m9rgwr0p.js} +2 -2
- package/dist/{chunk-pp2qkwk7.js → chunk-n368fh3r.js} +3 -3
- package/dist/{chunk-y7ngqt59.js → chunk-ngqr3n0s.js} +2 -2
- package/dist/{chunk-hk66xnxp.js → chunk-pgqsw2sh.js} +2 -2
- package/dist/{chunk-xdvbb3av.js → chunk-pym8eb5y.js} +2 -2
- package/dist/{chunk-jst7n5r4.js → chunk-q0z9jq6p.js} +1 -1
- package/dist/{chunk-f7ggbprz.js → chunk-q70h5z14.js} +2 -2
- package/dist/{chunk-mttcvwhx.js → chunk-qd7jqtqr.js} +2 -2
- package/dist/{chunk-d3j5904d.js → chunk-qnc6w06c.js} +2 -2
- package/dist/{chunk-bvgqsaey.js → chunk-qxgmjjh2.js} +2 -2
- package/dist/{chunk-nr3spt0n.js → chunk-qy06pvy8.js} +2 -2
- package/dist/{chunk-09zfz3ap.js → chunk-r7svwjdg.js} +2 -2
- package/dist/{chunk-708232f3.js → chunk-rf5g26qv.js} +1 -1
- package/dist/chunk-rfn9vecr.js +2 -0
- package/dist/{chunk-667z0pac.js → chunk-s3h496tf.js} +2 -2
- package/dist/{chunk-03x33m2h.js → chunk-s56e2286.js} +2 -2
- package/dist/{chunk-dfcks9g4.js → chunk-s6m0ske7.js} +2 -2
- package/dist/{chunk-yez26qfc.js → chunk-scxhc46w.js} +2 -2
- package/dist/{chunk-hza92pfj.js → chunk-secfh4re.js} +2 -2
- package/dist/{chunk-nn72eqzh.js → chunk-shwnd0ta.js} +2 -2
- package/dist/{chunk-4qp43adx.js → chunk-sp39pqt6.js} +2 -2
- package/dist/{chunk-heyqzkxq.js → chunk-spfbykq8.js} +2 -2
- package/dist/{chunk-b1rvs016.js → chunk-srpsc10y.js} +1 -1
- package/dist/{chunk-jkbss7sb.js → chunk-szwq5b69.js} +1 -1
- package/dist/{chunk-730x182s.js → chunk-t3s1ydnq.js} +2 -2
- package/dist/{chunk-2apyrry0.js → chunk-thzq3tfa.js} +2 -2
- package/dist/chunk-tjkftq6f.js +2 -0
- package/dist/{chunk-pzmeeawh.js → chunk-tk2471ny.js} +1 -1
- package/dist/{chunk-epq42kf9.js → chunk-tk4t9h7r.js} +1 -1
- package/dist/{chunk-p58e9z34.js → chunk-v3etjs4w.js} +2 -2
- package/dist/{chunk-a5htm58g.js → chunk-v7rtfzg4.js} +2 -2
- package/dist/{chunk-wnn9r2r6.js → chunk-vm2qb3ns.js} +2 -2
- package/dist/chunk-wc53vqaw.js +2 -0
- package/dist/chunk-wcgwtn6h.js +2 -0
- package/dist/{chunk-chq163r8.js → chunk-wdrzhaxf.js} +2 -2
- package/dist/{chunk-sdf73s05.js → chunk-wpn4rdwv.js} +3 -3
- package/dist/{chunk-ce3wg766.js → chunk-x52rbm87.js} +2 -2
- package/dist/chunk-x54538jy.js +1 -0
- package/dist/{chunk-sjg8df4m.js → chunk-xhrs52gv.js} +2 -2
- package/dist/{chunk-g9gktxv9.js → chunk-xz6pb64j.js} +2 -2
- package/dist/chunk-yg6vhdq9.js +2 -0
- package/dist/{chunk-7appp9ad.js → chunk-z3dwf54f.js} +1 -1
- package/dist/{chunk-zyvvk8b2.js → chunk-z8njjc2c.js} +2 -2
- package/dist/{chunk-8xdak312.js → chunk-zfxwm1g9.js} +2 -2
- package/dist/chunk-zk6745qh.js +2 -0
- package/dist/{chunk-4jghs8rf.js → chunk-zx27nf5b.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/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/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/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/lib/code-highlighter.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.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/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +52 -0
- 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/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/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.d.ts +52 -0
- package/dist/session-list/locales.js +1 -1
- package/dist/session-list/navigation-controls.d.ts +9 -0
- package/dist/session-list/navigation-controls.js +1 -0
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.d.ts +2 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.css +11 -0
- package/dist/session-list/session-list.d.ts +1 -0
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/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/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.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-04xjj6q3.js +0 -2
- package/dist/chunk-13yrk1nh.js +0 -2
- package/dist/chunk-2djv6s3a.js +0 -2
- package/dist/chunk-2dvryx1q.js +0 -2
- package/dist/chunk-2qgz3m2a.js +0 -2
- package/dist/chunk-3f3y9t21.js +0 -2
- package/dist/chunk-3mfdf7f8.js +0 -2
- package/dist/chunk-6fefnp6e.js +0 -2
- package/dist/chunk-6t98jn94.js +0 -2
- package/dist/chunk-9geb2z3g.js +0 -3
- package/dist/chunk-9mky3b7v.js +0 -2
- package/dist/chunk-a3tbf7mx.js +0 -2
- package/dist/chunk-a90z5e8w.js +0 -2
- package/dist/chunk-ab0err7k.js +0 -2
- package/dist/chunk-fprj3wy4.js +0 -2
- package/dist/chunk-h1f8wgyb.js +0 -2
- package/dist/chunk-k0dnnn77.js +0 -2
- package/dist/chunk-kpp4v1hs.js +0 -1
- package/dist/chunk-mahpnk66.js +0 -2
- package/dist/chunk-mzpdh336.js +0 -2
- package/dist/chunk-n432m43g.js +0 -2
- package/dist/chunk-p272qmbv.js +0 -2
- package/dist/chunk-p3hxcpfy.js +0 -2
- package/dist/chunk-py0zbgaj.js +0 -2
- package/dist/chunk-qn2jfxff.js +0 -2
- package/dist/chunk-rvh3nbvm.js +0 -2
- package/dist/chunk-s2w7e9pg.js +0 -2
- package/dist/chunk-v0p94epn.js +0 -2
- package/dist/chunk-wsbh4n9e.js +0 -2
- package/dist/chunk-zacep5bq.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function
|
|
3
|
-
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function
|
|
4
|
-
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Qo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(
|
|
5
|
-
export{
|
|
1
|
+
import{vn}from"./chunk-0v2d2kme.js";import{t}from"./chunk-z8njjc2c.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 Vr(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 jr(o){let s=new Map,e=null;for(let n of o.split(`
|
|
3
|
+
`)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function $r(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?jr(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?Vr(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
|
|
4
|
+
${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Qo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(vn,{files:$r(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
|
|
5
|
+
export{Vr,jr,$r,Qo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Do}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Do}from"./chunk-tk4t9h7r.js";import{e,f}from"./chunk-epg5w48v.js";import{B,g}from"./chunk-6vntcyv6.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=B(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),I=p.find((n)=>n.value===o),C=d[o]??a,v=(n)=>{if(n===o)return;f(l,c?c(s.configId,n):M.setConfig(u,s.configId,n))};return t(Do,{value:o,warning:o==="agent-full-access",currentName:I?.name??o,icon:t(C,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:h,label:r("composer.switchPermissionMode"),onValueChange:v,options:p.map((n)=>{let i=d[n.value]??a,k=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":k?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var qt=O(N);
|
|
2
|
+
export{qt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}function T({subject:t,requestTitle:o}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(
|
|
3
|
-
export{
|
|
1
|
+
import{Bo}from"./chunk-1mcg9mwq.js";import{Oo}from"./chunk-s6m0ske7.js";import{Uo}from"./chunk-31s3s58d.js";import{Je}from"./chunk-8a61phqa.js";import{n}from"./chunk-z8njjc2c.js";import{e}from"./chunk-epg5w48v.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ee(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
+
`)}function T({subject:t,requestTitle:o}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Je,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Bo,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function Xe({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=n((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Oo,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:r.t,onRespond:l})}function be({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:o,onRespond:s});if(Ee(t))return a(Xe,{action:t,total:o??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Uo,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
+
export{Ee,Xe,be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=new Map;var a=0;function
|
|
2
|
-
export{
|
|
1
|
+
var t=new Map;var a=0;function kn(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=kn(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function bi(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
+
export{kn,bi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-z8njjc2c.js";import{et}from"./chunk-k2q7wjp6.js";import{e,f}from"./chunk-epg5w48v.js";import{Loader2Icon as v}from"lucide-react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as p,EmptyDescription as c,EmptyHeader as l,EmptyTitle as d}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Zt({session:t,timeline:y}){let{host:m,client:s}=e(),{t:i}=m,u=n((h)=>h.historyPages[t.id]?.cursor!=null),E=()=>f(m,s.open(t.id,t.cwd)),a=o(et,{...y,session:t,client:s,host:m});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):a;if(!t.attached&&t.items.length===0)return r(p,{className:"flex-1",children:[r(l,{children:[o(d,{children:i("conversation.reopen")}),o(c,{children:i("conversation.detached")})]}),o(x,{onClick:E,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(p,{className:"flex-1",children:r(l,{children:[o(d,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(c,{className:"truncate font-mono",children:t.cwd})]})});return a}
|
|
2
|
+
export{Zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{vt}from"./chunk-v3etjs4w.js";import{useEffect as v,useRef as P,useState as u}from"react";var t="plugin:alwith-chat|",zn="providers:changed",Vn="providers:managed-revoked";function Wi({invoke:r,listen:s}){return{read:()=>r(`${t}providers_read`),save:(e,o,d)=>r(`${t}providers_save`,{providerId:o,input:d,expectedRevision:e}),saveCustom:(e,o)=>r(`${t}providers_save_custom`,{input:o,expectedRevision:e}),removeCustom:(e,o)=>r(`${t}providers_remove_custom`,{providerId:o,expectedRevision:e}),test:(e)=>r(`${t}providers_test`,{providerId:e}),apply:()=>r(`${t}providers_apply`),onChanged:(e)=>s(zn,(o)=>e(o.payload))}}function Zi({invoke:r,listen:s}){return{bind:(e)=>r(`${t}providers_account_bind`,{account:e}),refresh:(e,o)=>r(`${t}providers_refresh_managed`,{generation:e,accessToken:o}),clear:()=>r(`${t}providers_clear_managed`),onRevoked:(e)=>s(Vn,(o)=>e(o.payload.sessionIds))}}async function gt(r){try{return await r.apply()}catch(s){if(!vt(s))throw s;return r.read()}}function ft(r,s=console.error){let[e,o]=u(null),d=P(s);return d.current=s,v(()=>{let a=!0,p=r.onChanged((i)=>{if(a)o((n)=>n&&n.revision>i.revision?n:i)});return p.then(()=>r.read()).then((i)=>{if(a)o((n)=>n&&n.revision>=i.revision?n:i)}).catch((i)=>{if(a)d.current(i)}),()=>{a=!1,p.then((i)=>i())}},[r]),e}
|
|
2
|
+
export{zn,Vn,Wi,Zi,gt,ft};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ge}from"./chunk-bfqqsv6a.js";import{useEffect as s,useState as w}from"react";function eo(){let[i,e]=w(!1);return s(()=>{let t=ge()?"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
2
|
export{eo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function Ii(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
|
|
2
|
+
export{Ii};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-z8njjc2c.js";import{e}from"./chunk-epg5w48v.js";import{codexExtensionCapabilities as w,codexTurnId as M,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useMemo as C,useRef as O,useState as P}from"react";function Wt(r,g,c,y){let{client:S}=e(),R=n((t)=>w(t.agent).composerPredictions),k=C(()=>r.items.findLast((t)=>t.kind==="user"),[r.items]),i=M(k?._meta),_=C(()=>r.configOptions.flatMap((t)=>F(t)||B(t)?[[t.configId,t.currentValue]]:[]).toSorted(([t],[l])=>String(t).localeCompare(String(l))),[r.configOptions]),o=JSON.stringify([r.id,i,_]),s=j(r._meta),d=r._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,u=O(null),f=O(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,q]=P(null),[v,x]=P(null),p=y&&R&&g&&r.state==="idle"&&r.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===o||u.current?.key===o||i===null)return;let t={key:o,previousResult:m};u.current=t,x(null),S.requestPrediction(r.id,i).catch((l)=>{if(f.current&&u.current===t)x({key:o,message:l instanceof Error?l.message:String(l)})})},[S,p,c,a,o,m,r.id,i]);let I=p&&!c&&a!==o&&u.current?.key===o&&u.current.previousResult!==m&&s?.sourceTurnId===i,E=I&&s.result.type==="completed"?s.result.text:null,T=y&&g&&r.state==="idle"&&!c&&a!==o?v?.key===o?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:E,error:T,invalidate:()=>{if(p)q(o)}}}
|
|
2
|
+
export{Wt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(
|
|
1
|
+
import{c}from"./chunk-90r8y97z.js";import{C,u}from"./chunk-9gt81b51.js";import{st}from"./chunk-qxgmjjh2.js";import{Se,l,_e,Oe,i}from"./chunk-95qfzbmx.js";import{L,E,Y,R,F,ae,ct}from"./chunk-x54538jy.js";import{re}from"./chunk-5yb7twvm.js";import{He}from"./chunk-p7dd93e5.js";import{h}from"./chunk-9cqpn67f.js";import{ut,I}from"./chunk-c0b3zze8.js";import{D,le}from"./chunk-fpmspg92.js";import{dt}from"./chunk-6w6yy1md.js";import{lt}from"./chunk-79jjxyb7.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ne,BookOpenIcon as se,CheckIcon as ie,CircleArrowUpIcon as oe,MoreVerticalIcon as ce,PlusIcon as U,PuzzleIcon as de,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as Q,useState as S}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ke,DialogTitle as ye,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as De}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Z}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function Me({plugin:t,marketplace:d}){let{t:p}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ie,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?p("plugins.disabledReason.unknown"):r,onClick:()=>void f({plugin:t,marketplace:d}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(U,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Ee({plugin:t,marketplace:d,actions:p,onOpen:g}){let a=X(t),f=t.interface?.developerName,m=t.localVersion??t.version,r=[f,m?`v${m}`:null].filter(Boolean).join(" · ");return s(ae,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:d})}),e(R,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(I,{name:t.name})})}),s(E,{className:"pointer-events-none relative min-w-0",children:[e(ct,{className:"mb-0.5",children:T(t)}),e(Y,{className:"line-clamp-1",title:a,children:a||d.interface?.displayName||d.name}),r&&e(Y,{"data-toolbox-metadata":"",children:r})]}),e(L,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function q(){return Oe((t)=>t.connection==="ready"&&te(t.agent))}var z=48;function ze({marketplace:t,plugins:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[f,m]=S(0),r=Math.min(f,Math.max(0,Math.ceil(d.length/z)-1));if(d.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:d.length}),t.path!==null&&s(Pe,{children:[e(Ie,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(ce,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(F,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:d.slice(r*z,(r+1)*z).map((n)=>e(Ee,{onOpen:p,plugin:n,marketplace:t,actions:e(Me,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),d.length>z&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(d.length/z)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*z>=d.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Be=fe(function({query:d,onOpen:p}){let{t:g}=l(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),m=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,T(v),X(v),v.interface?.developerName??"",...v.keywords].join(`
|
|
2
|
+
`).toLowerCase()}))})),[a]),r=Q(()=>{let n=new Set(f);return m.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:y,text:b})=>d===""?v.path!==null||n.has(y.id):b.includes(d)).map(({plugin:y})=>y)}))},[m,f,d]);return s(Z,{children:[r.map(({marketplace:n,plugins:v})=>e(ze,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,d]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Te(){let{t}=l(),d=q(),p=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[f,m]=S(""),[r,n]=S(!1),[v,x]=S(!1),[y,b]=S(null),A=async()=>{let N=f.trim();if(!N||r)return;n(!0),b(null);try{await p({source:N}),m(""),x(!1)}catch(M){b(M instanceof Error?M.message:String(M))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(oe,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:v,onOpenChange:(N)=>{if(!r)x(N)},children:[s(be,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!d}),children:[e(U,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ke,{children:[e(ye,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(De,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||f.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Ae({onOpen:t,query:d}){let p=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!p,f=ve(d.trim().toLowerCase());return e(h,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${D} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(re,{}):e(Be,{query:f,onOpen:t})]})})}function Bi({cwd:t,active:d,extensions:p,onOpenCatalog:g}){let{t:a}=l(),f=_e(),m=Se(f),r=i((o)=>o.refresh),n=i((o)=>o.loading),v=i((o)=>o.error),[x,y]=S("plugins"),[b,A]=S({plugins:"",skills:""}),N=x==="skills"?b.skills:b.plugins,M=(o)=>A((O)=>({...O,[x]:o})),ee=Oe((o)=>JSON.stringify([...new Set(o.sessionList.map((O)=>He(O.cwd,o.projectContext)).filter((O)=>O!==null))].toSorted())),H=JSON.stringify([...new Set([He(t,f.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),j=i((o)=>o.installed),V=a(x==="skills"?"plugins.skills.search":"plugins.search"),[P,G]=S(null),w=q();K(()=>{if(!d||!w)return;if(m.getState().loadedScope!==H)r(JSON.parse(H))},[d,w,r,H,m]),K(()=>{if(!w)return;return f.onSkillsChanged(()=>void r(void 0,{background:!0}))},[w,r,f]);let J=(o)=>{g?.(),y("plugins"),G(o)},_=(o)=>{g?.(),y(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(ut,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(u,{className:`${c} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(ne,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(u,{className:`${c} h-8 gap-2 px-2`,active:!p?.active&&x===o&&P===null,onClick:()=>_(o),children:[o==="plugins"?e(de,{className:"size-4"}):e(se,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(h,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(C,{children:!w||n&&j.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):j.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):j.map((o)=>s(u,{title:T(o.plugin),className:`${c} gap-2 px-2`,active:!p?.active&&P?.plugin.id===o.plugin.id,onClick:()=>J(o),children:[e(I,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Z,{children:[P&&e(dt,{entry:P,onBack:()=>_("plugins")},JSON.stringify([P.marketplace.name,P.marketplace.path,P.plugin.id,t])),s("div",{hidden:P!==null,className:P?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(le,{children:e(st,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>M(o.target.value),placeholder:V}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>M(""),children:e(ge,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!w||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),x==="plugins"&&e(Te,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!w,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Ae,{query:b.plugins,onOpen:J})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(lt,{query:b.skills,ready:w,onOpenPlugin:J})})]})]})]})})]})}
|
|
3
3
|
export{Bi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";function st({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
|
|
2
|
+
export{st};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Hn(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function Jt(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Te(t){return t.type==="array"}function mt(t){return(Te(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{Hn,Jt,Te,mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ri(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{ri};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o}from"./chunk-
|
|
1
|
+
import{o}from"./chunk-eg86g265.js";import{pe,O,te}from"./chunk-2aw4d623.js";import{useEffect as S,useMemo as f}from"react";function ar(s){let c=O((i)=>i.activityOrder),a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&pe(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=O((i)=>i.activitySeen),r=te();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
2
|
export{ar};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Ar={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Go(e){return[...e].toSorted((o,n)=>(Ar[o.kind]??99)-(Ar[n.kind]??99))}function aa(e){return e==="allow_once"||e==="allow_always"}function sa(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
+
export{Ar,Go,aa,sa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Nt({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function M({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
|
|
2
|
+
export{Nt,M};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function
|
|
2
|
-
export{
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function fi(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function pa(){c()}function hi(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function vi(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Lr(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function ma(e,n,t,i,o,a){if(a==="none")return;_(o,[Lr(e,n,t,i,a)])}function Lr(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Zr(t,i);return Er(e,n)}function Zr(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function Er(e,n){return y+Qr(e,n)}function ga(e,n){return D(Er(e,n))}function Qr(e,n){if(n<=l)return Yr(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Yr(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function fa(){return r.context?.state}function ha(e){return g(e).ready}
|
|
2
|
+
export{fi,pa,hi,vi,ma,Lr,Zr,Er,ga,Qr,Yr,fa,ha};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function
|
|
2
|
-
export{
|
|
1
|
+
import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Gr(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function Mr(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function zr(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Oo({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>Gr(e),[e]),[m,u]=A(()=>Mr(c));D(()=>u(Mr(c)),[n,c]);let g=c.every((a)=>zr(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
|
|
2
|
+
export{Gr,Mr,zr,Oo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var Ge="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function
|
|
2
|
-
export{Ge,
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var Ge="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function _t(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(Ge))n()}),[e]);return d(t,()=>o(e.get(Ge)))}async function Pt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[Ge])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[Ge]:i}})}
|
|
2
|
+
export{Ge,_t,Pt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function
|
|
2
|
-
export{
|
|
1
|
+
var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function ln(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function vo(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=ln(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
|
|
2
|
+
export{ln,vo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ot}from"./chunk-41z12m3j.js";import{l,Pe}from"./chunk-95qfzbmx.js";import{h}from"./chunk-9cqpn67f.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as c}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as a,Fragment as F}from"react/jsx-runtime";function Fn(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let i=n.replaceAll("\\","/"),t=i.lastIndexOf("/");return t<=0?"/":i.slice(0,t)}function I(n){let i=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(i.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${i.replace(/\/$/,"")}/${t.join("/")}`}function ce({path:n,renderHeader:i,description:t}){let e=l(),{t:r}=e,d=e.readFile,[u,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{let s=!1;return f(null),w(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!s)f(m)},(m)=>{if(!s)w(String(m))}),()=>{s=!0}},[n,t,M,d]);let k=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:a(P,{children:[o(z,{render:o(x,{variant:"ghost",size:"icon-sm","aria-label":r("plugins.card.moreActions")}),children:o(y,{})}),a(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Pe(e,e.openPath(n)),children:r("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Pe(e,e.revealPath(n)),children:r("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:u===null,onClick:()=>{if(u!==null)Pe(e,e.copyText(u))},children:r("plugins.skills.document.copy")})]})]});return a(F,{children:[i?i(k):o("div",{className:"flex justify-end",children:k}),o(h,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":r("plugins.skills.document.content")},children:v?a("div",{role:"alert",className:"space-y-3",children:[a("p",{className:"text-destructive text-sm break-words",children:[r("plugins.skills.document.error"),": ",v]}),o(x,{variant:"outline",size:"sm",onClick:()=>N((s)=>s+1),children:r("plugins.loadError.retry")})]}):u===null?a("div",{role:"status","aria-label":r("plugins.skills.loading"),className:"space-y-3",children:[o(c,{className:"h-6 w-1/3"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-2/3"})]}):o(ot,{text:Fn(u),host:{theme:e.theme,copyLabel:r("plugins.copy"),openLink:(s)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(s)||n===null?s:I(`${C(n)}/${s}`))}})})]})}
|
|
2
|
+
export{Fn,ce};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ci(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 di(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{ci,di};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createContext as o,useContext as n,useEffect as r}from"react";var ro=o(null);function
|
|
2
|
-
export{ro,
|
|
1
|
+
import{createContext as o,useContext as n,useEffect as r}from"react";var ro=o(null);function w(t){let e=n(ro);r(()=>{if(t&&e!==null)return e()},[t,e])}
|
|
2
|
+
export{ro,w};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cn}from"./chunk-wdrzhaxf.js";import{k}from"./chunk-dxgha4a2.js";import{cn as r}from"cn";import{ArrowUpRight as ue,ChevronUp as W,Loader2Icon as Z,Zap as q}from"lucide-react";import{Fragment as pe,useState as H}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 C,DropdownMenuSubContent as T,DropdownMenuSubTrigger as O,DropdownMenuTrigger as X}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as ce}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 xo({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:f,onBooleanChange:R,selectOptions:te=[],t:m,...d}){let[le,de]=H(!1),[re,me]=H(!1),l=f?.find((n)=>n.id==="fast_mode"),I=t?f?.filter((n)=>n!==l):f,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(Z,{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:le,onOpenChange:de,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(W,{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,o)=>a(pe,{children:[o>0&&n.length>0&&e(u,{}),e(k,{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(ue,{className:"size-4"})]})]})]})]}),a(J,{open:re,onOpenChange:me,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(q,{"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(Z,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(W,{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]",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(cn,{...s,disabled:d.disabled})}):a(C,{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(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(q,{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((S)=>S.api_id===i);if(g)ne(g)};if(t)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(C,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{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(C,{children:[e(O,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(k,{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(C,{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(k,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(cn,{...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(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)=>t?a(K,{"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(ce,{"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
2
|
export{xo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_}from"./chunk-6e1bwjtk.js";import{t}from"./chunk-z8njjc2c.js";import{Z}from"./chunk-hcwgc3r7.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(_,{text:e.text,streaming:o})})}if(i.isImage(e))return n(Z,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(Z,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ce({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
2
|
export{Ce};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-z8njjc2c.js";import{codexTurnError as T}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as h}from"lucide-react";import{useEffect as R,useRef as s,useState as u}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as d}from"react/jsx-runtime";function Pn({children:i}){return d("div",{className:"codex-error-message",role:"alert",children:[n(h,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:i})]})}function Tn({error:i,retry:e}){let{t:m}=t(),f=T(i),[c]=u(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=u(e?.delaySeconds??null),[N,y]=u(!1),[x,g]=u(null),o=s(!1),w=s(!1),E=s(e?.run);E.current=e?.run;let S=s((b)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(b).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),l=e!==void 0&&f.retryable;return R(()=>{if(!l||c===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((c-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[c,l]),d(Pn,{children:[d("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:f.message}),l&&n(C,{variant:"outline",size:"sm",disabled:N,onClick:()=>S.current("manual"),children:p===null?m("timeline.retry"):m("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{Pn,Tn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ln}from"./chunk-4phhhm7t.js";async function Ei(i,c){let s=new WeakSet;while(!c.aborted){let r=[...i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')].filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function rt(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of Ln(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,o-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
|
|
2
|
+
export{Ei,rt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c}from"./chunk-90r8y97z.js";import{a,o}from"./chunk-eg86g265.js";import{C,m,u,W}from"./chunk-9gt81b51.js";import{b,J,Yn}from"./chunk-jrnfqqfc.js";import{ze}from"./chunk-b67h7yss.js";import{N,K}from"./chunk-7x1qnb20.js";import{de,X}from"./chunk-xz6pb64j.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as Z,useSensors as De}from"@dnd-kit/core";import{SortableContext as ee,sortableKeyboardCoordinates as we,useSortable as ae,verticalListSortingStrategy as oe}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as U}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as me,StarIcon as be,Trash2Icon as pe}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as P}from"react";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as te,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as z,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as Ke}from"react/jsx-runtime";function Te({collectionId:l,sessionId:S,children:E}){let{attributes:I,listeners:h,setNodeRef:i,transform:g,transition:f,isDragging:k}=ae({id:JSON.stringify([l,S]),data:{type:"session",collectionId:l,sessionId:S}});return e("div",{ref:i,style:{transform:ce.Transform.toString(g),transition:f},className:U("w-full min-w-0",k&&"opacity-50"),...I,...h,role:"group",children:E})}function Be({collection:l,children:S,onEdit:E,onConfirm:I,onNewChat:h}){let{t:i}=b(),g=X(),f=J(),{attributes:k,listeners:p,setNodeRef:x,transform:T,transition:B,isDragging:O}=ae({id:l.id,disabled:{draggable:l.id===N,droppable:!1},data:{type:"collection"}});return e("div",{ref:x,style:{transform:ce.Transform.toString(T),transition:B},className:U("w-full min-w-0",O&&"opacity-50"),children:e(W,{open:!l.collapsed,onOpenChange:(d)=>f(g({type:"collapse",id:l.id,collapsed:!d})),label:K(l,i),count:l.sessionIds.length,leading:l.id===N?e(be,{className:"size-3.5"}):e(ze,{emoji:l.emoji,onChange:(d)=>f(g({type:"emoji",id:l.id,emoji:d}))}),wrapHeader:(d)=>e("div",{...k,...p,role:"group",children:d}),actions:s(Ee,{children:[e(Re,{onClick:(d)=>d.stopPropagation(),onPointerDown:(d)=>d.stopPropagation(),render:e(v,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:K(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==N&&s(z,{onClick:E,children:[e(he,{}),i("collection.rename")]}),s(z,{onClick:h,children:[e(me,{}),i("collection.newChat")]}),s(z,{onClick:()=>I("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==N&&s(z,{variant:"destructive",onClick:()=>I("delete"),children:[e(pe,{}),i("collection.deleteCollection")]})]})})]}),children:S})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function er({renderRow:l,onSelect:S,onNewChat:E,Scroll:I=He}){let h=b(),{t:i}=h,g=X(),f=J(),k=a(),{collections:p,order:x}=de(),T=o((t)=>t.sessionList),B=o((t)=>t.archivedSessions),O=o((t)=>t.sessionListLoaded),d=o((t)=>t.sessionListError),_=Me(()=>new Map([...B,...T].map((t)=>[t.sessionId,t])),[B,T]),q=h.isMac??Yn(),[D,L]=P(null),[R,j]=P(""),[A,G]=P(""),[w,H]=P(null),[y,Q]=P(!1),ue=De(Z(Se,{activationConstraint:{distance:5}}),Z(ye,{coordinateGetter:we})),F=x.flatMap((t)=>p[t].collapsed?[]:p[t].sessionIds.flatMap((n)=>{let r=_.get(n);return r&&!r.archived?[r]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(q?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(n.key)-1;if(!Number.isInteger(r)||r<0||r>8||!F[r])return;n.preventDefault(),S(F[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[F,q,S]);let ge=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,M=n.data.current;if(r?.type==="session"&&M!==void 0){let Y=M.type==="session"?String(M.collectionId):String(n.id);f(g({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Y,sessionId:String(r.sessionId),index:M.type==="session"?p[Y].sessionIds.indexOf(String(M.sessionId)):void 0}))}else if(r?.type==="collection"&&M?.type==="collection"&&String(n.id)!==N)f(g({type:"reorder",id:String(t.id),index:x.indexOf(String(n.id))}))},V=(t,n)=>{Q(!0),f(t.then(n).finally(()=>Q(!1)))};return s(Ke,{children:[e(I,{children:s(C,{children:[s(u,{className:U(c,"font-normal"),onClick:()=>{L("new"),j(""),G("")},children:[e(m,{children:e(me,{})}),e("span",{children:i("collection.newCollection")})]}),d&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:d}),e(v,{variant:"ghost",onClick:()=>f(k.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:ue,collisionDetection:fe,onDragEnd:ge,children:e(ee,{items:x,strategy:oe,children:e(C,{children:x.map((t)=>e(Be,{collection:p[t],onNewChat:()=>E(t),onEdit:()=>{L(t),j(p[t].name),G(p[t].emoji??"")},onConfirm:(n)=>H({id:t,type:n}),children:e(ee,{items:p[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:oe,children:p[t].sessionIds.map((n)=>{let r=_.get(n);if(r?.archived)return null;if(!r)return O?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(m,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(v,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>f(g({type:"remove",sessionId:n,collectionId:t})),children:e(pe,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(te,{open:D!==null,onOpenChange:(t)=>{if(!t&&!y)L(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(D==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(t)=>{if(t.preventDefault(),D===null||!R.trim()||y)return;let n=D==="new"?`collection-${crypto.randomUUID()}`:D;V(g([D==="new"?{type:"create",id:n,name:R}:{type:"rename",id:n,name:R},{type:"emoji",id:n,emoji:A}]),()=>L(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:R,onChange:(t)=>j(t.target.value),disabled:y}),D!=="new"&&e(ze,{emoji:A,onChange:G}),s(le,{children:[e(v,{type:"button",variant:"outline",disabled:y,onClick:()=>L(null),children:i("collection.cancel")}),e(v,{type:"submit",disabled:y||!R.trim(),children:i("collection.confirm")})]})]})]})}),e(te,{open:w!==null,onOpenChange:(t)=>{if(!t&&!y)H(null)},children:s(ne,{children:[s(re,{children:[e(se,{children:i(w?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:w===null?"":K(p[w.id],i)})})]}),s(le,{children:[e(v,{variant:"outline",disabled:y,onClick:()=>H(null),children:i("collection.cancel")}),e(v,{disabled:y,onClick:()=>{if(w!==null)V(g({type:w.type,id:w.id}),()=>H(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{er};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{r}from"./chunk-eg86g265.js";import{Nt}from"./chunk-s3h496tf.js";import{P}from"./chunk-42atrgm1.js";import{At,he}from"./chunk-9gt81b51.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as E}from"lucide-react";import{useEffect as g,useState as A}from"react";import{Input as D}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as w}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function Ve(t,a){let i=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:i})}function ue({sessionRow:t,actions:a,shortcut:i,renaming:n=!1,onRename:m}){let{t:s,i18n:C,PathAction:u}=r(),f=he(),y=At();g(()=>{f(n)},[n,f]);let[I,p]=A(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?s("sessionList.archived"):t.updatedAt!==null?Ve(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Nt,{title:n?o(D,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":s("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(P,{className:"min-w-0 flex-1",children:t.title??s("sessionList.untitled")})}),i]}),titleIcon:o(E,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(w,{}),a]}):void 0})}
|
|
2
2
|
export{Ve,ue};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k}from"./chunk-dxgha4a2.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Do({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(k,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
2
|
export{Do};
|