@alwith/module-chat 0.6.29 → 0.6.30
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/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.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-kk5acm1s.js → chunk-016v1nnv.js} +4 -4
- package/dist/{chunk-xca0vnvk.js → chunk-036wyz4n.js} +2 -2
- package/dist/{chunk-hz8yrg2t.js → chunk-06mvwewp.js} +2 -2
- package/dist/chunk-0vtxfvdj.js +2 -0
- package/dist/{chunk-b4qe4xnp.js → chunk-0zncrzar.js} +2 -2
- package/dist/{chunk-me230xjh.js → chunk-11kv54bx.js} +3 -3
- package/dist/{chunk-vhxr0c4c.js → chunk-15m908ph.js} +2 -2
- package/dist/{chunk-xmy7ebed.js → chunk-18ea0dty.js} +2 -2
- package/dist/chunk-1h3f538q.js +2 -0
- package/dist/{chunk-12pd4nxy.js → chunk-1jznzjzn.js} +2 -2
- package/dist/{chunk-d336k00a.js → chunk-1pnbntv2.js} +2 -2
- package/dist/{chunk-1dpk9zrb.js → chunk-1y5zgya3.js} +2 -2
- package/dist/{chunk-zewseva6.js → chunk-23r2z6bp.js} +2 -2
- package/dist/{chunk-t56ncd8f.js → chunk-2d4zb2ac.js} +2 -2
- package/dist/chunk-2qa3c571.js +2 -0
- package/dist/chunk-2w3c4tg8.js +2 -0
- package/dist/{chunk-epdnafa1.js → chunk-3915ad7f.js} +2 -2
- package/dist/{chunk-esxjnj1y.js → chunk-3a8qwbgh.js} +3 -3
- package/dist/{chunk-wxafew32.js → chunk-3d3z6dam.js} +2 -2
- package/dist/{chunk-e8mxwqxy.js → chunk-3dvxhfcr.js} +2 -2
- package/dist/{chunk-5dxzfdd1.js → chunk-3vdx0cme.js} +2 -2
- package/dist/{chunk-7n1v87h0.js → chunk-3y9az4b9.js} +2 -2
- package/dist/{chunk-xpj8gb9a.js → chunk-46bgwhx8.js} +2 -2
- package/dist/{chunk-eexn5mmk.js → chunk-4hasepkm.js} +2 -2
- package/dist/{chunk-vazspetj.js → chunk-4vfrxhj4.js} +2 -2
- package/dist/{chunk-n7f38k3f.js → chunk-4z6gyvy3.js} +2 -2
- package/dist/{chunk-54awxpw2.js → chunk-51s7qck0.js} +2 -2
- package/dist/{chunk-fz9y067h.js → chunk-544g9fky.js} +2 -2
- package/dist/chunk-5e575zvm.js +2 -0
- package/dist/{chunk-4sj3t6mk.js → chunk-5f7t16kj.js} +2 -2
- package/dist/{chunk-sb2694hc.js → chunk-5fyxge7c.js} +2 -2
- package/dist/{chunk-46j8adkj.js → chunk-5hjk7xnq.js} +2 -2
- package/dist/{chunk-ezaypwps.js → chunk-5jvpeww3.js} +2 -2
- package/dist/{chunk-3kxerrsh.js → chunk-5p53j8mf.js} +2 -2
- package/dist/{chunk-7jk8s061.js → chunk-5t2ge7gg.js} +2 -2
- package/dist/chunk-6ewv4vns.js +2 -0
- package/dist/chunk-6wsr59dr.js +2 -0
- package/dist/{chunk-91jmmkd3.js → chunk-6yx869ht.js} +2 -2
- package/dist/{chunk-717437bm.js → chunk-704h27t9.js} +2 -2
- package/dist/{chunk-tjc0ntnh.js → chunk-705j0x4q.js} +2 -2
- package/dist/{chunk-ansfap1a.js → chunk-7a806p3q.js} +3 -3
- package/dist/{chunk-dwf38vyq.js → chunk-7d8xet8s.js} +2 -2
- package/dist/chunk-7gv27b1c.js +2 -0
- package/dist/{chunk-06aaghwq.js → chunk-7k2z2nvy.js} +2 -2
- package/dist/{chunk-5arfhz6m.js → chunk-7n3z2bay.js} +2 -2
- package/dist/{chunk-yn3d949k.js → chunk-7r3k37ys.js} +2 -2
- package/dist/{chunk-k1atcess.js → chunk-7z1k4s4f.js} +2 -2
- package/dist/{chunk-qdbyn3xv.js → chunk-82e3194f.js} +2 -2
- package/dist/{chunk-hzhcajx1.js → chunk-8q5zwkry.js} +2 -2
- package/dist/{chunk-vvy4ke91.js → chunk-8tnx3p86.js} +1 -1
- package/dist/{chunk-pbx1417n.js → chunk-93bqj8az.js} +2 -2
- package/dist/chunk-9dm7j0c9.js +4 -0
- package/dist/{chunk-36rxa8k7.js → chunk-9ecgnmtx.js} +3 -3
- package/dist/{chunk-sdhkpkbs.js → chunk-9h9vtcwk.js} +2 -2
- package/dist/{chunk-wf4z9w5x.js → chunk-9m36e0yq.js} +2 -2
- package/dist/{chunk-d5pn8932.js → chunk-9n8cds8p.js} +2 -2
- package/dist/{chunk-6r1e3y4e.js → chunk-9pm3vzgx.js} +3 -3
- package/dist/{chunk-efkfzgs9.js → chunk-9qqxdv6f.js} +2 -2
- package/dist/{chunk-32zzqeyf.js → chunk-a0qy1r02.js} +2 -2
- package/dist/{chunk-w7vcd8d1.js → chunk-a1wbf348.js} +3 -3
- package/dist/{chunk-bajn7ssf.js → chunk-abbpbnjj.js} +2 -2
- package/dist/{chunk-r7z3mvej.js → chunk-af0e5epn.js} +2 -2
- package/dist/{chunk-smd9rszw.js → chunk-askwff3a.js} +3 -3
- package/dist/{chunk-3btheq4v.js → chunk-awrz081w.js} +2 -2
- package/dist/{chunk-3cwbxnxr.js → chunk-ay699evt.js} +3 -3
- package/dist/chunk-b5g055qp.js +2 -0
- package/dist/{chunk-6kyq5zxt.js → chunk-b7ze9dje.js} +2 -2
- package/dist/{chunk-2c4hqv8f.js → chunk-b89bzpce.js} +2 -2
- package/dist/{chunk-f9zpep12.js → chunk-bf7sgpzq.js} +2 -2
- package/dist/{chunk-cp3qcgdv.js → chunk-bnzpnsh1.js} +3 -3
- package/dist/{chunk-ds6bqmdr.js → chunk-c3nn4h2q.js} +2 -2
- package/dist/chunk-c4mm4fzg.js +2 -0
- package/dist/{chunk-sx1gjwb6.js → chunk-c4rptwfx.js} +3 -3
- package/dist/{chunk-37x36kph.js → chunk-c531krny.js} +3 -3
- package/dist/{chunk-z930082m.js → chunk-cfj92m1y.js} +2 -2
- package/dist/{chunk-v6f6s828.js → chunk-chg6j0zg.js} +2 -2
- package/dist/{chunk-d8bjsf1d.js → chunk-cj99j82f.js} +2 -2
- package/dist/{chunk-qz9q0g2b.js → chunk-cjj5bxdb.js} +2 -2
- package/dist/{chunk-m7t9asrq.js → chunk-cr0pb6g0.js} +2 -2
- package/dist/{chunk-7rqryntm.js → chunk-cy5kh1yr.js} +2 -2
- package/dist/chunk-d9q9qgm1.js +2 -0
- package/dist/{chunk-pqw5qz4e.js → chunk-djqexpgf.js} +2 -2
- package/dist/chunk-eb78ebxa.js +2 -0
- package/dist/{chunk-9xdne4k4.js → chunk-egbb5295.js} +2 -2
- package/dist/{chunk-r013w7yb.js → chunk-enc99kvz.js} +2 -2
- package/dist/chunk-et3nrp9v.js +2 -0
- package/dist/{chunk-4y07ykv2.js → chunk-f84mdhkx.js} +2 -2
- package/dist/{chunk-kq8jv5tf.js → chunk-f8bx4etj.js} +2 -2
- package/dist/{chunk-7egc2x4q.js → chunk-fbrv2v3t.js} +1 -1
- package/dist/chunk-fdfftrzj.js +5 -0
- package/dist/chunk-fer4r3b8.js +2 -0
- package/dist/chunk-fy8dmpv3.js +2 -0
- package/dist/{chunk-6eebeq0f.js → chunk-ggxdrm0c.js} +2 -2
- package/dist/{chunk-6gejqbns.js → chunk-gh1rtwrb.js} +2 -2
- package/dist/{chunk-y5xjf5sb.js → chunk-h3geg09z.js} +2 -2
- package/dist/chunk-h4cx5xr4.js +4 -0
- package/dist/{chunk-b64hyshj.js → chunk-hj8nkk6a.js} +2 -2
- package/dist/chunk-hjbq9ez1.js +2 -0
- package/dist/chunk-hwppy236.js +2 -0
- package/dist/chunk-hzcerz8j.js +2 -0
- package/dist/{chunk-nravn5bk.js → chunk-j29d8rts.js} +2 -2
- package/dist/{chunk-darm80tf.js → chunk-j4w2hbbe.js} +2 -2
- package/dist/chunk-j9f4mh66.js +2 -0
- package/dist/{chunk-fvf1et2s.js → chunk-jftxq3se.js} +2 -2
- package/dist/{chunk-52hvpdxw.js → chunk-jfyz3rx6.js} +2 -2
- package/dist/{chunk-dbrrbwb8.js → chunk-jhaf3qtt.js} +2 -2
- package/dist/{chunk-x9rppnkq.js → chunk-jnpkpe5t.js} +2 -2
- package/dist/chunk-jp2s1xsa.js +2 -0
- package/dist/chunk-jzarxwap.js +2 -0
- package/dist/{chunk-6g5qmjph.js → chunk-k3h77wtz.js} +2 -2
- package/dist/{chunk-mtcxr3ns.js → chunk-kagkszdc.js} +2 -2
- package/dist/{chunk-188q5xn8.js → chunk-kdcde4s5.js} +2 -2
- package/dist/{chunk-g9426ns9.js → chunk-kvwyryw2.js} +2 -2
- package/dist/{chunk-r3s28905.js → chunk-kx9nnmwb.js} +3 -3
- package/dist/{chunk-afnnrn6z.js → chunk-ky3n1mza.js} +2 -2
- package/dist/chunk-ky4j58wz.js +2 -0
- package/dist/{chunk-cxhyh0w9.js → chunk-m6yg0dc9.js} +2 -2
- package/dist/{chunk-jbnbx285.js → chunk-m8243rnx.js} +2 -2
- package/dist/{chunk-239gtn3z.js → chunk-ma6ycen5.js} +2 -2
- package/dist/{chunk-1bvgs2t1.js → chunk-mahky9ad.js} +2 -2
- package/dist/chunk-mdzng667.js +2 -0
- package/dist/{chunk-w5rg8wk8.js → chunk-mfmh7ztq.js} +2 -2
- package/dist/{chunk-qd8j2d63.js → chunk-mfrg4vze.js} +5 -5
- package/dist/chunk-mgs3dhdm.js +2 -0
- package/dist/{chunk-2rk59ngw.js → chunk-mq32437t.js} +2 -2
- package/dist/{chunk-pqz2471h.js → chunk-n8b9yg4q.js} +2 -2
- package/dist/{chunk-6ja6pt5x.js → chunk-n96z8etk.js} +2 -2
- package/dist/{chunk-ymgc4317.js → chunk-nec3tcjh.js} +2 -2
- package/dist/{chunk-vvmmzcms.js → chunk-nf7q3crw.js} +3 -3
- package/dist/{chunk-jkqh03w4.js → chunk-nqt9gyz9.js} +2 -2
- package/dist/chunk-p0v9d7e1.js +2 -0
- package/dist/{chunk-nn8pmwqz.js → chunk-p6ffd8yn.js} +2 -2
- package/dist/{chunk-5h8h4sas.js → chunk-p9226dye.js} +2 -2
- package/dist/{chunk-b4wh6k5s.js → chunk-p9x6rya1.js} +2 -2
- package/dist/{chunk-dzw6vqqf.js → chunk-pd5yrdg6.js} +2 -2
- package/dist/{chunk-qc49fm8e.js → chunk-pe79c1re.js} +2 -2
- package/dist/{chunk-vbbndjfd.js → chunk-pwk7epmy.js} +2 -2
- package/dist/{chunk-8ktb3g8c.js → chunk-py2q899w.js} +2 -2
- package/dist/chunk-pyqhwz2d.js +4 -0
- package/dist/{chunk-yfb5hj4w.js → chunk-q988bycf.js} +2 -2
- package/dist/chunk-qj87dxrr.js +2 -0
- package/dist/{chunk-vjgze5n7.js → chunk-qm0zd4wj.js} +2 -2
- package/dist/{chunk-m7tj6194.js → chunk-qmx3t5he.js} +2 -2
- package/dist/chunk-qth2ames.js +2 -0
- package/dist/chunk-qyfkwznx.js +2 -0
- package/dist/{chunk-7sf2wz1n.js → chunk-r84xcy0d.js} +2 -2
- package/dist/{chunk-abxsr9d1.js → chunk-r8gfcyeb.js} +2 -2
- package/dist/chunk-rayhzb8p.js +2 -0
- package/dist/{chunk-tdaznr5w.js → chunk-re34mbpa.js} +2 -2
- package/dist/{chunk-nabyjzn5.js → chunk-rfkgks0a.js} +2 -2
- package/dist/{chunk-cttsbjr0.js → chunk-rhptdqpp.js} +2 -2
- package/dist/chunk-rkqptd9w.js +2 -0
- package/dist/{chunk-yc7w1en3.js → chunk-rrzz41z1.js} +2 -2
- package/dist/{chunk-fvw65b49.js → chunk-rsbced6k.js} +2 -2
- package/dist/{chunk-gt50nb3j.js → chunk-spqfmr4z.js} +2 -2
- package/dist/{chunk-m76tgtge.js → chunk-sqqa7t1n.js} +3 -3
- package/dist/chunk-srqs8z90.js +2 -0
- package/dist/{chunk-agz11n1h.js → chunk-srz8hnnx.js} +3 -3
- package/dist/{chunk-j1khvg9s.js → chunk-t4twdrdg.js} +2 -2
- package/dist/{chunk-6wkcqhkk.js → chunk-tftgnw1w.js} +2 -2
- package/dist/{chunk-q98s7d94.js → chunk-tszqev50.js} +2 -2
- package/dist/{chunk-8p861ztc.js → chunk-tzb4b5ve.js} +2 -2
- package/dist/{chunk-rhyw89ap.js → chunk-v6x7x69b.js} +2 -2
- package/dist/chunk-v92wj4tv.js +2 -0
- package/dist/{chunk-964fwwsg.js → chunk-vcj2jfnz.js} +2 -2
- package/dist/{chunk-36j9fer8.js → chunk-vqqafkcx.js} +2 -2
- package/dist/chunk-vsm89jmx.js +2 -0
- package/dist/{chunk-k0rfgjm6.js → chunk-w1h28vvd.js} +2 -2
- package/dist/{chunk-19jh646d.js → chunk-w2z3sxdq.js} +2 -2
- package/dist/{chunk-0c956xc0.js → chunk-wbjf9maj.js} +2 -2
- package/dist/{chunk-tbz64dbd.js → chunk-wbnmcagf.js} +3 -3
- package/dist/chunk-wg223rq3.js +2 -0
- package/dist/{chunk-9162ez1n.js → chunk-wkbxdz82.js} +2 -2
- package/dist/chunk-wv6ntscn.js +2 -0
- package/dist/{chunk-5n2304a1.js → chunk-wvm8srp7.js} +2 -2
- package/dist/chunk-x03z0hme.js +2 -0
- package/dist/chunk-x072jj4c.js +2 -0
- package/dist/{chunk-bsqe29dh.js → chunk-x4brdfv3.js} +2 -2
- package/dist/{chunk-2c7a0zdc.js → chunk-x4bzkzbt.js} +2 -2
- package/dist/{chunk-6yzknjee.js → chunk-xb6x221t.js} +2 -2
- package/dist/{chunk-5cas0xvp.js → chunk-xckysrk7.js} +2 -2
- package/dist/{chunk-aa2xhwh2.js → chunk-xcx9g1wb.js} +2 -2
- package/dist/{chunk-bnf6pmgc.js → chunk-xg6ayxsy.js} +2 -2
- package/dist/{chunk-fednb216.js → chunk-xxmzqazr.js} +2 -2
- package/dist/chunk-y3kn2w77.js +2 -0
- package/dist/{chunk-7g0cbkbp.js → chunk-y47sn7w2.js} +2 -2
- package/dist/{chunk-n9e1v175.js → chunk-yjm613ey.js} +2 -2
- package/dist/{chunk-5dygcexv.js → chunk-ypdh88cj.js} +2 -2
- package/dist/{chunk-483jakc1.js → chunk-yw927w3q.js} +2 -2
- package/dist/{chunk-dfzhma2x.js → chunk-yx3eqj75.js} +2 -2
- package/dist/{chunk-ybwevt5n.js → chunk-z5n4zqeg.js} +2 -2
- package/dist/chunk-zdqjjwx0.js +2 -0
- package/dist/{chunk-42dfq7ze.js → chunk-zhf7403q.js} +2 -2
- package/dist/{chunk-7vby3f2v.js → chunk-zmr5pwhd.js} +2 -2
- package/dist/{chunk-bbvhgh27.js → chunk-znafsq0a.js} +2 -2
- package/dist/{chunk-6hxz5cpc.js → chunk-zwpv75f4.js} +2 -2
- package/dist/{chunk-ahzjy61p.js → chunk-zyermn00.js} +2 -2
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.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/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.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-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-parser.worker.js +58 -55
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/mermaid/diagram.js +1 -1
- package/dist/mermaid/export.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/mermaid/preview.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/plugins/toolbox-layout.js +1 -1
- package/dist/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-0f00j53n.js +0 -2
- package/dist/chunk-189aq7st.js +0 -2
- package/dist/chunk-3gkb117f.js +0 -4
- package/dist/chunk-48zgp33j.js +0 -2
- package/dist/chunk-4fghmx57.js +0 -2
- package/dist/chunk-4npg9v6h.js +0 -2
- package/dist/chunk-5wed639g.js +0 -2
- package/dist/chunk-621g2ntr.js +0 -4
- package/dist/chunk-6m9frvzj.js +0 -2
- package/dist/chunk-7ckdhz5y.js +0 -2
- package/dist/chunk-aq22zye1.js +0 -2
- package/dist/chunk-azak3tb5.js +0 -2
- package/dist/chunk-dxfhy8gr.js +0 -2
- package/dist/chunk-eedgav4q.js +0 -2
- package/dist/chunk-ehcnfvaz.js +0 -2
- package/dist/chunk-gdn4vvks.js +0 -2
- package/dist/chunk-ge0anaww.js +0 -4
- package/dist/chunk-gjj5wbms.js +0 -4
- package/dist/chunk-h1t76wws.js +0 -2
- package/dist/chunk-hc9bcwpa.js +0 -2
- package/dist/chunk-hqfhb4ng.js +0 -2
- package/dist/chunk-htsbt68m.js +0 -2
- package/dist/chunk-kzh7w9c0.js +0 -2
- package/dist/chunk-n7pyzjq1.js +0 -2
- package/dist/chunk-nq2tqdb2.js +0 -2
- package/dist/chunk-p781sb6h.js +0 -2
- package/dist/chunk-pv7t4hw8.js +0 -2
- package/dist/chunk-qecs9e31.js +0 -2
- package/dist/chunk-r51vcbf0.js +0 -2
- package/dist/chunk-rak4mkgh.js +0 -2
- package/dist/chunk-sykf5jnc.js +0 -2
- package/dist/chunk-ts7h148j.js +0 -2
- package/dist/chunk-v0xy25sh.js +0 -2
- package/dist/chunk-wfk50eh6.js +0 -2
- package/dist/chunk-wxjm3mq8.js +0 -2
- package/dist/chunk-x0m4ctqf.js +0 -2
- package/dist/chunk-xk41ehy8.js +0 -2
- package/dist/chunk-xpts50f0.js +0 -2
- package/dist/chunk-xqsfaaae.js +0 -2
- package/dist/chunk-y780cd4m.js +0 -2
- package/dist/chunk-ynp45k84.js +0 -2
- package/dist/chunk-yqhvxm9m.js +0 -2
- package/dist/chunk-zcfsbgvw.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{A}from"./chunk-1pnbntv2.js";import{s}from"./chunk-af0e5epn.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function Vs({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return A(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{Vs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ve}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Ve}from"./chunk-rayhzb8p.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function Gn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Ve,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function b(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{Gn,e,b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function $r({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
|
|
2
|
+
export{$r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Wn}from"./chunk-z5n4zqeg.js";import{xe}from"./chunk-8tnx3p86.js";import{is}from"./chunk-zwpv75f4.js";import{C,Ht}from"./chunk-c4mm4fzg.js";import{t}from"./chunk-rayhzb8p.js";import{xs,bs}from"./chunk-djqexpgf.js";import{L}from"./chunk-3915ad7f.js";import{ye}from"./chunk-fy8dmpv3.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var os=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=bs(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
2
|
${e.text}`).join(`
|
|
3
|
-
`):
|
|
4
|
-
export{
|
|
3
|
+
`):ye(n),l=n.content.filter(x),d=new Set(Ht(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=C(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=xs(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(L,{block:e},`${n.id}:${s}`))}),i(Wn,{value:{names:u,icon:p.skillIcon},children:i(is,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(xe,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
+
export{os};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{he}from"./chunk-a0qy1r02.js";import{H,rr}from"./chunk-93bqj8az.js";import{t}from"./chunk-rayhzb8p.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Di({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=he(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(H,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(rr,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
|
|
2
|
+
export{Di};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{be}from"./chunk-x4bzkzbt.js";function C(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ht(e){if(!e.includes("app://"))return[];let n=be(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=C(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Ia(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function ps(e,n){return[Ia(n),e.trim()].filter(Boolean).join(" ")}function ms(e,n){let r=Ia(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
+
export{C,Ht,Ia,ps,ms};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c,F}from"./chunk-
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(
|
|
3
|
-
export{
|
|
1
|
+
import{c,F}from"./chunk-06mvwewp.js";import{oe}from"./chunk-nf7q3crw.js";import{_r}from"./chunk-xg6ayxsy.js";import{ve}from"./chunk-15m908ph.js";import{Ar,Et}from"./chunk-016v1nnv.js";import{Tr}from"./chunk-3a8qwbgh.js";import{Bo}from"./chunk-zwpv75f4.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(F,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(F,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(ve,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function rl({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),T=!t.streaming&&C.trim().length>0?o(Io,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=_r(t.content,"compact"),x=l.reduce((e,a,p)=>a.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&oe(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return a.length===0?null:o(Et,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?l.length:h;return o(Po,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(Tr,{blocks:f}):y(f))})}function Io({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=c(),{t:u}=d;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Bo,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=c();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function Po({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(Ar,{...d,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
+
export{rl,Io,Po};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function
|
|
1
|
+
import{Questionnaire as r}from"@shadcn/react/questionnaire";import{useEffect as N,useId as v,useRef as b}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Textarea as R}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as i,jsxs as c,Fragment as S}from"react/jsx-runtime";function p(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function D(e){if(!p(e)||!p(e.codex))return[];let n=e.codex,o=n.questions;if(n.delivery!=="async"||!Array.isArray(o))return[];if(!o.every((t)=>p(t)&&typeof t.title==="string"&&t.title.trim().length>0&&(t.options===null||Array.isArray(t.options)&&t.options.every((m)=>typeof m==="string"))))return[];return o}function qo(e,n){return JSON.stringify(["request_user_input_async",e,n])}function gs(e){return{selected:e.options?.length?0:null,text:""}}function Kn(e,n){return n.selected===null?n.text:e.options?.[n.selected]??""}function fs(e){return`<send_user_message_question_reply>
|
|
2
2
|
${JSON.stringify([e])}
|
|
3
|
-
</send_user_message_question_reply>`}function
|
|
4
|
-
export{
|
|
3
|
+
</send_user_message_question_reply>`}function Ko(e){if(!p(e)||!p(e.codex))return[];let n=e.codex;return(Array.isArray(n.questionReplyParts)?n.questionReplyParts.map((t)=>p(t)?{...t,answer:t.text}:t):[n.questionReply]).filter((t)=>p(t)&&typeof t.questionItemId==="string"&&typeof t.question==="string"&&typeof t.answer==="string").map(({questionItemId:t,question:m,answer:y})=>({questionItemId:t,question:m,answer:y}))}function hs({question:e,draft:n,status:o,answer:t,error:m,onChange:y,onSubmit:x,onSkip:C,t:u}){let g=v(),h=b(!1),a=b(null);N(()=>()=>{if(a.current!==null)cancelAnimationFrame(a.current)},[]);let l=o==="pending",A=o==="answered"||o==="skipped",f=e.options??[],w=l&&Kn(e,n).trim().length>0,Q="flex cursor-pointer items-start gap-2 text-sm in-data-readonly:cursor-default in-data-readonly:opacity-50";return i("section",{"aria-labelledby":`${g}-title`,className:"border-border bg-card text-card-foreground flex min-w-0 flex-col gap-3 rounded-xl border p-4",children:A?c(S,{children:[i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap",children:e.title}),i("p",{className:"text-sm whitespace-pre-wrap",children:o==="answered"?t:u("asyncQuestion.skipped")})]}):c(r.Root,{items:f.length>0?[{name:"answer",choices:[...f.map((s,d)=>({value:String(d)})),{value:"other"}]}]:void 0,shortcuts:"letters",noValidate:!0,className:"flex min-w-0 flex-col gap-3",onSubmit:(s)=>{if(s.preventDefault(),w)x()},children:[c(r.Item,{name:"answer",className:"m-0 flex min-w-0 flex-col gap-3 border-0 p-0",children:[i(r.Title,{render:i("h3",{id:`${g}-title`,className:"text-sm font-medium whitespace-pre-wrap"}),children:e.title}),f.length>0&&c(r.Choices,{className:"flex flex-col gap-2","aria-disabled":!l||void 0,"data-readonly":!l||void 0,children:[f.map((s,d)=>c(r.Choice,{value:String(d),checked:n.selected===d,onChange:()=>l&&y({...n,selected:d}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{className:"whitespace-pre-wrap",children:s})]},d)),c(r.Choice,{value:"other",checked:n.selected===null,onChange:()=>l&&y({...n,selected:null}),className:Q,children:[i(r.ChoiceInput,{className:"accent-primary mt-0.5 size-4 shrink-0"}),i(r.ChoiceShortcut,{className:"text-muted-foreground w-4 shrink-0 font-mono text-xs uppercase"}),i(r.ChoiceLabel,{children:u("asyncQuestion.other")})]})]}),i(r.Input,{render:i(R,{rows:1,className:"min-h-0 resize-none"}),onCompositionStart:()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null,h.current=!0},onCompositionEnd:()=>{if(h.current=!1,a.current!==null)cancelAnimationFrame(a.current);a.current=requestAnimationFrame(()=>{a.current=null})},onKeyDown:(s)=>{if(s.key==="Enter")s.stopPropagation();if(s.key!=="Enter"||s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||h.current||a.current!==null||s.nativeEvent.isComposing||s.nativeEvent.keyCode===229)return;if(s.preventDefault(),l&&Kn(e,{...n,text:s.currentTarget.value}).trim().length>0)x()},"aria-label":u("asyncQuestion.answer"),placeholder:u("asyncQuestion.answer"),value:n.text,readOnly:!l,onChange:(s)=>y({selected:null,text:s.target.value})}),m&&i("p",{role:"alert",className:"text-destructive text-sm",children:m})]}),c("div",{className:"flex flex-wrap items-center gap-2",children:[i(r.Submit,{render:i(k,{size:"sm"}),disabled:!w,children:u(o==="submitting"?"asyncQuestion.submitting":"asyncQuestion.submit")}),i(r.Skip,{render:i(k,{size:"sm",variant:"ghost"}),disabled:!l,onClick:C,children:u("asyncQuestion.skip")}),(o==="closed"||o==="unavailable")&&i("span",{role:"status",className:"text-muted-foreground text-xs",children:u(`asyncQuestion.${o}`)})]})]})})}
|
|
4
|
+
export{D,qo,gs,Kn,fs,Ko,hs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ne}from"./chunk-d9q9qgm1.js";function oi(r){let s=Ne(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function Me(r){return oi(r).join(Ne()?"":"+")}
|
|
2
|
+
export{oi,Me};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
export{it,
|
|
1
|
+
import{c}from"./chunk-06mvwewp.js";import{Xr}from"./chunk-rsbced6k.js";import{le}from"./chunk-rayhzb8p.js";import{T}from"./chunk-fpsn6fmf.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function it(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let s=[];for(let[n,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=le(),[g,y]=v({}),[x,I]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(Xr(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let k=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((d)=>d+1),children:r(R,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(k,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Rr({blocks:e}){let{t:s}=c(),a=e.flatMap(E),[n,l]=T(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(S,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(C,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(U,{images:a})]})}
|
|
2
|
+
export{it,Rr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-rayhzb8p.js";import{Nt}from"./chunk-9qqxdv6f.js";import{e,b}from"./chunk-b89bzpce.js";import{to}from"./chunk-yx3eqj75.js";import{Loader2Icon as v}from"lucide-react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as i}from"react/jsx-runtime";function cn({session:t,timeline:s}){let{host:m,client:a}=e(),{t:r}=m,u=n((h)=>h.historyPages[t.id]?.cursor!=null),y=to(t,s?.turnWork),E=()=>b(m,a.open(t.id,t.cwd)),p=o(Nt,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("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"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[o(f,{children:r("conversation.reopen")}),o(l,{children:r("conversation.detached")})]}),o(x,{onClick:E,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(c,{className:"flex-1",children:i(d,{children:[o(f,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),o(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
+
export{cn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{En}from"./chunk-f84mdhkx.js";import{Vi,ne}from"./chunk-5hjk7xnq.js";import{Gi}from"./chunk-11kv54bx.js";function Ui(l,p){return En({...Vi,parse(s){let e=s;if(!e||typeof e!=="object"||Array.isArray(e)||typeof e.prompt!=="string"||!e.prompt.trim()||Object.keys(e).some((n)=>n!=="prompt"&&n!=="references")||e.references!==void 0&&(!Array.isArray(e.references)||e.references.some((n)=>typeof n!=="string")))throw Error("Invalid image instructions or references");return{prompt:e.prompt,references:e.references}},async execute(s,{sessionId:e,toolCallId:n,signal:a,agent:d}){let t=p(e);if(!t)throw Error("Image request is no longer active");let g=s.references,c=(g??[...t.references.keys()].filter((r)=>r.startsWith("attachment:"))).map((r)=>{let i=t.references.get(r);if(!i)throw Error(`Unknown image reference: ${r}`);return i}),o=ne(t.selection);if(c.length>o.maxReferences)throw Error(`This model supports ${o.maxReferences} references`);let f=Gi(s.prompt,t.aspect),m=o.provider==="chatgpt"?await d.request("_codex/images/generate",{prompt:f,images:c},{cancellationSignal:a}):await l.generateExternal(t.selection,f,c,a);if(a.throwIfAborted(),p(e)!==t)throw Error("Image request was cancelled or replaced");return m.images.forEach((r,i)=>t.references.set(`${String(n)}:${i+1}`,`data:${r.mimeType};base64,${r.data}`)),{content:[{type:"text",text:JSON.stringify({kind:"alwith.image",version:1,model:o.id,size:t.selection.size,displayed:!0,message:"The application already displays these images and provides downloads. Finish with the returned image reference; do not regenerate, echo image data or write files to deliver this result.",references:g??[],images:m.images.map((r,i)=>({reference:`${String(n)}:${i+1}`}))})},...m.images.map((r)=>({type:"image",...r}))]}}})}
|
|
2
|
+
export{Ui};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Yi}from"./chunk-rfkgks0a.js";import{e,b}from"./chunk-b89bzpce.js";import{Y,y}from"./chunk-rkqptd9w.js";import{createLucideIcon as v,HandIcon as k,ShieldAlertIcon as w,ShieldCheckIcon as a}from"lucide-react";import{memo as S}from"react";import{jsx as t}from"react/jsx-runtime";var O=v("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":k,"workspace-write":a,agent:O,"agent-full-access":w},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function N({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=e(),{t:r}=l,s=y(m,"mode");if(!s)return null;let o=s.currentValue,p=Y(s).map((n)=>{let i=A[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),h=p.find((n)=>n.value===o),M=d[o]??a,I=(n)=>{if(n===o)return;b(l,c?c(s.configId,n):f.setConfig(u,s.configId,n))};return t(Yi,{value:o,warning:o==="agent-full-access",currentName:h?.name??o,icon:t(M,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:g,label:r("composer.switchPermissionMode"),onValueChange:I,options:p.map((n)=>{let i=d[n.value]??a,C=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":C?"":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 kn=S(N);
|
|
2
|
+
export{kn};
|
|
@@ -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 mo(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 kt(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=mo(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{mo,kt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function xs(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 bs(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{xs,bs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o}from"./chunk-af0e5epn.js";import{Te,J,ue}from"./chunk-5jvpeww3.js";import{useEffect as S,useMemo as f}from"react";function Ts(s){let c=J((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")&&Te(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=J((i)=>i.activitySeen),r=ue();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
|
+
export{Ts};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var r=new Map,p=new Map,c=new Map;function
|
|
1
|
+
var r=new Map,p=new Map,c=new Map;function Ri(e,t){if(p.has(e))throw Error("An attachment writer is already registered for this session");return p.set(e,t),()=>{if(p.get(e)===t)p.delete(e)}}function X(e,t){let o=r.get(e);if(!o)return;let n=t(o.attachments);r.set(e,{...o,attachments:n}),p.get(e)?.(n)}function hn(e,t){c.set(e,t),t.finally(()=>{if(c.get(e)===t)c.delete(e)})}async function ma(e){for(;;){let n=r.get(e)?.attachments.flatMap((i)=>{let m=c.get(i.id);return m?[m]:[]})??[];if(!n.length)break;await Promise.all(n)}let t=r.get(e);if(!t)return null;let o=await Promise.all(t.attachments.map(async(n)=>{if(!n.url.startsWith("blob:"))return n;let i=await fetch(n.url);if(!i.ok)throw Error("Cannot read draft image");let m=await i.blob(),f=await new Promise((l,g)=>{let s=new FileReader;s.onload=()=>l(s.result),s.onerror=()=>g(s.error),s.readAsDataURL(m)});return{...n,url:f}}));return{...t,...t.apps?{apps:t.apps.map((n)=>({...n}))}:{},text:t.text,mentions:[...t.mentions],attachments:o,modelId:t.modelId}}function ga(e,t){if(t===null)r.delete(e);else r.set(e,t)}var a=new Map;function vn(e,t){if(a.has(e))throw Error("A composer is already registered for this session");return a.set(e,t),()=>{if(a.get(e)===t)a.delete(e)}}function fa(e,t){if(typeof t!=="string"||!t.trim())throw Error("The draft is empty");let o=a.get(e);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(e);if(n&&(n.text.length||n.attachments.length||n.mentions.length||n.apps?.length))throw Error("The composer already has a draft; send or clear it first");o(t),r.set(e,{text:t,attachments:[],mentions:[],modelId:n?.modelId??null})}function ha(e,t){if(typeof t!=="string"||!t.trim())throw Error("The context is empty");let o=a.get(e);if(!o)throw Error("The session's composer is not open; open the session first");let n=r.get(e),i=n?.text?`${n.text}
|
|
2
2
|
|
|
3
3
|
${t}`:t;o(i,"append"),r.set(e,n?{...n,text:i}:{text:i,attachments:[],mentions:[],modelId:null})}
|
|
4
|
-
export{r,
|
|
4
|
+
export{r,Ri,X,hn,ma,ga,vn,fa,ha};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var
|
|
2
|
-
export{
|
|
1
|
+
import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var pt="group/trailing";function Ze({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function mt({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
|
|
2
|
+
export{pt,Ze,mt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{x}from"./chunk-jfyz3rx6.js";import{wt}from"./chunk-pd5yrdg6.js";import{e}from"./chunk-b89bzpce.js";import{bt,j}from"./chunk-j29d8rts.js";import{Tn,He}from"./chunk-mdzng667.js";import{Be}from"./chunk-tszqev50.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function ca({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:x.id,name:x.name,models:t===void 0?[{api_id:"",label:x.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:bt(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:j(o.id,i.id),label:i.label??i.id}))}))],p=He(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(wt,{value:{...m,label:Tn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Be,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
|
|
2
|
+
export{ca};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function
|
|
2
|
-
export{
|
|
1
|
+
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function En(e){let{parse:o,execute:t,...s}=e;return{...s,execute:(n,i)=>t(o(n),i)}}var co="alwith";function m(e){if(e.length>128)throw Error("Too many application tools");let o=new Map;for(let t of e){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||o.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);o.set(t.name,{...t,inputSchema:structuredClone(t.inputSchema)})}return o}var p=(e)=>({content:[{type:"text",text:e instanceof Error?e.message:String(e)}],isError:!0});class uo{servers=new Map;session;identity;constructor(e,o){this.session=e,this.identity=o}declare(e,o){let t={agent:e,tools:m(o),sessionId:null};return t.mcp=u(()=>this.server(t)),t.registration=e.registerMcpServer({name:co,handler:t.mcp.handler}),this.servers.set(t.registration.serverId,t),t.registration.declaration}bind(e,o){let t=this.servers.get(e);if(!t)throw Error(`Application tool server is not registered: ${e}`);for(let[s,n]of this.servers)if(n.sessionId===o)this.dispose(s);t.sessionId=o}drop(e){for(let[o,t]of this.servers)if(t.sessionId===e)this.dispose(o)}clear(){for(let e of this.servers.keys())this.dispose(e)}dispose(e){let o=this.servers.get(e);if(!o)return;this.servers.delete(e),o.registration.dispose().then(()=>o.mcp.close())}server(e){let o=new g({name:co,version:"1.0.0"},{capabilities:{tools:{}}});return o.setRequestHandler("tools/list",()=>({tools:[...e.tools.values()].map((t)=>({name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description,inputSchema:structuredClone(t.inputSchema),...t.annotations===void 0?{}:{annotations:t.annotations}}))})),o.setRequestHandler("tools/call",async(t,s)=>{let n=e.tools.get(t.params.name);if(!n)return p(Error(`Application tool is not registered: ${t.params.name}`));let i=e.sessionId,l=i===null?void 0:this.session(i);if(i===null||!l?.attached||l.readOnly)return p(Error("Application tool session is not attached"));let{toolCallId:c,turnId:d}=this.identity(t.params._meta??{}),a=s.mcpReq.signal;try{let r=await n.execute(t.params.arguments??{},{sessionId:i,toolCallId:c,turnId:d,signal:a,agent:e.agent});return a.throwIfAborted(),r}catch(r){if(a.aborted)throw r;return p(r)}}),o}}
|
|
2
|
+
export{En,co,uo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-b89bzpce.js";import{De}from"./chunk-wbnmcagf.js";import{et}from"./chunk-hwppy236.js";import{Qt}from"./chunk-v6x7x69b.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Wt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function ci({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Wt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Wt,{label:et(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Wt,{label:et(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Zt({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(ci,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Qt,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(De,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
|
|
2
|
+
export{Wt,ci,Zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Re}from"./chunk-b5g055qp.js";import{O}from"./chunk-kv1v7kgn.js";import{cn as n}from"cn";import{Item as i,ItemActions as q,ItemContent as K,ItemDescription as de,ItemMedia as W,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function Z({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function we({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(Re,"data-[active=true]:font-medium",e),...r})}function zt({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(O,{children:t})})}export{q,K,de,W,Z,we,zt};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{_t,It,$n}from"./chunk-fer4r3b8.js";import{Tt,g}from"./chunk-a0qy1r02.js";import{InputGroupTextarea as w}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as K}from"cn";import{forwardRef as R,useCallback as D,useEffect as v,useImperativeHandle as M,useRef as d}from"react";import{flushSync as F}from"react-dom";import{jsx as N}from"react/jsx-runtime";var L=(i)=>!i.shiftKey,z=(i)=>i.altKey&&!i.ctrlKey&&!i.metaKey,po=R(({onChange:i,onKeyDown:x,onCompositionStart:T,onCompositionEnd:y,className:b,placeholder:E,bashMode:I=!1,isSendShortcut:C=L,isNewlineShortcut:S=z,...h},H)=>{let r=Tt(),f=g(),u=d(!1),c=d(!1),a=d(null),s=d(null),o=D(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||s.current!==null)return;s.current=requestAnimationFrame(()=>{s.current=null;let e=a.current;if(!e||u.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);v(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,n=new ResizeObserver(([l])=>{if(l&&l.contentRect.width!==t)t=l.contentRect.width,o()});return n.observe(e),o(),()=>{if(n.disconnect(),s.current!==null)cancelAnimationFrame(s.current);s.current=null}},[o]),v(o,[o,r?.textInput.value,h.value]);let p=I&&(r?.textInput.value??"").startsWith("!"),P=(e)=>{if(u.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||c.current)return;if(x?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
|
+
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(p&&r){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),r.textInput.setInput(r.textInput.value.slice(1));return}}if(e.key==="Enter"){if(S(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:n,selectionEnd:l}=t;if(r){let m=`${t.value.slice(0,n)}
|
|
3
|
+
${t.value.slice(l)}`;F(()=>r.textInput.setInput(p?`!${m}`:m)),t.setSelectionRange(n+1,n+1)}else t.setRangeText(`
|
|
4
|
+
`,n,l,"end");o();return}if(C(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let n=t.querySelector('button[type="submit"]');if(!n||n.disabled)return;t.requestSubmit(n)}}if(e.key==="Backspace"&&e.currentTarget.value===""){let t=f.files.at(-1);if(t&&!t.mediaType?.startsWith("image/"))e.preventDefault(),f.remove(t.id)}},k=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:n,sawNonImageFile:l}=_t(t),m=It(t);if(n.length>0)e.preventDefault(),f.add(n);else if(l&&!m)e.preventDefault()},A=r?{value:u.current&&a.current?a.current.value:p?r.textInput.value.slice(1):r.textInput.value,onChange:(e)=>{let t=u.current?e.currentTarget.value:$n(e.currentTarget);r.textInput.setInput(p?`!${t}`:t),o(),i?.(e)}}:{onChange:(e)=>{if(!u.current)$n(e.currentTarget);o(),i?.(e)}};return M(H,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>u.current||c.current,getTextarea:()=>a.current}),[]),N(w,{"data-chat-input":!0,ref:a,rows:3,className:K("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",b),name:"message",onCompositionEnd:(e)=>{u.current=!1;let t=$n(e.currentTarget);r?.textInput.setInput(p?`!${t}`:t),o(),y?.(e),c.current=!0,requestAnimationFrame(()=>{c.current=!1})},onCompositionStart:(e)=>{c.current=!1,u.current=!0,T?.(e)},onKeyDown:P,onPaste:k,placeholder:E,...h,...A})});po.displayName="PromptInputTextarea";
|
|
5
|
+
export{po};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Ea(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function _t(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Ea(t,o))}return{imageFiles:n,sawNonImageFile:i}}function It(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Vn(e){return e.replace(s,"")}function wa(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function $n(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Vn(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-wa(n,i)),r=Math.max(0,o-wa(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
+
export{Ea,_t,It,Vn,wa,$n};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{D}from"./chunk-c531krny.js";import{codexMessageError as b,nativeTurnId as y,textOf as w,turns as h}from"@nyssance/codex-acp-v2/client";function Va(t){return t.kind==="tool"&&t.name==="mcp_startup"}function v(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function g(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function ss(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&g(e))}function I(t,e,n){let r=t.work.at(-1);if(r?.kind==="activity"&&r.items.at(-1)===n){r.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function T(t,e,n){if(t.kind!=="tool"){e.push(t);return}let r=n.get(t.id);if(r===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(r);for(let i of t.children)T(i,e,n)}function M(t,e,n,r){switch(e.kind){case"user":break;case"assistant":{if(b(e)!==null){let s=y(e),l=t.errors.findIndex((p)=>s!==null&&y(p)===s);if(l===-1)t.errors.push(e);else t.errors[l]=e;break}let i=v(e),u=e._meta?.codex,o=D(e._meta).length>0||typeof u==="object"&&u!==null&&"delivery"in u&&u.delivery==="async";if(D(e._meta).length>0)t.final.push(e);else if(o)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(i==="final_answer")t.final.push(e);else if(i==="commentary"||g(e)||i===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":I(t,e,r);break;case"tool":if(I(t,e,r),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function x(t){return t.kind==="user"&&(t.echo==="pending"||t.echo==="acknowledged")}function A(t,e){let n=new Set(e.map((a)=>a.turnId)),r=new Map,i=[],u=(a)=>{let d={items:[],nativeId:a};return i.push(d),d},o,s,l=[],p=0;for(let a of t){let d=y(a);if(d!==null){let f=r.get(d);if(f!==void 0){f.items.push(a);continue}let k=l[p],c=k??o,m=a.kind!=="user"&&c?.nativeId===null&&c.items.length===1&&c.items[0]?.kind==="user"&&!n.has(d)&&!jn(a)?c:u(d);if(m===k)p++;m.nativeId=d,m.items.push(a),r.set(d,m),o=s=m;continue}if(a.kind==="user"){if(o=u(null),o.items.push(a),x(a))l.push(o);else s=o;continue}if(s===void 0)s={items:[],nativeId:null},i.unshift(s);s.items.push(a)}return i}function R(t,e){if(e.nativeId===null)return h({...t,items:e.items});let n=e.items[0],r=e.items.find((o)=>o.kind==="user");if(r===void 0)return h({...t,items:e.items});let i=r.echo==="adopted"&&r.at<n.at?[r,...e.items.filter((o)=>o!==r)]:e.items;if(!x(n))return h({...t,items:i});let u={...n,echo:null};return h({...t,items:[u,...i.slice(1)]}).map((o)=>o.prompt===u?{...o,prompt:n}:o)}function as(t,e=[],n=[]){let r=new Map(e.map((o)=>[o.key,o])),i=new Map(t.items.filter((o)=>o.kind==="tool").map((o)=>[o.id,o])),u={...t,items:t.items.filter((o)=>!Va(o))};return A(u.items,n).flatMap((o)=>R(u,o)).map((o)=>{let s=o.prompt===null?[]:[o.prompt];for(let c of o.entries)T(c,s,i);let l=s[0];if(l===void 0)throw Error("A turn without items");let p=`turn:${l.kind}:${l.id}`,a=o.endedAt??Math.max(...s.map((c)=>c.at)),d=r.get(p);if(d!==void 0&&S(d.items,s)&&d.endedAt===a)return d;let f={key:p,user:o.prompt,work:[],final:[],errors:[],edits:[],startedAt:o.startedAt??l.at,endedAt:a,replayed:s.every(jn),items:s},k=s.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return s.forEach((c,m)=>M(f,c,m<k,s[m-1])),f})}function S(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function jn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ye(t){return w(t.content)}function Ot(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Go(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function ls(t){let e=(i)=>{for(let u of t.items){let o=u._meta?.codex;if(typeof o!=="object"||o===null)continue;let s=o[i];if(typeof s==="number"&&Number.isFinite(s)&&s>=0)return s}return},n=e("workDurationMs"),r=e("turnDurationMs");return{durationMs:n??r,durationKind:n===void 0&&r!==void 0?"total":"work",startedAt:e("workStartedAt")}}function cs(t,e,n){if(n?.user==null)return!1;let r=e.items.map(y).find((u)=>u!==null),i=y(n.user);if(r!==void 0&&i!==null)return r===i;return!e.items.some((u)=>{let o=u._meta?.codex;return typeof o==="object"&&o!==null&&"turnCompletedAt"in o&&typeof o.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function ds(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let r=e[n];if(r.items.some((i)=>i.kind!=="user"))break;if(!cs(t,e[n-1],r))break;n--}return e[n]?.key}function us(t,e,n){let r=n,i=n;while(r>0&&cs(t,e[r-1],e[r]))r--;while(i+1<e.length&&cs(t,e[i],e[i+1]))i++;let u=e.slice(r,i+1),o=u.findLast((s)=>s.items.some((l)=>l.kind!=="user"))??u[0];return{continued:e[n]!==o,items:u.flatMap((s)=>s.items),edits:u.flatMap((s)=>s.edits),startedAt:u[0].startedAt}}
|
|
2
|
+
export{Va,ss,as,jn,ye,Ot,Go,ls,cs,ds,us};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var dt="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 Jt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(dt))n()}),[e]);return d(t,()=>o(e.get(dt)))}async function Xt(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[dt])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[dt]:i}})}
|
|
2
|
+
export{dt,Jt,Xt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{So}from"./chunk-6wsr59dr.js";async function hr(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 Mt(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of So(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{hr,Mt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-rayhzb8p.js";import{e,b}from"./chunk-b89bzpce.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as P}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as j}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as C,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as r,jsxs as s,Fragment as H}from"react/jsx-runtime";function k(t){return t.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||t}function na({cwd:t,onChange:u,preparing:M=!1,recentProjects:g}){let{host:i,client:p}=e(),{t:l}=i,w=n((o)=>o.projectContext),v=n((o)=>o.sessionList),y=R(()=>g??[...new Set([...v].toSorted((o,f)=>(f.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[g,v]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let o=!0;return b(i,p.refreshProjectContext(!0).then((f)=>{if(o)N(f.chatDirectory)})),()=>{o=!1}},[i,p]);let h=[...t!==null?[t]:[],...y.filter((o)=>o!==t)].filter((o)=>o!==c&&(!w||z(w,{cwd:o}).id!==I)),a=t!==null&&t!==c,D=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":M,className:P("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(x,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:D,children:[r(m,{className:"size-4 group-hover/project:opacity-0"}),r("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:r(j,{className:"size-3"})})]}),s(_,{render:r(x,{variant:"ghost",size:"sm",className:P("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&r(m,{className:"size-4"}),r("span",{className:"truncate",children:a?k(t):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[h.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:t??"",onValueChange:u,children:h.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(m,{}),r("span",{className:"truncate",children:k(o)})]},o))})}),(d!==void 0||a)&&r(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(C,{onClick:()=>{b(i,d(t).then((o)=>{if(o!==null)u(o)}))},children:[r(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(C,{onClick:D,children:[r(j,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
+
export{na};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{U}from"./chunk-awrz081w.js";import{vo,m,S,zn,yo,St}from"./chunk-82e3194f.js";import{pr,fo,mr,ho}from"./chunk-ay699evt.js";import{_t,It,Vn}from"./chunk-fer4r3b8.js";import{he,g}from"./chunk-a0qy1r02.js";import{cn as q}from"cn";import{forwardRef as z,useImperativeHandle as W,useLayoutEffect as O,useRef as p}from"react";import{jsx as j}from"react/jsx-runtime";var F=(r,E)=>r.text===E.text&&JSON.stringify(r.apps)===JSON.stringify(E.apps),go=z((r,E)=>{let I=he(),H=g(),s=p(null),K=p(null),a=p(S(m({text:I.textInput.value,apps:r.applications}))),d=p({start:r.initialCaret??m(a.current).length,end:r.initialCaret??m(a.current).length}),h=p(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),P=p([]),R=p(""),v=p(r.skillIcon),y=p(!1),x=p(!1),w=p(null),c=p({props:r,controller:I,attachments:H});c.current={props:r,controller:I,attachments:H};let f=()=>{if(s.current&&document.activeElement===s.current)d.current=mr(s.current,a.current.apps,d.current);return d.current},T=()=>{let e=s.current;if(!e)return;let t={...d.current};e.focus(),d.current=t,ho(e,t)},L=()=>({...a.current,selection:f()}),D=(e,t)=>{if(!s.current)return;if(pr(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),v.current=c.current.props.skillIcon,R.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),d.current=t,document.activeElement===s.current)ho(s.current,t)},C=(e,t,n=!0,l=!0)=>{if(l&&!F(a.current,e)){if(h.current.push(w.current??L()),h.current.length>100)h.current.shift();P.current=[]}if(w.current=null,a.current=e,d.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},b=(e)=>{let t=f(),n=m(a.current),l=m(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((k)=>typeof k==="string"?[]:[k.id])),u=l.filter((k)=>typeof k==="string"||!i.has(k.id)),o=S([...n.slice(0,t.start),...u,...n.slice(t.end)]),M=t.start+u.length;C(o,{start:M,end:M})},A=(e)=>{let n=(e?h.current:P.current).pop();if(!n)return;(e?P.current:h.current).push(L()),C({text:n.text,apps:n.apps},n.selection,!0,!1)},N=()=>{if(!s.current)return;let e=S(fo(s.current,a.current.apps)),t=f();if(y.current)return;let n=Vn(e.text),l=n===e.text?e:S(m({text:n,apps:e.apps}));C(l,t,n!==e.text)};O(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=S(m({text:i,apps:a.current.apps})),D(a.current,d.current)}},selectionStart:{configurable:!0,get:()=>zn(m(a.current),f().start)},selectionEnd:{configurable:!0,get:()=>zn(m(a.current),f().end)},setSelectionRange:{configurable:!0,value:(i,u)=>{let o=m(a.current);d.current={start:yo(o,i),end:yo(o,u)},D(a.current,d.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),K.current=e,D(a.current,d.current),T();let n=()=>{f()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(y.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),A(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),b({text:`
|
|
2
|
+
`,apps:[]});else w.current=L()};return e.addEventListener("beforeinput",l),e.addEventListener("change",N),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",N),document.removeEventListener("selectionchange",n),K.current=null}},[]),O(()=>{if(y.current)return;let e=S(m({text:I.textInput.value,apps:r.applications}));if(F(e,a.current)&&R.current===JSON.stringify(r.skillNames??[])&&v.current===r.skillIcon)return;let t=f();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),W(E,()=>({focus:T,getTextarea:()=>K.current,isComposing:()=>y.current||x.current,resetHeight:()=>{h.current=[],P.current=[]},insertInvocation:(e)=>{T(),b({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(T(),a.current.apps.some((t)=>t.id===e.id))return;b({text:"",apps:[{...e,offset:0}]})}}),[]);let J=(e)=>{if(y.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),A(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey||e.altKey&&!e.ctrlKey&&!e.metaKey)b({text:`
|
|
3
|
+
`,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=f(),n=m(a.current);if(t.start!==t.end){e.preventDefault(),b({text:"",apps:[]});return}let l=zn(n,t.start),i=U(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);C(S([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let u=e.key==="Backspace"?t.start-1:t.start;if(u>=0&&u<n.length&&typeof n[u]!=="string")e.preventDefault(),C(S([...n.slice(0,u),...n.slice(u+1)]),{start:u,end:u});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o&&!o.mediaType?.startsWith("image/"))e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},B=(e)=>{let t=f();if(t.start===t.end)return;let n=m(a.current).slice(t.start,t.end),l=S(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(vo,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)b({text:"",apps:[]})};return j("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:q("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:N,onKeyDown:J,onCompositionStart:()=>{w.current=L(),y.current=!0,x.current=!1},onCompositionEnd:()=>{y.current=!1,N(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=_t(e.clipboardData.items);if(e.preventDefault(),t.length){H.add(t);return}if(n&&!It(e.clipboardData.items))return;b(St(e.clipboardData)??{text:Vn(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:B,onCut:B,onDrop:(e)=>{e.preventDefault()}})});go.displayName="PromptInputInline";
|
|
4
|
+
export{go};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dt}from"./chunk-hpv8x22r.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{Dt}from"./chunk-hpv8x22r.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function ur({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Dt({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
|
|
2
|
+
export{ur};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{wt}from"./chunk-pd5yrdg6.js";import{n}from"./chunk-rayhzb8p.js";import{e,b}from"./chunk-b89bzpce.js";import{Y,y,ee}from"./chunk-rkqptd9w.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as B}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:G,onModelChange:h,onConfigChange:C,defaultGroup:I={id:"models",name:"Models"},catalog:x=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=n((o)=>Boolean(o.configPending[l])),p=F({sessionId:l,model:!0}),O=P&&(p.current.sessionId!==l||p.current.model),k=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=y(u,"model"),a=y(u,"thought_level"),v=u.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),_=v.filter(A),m=v.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(o,r)=>{if(r===o.currentValue)return Promise.resolve();p.current={sessionId:l,model:o===t};let d=C?C(o.configId,r):N.setConfig(l,o.configId,r);return b(c,d),d},g=a?Y(a):[],z=g.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),R=t?ee(t):i("composer.model"),S=(o)=>({api_id:o.value,label:o.name}),V=x(t&&q(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(S)})):[{...I,models:t?Y(t).map(S):[]}]),w=V.flatMap((o)=>o.models),M=w.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return B(wt,{disabled:G||O||k,switching:O,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(o)=>{if(o.api_id===t?.currentValue)return;if(h)h(o.api_id);else if(t)f(t,o.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:V,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(o)=>f(a,o)}:void 0,selectOptions:_.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:Y(o).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(o,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:B(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:m.find((E)=>E.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);f(d,r)}})}var Sn=D(H);
|
|
2
|
+
export{Sn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n}from"./chunk-rayhzb8p.js";import{e}from"./chunk-b89bzpce.js";import{y,ee}from"./chunk-rkqptd9w.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let o=Math.min(100,a/t*100),p=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:p}}function G(a){let t=y(a.configOptions,"model");return t===void 0?void 0:ee(t)}function et(a,t){let o=a.windowDurationMins;if(o===null)return t("usage.usage");if(o%1440===0)return t("usage.windowDays",{count:o/1440});return t("usage.windowHours",{count:Math.round(o/60)})}function P(a){let{client:t}=e(),o=n((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!o){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[o,t]),o?p:null}function _({session:a}){let{t}=e().host,o=y(a.configOptions,"model"),p=o!==void 0&&(L(o.options)?o.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((v)=>v.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((i)=>i.value===o.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,x=7,b=2*Math.PI*x,h=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||h+k+g+w,R=h+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(h)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],N=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[N!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:N,children:N})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,v])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:v})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:et(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var xn=W(_);
|
|
2
|
+
export{et,xn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ne}from"./chunk-5hjk7xnq.js";import{vt}from"./chunk-ky3n1mza.js";var fe={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:vt,parseConfig(e){if(typeof e.model!=="string"||typeof e.size!=="string"||Object.keys(e).some((t)=>t!=="model"&&t!=="size"))throw Error("Invalid image input config");let o={model:e.model,size:e.size};return ne(o),o},routePrompt(e){return e.image()}};
|
|
2
|
+
export{fe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{qi,On,Hn,Un,Bn}from"./chunk-wvm8srp7.js";import{Fn}from"./chunk-5t2ge7gg.js";var Rn=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",webSearch:"deepseek",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen4-max",label:"4 Max"},{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var a=Rn,p={anthropic:qi,deepseek:On,openrouter:Un,qwen:Bn,xai:Hn};function c(e){let n=p[e];if(!n)throw Error(`Provider ${e} has no logo`);return n}var E=a.filter((e)=>e.source!=="account").map(({source:e,...n})=>({...n,logo:c(n.id)}));function yt(e){return e!=null&&a.some((n)=>n.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(n.id)}:`))}function xt(e){let n=JSON.parse(e);if(!Array.isArray(n)||n.length===0)throw Error("Add at least one model");let t=new Set;return n.map((i)=>{if(typeof i!=="object"||i===null||Array.isArray(i))throw Error("Each model must be an object");let o=i,s=typeof o.label==="string"?o.label.trim():"",r=typeof o.api_id==="string"?o.api_id.trim():"";if(s===""||r==="")throw Error("Model label and API ID cannot be empty");if(t.has(r))throw Error("Model IDs must be unique");if(t.add(r),o.contextWindow!==void 0&&o.contextWindow!==null&&(!Number.isSafeInteger(o.contextWindow)||o.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(o.description!==void 0&&typeof o.description!=="string")throw Error("Model description must be a string");return{label:s,api_id:r,...o.contextWindow===void 0?{}:{contextWindow:o.contextWindow},...o.description===void 0?{}:{description:o.description}}})}function bt(e){return[...E.filter((n)=>e.providers[n.id]!==void 0).map((n)=>({id:n.id,name:n.name,models:n.models})),...[...e.customProviders,...e.managedProviders??[]].map((n)=>({id:n.id,name:n.name,models:n.models.map((t)=>({id:t.api_id,label:t.label,...t.description==null?{}:{description:t.description}}))}))]}function j(e,n){let t=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(i)=>i.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(t)}:${encodeURIComponent(n)}`}function xa(e,n,t="session",i=yt){let o=bt(n).flatMap((s)=>s.models.map((r)=>j(s.id,r.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(e!==null&&t==="session")throw Error(i(e)?"The selected ALwith account model is unavailable. Select another model before sending.":"The selected model connection is unavailable. Select another model before sending.");return o[0]??null}function ae(e,n){if(!e.regions)return null;let t=e.regions.find((i)=>i.id===n)??e.regions[0];if(!t)throw Error(`Provider ${e.id} declares no regions`);return t}function Ln(e,n){return ae(e,n)?.keyUrl??e.keyUrl??null}function Dn(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function ba(e){let n=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!n)return null;let t=decodeURIComponent(n[1]),i=Fn.models.find((o)=>o.slug===t);return i?{value:i.default_reasoning_level,hidden:i.supported_reasoning_levels.length===0}:null}var Ct=l;function Ca(e){return Ct[e]??{}}
|
|
2
|
+
export{Rn,E,yt,xt,bt,j,xa,ae,Ln,Dn,ba,Ct,Ca};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function wo({name:p,value:M,levels:h,disabled:c,onChange:P,trackWidth:f=100}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
+
export{wo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ki}from"./chunk-6ewv4vns.js";import{autoUpdate as K}from"@floating-ui/dom";import{cn as k}from"cn";import{CheckCheckIcon as L,CheckIcon as I,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as h,useId as S,useLayoutEffect as N,useRef as T,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as w}from"react/jsx-runtime";var U={allow_once:{icon:I},allow_always:{icon:L},reject_once:{icon:F},reject_always:{icon:V}};function Ci({requestId:u,options:E,title:_,children:D,total:v=1,alwaysLabel:P="always",autoFocus:y="always",anchorRef:o,onRespond:l}){let c=S(),[r,b]=f(0),[s,x]=f(null),[d,j]=f(null),p=T(null),a=ki(E);h(()=>{b(0)},[u]),h(()=>{let e=document.activeElement,t=p.current?.closest("[data-session-actions]")?.closest("[data-chat-drop-zone]"),n=e?.matches("[data-chat-input]")&&t?.contains(e);if(y==="always"||e===null||e===document.body||n)p.current?.focus({preventScroll:!0})},[u,d,y]);let m=H(()=>{let e=o?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let n=Math.min(640,window.innerWidth*0.9);x({left:(window.innerWidth-n)/2,width:n,bottom:24});return}x({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[o]);if(N(()=>{if(!o)return;let e=0,t=()=>{if(o.current)m();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[u,o,m]),N(()=>{let e=o?.current;if(!e||!d)return;return K(e,d,m,{animationFrame:!0})},[o,d,m]),o&&!s)return null;let g=w("div",{ref:j,"data-overlay":"permission-request",className:k("bg-card border-border flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border",o&&"fixed z-50"),style:o&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[i("div",{"data-permission-header":!0,className:"shrink-0 px-3 pt-2",children:w("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:c,className:"text-foreground text-sm font-medium",children:_}),v>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${v}`})]})}),i("div",{"data-permission-content":!0,className:"min-h-0 flex-1 overflow-auto overscroll-contain px-3 pb-2",children:D}),i("div",{role:"listbox","aria-labelledby":c,"aria-activedescendant":a[r]?`${c}-option-${r}`:void 0,tabIndex:0,ref:p,onKeyDown:(e)=>{if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=a.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),b((n)=>e.key==="ArrowDown"?(n+1)%t:(n-1+t)%t);else if(e.key==="Enter"){e.preventDefault();let n=a[r];if(n&&!e.repeat)l(n.optionId)}else if(e.key==="Escape")e.preventDefault(),l(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),l(a[Number(e.key)-1].optionId)},className:"border-border shrink-0 border-t outline-none",children:a.map((e,t)=>{let n=e.kind??"allow_once",C=U[n]?.icon??I,A=n==="allow_always"||n==="reject_always",M=n==="reject_once"||n==="reject_always";return w("div",{id:`${c}-option-${t}`,role:"option",onMouseDown:(O)=>O.preventDefault(),"aria-selected":t===r,title:e.description,onClick:()=>void l(e.optionId),className:k("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===r?"bg-ring text-accent-foreground":"text-foreground",M&&t!==r&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),A&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:P})]},e.optionId)})})]});return o?z(g,document.body):g}
|
|
2
|
+
export{Ci};
|