@alwith/module-chat 0.6.26 → 0.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-host.js +1 -1
- package/dist/agent/client.d.ts +1 -4
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.d.ts +3 -8
- 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-v96vkrw2.js → chunk-064vpdm9.js} +2 -2
- package/dist/{chunk-7ng6qs9c.js → chunk-0aeq7qy7.js} +2 -2
- package/dist/chunk-0fqp48tv.js +2 -0
- package/dist/{chunk-4g1s7gdh.js → chunk-0fs2k5fe.js} +2 -2
- package/dist/{chunk-1wr1ef9x.js → chunk-0q22f9vw.js} +2 -2
- package/dist/{chunk-fwghjmd1.js → chunk-0xshzqb6.js} +2 -2
- package/dist/{chunk-qceex4vv.js → chunk-17gs9pbn.js} +2 -2
- package/dist/chunk-1a56svgj.js +2 -0
- package/dist/{chunk-7zww33h8.js → chunk-1fda3013.js} +2 -2
- package/dist/{chunk-qzerhkyb.js → chunk-1ffpsz44.js} +3 -3
- package/dist/{chunk-m68t534g.js → chunk-1gtmvxdr.js} +2 -2
- package/dist/chunk-2c2a1wvg.js +2 -0
- package/dist/{chunk-4vayk46h.js → chunk-2cfhvb3k.js} +2 -2
- package/dist/{chunk-jvy6p83k.js → chunk-2e1tg69n.js} +3 -3
- package/dist/{chunk-84ncszbf.js → chunk-2fck5sy2.js} +2 -2
- package/dist/{chunk-xwwjj45a.js → chunk-2sc2z6g5.js} +2 -2
- package/dist/{chunk-eynwjzqp.js → chunk-2v531sbv.js} +2 -2
- package/dist/{chunk-h5mdgrq6.js → chunk-2zy75522.js} +2 -2
- package/dist/chunk-36ttr22w.js +2 -0
- package/dist/{chunk-ha9n1k24.js → chunk-38bpmgjd.js} +2 -2
- package/dist/{chunk-bbrx6m7n.js → chunk-38psn07c.js} +2 -2
- package/dist/{chunk-z6x70w62.js → chunk-3a3ecayr.js} +2 -2
- package/dist/chunk-3kn94cpp.js +2 -0
- package/dist/{chunk-7rtwekkz.js → chunk-3nbpd0jt.js} +2 -2
- package/dist/{chunk-53r6pr16.js → chunk-3qqd9x6x.js} +2 -2
- package/dist/chunk-3r57tgvf.js +2 -0
- package/dist/{chunk-axvjn527.js → chunk-42ebtw00.js} +2 -2
- package/dist/chunk-4cbfgsg7.js +2 -0
- package/dist/{chunk-gdtpwbqn.js → chunk-5d138vq3.js} +1 -1
- package/dist/{chunk-yryg27yy.js → chunk-5dtpfpq5.js} +2 -2
- package/dist/{chunk-exrd2xzz.js → chunk-5hk14ksr.js} +2 -2
- package/dist/{chunk-3z86hy2s.js → chunk-5k4ec37x.js} +2 -2
- package/dist/chunk-5mnjkjjr.js +2 -0
- package/dist/{chunk-masqfje4.js → chunk-5vajeawb.js} +2 -2
- package/dist/{chunk-xnbvdqnt.js → chunk-62kt6f1d.js} +2 -2
- package/dist/{chunk-0e5dx357.js → chunk-6bhfdsyz.js} +2 -2
- package/dist/{chunk-pebkk426.js → chunk-6cxvfwpe.js} +2 -2
- package/dist/{chunk-7s7cevjh.js → chunk-6pwssh9v.js} +2 -2
- package/dist/chunk-6tj5e7fc.js +2 -0
- package/dist/chunk-6tr1bch8.js +4 -0
- package/dist/{chunk-j4w2hbbe.js → chunk-6xap6hvz.js} +2 -2
- package/dist/{chunk-ag2t01q7.js → chunk-6yaxjcnj.js} +3 -3
- package/dist/{chunk-88ysxbdh.js → chunk-78vckhxt.js} +2 -2
- package/dist/{chunk-64apxzn7.js → chunk-7rgcj1w2.js} +2 -2
- package/dist/{chunk-3hsft68c.js → chunk-7sr8weqn.js} +2 -2
- package/dist/{chunk-4a4awnss.js → chunk-7zafb413.js} +2 -2
- package/dist/{chunk-bgnxw313.js → chunk-81hv0s07.js} +2 -2
- package/dist/chunk-8qzq9yq1.js +2 -0
- package/dist/{chunk-ne4b53kn.js → chunk-8v53bkyr.js} +2 -2
- package/dist/chunk-8y838se4.js +2 -0
- package/dist/{chunk-ma6ycen5.js → chunk-9kz3pxt9.js} +2 -2
- package/dist/{chunk-x49qjrbk.js → chunk-9q6hz47j.js} +2 -2
- package/dist/{chunk-h1kvdf3t.js → chunk-a4y4bsve.js} +2 -2
- package/dist/{chunk-qa9p0a64.js → chunk-a73hd95m.js} +3 -3
- package/dist/chunk-aepfqfad.js +2 -0
- package/dist/chunk-agx111cv.js +2 -0
- package/dist/{chunk-vmfhnkxj.js → chunk-aq1j5vqn.js} +2 -2
- package/dist/{chunk-xqb4thy8.js → chunk-at75m9hq.js} +2 -2
- package/dist/{chunk-tr0bmqn9.js → chunk-ayhxrzsq.js} +2 -2
- package/dist/{chunk-30nre2gw.js → chunk-b2vtrd8n.js} +2 -2
- package/dist/{chunk-gpv1dc5y.js → chunk-b30n56t8.js} +2 -2
- package/dist/chunk-b42vv8f2.js +2 -0
- package/dist/chunk-b6p0y68h.js +2 -0
- package/dist/{chunk-6e84zbgs.js → chunk-b8x98hyd.js} +2 -2
- package/dist/chunk-bx11qvn9.js +2 -0
- package/dist/{chunk-8wk3e4z7.js → chunk-c4awmmwt.js} +2 -2
- package/dist/{chunk-3q8vw3wb.js → chunk-ccxsf02q.js} +2 -2
- package/dist/{chunk-dx5hh359.js → chunk-cf7cw2tj.js} +3 -3
- package/dist/{chunk-erp1g3as.js → chunk-ckja1ppp.js} +2 -2
- package/dist/{chunk-tgnftxyb.js → chunk-cpe6vtpe.js} +2 -2
- package/dist/{chunk-dd9k5bbt.js → chunk-cpy7x31t.js} +2 -2
- package/dist/{chunk-syjt7y4v.js → chunk-cvn9zbbc.js} +2 -2
- package/dist/chunk-dd0f44xb.js +2 -0
- package/dist/{chunk-brv52tgj.js → chunk-djd3sjp9.js} +2 -2
- package/dist/{chunk-vqby71fp.js → chunk-dmq2fx7g.js} +2 -2
- package/dist/{chunk-vdt7cp6c.js → chunk-dnh1e01b.js} +2 -2
- package/dist/chunk-dpfjxym1.js +2 -0
- package/dist/{chunk-ps408sxd.js → chunk-dyks7e24.js} +2 -2
- package/dist/{chunk-5bhp61sd.js → chunk-dzpbbys1.js} +2 -2
- package/dist/{chunk-pqz2471h.js → chunk-e04g26qm.js} +2 -2
- package/dist/chunk-e27d47yd.js +2 -0
- package/dist/{chunk-cans04tz.js → chunk-eavqh5fb.js} +3 -3
- package/dist/{chunk-55m88zbv.js → chunk-ec4q4rw7.js} +2 -2
- package/dist/chunk-ep9vq47f.js +2 -0
- package/dist/{chunk-d582db8v.js → chunk-evethx5n.js} +2 -2
- package/dist/{chunk-q3s59jyn.js → chunk-evsyhxz1.js} +2 -2
- package/dist/{chunk-r5f77gtx.js → chunk-f4h84pav.js} +2 -2
- package/dist/{chunk-dheg4bs2.js → chunk-ffs5nkt0.js} +2 -2
- package/dist/chunk-fjrghy92.js +2 -0
- package/dist/{chunk-84p483n0.js → chunk-fqdtx7tp.js} +2 -2
- package/dist/{chunk-0jg7hgp5.js → chunk-ga265p00.js} +2 -2
- package/dist/{chunk-95ywdfe0.js → chunk-gds55pjg.js} +2 -2
- package/dist/{chunk-wpacvdsv.js → chunk-gea1q14z.js} +2 -2
- package/dist/{chunk-v9weanq6.js → chunk-gnd32zkx.js} +2 -2
- package/dist/{chunk-jp4xjks0.js → chunk-gvqvw7ms.js} +2 -2
- package/dist/{chunk-z6dx6dnt.js → chunk-gya560n0.js} +2 -2
- package/dist/chunk-gyw21vnb.js +2 -0
- package/dist/{chunk-w562jf57.js → chunk-gzc704c3.js} +2 -2
- package/dist/{chunk-nqt9gyz9.js → chunk-heqa4swe.js} +2 -2
- package/dist/{chunk-vev9q4t4.js → chunk-hygvdjq6.js} +3 -3
- package/dist/{chunk-cp4wxmh5.js → chunk-hyr8yww9.js} +2 -2
- package/dist/chunk-j8ehajmt.js +2 -0
- package/dist/{chunk-rn54592t.js → chunk-jca8s47n.js} +2 -2
- package/dist/{chunk-wde0m4pf.js → chunk-jf2bxzee.js} +3 -3
- package/dist/{chunk-3qedn07q.js → chunk-jfrj2qg1.js} +2 -2
- package/dist/{chunk-3tvq6xr2.js → chunk-jg4c3zg4.js} +2 -2
- package/dist/{chunk-p96vgnxw.js → chunk-jggts370.js} +2 -2
- package/dist/{chunk-75dr7tyz.js → chunk-jra2q5cx.js} +2 -2
- package/dist/{chunk-3nawfa7b.js → chunk-jz7dnk88.js} +2 -2
- package/dist/chunk-k44dkkpg.js +2 -0
- package/dist/{chunk-zzz6kmh8.js → chunk-k7h34p5z.js} +2 -2
- package/dist/{chunk-jmc7ddz8.js → chunk-kfgy61cg.js} +3 -3
- package/dist/{chunk-bapn03er.js → chunk-kfm1sz3q.js} +2 -2
- package/dist/{chunk-k5nd3vyq.js → chunk-kj3a1k2q.js} +2 -2
- package/dist/{chunk-4d9sajzj.js → chunk-kj3t4mqf.js} +2 -2
- package/dist/{chunk-84zzf0ys.js → chunk-kk9dbwd1.js} +2 -2
- package/dist/{chunk-je27hf3t.js → chunk-kqekfj3v.js} +3 -3
- package/dist/{chunk-grfrfh7s.js → chunk-kvnbmt00.js} +2 -2
- package/dist/{chunk-ncgwbdmj.js → chunk-m8pkmbtf.js} +2 -2
- package/dist/{chunk-swqbbw8q.js → chunk-m8tt5bf9.js} +2 -2
- package/dist/{chunk-fwb6tf7m.js → chunk-mdf155e1.js} +2 -2
- package/dist/chunk-mhzqhd85.js +2 -0
- package/dist/{chunk-gjtxked2.js → chunk-ms0h8x63.js} +2 -2
- package/dist/chunk-mz90kcyd.js +2 -0
- package/dist/chunk-mzd9qfmj.js +2 -0
- package/dist/{chunk-0bv3tw1m.js → chunk-n0q8e6sq.js} +2 -2
- package/dist/{chunk-why9g2kd.js → chunk-n8mexbh4.js} +2 -2
- package/dist/{chunk-18kdsdmy.js → chunk-ndfyste3.js} +2 -2
- package/dist/{chunk-cv0qbty5.js → chunk-ngvdcqmt.js} +3 -3
- package/dist/{chunk-etvdqkvb.js → chunk-nh56sb8e.js} +2 -2
- package/dist/{chunk-2yvj9k42.js → chunk-nzgjcp8w.js} +2 -2
- package/dist/{chunk-m2n6sxf8.js → chunk-p79keq5q.js} +2 -2
- package/dist/{chunk-n4wp3h3j.js → chunk-p83pk7ff.js} +2 -2
- package/dist/chunk-p8cm3xw1.js +2 -0
- package/dist/{chunk-h3mwzf3d.js → chunk-pccwq2dd.js} +3 -3
- package/dist/{chunk-e3nccytb.js → chunk-phsvgv0f.js} +1 -1
- package/dist/{chunk-hf5bpahd.js → chunk-pk931bpm.js} +2 -2
- package/dist/{chunk-gbsn1qep.js → chunk-pqs039wv.js} +3 -3
- package/dist/{chunk-jgqt7k0h.js → chunk-q01vmp9m.js} +2 -2
- package/dist/{chunk-bf7sgpzq.js → chunk-q46z21zs.js} +2 -2
- package/dist/{chunk-p3gawvqr.js → chunk-q5qqhqw4.js} +2 -2
- package/dist/chunk-q73jne25.js +2 -0
- package/dist/{chunk-5mjs63fv.js → chunk-qqphgn9b.js} +2 -2
- package/dist/{chunk-747qe35q.js → chunk-r06hycq5.js} +2 -2
- package/dist/{chunk-e00dz09f.js → chunk-r1sj7c91.js} +2 -2
- package/dist/{chunk-zyn0ys4m.js → chunk-r4nz54dh.js} +2 -2
- package/dist/{chunk-7tw7rn0m.js → chunk-r7paw6ba.js} +2 -2
- package/dist/{chunk-ermc9p1p.js → chunk-r8pm74zf.js} +2 -2
- package/dist/{chunk-ftsnryz8.js → chunk-rb4p3h5b.js} +2 -2
- package/dist/chunk-rerm6x2f.js +2 -0
- package/dist/{chunk-pxr5snwm.js → chunk-rkejggyx.js} +2 -2
- package/dist/{chunk-cgnzqmqd.js → chunk-rkks48gw.js} +2 -2
- package/dist/{chunk-fnm2xznx.js → chunk-rncvy5pp.js} +2 -2
- package/dist/{chunk-w5zvy4ex.js → chunk-rt1c2p25.js} +2 -2
- package/dist/{chunk-d71nz1je.js → chunk-s81m6yx7.js} +2 -2
- package/dist/{chunk-j8zpjnf8.js → chunk-s89p3zgn.js} +2 -2
- package/dist/chunk-sgbn37kz.js +2 -0
- package/dist/{chunk-nrpgmawz.js → chunk-sjqhtpzr.js} +2 -2
- package/dist/{chunk-qkn0y5wx.js → chunk-smf7c649.js} +2 -2
- package/dist/{chunk-v32jvbgx.js → chunk-snxpc6yr.js} +2 -2
- package/dist/{chunk-v2pa8yak.js → chunk-sy1rf5m0.js} +3 -3
- package/dist/{chunk-j2ffde9c.js → chunk-t50b1s7h.js} +5 -5
- package/dist/chunk-t7xbh36h.js +2 -0
- package/dist/{chunk-b2n5sj31.js → chunk-t9xkg3pk.js} +2 -2
- package/dist/{chunk-c13rnm7b.js → chunk-tftfggte.js} +2 -2
- package/dist/{chunk-0enb3f4n.js → chunk-tghj342y.js} +2 -2
- package/dist/{chunk-dxwbgg69.js → chunk-tj4b0s68.js} +2 -2
- package/dist/{chunk-zw4ehzza.js → chunk-tk66t919.js} +4 -4
- package/dist/{chunk-v0wmy9b3.js → chunk-tky568fy.js} +2 -2
- package/dist/{chunk-bzzx1y15.js → chunk-tm5w5srq.js} +2 -2
- package/dist/{chunk-9neb2f30.js → chunk-tmec4by7.js} +2 -2
- package/dist/{chunk-ypdh88cj.js → chunk-tnzz1j83.js} +2 -2
- package/dist/{chunk-zypgrbd9.js → chunk-tpdyjp90.js} +2 -2
- package/dist/{chunk-16dyzkha.js → chunk-trxf8c70.js} +2 -2
- package/dist/{chunk-sjm9p42x.js → chunk-ty2cd00p.js} +2 -2
- package/dist/{chunk-y8gz9rsc.js → chunk-ty9sa6we.js} +2 -2
- package/dist/{chunk-y3mx5sf0.js → chunk-tzczzqde.js} +2 -2
- package/dist/chunk-v042t2he.js +2 -0
- package/dist/{chunk-e9nvbe3j.js → chunk-v9v1v41p.js} +2 -2
- package/dist/{chunk-zv3bm3np.js → chunk-vbbndjfd.js} +2 -2
- package/dist/{chunk-jdwd4ta9.js → chunk-vbk36ptt.js} +3 -3
- package/dist/{chunk-g3y0r56h.js → chunk-vnh0jnr4.js} +2 -2
- package/dist/{chunk-mfmh7ztq.js → chunk-vzm88w2r.js} +2 -2
- package/dist/chunk-w368gk92.js +2 -0
- package/dist/chunk-x1mzrhtd.js +2 -0
- package/dist/{chunk-y8yawx3d.js → chunk-xhbxpk0z.js} +2 -2
- package/dist/chunk-xk6f2raz.js +4 -0
- package/dist/{chunk-0m4s668v.js → chunk-xsn2g4kk.js} +2 -2
- package/dist/chunk-y6p8xspr.js +2 -0
- package/dist/chunk-y85askf9.js +2 -0
- package/dist/{chunk-c22xq7a3.js → chunk-y8fmawc6.js} +3 -3
- package/dist/{chunk-xe7ep70k.js → chunk-yc47rq4m.js} +2 -2
- package/dist/{chunk-64cbt3ym.js → chunk-ykz0h1r0.js} +2 -2
- package/dist/{chunk-52wrk1mh.js → chunk-ymgc4317.js} +2 -2
- package/dist/{chunk-1gr60c40.js → chunk-ypgvt8ky.js} +2 -2
- package/dist/{chunk-4sfxcw58.js → chunk-z4jv8svx.js} +3 -3
- package/dist/chunk-z6zsmpyz.js +2 -0
- package/dist/chunk-zpcd9w2t.js +2 -0
- package/dist/{chunk-c7qzvt21.js → chunk-zr8yk5np.js} +3 -3
- package/dist/chunk-ztm4agfw.js +3 -0
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/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.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.d.ts +2 -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.d.ts +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/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/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/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/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-24y0mvqf.js +0 -2
- package/dist/chunk-2bbdgf43.js +0 -2
- package/dist/chunk-2f8s5gtn.js +0 -2
- package/dist/chunk-317w17va.js +0 -2
- package/dist/chunk-51xk5tw2.js +0 -2
- package/dist/chunk-5x5n3b15.js +0 -2
- package/dist/chunk-6ym1a5wa.js +0 -2
- package/dist/chunk-81838qem.js +0 -2
- package/dist/chunk-8gt8yn8k.js +0 -4
- package/dist/chunk-94m77zyn.js +0 -2
- package/dist/chunk-9nbkggqn.js +0 -2
- package/dist/chunk-9wc4emwt.js +0 -2
- package/dist/chunk-a11wvd8e.js +0 -2
- package/dist/chunk-acf4sdp7.js +0 -2
- package/dist/chunk-aht6f6tf.js +0 -2
- package/dist/chunk-amf0m4tb.js +0 -2
- package/dist/chunk-ax7c2kam.js +0 -2
- package/dist/chunk-bztkz3dz.js +0 -2
- package/dist/chunk-chn1mkv0.js +0 -2
- package/dist/chunk-e1fzfaqj.js +0 -2
- package/dist/chunk-g1tbd3pd.js +0 -2
- package/dist/chunk-hd11bfmp.js +0 -2
- package/dist/chunk-j62heyzq.js +0 -2
- package/dist/chunk-k2nbrerw.js +0 -2
- package/dist/chunk-knrc6kks.js +0 -2
- package/dist/chunk-kqwfwck2.js +0 -2
- package/dist/chunk-mckz9qv5.js +0 -2
- package/dist/chunk-njqan8zg.js +0 -2
- package/dist/chunk-pg9gckmw.js +0 -2
- package/dist/chunk-qzn6qtmy.js +0 -2
- package/dist/chunk-rkwq0grt.js +0 -2
- package/dist/chunk-rv3k0kfr.js +0 -2
- package/dist/chunk-s1nfyggb.js +0 -2
- package/dist/chunk-s8cj6aw6.js +0 -2
- package/dist/chunk-stv8pr4v.js +0 -2
- package/dist/chunk-t9t53gsj.js +0 -3
- package/dist/chunk-vd6eqshg.js +0 -2
- package/dist/chunk-vzgn8exd.js +0 -2
- package/dist/chunk-w5q2ygsa.js +0 -2
- package/dist/chunk-y4tj08c1.js +0 -2
- package/dist/chunk-zft4afb8.js +0 -2
- package/dist/chunk-zm0j9nw3.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Un}from"./chunk-2sc2z6g5.js";function ko(t){let n=t?.match(/^gateway:custom-[^:]+:(.+)$/);if(!n)return null;let l=decodeURIComponent(n[1]),e=Un.models.find((o)=>o.slug===l);return e?{value:e.default_reasoning_level,hidden:e.supported_reasoning_levels.length===0}:null}
|
|
2
|
+
export{ko};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function zr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function
|
|
2
|
-
export{zr,
|
|
1
|
+
import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function zr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function il(){c()}function Vr(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function jr(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Sa(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function rl(e,n,t,i,o,a){if(a==="none")return;_(o,[Sa(e,n,t,i,a)])}function Sa(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Ua(t,i);return _a(e,n)}function Ua(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function _a(e,n){return y+Ba(e,n)}function sl(e,n){return D(_a(e,n))}function Ba(e,n){if(n<=l)return Ga(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Ga(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function al(){return r.context?.state}function ll(e){return g(e).ready}
|
|
2
|
+
export{zr,il,Vr,jr,rl,Sa,Ua,_a,sl,Ba,Ga,al,ll};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function Fa(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function kt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Fa(t,o))}return{imageFiles:n,sawNonImageFile:i}}function St(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Ln(e){return e.replace(s,"")}function ea(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Dn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Ln(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-ea(n,i)),r=Math.max(0,o-ea(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
|
|
2
|
+
export{Fa,kt,St,Ln,ea,Dn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ms}from"./chunk-hygvdjq6.js";function ls(t,o){if(ms(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
|
|
2
|
+
export{ls};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function
|
|
2
|
-
export{
|
|
1
|
+
function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function dr(n){if(!n||typeof n!=="object"||!("mode"in n)||typeof n.mode!=="string"||!n.mode.trim()||n.mode.length>128||/\p{Cc}/u.test(n.mode)||!("config"in n)||!n.config||typeof n.config!=="object"||Array.isArray(n.config))throw Error("Expected session input configuration with mode and config");let o=i(n.config),t={mode:n.mode,config:o};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>65536)throw Error("Session input config exceeds 64 KiB");return t}function Hn(n,o){if(!n||typeof n!=="object"||!("sessionId"in n)||n.sessionId!==o||!("revision"in n)||typeof n.revision!=="number"||!Number.isSafeInteger(n.revision)||n.revision<0||!("inputConfig"in n))throw Error("Invalid Codex session input snapshot");return{sessionId:o,revision:n.revision,inputConfig:n.inputConfig===null?null:dr(n.inputConfig)}}
|
|
2
|
+
export{dr,Hn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Ir}from"./chunk-78vckhxt.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function Pr(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await Ir(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
|
|
2
|
+
export{Pr};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Oo(o){let t=new DOMParser().parseFromString(o,"image/svg+xml").documentElement,e=t.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);if(t.localName!=="svg"||e?.length!==4||!e.every(Number.isFinite)||e[2]<=0||e[3]<=0)throw Error("Mermaid SVG has no valid viewBox");let[,,a,i]=e;return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",String(a)),t.setAttribute("height",String(i)),t.style.removeProperty("max-width"),{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(t))}`,width:a,height:i}}async function Xr(o,s){await document.fonts.ready;let{src:t,width:e,height:a}=Oo(o),i=new Image;await new Promise((h,c)=>{i.onload=()=>h(),i.onerror=()=>c(Error("Could not load the Mermaid diagram")),i.src=t});let g=Math.min(2,8192/e,8192/a,Math.sqrt(16777216/(e*a))),r=document.createElement("canvas");r.width=Math.max(1,Math.ceil(e*g)),r.height=Math.max(1,Math.ceil(a*g));let n=r.getContext("2d");if(!n)throw Error("Could not create the PNG canvas");n.fillStyle=s,n.fillRect(0,0,r.width,r.height),n.drawImage(i,0,0,r.width,r.height);let m=r.toDataURL("image/png");if(!m.startsWith("data:image/png;base64,"))throw Error("PNG export failed");return m.slice(22)}
|
|
2
|
+
export{Oo,Xr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-ty9sa6we.js";import{mt}from"./chunk-rncvy5pp.js";import{e,b}from"./chunk-3r57tgvf.js";import{Zn}from"./chunk-ep9vq47f.js";import{Loader2Icon as v}from"lucide-react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as i}from"react/jsx-runtime";function Gt({session:t,timeline:s}){let{host:m,client:a}=e(),{t:r}=m,u=n((h)=>h.historyPages[t.id]?.cursor!=null),y=Zn(t,s?.turnWork),E=()=>b(m,a.open(t.id,t.cwd)),p=o(mt,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[o(f,{children:r("conversation.reopen")}),o(l,{children:r("conversation.detached")})]}),o(x,{onClick:E,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(c,{className:"flex-1",children:i(d,{children:[o(f,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),o(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
|
|
2
|
+
export{Gt};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{L}from"./chunk-f4h84pav.js";import{s,h}from"./chunk-qqphgn9b.js";import{v,f}from"./chunk-6tj5e7fc.js";import{GlobeIcon as G,LogOutIcon as R}from"lucide-react";import{useRef as k,useState as c}from"react";import{Avatar as T,AvatarFallback as B,AvatarImage as E}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as d,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as l,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function da(e){return o(d,{...e})}function ua(e){return o(l,{...e})}function Er({className:e,...r}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function pa({languages:e,value:r,onChange:i}){let a=s();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(G,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(_,{children:o(z,{value:r,onValueChange:(t)=>void h(a,Promise.resolve(i(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function ma({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:N}=t,[g,C]=c(!1),[S,m]=c(!1),M=k(null),[w,O]=c({width:0,offset:0}),P=(x)=>{if(x){let p=M.current,u=p?.closest("[data-sidebar-footer-row]");if(!p||!u)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=u.getBoundingClientRect(),A=p.getBoundingClientRect(),I=getComputedStyle(u).direction==="rtl";O({width:u.clientWidth,offset:I?y.right-A.right:A.left-y.left})}C(x)};L(g);let b=a||S,D=n(T,{className:"size-[18px] after:border-0",children:[o(E,{src:e.avatar??void 0,alt:""}),o(B,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:g,onOpenChange:P,children:[n(J,{ref:M,render:o(f,{disabled:b,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(v,{children:D}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-w.offset,sideOffset:8,style:{width:w.width},children:[n(d,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(v,{children:D}),n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(l,{})]}),r,r!=null&&o(l,{}),o(d,{children:n(Er,{disabled:b,onClick:()=>{m(!0),h(t,i()).finally(()=>m(!1))},children:[o(R,{}),N("sessionList.signOut")]})})]})]})}
|
|
2
|
+
export{da,ua,Er,pa,ma};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function*Xn(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function 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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function
|
|
2
|
-
export{
|
|
1
|
+
import{codexTurnId as m,promptSuggestion as s}from"@nyssance/codex-acp-v2/client";import{useMemo as p,useState as c}from"react";function fn(t,i,a,l){let e=p(()=>t.items.findLast((u)=>u.kind==="user"),[t.items]),n=JSON.stringify([t.id,m(e?._meta)]),[r,d]=c(null),o=l&&i&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!e?.replayed;return{text:o&&!a&&r!==n?s(t._meta):null,invalidate:()=>{if(o)d(n)}}}
|
|
2
|
+
export{fn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function
|
|
2
|
-
export{
|
|
1
|
+
var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function qo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Bt(t,o){let e=qo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function fs(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function hs(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
|
|
2
|
+
export{qo,Bt,fs,hs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function pi(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function mi(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
|
|
2
|
+
export{pi,mi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{It}from"./chunk-tghj342y.js";import{ot}from"./chunk-hyr8yww9.js";import{l}from"./chunk-6283nzqs.js";import{g}from"./chunk-cpe6vtpe.js";import{z}from"./chunk-vnh0jnr4.js";import{e}from"./chunk-3r57tgvf.js";import{BlocksIcon as Q,BookOpenIcon as Y,PaperclipIcon as Z,PlusIcon as q,SquareSlashIcon as ee}from"lucide-react";import{useEffect as j,useLayoutEffect as te,useRef as S,useState as M}from"react";import{createPortal as ne}from"react-dom";import{Button as se}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as I,Fragment as oe}from"react/jsx-runtime";function uo({anchorRef:r,commands:k,disabled:i,agentDisabled:c,open:a,onCommand:E,onApp:h,focusInput:L,includeAttachment:f,query:y="",onClose:p,triggerRef:B}){let{client:v,host:N}=e(),{t:d}=N,G=g(),P=S(null),[D,C]=M(null),x=`${a}:${f}:${y}`,[X,U]=M(x);if(X!==x)U(x),C(null);let[F,H]=M([]),[O,T]=M("loading");j(()=>{if(!a||c||!v.installedApps)return;let t=!0;return T("loading"),H([]),v.installedApps().then(({apps:s})=>{if(!t)return;H(s.filter((u)=>u.enabled&&u.callable)),T("ready")},(s)=>{if(!t)return;T("error"),N.reportError?.(s)}),()=>{t=!1}},[a,c,v,N]);let K=(t)=>{if(t.disabled)return;p(),t.run(),L()},W=ot(k,y,Number.MAX_SAFE_INTEGER),_=(t)=>({key:`command:${t.key}`,label:t.payload.startsWith("$")?t.label.slice(1):t.label,description:t.description,skillName:t.payload.startsWith("$")?t.payload.slice(1):void 0,disabled:i||c,run:()=>E(t.payload)}),V=It(F,y,(t)=>t.runtimeName||t.id,Number.MAX_SAFE_INTEGER).map(({item:t})=>t),R=[{id:"commands",label:d(f?"composer.attachmentsAndCommands":"composer.commands"),entries:[...f?[{key:"attachment",label:d("composer.addAttachment"),disabled:i,run:()=>G.openFileDialog()}]:[],...W.filter((t)=>!t.payload.startsWith("$")).map(_)],status:void 0},{id:"skills",label:d("composer.skills"),entries:W.filter((t)=>t.payload.startsWith("$")).map(_),status:void 0},{id:"apps",label:d("composer.apps"),entries:V.map((t)=>({key:`app:${t.id}`,label:t.runtimeName||t.id,disabled:i||c,run:()=>h({id:t.id,name:t.runtimeName||t.id})})),status:O==="loading"?d("composer.appsLoading"):O==="error"?d("composer.appsFailed"):F.length===0&&!y.trim()?d("composer.appsEmpty"):void 0}].filter((t)=>(t.id!=="apps"||!c&&Boolean(v.installedApps))&&(!y.trim()||t.entries.length>0||t.status)),m=R.flatMap((t)=>t.entries).filter((t)=>!t.disabled),b=m.some((t)=>t.key===D)?D:m[0]?.key;if(j(()=>{if(!a)return;let t=L();if(!t)throw Error("The composer input is missing");let s=(n)=>{if(n.target instanceof Node&&!P.current?.contains(n.target)&&!B?.current?.contains(n.target)&&!t.contains(n.target))p()},u=(n)=>{if(n.isComposing||n.keyCode===229)return;if(n.key==="Escape")n.preventDefault(),n.stopPropagation(),p();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault(),n.stopPropagation();let w=m.findIndex((J)=>J.key===b),A=Math.max(0,Math.min(m.length-1,w+(n.key==="ArrowDown"?1:-1)));if(m[A])C(m[A].key)}else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let w=m.find((A)=>A.key===b);if(w)K(w)}};if(t.addEventListener("keydown",u,!0),f)t.addEventListener("input",p);return t.addEventListener("blur",p),document.addEventListener("pointerdown",s,!0),()=>{t.removeEventListener("keydown",u,!0),t.removeEventListener("input",p),t.removeEventListener("blur",p),document.removeEventListener("pointerdown",s,!0)}},[a,b,m,L,p,f,B]),te(()=>{if(a)P.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})},[a,b]),!a)return null;if(!r.current)throw Error("The composer menu anchor is missing");return ne(o("div",{className:l.position,children:o("div",{ref:P,role:"listbox","aria-label":d(f?"composer.add":"composer.commands"),onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:I("div",{className:l.list,children:[R.length===0&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:d("composer.addEmpty")}),R.map((t)=>I("div",{role:"group","aria-label":t.label,children:[o("div",{className:l.group,children:t.label}),t.entries.map((s)=>{let u=s.key==="attachment"?Z:t.id==="skills"?Y:t.id==="apps"?Q:ee,n=s.skillName===void 0?void 0:N.skillIcon?.(s.skillName);return I(se,{type:"button",variant:"ghost",role:"option",disabled:s.disabled,"aria-selected":s.key===b,onMouseEnter:()=>{if(!s.disabled)C(s.key)},onClick:()=>K(s),className:`${l.row}${s.key===b?` ${l.selected}`:""}`,children:[n?o("img",{src:n,alt:"","aria-hidden":"true",className:`${l.icon} object-contain`}):o(u,{className:l.icon}),o("span",{className:l.label,children:s.label}),s.description&&o("span",{"data-slot":"description",className:l.description,children:s.description})]},s.key)}),t.status&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:t.status})]},t.id))]})})}),r.current)}function zi({agentControls:r,onOpenChange:k,...i}){let{host:c}=e(),a=g(),E=S(null),h=S(!1);return I(oe,{children:[o(z,{ref:E,disabled:i.disabled,"aria-label":c.t(r?"composer.add":"composer.attachImage"),title:c.t(r?"composer.add":"composer.attachImage"),"aria-haspopup":r?"listbox":void 0,"aria-expanded":r?i.open:void 0,className:"text-foreground",onPointerDown:()=>{h.current=i.open},onClick:()=>{if(r)k(!h.current),i.focusInput();else a.openFileDialog()},children:o(q,{className:"size-4"})}),r&&i.open&&o(uo,{...i,includeAttachment:!0,onClose:()=>k(!1),triggerRef:E})]})}
|
|
2
|
+
export{uo,zi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-3r57tgvf.js";import{qt,Kt}from"./chunk-81hv0s07.js";import{S}from"./chunk-5k4ec37x.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ms({providers:n,store:l}){let{t:m}=e().host,d=qt(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=S(s.id,o.api_id);return t(w,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function w({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Kt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
|
|
2
|
+
export{Ms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-ty9sa6we.js";import{Ut}from"./chunk-cf7cw2tj.js";import{yi}from"./chunk-gds55pjg.js";import{F}from"./chunk-rkks48gw.js";import{ro}from"./chunk-cvn9zbbc.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(F,{block:e.content},`${n.id}:${l}`))]})}var eo=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(ro),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...yi(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(Ut,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
+
export{eo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-ty9sa6we.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function no({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function oo({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(no,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
|
|
2
|
+
export{no,oo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ze,m}from"./chunk-sgbn37kz.js";import{H}from"./chunk-8hygfx41.js";import{V}from"./chunk-ykz0h1r0.js";import{L}from"./chunk-f4h84pav.js";import{Et,rt,Rt}from"./chunk-q01vmp9m.js";import{PreviewCard as h}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as _,useLayoutEffect as D,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as j}from"react/jsx-runtime";function R(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function v({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function f({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function se({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:C,headerChildren:g,wrapHeader:u,onHeaderClick:b,children:P}){let y=()=>{b?.(),t(!o)},x=p(Et,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),S=d(j,{children:[r!=null&&e(v,{children:r}),g??e(H,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Rt,{content:s!==void 0?e(rt,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:C})})]}),k=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,m),onClick:y,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),y()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),S]}):e("div",{"data-active":l?"":void 0,className:x,children:S});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?k:u(k),o&&e(R,{className:"mt-0.5",children:P})]})}var E=T(()=>{}),G=T(()=>{});function zn(){return _(G)}function Be(){return _(E)}function Ge({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:C,preview:g,listeningPorts:u,onOpenPort:b,accessory:P,meta:y,hint:x,actions:S,className:k,...c}){let O=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Et,ze,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||u!=null&&u.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",k),...c,children:[e(v,{children:t!=null?e(V,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(H,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),C!=null&&e(H,{className:"text-muted-foreground text-xs",children:C}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((N)=>b?d("button",{type:"button",className:"underline",onPointerDown:(w)=>w.stopPropagation(),onKeyDown:(w)=>w.stopPropagation(),onClick:(w)=>{w.stopPropagation(),b(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(Rt,{content:P!=null?e(rt,{children:P}):y??e(rt,{}),actions:S}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return O;return e(M,{row:O,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(E.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(q,{open:l,onOpenChange:i,trigger:o,children:t})})})}function q({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return L(o),d(h.Root,{open:o,onOpenChange:t,children:[e(h.Trigger,{render:n,delay:700,closeDelay:100}),e(h.Portal,{children:e(h.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(h.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
|
|
2
|
+
export{R,v,f,se,zn,Be,Ge};
|
|
@@ -0,0 +1,4 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function bo({name:p,value:M,levels:h,disabled:c,onChange:P,trackWidth:f=100}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/Math.max(1,n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
|
|
2
|
+
export{bo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
`).length}function
|
|
3
|
-
export{
|
|
1
|
+
import{c}from"./chunk-tftfggte.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
|
|
2
|
+
`).length}function Va(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function cs({blocks:e}){return s(Vo,{files:Va(e)})}function Vo({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
|
|
3
|
+
export{Va,cs,Vo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
async function
|
|
2
|
-
export{
|
|
1
|
+
async function Ir(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
|
|
2
|
+
export{Ir};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function
|
|
2
|
-
export{
|
|
1
|
+
import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function gi(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
|
|
2
|
+
export{gi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{d}from"./chunk-fjrghy92.js";import{q,K,W,Z}from"./chunk-5d138vq3.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Se({skills:l=!1}){let{t:o}=d();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(W,{children:e(s,{className:"size-10 rounded-xl"})}),a(K,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(q,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
|
|
2
|
+
export{Se};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-3r57tgvf.js";import{we}from"./chunk-eavqh5fb.js";import{et}from"./chunk-zpcd9w2t.js";import{Qt}from"./chunk-snxpc6yr.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Wt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function si({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Wt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Wt,{label:et(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Wt,{label:et(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Zt({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(si,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Qt,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(we,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
|
|
2
|
+
export{Wt,si,Zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var ct="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function qt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(ct))n()}),[e]);return d(t,()=>o(e.get(ct)))}async function Kt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[ct])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[ct]:i}})}
|
|
2
|
+
export{ct,qt,Kt};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{QUICK_CHATS_GROUP as r,sessionGroup as l}from"@nyssance/codex-acp-v2/client";function
|
|
2
|
-
export{
|
|
1
|
+
import{QUICK_CHATS_GROUP as r,sessionGroup as l}from"@nyssance/codex-acp-v2/client";function pt(n,t){return n!==null&&t&&l(t,{cwd:n}).id===r?null:n}
|
|
2
|
+
export{pt};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function
|
|
2
|
-
export{
|
|
1
|
+
import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function Ao({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
|
|
2
|
+
export{Ao};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Nr(e,t){if(t===0)return null;let r=t-1;while(r>=0){let n=e[r];if(n===" "||n==="\t"||n===`
|
|
2
2
|
`)return null;if(n==="@"||n==="/"){let i=r===0?"":e[r-1],a=r===0||i===`
|
|
3
3
|
`||i===" "||i==="\t",s=a||/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i??"");if(n==="/"?s&&!/[/\\]/.test(e.slice(r+1,t)):a)return{kind:n==="/"?"slash":"at",start:r,end:t,query:e.slice(r+1,t)}}r-=1}return null}
|
|
4
|
-
export{
|
|
4
|
+
export{Nr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,a,
|
|
2
|
-
export{
|
|
1
|
+
import{s,a,$n,o,h}from"./chunk-qqphgn9b.js";import{j}from"./chunk-gvqvw7ms.js";import{Ge}from"./chunk-6tj5e7fc.js";import{Ve}from"./chunk-heqa4swe.js";import{At,Ue}from"./chunk-dmq2fx7g.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function No({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=s(),{t:f,i18n:S}=t,k=a(),l=o((i)=>i.runStates[e.sessionId]),I=$n(),u=()=>m(e);return n(Ge,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:p,onClick:u,onKeyDown:(i)=>{if(i.key==="Enter"||i.key===" ")i.preventDefault(),u()},media:t.SessionMedia?n(t.SessionMedia,{sessionId:e.sessionId,state:l?.state}):void 0,state:l?.state,interruption:l?.interruption??null,title:e.title??f("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(B,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:d}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:At(e.updatedAt,S.language)}):void 0,actions:l!=null?n(Ve,{title:f("sessionList.stop"),onStop:()=>h(t,k.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:p,onForked:m,actions:v}){let c=s(),{t:d}=c,t=a(),f=o((r)=>F(r.agent)),S=o((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,u]=y(!1),i=R(!1);return n(Ue,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)h(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&n(j,{icon:n(H,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?n(j,{icon:n(x,{}),label:d("sessionList.unarchive"),onClick:()=>void h(c,t.unarchive(e.sessionId))}):b(C,{children:[n(j,{icon:n(A,{}),label:d("sessionList.fork"),disabled:!S||I,onClick:()=>{if(i.current)return;i.current=!0,u(!0),h(c,t.fork(e.sessionId,e.cwd).then((r)=>{let g=t.state.sessionList.find((L)=>L.sessionId===r);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{i.current=!1,u(!1)}))}}),n(j,{icon:n(D,{}),label:d("sessionList.archive"),onClick:()=>void h(c,t.archive(e.sessionId))})]}),n(j,{variant:"destructive",icon:n(N,{}),label:d("sessionList.delete"),onClick:p})]})})}
|
|
2
|
+
export{No};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{kt,St,Dn}from"./chunk-36ttr22w.js";import{Mt,g}from"./chunk-cpe6vtpe.js";import{InputGroupTextarea as R}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as M}from"cn";import{forwardRef as F,useCallback as K,useEffect as T,useImperativeHandle as L,useRef as d}from"react";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,fo=F(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:I,className:E,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...h},k)=>{let n=Mt(),p=g(),i=d(!1),s=d(!1),a=d(null),l=d(null),o=K(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||i.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([u])=>{if(u&&u.contentRect.width!==t)t=u.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),T(o,[o,n?.textInput.value,h.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(i.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
|
|
2
2
|
`&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:u,value:f}=t,v=`${f.slice(0,r)}
|
|
3
|
-
${f.slice(u)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=
|
|
4
|
-
export{
|
|
3
|
+
${f.slice(u)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=kt(t),f=St(t);if(r.length>0)e.preventDefault(),p.add(r);else if(u&&!f)e.preventDefault()},D=n?{value:i.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=i.current?e.currentTarget.value:Dn(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!i.current)Dn(e.currentTarget);o(),c?.(e)}};return L(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>i.current||s.current,getTextarea:()=>a.current}),[]),q(R,{"data-chat-input":!0,ref:a,rows:3,className:M("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{i.current=!1;let t=Dn(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),I?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,i.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...h,...D})});fo.displayName="PromptInputTextarea";
|
|
4
|
+
export{fo};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|
|
@@ -0,0 +1,2 @@
|
|
|
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};
|