@alwith/module-chat 0.6.28 → 0.6.29
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/assets/catalogs/qwen/models.json +40 -0
- package/assets/provider-catalog.json +4 -0
- package/dist/activity-host.js +1 -1
- package/dist/agent/client.d.ts +1 -0
- 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/request-error.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-6tj5e7fc.js → chunk-06aaghwq.js} +2 -2
- package/dist/{chunk-gvqvw7ms.js → chunk-0c956xc0.js} +2 -2
- package/dist/chunk-0f00j53n.js +2 -0
- package/dist/{chunk-5dtpfpq5.js → chunk-12bfnfbk.js} +2 -2
- package/dist/chunk-12pd4nxy.js +2 -0
- package/dist/{chunk-rt1c2p25.js → chunk-188q5xn8.js} +2 -2
- package/dist/{chunk-sgbn37kz.js → chunk-189aq7st.js} +2 -2
- package/dist/{chunk-8v53bkyr.js → chunk-19jh646d.js} +2 -2
- package/dist/{chunk-rb4p3h5b.js → chunk-1bvgs2t1.js} +2 -2
- package/dist/{chunk-p83pk7ff.js → chunk-1dpk9zrb.js} +2 -2
- package/dist/{chunk-9kz3pxt9.js → chunk-239gtn3z.js} +2 -2
- package/dist/chunk-2c4hqv8f.js +2 -0
- package/dist/{chunk-ndfyste3.js → chunk-2c7a0zdc.js} +2 -2
- package/dist/chunk-2rk59ngw.js +2 -0
- package/dist/{chunk-cpe6vtpe.js → chunk-32zzqeyf.js} +2 -2
- package/dist/{chunk-tzczzqde.js → chunk-36j9fer8.js} +2 -2
- package/dist/{chunk-ztm4agfw.js → chunk-36rxa8k7.js} +3 -3
- package/dist/{chunk-jf2bxzee.js → chunk-37x36kph.js} +3 -3
- package/dist/{chunk-2cfhvb3k.js → chunk-3btheq4v.js} +2 -2
- package/dist/{chunk-zr8yk5np.js → chunk-3cwbxnxr.js} +3 -3
- package/dist/{chunk-2e1tg69n.js → chunk-3gkb117f.js} +3 -3
- package/dist/{chunk-38psn07c.js → chunk-3kxerrsh.js} +2 -2
- package/dist/{chunk-k7h34p5z.js → chunk-42dfq7ze.js} +1 -1
- package/dist/{chunk-tmec4by7.js → chunk-46j8adkj.js} +2 -2
- package/dist/{chunk-fqdtx7tp.js → chunk-483jakc1.js} +2 -2
- package/dist/chunk-48zgp33j.js +2 -0
- package/dist/{chunk-dnh1e01b.js → chunk-4fghmx57.js} +2 -2
- package/dist/chunk-4npg9v6h.js +2 -0
- package/dist/{chunk-c4awmmwt.js → chunk-4sj3t6mk.js} +2 -2
- package/dist/{chunk-k44dkkpg.js → chunk-4y07ykv2.js} +2 -2
- package/dist/chunk-52hvpdxw.js +2 -0
- package/dist/{chunk-2zy75522.js → chunk-54awxpw2.js} +2 -2
- package/dist/{chunk-jggts370.js → chunk-5arfhz6m.js} +2 -2
- package/dist/{chunk-n0q8e6sq.js → chunk-5cas0xvp.js} +2 -2
- package/dist/chunk-5dxzfdd1.js +2 -0
- package/dist/{chunk-tnzz1j83.js → chunk-5dygcexv.js} +2 -2
- package/dist/{chunk-3a3ecayr.js → chunk-5h8h4sas.js} +2 -2
- package/dist/{chunk-cpy7x31t.js → chunk-5n2304a1.js} +2 -2
- package/dist/chunk-5wed639g.js +2 -0
- package/dist/{chunk-a73hd95m.js → chunk-621g2ntr.js} +3 -3
- package/dist/{chunk-81hv0s07.js → chunk-6eebeq0f.js} +2 -2
- package/dist/chunk-6g5qmjph.js +2 -0
- package/dist/{chunk-r06hycq5.js → chunk-6gejqbns.js} +2 -2
- package/dist/{chunk-xsn2g4kk.js → chunk-6hxz5cpc.js} +2 -2
- package/dist/{chunk-kj3t4mqf.js → chunk-6ja6pt5x.js} +2 -2
- package/dist/{chunk-b2vtrd8n.js → chunk-6kyq5zxt.js} +1 -1
- package/dist/{chunk-2c2a1wvg.js → chunk-6m9frvzj.js} +2 -2
- package/dist/{chunk-vbk36ptt.js → chunk-6r1e3y4e.js} +3 -3
- package/dist/{chunk-sjqhtpzr.js → chunk-6wkcqhkk.js} +2 -2
- package/dist/{chunk-42ebtw00.js → chunk-6yzknjee.js} +2 -2
- package/dist/{chunk-ga265p00.js → chunk-717437bm.js} +2 -2
- package/dist/chunk-7ckdhz5y.js +2 -0
- package/dist/chunk-7egc2x4q.js +1 -0
- package/dist/{chunk-ayhxrzsq.js → chunk-7g0cbkbp.js} +2 -2
- package/dist/{chunk-kj3a1k2q.js → chunk-7hfd7hnm.js} +2 -2
- package/dist/{chunk-2sc2z6g5.js → chunk-7jk8s061.js} +2 -2
- package/dist/{chunk-7rgcj1w2.js → chunk-7n1v87h0.js} +2 -2
- package/dist/{chunk-tghj342y.js → chunk-7rqryntm.js} +2 -2
- package/dist/{chunk-gds55pjg.js → chunk-7sf2wz1n.js} +2 -2
- package/dist/{chunk-3nbpd0jt.js → chunk-7vby3f2v.js} +2 -2
- package/dist/{chunk-kk9dbwd1.js → chunk-84zzf0ys.js} +2 -2
- package/dist/{chunk-1gtmvxdr.js → chunk-8ktb3g8c.js} +2 -2
- package/dist/{chunk-17gs9pbn.js → chunk-8p861ztc.js} +2 -2
- package/dist/{chunk-w1yrsbw1.js → chunk-8w5bt0nc.js} +2 -2
- package/dist/{chunk-0q22f9vw.js → chunk-9162ez1n.js} +2 -2
- package/dist/{chunk-ty2cd00p.js → chunk-91jmmkd3.js} +2 -2
- package/dist/{chunk-78vckhxt.js → chunk-964fwwsg.js} +2 -2
- package/dist/{chunk-xk6f2raz.js → chunk-9xdne4k4.js} +2 -2
- package/dist/{chunk-t9xkg3pk.js → chunk-aa2xhwh2.js} +1 -1
- package/dist/{chunk-ms0h8x63.js → chunk-abxsr9d1.js} +2 -2
- package/dist/{chunk-nh56sb8e.js → chunk-afnnrn6z.js} +2 -2
- package/dist/{chunk-kfgy61cg.js → chunk-agz11n1h.js} +3 -3
- package/dist/{chunk-rkejggyx.js → chunk-ahzjy61p.js} +2 -2
- package/dist/{chunk-1ffpsz44.js → chunk-ansfap1a.js} +2 -2
- package/dist/{chunk-b6p0y68h.js → chunk-aq22zye1.js} +1 -1
- package/dist/{chunk-cvn9zbbc.js → chunk-azak3tb5.js} +2 -2
- package/dist/{chunk-gnd32zkx.js → chunk-b4qe4xnp.js} +2 -2
- package/dist/{chunk-9q6hz47j.js → chunk-b4wh6k5s.js} +2 -2
- package/dist/{chunk-q5qqhqw4.js → chunk-b64hyshj.js} +2 -2
- package/dist/{chunk-n8mexbh4.js → chunk-bajn7ssf.js} +2 -2
- package/dist/{chunk-trxf8c70.js → chunk-bbvhgh27.js} +2 -2
- package/dist/{chunk-38bpmgjd.js → chunk-bnf6pmgc.js} +2 -2
- package/dist/{chunk-evsyhxz1.js → chunk-bsqe29dh.js} +2 -2
- package/dist/chunk-cp3qcgdv.js +4 -0
- package/dist/{chunk-tky568fy.js → chunk-cttsbjr0.js} +2 -2
- package/dist/{chunk-ffs5nkt0.js → chunk-cxhyh0w9.js} +2 -2
- package/dist/{chunk-f4h84pav.js → chunk-d336k00a.js} +2 -2
- package/dist/{chunk-jg4c3zg4.js → chunk-d5pn8932.js} +2 -2
- package/dist/{chunk-3qqd9x6x.js → chunk-d8bjsf1d.js} +2 -2
- package/dist/{chunk-6xap6hvz.js → chunk-darm80tf.js} +2 -2
- package/dist/{chunk-s81m6yx7.js → chunk-dbrrbwb8.js} +2 -2
- package/dist/chunk-dfzhma2x.js +2 -0
- package/dist/{chunk-064vpdm9.js → chunk-ds6bqmdr.js} +2 -2
- package/dist/{chunk-dzpbbys1.js → chunk-dwf38vyq.js} +2 -2
- package/dist/chunk-dxfhy8gr.js +2 -0
- package/dist/{chunk-pk931bpm.js → chunk-dzw6vqqf.js} +2 -2
- package/dist/{chunk-v9v1v41p.js → chunk-e8mxwqxy.js} +2 -2
- package/dist/chunk-eedgav4q.js +2 -0
- package/dist/{chunk-r4nz54dh.js → chunk-eexn5mmk.js} +2 -2
- package/dist/{chunk-rncvy5pp.js → chunk-efkfzgs9.js} +2 -2
- package/dist/chunk-ehcnfvaz.js +2 -0
- package/dist/{chunk-rkks48gw.js → chunk-epdnafa1.js} +2 -2
- package/dist/{chunk-6yaxjcnj.js → chunk-esxjnj1y.js} +3 -3
- package/dist/{chunk-jz7dnk88.js → chunk-ezaypwps.js} +2 -2
- package/dist/{chunk-q46z21zs.js → chunk-f9zpep12.js} +2 -2
- package/dist/{chunk-mdf155e1.js → chunk-fednb216.js} +2 -2
- package/dist/{chunk-pxv38ttf.js → chunk-fpsn6fmf.js} +2 -2
- package/dist/{chunk-nzgjcp8w.js → chunk-fvf1et2s.js} +2 -2
- package/dist/{chunk-5hk14ksr.js → chunk-fvw65b49.js} +2 -2
- package/dist/{chunk-hyr8yww9.js → chunk-fz9y067h.js} +2 -2
- package/dist/{chunk-djd3sjp9.js → chunk-g9426ns9.js} +2 -2
- package/dist/chunk-gdn4vvks.js +2 -0
- package/dist/chunk-ge0anaww.js +4 -0
- package/dist/chunk-gjj5wbms.js +4 -0
- package/dist/{chunk-tj4b0s68.js → chunk-gt50nb3j.js} +2 -2
- package/dist/chunk-h1t76wws.js +2 -0
- package/dist/chunk-hc9bcwpa.js +2 -0
- package/dist/{chunk-26w51q10.js → chunk-hpv8x22r.js} +2 -2
- package/dist/chunk-hqfhb4ng.js +2 -0
- package/dist/{chunk-62kt6f1d.js → chunk-htsbt68m.js} +2 -2
- package/dist/{chunk-tftfggte.js → chunk-hz8yrg2t.js} +2 -2
- package/dist/{chunk-0xshzqb6.js → chunk-hzhcajx1.js} +2 -2
- package/dist/chunk-j1khvg9s.js +2 -0
- package/dist/{chunk-0aeq7qy7.js → chunk-jbnbx285.js} +2 -2
- package/dist/{chunk-heqa4swe.js → chunk-jkqh03w4.js} +2 -2
- package/dist/{chunk-s89p3zgn.js → chunk-k0rfgjm6.js} +2 -2
- package/dist/{chunk-7sr8weqn.js → chunk-k1atcess.js} +2 -2
- package/dist/{chunk-cf7cw2tj.js → chunk-kk5acm1s.js} +5 -5
- package/dist/{chunk-7zafb413.js → chunk-kq8jv5tf.js} +2 -2
- package/dist/{chunk-8hygfx41.js → chunk-kv1v7kgn.js} +2 -2
- package/dist/chunk-kzh7w9c0.js +2 -0
- package/dist/chunk-m76tgtge.js +3 -0
- package/dist/{chunk-kvnbmt00.js → chunk-m7t9asrq.js} +2 -2
- package/dist/{chunk-ccxsf02q.js → chunk-m7tj6194.js} +2 -2
- package/dist/{chunk-z4jv8svx.js → chunk-me230xjh.js} +3 -3
- package/dist/{chunk-ykz0h1r0.js → chunk-mtcxr3ns.js} +2 -2
- package/dist/{chunk-6pwssh9v.js → chunk-n7f38k3f.js} +2 -2
- package/dist/chunk-n7pyzjq1.js +2 -0
- package/dist/{chunk-6bhfdsyz.js → chunk-n9e1v175.js} +2 -2
- package/dist/{chunk-ypgvt8ky.js → chunk-nabyjzn5.js} +2 -2
- package/dist/{chunk-gea1q14z.js → chunk-nn8pmwqz.js} +2 -2
- package/dist/{chunk-rerm6x2f.js → chunk-nq2tqdb2.js} +2 -2
- package/dist/chunk-nravn5bk.js +2 -0
- package/dist/{chunk-p8cm3xw1.js → chunk-p781sb6h.js} +2 -2
- package/dist/chunk-pbx1417n.js +2 -0
- package/dist/{chunk-5vajeawb.js → chunk-pqw5qz4e.js} +2 -2
- package/dist/{chunk-e04g26qm.js → chunk-pqz2471h.js} +2 -2
- package/dist/chunk-pv7t4hw8.js +2 -0
- package/dist/{chunk-aq1j5vqn.js → chunk-q98s7d94.js} +2 -2
- package/dist/{chunk-evethx5n.js → chunk-qc49fm8e.js} +2 -2
- package/dist/{chunk-t50b1s7h.js → chunk-qd8j2d63.js} +3 -3
- package/dist/{chunk-jra2q5cx.js → chunk-qdbyn3xv.js} +2 -2
- package/dist/chunk-qecs9e31.js +2 -0
- package/dist/{chunk-dyks7e24.js → chunk-qz9q0g2b.js} +2 -2
- package/dist/{chunk-q01vmp9m.js → chunk-r013w7yb.js} +2 -2
- package/dist/{chunk-pccwq2dd.js → chunk-r3s28905.js} +3 -3
- package/dist/{chunk-zpcd9w2t.js → chunk-r51vcbf0.js} +2 -2
- package/dist/{chunk-qqphgn9b.js → chunk-r7z3mvej.js} +2 -2
- package/dist/chunk-rak4mkgh.js +2 -0
- package/dist/{chunk-snxpc6yr.js → chunk-rhyw89ap.js} +2 -2
- package/dist/{chunk-a4y4bsve.js → chunk-sb2694hc.js} +2 -2
- package/dist/{chunk-jfrj2qg1.js → chunk-sdhkpkbs.js} +2 -2
- package/dist/{chunk-y8fmawc6.js → chunk-smd9rszw.js} +3 -3
- package/dist/{chunk-kqekfj3v.js → chunk-sx1gjwb6.js} +3 -3
- package/dist/chunk-sykf5jnc.js +2 -0
- package/dist/{chunk-0fs2k5fe.js → chunk-t56ncd8f.js} +2 -2
- package/dist/{chunk-eavqh5fb.js → chunk-tbz64dbd.js} +3 -3
- package/dist/{chunk-tpdyjp90.js → chunk-tdaznr5w.js} +2 -2
- package/dist/{chunk-ckja1ppp.js → chunk-tjc0ntnh.js} +2 -2
- package/dist/chunk-ts7h148j.js +2 -0
- package/dist/{chunk-v042t2he.js → chunk-v0xy25sh.js} +2 -2
- package/dist/{chunk-gzc704c3.js → chunk-v6f6s828.js} +2 -2
- package/dist/{chunk-ec4q4rw7.js → chunk-vazspetj.js} +2 -2
- package/dist/{chunk-m8tt5bf9.js → chunk-vhxr0c4c.js} +2 -2
- package/dist/{chunk-tm5w5srq.js → chunk-vjgze5n7.js} +2 -2
- package/dist/{chunk-hygvdjq6.js → chunk-vvmmzcms.js} +2 -2
- package/dist/{chunk-phsvgv0f.js → chunk-vvy4ke91.js} +2 -2
- package/dist/{chunk-vzm88w2r.js → chunk-w5rg8wk8.js} +2 -2
- package/dist/{chunk-pqs039wv.js → chunk-w7vcd8d1.js} +4 -4
- package/dist/{chunk-at75m9hq.js → chunk-wf4z9w5x.js} +2 -2
- package/dist/chunk-wfk50eh6.js +2 -0
- package/dist/{chunk-smf7c649.js → chunk-wxafew32.js} +2 -2
- package/dist/chunk-wxjm3mq8.js +2 -0
- package/dist/chunk-x0m4ctqf.js +2 -0
- package/dist/{chunk-2v531sbv.js → chunk-x9rppnkq.js} +2 -2
- package/dist/{chunk-r7paw6ba.js → chunk-xca0vnvk.js} +2 -2
- package/dist/chunk-xk41ehy8.js +2 -0
- package/dist/{chunk-6cxvfwpe.js → chunk-xmy7ebed.js} +2 -2
- package/dist/{chunk-jca8s47n.js → chunk-xpj8gb9a.js} +1 -1
- package/dist/chunk-xpts50f0.js +2 -0
- package/dist/{chunk-36ttr22w.js → chunk-xqsfaaae.js} +2 -2
- package/dist/{chunk-kfm1sz3q.js → chunk-y5xjf5sb.js} +2 -2
- package/dist/chunk-y780cd4m.js +2 -0
- package/dist/{chunk-p79keq5q.js → chunk-ybwevt5n.js} +2 -2
- package/dist/{chunk-r1sj7c91.js → chunk-yc7w1en3.js} +2 -2
- package/dist/{chunk-m8pkmbtf.js → chunk-yfb5hj4w.js} +2 -2
- package/dist/{chunk-2fck5sy2.js → chunk-yn3d949k.js} +2 -2
- package/dist/chunk-ynp45k84.js +2 -0
- package/dist/chunk-yqhvxm9m.js +2 -0
- package/dist/{chunk-r8pm74zf.js → chunk-z930082m.js} +2 -2
- package/dist/chunk-zcfsbgvw.js +2 -0
- package/dist/chunk-zewseva6.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/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/markdown.css +4 -0
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/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.d.ts +2 -0
- 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.d.ts +1 -0
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.d.ts +3 -2
- 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.d.ts +2 -2
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.d.ts +4 -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/pointer-centered-zoom.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/locales.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/locales.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/locales.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/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.d.ts +4 -0
- 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/native/win32-x64/alwith_native_chat.dll +0 -0
- package/native/win32-x64/artifact.json +1 -1
- package/package.json +2 -2
- package/dist/chunk-0fqp48tv.js +0 -2
- package/dist/chunk-1a56svgj.js +0 -2
- package/dist/chunk-1fda3013.js +0 -2
- package/dist/chunk-3kn94cpp.js +0 -2
- package/dist/chunk-3r57tgvf.js +0 -2
- package/dist/chunk-4cbfgsg7.js +0 -2
- package/dist/chunk-5d138vq3.js +0 -1
- package/dist/chunk-5k4ec37x.js +0 -2
- package/dist/chunk-5mnjkjjr.js +0 -2
- package/dist/chunk-6tr1bch8.js +0 -4
- package/dist/chunk-8qzq9yq1.js +0 -2
- package/dist/chunk-8y838se4.js +0 -2
- package/dist/chunk-aepfqfad.js +0 -2
- package/dist/chunk-agx111cv.js +0 -2
- package/dist/chunk-b30n56t8.js +0 -2
- package/dist/chunk-b42vv8f2.js +0 -2
- package/dist/chunk-b8x98hyd.js +0 -2
- package/dist/chunk-bx11qvn9.js +0 -2
- package/dist/chunk-dd0f44xb.js +0 -2
- package/dist/chunk-dmq2fx7g.js +0 -2
- package/dist/chunk-dpfjxym1.js +0 -2
- package/dist/chunk-e27d47yd.js +0 -2
- package/dist/chunk-ep9vq47f.js +0 -2
- package/dist/chunk-fjrghy92.js +0 -2
- package/dist/chunk-gya560n0.js +0 -2
- package/dist/chunk-gyw21vnb.js +0 -2
- package/dist/chunk-j8ehajmt.js +0 -2
- package/dist/chunk-mhzqhd85.js +0 -2
- package/dist/chunk-mz90kcyd.js +0 -2
- package/dist/chunk-mzd9qfmj.js +0 -2
- package/dist/chunk-ngvdcqmt.js +0 -3
- package/dist/chunk-q73jne25.js +0 -2
- package/dist/chunk-sy1rf5m0.js +0 -4
- package/dist/chunk-t7xbh36h.js +0 -2
- package/dist/chunk-tk66t919.js +0 -4
- package/dist/chunk-ty9sa6we.js +0 -2
- package/dist/chunk-vnh0jnr4.js +0 -2
- package/dist/chunk-w368gk92.js +0 -2
- package/dist/chunk-x1mzrhtd.js +0 -2
- package/dist/chunk-xhbxpk0z.js +0 -2
- package/dist/chunk-y6p8xspr.js +0 -2
- package/dist/chunk-y85askf9.js +0 -2
- package/dist/chunk-yc47rq4m.js +0 -2
- package/dist/chunk-z6zsmpyz.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{N,ht,vt,yt,G,Js,re,Sn,_n,Xs,xt,Ys}from"../chunk-nravn5bk.js";import"../chunk-5n2304a1.js";export{xt as MODEL_PRESENTATION,N as PROVIDERS,Xs as customModelEffort,G as gatewayModelId,ht as isAccountModel,vt as parseCustomModels,Ys as presentModel,_n as providerApplicationPending,yt as providerGroups,Sn as providerKeyUrl,re as providerRegion,Js as resolveSessionModel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ns,As
|
|
1
|
+
import{Ms,Ns,As}from"../chunk-m7tj6194.js";export{Ms as codexSettingsBridge,As as createSettingsBridgeClient,Ns as serveSettingsBridge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ns,As
|
|
1
|
+
import{Ms,Ns,As}from"../chunk-m7tj6194.js";import"../chunk-n7pyzjq1.js";import"../chunk-4fghmx57.js";import"../chunk-bsqe29dh.js";import"../chunk-9162ez1n.js";import"../chunk-smd9rszw.js";import"../chunk-hz8yrg2t.js";import"../chunk-dxfhy8gr.js";import"../chunk-2c4hqv8f.js";import"../chunk-tbz64dbd.js";import"../chunk-p781sb6h.js";import"../chunk-r51vcbf0.js";import{Zt}from"../chunk-rhyw89ap.js";import{Kt,ri,Wt}from"../chunk-kq8jv5tf.js";import{Pn,In,Tn,Mn}from"../chunk-5n2304a1.js";import{N,ht,vt,yt,G,Js,re,Sn,_n,Xs,xt,Ys}from"../chunk-nravn5bk.js";import"../chunk-6ja6pt5x.js";import{zi,Vi,fn,$s,hn,vn}from"../chunk-v0xy25sh.js";import{ti,Is,ni,oi,ii,Xn}from"../chunk-agz11n1h.js";import{at,$t,qt}from"../chunk-6eebeq0f.js";import{Ts}from"../chunk-n9e1v175.js";export{Wt as CodexAccountCard,ri as CodexAccountSummary,Xn as CustomProviderEditor,Pn as DeepSeekLogo,In as GrokLogo,Zt as LoginCard,at as MODEL_ALIASES_KEY,xt as MODEL_PRESENTATION,ti as ManagedProviderSection,Ts as ModelAliasSettings,Tn as OpenRouterLogo,N as PROVIDERS,zi as PROVIDERS_CHANGED,Vi as PROVIDERS_REVOKED,ii as ProviderRow,Is as ProviderSection,ni as ProviderTabs,Mn as QwenLogo,oi as TestFeedback,Kt as UsageLimitRow,hn as applyProvidersWhenIdle,Ms as codexSettingsBridge,$s as createManagedProvidersPort,fn as createProvidersPort,As as createSettingsBridgeClient,Xs as customModelEffort,G as gatewayModelId,ht as isAccountModel,vt as parseCustomModels,Ys as presentModel,_n as providerApplicationPending,yt as providerGroups,Sn as providerKeyUrl,re as providerRegion,Js as resolveSessionModel,qt as saveModelAlias,Ns as serveSettingsBridge,$t as useModelAliases,vn as useProviders};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-chat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
"@dnd-kit/utilities": "^3.2.2",
|
|
408
408
|
"@floating-ui/dom": "^1.8.0",
|
|
409
409
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
410
|
-
"@nyssance/codex-acp-v2": "^0.7.
|
|
410
|
+
"@nyssance/codex-acp-v2": "^0.7.79",
|
|
411
411
|
"@nyssance/shadcn": "^4.23.4",
|
|
412
412
|
"@shadcn/react": "^0.3.1",
|
|
413
413
|
"@solar-icons/react": "^2.6.0",
|
package/dist/chunk-0fqp48tv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_o}from"./chunk-k44dkkpg.js";import{vr,ee}from"./chunk-tmec4by7.js";import{ko}from"./chunk-2v531sbv.js";import{On}from"./chunk-sjqhtpzr.js";import{pr,Co}from"./chunk-z4jv8svx.js";import{ur}from"./chunk-dyks7e24.js";import{Hn}from"./chunk-38psn07c.js";import{fe}from"./chunk-j8ehajmt.js";import{nt,De}from"./chunk-dd0f44xb.js";import{wo}from"./chunk-tnzz1j83.js";import{fr}from"./chunk-gnd32zkx.js";import{ge,Fn}from"./chunk-r7paw6ba.js";import{CodexClient as M,configRevisionOf as O,isBooleanOption as S,isGroupedSelect as v,isImage as R,isSelectOption as g,mergeMeta as f,runStateSource as I}from"@nyssance/codex-acp-v2/client";var C={id:"chatgpt",name:"ChatGPT"};function y(e){return e===null?void 0:{alwith:{model:e}}}function d(e){let s=e.find((t)=>t.category==="model"&&t.type==="select");return s?.type==="select"&&typeof s.currentValue==="string"?s.currentValue:null}function P(e){let s=e["x-codex-turn-metadata"];if(typeof e.callId!=="string"||typeof s?.turn_id!=="string")throw Error("Codex tool call metadata is missing callId or turn_id");return{toolCallId:e.callId,turnId:s.turn_id}}class cr extends M{applicationRegistry=new _o((e)=>this.holds(e)?this.session(e):void 0,P);toolSelection;async executeShell(e,s){let t=this.session(e);if(!t.attached||t.restoring||t.readOnly||t.state!=="idle")throw Error("The session is not ready for a shell command");await this.codexCapabilities.executeShell(e,s),this.materializeDraft(e)}modelListeners=new Set;confirmedModelListeners=new Set;savedModels={main:null,chat:null};slotModels={main:null,chat:null};slotTargets={main:null,chat:null};slotVersions={main:0,chat:0};draftDirectoryIntents=new Map;draftOperations=new Map;gatewayModels=new Map;configOwners=new Map;openingOwners=new Map;schedulingConfig=new Set;replayRepairs=new Map;accountRevocations=new Map;accountRecoveries=new Map;resolveModelOption;constructor(e,s){let{applicationTools:t=[],resolveModel:i,imageService:n,...o}=s;super(e,o,{sessionWindows:{},draftSessions:{},modelRecovery:{},nativeModels:[]});this.toolSelection=t,this.resolveModelOption=i,this.imageService=n,this.imageTool=n?ur(n,(r)=>this.imageRequests.get(r)):void 0}imageTool;imageService;inputModes=new Map;inputSelections=new Map;async readInputConfig(e){let s=this.live(),t=await s.request("_codex/session_input_config_get",{sessionId:e});if(s!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,t)}async writeInputConfig(e,s){let t=this.live(),i=await t.request("_codex/session_input_config_set",{sessionId:e,inputConfig:s});if(t!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,i)}acceptInputConfig(e,s){let t=Hn(s,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=t.inputConfig;if(i&&nt(i.mode)){if(De(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,fe.parseConfig(i.config))}return t}imageRequests=new Map;prompt(e,s,t={}){if(!this.imageService)return super.prompt(e,s,t);if(!this.inputModes.has(e))return this.imageService.inputMode(e).then((i)=>(this.inputModes.set(e,i),this.prompt(e,s,t)));return De(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageIntent:null,applicationContext:De("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,s,t)})}promptImage(e,s,t){if(!this.imageService)throw Error("Image service is not connected");Co(t.meta?.alwith?.imageAspectRatio);let i=t.meta?.alwith?.imageSelection;if(i!==void 0)ee(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};ee(o);let r=crypto.randomUUID();return this.promptImages.set(r,new Map(s.flatMap((a,c)=>R(a)?[[`attachment:${c}`,`data:${a.mimeType};base64,${a.data}`]]:[]))),super.prompt(e,s,{...t,meta:f(t.meta,{alwith:{imageSelection:o,imageRequestId:r,applicationContext:fe.applicationContext(t.meta?.alwith?.imageIntent??"generate",pr),imageIntent:t.meta?.alwith?.imageIntent??"generate"}})}).finally(()=>this.promptImages.delete(r))}promptMeta(e,s){let t=s.meta?.alwith?.imageSelection;if(this.inputModes.get(e)==="image"&&t&&this.imageService&&(this.session(e).state==="idle"||!this.imageRequests.has(e))){let i=new Map(vr(this.session(e)).map((o)=>[o.id,o.src]));for(let[o,r]of this.promptImages.get((s.meta?.alwith).imageRequestId)??[])i.set(o,r);let n=Co((s.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:t,references:i,...n?{aspect:n}:{}})}return wo(super.promptMeta(e,s))}promptImages=new Map;promptWithImages(e,s,t={}){return this.prompt(e,s,{...t,meta:f({alwith:{imageIntent:"generate"}},t.meta)})}async applicationToolsFor(e){let s=typeof this.toolSelection==="function"?await this.toolSelection(e):this.toolSelection,t=e.options.meta?.alwith;return[...s,...e.options.applicationTools??[],...t?.nativeTools?.imageGeneration===!1&&this.imageTool?[this.imageTool]:[]]}releaseImages(e){this.imageRequests.delete(e)}onDisconnected(){for(let e of this.imageRequests.keys())this.releaseImages(e);this.promptImages.clear(),this.applicationRegistry.clear(),super.onDisconnected(),this.setApp({nativeModels:[]})}async cancel(e){this.releaseImages(e),await super.cancel(e)}async close(e){this.releaseImages(e),this.applicationRegistry.drop(e),await super.close(e)}async stopSession(e){this.releaseImages(e),this.applicationRegistry.drop(e);let s=this.state.draftSessions[e];if(s===void 0)return super.stopSession(e);await this.changeDraft([s],()=>this.state.draftSessions[e]?super.close(e):super.stopSession(e))}setApp(e){this.store.setState(e)}applyRunStates(e,s="event"){let t=this.state.runStates,i=e.map((n)=>{let o=t[n.sessionId];return o&&JSON.stringify(o)===JSON.stringify(n)?o:n});if(I(t)===s&&i.length===Object.keys(t).length&&i.every((n)=>n===t[n.sessionId]))return;super.applyRunStates(i,s)}enqueueSession(e,s,t=!0){let i=!t&&!this.schedulingConfig.has(e);return super.enqueueSession(e,()=>{let n=()=>{let a=this.holds(e)?d(this.session(e).configOptions):null;return s().then(async(c)=>{if(this.holds(e)&&d(this.session(e).configOptions)!==a)await this.normalizeCustomEffort(e,!0);return c})},o=()=>{let a=i?this.normalizeCustomEffort(e,!1):void 0;return a?a.then(n):n()},r=t?void 0:this.replayRepairs.get(e)?.promise;return r?r.then(o):o()},t)}customEffortChange(e,s,t=!1,i){if(!this.holds(e))return;let n=this.session(e);if(!n.attached||n.readOnly)return;let o=d(n.configOptions),r=ko(o);if(!r)return;let a=n.configOptions.find((p)=>p.category==="thought_level"&&g(p)),c,h;if(a&&g(a)){let p=v(a.options)?a.options.flatMap((l)=>l.options):a.options;if(a.currentValue===r.value||!s&&p.some((l)=>l.value===a.currentValue))return;if(!p.some((l)=>l.value===r.value))throw Error(`The model does not advertise its default effort: ${o}`);c=a.configId,h=!s&&i!==void 0&&p.some((l)=>l.value===i)?i:r.value}else{if(!r.hidden||!t||o===null)return;let p=n.configOptions.find((l)=>l.category==="model");if(!p)throw Error("The custom model has no model option");c=p.configId,h=o}return{configId:c,value:h}}normalizeCustomEffort(e,s,t=!1,i){let n=this.customEffortChange(e,s,t,i);return n?this.writeCustomEffort(e,n.configId,n.value):void 0}async writeCustomEffort(e,s,t){let i=this.live(),n=this.lifecycle.capture(e),o=await i.request("session/set_config_option",{sessionId:e,configId:s,type:"id",value:t});if(i!==this.agent||!this.lifecycle.isCurrent(n))throw Error("Effort configuration belongs to a retired session");this.publishSession({...this.session(e),configOptions:o.configOptions,configRevision:O(o)??this.session(e).configRevision})}async afterSessionCreated(e){await super.afterSessionCreated(e);try{await super.enqueueSession(e,async()=>this.normalizeCustomEffort(e,!0,!0),!1)}catch(s){try{await this.delete(e)}catch(t){throw AggregateError([s,t],"Failed to initialize and clean up the custom model session",{cause:t})}throw s}}replay(e,s,t){let i=this.replayRepairs.get(e);if(i?.cwd===s)return i.promise;let n=this.replayWithEffort(e,s,t);this.replayRepairs.set(e,{cwd:s,promise:n});let o=()=>{if(this.replayRepairs.get(e)?.promise===n)this.replayRepairs.delete(e)};return n.then(o,o),n}async replayWithEffort(e,s,t){let i=this.holds(e)?this.session(e).configOptions:[],n=i.find((r)=>r.category==="thought_level")?.currentValue;await super.replay(e,s,t);let o=this.lifecycle.capture(e);try{await this.normalizeCustomEffort(e,!1,!0,d(i)===d(this.session(e).configOptions)&&typeof n==="string"?n:void 0)}catch(r){if(this.holds(e)&&this.lifecycle.isCurrent(o))this.publishSession({...this.session(e),attached:!1,restoring:!1});throw r}}async connect(){if(await super.connect(),this.state.projectContext===null)await this.refreshProjectContext()}async listProjectSessions(e){await this.listSessions();let s=this.projectPath(e),t=this.sessionGroup({cwd:s}).id;return this.state.sessionList.filter((i)=>this.sessionGroup(i).id===t)}async newSession(e,s=null,t="main"){if(s!==null&&typeof s==="object")return super.newSession(e,s);let i=++this.slotVersions[t],n=await this.createNativeSession(e,await this.resolveModel(s),null);return this.activateSlot(t,n,i),n}async createNativeSession(e,s,t,i="chat"){let n=await super.newSession(e,{draft:t!==null,meta:f(y(s),this.imageService||t!==null?{alwith:{...this.imageService?{inputMode:i}:{},...t===null?{}:{draft:!0}}}:void 0)});if(t!==null)this.draftDirectoryIntents.set(n,e),this.setApp((o)=>({draftSessions:{...o.draftSessions,[n]:t}}));return this.noteModel(this.session(n)),n}async open(e,s,t="main"){if(typeof t!=="string")return super.open(e,s,t);if(t==="chat"&&this.imageService&&(this.inputModes.get(e)??await this.imageService.inputMode(e))==="image")throw Error("Image conversations must be opened in the main window");this.bindSlot(t,e),++this.slotVersions[t];let i=this.holds(e)?this.session(e):void 0;if(i?.attached&&(!this.imageService||this.inputModes.has(e))&&!i.restoring&&!i.readOnly&&!this.lifecycle.operations.busy(e)&&!this.replayRepairs.has(e)){this.followModel(t,i);return}await this.replayForOwner(e,s,t)}async replayForOwner(e,s,t){this.openingOwners.set(e,t);try{await this.replay(e,s)}finally{if(this.openingOwners.get(e)===t)this.openingOwners.delete(e)}}async requestContext(e,s,t){if(this.imageService){let i=s.kind==="resume"?s.sessionId:s.kind==="fork"?s.sourceSessionId:null,n=i===null?t.meta?.alwith?.inputMode??"chat":await this.imageService.inputMode(i),o=De(n),r=wo(t.meta),a={...r?.alwith,nativeTools:o.nativeTools},c=await this.requestModelContext(e,s,{...t,meta:{...r,alwith:a}});return{...c,bind:async(h)=>{await c.bind?.(h),this.inputModes.set(h,n)}}}return this.requestModelContext(e,s,t)}async requestModelContext(e,s,t){if(s.kind!=="resume"||t.meta?.alwith?.model!==void 0)return this.requestToolContext(e,s,t);let i=s.sessionId,n=this.holds(i)?this.session(i):void 0,o=(n?d(n.configOptions):null)??this.gatewayModels.get(i)??null,r=await this.resolveModel(o),a=o===null?null:r;return this.requestToolContext(e,s,{...t,meta:f(y(a),t.meta)})}async requestToolContext(e,s,t){let i=await this.applicationToolsFor({cwd:e,operation:s,options:t}),n=await super.requestContext(e,s,t);if(!i.length)return n;if(!this.state.agent?.capabilities?.session?.mcp?.acp)throw Error("The agent does not advertise capabilities.session.mcp.acp");let o=this.applicationRegistry.declare(this.live(),i);return{...n,mcpServers:[...n.mcpServers??[],o],bind:async(r)=>{await n.bind?.(r),this.applicationRegistry.bind(o.serverId,r)}}}async installedApps(e){let s=this.live(),t=await super.installedApps(e),i=await fr((n,o)=>s.request(n,o),t.apps.map((n)=>n.id),e?.threadId);if(s!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:t.apps.map((n)=>({...n,...i.get(n.id)}))}}async recoverReplay(e,s,t,i){let n=ge(t);if(!n&&!Fn(t))return super.recoverReplay(e,s,t,i);try{await super.afterResume(e,s,i)}catch(o){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;this.setApp((r)=>({historyPages:{...r.historyPages,[e]:{cursor:null,loading:!1,error:o instanceof Error?o.message:String(o)}}}))}if(n){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:t.reason??t.message,data:t.data},meta:null}}),!0}if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.accountRevocations.set(e,(this.accountRevocations.get(e)??0)+1),this.setApp((o)=>({modelRecovery:{...o.modelRecovery,[e]:!0}})),this.publishSession({...this.session(e),cwd:s,attached:!1,restoring:!1,readOnly:!0}),!0}markAccountModelsUnavailable(e){this.setApp((s)=>({modelRecovery:{...s.modelRecovery,...Object.fromEntries(e.map((t)=>[t,!0]))}}));for(let s of e){if(this.accountRevocations.set(s,(this.accountRevocations.get(s)??0)+1),!this.holds(s))continue;this.publishSession({...this.session(s),attached:!1,readOnly:!0})}}async resumeModel(e,s){let t=this.session(e);if(!this.state.modelRecovery[e]&&(t.attached||!ge(t.error?.error)))throw Error("Model recovery is not required");if(!s)throw Error("Select a model before continuing");let i=this.accountRevocations.get(e)??0,n=await this.resolveModel(s);if(!n)throw Error("The selected provider connection or model is unavailable");if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");this.accountRecoveries.set(e,i);try{await this.replay(e,t.cwd,{meta:{alwith:{model:n,accountModelSelection:!0}}})}catch(r){if(this.holds(e)&&this.state.modelRecovery[e])this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!0});throw r}finally{this.accountRecoveries.delete(e)}if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");let o=this.session(e);if(!o.attached||o.readOnly)throw Error(o.error?.error?.message??"Cannot resume this conversation");this.accountRevocations.delete(e),this.setApp((r)=>{let{[e]:a,...c}=r.modelRecovery;return{modelRecovery:c}}),this.confirmModel(this.state.sessionWindows[e]??"main",o)}setConfig(e,s,t,i="main"){this.configOwners.set(`${e}:${s}`,i),this.schedulingConfig.add(e);try{return super.setConfig(e,s,t)}finally{this.schedulingConfig.delete(e)}}onConfigChanged(e,s,t){super.onConfigChanged(e,s,t),this.noteModel(this.session(e));let i=this.configOwners.get(`${e}:${s}`)??"main";if(this.configOwners.delete(`${e}:${s}`),t.configOptions.some((n)=>n.configId===s&&n.category==="model"))this.confirmModel(i,this.session(e))}changeDraft(e,s){let t=Promise.allSettled(e.map((i)=>this.draftOperations.get(i)).filter((i)=>i!==void 0)).then(s);for(let i of e)this.draftOperations.set(i,t);return t}prepareDraft(e,s,t=null,i=!1,n="chat"){if(e==="chat"&&n!=="chat")throw Error("The floating chat only supports chat input");let o=++this.slotVersions[e];return this.changeDraft([e],async()=>{let r=s??(await this.refreshProjectContext(!0)).chatDirectory,a=Object.keys(this.state.draftSessions).find((l)=>this.state.draftSessions[l]===e);if(a)await this.lifecycle.admission.pending(a);let c=t??(a?d(this.session(a).configOptions):this.savedModels[e]??this.slotModels[e]),h=i?null:await this.resolveModel(c,t===null?"draft":"session");if(a&&(this.inputModes.get(a)??"chat")===n&&this.session(a).cwd===r&&(!this.draftDirectoryIntents.has(a)||this.draftDirectoryIntents.get(a)===s)&&!i&&!this.state.modelRecovery[a]&&(h===null?!d(this.session(a).configOptions)?.startsWith("gateway:"):d(this.session(a).configOptions)===h)){if(this.activateSlot(e,a,o),!this.session(a).attached)await this.replayForOwner(a,r,e);if(t!==null)this.confirmModel(e,this.session(a));return a}let p=await this.createNativeSession(s,h,e,n);try{if(a&&this.session(a).cwd===r)for(let l of this.session(a).configOptions){if(l.category==="model")continue;if(l.category==="thought_level"&&d(this.session(a).configOptions)!==d(this.session(p).configOptions)&&ko(d(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((w)=>w.configId===l.configId);if(!u||u.currentValue===l.currentValue)continue;if(S(l)&&S(u))await this.setConfig(p,l.configId,l.currentValue);else if(g(l)&&g(u)){if((v(u.options)?u.options.flatMap((m)=>m.options):u.options).some((m)=>m.value===l.currentValue))await this.setConfig(p,l.configId,l.currentValue)}}if(a)await this.deleteEmptyDraft(a)}catch(l){throw await this.deleteEmptyDraft(p),l}if(this.activateSlot(e,p,o),t!==null||i||c!==null&&c!==h)this.confirmModel(e,this.session(p));return p})}discardDraft(e){if(e!=="main"&&e!=="chat")return super.discardDraft(e);return this.changeDraft([e],async()=>{for(let[s,t]of Object.entries(this.state.draftSessions))if(t===e)await this.deleteEmptyDraft(s)})}transferDraft(e,s){return this.changeDraft(["main","chat"],async()=>{if(s==="chat"&&this.inputModes.get(e)==="image")throw Error("Image conversations must remain in the main window");if(!this.state.draftSessions[e]||this.state.draftSessions[e]===s)return;for(let[t,i]of Object.entries(this.state.draftSessions))if(i===s)await this.deleteEmptyDraft(t);this.setApp((t)=>t.draftSessions[e]?{draftSessions:{...t.draftSessions,[e]:s}}:{})})}deleteEmptyDraft(e){return this.enqueueSession(e,async()=>{if(!this.state.draftSessions[e])return;await this.delete(e),this.gatewayModels.delete(e)})}onDraftMaterialized(e){super.onDraftMaterialized(e),this.draftDirectoryIntents.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions;return{draftSessions:i}}),this.noteModel(this.session(e))}onSessionDropped(e){this.applicationRegistry.drop(e),super.onSessionDropped(e),this.inputModes.delete(e),this.inputSelections.delete(e),this.draftDirectoryIntents.delete(e),this.gatewayModels.delete(e),this.accountRevocations.delete(e),this.accountRecoveries.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions,{[e]:n,...o}=s.sessionWindows,{[e]:r,...a}=s.modelRecovery;return{draftSessions:i,sessionWindows:o,modelRecovery:a}})}fork(e,s,t){let i=typeof t==="object"?t:t===void 0?{}:{lastTurnId:t};return super.fork(e,s,i)}async forkInternal(e,s,t){let n=[...(await Promise.all([this.indexSessions(),this.indexSessions(void 0,!0)])).flat(),...this.state.sessionList,...this.state.archivedSessions],o=(this.holds(e)?this.session(e).title:null)??n.find((c)=>c.sessionId===e)?.title,r=await super.forkInternal(e,s,{...t,meta:f(y(this.gatewayModels.get(e)??null),t.meta)});await super.enqueueSession(r,async()=>this.normalizeCustomEffort(r,!1,!0),!1);let a=o??this.session(r).title;if(a)await this.renameSession(r,On(a,n.flatMap((c)=>c.title?[c.title]:[])));return r}onForked(e,s){super.onForked(e,s),this.noteModel(this.session(e))}onReplayed(e,s){super.onReplayed(e,s);let t=this.accountRevocations.get(e);if(t!==void 0&&this.accountRecoveries.get(e)!==t)this.markAccountModelsUnavailable([e]);this.noteModel(this.session(e))}setModelSelections(e){this.savedModels={...e},this.slotModels={...e}}onConfirmedModel(e){return this.confirmedModelListeners.add(e),()=>this.confirmedModelListeners.delete(e)}onSessionChanged(e){super.onSessionChanged(e);let s=this.accountRevocations.get(e.id);if(s!==void 0&&this.accountRecoveries.get(e.id)!==s&&(e.attached||!e.readOnly)){this.publishSession({...e,attached:!1,readOnly:!0});return}this.followModel("main",e),this.followModel("chat",e)}followModel(e,s){if(this.slotTargets[e]!==s.id||!s.attached||s.restoring)return;let t=d(s.configOptions);if(t!==null)this.slotModels[e]=t}activateSlot(e,s,t){if(this.slotVersions[e]!==t)return;this.bindSlot(e,s),this.followModel(e,this.session(s))}bindSlot(e,s){let t=e==="main"?"chat":"main";if(this.slotTargets[t]===s)this.slotTargets[t]=null,++this.slotVersions[t];this.slotTargets[e]=s,this.setApp((i)=>({sessionWindows:{...i.sessionWindows,[s]:e}}))}confirmModel(e,s){let t=d(s.configOptions);if(t===null)throw Error("Model selection did not return the current model");this.followModel(e,s),this.savedModels[e]=t;for(let i of this.confirmedModelListeners)i(e,t)}resolveModel(e,s="session"){return this.resolveModelOption?this.resolveModelOption(e,s):Promise.resolve(e)}onSessionModel(e){return this.modelListeners.add(e),()=>this.modelListeners.delete(e)}noteModel(e){let s=d(e.configOptions);if(s===null)return;let t=e.configOptions.find((n)=>n.category==="model"&&n.type==="select");if(t&&g(t)){let o=(v(t.options)?t.options.find((r)=>r.groupId===C.id)?.options??[]:t.options.filter((r)=>!r.value.startsWith("gateway:"))).map((r)=>({id:r.value,label:r.name}));if(JSON.stringify(o)!==JSON.stringify(this.state.nativeModels))this.setApp({nativeModels:o})}let i=t!==void 0&&g(t)&&t.options.some((n)=>("groupId"in n)&&n.groupId!==C.id&&n.options.some((o)=>o.value===s));if(i)this.gatewayModels.set(e.id,s);else this.gatewayModels.delete(e.id);if(!this.state.draftSessions[e.id])for(let n of this.modelListeners)n(e.id,s,i)}}
|
|
2
|
-
export{C,cr};
|
package/dist/chunk-1a56svgj.js
DELETED
package/dist/chunk-1fda3013.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n}from"./chunk-ty9sa6we.js";import{kn,e,b}from"./chunk-3r57tgvf.js";import{Ne}from"./chunk-6tr1bch8.js";import{Gt}from"./chunk-3qqd9x6x.js";import{$t}from"./chunk-0aeq7qy7.js";import{zt,Vt}from"./chunk-vbk36ptt.js";import{jt}from"./chunk-2fck5sy2.js";import{LockIcon as k,UnplugIcon as O}from"lucide-react";import{useMemo as S,useRef as M}from"react";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as P,EmptyDescription as z,EmptyHeader as B,EmptyTitle as I}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Ss({host:t,client:c,...s}){let m=S(()=>t.openDiff?t:{...t,openDiff:zt},[t]);return r(kn,{host:m,client:c,children:[o(L,{...s}),!t.openDiff&&o(Vt,{})]})}function L({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,recovery:g,welcome:E,children:R,rootRef:l,search:T=!0}){let{host:d,client:A}=e(),p=M(null),H=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:i}=d,f=n((a)=>a.connection==="ready"),v=n((a)=>a.historyPages[t.id]?.error),y=()=>b(d,A.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return r("div",{"data-chat-drop-zone":!0,ref:H,className:"flex h-full min-h-0 flex-col",children:[c,r("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[T&&!u&&o($t,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&o("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:r(x,{children:[o(O,{}),o(N,{children:i("conversation.stopped")}),o(C,{children:o(h,{size:"sm",variant:"outline",onClick:y,children:i("conversation.reconnect")})})]})}),u?E??o(P,{className:"flex-1",children:r(B,{children:[o(I,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(z,{children:i("conversation.welcomeDescription")})]})}):o(Gt,{session:t,timeline:m}),o(jt,{sessionId:t.id}),g??(t.readOnly?o("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:r(x,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[r("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o(k,{"aria-hidden":"true",className:"size-4 shrink-0"}),r("div",{className:"min-w-0 space-y-1",children:[o(N,{children:i("conversation.readOnlyTitle")}),o(C,{children:i("conversation.readOnlyDescription")}),v&&o("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),r("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[o(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??o(Ne,{session:t}))]}),R]})}
|
|
2
|
-
export{Ss};
|
package/dist/chunk-3kn94cpp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C}from"./chunk-0fqp48tv.js";import{wt}from"./chunk-pk931bpm.js";import{e}from"./chunk-3r57tgvf.js";import{me,S}from"./chunk-5k4ec37x.js";import{Sn,Le}from"./chunk-agx111cv.js";import{Re}from"./chunk-aq1j5vqn.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function wn({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:C.id,name:C.name,models:t===void 0?[{api_id:"",label:C.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:me(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:S(o.id,i.id),label:i.label??i.id}))}))],p=Le(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(wt,{value:{...m,label:Sn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Re,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
|
|
2
|
-
export{wn};
|
package/dist/chunk-3r57tgvf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$e}from"./chunk-ty9sa6we.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function kn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r($e,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function b(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
-
export{kn,e,b};
|
package/dist/chunk-4cbfgsg7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 ti(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,ti};
|
package/dist/chunk-5d138vq3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ze}from"./chunk-sgbn37kz.js";import{H}from"./chunk-8hygfx41.js";import{cn as n}from"cn";import{Item as i,ItemActions as q,ItemContent as K,ItemDescription as ce,ItemMedia as W,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function Z({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function _e({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(ze,"data-[active=true]:font-medium",e),...r})}function tn({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(H,{children:t})})}export{q,K,ce,W,Z,_e,tn};
|
package/dist/chunk-5k4ec37x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xi,Tn,Mn,Nn,An}from"./chunk-cpy7x31t.js";import{Un}from"./chunk-2sc2z6g5.js";var _n=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",webSearch:"deepseek",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var a=_n,p={anthropic:Xi,deepseek:Tn,openrouter:Nn,qwen:An,xai:Mn};function c(e){let n=p[e];if(!n)throw Error(`Provider ${e} has no logo`);return n}var A=a.filter((e)=>e.source!=="account").map(({source:e,...n})=>({...n,logo:c(n.id)}));function yt(e){return e!=null&&a.some((n)=>n.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(n.id)}:`))}function xt(e){let n=JSON.parse(e);if(!Array.isArray(n)||n.length===0)throw Error("Add at least one model");let t=new Set;return n.map((i)=>{if(typeof i!=="object"||i===null||Array.isArray(i))throw Error("Each model must be an object");let o=i,s=typeof o.label==="string"?o.label.trim():"",r=typeof o.api_id==="string"?o.api_id.trim():"";if(s===""||r==="")throw Error("Model label and API ID cannot be empty");if(t.has(r))throw Error("Model IDs must be unique");if(t.add(r),o.contextWindow!==void 0&&o.contextWindow!==null&&(!Number.isSafeInteger(o.contextWindow)||o.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(o.description!==void 0&&typeof o.description!=="string")throw Error("Model description must be a string");return{label:s,api_id:r,...o.contextWindow===void 0?{}:{contextWindow:o.contextWindow},...o.description===void 0?{}:{description:o.description}}})}function me(e){return[...A.filter((n)=>e.providers[n.id]!==void 0).map((n)=>({id:n.id,name:n.name,models:n.models})),...[...e.customProviders,...e.managedProviders??[]].map((n)=>({id:n.id,name:n.name,models:n.models.map((t)=>({id:t.api_id,label:t.label,...t.description==null?{}:{description:t.description}}))}))]}function S(e,n){let t=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(i)=>i.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(t)}:${encodeURIComponent(n)}`}function Js(e,n,t="session",i=yt){let o=me(n).flatMap((s)=>s.models.map((r)=>S(s.id,r.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(e!==null&&t==="session")throw Error(i(e)?"The selected ALwith account model is unavailable. Select another model before sending.":"The selected model connection is unavailable. Select another model before sending.");return o[0]??null}function ie(e,n){if(!e.regions)return null;let t=e.regions.find((i)=>i.id===n)??e.regions[0];if(!t)throw Error(`Provider ${e.id} declares no regions`);return t}function Pn(e,n){return ie(e,n)?.keyUrl??e.keyUrl??null}function In(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function Xs(e){let n=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!n)return null;let t=decodeURIComponent(n[1]),i=Un.models.find((o)=>o.slug===t);return i?{value:i.default_reasoning_level,hidden:i.supported_reasoning_levels.length===0}:null}var bt=l;function Ys(e){return bt[e]??{}}
|
|
2
|
-
export{_n,A,yt,xt,me,S,Js,ie,Pn,In,Xs,bt,Ys};
|
package/dist/chunk-5mnjkjjr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function sr(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function go(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function tt(t){return t.type==="array"}function En(t){return(tt(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
-
export{sr,go,tt,En};
|
package/dist/chunk-6tr1bch8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ar}from"./chunk-cpe6vtpe.js";import{Mr}from"./chunk-2e1tg69n.js";import{ns}from"./chunk-mhzqhd85.js";import{p,_,Ct}from"./chunk-jra2q5cx.js";import{Fe}from"./chunk-gyw21vnb.js";import{br,Cr,wr,kr,Sr}from"./chunk-vnh0jnr4.js";import{or,ir}from"./chunk-n8mexbh4.js";import{U}from"./chunk-2cfhvb3k.js";import{mo}from"./chunk-tk66t919.js";import{fo}from"./chunk-a73hd95m.js";import{n}from"./chunk-ty9sa6we.js";import{e}from"./chunk-3r57tgvf.js";import{uo,zi}from"./chunk-62kt6f1d.js";import{co}from"./chunk-y6p8xspr.js";import{r,Gi,J,mn}from"./chunk-xk6f2raz.js";import{cn}from"./chunk-rkejggyx.js";import{Ye,un}from"./chunk-8qzq9yq1.js";import{rn,an}from"./chunk-q73jne25.js";import{Fi}from"./chunk-evethx5n.js";import{gn}from"./chunk-rerm6x2f.js";import{Ui}from"./chunk-s81m6yx7.js";import{dn}from"./chunk-kvnbmt00.js";import{fn}from"./chunk-5dtpfpq5.js";import{Oi}from"./chunk-pccwq2dd.js";import{Hi}from"./chunk-064vpdm9.js";import{hn}from"./chunk-zpcd9w2t.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,S)=>{let E=new FileReader;E.onerror=()=>S(E.error),E.onload=()=>{let q=E.result;I(q.slice(q.indexOf(",")+1))},E.readAsDataURL(T)})}function Ne({session:o,onSubmit:T,onShellCommand:I,onHandOff:S,modelSelector:E,modelMenu:q,inputHeader:st,actions:Mt,leadingTools:Rt,agentControls:G=!0,placeholder:Et,children:kt,attachmentPolicy:Dt,predictions:Nt=!0,disabled:St=!1,preparing:mt=!1,allowPendingInput:Ft=!1}){let{host:F,client:O}=e(),{t:g}=F,B=w((t)=>{if(F.reportError)F.reportError(t);else console.error(t)},[F]),[dt,H]=M(()=>({text:r.get(o.id)?.text??"",revision:0})),{text:v}=dt,[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??[]),[ut,K]=M(()=>(r.get(o.id)?.apps?.length??0)>0||U(v,o.commands.map((t)=>t.name)).length>0),W=N(void 0),z=N(void 0);rt(()=>{if(d.length>0)K(!0)},[d.length]);let nt=C.some((t)=>Ye(t)&&t.pastedText.status!=="ready"),[k,ft]=M(!1),[Y,_t]=M(!1),[ot,Lt]=M(!1),it=N(null),f=N(null),ht=N(null),c=N(dt),P=w((t)=>{ht.current?.(),c.current={text:t,revision:c.current.revision+1},H(c.current)},[]),gt=w((t)=>{let i=f.current;if(i?.insertApplication){i.insertApplication(t);return}let a=c.current.text,u=i?.getTextarea()?.selectionStart??a.length;z.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)}`;z.current={text:a,apps:[]},W.current=l+t.length+1,P(ct),K(!0)},[P]),xt=w(()=>(f.current?.focus(),f.current?.getTextarea()??null),[]),$t=Oi(o,P,L,d.length>0||y.length>0||C.length>0),yt=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},H(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),bt=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=(ut||d.length>0)&&!x,b=!St&&!mt&&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),vt=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(()=>Gi(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 Pt=n((t)=>Kt(t.agent)),Ut=lt(()=>Pt&&b?async(t)=>cn((await O.fuzzyFileSearch({query:t,roots:[o.cwd],cancellationToken:null})).files):void 0,[O,Pt,b,o.cwd]),at=w((t)=>{Q((i)=>i.includes(t)?i:[...i,t])},[]);jt(()=>{f.current?.focus()},[]);let It=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;ft(!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 Tt=ns(u,d);if(Tt.length>0)A.push({type:"text",text:Tt});for(let s of i)if(Ye(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,H(c.current),Q([]),L([]),W.current=void 0,z.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),S?.(o.id,s)});else if(l===null)await O.prompt(o.id,A);else{let s=await O.prompt(o.id,A);l.accept(s)}vt();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},H(c.current),Q(h.mentions),L(h.apps??[]),r.set(o.id,h),J(o.id,()=>h.attachments);throw A}finally{ft(!1),f.current?.focus()}},[O,o.id,o.state,y,d,T,I,S,vt]),zt=()=>{O.cancel(o.id).catch(B)},Bt=w((t)=>{let i=t.code==="max_total_size"?Object.assign(Error(g("composer.imageTooLargeTitle")),{description:g("composer.imageTooLargeDescription",{mb:Fe})}):Object.assign(Error(g("composer.unsupportedAttachmentTitle")),{description:g("composer.unsupportedAttachmentDescription")});B(i)},[B,g]),Ht=lt(()=>({session:o,ready:b,inputReady:D,sending:k,textareaRef:f,draft:yt,interruptRef:ht,observeReceipts:bt,addMention:at,setAdding:_t,shellMode:x,handsFree:!x&&(T===void 0||S!==void 0)}),[o,b,D,k,yt,bt,at,T,S,x]),At=F.writeTextAttachment,wt={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||Et||(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=Ct(t.clipboardData);if(i?.apps.length){t.preventDefault();let a=t.currentTarget,u=p(i),l=_([...a.value.slice(0,a.selectionStart).split(""),...u,...a.value.slice(a.selectionEnd).split("")]);z.current={text:v,apps:[]},W.current=a.selectionStart+u.length,K(!0),L(l.apps),P(l.text);return}}if(At)un(t,o.id,g("composer.pastedTextFilename"),At)}};return m(co,{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(Ar,{attachmentPolicy:Dt,value:v,revision:c.current.revision,onValueChange:P,onSubmittedClear:()=>{c.current={text:"",revision:c.current.revision+1},H(c.current)},attachments:C,onAttachmentsChange:(t)=>J(o.id,()=>t),children:R("div",{ref:it,className:"relative",children:[G&&!ot&&m(Mr,{bashMode:I!==void 0,handleRef:f,commands:o.commands,renderSlashMenu:(t)=>m(uo,{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(()=>gt(i)),focusInput:xt}),searchFiles:Ut,onMention:at,onSearchError:B,emptyLabel:g("composer.noCommands"),fileStatusLabels:{loading:g("composer.searchingFiles"),empty:g("composer.noMatchingFiles")}},X?"inline":"textarea"),R(br,{"data-shell-mode":x||void 0,bashMode:I!==void 0,globalDrop:!0,multiple:!0,accept:qt.join(","),onError:Bt,onSubmit:It,onSubmitAsync:It,onSubmitError:B,canSubmit:()=>b&&!k&&!Y&&!nt&&(!x||!V&&v.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[kt,R(wr,{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(Fi,{mentions:y,onRemove:(t)=>Q((i)=>i.filter((a)=>a!==t))}),m(ir,{children:(t)=>Ye(t)?m(Ui,{data:t,sessionId:o.id}):m(or,{data:t,t:g})})]}),R(Cr,{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(mo,{...wt,skillIcon:F.skillIcon,skillNames:o.commands.map((t)=>t.name),applications:d,onApplicationsChange:L,initialCaret:W.current,initialUndo:z.current}):m(fo,{...wt,autoFocus:ut&&x})]}),m(kr,{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(zi,{anchorRef:it,commands:o.commands,disabled:!D,agentDisabled:!b||x,agentControls:G,open:ot,onOpenChange:Lt,focusInput:xt,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)z.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:gt}),Rt,G&&m(dn,{sessionId:o.id,options:o.configOptions,disabled:!b})]}),R(Sr,{className:"w-full min-w-0 items-center justify-end gap-1",children:[G&&m(hn,{session:o}),E??m(gn,{...q,sessionId:o.id,options:o.configOptions,disabled:!b}),Mt,m(Hi,{active:V,sending:k||mt||Y,ready:b&&!nt&&(!x||!V&&v.slice(1).trim().length>0),hasMentions:y.length>0||d.length>0,onStop:zt})]})]})})]})]})})]})})})}
|
|
4
|
-
export{Ne};
|
package/dist/chunk-8qzq9yq1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ae}from"./chunk-ffs5nkt0.js";import{r,J,pn}from"./chunk-xk6f2raz.js";var Bi=5000;function Ye(t){return"pastedText"in t}function vt(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;J(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Ae(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),pn(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function un(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Bi)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};J(e,(i)=>[...i,o]),vt(e,o,n)}
|
|
2
|
-
export{Bi,Ye,vt,un};
|
package/dist/chunk-8y838se4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m}from"./chunk-sgbn37kz.js";import{a,o}from"./chunk-qqphgn9b.js";import{R,v,f,se}from"./chunk-6tj5e7fc.js";import{N,pe,qi}from"./chunk-aepfqfad.js";import{ht}from"./chunk-trxf8c70.js";import{G,oe}from"./chunk-r1sj7c91.js";import{Te,ue}from"./chunk-mdf155e1.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as V,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as De,useSortable as le,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as re}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as we,MessageSquareIcon as ve,MoreHorizontalIcon as Ne,PencilIcon as Ie,PlusIcon as ae,StarIcon as he,Trash2Icon as ce}from"lucide-react";import{useEffect as be,useMemo as xe,useState as L}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as ee,DialogFooter as te,DialogHeader as ne,DialogTitle as ie}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Me,DropdownMenuContent as Ee,DropdownMenuGroup as ke,DropdownMenuItem as H,DropdownMenuTrigger as Le}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Re}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Pe({collectionId:l,sessionId:C,children:x}){let{attributes:w,listeners:I,setNodeRef:i,transform:p,transition:u,isDragging:M}=le({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:re.Transform.toString(p),transition:u},className:F("w-full min-w-0",M&&"opacity-50"),...w,...I,role:"group",children:x})}function Be({collection:l,children:C,onEdit:x,onConfirm:w,onNewChat:I}){let{t:i}=N(),p=ue(),u=pe(),{attributes:M,listeners:d,setNodeRef:h,transform:P,transition:T,isDragging:z}=le({id:l.id,disabled:{draggable:l.id===G,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:re.Transform.toString(P),transition:T},className:F("w-full min-w-0",z&&"opacity-50"),children:e(se,{open:!l.collapsed,onOpenChange:(c)=>u(p({type:"collapse",id:l.id,collapsed:!c})),label:oe(l,i),count:l.sessionIds.length,leading:l.id===G?e(he,{className:"size-3.5"}):e(ht,{emoji:l.emoji,onChange:(c)=>u(p({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...d,role:"group",children:c}),actions:s(Me,{children:[e(Le,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:oe(l,i)}),children:e(Ne,{className:"size-3.5"})})}),e(Ee,{children:s(ke,{children:[l.id!==G&&s(H,{onClick:x,children:[e(Ie,{}),i("collection.rename")]}),s(H,{onClick:I,children:[e(ae,{}),i("collection.newChat")]}),s(H,{onClick:()=>w("clear"),children:[e(we,{}),i("collection.clearCollection")]}),l.id!==G&&s(H,{variant:"destructive",onClick:()=>w("delete"),children:[e(ce,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Fs({renderRow:l,onSelect:C,onNewChat:x,Scroll:w=He}){let I=N(),{t:i}=I,p=ue(),u=pe(),M=a(),{collections:d,order:h}=Te(),P=o((t)=>t.sessionList),T=o((t)=>t.archivedSessions),z=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=xe(()=>new Map([...T,...P].map((t)=>[t.sessionId,t])),[T,P]),_=I.isMac??qi(),[y,E]=L(null),[k,K]=L(""),[q,O]=L(""),[S,B]=L(null),[g,J]=L(!1),de=Se(V(ye,{activationConstraint:{distance:5}}),V(Ce,{coordinateGetter:De})),j=h.flatMap((t)=>d[t].collapsed?[]:d[t].sessionIds.flatMap((n)=>{let r=U.get(n);return r&&!r.archived?[r]:[]}));be(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(_?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(n.key)-1;if(!Number.isInteger(r)||r<0||r>8||!j[r])return;n.preventDefault(),C(j[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[j,_,C]);let me=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,b=n.data.current;if(r?.type==="session"&&b!==void 0){let Q=b.type==="session"?String(b.collectionId):String(n.id);u(p({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Q,sessionId:String(r.sessionId),index:b.type==="session"?d[Q].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(n.id)!==G)u(p({type:"reorder",id:String(t.id),index:h.indexOf(String(n.id))}))},A=(t,n)=>{J(!0),u(t.then(n).finally(()=>J(!1)))};return s(ze,{children:[e(w,{children:s(R,{children:[s(f,{className:F(m,"font-normal"),onClick:()=>{E("new"),K(""),O("")},children:[e(v,{children:e(ae,{})}),e("span",{children:i("collection.newCollection")})]}),c&&s("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>u(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:de,collisionDetection:ge,onDragEnd:me,children:e(W,{items:h,strategy:X,children:e(R,{children:h.map((t)=>e(Be,{collection:d[t],onNewChat:()=>x(t),onEdit:()=>{E(t),K(d[t].name),O(d[t].emoji??"")},onConfirm:(n)=>B({id:t,type:n}),children:e(W,{items:d[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:X,children:d[t].sessionIds.map((n)=>{let r=U.get(n);if(r?.archived)return null;if(!r)return z?s("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(v,{children:e(ve,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>u(p({type:"remove",sessionId:n,collectionId:t})),children:e(ce,{})})]},n):null;return e(Pe,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(Y,{open:y!==null,onOpenChange:(t)=>{if(!t&&!g)E(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(t)=>{if(t.preventDefault(),y===null||!k.trim()||g)return;let n=y==="new"?`collection-${crypto.randomUUID()}`:y;A(p([y==="new"?{type:"create",id:n,name:k}:{type:"rename",id:n,name:k},{type:"emoji",id:n,emoji:q}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Re,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(t)=>K(t.target.value),disabled:g}),y!=="new"&&e(ht,{emoji:q,onChange:O}),s(te,{children:[e(D,{type:"button",variant:"outline",disabled:g,onClick:()=>E(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:g||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:S!==null,onOpenChange:(t)=>{if(!t&&!g)B(null)},children:s(Z,{children:[s(ne,{children:[e(ie,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:S===null?"":oe(d[S.id],i)})})]}),s(te,{children:[e(D,{variant:"outline",disabled:g,onClick:()=>B(null),children:i("collection.cancel")}),e(D,{disabled:g,onClick:()=>{if(S!==null)A(p({type:S.type,id:S.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
-
export{Fs};
|
package/dist/chunk-aepfqfad.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Br}from"./chunk-qqphgn9b.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Ks({host:o,children:t}){return s(n,{value:o,children:t})}function N(){let o=i(n),e={...Br(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function $i(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function pe(){let o=N();return(t)=>$i(o,t)}function qi(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
|
|
2
|
-
export{Ks,N,$i,pe,qi};
|
package/dist/chunk-agx111cv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C}from"./chunk-0fqp48tv.js";import{Yi,er,tr,nr}from"./chunk-cpy7x31t.js";import{_n,A,yt,S,bt}from"./chunk-5k4ec37x.js";import{Bot as p}from"lucide-react";import{jsx as l}from"react/jsx-runtime";var r={"alwith-account":Yi,chatgpt:er,minimax:tr,seedream:nr};function Ji({provider:o,className:i,...a}){let e=Object.hasOwn(r,o)?r[o]:A.find((n)=>n.id===o)?.logo??p;return l(e,{"aria-hidden":"true",...a,className:["size-4 shrink-0",i].filter(Boolean).join(" ")})}var s=new Map(_n.filter((o)=>o.source==="account").flatMap((o)=>o.models.map((i)=>[S(o.id,i.id),i.label]))),d=new Map([..._n.map((o)=>[o.id,o.source==="account"?1:2]),[C.id,0]]);function Sn(o){return o.shortLabel??o.label}function Le(o,i={}){return o.toSorted((e,n)=>(d.get(e.id)??3)-(d.get(n.id)??3)).map((e)=>{let n=e.id===C.id;return{...e,models:e.models.map((t)=>({...t,label:s.get(t.api_id)??t.label,shortLabel:t.shortLabel??bt[t.api_id]?.shortLabel,icon:i.providerIcon?.(e.id,t.api_id)??l(Ji,{provider:n?"chatgpt":e.id==="litellm"||e.id==="alwith-managed-litellm"||yt(t.api_id)?"alwith-account":e.id})}))}})}
|
|
2
|
-
export{Ji,Sn,Le};
|
package/dist/chunk-b30n56t8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function Di(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
|
|
2
|
-
export{Di};
|
package/dist/chunk-b42vv8f2.js
DELETED
package/dist/chunk-b8x98hyd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{inSessionTree as v,nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function r(s){return s!==null&&typeof s==="object"&&!Array.isArray(s)?s:null}function o(s){return typeof s==="string"&&s.length>0?s:null}function _(s){switch(s){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function Qn(s,l,m,b,S=m[s]){let f=S?.items??l.items,I=new Set(l.items.map(p).filter((t)=>t!==null)),h=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&p(e)===t)??f.find((e)=>p(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),A=f.filter((t)=>{let n=p(t);return n===null?l.items.includes(t):h.has(n)}),T=Object.values(m).filter((t)=>t.subagent?.parentId===s),u=new Map,y=(t,n,e)=>{if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown"})};for(let t of A){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.subagent),i=r(t.rawInput);if(e?.activity==="started"||i?.activity==="started"){let c=o(e?.threadId)??o(i?.agentThreadId),d=o(e?.path)??o(i?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null)}let a=r(n?.collaboration);if(a?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=a?.receiverThreadIds??i?.receiverThreadIds,d=Array.isArray(a?.agents)?a.agents.map(r):[];if(Array.isArray(c))for(let g of c){let k=o(g);if(!k)continue;let w=d.find((x)=>x?.threadId===k);y(k,o(w?.nickname)??o(w?.role),o(i?.prompt))}}}for(let t of T){let n=r(t.subagent?._meta?.codex),e=o(n?.threadId),i=o(n?.parentTurnId);if(!(e===null?void 0:u.get(e))&&(i===null||!h.has(i)))continue;let c=e??t.id;u.set(c,{key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=r(c),g=u.get(o(d?.threadId)??"");if(g)g.status=_(r(d?.state)?.status)}let i=r(n?.subagent),a=u.get(o(i?.threadId)??"");if(a&&i?.activity==="completed")a.status="completed";if(a&&i?.activity==="interrupted")a.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(b.some((e)=>v(m,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
|
|
2
|
-
export{Qn};
|
package/dist/chunk-bx11qvn9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D,Ro,$r,qn,qr,Lo,Kr}from"./chunk-jf2bxzee.js";import{t,qe,y,n}from"./chunk-ty9sa6we.js";import{Me}from"./chunk-tpdyjp90.js";import{createStore as M}from"@alwith/api/client";import{isText as k,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var v=M({entries:{}});function p(r,e){v.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=b(e),a=r.items.findLast((i)=>b(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&b(a)===s}function O(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...Lo(s._meta),...s.content.filter(k).flatMap((i)=>Lo(i._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:r,item:e,question:s,index:a}){let i=qe(),{t:l}=t(),S=Ro(e.id,a),c=JSON.stringify([r,S]),u=y(v,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),A=n((o)=>o.connection==="ready"),f=u?.draft??$r(s),q=d===void 0?u?.accepted:O(d,S)??u?.accepted,h=d!==void 0&&x(d,e),C=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!C?"unavailable":"pending",E=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let I=qn(s,f);if(!I.trim())return;let w={questionItemId:S,question:s.title,answer:I};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:qr(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:I})}catch(Q){p(c,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(g==="closed")return null;return m(Kr,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function ao({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=D(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return m(Me,{content:e.content.some((i)=>!k(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>m(R,{sessionId:r,item:e,question:i,index:l},Ro(e.id,l)))})}
|
|
2
|
-
export{ao};
|
package/dist/chunk-dd0f44xb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gr}from"./chunk-mzd9qfmj.js";import{fe}from"./chunk-j8ehajmt.js";var t={chat:gr,image:fe};function nt(n){return Object.hasOwn(t,n)}function De(n){if(!nt(n))throw Error(`Unsupported input mode: ${n}`);return t[n]}function ia(n){if(n===null)return"chat";let o=n.mode;if(!nt(o))throw Error(`Unsupported input mode: ${o}`);return t[o].parseConfig(n.config),o}
|
|
2
|
-
export{nt,De,ia};
|
package/dist/chunk-dmq2fx7g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s}from"./chunk-qqphgn9b.js";import{Vn}from"./chunk-gvqvw7ms.js";import{H}from"./chunk-8hygfx41.js";import{zn,Be}from"./chunk-6tj5e7fc.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:L,"zh-CN":z};function At(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Ue({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Be(),y=zn();g(()=>{f(n)},[n,f]);let[I,p]=D(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?At(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(E,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(Vn,{title:n?o(w,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(H,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(O,{children:[l,l&&a!==void 0&&o(M,{}),a]}):void 0})}
|
|
2
|
-
export{At,Ue};
|
package/dist/chunk-dpfjxym1.js
DELETED
package/dist/chunk-e27d47yd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ge}from"./chunk-r7paw6ba.js";import{C}from"./chunk-0fqp48tv.js";import{y}from"./chunk-ty9sa6we.js";import{ln}from"./chunk-y6p8xspr.js";import{Ne}from"./chunk-6tr1bch8.js";import{bn}from"./chunk-v042t2he.js";import{Le}from"./chunk-agx111cv.js";import{Re}from"./chunk-aq1j5vqn.js";import{xn}from"./chunk-xhbxpk0z.js";import{vn,yn}from"./chunk-gya560n0.js";import{jsx as t,jsxs as d,Fragment as u}from"react/jsx-runtime";var n;function P(){return n??=bn(),n}function f(){let o=ln();return t(yn,{sessionId:o.session.id,enabled:o.inputReady&&!o.sending&&!o.shellMode,onMention:o.addMention,onBusyChange:o.setAdding})}function Gs({client:o,providers:m,catalog:i,shellCommands:p=!0,modelMenu:l,children:a,...s}){let{session:e}=s,c=y(o.store,(r)=>r.modelRecovery[e.id]??!1);return d(u,{children:[c&&!ge(e.error?.error)&&t(xn,{client:o,session:e,providers:m??P(),catalog:i},e.id),d(Ne,{modelMenu:l??{defaultGroup:C,catalog:(r)=>Le(r,i),headerAction:t(Re,{})},...s,attachmentPolicy:vn,onShellCommand:p?(r)=>o.executeShell(e.id,r):void 0,children:[t(f,{}),a]})]})}
|
|
2
|
-
export{Gs};
|
package/dist/chunk-ep9vq47f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{M}from"./chunk-pxv38ttf.js";import{n}from"./chunk-ty9sa6we.js";import{mt}from"./chunk-rncvy5pp.js";import{x,Y}from"./chunk-p8cm3xw1.js";import{e}from"./chunk-3r57tgvf.js";import{Qn}from"./chunk-b8x98hyd.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 N}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as as}from"react/jsx-runtime";function Zn(s,l){let d=n((u)=>u.sessions),r=n((u)=>u.actions),[S,m]=N(()=>new Set);return(u)=>{let c=l?.(u)??null,i=Qn(s.id,u,d,r,s);if(i.length===0)return c;let h=`${s.id}:${u.key}`;return{active:c?.active===!0||i.some((o)=>o.status==="running"||o.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||S.has(h),content:p(as,{children:[t(Qo,{sessionId:s.id,turn:u,parent:s,tasks:i,onExpand:()=>m((o)=>o.has(h)?o:new Set([...o,h]))}),c?.content]})}}}function Qo({sessionId:s,turn:l,parent:d,tasks:r,onExpand:S}){let{host:m}=e(),u=n((a)=>a.sessions),c=n((a)=>a.actions),i=r??Qn(s,l,u,c,d),h=i.some((a)=>a.status==="running"),o=i.some((a)=>a.status==="running"||a.status==="requires_action"),[f,k]=M(`subagents:${s}:${l.key}`,o,!0),w=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 v=[...g].map(([a,E])=>`${m.t(`subagents.${a}`)} ${E}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(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":f,"aria-controls":w,onClick:()=>{if(!f)S?.();k(!f)},children:[f?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),h?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:v})]}),t("div",{id:w,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(ts,{task:a,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${a.key}`,onRead:()=>{S?.(),k(!0)}},a.key))})]})}function O(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function ts({task:s,cwd:l,stateKey:d,visible:r,onRead:S}){let{client:m,host:u}=e(),{t:c}=u,i=s.session,h=n((b)=>b.connection==="ready"),[o,f]=M(`subagent:${d}`,!1),[k,w]=N(!1),[g,v]=N(null),[a,E]=N(null),[I,Q]=N(null),[R,P]=N(!1),B=L(!1),_=L(!1),j=J(),q=i&&x(i.configOptions,"model"),z=s.title??c("subagents.untitled"),W=a?O(a,i):i,U=h&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=i?.cwd??l,T=ss(async(b)=>{if(!m.readSubagentHistory||H===null||B.current)return;_.current=!0,B.current=!0,P(!0),v(null);try{let y=await m.readSubagentHistory(H,D,b);E((K)=>K===null?y.session:O(y.session,K)),Q(y.cursor)}catch(y){v(y instanceof Error?y.message:String(y))}finally{B.current=!1,P(!1)}},[m,H,D]);es(()=>{if(r&&o&&!_.current)T(null)},[r,o,T]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");w(!0),v(null);try{await m.cancel(i.id)}catch(b){v(b instanceof Error?b.message:String(b))}finally{w(!1)}};return p("section",{"aria-label":z,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${c(`subagents.${s.status}`)}`,"aria-expanded":o,"aria-controls":j,onClick:()=>{if(!o)S();f(!o)},children:[o?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:c(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:k,"aria-label":c("subagents.cancel",{name:z}),onClick:()=>{V()},children:k?t(F,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),g&&!o&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!o,className:"min-w-0 ps-4",children:[(s.description||q)&&p("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}),q&&t("span",{className:"shrink-0",children:Y(q)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{T(a===null?null:I)},children:c("timeline.retry")})]}),R&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),I&&t(C,{variant:"ghost",size:"sm",disabled:R,onClick:()=>{T(I)},children:c("timeline.loadEarlier")}),r&&o&&(W&&W.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:W})}):!R&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:l,host:d}=e(),r=Zn(s);return t(mt,{session:s,client:l,host:d,turnWork:r})}
|
|
2
|
-
export{Zn,Qo};
|
package/dist/chunk-fjrghy92.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{nn}from"./chunk-ec4q4rw7.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function We(e){let t=r.get(e);if(!t)t=nn(e),r.set(e,t);return t}function Ls({host:e,client:t,children:n}){let s=We(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Ze(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function ut(e){let t=Ze();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=We(Ze());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Qe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
|
|
2
|
-
export{We,Ls,d,Ze,ut,i,Qe};
|
package/dist/chunk-gya560n0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g}from"./chunk-cpe6vtpe.js";import{e}from"./chunk-3r57tgvf.js";import{u}from"./chunk-kj3t4mqf.js";import{isTauri as B}from"@tauri-apps/api/core";import{getCurrentWebview as L}from"@tauri-apps/api/webview";import{useEffect as T,useLayoutEffect as M,useRef as q}from"react";import{flushSync as w}from"react-dom";var z=33554432,F=new WeakMap;function R(i){return i.split(/[/\\]/).findLast((f)=>f!=="")??i}var vn={sourcePath:(i)=>F.get(i),uniqueFiles(i,f){let h=new Set(f.map((m)=>m.sourcePath));return i.filter((m)=>{let d=F.get(m);if(d===void 0)return!0;if(h.has(d))return!1;return h.add(d),!0})}};function yn({sessionId:i,enabled:f,onMention:h,onBusyChange:m}){let d=g(),{host:A}=e(),a=q({sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A});return M(()=>{a.current={sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A}}),T(()=>{if(!B())return;let l=!1,x,C=Promise.resolve(),b=0,y=()=>!l&&a.current.sessionId===i&&a.current.enabled,P=(n)=>{let{host:o}=a.current;if(o.reportError)o.reportError(n);else console.error(n)},D=()=>P(Error(a.current.host.t("composer.dropUnavailable")));a.current.onBusyChange(!1);let k=(n)=>{b++,w(()=>a.current.onBusyChange(!0)),C=C.then(async()=>{try{let o=new Set(a.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await n())){let s=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){w(()=>a.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let p=typeof t==="string"?t:await u.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await u.readDroppedFile({path:p});if(!y())return;if(c.image===null)w(()=>a.current.onMention(c.path));else if(!o.has(c.path)){let E=Uint8Array.from(atob(c.image.data),(v)=>v.charCodeAt(0)),r=new File([E],c.name,{type:c.image.mimeType});F.set(r,c.path),o.add(c.path),w(()=>a.current.attachments.add([r]))}}catch(p){if(!l)P(Object.assign(Error(a.current.host.t("composer.dropFailed",{name:R(s)})),{description:p instanceof Error?p.message:String(p)}))}}}finally{if(b--,!l)w(()=>a.current.onBusyChange(b>0))}}).catch((o)=>{if(!l)P(o)})},W=L().onDragDropEvent((n)=>{if(l||n.payload.type!=="drop")return;let{paths:o,position:t}=n.payload,s=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!s?.closest("[data-chat-drop-zone]")||s.closest('[role="dialog"]'))return;if(!y()){D();return}k(()=>Promise.resolve(o))}),S=(n)=>{let o=n.target;if(!(o instanceof Element)||!o.matches("[data-chat-input]"))return;if(!o.closest("[data-chat-drop-zone]")||o.closest('[role="dialog"]'))return;let t=n.clipboardData;if(!t)return;let s=[...t.files??[]],p=[...t.items??[]];if(!(t.types.includes("Files")&&!s.length&&!p.some((r)=>r.type.startsWith("image/")))&&!s.some((r)=>!r.type.startsWith("image/"))&&!p.some((r)=>r.kind==="file"&&!r.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((r)=>t.types.includes(r)&&/^file:\/\//m.test(t.getData(r))))return;if(n.preventDefault(),n.stopPropagation(),!y()){D();return}let E=u.clipboardFilePaths().then((r)=>({value:r}),(r)=>({error:r}));k(async()=>{let r=await E;if("error"in r)throw r.error;let v=r.value;if(v.length)return v;if(s.length)return s;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",S,!0),W.then((n)=>{if(l)n();else x=n}).catch((n)=>{if(!l)P(n)}),()=>{l=!0,document.removeEventListener("paste",S,!0),x?.()}},[i]),null}
|
|
2
|
-
export{vn,yn};
|
package/dist/chunk-gyw21vnb.js
DELETED
package/dist/chunk-j8ehajmt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ee}from"./chunk-tmec4by7.js";import{_t}from"./chunk-nh56sb8e.js";var fe={persistConfig:!0,nativeTools:{imageGeneration:!1},applicationContext:_t,parseConfig(e){if(typeof e.model!=="string"||typeof e.size!=="string"||Object.keys(e).some((t)=>t!=="model"&&t!=="size"))throw Error("Invalid image input config");let o={model:e.model,size:e.size};return ee(o),o},routePrompt(e){return e.image()}};
|
|
2
|
-
export{fe};
|
package/dist/chunk-mhzqhd85.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{xe}from"./chunk-ndfyste3.js";function w(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ot(e){if(!e.includes("app://"))return[];let n=xe(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=w(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function ns(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function os(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
-
export{w,Ot,Pa,ns,os};
|
package/dist/chunk-mz90kcyd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{O}from"./chunk-tftfggte.js";import{Ce}from"./chunk-m8tt5bf9.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function hi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(O,{text:t.content,streaming:!1})});if(!n(t))return null;return e(Ce,{entries:t.entries})}
|
|
2
|
-
export{hi};
|
package/dist/chunk-mzd9qfmj.js
DELETED
package/dist/chunk-ngvdcqmt.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-ty9sa6we.js";import{Go,zo}from"./chunk-kqekfj3v.js";import{D}from"./chunk-jf2bxzee.js";import{Pt}from"./chunk-b42vv8f2.js";import{io}from"./chunk-gds55pjg.js";import{Ii,de,ft,Mi}from"./chunk-cvn9zbbc.js";import{eo}from"./chunk-6cxvfwpe.js";import{Me}from"./chunk-tpdyjp90.js";import{to}from"./chunk-17gs9pbn.js";import{ao}from"./chunk-bx11qvn9.js";import{bi}from"./chunk-t50b1s7h.js";import{vi}from"./chunk-tky568fy.js";import{hi}from"./chunk-mz90kcyd.js";import{xi}from"./chunk-r4nz54dh.js";import{no,oo}from"./chunk-6pwssh9v.js";import{gt}from"./chunk-rb4p3h5b.js";import{codexMessageError as q,codexTurnError as z,isContentEntry as me,isEmbeddedResource as Z,isImage as ee,isResourceLink as le,isText as ce,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{SparklesIcon as ue}from"lucide-react";import{Fragment as X,memo as pe,useEffect as fe,useState as ye}from"react";import{jsx as i,jsxs as m,Fragment as A}from"react/jsx-runtime";function Y(s){if(ee(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(Z(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function he({item:s}){let{t:n}=t(),l=s.status==="in_progress",[o,g]=ye(()=>Date.now()-s.at>=1e4);return fe(()=>{if(!l)return;let a=Math.max(0,s.at+1e4-Date.now());if(g(a===0),a===0)return;let h=setTimeout(()=>g(!0),a);return()=>clearTimeout(h)},[s.id,s.at,l]),m("div",{className:"codex-context-compaction",children:[i(ue,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?n("stream.codex.contextCompacted"):s.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:s,entry:n,terminals:l,streaming:o,streamingThoughtId:g}){let{t:a}=t();switch(n.kind){case"activity":return i(eo,{sessionId:s,items:n.items,terminals:l,streamingThoughtId:g});case"text":return D(n.item._meta).length>0?i(ao,{sessionId:s,item:n.item}):i(Me,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return i(hi,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(no,{children:[i("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&i("div",{children:n.item.error})]});return i(he,{item:n.item})}}function ke({sessionId:s,turn:n,terminals:l,active:o,blocked:g=!1,continued:a=!1,edits:h=n.edits,activityItems:M=n.items,workStartedAt:te=n.startedAt,isLast:F,error:k,interrupted:L,retry:P,retrying:p,extraWork:d=null,answerActions:G,footer:ne}){let{t:c}=t(),b=n.errors.map((e)=>{let r=q(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let E=P?.turnId===ge(e)?P:void 0;return i(oo,{error:r,retry:E},`${e.id}:${E?.delaySeconds??"manual"}`)});if(F&&k!==null&&!n.errors.some((e)=>{let r=q(e);return r!==null&&r.stopReason===k.stopReason&&z(r).message===z(k).message}))b.push(i(oo,{error:k},"current-run-error"));let x=b.length>0?i("div",{className:"codex-turn-errors",children:b}):null,C=n.items.filter(io);if(d===null&&C.length>0&&C.length===n.items.length)return m(A,{children:[i(eo,{sessionId:s,items:C,terminals:l,streamingThoughtId:null}),x]});let T=n.work,w=T.length>0&&T.every((e)=>e.kind==="compaction");if(d===null&&(Ii(n)||w&&n.final.length===0))return m(A,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),x]});let O=ft(n),W=n.final.filter((e)=>D(e._meta).length===0).map((e)=>de({...e,content:to(e.content,n.items)})).join(`
|
|
2
|
-
`),I=o?null:gt(n,"assistant"),B=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),H=new Set(n.final.flatMap((e)=>e.content.map(Y).filter((r)=>r!==null))),f=n.items.flatMap((e)=>{if(!Pt(e))return[];return e.content.filter(me).flatMap((r,E)=>{let u=r.content,oe=ee(u),ae=le(u)||Z(u)&&"blob"in u.resource;if(!oe&&!ae)return[];let _=Y(u);if(_!==null){if(H.has(_))return[];H.add(_)}return[{key:`${e.id}:${E}`,block:u}]})}),K=n.final.some((e)=>D(e._meta).length===0&&e.content.some((r)=>!ce(r)||r.text.trim().length>0)),ie=B.length>0||f.length>0||w||K||n.final.some((e)=>D(e._meta).length>0),v=n.items.findIndex((e)=>n.final.includes(e)),R=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),Q=T.filter((e)=>v===-1||R(e)<v),se=T.filter((e)=>v!==-1&&R(e)>v),re=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...se.map((e)=>({kind:"work",entry:e,index:R(e)}))].toSorted((e,r)=>e.index-r.index),V=!o&&!a&&(W.trim().length>0?i(Go,{text:W,isMostRecentTurn:F,time:I,afterCopy:G}):m("div",{className:"flex items-center gap-0.5",children:[G,I&&i("span",{className:"codex-user-time ms-1",title:I.full,children:I.short})]})),y=xi({...n,items:M},{running:o,blocked:g,retrying:p!==void 0}),j=y.kind==="reasoning"?y.ownerKey??null:null,J=y.kind==="thinking",S=Mi({...n,items:M}),U=o&&!K||d?.active===!0;return m(A,{children:[i(zo,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:U,defaultExpanded:U||d?.defaultExpanded===!0||!n.replayed&&(L||O),...S,durationMs:d?.active?void 0:S.durationMs,startedAt:S.startedAt??te,loading:(J||y.kind==="working")&&n.work.length===0&&d===null,loadingLabel:y.kind==="working"?c("stream.codex.working"):void 0,work:[...a||w?[]:Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:j},e.key)),...d===null?[]:[i(X,{children:d.content},"additional-work")]],answer:ie||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||w)&&Q.map((e)=>i(N,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),re.map((e)=>{if(e.kind==="work")return i(N,{sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:j},e.entry.key);let r=e.item;return m(X,{children:[D(r._meta).length>0?i(ao,{sessionId:s,item:r}):i(Me,{content:to(r.content,n.items),messageId:r.id,streaming:o}),r===n.final.at(-1)&&f.length===0&&V]},r.id)}),B.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":c(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&i(vi,{startedAt:e.at}),!o&&c("timeline.imageStopped")]})]},e.id)),f.length>0&&i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:f.map((e)=>i(Me,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),(n.final.length===0||f.length>0)&&V]}):null,footer:m(A,{children:[J&&n.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:c("message.thinking")})}),ne,h.length>0&&!o&&!a&&i(bi,{items:h}),L&&!O&&i("div",{className:"codex-interrupted-turn",role:"status",children:c("timeline.interrupted")}),!o&&x]})}),o&&p!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?c("timeline.capacityReconnecting"):c("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&x]})}var fi=pe(ke);
|
|
3
|
-
export{fi};
|
package/dist/chunk-q73jne25.js
DELETED
package/dist/chunk-sy1rf5m0.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Wn}from"./chunk-p79keq5q.js";import{be}from"./chunk-phsvgv0f.js";import{ds}from"./chunk-xsn2g4kk.js";import{w,Ot}from"./chunk-mhzqhd85.js";import{t}from"./chunk-ty9sa6we.js";import{pi,mi}from"./chunk-5vajeawb.js";import{F}from"./chunk-rkks48gw.js";import{de}from"./chunk-cvn9zbbc.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 ui=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=mi(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
|
-
${e.text}`).join(`
|
|
3
|
-
`):de(n),l=n.content.filter(x),d=new Set(Ot(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=w(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=pi(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(F,{block:e},`${n.id}:${s}`))}),i(Wn,{value:{names:u,icon:p.skillIcon},children:i(ds,{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(be,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
|
-
export{ui};
|
package/dist/chunk-t7xbh36h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Zs={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Qi(e){return[...e].toSorted((o,n)=>(Zs[o.kind]??99)-(Zs[n.kind]??99))}function qa(e){return e==="allow_once"||e==="allow_always"}function Ka(e){return e==="allow_always"||e==="reject_always"}
|
|
2
|
-
export{Zs,Qi,qa,Ka};
|
package/dist/chunk-tk66t919.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{U}from"./chunk-2cfhvb3k.js";import{yo,p,_,Rn,xo,Ct}from"./chunk-jra2q5cx.js";import{ar,ho,lr,vo}from"./chunk-zr8yk5np.js";import{kt,St,Ln}from"./chunk-36ttr22w.js";import{he,g}from"./chunk-cpe6vtpe.js";import{cn as J}from"cn";import{forwardRef as q,useImperativeHandle as z,useLayoutEffect as M,useRef as d}from"react";import{jsx as j}from"react/jsx-runtime";var O=(r,E)=>r.text===E.text&&JSON.stringify(r.apps)===JSON.stringify(E.apps),mo=q((r,E)=>{let I=he(),L=g(),s=d(null),N=d(null),a=d(_(p({text:I.textInput.value,apps:r.applications}))),f=d({start:r.initialCaret??p(a.current).length,end:r.initialCaret??p(a.current).length}),h=d(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),S=d([]),H=d(""),R=d(r.skillIcon),b=d(!1),x=d(!1),P=d(null),c=d({props:r,controller:I,attachments:L});c.current={props:r,controller:I,attachments:L};let m=()=>{if(s.current&&document.activeElement===s.current)f.current=lr(s.current,a.current.apps,f.current);return f.current},w=()=>{let e=s.current;if(!e)return;let t={...f.current};e.focus(),f.current=t,vo(e,t)},T=()=>({...a.current,selection:m()}),D=(e,t)=>{if(!s.current)return;if(ar(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),R.current=c.current.props.skillIcon,H.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),f.current=t,document.activeElement===s.current)vo(s.current,t)},C=(e,t,n=!0,l=!0)=>{if(l&&!O(a.current,e)){if(h.current.push(P.current??T()),h.current.length>100)h.current.shift();S.current=[]}if(P.current=null,a.current=e,f.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},y=(e)=>{let t=m(),n=p(a.current),l=p(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((k)=>typeof k==="string"?[]:[k.id])),u=l.filter((k)=>typeof k==="string"||!i.has(k.id)),o=_([...n.slice(0,t.start),...u,...n.slice(t.end)]),B=t.start+u.length;C(o,{start:B,end:B})},A=(e)=>{let n=(e?h.current:S.current).pop();if(!n)return;(e?S.current:h.current).push(T()),C({text:n.text,apps:n.apps},n.selection,!0,!1)},v=()=>{if(!s.current)return;let e=_(ho(s.current,a.current.apps)),t=m();if(b.current)return;let n=Ln(e.text),l=n===e.text?e:_(p({text:n,apps:e.apps}));C(l,t,n!==e.text)};M(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=_(p({text:i,apps:a.current.apps})),D(a.current,f.current)}},selectionStart:{configurable:!0,get:()=>Rn(p(a.current),m().start)},selectionEnd:{configurable:!0,get:()=>Rn(p(a.current),m().end)},setSelectionRange:{configurable:!0,value:(i,u)=>{let o=p(a.current);f.current={start:xo(o,i),end:xo(o,u)},D(a.current,f.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),N.current=e,D(a.current,f.current),w();let n=()=>{m()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(b.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),A(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),y({text:`
|
|
2
|
-
`,apps:[]});else P.current=T()};return e.addEventListener("beforeinput",l),e.addEventListener("change",v),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",v),document.removeEventListener("selectionchange",n),N.current=null}},[]),M(()=>{if(b.current)return;let e=_(p({text:I.textInput.value,apps:r.applications}));if(O(e,a.current)&&H.current===JSON.stringify(r.skillNames??[])&&R.current===r.skillIcon)return;let t=m();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),z(E,()=>({focus:w,getTextarea:()=>N.current,isComposing:()=>b.current||x.current,resetHeight:()=>{h.current=[],S.current=[]},insertInvocation:(e)=>{w(),y({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(w(),a.current.apps.some((t)=>t.id===e.id))return;y({text:"",apps:[{...e,offset:0}]})}}),[]);let F=(e)=>{if(b.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),A(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)y({text:`
|
|
3
|
-
`,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=m(),n=p(a.current);if(t.start!==t.end){e.preventDefault(),y({text:"",apps:[]});return}let l=Rn(n,t.start),i=U(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);C(_([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let u=e.key==="Backspace"?t.start-1:t.start;if(u>=0&&u<n.length&&typeof n[u]!=="string")e.preventDefault(),C(_([...n.slice(0,u),...n.slice(u+1)]),{start:u,end:u});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o)e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},K=(e)=>{let t=m();if(t.start===t.end)return;let n=p(a.current).slice(t.start,t.end),l=_(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(yo,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)y({text:"",apps:[]})};return j("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:J("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:v,onKeyDown:F,onCompositionStart:()=>{P.current=T(),b.current=!0,x.current=!1},onCompositionEnd:()=>{b.current=!1,v(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=kt(e.clipboardData.items);if(e.preventDefault(),t.length){L.add(t);return}if(n&&!St(e.clipboardData.items))return;y(Ct(e.clipboardData)??{text:Ln(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:K,onCut:K,onDrop:(e)=>{e.preventDefault()}})});mo.displayName="PromptInputInline";
|
|
4
|
-
export{mo};
|
package/dist/chunk-ty9sa6we.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{vs}from"./chunk-tftfggte.js";import{createContext as s,useContext as o,useSyncExternalStore as m}from"react";import{jsx as l}from"react/jsx-runtime";var u=s(null),c=s(null),Ko=s(null);function ae(){return o(Ko)}function $e({host:e,client:i,children:r}){return l(vs,{host:e,children:l(u,{value:e,children:l(c,{value:i,children:r})})})}function t(){let e=o(u);if(e===null)throw Error("Timeline host is missing");return e}function qe(){let e=o(c);if(e===null)throw Error("Timeline client is missing");return e}function y(e,i){return m((r)=>e.subscribe(r),()=>i(e.getState()),()=>i(e.getState()))}function n(e){let i=qe();return y(i.store,e)}function Wo(){return o(u)!==null}function le(e,i){if(e.reportError)e.reportError(i);else console.error(i)}
|
|
2
|
-
export{Ko,ae,$e,t,qe,y,n,Wo,le};
|
package/dist/chunk-vnh0jnr4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Tr,Fe}from"./chunk-gyw21vnb.js";import{Pr}from"./chunk-3a3ecayr.js";import{Io,To,Tt,Mt,Mo}from"./chunk-cpe6vtpe.js";import{cn as P}from"cn";import{ArrowUpIcon as ge,Loader2Icon as be,SquareIcon as ve,XIcon as he}from"lucide-react";import{Children as Y,useCallback as h,useEffect as F,useMemo as Pe,useRef as M,useState as Ie}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as xe,InputGroupAddon as ee,InputGroupButton as te}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Le}from"react/jsx-runtime";function Z(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var br=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:re,globalDrop:C,syncHiddenInput:U,maxFiles:H,maxFileSize:k,onError:b,onSubmit:ne,children:oe,...se})=>{let s=Mt(),l=!!s,ie=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),D=M(!1),[ae,N]=Ie([]),c=l?s.attachments.files:ae,B=M(c);B.current=c;let ue=h(()=>{x.current?.click()},[]),O=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),W=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),le=h((e)=>{let r=[...e],t=r.filter((i)=>O(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>k?i.size<=k:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}N((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof H==="number"?Math.max(0,H-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let Q=[];for(let T of _){let V=I?.sourcePath(T);Q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:W(T),filename:T.name,size:T.size,lastModified:T.lastModified,...V===void 0?{}:{sourcePath:V}})}return[...i,...Q]})},[I,W,O,H,k,b]),pe=h((e)=>N((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),me=h(()=>N((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),G=l?s.attachments.add:le,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(Tr(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${Fe}MB.`});return}}G(r)},[c,G,b]),j=l?s.attachments.remove:pe,R=l?s.attachments.clear:me,q=l?s.attachments.openFileDialog:ue;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(U&&x.current&&c.length===0)x.current.value=""},[c,U]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of B.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let ce=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},X=Pe(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:j,clear:R,openFileDialog:q,fileInputRef:x}),[c,L,j,R,q]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let J=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(D.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Z(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Z(t)===n)t.reset();R()};D.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await Pr(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await ne({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{D.current=!1}},de=(e)=>{e.preventDefault(),J(e).catch(y)},fe=h((e)=>{if(!e.trim())return;if(l&&s)ye(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),K=a(To.Provider,{value:()=>J(null),children:Le(Io.Provider,{value:fe,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:re,onChange:ce,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:de,ref:A,"data-tour":"chat-input",...se,children:a(xe,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ie&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:oe})})]})});return l?a(Tt.Provider,{value:X,children:K}):a(Mo.Provider,{value:X,children:K})};function Cr({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function wr({className:u,...o}){return a(ee,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function kr({className:u,...o}){return a(ee,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Sr({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var z=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||Y.count(y.children)<=1?"icon-xs":"xs";return a(te,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||Y.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},_r=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ge,{className:"size-4"});if(d==="submitted")g=a(be,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(ve,{className:"size-3 fill-current"});else if(d==="error")g=a(he,{className:"size-4"});return a(te,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
|
|
2
|
-
export{br,Cr,wr,kr,Sr,z,_r};
|
package/dist/chunk-w368gk92.js
DELETED
package/dist/chunk-x1mzrhtd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Oe}from"./chunk-r8pm74zf.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function Rr({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:Oe(t)}):null}function Lr({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Rr,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Gn({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Lr,{label:t,shortcut:o}):t})]})}
|
|
2
|
-
export{Rr,Lr,Gn};
|
package/dist/chunk-xhbxpk0z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{y}from"./chunk-ty9sa6we.js";import{e}from"./chunk-3r57tgvf.js";import{me,S}from"./chunk-5k4ec37x.js";import{Ee}from"./chunk-v042t2he.js";import{wn}from"./chunk-3kn94cpp.js";import{useRef as E,useState as c}from"react";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as s,jsxs as b}from"react/jsx-runtime";function xn({client:l,session:i,providers:w,catalog:P}){let{host:n}=e(),m=(o)=>n.reportError?n.reportError(o):console.error(o),a=Ee(w,m),[p,u]=c(!1),d=E(!1),[f,v]=c(null),g=y(l.store,(o)=>o.connection==="ready"),x=p||!g||i.restoring,[r,M]=c(null),C=y(l.store,(o)=>o.nativeModels),h=r!==null&&(C.some((o)=>o.id===r)||a!==null&&me(a).some((o)=>o.models.some((t)=>S(o.id,t.id)===r)));async function k(o){if(d.current||!g||i.restoring)return;d.current=!0,M(o),v(null),u(!0);try{await l.resumeModel(i.id,o)}catch(t){v(t instanceof Error?t.message:String(t)),m(t)}finally{d.current=!1,u(!1)}}return b("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":p,"data-model-recovery":!0,children:[b("div",{className:"min-w-0 flex-1 basis-full",children:[s("p",{children:n.t("provider.managed.reselect")}),f&&s("p",{role:"alert",className:"text-destructive break-words",children:f})]}),s("fieldset",{disabled:x,children:s(wn,{snapshot:a,model:r,onChange:M,nativeModels:C,catalog:P})}),s(B,{size:"sm",disabled:x||!h,onClick:()=>{if(r!==null)k(r)},children:n.t("provider.managed.resume")})]})}
|
|
2
|
-
export{xn};
|
package/dist/chunk-y6p8xspr.js
DELETED
package/dist/chunk-y85askf9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o}from"./chunk-qqphgn9b.js";import{je,te,ye}from"./chunk-jz7dnk88.js";import{useEffect as S,useMemo as f}from"react";function xa(s){let c=te((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")&&je(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=te((i)=>i.activitySeen),r=ye();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
|
|
2
|
-
export{xa};
|
package/dist/chunk-yc47rq4m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c}from"./chunk-tftfggte.js";import{Bt,fs}from"./chunk-5hk14ksr.js";import{ae}from"./chunk-ty9sa6we.js";import{Kn,F}from"./chunk-rkks48gw.js";import{useEffect as g,useState as d}from"react";import{jsx as o,jsxs as y}from"react/jsx-runtime";var l=/\.(?:png|jpe?g|gif|webp|bmp|svg|pdf|docx?|xlsx?|pptx?|csv|tsv|zip|tar|gz|mp[34]|wav|ogg|webm|mov)(?:[?#].*)?$/i,u=/\.(?:png|jpe?g|gif|webp|bmp|svg)(?:[?#].*)?$/i;function es(e){if(e.type!=="link"&&e.type!=="image"||e.href===void 0)return!1;let r=e.href;return!/^www\.|^\/\//i.test(r)&&!/^[a-z][a-z\d+.-]*:/i.test(r.replace(/^file:/i,""))&&l.test(r)}function h({uri:e,directory:r}){let t=c(),[i,s]=d(),n=Bt(e,r),p=n!==null&&t.loadImage!==void 0&&fs(r,n);if(g(()=>{if(!p||n===null||t.loadImage===void 0)return;let m=!1;return t.loadImage(n).then((a)=>{let f=/^data:([^;,]+);base64,(.*)$/s.exec(a);if(!f)throw Error("The image preview is not a data URL");if(!m)s({uri:e,mimeType:f[1],data:f[2]})},(a)=>{if(!m)s({uri:e,error:a instanceof Error?a.message:String(a)})}),()=>{m=!0}},[t,n,p,e]),i?.uri!==e)return null;if("error"in i)return o("div",{role:"alert",className:"text-muted-foreground text-xs",children:i.error});return o(F,{block:{type:"image",uri:e,data:i.data,mimeType:i.mimeType}})}function ts({links:e}){let r=ae();return o("div",{className:"flex min-w-0 flex-col gap-2","data-wide-markdown-block":"true",children:e.map((t,i)=>{let s=t.text||Kn(t.href);return y("div",{className:"min-w-0",children:[r!==null&&u.test(t.href)&&o(h,{uri:t.href,directory:r}),o(F,{block:{type:"resource_link",uri:t.href,name:s}})]},`${i}-${t.href}`)})})}
|
|
2
|
-
export{es,ts};
|
package/dist/chunk-z6zsmpyz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s,a,o,h}from"./chunk-qqphgn9b.js";import{V}from"./chunk-ykz0h1r0.js";import{R,se,Ge}from"./chunk-6tj5e7fc.js";import{je,te,ye}from"./chunk-jz7dnk88.js";import{Or}from"./chunk-1a56svgj.js";import{Ve}from"./chunk-heqa4swe.js";import{Ue}from"./chunk-dmq2fx7g.js";import{Oe}from"./chunk-r8pm74zf.js";import{jn}from"./chunk-smf7c649.js";import{Dr}from"./chunk-ayhxrzsq.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function ba({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let N=s(),{t:L}=N,m=o((t)=>t.runStates),S=o((t)=>t.drafts),u=o((t)=>t.sessionList),v=te((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&je({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=te((t)=>t.activityCollapsedGroups),n=ye(),x=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),I=(t)=>{if(b?.(t))return;d(t)},D=Dr();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Or(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=x[r-1];if(!y)return;e.preventDefault(),I(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&D?c(G,{children:Oe(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(R,{children:g.map((t)=>t.key==="foreground"?c(R,{children:t.rows.map(A)},t.key):c(se,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);n({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:N,actions:L,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=jn(i.sessionId,d);return P(H,{children:[c(Ge,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Ue,{sessionRow:i,actions:L}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:N,hint:S,actions:c(Ve,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((n)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(V,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
-
export{ba};
|