@alwith/module-chat 0.6.30 → 0.6.31
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-704h27t9.js → chunk-0c0txenw.js} +2 -2
- package/dist/chunk-0f00j53n.js +2 -0
- package/dist/{chunk-1y5zgya3.js → chunk-0ga1y5v1.js} +2 -2
- package/dist/chunk-0mc30tx9.js +2 -0
- package/dist/chunk-0pmacxae.js +2 -0
- package/dist/{chunk-9pm3vzgx.js → chunk-0pxeark7.js} +3 -3
- package/dist/chunk-138xvdrk.js +2 -0
- package/dist/chunk-189aq7st.js +2 -0
- package/dist/{chunk-b89bzpce.js → chunk-18gxawh7.js} +2 -2
- package/dist/{chunk-w2z3sxdq.js → chunk-19jh646d.js} +2 -2
- package/dist/{chunk-mahky9ad.js → chunk-1bvgs2t1.js} +2 -2
- package/dist/{chunk-7d8xet8s.js → chunk-1jsjn8ga.js} +2 -2
- package/dist/{chunk-sqqa7t1n.js → chunk-1vf301b7.js} +3 -3
- package/dist/{chunk-k3h77wtz.js → chunk-1xrdp5kw.js} +2 -2
- package/dist/{chunk-ma6ycen5.js → chunk-239gtn3z.js} +2 -2
- package/dist/chunk-29wxdp28.js +2 -0
- package/dist/{chunk-x4bzkzbt.js → chunk-2c7a0zdc.js} +2 -2
- package/dist/{chunk-rhptdqpp.js → chunk-2d8msv4h.js} +2 -2
- package/dist/{chunk-1jznzjzn.js → chunk-2dq1epq4.js} +2 -2
- package/dist/chunk-2f5cbah7.js +2 -0
- package/dist/{chunk-5t2ge7gg.js → chunk-2sc2z6g5.js} +2 -2
- package/dist/{chunk-a0qy1r02.js → chunk-32zzqeyf.js} +2 -2
- package/dist/{chunk-vqqafkcx.js → chunk-36j9fer8.js} +2 -2
- package/dist/{chunk-yx3eqj75.js → chunk-38geb5gj.js} +2 -2
- package/dist/{chunk-7n3z2bay.js → chunk-3942tdd5.js} +2 -2
- package/dist/{chunk-awrz081w.js → chunk-3btheq4v.js} +2 -2
- package/dist/{chunk-ggxdrm0c.js → chunk-3qwmf9qd.js} +2 -2
- package/dist/{chunk-bnzpnsh1.js → chunk-4115mzgp.js} +3 -3
- package/dist/{chunk-f84mdhkx.js → chunk-413sz7fx.js} +2 -2
- package/dist/{chunk-zhf7403q.js → chunk-42dfq7ze.js} +2 -2
- package/dist/{chunk-5hjk7xnq.js → chunk-46j8adkj.js} +2 -2
- package/dist/{chunk-yw927w3q.js → chunk-483jakc1.js} +2 -2
- package/dist/chunk-48zgp33j.js +2 -0
- package/dist/{chunk-xxmzqazr.js → chunk-4d2khkms.js} +2 -2
- package/dist/{chunk-re34mbpa.js → chunk-4mca4p7m.js} +2 -2
- package/dist/{chunk-chg6j0zg.js → chunk-4p1z0b21.js} +2 -2
- package/dist/chunk-4p3ekttc.js +2 -0
- package/dist/{chunk-5f7t16kj.js → chunk-4sj3t6mk.js} +2 -2
- package/dist/{chunk-kdcde4s5.js → chunk-4w0x1hdt.js} +2 -2
- package/dist/{chunk-51s7qck0.js → chunk-54awxpw2.js} +2 -2
- package/dist/{chunk-xckysrk7.js → chunk-5cas0xvp.js} +2 -2
- package/dist/{chunk-12bfnfbk.js → chunk-5dtpfpq5.js} +2 -2
- package/dist/{chunk-3vdx0cme.js → chunk-5dxzfdd1.js} +2 -2
- package/dist/{chunk-ypdh88cj.js → chunk-5dygcexv.js} +2 -2
- package/dist/chunk-5fcp7haj.js +4 -0
- package/dist/chunk-5g32hx9d.js +2 -0
- package/dist/{chunk-p9226dye.js → chunk-5h8h4sas.js} +2 -2
- package/dist/chunk-5ny4ped8.js +2 -0
- package/dist/chunk-5wed639g.js +2 -0
- package/dist/{chunk-zwpv75f4.js → chunk-6hxz5cpc.js} +2 -2
- package/dist/{chunk-n96z8etk.js → chunk-6ja6pt5x.js} +2 -2
- package/dist/{chunk-b7ze9dje.js → chunk-6kyq5zxt.js} +2 -2
- package/dist/chunk-6m9frvzj.js +2 -0
- package/dist/chunk-6xzf444w.js +2 -0
- package/dist/{chunk-82e3194f.js → chunk-70ks1y6v.js} +2 -2
- package/dist/{chunk-rayhzb8p.js → chunk-7393tva2.js} +2 -2
- package/dist/{chunk-18ea0dty.js → chunk-7dy4z3r8.js} +2 -2
- package/dist/{chunk-fbrv2v3t.js → chunk-7egc2x4q.js} +1 -1
- package/dist/{chunk-y47sn7w2.js → chunk-7g0cbkbp.js} +2 -2
- package/dist/{chunk-3y9az4b9.js → chunk-7n1v87h0.js} +2 -2
- package/dist/{chunk-cy5kh1yr.js → chunk-7rqryntm.js} +2 -2
- package/dist/{chunk-zmr5pwhd.js → chunk-7vby3f2v.js} +2 -2
- package/dist/{chunk-f8bx4etj.js → chunk-8477q09c.js} +2 -2
- package/dist/{chunk-jhaf3qtt.js → chunk-8f8dma9e.js} +2 -2
- package/dist/{chunk-py2q899w.js → chunk-8ktb3g8c.js} +2 -2
- package/dist/{chunk-w1h28vvd.js → chunk-8zy4az1y.js} +2 -2
- package/dist/{chunk-wkbxdz82.js → chunk-9162ez1n.js} +2 -2
- package/dist/{chunk-6yx869ht.js → chunk-91jmmkd3.js} +2 -2
- package/dist/{chunk-vcj2jfnz.js → chunk-964fwwsg.js} +2 -2
- package/dist/{chunk-egbb5295.js → chunk-9cfmet6r.js} +2 -2
- package/dist/{chunk-tszqev50.js → chunk-9sag90th.js} +2 -2
- package/dist/{chunk-rsbced6k.js → chunk-a6vp2dmt.js} +2 -2
- package/dist/{chunk-m8243rnx.js → chunk-a74zcp1j.js} +2 -2
- package/dist/{chunk-xcx9g1wb.js → chunk-aa2xhwh2.js} +2 -2
- package/dist/{chunk-r8gfcyeb.js → chunk-abxsr9d1.js} +2 -2
- package/dist/{chunk-ky3n1mza.js → chunk-afnnrn6z.js} +2 -2
- package/dist/{chunk-srz8hnnx.js → chunk-afypqn52.js} +3 -3
- package/dist/{chunk-7a806p3q.js → chunk-ansfap1a.js} +3 -3
- package/dist/{chunk-9qqxdv6f.js → chunk-avq6x733.js} +2 -2
- package/dist/{chunk-jftxq3se.js → chunk-axz2rr58.js} +2 -2
- package/dist/{chunk-8tnx3p86.js → chunk-b0p2j2ab.js} +1 -1
- package/dist/{chunk-0zncrzar.js → chunk-b4qe4xnp.js} +2 -2
- package/dist/{chunk-p9x6rya1.js → chunk-b4wh6k5s.js} +2 -2
- package/dist/{chunk-hj8nkk6a.js → chunk-b64hyshj.js} +2 -2
- package/dist/{chunk-abbpbnjj.js → chunk-bajn7ssf.js} +2 -2
- package/dist/{chunk-xg6ayxsy.js → chunk-batckcj8.js} +2 -2
- package/dist/{chunk-j9f4mh66.js → chunk-bbfzm39y.js} +2 -2
- package/dist/{chunk-gh1rtwrb.js → chunk-bj3sacn1.js} +2 -2
- package/dist/{chunk-h3geg09z.js → chunk-bmeych5s.js} +2 -2
- package/dist/{chunk-x4brdfv3.js → chunk-bsqe29dh.js} +2 -2
- package/dist/{chunk-m6yg0dc9.js → chunk-cxhyh0w9.js} +2 -2
- package/dist/chunk-cz31f4gr.js +2 -0
- package/dist/{chunk-1pnbntv2.js → chunk-d336k00a.js} +2 -2
- package/dist/{chunk-9n8cds8p.js → chunk-d5pn8932.js} +2 -2
- package/dist/{chunk-016v1nnv.js → chunk-dakt7k9q.js} +4 -4
- package/dist/{chunk-j4w2hbbe.js → chunk-darm80tf.js} +2 -2
- package/dist/chunk-dhda1jhs.js +2 -0
- package/dist/{chunk-rrzz41z1.js → chunk-djppmswk.js} +2 -2
- package/dist/{chunk-5fyxge7c.js → chunk-drs741zm.js} +2 -2
- package/dist/{chunk-pd5yrdg6.js → chunk-dzw6vqqf.js} +2 -2
- package/dist/{chunk-cj99j82f.js → chunk-e0t3cpx3.js} +2 -2
- package/dist/{chunk-3dvxhfcr.js → chunk-e8mxwqxy.js} +2 -2
- package/dist/{chunk-jfyz3rx6.js → chunk-edqxxx93.js} +2 -2
- package/dist/chunk-eedgav4q.js +2 -0
- package/dist/{chunk-4hasepkm.js → chunk-eexn5mmk.js} +2 -2
- package/dist/chunk-eg00mvca.js +2 -0
- package/dist/{chunk-3a8qwbgh.js → chunk-esxjnj1y.js} +3 -3
- package/dist/{chunk-yjm613ey.js → chunk-et01n220.js} +2 -2
- package/dist/{chunk-5jvpeww3.js → chunk-ezaypwps.js} +2 -2
- package/dist/{chunk-c4rptwfx.js → chunk-f0gq9f1f.js} +3 -3
- package/dist/{chunk-bf7sgpzq.js → chunk-f9zpep12.js} +2 -2
- package/dist/{chunk-3d3z6dam.js → chunk-ftsqd7n5.js} +2 -2
- package/dist/{chunk-544g9fky.js → chunk-fz9y067h.js} +2 -2
- package/dist/{chunk-t4twdrdg.js → chunk-g23ktesb.js} +2 -2
- package/dist/{chunk-kvwyryw2.js → chunk-g9426ns9.js} +2 -2
- package/dist/{chunk-spqfmr4z.js → chunk-gt50nb3j.js} +2 -2
- package/dist/{chunk-7k2z2nvy.js → chunk-gtyrc6cd.js} +2 -2
- package/dist/{chunk-wbjf9maj.js → chunk-gvqvw7ms.js} +2 -2
- package/dist/chunk-h1t76wws.js +2 -0
- package/dist/{chunk-fdfftrzj.js → chunk-hfh3yen9.js} +3 -3
- package/dist/{chunk-znafsq0a.js → chunk-hm7f1vsx.js} +2 -2
- package/dist/chunk-hmtsavm4.js +2 -0
- package/dist/chunk-hqfhb4ng.js +2 -0
- package/dist/{chunk-06mvwewp.js → chunk-hz8yrg2t.js} +2 -2
- package/dist/{chunk-8q5zwkry.js → chunk-hzhcajx1.js} +2 -2
- package/dist/{chunk-mfrg4vze.js → chunk-j1kf4cj2.js} +5 -5
- package/dist/{chunk-nqt9gyz9.js → chunk-jkqh03w4.js} +2 -2
- package/dist/chunk-jtcccqpp.js +2 -0
- package/dist/{chunk-j29d8rts.js → chunk-jtnjd3ec.js} +2 -2
- package/dist/{chunk-pyqhwz2d.js → chunk-jv1db7gt.js} +2 -2
- package/dist/{chunk-qm0zd4wj.js → chunk-jx0djwvd.js} +2 -2
- package/dist/{chunk-nf7q3crw.js → chunk-jytat3j5.js} +3 -3
- package/dist/{chunk-7z1k4s4f.js → chunk-k1atcess.js} +2 -2
- package/dist/{chunk-cr0pb6g0.js → chunk-kcgc9915.js} +2 -2
- package/dist/chunk-m0skv5q0.js +2 -0
- package/dist/{chunk-a1wbf348.js → chunk-m395aw24.js} +3 -3
- package/dist/chunk-m3a6paxj.js +2 -0
- package/dist/{chunk-qmx3t5he.js → chunk-m7tj6194.js} +2 -2
- package/dist/{chunk-23r2z6bp.js → chunk-m9rbb04n.js} +2 -2
- package/dist/{chunk-11kv54bx.js → chunk-me230xjh.js} +3 -3
- package/dist/chunk-mjfc1dyv.js +2 -0
- package/dist/{chunk-wbnmcagf.js → chunk-mnz33drf.js} +3 -3
- package/dist/{chunk-kagkszdc.js → chunk-mtcxr3ns.js} +2 -2
- package/dist/{chunk-pe79c1re.js → chunk-mzqfa37p.js} +2 -2
- package/dist/chunk-n7pyzjq1.js +2 -0
- package/dist/{chunk-rfkgks0a.js → chunk-nabyjzn5.js} +2 -2
- package/dist/{chunk-c3nn4h2q.js → chunk-nfkfgz2s.js} +2 -2
- package/dist/{chunk-p6ffd8yn.js → chunk-nn8pmwqz.js} +2 -2
- package/dist/{chunk-9ecgnmtx.js → chunk-npkbsc1k.js} +3 -3
- package/dist/{chunk-wvm8srp7.js → chunk-p474fn4q.js} +2 -2
- package/dist/chunk-p781sb6h.js +2 -0
- package/dist/{chunk-9h9vtcwk.js → chunk-paxthe5v.js} +2 -2
- package/dist/{chunk-93bqj8az.js → chunk-pbx1417n.js} +2 -2
- package/dist/{chunk-djqexpgf.js → chunk-pqw5qz4e.js} +2 -2
- package/dist/{chunk-n8b9yg4q.js → chunk-pqz2471h.js} +2 -2
- package/dist/chunk-pv7t4hw8.js +2 -0
- package/dist/{chunk-46bgwhx8.js → chunk-pxv16edc.js} +2 -2
- package/dist/{chunk-4z6gyvy3.js → chunk-pyx2n7yx.js} +2 -2
- package/dist/{chunk-3915ad7f.js → chunk-qbxdgkk9.js} +2 -2
- package/dist/chunk-qecs9e31.js +2 -0
- package/dist/{chunk-jnpkpe5t.js → chunk-qt16accq.js} +2 -2
- package/dist/{chunk-enc99kvz.js → chunk-r013w7yb.js} +2 -2
- package/dist/{chunk-kx9nnmwb.js → chunk-r3s28905.js} +3 -3
- package/dist/chunk-r7n16m8h.js +2 -0
- package/dist/{chunk-af0e5epn.js → chunk-r7z3mvej.js} +2 -2
- package/dist/chunk-rak4mkgh.js +2 -0
- package/dist/{chunk-zyermn00.js → chunk-rkejggyx.js} +2 -2
- package/dist/{chunk-xb6x221t.js → chunk-rtjf5haf.js} +2 -2
- package/dist/{chunk-ay699evt.js → chunk-s0mrsrb0.js} +3 -3
- package/dist/{chunk-tftgnw1w.js → chunk-sjqhtpzr.js} +2 -2
- package/dist/{chunk-askwff3a.js → chunk-smd9rszw.js} +3 -3
- package/dist/{chunk-036wyz4n.js → chunk-swmxz9q0.js} +2 -2
- package/dist/{chunk-2d4zb2ac.js → chunk-t56ncd8f.js} +2 -2
- package/dist/{chunk-5p53j8mf.js → chunk-t9ktp4sf.js} +2 -2
- package/dist/{chunk-v6x7x69b.js → chunk-tdw7k1df.js} +2 -2
- package/dist/{chunk-705j0x4q.js → chunk-tjc0ntnh.js} +2 -2
- package/dist/{chunk-tzb4b5ve.js → chunk-tnmghaap.js} +2 -2
- package/dist/chunk-ts7h148j.js +2 -0
- package/dist/{chunk-h4cx5xr4.js → chunk-v5m2qx8b.js} +4 -4
- package/dist/{chunk-4vfrxhj4.js → chunk-vazspetj.js} +2 -2
- package/dist/{chunk-pwk7epmy.js → chunk-vbbndjfd.js} +2 -2
- package/dist/chunk-vchbk4h5.js +2 -0
- package/dist/{chunk-15m908ph.js → chunk-vhxr0c4c.js} +2 -2
- package/dist/{chunk-z5n4zqeg.js → chunk-vw6546pp.js} +2 -2
- package/dist/{chunk-mfmh7ztq.js → chunk-vzm88w2r.js} +2 -2
- package/dist/{chunk-7r3k37ys.js → chunk-wdxxr1xk.js} +2 -2
- package/dist/{chunk-9m36e0yq.js → chunk-wf4z9w5x.js} +2 -2
- package/dist/{chunk-fy8dmpv3.js → chunk-wwywmqh8.js} +2 -2
- package/dist/{chunk-mq32437t.js → chunk-wy4rtebz.js} +2 -2
- package/dist/chunk-x0m4ctqf.js +2 -0
- package/dist/chunk-xpts50f0.js +2 -0
- package/dist/{chunk-c531krny.js → chunk-xq4xeksc.js} +3 -3
- package/dist/{chunk-q988bycf.js → chunk-yfb5hj4w.js} +2 -2
- package/dist/{chunk-nec3tcjh.js → chunk-ymgc4317.js} +2 -2
- package/dist/{chunk-cjj5bxdb.js → chunk-yvmjh230.js} +2 -2
- package/dist/{chunk-r84xcy0d.js → chunk-ywax4zad.js} +2 -2
- package/dist/{chunk-cfj92m1y.js → chunk-z930082m.js} +2 -2
- package/dist/chunk-zd1fk347.js +2 -0
- 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/prediction.js +1 -1
- package/dist/conversation/composer/prompt-history.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/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-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 +1 -1
- package/dist/chunk-0vtxfvdj.js +0 -2
- package/dist/chunk-1h3f538q.js +0 -2
- package/dist/chunk-2qa3c571.js +0 -2
- package/dist/chunk-2w3c4tg8.js +0 -2
- package/dist/chunk-5e575zvm.js +0 -2
- package/dist/chunk-6ewv4vns.js +0 -2
- package/dist/chunk-6wsr59dr.js +0 -2
- package/dist/chunk-7gv27b1c.js +0 -2
- package/dist/chunk-9dm7j0c9.js +0 -4
- package/dist/chunk-b5g055qp.js +0 -2
- package/dist/chunk-c4mm4fzg.js +0 -2
- package/dist/chunk-d9q9qgm1.js +0 -2
- package/dist/chunk-eb78ebxa.js +0 -2
- package/dist/chunk-et3nrp9v.js +0 -2
- package/dist/chunk-fer4r3b8.js +0 -2
- package/dist/chunk-hjbq9ez1.js +0 -2
- package/dist/chunk-hwppy236.js +0 -2
- package/dist/chunk-hzcerz8j.js +0 -2
- package/dist/chunk-jp2s1xsa.js +0 -2
- package/dist/chunk-jzarxwap.js +0 -2
- package/dist/chunk-ky4j58wz.js +0 -2
- package/dist/chunk-mdzng667.js +0 -2
- package/dist/chunk-mgs3dhdm.js +0 -2
- package/dist/chunk-p0v9d7e1.js +0 -2
- package/dist/chunk-qj87dxrr.js +0 -2
- package/dist/chunk-qth2ames.js +0 -2
- package/dist/chunk-qyfkwznx.js +0 -2
- package/dist/chunk-rkqptd9w.js +0 -2
- package/dist/chunk-srqs8z90.js +0 -2
- package/dist/chunk-v92wj4tv.js +0 -2
- package/dist/chunk-vsm89jmx.js +0 -2
- package/dist/chunk-wg223rq3.js +0 -2
- package/dist/chunk-wv6ntscn.js +0 -2
- package/dist/chunk-x03z0hme.js +0 -2
- package/dist/chunk-x072jj4c.js +0 -2
- package/dist/chunk-y3kn2w77.js +0 -2
- package/dist/chunk-zdqjjwx0.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ss}from"./chunk-f9zpep12.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function rs({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(ss,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
|
|
2
|
+
export{rs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T}from"./chunk-fpsn6fmf.js";import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{T}from"./chunk-fpsn6fmf.js";import{n}from"./chunk-7393tva2.js";import{ut}from"./chunk-avq6x733.js";import{y,Y}from"./chunk-p781sb6h.js";import{e}from"./chunk-18gxawh7.js";import{Qn}from"./chunk-2dq1epq4.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Z}from"lucide-react";import{useCallback as ss,useEffect as es,useId as J,useRef as L,useState as w}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as h}from"react/jsx-runtime";function Zn(s,d){let p=n((l)=>l.sessions),o=n((l)=>l.actions),[k,f]=w(()=>new Set);return(l)=>{let r=d?.(l)??null,i=Qn(s.id,l,p,o,s);if(i.length===0)return r;let b=`${s.id}:${l.key}`,u=new Map;for(let c of i){let x=l.items.find((g)=>g.id===c.originItemId)?.id??l.user?.id??null,m=u.get(x)??[];m.push(c),u.set(x,m)}return{active:r?.active===!0||i.some((c)=>c.status==="running"||c.status==="requires_action"),defaultExpanded:r?.defaultExpanded===!0||k.has(b),content:r?.content??null,entries:[...r?.entries??[],...[...u].map(([c,x])=>({afterItemId:c,content:t(Zo,{sessionId:s.id,turn:l,parent:s,tasks:x,onExpand:()=>f((m)=>m.has(b)?m:new Set([...m,b]))})}))]}}}function Zo({sessionId:s,turn:d,parent:p,tasks:o,onExpand:k}){let{host:f}=e(),l=n((a)=>a.sessions),r=n((a)=>a.actions),i=o??Qn(s,d,l,r,p),b=i.some((a)=>a.status==="running"),u=i.some((a)=>a.status==="running"||a.status==="requires_action"),[c,x]=T(`subagents:${s}:${d.key}`,u,!0),m=J();if(i.length===0)return null;let g=new Map;for(let a of i)g.set(a.status,(g.get(a.status)??0)+1);let N=[...g].map(([a,I])=>`${f.t(`subagents.${a}`)} ${I}`).join(" · ");return h("section",{"data-subagent-sessions":!0,"data-subagent-turn":d.key,"aria-label":f.t("subagents.group"),className:"my-2 min-w-0",children:[h(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":c,"aria-controls":m,onClick:()=>{if(!c)k?.();x(!c)},children:[c?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),b?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),h("span",{className:"shrink-0",children:[f.t("subagents.group")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:N})]}),t("div",{id:m,hidden:!c,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(ts,{task:a,cwd:p?.cwd??l[s]?.cwd??"",visible:c,stateKey:`${s}:${d.key}:${a.key}`,onRead:()=>{k?.(),x(!0)}},a.key))})]})}function O(s,d){if(!d)return s;let p=new Map(s.items.map((o)=>[`${o.kind}:${o.id}`,o]));for(let o of d.items)p.set(`${o.kind}:${o.id}`,o);return{...s,...d,items:[...p.values()]}}function ts({task:s,cwd:d,stateKey:p,visible:o,onRead:k}){let{client:f,host:l}=e(),{t:r}=l,i=s.session,b=n((S)=>S.connection==="ready"),[u,c]=T(`subagent:${p}`,!1),[x,m]=w(!1),[g,N]=w(null),[a,I]=w(null),[R,Q]=w(null),[B,P]=w(!1),q=L(!1),_=L(!1),j=J(),W=i&&y(i.configOptions,"model"),z=s.title??r("subagents.untitled"),M=a?O(a,i):i,U=b&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=i?.cwd??d,E=ss(async(S)=>{if(!f.readSubagentHistory||H===null||q.current)return;_.current=!0,q.current=!0,P(!0),N(null);try{let v=await f.readSubagentHistory(H,D,S);I((K)=>K===null?v.session:O(v.session,K)),Q(v.cursor)}catch(v){N(v instanceof Error?v.message:String(v))}finally{q.current=!1,P(!1)}},[f,H,D]);es(()=>{if(o&&u&&!_.current)E(null)},[o,u,E]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");m(!0),N(null);try{await f.cancel(i.id)}catch(S){N(S instanceof Error?S.message:String(S))}finally{m(!1)}};return h("section",{"aria-label":z,className:"min-w-0",children:[h("div",{className:"flex min-w-0 items-center gap-1",children:[h(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${r(`subagents.${s.status}`)}`,"aria-expanded":u,"aria-controls":j,onClick:()=>{if(!u)k();c(!u)},children:[u?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:z}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:r(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:x,"aria-label":r("subagents.cancel",{name:z}),onClick:()=>{V()},children:x?t(F,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),g&&!u&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),h("div",{id:j,hidden:!u,className:"min-w-0 ps-4",children:[(s.description||W)&&h("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:Y(W)})]}),g&&h("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{E(a===null?null:R)},children:r("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:r("timeline.loadingEarlier")}),R&&t(C,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{E(R)},children:r("timeline.loadEarlier")}),o&&u&&(M&&M.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:M})}):!B&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:r("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:d,host:p}=e(),o=Zn(s);return t(ut,{session:s,client:d,host:p,turnWork:o})}
|
|
2
|
+
export{Zn,Zo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{d,i}from"./chunk-0f00j53n.js";import{q,K,de,W,Z,Se}from"./chunk-7egc2x4q.js";import{ke}from"./chunk-k1atcess.js";import{k}from"./chunk-qk1yqepm.js";import{we}from"./chunk-paxthe5v.js";import{Q,_e}from"./chunk-pqz2471h.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function oe({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function Yt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(Se,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(de,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(ke,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:_e,children:o&&n(S,{children:[t(we,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(oe,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
|
+
export{Yt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function H(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function za(i,t){return H(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var Ot="inline-flex items-baseline gap-1 align-baseline whitespace-nowrap leading-[inherit] font-normal text-[color:var(--app-reference-foreground,var(--link))] select-all",is={command:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9"}]],skill:[["path",{d:"M12 5v16"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"}]],app:[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]]};
|
|
2
|
+
export{H,za,Ot,is};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var at="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function jt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(at))n()}),[e]);return d(t,()=>o(e.get(at)))}async function qt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[at])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[at]:i}})}
|
|
2
|
+
export{at,jt,qt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Wn}from"./chunk-
|
|
1
|
+
import{Wn}from"./chunk-vw6546pp.js";import{xe}from"./chunk-b0p2j2ab.js";import{cs}from"./chunk-6hxz5cpc.js";import{C,Ft}from"./chunk-x0m4ctqf.js";import{t}from"./chunk-7393tva2.js";import{ui,pi}from"./chunk-pqw5qz4e.js";import{D}from"./chunk-qbxdgkk9.js";import{ue}from"./chunk-wwywmqh8.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var di=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=pi(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
2
|
${e.text}`).join(`
|
|
3
|
-
`):
|
|
4
|
-
export{
|
|
3
|
+
`):ue(n),l=n.content.filter(x),d=new Set(Ft(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=C(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=ui(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(D,{block:e},`${n.id}:${s}`))}),i(Wn,{value:{names:u,icon:p.skillIcon},children:i(cs,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(xe,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
+
export{di};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function
|
|
2
|
-
export{
|
|
1
|
+
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function Bn(e){let{parse:o,execute:t,...s}=e;return{...s,execute:(n,i)=>t(o(n),i)}}var ko="alwith";function m(e){if(e.length>128)throw Error("Too many application tools");let o=new Map;for(let t of e){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||o.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);o.set(t.name,{...t,inputSchema:structuredClone(t.inputSchema)})}return o}var p=(e)=>({content:[{type:"text",text:e instanceof Error?e.message:String(e)}],isError:!0});class So{servers=new Map;session;identity;constructor(e,o){this.session=e,this.identity=o}declare(e,o){let t={agent:e,tools:m(o),sessionId:null};return t.mcp=u(()=>this.server(t)),t.registration=e.registerMcpServer({name:ko,handler:t.mcp.handler}),this.servers.set(t.registration.serverId,t),t.registration.declaration}bind(e,o){let t=this.servers.get(e);if(!t)throw Error(`Application tool server is not registered: ${e}`);for(let[s,n]of this.servers)if(n.sessionId===o)this.dispose(s);t.sessionId=o}drop(e){for(let[o,t]of this.servers)if(t.sessionId===e)this.dispose(o)}clear(){for(let e of this.servers.keys())this.dispose(e)}dispose(e){let o=this.servers.get(e);if(!o)return;this.servers.delete(e),o.registration.dispose().then(()=>o.mcp.close())}server(e){let o=new g({name:ko,version:"1.0.0"},{capabilities:{tools:{}}});return o.setRequestHandler("tools/list",()=>({tools:[...e.tools.values()].map((t)=>({name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description,inputSchema:structuredClone(t.inputSchema),...t.annotations===void 0?{}:{annotations:t.annotations}}))})),o.setRequestHandler("tools/call",async(t,s)=>{let n=e.tools.get(t.params.name);if(!n)return p(Error(`Application tool is not registered: ${t.params.name}`));let i=e.sessionId,l=i===null?void 0:this.session(i);if(i===null||!l?.attached||l.readOnly)return p(Error("Application tool session is not attached"));let{toolCallId:c,turnId:d}=this.identity(t.params._meta??{}),a=s.mcpReq.signal;try{let r=await n.execute(t.params.arguments??{},{sessionId:i,toolCallId:c,turnId:d,signal:a,agent:e.agent});return a.throwIfAborted(),r}catch(r){if(a.aborted)throw r;return p(r)}}),o}}
|
|
2
|
+
export{Bn,ko,So};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{a,o}from"./chunk-r7z3mvej.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function aa(i){let t=a(),e=o((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=o((s)=>s.sessionList),d=o((s)=>s.connection),r=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&n===null)t.listSessions().catch(()=>{return})},[t,d,r,n]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,u,r,n,c,e]),retry:f}}
|
|
2
|
+
export{aa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{_t}from"./chunk-h1t76wws.js";import{isContentEntry as d,isImage as l,isText as p}from"@nyssance/codex-acp-v2/client";var Oa="generate_image",Ha=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],Za={model:"wham",size:"auto"},fr={name:Oa,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1},annotations:{readOnlyHint:!0}};function c(o){let t=o.content.filter(d).map((i)=>i.content);if(t.length)return t;let r=o.rawOutput?.result;return Array.isArray(r?.content)?r.content:[]}function hr(o){return o.items.flatMap((t)=>{if(!_t(t))return[];let r=t.rawInput,i=c(t),s={};for(let n of i){if(!p(n)||!n.text.startsWith("{"))continue;try{let e=JSON.parse(n.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")s={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return i.flatMap((n,e)=>{if(!l(n))return[];let{mimeType:a,data:m}=n;return[{id:`${t.id}:${e}`,toolId:t.id,...s,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:a,data:m,src:`data:${a};base64,${m}`}]})})}function te(o){let t=Ha.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Qa(o,t,r){let i=te(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
|
|
2
|
+
export{Oa,Ha,Za,fr,hr,te,Qa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function ki(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
|
|
2
|
+
export{ki};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o}from"./chunk-r7z3mvej.js";import{ze,ne,ve}from"./chunk-ezaypwps.js";import{useEffect as S,useMemo as f}from"react";function xa(s){let c=ne((i)=>i.activityOrder),a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&ze(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=ne((i)=>i.activitySeen),r=ve();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
|
+
export{xa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Qe,
|
|
2
|
-
export{
|
|
1
|
+
import{Qe,on}from"./chunk-djppmswk.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function Ri(o){if(o===null||o===void 0)return Qe();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function Os(o,{reportError:t=console.error}={}){let e=S(Qe()),r=async()=>{e.setState(Ri(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(on,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function Hs({store:o,children:t}){return w(f,{value:o,children:t})}function ao(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function Ie(o){let{store:t}=ao(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function pe(){return ao().dispatch}
|
|
2
|
+
export{Ri,Os,Hs,ao,Ie,pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{F}from"./chunk-hz8yrg2t.js";import{t}from"./chunk-7393tva2.js";import{D}from"./chunk-qbxdgkk9.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(D,{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(D,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Te({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{Te};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
export{it,
|
|
1
|
+
import{c}from"./chunk-hz8yrg2t.js";import{fs}from"./chunk-a6vp2dmt.js";import{le}from"./chunk-7393tva2.js";import{T}from"./chunk-fpsn6fmf.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function it(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let s=[];for(let[n,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=le(),[g,y]=v({}),[x,I]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(fs(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let k=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((d)=>d+1),children:r(R,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(k,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function ms({blocks:e}){let{t:s}=c(),a=e.flatMap(E),[n,l]=T(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(S,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(C,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(U,{images:a})]})}
|
|
2
|
+
export{it,ms};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ee}from"./chunk-swmxz9q0.js";import{b}from"./chunk-edqxxx93.js";import{w}from"./chunk-7393tva2.js";import{ln}from"./chunk-6xzf444w.js";import{Me}from"./chunk-5fcp7haj.js";import{hn}from"./chunk-5g32hx9d.js";import{Ee}from"./chunk-dhda1jhs.js";import{wn}from"./chunk-1xrdp5kw.js";import{Ae}from"./chunk-9sag90th.js";import{bn,Cn}from"./chunk-m9rbb04n.js";import{useMemo as C,useRef as g}from"react";import{jsx as i,jsxs as m,Fragment as v}from"react/jsx-runtime";var d;function y(){return d??=hn(),d}function h({imagesOnly:r,picker:n}){let e=ln();return i(Cn,{imagesOnly:r,picker:n,sessionId:e.session.id,enabled:e.inputReady&&!e.sending&&!e.shellMode,onMention:e.addMention,onBusyChange:e.setAdding})}function Bs({client:r,providers:n,catalog:e,shellCommands:a=!0,imagesOnly:s=!1,modelMenu:c,children:f,...p}){let l=g(null),u=C(()=>({...bn,accept:s?"image/png,image/jpeg,image/webp,image/gif":void 0,onSelectFiles(o){if(!l.current)throw Error("The file picker is not ready");l.current(o)}}),[s]),{session:t}=p,P=w(r.store,(o)=>o.modelRecovery[t.id]??!1);return m(v,{children:[P&&!ee(t.error?.error)&&i(wn,{client:r,session:t,providers:n??y(),catalog:e},t.id),m(Me,{modelMenu:c??{defaultGroup:b,catalog:(o)=>Ee(o,e),headerAction:i(Ae,{})},...p,attachmentPolicy:u,onShellCommand:a?(o)=>r.executeShell(t.id,o):void 0,children:[i(h,{imagesOnly:s,picker:l}),f]})]})}
|
|
2
|
+
export{Bs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=new Map;var a=0;function
|
|
2
|
-
export{
|
|
1
|
+
var t=new Map;var a=0;function Lo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Lo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Qr(e,n){return d??=new l,d.connect(e,n)}
|
|
2
|
+
export{Lo,Qr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Xo}from"./chunk-nn8pmwqz.js";import{Yo,st}from"./chunk-bj3sacn1.js";import{Button as et}from"@nyssance/shadcn/vega/components/ui/button";import{cn as rt}from"cn";import{LoaderCircleIcon as nt,SearchIcon as ot}from"lucide-react";import{useCallback as _,useEffect as f,useMemo as J,useRef as b,useState as v}from"react";import{jsx as H,jsxs as q,Fragment as it}from"react/jsx-runtime";var V="chat-search",W="chat-search-current",X=150;function ja(o){let r=o??"";return[...document.querySelectorAll("[data-chat-scroll]")].find((l)=>l.dataset.chatScroll===r)??null}var lt=12;function Ps(o,r="center"){let l=o.closest("[data-chat-scroll]");if(!l)return;let g=o.getBoundingClientRect(),y=l.getBoundingClientRect(),m=r==="start"?lt:(l.clientHeight-g.height)/2;l.scrollTo({top:l.scrollTop+(g.top-y.top)-m,behavior:"smooth"})}function P(o){let r=o.startContainer.parentElement;if(!r)return;Ps(r)}var M=new Map;function Y(){if(typeof CSS>"u"||!("highlights"in CSS)||typeof Highlight>"u")return;if(M.size===0){CSS.highlights.delete(V),CSS.highlights.delete(W);return}let o=[...M.values()];CSS.highlights.set(V,new Highlight(...o.flatMap((r)=>r.all))),CSS.highlights.set(W,new Highlight(...o.flatMap((r)=>r.current?[r.current]:[])))}function ct(){let o=Symbol();return{clearHighlights:()=>{M.delete(o),Y()},applyHighlights:(r,l)=>{M.set(o,{all:r,current:l}),Y()}}}function Jo({getViewport:o,findSourceMatches:r,revealTurn:l,prepareSource:g,subscribeOpen:y,labels:m,placement:K="header"}){let{clearHighlights:s,applyHighlights:p}=J(ct,[]),S=r!==void 0,[c,R]=v(!1),[i,O]=v(""),[z,T]=v(!1),[D,L]=v(null),G=i.trim().length>0;f(()=>{if(!c||!G||g===void 0){T(!1),L(null);return}let e=new AbortController;return T(!0),L(null),g(e.signal).catch((t)=>{if(!e.signal.aborted)L(t instanceof Error?t.message:String(t))}).finally(()=>{if(!e.signal.aborted)T(!1)}),()=>e.abort()},[G,c,g]);let u=J(()=>c&&i.trim()&&r?r(i.trim()):[],[r,c,i]),[F,I]=v(0),[Z,E]=v(0),C=b([]),x=b(0),a=b(null),Q=b(null),U=b(null);f(()=>{if(!y)return;return y(()=>{R(!0);let t=U.current;if(t!==null)t.focus({preventScroll:!0}),t.select()})},[y]);let A=_(async(e,t)=>{let n=u[e];if(n===void 0)return;let h=o();if(h===null)throw Error("Chat scroll container is missing");if(l)await l(n.turnKey,t);if(t.aborted)return;let d=h.querySelector(`[data-turn-key="${CSS.escape(n.turnKey)}"]`);if(d===null)throw Error(`Codex turn is missing: ${n.turnKey}`);if(await Yo(d,t),t.aborted)return;if(!l)Ps(d,"start");if(await new Promise((tt)=>requestAnimationFrame(()=>tt())),t.aborted)return;let N=st(d,i.trim());C.current=N;let B=N[n.occurrenceInTurn];if(p(N,B??null),B!==void 0)P(B)},[p,u,o,i,l]),k=b(A);f(()=>{k.current=A},[A]);let w=_(()=>{R(!1),O(""),x.current=0,a.current?.abort(),a.current=null,s(),C.current=[]},[s]);f(()=>{if(!c)return;let e=(t)=>{if(t.key==="Escape"&&Q.current?.contains(document.activeElement))t.preventDefault(),w()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,w]),f(()=>{if(!c||!i.trim()){s(),C.current=[],I(0),E(0),x.current=0;return}let e=setTimeout(()=>{if(S)return;let t=o();if(!t)return;let n=st(t,i);if(C.current=n,I(n.length),E(0),p(n,n[0]??null),n[0])P(n[0])},X);return()=>{clearTimeout(e),s()}},[p,s,S,c,i,o]),f(()=>{if(!c||!S||!i.trim())return;let e=new AbortController;a.current?.abort(),a.current=e;let t=setTimeout(()=>{C.current=[],x.current=0,I(u.length),E(0),s(),k.current(0,e.signal)},X);return()=>{if(e.abort(),a.current===e)a.current=null;clearTimeout(t),s()}},[s,u.length,S,c,i]),f(()=>()=>{a.current?.abort(),s()},[s]),f(()=>{if(!c)s()},[s,c]);let j=_((e)=>{if(S){if(u.length===0)return;let n=(x.current+(e?-1:1)+u.length)%u.length;x.current=n,E(n),a.current?.abort();let h=new AbortController;a.current=h,k.current(n,h.signal);return}let t=C.current;if(!t.length)return;E((n)=>{let h=(n+(e?-1:1)+t.length)%t.length,d=t[h];return p(t,d),P(d),h})},[p,u.length,S]);return q(it,{children:[K==="header"&&H(et,{variant:"ghost",size:"icon-sm",title:m.search,onClick:()=>c?w():R(!0),children:H(ot,{})}),c&&q("div",{"data-chat-search":!0,"aria-busy":z||void 0,ref:Q,className:rt("bg-background border-b",K==="body"?"relative shrink-0":"absolute inset-x-0 top-full z-30"),children:[H(Xo,{ref:U,value:i,onChange:O,onFind:j,onClose:w,placeholder:m.placeholder,prevTitle:m.previous,nextTitle:m.next}),i.trim()&&q("div",{className:"text-muted-foreground border-border border-t px-3 py-1 text-[11px]",children:[z?H(nt,{"aria-hidden":"true",className:"size-3 animate-spin"}):F===0?"0 / 0":`${Z+1} / ${F}`,D!==null&&H("span",{role:"alert",children:D})]})]})]})}
|
|
2
|
+
export{ja,Ps,Jo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Gr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function
|
|
2
|
-
export{Gr,
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Gr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function il(){c()}function zr(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function Vr(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Sa(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function rl(e,n,t,i,o,a){if(a==="none")return;_(o,[Sa(e,n,t,i,a)])}function Sa(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Ua(t,i);return _a(e,n)}function Ua(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function _a(e,n){return y+Ba(e,n)}function sl(e,n){return D(_a(e,n))}function Ba(e,n){if(n<=l)return Ga(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Ga(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function al(){return r.context?.state}function ll(e){return g(e).ready}
|
|
2
|
+
export{Gr,il,zr,Vr,rl,Sa,Ua,_a,sl,Ba,Ga,al,ll};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{m}from"./chunk-189aq7st.js";import{cn as o}from"cn";import{motion as u}from"motion/react";import{jsx as i,jsxs as g}from"react/jsx-runtime";function Mt({active:n,expanded:r=!1,highlight:s=!0,className:a,...l}){return i("button",{type:"button","data-active":n?"":void 0,"aria-current":n?"page":void 0,className:o(s&&m,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)]":"size-[var(--navigation-row-height,30px)]",a),...l})}function va({tabs:n,view:r,onViewChange:s,onReset:a,notifications:l,trailing:p,className:d}){return g("div",{className:o("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",d),children:[i("div",{role:"tablist",className:"bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-52 flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]",children:n.map((e)=>{let t=r===e.key;return g(Mt,{role:"tab",active:t,expanded:t,highlight:!1,"aria-selected":t,title:e.title,onClick:()=>s(e.key),onDoubleClick:a&&(()=>a(e.key)),className:o("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-[18px] [&_svg]:shrink-0",t?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[t&&i(u.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-destructive pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:o("relative z-10 grid",t?"ms-1.5 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})}),p!=null&&i("div",{className:"ms-auto flex shrink-0 items-center gap-0.5",children:p})]})}
|
|
2
|
+
export{Mt,va};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function
|
|
2
|
-
export{
|
|
1
|
+
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function fn(t,i,a,l){let e=p(()=>t.items.findLast((u)=>u.kind==="user"),[t.items]),n=JSON.stringify([t.id,m(e?._meta)]),[r,d]=c(null),o=l&&i&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!e?.replayed;return{text:o&&!a&&r!==n?s(t._meta):null,invalidate:()=>{if(o)d(n)}}}
|
|
2
|
+
export{fn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function Li(d,u){let f=new Set,i=(e)=>{let t=e.items.map(p).find((o)=>o!==null),r=e.items.every((o)=>o.replayed);if(t===void 0||f.has(t))return{turnKey:e.key,turn:e,deferUntilReady:r};return f.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:r}};if(!u?.complete)return d.map(i);let a=new Map;for(let e of d){let t=e.items.map(p).find((o)=>o!==null);if(t===void 0)continue;let r=a.get(t)??[];r.push(e),a.set(t,r)}let c=new Set(u.turns.map((e)=>e.turnId)),T=new Set(u.loadedTurnIds),y=new Map,l=new Map,s,n=[];for(let e of d){if(!e.items.some((t)=>c.has(p(t)??""))){n.push(e);continue}if(n.length>0){if(s)l.set(s,n);else y.set(e,n);n=[]}s=e}if(s&&n.length>0)l.set(s,n),n=[];return[...u.turns.flatMap((e)=>{let t=a.get(e.turnId);if(t)return t.flatMap((r)=>[...(y.get(r)??[]).map(i),i(r),...(l.get(r)??[]).map(i)]);return T.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...n.map(i)]}
|
|
2
|
+
export{Li};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function
|
|
2
|
-
export{
|
|
1
|
+
var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function Co(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
|
|
2
|
+
export{Co};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Nr}from"./chunk-32zzqeyf.js";import{Tr}from"./chunk-jv1db7gt.js";import{ts}from"./chunk-x0m4ctqf.js";import{p,S,bt}from"./chunk-70ks1y6v.js";import{Le}from"./chunk-5wed639g.js";import{xr,br,Cr,wr,kr}from"./chunk-pbx1417n.js";import{nr,or}from"./chunk-bajn7ssf.js";import{H}from"./chunk-3btheq4v.js";import{po}from"./chunk-v5m2qx8b.js";import{go}from"./chunk-hfh3yen9.js";import{n}from"./chunk-7393tva2.js";import{e}from"./chunk-18gxawh7.js";import{co,Gi}from"./chunk-r7n16m8h.js";import{lo}from"./chunk-6xzf444w.js";import{r,Bi,J,mn}from"./chunk-9cfmet6r.js";import{cn}from"./chunk-rkejggyx.js";import{Je,un}from"./chunk-cz31f4gr.js";import{rn,an}from"./chunk-eg00mvca.js";import{Di}from"./chunk-mzqfa37p.js";import{gn}from"./chunk-m0skv5q0.js";import{Hi}from"./chunk-8f8dma9e.js";import{dn}from"./chunk-kcgc9915.js";import{fn}from"./chunk-5dtpfpq5.js";import{Fi}from"./chunk-r3s28905.js";import{Oi}from"./chunk-nfkfgz2s.js";import{xn}from"./chunk-29wxdp28.js";import{hasFuzzyFileSearch as Kt}from"@nyssance/codex-acp-v2/client";import{useCallback as w,useEffect as jt,useLayoutEffect as rt,useMemo as lt,useRef as N,useState as M}from"react";import{jsx as m,jsxs as R}from"react/jsx-runtime";var qt=["image/png","image/jpeg","image/webp","image/gif"],pt=[];async function Gt(o){let T=await(await fetch(o.url)).blob();return new Promise((I,F)=>{let E=new FileReader;E.onerror=()=>F(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Me({session:o,onSubmit:T,onShellCommand:I,onHandOff:F,modelSelector:E,modelMenu:q,inputHeader:st,actions:Rt,leadingTools:Et,agentControls:G=!0,placeholder:kt,children:Dt,attachmentPolicy:mt,predictions:Nt=!0,disabled:St=!1,preparing:dt=!1,allowPendingInput:Ft=!1}){let{host:O,client:_}=e(),{t:g}=O,z=w((t)=>{if(O.reportError)O.reportError(t);else console.error(t)},[O]),[ut,B]=M(()=>({text:r.get(o.id)?.text??"",revision:0})),{text:v}=ut,[C,Ot]=M(()=>r.get(o.id)?.attachments??pt),[y,Q]=M(()=>r.get(o.id)?.mentions??[]),[d,L]=M(()=>r.get(o.id)?.apps??[]),[ft,K]=M(()=>(r.get(o.id)?.apps?.length??0)>0||H(v,o.commands.map((t)=>t.name)).length>0),W=N(void 0),U=N(void 0);rt(()=>{if(d.length>0)K(!0)},[d.length]);let nt=C.some((t)=>Je(t)&&t.pastedText.status!=="ready"),[k,ht]=M(!1),[Y,_t]=M(!1),[ot,Lt]=M(!1),it=N(null),f=N(null),gt=N(null),c=N(ut),P=w((t)=>{gt.current?.(),c.current={text:t,revision:c.current.revision+1},B(c.current)},[]),xt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;U.current={text:a,apps:[]},W.current=u+1,K(!0),P(a),L((l)=>l.some((h)=>h.id===t.id)?l:[...l,{...t,offset:u}])},[P]),Wt=w((t)=>{let i=f.current;if(i?.insertInvocation){i.insertInvocation(t);return}let a=c.current.text,u=i?.getTextarea(),l=u?.selectionStart??a.length,h=u?.selectionEnd??l,ct=`${a.slice(0,l)}${t} ${a.slice(h)}`;U.current={text:a,apps:[]},W.current=l+t.length+1,P(ct),K(!0)},[P]),yt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Fi(o,P,L,d.length>0||y.length>0||C.length>0),vt=lt(()=>({read:()=>{let i=f.current?.getTextarea(),a=i===null||i===void 0?[c.current.text.length,c.current.text.length]:[i.selectionStart,i.selectionEnd];return{target:o.id,...c.current,selection:a}},compareAndSet(i,a,u){if(f.current?.isComposing())return null;if(i.target!==o.id||i.revision!==c.current.revision)return null;c.current={text:a,revision:c.current.revision+1},B(c.current);let l=f.current?.getTextarea();if(l!==null&&l!==void 0)l.value=a,l.setSelectionRange(u[0],u[1]);return{target:o.id,...c.current,selection:u}}}),[o.id]),j=N(null),Pt=w((t)=>(j.current=t,()=>{if(j.current===t)j.current=null}),[]),V=o.state!=="idle",x=I!==void 0&&d.length===0&&v.startsWith("!"),X=(ft||d.length>0)&&!x,b=!St&&!dt&&o.attached&&!o.restoring&&!o.readOnly,D=!o.readOnly&&(Ft||b),Z=fn(o,b&&!k&&!Y&&!nt&&!ot,v.length>0||C.length>0||y.length>0||d.length>0,Nt&&!x),It=Z.invalidate;rt(()=>{r.set(o.id,{text:v,attachments:C,mentions:y,...d.length>0?{apps:d}:{},modelId:r.get(o.id)?.modelId??null})},[o.id,v,C,y,d]),rt(()=>Bi(o.id,Ot),[o.id]),rt(()=>mn(o.id,(t,i)=>{if(!D||k)throw Error("The composer cannot take text now; try again later");if(i!=="append"&&(v.length||C.length||y.length||d.length))throw Error("The composer already has a draft; send or clear it first");P(t)}),[o.id,D,k,v,C,y,d,P]);let At=n((t)=>Kt(t.agent)),Ut=lt(()=>At&&b?async(t)=>cn((await _.fuzzyFileSearch({query:t,roots:[o.cwd],cancellationToken:null})).files):void 0,[_,At,b,o.cwd]),at=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let wt=w(async({text:t,files:i})=>{let a=I!==void 0&&d.length===0&&t.startsWith("!")?t.slice(1):null;if(a!==null){if(a.trim().length===0)return;if(i.length||y.length||d.length)throw Error("Shell commands cannot include file references or attachments");if(o.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let u=t.trim();if(u.length===0&&i.length===0&&y.length===0&&d.length===0)return;let l=j.current;ht(!0);let h=r.get(o.id),ct=c.current.revision,tt=null;try{let A=d.map((s)=>({type:"resource_link",name:s.name,uri:`app://${s.id}`}));for(let s of y){let et={kind:"file",absPath:s};A.push({type:"resource_link",uri:rn(et),name:an(et)})}let Mt=ts(u,d);if(Mt.length>0)A.push({type:"text",text:Mt});for(let s of i)if(Je(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");A.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else A.push({type:"image",data:await Gt(s),mimeType:s.mediaType});if(c.current.revision===ct&&r.get(o.id)===h)c.current={text:"",revision:c.current.revision+1},tt=c.current.revision,B(c.current),Q([]),L([]),W.current=void 0,U.current=void 0,J(o.id,()=>pt),r.set(o.id,{text:"",attachments:pt,mentions:[],apps:[],modelId:h?.modelId??null}),f.current?.resetHeight();if(a!==null&&I)await I(a);else if(T)if(l===null)await T(A);else await T(A,(s)=>{if(l.signal.aborted||j.current!==l)return;l.accept(s),F?.(o.id,s)});else if(l===null)await _.prompt(o.id,A);else{let s=await _.prompt(o.id,A);l.accept(s)}It();for(let s of h?.attachments??[])if(s.url.startsWith("blob:")&&!r.get(o.id)?.attachments.some((et)=>et.id===s.id))URL.revokeObjectURL(s.url)}catch(A){if(h&&tt!==null&&c.current.revision===tt&&r.get(o.id)?.attachments.length===0&&r.get(o.id)?.mentions.length===0&&!r.get(o.id)?.apps?.length)c.current={text:h.text,revision:tt+1},B(c.current),Q(h.mentions),L(h.apps??[]),r.set(o.id,h),J(o.id,()=>h.attachments);throw A}finally{ht(!1),f.current?.focus()}},[_,o.id,o.state,y,d,T,I,F,It]),zt=()=>{_.cancel(o.id).catch(z)},Bt=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Le})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});z(i)},[z,g]),Ht=lt(()=>({session:o,ready:b,inputReady:D,sending:k,textareaRef:f,draft:vt,interruptRef:gt,observeReceipts:Pt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(T===void 0||F!==void 0)}),[o,b,D,k,vt,Pt,at,T,F,x]),Tt=O.writeTextAttachment,Ct={className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:$t,bashMode:I!==void 0,disabled:!D,"aria-label":g("composer.placeholder"),placeholder:x?"! command":Z.text||kt||(V?g("composer.steerPlaceholder"):g("composer.placeholder")),onPasteCapture:(t)=>{if(!X&&!x&&!t.currentTarget.disabled&&![...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/"))){let i=bt(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=p(i),l=S([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);U.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(Tt)un(t,o.id,g("composer.pastedTextFilename"),Tt)}};return m(lo,{value:Ht,children:m("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:R("div",{className:"relative",children:[st&&m("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:st}),m(Nr,{attachmentPolicy:mt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},B(c.current)},attachments:C,onAttachmentsChange:(t)=>J(o.id,()=>t),children:R("div",{ref:it,className:"relative",children:[G&&!ot&&m(Tr,{bashMode:I!==void 0,handleRef:f,commands:o.commands,renderSlashMenu:(t)=>m(co,{anchorRef:it,commands:o.commands,query:t.query,includeAttachment:!1,disabled:!D,agentDisabled:!b||x,open:!0,onClose:t.close,onCommand:(i)=>t.replaceQuery(()=>Wt(i.startsWith("$")?i:`/${i}`)),onApp:(i)=>t.replaceQuery(()=>xt(i)),focusInput:yt}),searchFiles:Ut,onMention:at,onSearchError:z,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},X?"inline":"textarea"),R(xr,{attachmentPolicy:mt,"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:wt,onSubmitAsync:wt,onSubmitError:z,canSubmit:()=>b&&!k&&!Y&&!nt&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[Dt,R(Cr,{className:"px-3 pt-3 pb-0 empty:hidden",children:[Y&&m("span",{role:"status",className:"text-muted-foreground text-xs",children:g("composer.addingFiles")}),m(Di,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),m(or,{children:(t)=>Je(t)?m(Hi,{data:t,sessionId:o.id}):m(nr,{data:t,t:g})})]}),R(br,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(t)=>{if(!Z.text||f.current?.isComposing()||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey||t.target!==f.current?.getTextarea())return;if(t.key==="Tab"||t.key==="ArrowRight"||t.key==="Enter")t.preventDefault(),t.stopPropagation(),P(Z.text)},children:[x&&m("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),X?m(po,{...Ct,skillIcon:O.skillIcon,skillNames:o.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:U.current}):m(go,{...Ct,autoFocus:ft&&x})]}),m(wr,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:R("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[R("div",{className:"flex min-w-0 items-center gap-[5px]",children:[m(Gi,{anchorRef:it,commands:o.commands,disabled:!D,agentDisabled:!b||x,agentControls:G,open:ot,onOpenChange:Lt,focusInput:yt,onCommand:(t)=>{let i=c.current.text,a=i.length===0||i.endsWith(`
|
|
2
|
+
`)?i:`${i}
|
|
3
|
+
`,u=t.startsWith("$")?t:`/${t}`,l=`${a}${u} `;if(!X)U.current={text:i,apps:[]},W.current=l.length,K(!0);P(l),requestAnimationFrame(()=>{let h=f.current?.getTextarea();h?.focus(),h?.setSelectionRange(l.length,l.length)})},onApp:xt}),Et,G&&m(dn,{sessionId:o.id,options:o.configOptions,disabled:!b})]}),R(kr,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&m(xn,{session:o}),E??m(gn,{...q,sessionId:o.id,options:o.configOptions,disabled:!b}),Rt,m(Oi,{active:V,sending:k||dt||Y,ready:b&&!nt&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
|
+
export{Me};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u,uo}from"./chunk-6ja6pt5x.js";import{Pn}from"./chunk-jtnjd3ec.js";import{useEffect as p,useRef as P,useState as m}from"react";var zi="providers:changed",Vi="providers:managed-revoked",i=(e)=>e;function hn(){return{read:()=>i(u.providersRead()),save:(e,r,t)=>i(u.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(u.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(u.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>u.providersTest({providerId:e}),apply:()=>i(u.providersApply()),onChanged:(e)=>uo[zi].listen((r)=>e(r.payload))}}function js(){return{bind:(e)=>u.providersAccountBind({account:e}),refresh:(e,r)=>i(u.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await u.providersClearManaged()},onRevoked:(e)=>uo[Vi].listen((r)=>e(r.payload.sessionIds))}}async function vn(e){try{return await e.apply()}catch(r){if(!Pn(r))throw r;return e.read()}}function yn(e,r=console.error){let[t,d]=m(null),a=P(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
+
export{zi,Vi,hn,js,vn,yn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Pr}from"./chunk-964fwwsg.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function _r(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await Pr(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
|
|
2
|
+
export{_r};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function*Xn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function ei(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of Xn(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
|
|
2
|
+
export{Xn,ei};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ds}from"./chunk-gt50nb3j.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Vo({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(ds,{src:c,alt:"",onClose:()=>a(!1)})]})}function cs({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e(Vo,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
|
|
2
|
+
export{Vo,cs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var
|
|
2
|
-
export{
|
|
1
|
+
import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var u={providersRead:()=>i("plugin:alwith-chat|providers_read"),providersSave:(e)=>i("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>i("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>i("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>i("plugin:alwith-chat|providers_test",e),providersApply:()=>i("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>i("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>i("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>i("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>i("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>i("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>i("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>i("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>i("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>i("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>i("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>i("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>i("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>i("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>i("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>i("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>i("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>i("plugin:alwith-chat|read_image",e),saveFile:(e)=>i("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>i("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>i("plugin:alwith-chat|preview_file",e)},uo={"providers:changed":{name:"providers:changed",listen:(e)=>s("providers:changed",e),once:(e)=>a("providers:changed",e),emit:(e)=>t("providers:changed",e),emitTo:(e,r)=>n(e,"providers:changed",r)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>s("providers:managed-revoked",e),once:(e)=>a("providers:managed-revoked",e),emit:(e)=>t("providers:managed-revoked",e),emitTo:(e,r)=>n(e,"providers:managed-revoked",r)}};function Da(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Wa(e){if(Da(e)||e instanceof Error)return e.message;return String(e)}
|
|
2
|
+
export{u,uo,Da,Wa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{R}from"./chunk-d336k00a.js";import{s}from"./chunk-r7z3mvej.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function ga({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return R(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
|
|
2
|
+
export{ga};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C}from"./chunk-
|
|
2
|
-
export{vo,
|
|
1
|
+
import{C}from"./chunk-x0m4ctqf.js";var vo="application/x-alwith-app-references+json";function p(n){let r=[],t=n.apps.map((e,o)=>({app:e,order:o,offset:Math.max(0,Math.min(n.text.length,e.offset??0))})).sort((e,o)=>e.offset-o.offset||e.order-o.order),i=0;for(let{app:e,offset:o}of t)r.push(...n.text.slice(i,o).split(""),e),i=o;return r.push(...n.text.slice(i).split("")),r}function S(n){let r="",t=[],i=new Set;for(let e of n)if(typeof e==="string")r+=e;else if(!i.has(e.id))i.add(e.id),t.push({...e,offset:r.length});return{text:r,apps:t}}function Rn(n,r){return n.slice(0,r).filter((t)=>typeof t==="string").length}function yo(n,r){let t=0;for(let i=0;i<n.length;i++){if(typeof n[i]!=="string")continue;if(t===r)return i;t++}return n.length}function bt(n){let r=n.getData(vo);if(!r)return null;let t;try{t=JSON.parse(r)}catch{return null}if(typeof t!=="object"||t===null||!("version"in t)||t.version!==1||!("text"in t)||typeof t.text!=="string"||!("apps"in t)||!Array.isArray(t.apps))return null;let i=[];for(let e of t.apps){if(typeof e!=="object"||e===null||typeof e.id!=="string"||C(`app://${e.id}`)!==e.id||typeof e.name!=="string"||!e.name.trim()||!Number.isInteger(e.offset)||e.offset<0||e.offset>t.text.length)return null;if(e.iconUrl!=null&&typeof e.iconUrl!=="string"||e.iconUrlDark!=null&&typeof e.iconUrlDark!=="string")return null;i.push({id:e.id,name:e.name,offset:e.offset,...e.iconUrl?{iconUrl:e.iconUrl}:{},...e.iconUrlDark?{iconUrlDark:e.iconUrlDark}:{}})}return S(p({text:t.text,apps:i}))}
|
|
2
|
+
export{vo,p,S,Rn,yo,bt};
|