@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{wo}from"./chunk-j4w2hbbe.js";import{R}from"./chunk-9n8cds8p.js";import{cn as r}from"cn";import{ArrowUpRight as pe,ChevronUp as H,Loader2Icon as W,Zap as Z}from"lucide-react";import{Fragment as ce,useState as q}from"react";import{Button as A}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as J,DropdownMenuCheckboxItem as K,DropdownMenuContent as Q,DropdownMenuGroup as D,DropdownMenuItem as y,DropdownMenuLabel as L,DropdownMenuSeparator as u,DropdownMenuSub as S,DropdownMenuSubContent as T,DropdownMenuSubTrigger as C,DropdownMenuTrigger as X}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Switch as he}from"@nyssance/shadcn/vega/components/ui/switch";import{Tooltip as Y,TooltipContent as E,TooltipTrigger as ee}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as e,jsxs as a,Fragment as p}from"react/jsx-runtime";function wt({value:c,onChange:ne,models:x,modelGroups:O,compactCatalog:o,catalogHeight:ae="fixed",effortPresentation:j="slider",unavailableEffort:v,providerMenu:h,header:w,className:B,condensed:V,stripLabelPrefix:z,showDescription:se,showModelList:ie=!0,loading:oe,switching:G,isLoading:te,effortConfig:s,booleanOptions:k,onBooleanChange:_,selectOptions:le=[],t:m,...d}){let[de,re]=q(!1),[me,ue]=q(!1),l=k?.find((n)=>n.id==="fast_mode"),I=o?k?.filter((n)=>n!==l):k,P=(n)=>z&&n.startsWith(z)?n.slice(z.length):n;if(oe)return e("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:a(A,{variant:"ghost",disabled:!0,className:r("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",B),children:[e(W,{className:"size-3 animate-spin"}),e("span",{className:"text-muted-foreground truncate",children:m("model.loadingModels")})]})});return a("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[h&&a(J,{open:de,onOpenChange:re,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"provider-trigger",variant:"ghost",disabled:d.disabled,className:r("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[h.icon,e(H,{className:"size-2.5 shrink-0 opacity-60"})]})})}),e(E,{children:m("model.switchProvider")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[h.groups.map((n,t)=>a(ce,{children:[t>0&&n.length>0&&e(u,{}),e(R,{value:h.value,onValueChange:h.onChange,options:n})]},t)),h.moreAction&&a(p,{children:[e(u,{}),a(y,{onClick:h.moreAction,className:"whitespace-nowrap",children:[e("span",{className:"min-w-0 flex-1 truncate",children:m("model.moreModels")}),e(pe,{className:"size-4"})]})]})]})]}),a(J,{open:me,onOpenChange:ue,children:[a(Y,{children:[e(ee,{render:e(X,{render:a(A,{"data-testid":"model-trigger","aria-busy":G,variant:"ghost",className:r("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",V&&"h-7 gap-1 px-1.5 text-[11px]",B),...d,children:[c.icon,k?.some((n)=>n.id==="fast_mode"&&n.currentValue&&!n.disabled)&&e(Z,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),e("span",{className:r("min-w-0 flex-1 truncate text-start",V&&"text-[11px]"),children:P(c.label)||m("model.selectModel")}),s&&a("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[e("span",{className:"invisible col-start-1 row-start-1",children:s.sizer??s.levels.reduce((n,t)=>t.name.length>n.length?t.name:n,"")}),e("span",{className:"col-start-1 row-start-1",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),G?e(W,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):e(H,{className:r("size-3 shrink-0",V&&"size-2.5")})]})})}),e(E,{children:m("model.switchModel")})]}),a(Q,{side:"top",align:"end",sideOffset:4,className:r("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",o&&"flex w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5",o&&(ae==="content"?"max-h-[min(350px,var(--available-height))]":"h-[350px]")),children:[o&&a(p,{children:[a(D,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-2 py-1",children:[s?j==="slider"?e("div",{role:"menuitem","aria-label":s.name,className:"min-w-0 flex-1 [&>div]:justify-between [&>div]:gap-3 [&>div]:px-0 [&>div]:py-1.5",children:e(wo,{...s,disabled:d.disabled})}):a(S,{children:[a(C,{disabled:d.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[e("span",{children:s.name}),e("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(T,{children:e(R,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):v?a(y,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[e("span",{children:v.name}),e("span",{className:"text-muted-foreground truncate text-xs",children:v.label})]}):e(L,{className:"min-w-0 flex-1 truncate",children:w?.name}),l&&e(K,{"aria-label":l.name,title:l.title??l.name,disabled:d.disabled||l.disabled,checked:l.currentValue,closeOnClick:!1,onCheckedChange:(n)=>_?.(l.id,n),className:r("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ms-auto -me-2 size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",l.currentValue&&!l.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:l.icon??e(Z,{className:"size-4","aria-hidden":"true"})})]}),e(u,{className:"shrink-0"})]}),w&&!o&&a(p,{children:[a("div",{className:"flex items-center gap-2 px-2 py-2",children:[w.icon,e("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:w.name}),w.action]}),e(u,{})]}),a(D,{"data-model-menu-list":o?"":void 0,className:o?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[ie&&(te?e(y,{disabled:!0,className:"text-muted-foreground",children:m("model.loadingModels")}):x.length===0?e(y,{disabled:!0,className:"text-muted-foreground",children:m("model.noModelsAvailable")}):(()=>{let n=x.filter((i)=>!i.more),t=x.filter((i)=>i.more),F=n.length>0&&t.length>0,N=(i,g)=>({disabled:d.disabled,icon:i.icon,value:i.api_id,label:P(i.label),description:g?.noDescription?void 0:se?i.description:void 0}),M=(i)=>{let g=x.find((f)=>f.api_id===i);if(g)ne(g)};if(o)return e(R,{value:c.api_id,onValueChange:M,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:x.map((i)=>N(i))});return a(p,{children:[O?O.map((i)=>{let g=i.models.filter((b)=>!b.more),f=i.models.filter((b)=>b.more),U=g.length>0&&f.length>0;return a(D,{children:[e(L,{className:"text-muted-foreground text-xs font-normal",children:i.name}),e(R,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(U?g:i.models).map((b)=>N(b))}),U&&a(S,{children:[e(C,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(R,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:f.map((b)=>N(b,{noDescription:!0}))})})]})]},i.id)}):e(R,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:(F?n:x).map((i)=>N(i))}),!O&&F&&a(S,{children:[e(C,{className:"font-medium whitespace-nowrap",children:m("model.moreModels")}),e(T,{children:e(R,{value:c.api_id,onValueChange:M,itemClassName:"font-medium whitespace-nowrap",options:t.map((i)=>N(i,{noDescription:!0}))})})]})]})})()),!o&&s&&a(p,{children:[e(u,{}),j==="menu"?a(S,{children:[a(C,{disabled:d.disabled,children:[e("span",{className:"flex-1",children:s.name}),e("span",{className:"text-muted-foreground",children:s.levels.find((n)=>n.value===s.value)?.name??s.value})]}),e(T,{children:e(R,{value:s.value,onValueChange:s.onChange,options:s.levels.map((n)=>({value:n.value,label:n.name}))})})]}):e(wo,{...s,disabled:d.disabled})]}),!o&&!s&&v&&a(p,{children:[e(u,{}),a(y,{disabled:!0,children:[e("span",{className:"flex-1",children:v.name}),e("span",{children:v.label})]})]}),le.map((n)=>a(D,{children:[e(u,{}),e(L,{children:n.name}),e(R,{value:n.value,onValueChange:n.onChange,options:n.options,itemClassName:"whitespace-nowrap"})]},n.id)),I&&I.length>0&&a(p,{children:[!s&&e(u,{}),I.map((n)=>o?a(K,{"aria-label":n.name,title:n.title,disabled:d.disabled||n.disabled,checked:n.currentValue,closeOnClick:!1,onCheckedChange:(t)=>_?.(n.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[a("span",{className:"flex items-center gap-2",children:[n.icon,n.name]}),e("span",{"aria-hidden":"true",className:r("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",n.currentValue?"bg-primary":"bg-input"),children:e("span",{className:r("bg-background size-3.5 rounded-full shadow-xs transition-transform",n.currentValue&&"translate-x-3.5")})})]},n.id):a("div",{title:n.title,className:r("flex items-center justify-between gap-3 px-2 py-2.5",n.disabled&&"opacity-50"),children:[a("span",{className:"flex items-center gap-2 text-sm font-medium",children:[n.icon,n.name]}),e(he,{"aria-label":n.name,disabled:d.disabled||n.disabled,checked:n.currentValue,onCheckedChange:(t)=>_?.(n.id,t)})]},n.id))]})]}),o&&w?.action&&a(p,{children:[e(u,{className:"shrink-0"}),e(D,{"data-model-menu-footer":!0,className:"shrink-0",children:w.action})]})]})]})]})}
|
|
2
|
+
export{wt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-rayhzb8p.js";import{Cn}from"./chunk-p0v9d7e1.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Ni({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:Cn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:Cn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
|
|
2
|
+
export{Ni};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var ws=(t)=>{let e=t.startsWith("/")&&t!=="/"?t.replace(/\/+$/,""):t,r=/^\/(?:private\/)?(var|tmp|etc)(\/.*)?$/.exec(e);if(!r)return[e];let s=`${r[1]}${r[2]??""}`;return[`/private/${s}`,`/${s}`]};
|
|
2
|
+
export{ws};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Qo}from"./chunk-2d4zb2ac.js";import{jsx as o}from"react/jsx-runtime";function $t(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:Qo}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function Zo(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function B({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:Zo(t)})})}
|
|
2
|
+
export{$t,Zo,B};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{nt}from"./chunk-544g9fky.js";import{Xi}from"./chunk-p9x6rya1.js";import{l}from"./chunk-6283nzqs.js";import{he}from"./chunk-a0qy1r02.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as st}from"cn";import{BookOpenIcon as it,FileIcon as at,SquareSlashIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as ct,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as mt}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as pt}from"react/jsx-runtime";function Ji({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:j,fileSearchDebounceMs:M=0,bashMode:Q=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=he(),s=D.textInput.value,[z,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>Q&&s.startsWith("!")?null:Xi(s,z),[s,z,Q]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,et]=g(H);if(tt!==H)et(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),j(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,j]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return nt(q,o.query);if(i)return nt(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let K=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+K+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+K.length}else if(i)n=`${s.length===0||s.endsWith(`
|
|
2
|
+
`)?s:`${s}
|
|
3
|
+
`}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"&&!n.shiftKey&&!n.altKey||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,ot]=g(null),C=ct(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return rt(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:ot,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?it:lt:at;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:st(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(pt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(ut,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?mt(J,document.body):J}
|
|
4
|
+
export{Ji};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function
|
|
2
|
-
export{
|
|
1
|
+
class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function jr(i,e){return n??=new s,n.connect(i,e)}
|
|
2
|
+
export{jr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{yr}from"./chunk-6wsr59dr.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function ko(t,r,e={}){let o=r.trim();if(o.length===0)return[];return yr(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
|
|
2
|
+
export{ko};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function
|
|
2
|
-
export{
|
|
1
|
+
import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function $s(t){return{agent:()=>{let n=t.state.agent;if(t.state.connection!=="ready"||!n?.info)return null;return{name:n.info.title??n.info.name,version:n.info.version,authMethods:n.authMethods??[],actions:t.state.actions.filter((o)=>o.sessionId===null)}},subscribe:(n)=>t.store.subscribe(n),logout:()=>t.logout(),login:(n,o)=>t.login(n,o),respond:(n,o)=>t.respond(n,o),account:async()=>{if(t.state.connection!=="ready"||!x(t.state.agent))return null;let[n,o]=await Promise.all([t.readAccount(),t.readRateLimits().catch(()=>null)]);return{account:n,rateLimits:o}},onRateLimits:(n)=>t.onRateLimits(n)}}function js(t,n){let{listen:o,emitTo:u}=n,g=t.agent(),l=()=>{let s=t.agent();if(u(p,w,s),g===null!==(s===null))c();g=s},i=null,r=0,a=!1,c=async()=>{let s=++r;try{let d=await t.account();if(a||s!==r)return;i=d,await u(p,h,i)}catch(d){if(a||s!==r)return;await u(p,P,v(d))}},e=t.subscribe(l),m=t.onRateLimits((s)=>{if(i===null)return;i={...i,rateLimits:s},u(p,h,i)}),b=Promise.all([o(y,l),o(T,()=>void c()),o(E,({payload:s})=>void(async()=>{try{switch(s.action){case"login":await t.login(s.methodId,s.extra),await c();break;case"logout":await t.logout(),await c();break;case"respond":t.respond(s.actionId,s.answer);break}await u(p,A,{id:s.id,error:null})}catch(d){await u(p,A,{id:s.id,error:v(d)})}})())]);return()=>{a=!0,r++,e(),m(),b.then((s)=>{for(let d of s)d()})}}function qs(t,n=console.error){let{listen:o,emitTo:u}=t,g;async function l(i){let r,a=new Promise((e)=>{r=e}),c=await o(A,(e)=>{if(e.payload.id===i.id)r(e.payload)});try{await u(f,E,i);let{error:e}=await a;if(e!==null)throw Error(e)}finally{c()}}return{useSettingsAccount(){let[i,r]=S(()=>g);return R(()=>{let a=!1,c=Promise.all([o(h,(e)=>{if(a)return;g=e.payload,r(e.payload)}),o(P,(e)=>{if(a)return;if(g===void 0)r(null),n(e.payload);else console.error("Account refresh failed",e.payload)})]);return c.then(()=>{if(!a)return u(f,T)}),()=>{a=!0,c.then((e)=>{for(let m of e)m()})}},[]),i},useSettingsAgent(){let[i,r]=S(void 0);return R(()=>{let a=!1,c=o(w,(e)=>{if(!a)r(e.payload)});return c.then(()=>{if(!a)return u(f,y)}),()=>{a=!0,c.then((e)=>e())}},[]),i},requestSignOut:()=>l({id:crypto.randomUUID(),action:"logout"}),requestSignIn:(i,r)=>l({id:crypto.randomUUID(),action:"login",methodId:i,extra:r}),requestActionResponse:(i,r)=>l({id:crypto.randomUUID(),action:"respond",actionId:i,answer:r})}}
|
|
2
|
+
export{$s,js,qs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function Ro(n){if(n.kind!=="tool")return!1;let t=n._meta?.codex;return typeof t==="object"&&t!==null&&"commandSource"in t&&t.commandSource==="userShell"}function Lr(n,t,r){if(n.kind!=="tool"){let o=p(n.content),d=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(o);return{type:"thinking",id:n.id,thinking:d?d[1]:o,isComplete:!r}}if(n.name==="subagent"){let o=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:g(o.agentPath,n.id),threadId:f(o.agentThreadId,"agentThreadId",n.id),activity:y(o.activity,n.id),model:l(o.model,"model",n.id),reasoningEffort:l(o.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let o=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof o.tool!=="string"||!Array.isArray(o.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:o.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:o.agents}}let a=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},i=u(n,t);if(Array.isArray(a.command))a.command=a.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof a.command!=="string"){let o=i?.command??n.title;if(o!==null)a.command=o}let e=n.rawOutput;if(typeof e==="object"&&e!==null&&"output"in e&&typeof e.output==="string")e=e.output;if(i!==null&&i.output.length>0)e=i.output;let c=i?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:a,rawOutput:e,...Ro(n)?{userShell:!0}:{},...typeof c==="number"?{exitCode:c}:{}}}function s(n,t){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${t} is missing an object codex-acp-v2 always sends`);return n}function l(n,t,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${t}`)}function g(n,t){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${t} has no agent path`);return r}function f(n,t,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${t}`)}function y(n,t){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${t} has an unknown activity ${String(n)}`)}
|
|
2
|
+
export{Ro,Lr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function
|
|
2
|
-
export{
|
|
1
|
+
import{homedir as f,userInfo as h}from"node:os";import{join as u}from"node:path";var a=null,d={platform:process.platform,home:f(),env:process.env,username:()=>process.env.USER||h().username,async keychain(e,r){let t=JSON.stringify([e,r]);if(a){if(a.identity!==t)throw Error("Another Claude Keychain read is awaiting completion");return a.promise}let n=(async()=>{let s=Bun.spawn(["/usr/bin/security","find-generic-password","-a",r,"-w","-s",e],{stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[o,l,p]=await Promise.all([s.exited,new Response(s.stdout).text(),new Response(s.stderr).text()]);if(o===44)return null;if(o!==0)throw Error(`Claude Keychain read failed (${o}): ${p.trim()}`);if(!l.trim())throw Error("Claude Keychain item is empty");return l})().finally(()=>{a=null});return a={identity:t,promise:n},n},async file(e){try{return await Bun.file(e).text()}catch(r){if(typeof r==="object"&&r!==null&&"code"in r&&r.code==="ENOENT")return null;throw r}}};function c(e,r){let t;try{t=JSON.parse(e)}catch{throw Error(`Claude ${r} credential record contains invalid JSON`)}if(typeof t!=="object"||t===null||Array.isArray(t))throw Error(`Invalid Claude ${r} credential record`);let i=t;if(i.claudeAiOauth===void 0||i.claudeAiOauth===null)return null;if(typeof i.claudeAiOauth!=="object"||Array.isArray(i.claudeAiOauth))throw Error(`Invalid Claude ${r} OAuth record`);let n=i.claudeAiOauth;if(typeof n.accessToken!=="string"||!n.accessToken.trim()||!Array.isArray(n.scopes)||!n.scopes.every((s)=>typeof s==="string")||!n.scopes.includes("user:inference")||n.expiresAt!==null&&(typeof n.expiresAt!=="number"||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=0))throw Error(`Claude ${r} OAuth record has invalid token, expiry, or inference scope`);return{accessToken:n.accessToken,expiresAt:n.expiresAt,scopes:n.scopes,source:r}}async function Ii(e=d){if(e.env.CLAUDE_CODE_SIMPLE&&["1","true","yes","on"].includes(e.env.CLAUDE_CODE_SIMPLE.toLowerCase()))throw Error("Claude OAuth is disabled by CLAUDE_CODE_SIMPLE");if(e.env.CLAUDE_CODE_CUSTOM_OAUTH_URL||e.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR)throw Error("Custom Claude OAuth endpoints and descriptor credentials are not supported by the local-login reader");let r=e.env.CLAUDE_CODE_OAUTH_TOKEN;if(r!==void 0){if(!r.trim())throw Error("CLAUDE_CODE_OAUTH_TOKEN is empty");return{accessToken:r,expiresAt:null,scopes:["user:inference"],source:"environment"}}let t=e.env.CLAUDE_CONFIG_DIR;if(t==="")throw Error("CLAUDE_CONFIG_DIR is empty");let i=(t??u(e.home,".claude")).normalize("NFC");if(e.platform==="darwin"){let s=t===void 0?"":`-${new Bun.CryptoHasher("sha256").update(i).digest("hex").slice(0,8)}`,o=await e.keychain(`Claude Code-credentials${s}`,e.username());if(o!==null)return c(o,"keychain")}else if(e.platform!=="win32")throw Error(`Unsupported Claude login platform: ${e.platform}`);let n=await e.file(u(i,".credentials.json"));return n===null?null:c(n,"file")}async function la(e=d,r=Date.now()){let t=await Ii(e);if(!t)throw Error("No existing Claude subscription login; sign in through Claude Code or ALwith Desktop");if(t.expiresAt!==null&&t.expiresAt<=r+60000)throw Error("The existing Claude access token is expired or expiring; refresh it in the owning Claude Code or ALwith CLI before retrying");return t.accessToken}
|
|
2
|
+
export{Ii,la};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Cs}from"./chunk-06mvwewp.js";import{createContext as s,useContext as o,useSyncExternalStore as m}from"react";import{jsx as l}from"react/jsx-runtime";var u=s(null),c=s(null),Vo=s(null);function le(){return o(Vo)}function Ve({host:e,client:i,children:r}){return l(Cs,{host:e,children:l(u,{value:e,children:l(c,{value:i,children:r})})})}function t(){let e=o(u);if(e===null)throw Error("Timeline host is missing");return e}function $e(){let e=o(c);if(e===null)throw Error("Timeline client is missing");return e}function w(e,i){return m((r)=>e.subscribe(r),()=>i(e.getState()),()=>i(e.getState()))}function n(e){let i=$e();return w(i.store,e)}function $o(){return o(u)!==null}function ce(e,i){if(e.reportError)e.reportError(i);else console.error(i)}
|
|
2
|
+
export{Vo,le,Ve,t,$e,w,n,$o,ce};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{F}from"./chunk-06mvwewp.js";import{t}from"./chunk-rayhzb8p.js";import{L}from"./chunk-3915ad7f.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(F,{text:e.text,streaming:o})})}if(i.isImage(e))return n(L,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(L,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function ze({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{ze};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{R}from"./chunk-9n8cds8p.js";import{useState as g}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as w,DropdownMenuContent as x,DropdownMenuTrigger as b}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as o}from"react/jsx-runtime";function Yi({value:a,currentName:n,icon:r,options:p,label:i,header:t,onValueChange:s,showLabel:d=!1,disabled:l=!1,warning:u=!1}){let[m,c]=g(!1);return o(w,{open:m,onOpenChange:c,children:[e(b,{render:o(f,{disabled:l,"data-permission-warning":u?"":void 0,variant:"ghost","aria-label":`${i}: ${n}`,title:n,className:"text-muted-foreground data-popup-open:hover:bg-muted h-7 gap-1.5 rounded-full bg-transparent px-2 text-xs font-normal whitespace-nowrap data-popup-open:bg-transparent",children:[r,e("span",{className:d?"max-w-40 truncate":"hidden max-w-40 truncate @[40rem]/input-footer:inline-block",children:n})]})}),o(x,{align:"start",sideOffset:4,className:"permission-mode-menu z-100 w-auto max-w-[calc(100vw-2rem)] min-w-72 rounded-xl p-1.5",children:[t&&e("div",{className:"text-muted-foreground flex items-center px-1.5 pt-0.5 pb-1 text-[11px] leading-4",children:e("span",{children:t})}),e(R,{value:a,onValueChange:s,itemClassName:"items-center gap-2 py-1 pr-6 pl-2 whitespace-nowrap",options:p})]})]})}
|
|
2
|
+
export{Yi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-rayhzb8p.js";import{useLayoutEffect as b,useRef as g,useState as h}from"react";import{jsx as x}from"react/jsx-runtime";var d=[[0,3],[0.1,25],[0.55,58],[0.85,88],[1,90]];function Ra(a,u){let e=Math.max(0,(u-a)/45000);for(let n=1;n<d.length;n+=1){let[c,r]=d[n-1],[s,l]=d[n];if(e<=s){let o=(e-c)/(s-c);return Math.floor(r+o*(l-r))}}return Math.min(99,Math.floor(90+10*(1-Math.exp(-1.5*(e-1)))))}function Ir({startedAt:a}){let{t:u}=t(),e=g(null),[n,c]=h(3);b(()=>{let s=e.current.ownerDocument,l=!1,o,m=()=>{clearInterval(o),o=void 0},f=()=>{let i=Ra(a,Date.now());if(c(i),i===99)m();return i},p=()=>{if(m(),l&&!s.hidden&&f()<99)o=setInterval(f,500)};f();let v=new IntersectionObserver(([i])=>{l=i.isIntersecting,p()});return v.observe(e.current),s.addEventListener("visibilitychange",p),()=>{v.disconnect(),s.removeEventListener("visibilitychange",p),m()}},[a]);let r=u("timeline.imageProgressPercent",{percent:n});return x("span",{ref:e,role:"status",title:r,"aria-label":r,className:"text-xs tabular-nums",children:r})}
|
|
2
|
+
export{Ra,Ir};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function Y(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function y(e,t){return e.find((n)=>n.category===t&&o(n))}function ee(e){return Y(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
|
|
2
|
+
export{Y,y,ee};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var V="collection-default";function se(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Qe(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function tn(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function Ys(o,e=Qe()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
|
|
2
|
+
export{V,se,Qe,tn,Ys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function
|
|
2
|
-
export{
|
|
1
|
+
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function Uo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Ft(t,o){let e=Uo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function Jr(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function Xr(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
|
|
2
|
+
export{Uo,Ft,Jr,Xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{createPortal as n}from"react-dom";import{jsx as t}from"react/jsx-runtime";function rs({src:o,alt:e,onClose:i}){return n(t("button",{type:"button",className:"fixed inset-0 z-[1000] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.7)"},onClick:i,children:t("img",{src:o,alt:e,style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4}})}),document.body)}
|
|
2
|
+
export{rs};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
`),b=o?null:
|
|
3
|
-
export{
|
|
1
|
+
import{t}from"./chunk-rayhzb8p.js";import{Io,Po}from"./chunk-c4rptwfx.js";import{D}from"./chunk-c531krny.js";import{At}from"./chunk-wv6ntscn.js";import{Ro}from"./chunk-r84xcy0d.js";import{ss,ye,Ot,ls}from"./chunk-fy8dmpv3.js";import{Ao}from"./chunk-18ea0dty.js";import{ze}from"./chunk-re34mbpa.js";import{Lo}from"./chunk-tzb4b5ve.js";import{Do}from"./chunk-1h3f538q.js";import{Pr}from"./chunk-mfrg4vze.js";import{Ir}from"./chunk-rhptdqpp.js";import{ns}from"./chunk-srqs8z90.js";import{Mr}from"./chunk-4hasepkm.js";import{To,Mo}from"./chunk-4z6gyvy3.js";import{Rt}from"./chunk-mahky9ad.js";import{codexMessageError as ne,codexTurnError as ie,isContentEntry as ce,isEmbeddedResource as re,isImage as oe,isResourceLink as fe,isText as ge,nativeTurnId as ue}from"@nyssance/codex-acp-v2/client";import{SparklesIcon as pe}from"lucide-react";import{Fragment as v,memo as he,useEffect as ke,useState as xe}from"react";import{jsx as i,jsxs as f,Fragment as x}from"react/jsx-runtime";import{createElement as we}from"react";function se(s){if(oe(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(re(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function Te({item:s}){let{t:n}=t(),l=s.status==="in_progress",[o,d]=xe(()=>Date.now()-s.at>=1e4);return ke(()=>{if(!l)return;let m=Math.max(0,s.at+1e4-Date.now());if(d(m===0),m===0)return;let a=setTimeout(()=>d(!0),m);return()=>clearTimeout(a)},[s.id,s.at,l]),f("div",{className:"codex-context-compaction",children:[i(pe,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?n("stream.codex.contextCompacted"):s.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function G({sessionId:s,entry:n,terminals:l,streaming:o,streamingThoughtId:d}){let{t:m}=t();switch(n.kind){case"activity":return i(Ao,{sessionId:s,items:n.items,terminals:l,streamingThoughtId:d});case"text":return D(n.item._meta).length>0?i(Do,{sessionId:s,item:n.item}):i(ze,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return i(ns,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return f(To,{children:[i("div",{children:m("timeline.compactionFailed")}),n.item.error!==null&&i("div",{children:n.item.error})]});return i(Te,{item:n.item})}}function L(s){let{entry:n,entries:l=[]}=s;if(n.kind!=="activity")return f(x,{children:[i(G,{...s}),l.filter((a)=>a.afterItemId===n.item.id).map((a,p)=>i(v,{children:a.content},`${a.afterItemId}:${p}`))]});let o=[],d=[],m=()=>{if(d.length===0)return;let a=d[0];o.push(we(G,{...s,key:`${n.key}:${a.id}`,entry:{...n,key:`${n.key}:${a.id}`,items:d}})),d=[]};for(let a of n.items){d.push(a);let p=l.filter((T)=>T.afterItemId===a.id);if(p.length>0)m(),p.forEach((T,E)=>o.push(i(v,{children:T.content},`${a.id}:detail:${E}`)))}return m(),i(x,{children:o})}function Ie({sessionId:s,turn:n,terminals:l,active:o,blocked:d=!1,continued:m=!1,edits:a=n.edits,activityItems:p=n.items,workStartedAt:T=n.startedAt,isLast:E,error:N,interrupted:V,retry:B,retrying:I,extraWork:c=null,answerActions:H,footer:ae}){let{t:y}=t(),_=n.errors.map((e)=>{let r=ne(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let g=B?.turnId===ue(e)?B:void 0;return i(Mo,{error:r,retry:g},`${e.id}:${g?.delaySeconds??"manual"}`)});if(E&&N!==null&&!n.errors.some((e)=>{let r=ne(e);return r!==null&&r.stopReason===N.stopReason&&ie(r).message===ie(N).message}))_.push(i(Mo,{error:N},"current-run-error"));let A=_.length>0?i("div",{className:"codex-turn-errors",children:_}):null,M=n.items.filter(Ro);if(c===null&&M.length>0&&M.length===n.items.length)return f(x,{children:[i(Ao,{sessionId:s,items:M,terminals:l,streamingThoughtId:null}),A]});let F=n.work,R=F.length>0&&F.every((e)=>e.kind==="compaction");if(c===null&&(ss(n)||R&&n.final.length===0))return f(x,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>i(G,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),A]});let K=Ot(n),Q=n.final.filter((e)=>D(e._meta).length===0).map((e)=>ye({...e,content:Lo(e.content,n.items)})).join(`
|
|
2
|
+
`),b=o?null:Rt(n,"assistant"),C=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),j=new Set(n.final.flatMap((e)=>e.content.map(se).filter((r)=>r!==null))),h=n.items.flatMap((e)=>{if(!At(e))return[];return e.content.filter(ce).flatMap((r,g)=>{let u=r.content,k=oe(u),de=fe(u)||re(u)&&"blob"in u.resource;if(!k&&!de)return[];let W=se(u);if(W!==null){if(j.has(W))return[];j.add(W)}return[{key:`${e.id}:${g}`,block:u,index:n.items.indexOf(e)}]})}),J=n.final.some((e)=>D(e._meta).length===0&&e.content.some((r)=>!ge(r)||r.text.trim().length>0)),me=C.length>0||h.length>0||R||J||n.final.some((e)=>D(e._meta).length>0),U=[...n.final.map((e)=>n.items.indexOf(e)),...h.map((e)=>e.index),...C.map((e)=>n.items.indexOf(e))],S=U.length===0?-1:Math.min(...U),q=new Set([...h.map((e)=>n.items[e.index].id),...C.map((e)=>e.id)]),z=F.flatMap((e)=>{if(e.kind!=="activity"||!e.items.some((k)=>q.has(k.id)))return[e];let r=[],g=[],u=()=>{if(g.length===0)return;r.push({...e,key:`activity:${g[0].kind}:${g[0].id}`,items:g}),g=[]};for(let k of e.items)if(g.push(k),q.has(k.id))u();return u(),r}),O=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),X=z.filter((e)=>S===-1||O(e)<S),le=[...z.filter((e)=>S!==-1&&O(e)>=S).map((e)=>({kind:"work",entry:e,index:O(e)})),...h.map((e)=>({kind:"artifact",...e})),...C.map((e)=>({kind:"generation",item:e,index:n.items.indexOf(e)})),...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)}))].toSorted((e,r)=>e.index-r.index),Y=!o&&!m&&(Q.trim().length>0?i(Io,{text:Q,isMostRecentTurn:E,time:b,afterCopy:H}):f("div",{className:"flex items-center gap-0.5",children:[H,b&&i("span",{className:"codex-user-time ms-1",title:b.full,children:b.short})]})),w=Mr({...n,items:p},{running:o,blocked:d,retrying:I!==void 0}),Z=w.kind==="reasoning"?w.ownerKey??null:null,ee=w.kind==="thinking",P=ls({...n,items:p}),te=o&&!J||c?.active===!0;return f(x,{children:[i(Po,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:te,defaultExpanded:te||c?.defaultExpanded===!0||!n.replayed&&(V||K),...P,durationMs:c?.active?void 0:P.durationMs,startedAt:P.startedAt??T,loading:(ee||w.kind==="working")&&n.work.length===0&&c===null,loadingLabel:w.kind==="working"?y("stream.codex.working"):void 0,work:[...(c?.entries??[]).filter((e)=>e.afterItemId===null||n.user?.id===e.afterItemId).map((e,r)=>i(v,{children:e.content},`prompt-detail:${r}`)),...m||R?[]:X.map((e)=>i(L,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:Z},e.key)),...c===null?[]:[i(v,{children:c.content},"additional-work")]],answer:me||m?f("div",{className:"flex min-w-0 flex-col gap-3",children:[(m||R)&&X.map((e)=>i(L,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),le.map((e)=>{if(e.kind==="work")return i(L,{entries:c?.entries,sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Z},e.entry.key);if(e.kind==="artifact")return i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:i(ze,{content:[e.block],messageId:e.key,streaming:!1})},e.key);if(e.kind==="generation")return f("div",{className:"codex-image-generation",role:"status","aria-label":y(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),f("span",{className:"codex-image-generation-status",children:[o&&i(Ir,{startedAt:e.item.at}),!o&&y("timeline.imageStopped")]})]},e.item.id);let r=e.item;return f(v,{children:[D(r._meta).length>0?i(Do,{sessionId:s,item:r}):i(ze,{content:Lo(r.content,n.items),messageId:r.id,streaming:o}),r===n.final.at(-1)&&h.length===0&&Y]},r.id)}),(n.final.length===0||h.length>0)&&Y]}):null,footer:f(x,{children:[ee&&n.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:y("message.thinking")})}),ae,a.length>0&&!o&&!m&&i(Pr,{items:a}),V&&!K&&i("div",{className:"codex-interrupted-turn",role:"status",children:y("timeline.interrupted")}),!o&&A]})}),o&&I!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:I.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(I.message)?.[1];return e===void 0?y("timeline.capacityReconnecting"):y("timeline.capacityReconnectingProgress",{progress:e})})():I.message}),o&&A]})}var Sr=he(Ie);
|
|
3
|
+
export{Sr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{F}from"./chunk-06mvwewp.js";import{ve}from"./chunk-15m908ph.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function ns({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(F,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ve,{entries:t.entries})}
|
|
2
|
+
export{ns};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e}from"./chunk-2c4hqv8f.js";import{Wt}from"./chunk-kq8jv5tf.js";import{N,vt,re,Sn}from"./chunk-nravn5bk.js";import{hn,vn}from"./chunk-v0xy25sh.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as j}from"cn";import{ChevronDownIcon as te,ExternalLinkIcon as ve,EyeIcon as se,EyeOffIcon as ne,PlusIcon as ge,ServerIcon as oe,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as ie,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as O,FieldDescription as de,FieldLabel as _}from"@nyssance/shadcn/vega/components/ui/field";import{Input as Z}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as H,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as Q}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as X}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Y(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function ti({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,w=Y(),[k,P]=y(0),[l,n]=y(null),[h,c]=y(!0),S=ye(s);return S.current=s,V(()=>{let b=()=>P((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),S.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[k]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(F,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(w)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(F,{variant:"outline",size:"sm",disabled:h,onClick:()=>P((b)=>b+1),children:[h&&t(X,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function Is({port:s,bridge:d,group:u,label:v,refreshAccountProviders:w,openTopUp:k}){let{host:P}=e(),{t:l}=P,n=Y(),h=(o)=>P.notify?.(o),c=vn(s,n),S=c?.providers??{},[b,p]=y(null),[x,I]=y(N[0]?.id??""),[K,U]=y(0),[z,M]=y({}),J=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)M((L)=>{let G={...L};return delete G[r.id],G});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},T=async(o)=>{p(o);try{let r=await s.test(o);if(M((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},R=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else M((a)=>{let L={...a};return delete L[r.id],L}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},E=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else I(N[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},B=async()=>{p("retry");try{let o=await hn(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},C=N.find((o)=>o.id===x)??null,A=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||C||A)return;I(N[0]?.id??"")},[c,x,C,A]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Wt,{bridge:d})]}),w&&t(ti,{refreshAccountProviders:w,openTopUp:k,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(F,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void B(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(ni,{activeId:x,keys:S,customProviders:c.customProviders,onSelect:I,onAdd:()=>I("new"),label:v}),N.map((o)=>t("div",{hidden:x!==o.id,children:t(ii,{provider:o,saved:S[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>J(r,o,f),testResult:z[o.id],onTest:()=>T(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(Xn,{provider:o,revision:c.revision,busy:b!==null,testResult:z[o.id],onTest:()=>T(o.id),onRemove:()=>E(o),onSaved:I,onSave:R})},o.id)),t("div",{hidden:x!=="new",children:t(Xn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{U((r)=>r+1),I(o)},onSave:R},K)})]})})]})}function ni({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:w,label:k}){let{t:P}=e().host;return i("div",{children:[t(k,{children:P("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[N.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(ee,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(ee,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(oe,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(F,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:w,className:j("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:P("provider.customButton")})]})]})]})}function ee({id:s,name:d,active:u,configured:v,icon:w,onClick:k}){return i(F,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:k,className:j("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[w,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:j("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function oi({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:w,children:k}){let{t:P}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[w&&t(oi,{result:w}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:P("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(F,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),P("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(F,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:P("provider.testButton")}),k]})]})]})}function ii({provider:s,saved:d,revision:u,busy:v,onSave:w,testResult:k,onTest:P}){let{host:l}=e(),{t:n}=l,h=Y(),[c,S]=y(""),[b,p]=y(!1),[x,I]=y({saved:d,revision:u}),[K,U]=y(re(s,d?.region)?.id),[z,M]=y(d?.base_url??""),J=s.logo,T=d!==null,R=c.trim(),E=Sn(s,K),B=K!==re(s,x.saved?.region)?.id,C=z.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&R===""&&!B&&!C)I({saved:d,revision:u}),U(re(s,d?.region)?.id),M(d?.base_url??"")},[u,d,s,x.revision,R,B,C]);let A=!v&&(R!==""||B||C),o=`${s.id}-api-key`,r=async(a)=>{let L=c,G=K,m=await w(x.revision,a);if(!m)return;let D=m.providers[s.id]??null;I({saved:D,revision:m.revision}),S((g)=>g===L?"":g),U((g)=>g===G?re(s,D?.region)?.id:g),M((g)=>g===z?D?.base_url??"":g)},f=()=>{if(R===""&&x.saved===null)return;r({...R===""?{}:{apiKey:R},...K===void 0?{}:{region:K},...C?{baseUrl:z.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(J,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:T?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:K,onValueChange:(a)=>U(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(O,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(_,{htmlFor:o,children:n("provider.apiKey")}),E!==null&&i(F,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(E)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(H,{children:[t(q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:T?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>S(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&A)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(se,{}):t(ne,{})})})]})]}),i(ie,{className:"space-y-2",children:[i(le,{render:t(F,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(te,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(O,{className:"gap-2",children:[t(_,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(H,{children:t(q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:re(s,K)?.baseUrl??s.baseUrl,value:z,onChange:(a)=>M(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!A,onTest:T?P:void 0,onRemove:T?()=>void r(null):void 0,result:!A?k:void 0,children:i(F,{size:"sm",disabled:!A,onClick:f,children:[v&&t(X,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function Xn({provider:s,revision:d,busy:u,testResult:v,onTest:w,onRemove:k,onSaved:P,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[S,b]=y(s?.baseUrl??""),[p,x]=y(""),[I,K]=y(!1),[U,z]=y(s===null),[M,J]=y(s?.models??[]),[T,R]=y(s?JSON.stringify(s.models,null,2):`[
|
|
1
|
+
import{e}from"./chunk-b89bzpce.js";import{Zt}from"./chunk-f8bx4etj.js";import{E,xt,ae,Ln}from"./chunk-j29d8rts.js";import{un,pn}from"./chunk-jzarxwap.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as j}from"cn";import{ChevronDownIcon as te,ExternalLinkIcon as ve,EyeIcon as se,EyeOffIcon as ne,PlusIcon as ge,ServerIcon as oe,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as ie,CollapsibleContent as re,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as O,FieldDescription as de,FieldLabel as _}from"@nyssance/shadcn/vega/components/ui/field";import{Input as Z}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as H,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as Q}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as X}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Y(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function ri({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Y(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,V(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(X,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function Ks({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Y(),h=(o)=>N.notify?.(o),c=pn(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(E[0]?.id??""),[F,B]=y(0),[U,M]=y({}),J=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)M((L)=>{let G={...L};return delete G[r.id],G});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(M((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else M((a)=>{let L={...a};return delete L[r.id],L}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},z=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(E[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await un(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=E.find((o)=>o.id===x)??null,A=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||P||A)return;k(E[0]?.id??"")},[c,x,P,A]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Zt,{bridge:d})]}),C&&t(ri,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(si,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),E.map((o)=>t("div",{hidden:x!==o.id,children:t(li,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>J(r,o,f),testResult:U[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(Xn,{provider:o,revision:c.revision,busy:b!==null,testResult:U[o.id],onTest:()=>I(o.id),onRemove:()=>z(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(Xn,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{B((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function si({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[E.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(ee,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(ee,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(oe,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:j("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function ee({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:j("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:j("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function ai({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(ai,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function li({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Y(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,B]=y(ae(s,d?.region)?.id),[U,M]=y(d?.base_url??""),J=s.logo,I=d!==null,T=c.trim(),z=Ln(s,F),K=F!==ae(s,x.saved?.region)?.id,P=U.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),B(ae(s,d?.region)?.id),M(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let A=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let L=c,G=F,m=await C(x.revision,a);if(!m)return;let D=m.providers[s.id]??null;k({saved:D,revision:m.revision}),w((g)=>g===L?"":g),B((g)=>g===G?ae(s,D?.region)?.id:g),M((g)=>g===U?D?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:U.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(J,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>B(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(O,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(_,{htmlFor:o,children:n("provider.apiKey")}),z!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(z)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(H,{children:[t(q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&A)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(se,{}):t(ne,{})})})]})]}),i(ie,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(te,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(re,{children:i(O,{className:"gap-2",children:[t(_,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(H,{children:t(q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:ae(s,F)?.baseUrl??s.baseUrl,value:U,onChange:(a)=>M(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!A,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!A?S:void 0,children:i(R,{size:"sm",disabled:!A,onClick:f,children:[v&&t(X,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function Xn({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[B,U]=y(s===null),[M,J]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
|
|
2
2
|
{ "label": "My Model", "api_id": "model-id" }
|
|
3
|
-
]`),[
|
|
4
|
-
export{
|
|
3
|
+
]`),[z,K]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),A=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),L=(m)=>{if(!m)try{J(xt(I)),K(null)}catch(D){K(W(D));return}U(m)},G=async()=>{let m;try{m=xt(I),K(null)}catch(g){K(W(g)),U(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(oe,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(Q,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(O,{className:"gap-2",children:[t(_,{htmlFor:A,children:n("provider.name")}),t(Z,{id:A,value:h,onChange:(m)=>c(m.target.value)})]}),i(O,{className:"gap-2",children:[t(_,{htmlFor:o,children:n("provider.baseUrl")}),t(Z,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(O,{className:"gap-2",children:[t(_,{htmlFor:r,children:n("provider.apiKey")}),i(H,{children:[t(q,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(se,{}):t(ne,{})})})]})]})]}),t(Q,{}),i(ie,{open:B,onOpenChange:L,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(B?"provider.previewModels":"provider.editModels"),t(te,{className:j("size-4",B&&"rotate-180")})]})]}),!B&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:M.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(re,{children:i(O,{className:"gap-2","data-invalid":z!==null,children:[t(_,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":z!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),K(null)}}),t(de,{id:`${f}-description`,className:j("text-xs",z&&"text-destructive"),role:z?"alert":void 0,children:z??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void G(),children:[u&&t(X,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
|
|
4
|
+
export{ri,Ks,si,ai,li,Xn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{s}from"./chunk-af0e5epn.js";import{Yt}from"./chunk-wbjf9maj.js";import{O}from"./chunk-kv1v7kgn.js";import{en,Ae}from"./chunk-7k2z2nvy.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as E}from"lucide-react";import{useEffect as g,useState as A}from"react";import{Input as D}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as w}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function lt(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Pe({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Ae(),y=en();g(()=>{f(n)},[n,f]);let[I,p]=A(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?lt(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Yt,{title:n?o(D,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(O,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(E,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(w,{}),a]}):void 0})}
|
|
2
|
+
export{lt,Pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function An(n,r){let i=new Set(r);i.add(n);let t=/^(.*?)\s*\((\d+)\)$/.exec(n),s=t?t[1].trimEnd():n,e=t?BigInt(t[2])+1n:2n;while(i.has(`${s} (${e})`))e++;return`${s} (${e})`}
|
|
2
|
+
export{An};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-b89bzpce.js";import{ExternalLink as n}from"lucide-react";import{DropdownMenuItem as m}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as i,jsxs as l}from"react/jsx-runtime";function Be(){let{host:o}=e(),r=o.openSettings;if(!r)return null;return l(m,{className:"h-9 gap-2 rounded-md px-2 text-sm font-normal",onClick:()=>{Promise.resolve(r("provider")).catch((t)=>o.reportError?o.reportError(t):console.error(t))},children:[o.t("model.moreModels"),i(n,{className:"ml-auto size-4","aria-hidden":"true"})]})}
|
|
2
|
+
export{Be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{be}from"./chunk-x4bzkzbt.js";import{isContentEntry as u,isImage as c,isText as s}from"@nyssance/codex-acp-v2/client";var d=be();function Lo(f,m){let i=new Set;for(let e of m){if(e.kind!=="tool"||e.status!=="completed")continue;let o=e.content.filter(u);if(!o.some((n)=>c(n.content)))continue;o.forEach((n,a)=>{if(c(n.content))i.add(`${e.id}:${a}`);if(!s(n.content))return;let r;try{r=JSON.parse(n.content.text)}catch(t){if(t instanceof SyntaxError)return;throw t}if(r===null||typeof r!=="object"||!("kind"in r)||r.kind!=="alwith.image"||!("images"in r)||!Array.isArray(r.images))return;for(let t of r.images)if(t!==null&&typeof t==="object"&&typeof t.reference==="string")i.add(t.reference)})}if(i.size===0)return f;return f.map((e)=>{if(!s(e)||!e.text.includes("!["))return e;let o=d.lexer(e.text).map((n)=>{if(n.type!=="paragraph"||!n.tokens)return n.raw;let a=0;return n.tokens.map((t)=>(a+=t.raw.length,t.type==="image"&&i.has(t.href)?"":t.raw)).join("")+n.raw.slice(a)}).join("");return o===e.text?e:{...e,text:o}}).filter((e)=>!s(e)||e.text.trim().length>0)}
|
|
2
|
+
export{Lo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-b89bzpce.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function Qt({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
|
|
2
|
+
export{Qt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function ar(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
|
|
2
|
+
export{ar};
|