@alwith/module-chat 0.6.27 → 0.6.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/catalogs/qwen/models.json +40 -0
- package/assets/provider-catalog.json +4 -0
- package/dist/activity-host.js +1 -1
- package/dist/agent/client.d.ts +1 -0
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-request.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/input-modes/chat.js +1 -1
- package/dist/agent/input-modes/execution-meta.js +1 -1
- package/dist/agent/input-modes/image-context.js +1 -1
- package/dist/agent/input-modes/image.js +1 -1
- package/dist/agent/input-modes/index.js +1 -1
- package/dist/agent/project-path.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/agent/session-list-refresh.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-options.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/approval/schema-elicitation-form.js +1 -1
- package/dist/approval/url-elicitation-card.js +1 -1
- package/dist/chunk-06aaghwq.js +2 -0
- package/dist/{chunk-jp4xjks0.js → chunk-0c956xc0.js} +2 -2
- package/dist/chunk-0f00j53n.js +2 -0
- package/dist/{chunk-yryg27yy.js → chunk-12bfnfbk.js} +2 -2
- package/dist/chunk-12pd4nxy.js +2 -0
- package/dist/{chunk-w5zvy4ex.js → chunk-188q5xn8.js} +2 -2
- package/dist/chunk-189aq7st.js +2 -0
- package/dist/{chunk-ne4b53kn.js → chunk-19jh646d.js} +2 -2
- package/dist/{chunk-ftsnryz8.js → chunk-1bvgs2t1.js} +2 -2
- package/dist/{chunk-n4wp3h3j.js → chunk-1dpk9zrb.js} +2 -2
- package/dist/{chunk-ma6ycen5.js → chunk-239gtn3z.js} +2 -2
- package/dist/chunk-2c4hqv8f.js +2 -0
- package/dist/{chunk-18kdsdmy.js → chunk-2c7a0zdc.js} +2 -2
- package/dist/chunk-2rk59ngw.js +2 -0
- package/dist/{chunk-tgnftxyb.js → chunk-32zzqeyf.js} +2 -2
- package/dist/{chunk-y3mx5sf0.js → chunk-36j9fer8.js} +2 -2
- package/dist/chunk-36rxa8k7.js +3 -0
- package/dist/{chunk-wde0m4pf.js → chunk-37x36kph.js} +3 -3
- package/dist/{chunk-4vayk46h.js → chunk-3btheq4v.js} +2 -2
- package/dist/{chunk-c7qzvt21.js → chunk-3cwbxnxr.js} +3 -3
- package/dist/{chunk-jvy6p83k.js → chunk-3gkb117f.js} +3 -3
- package/dist/{chunk-bbrx6m7n.js → chunk-3kxerrsh.js} +2 -2
- package/dist/{chunk-zzz6kmh8.js → chunk-42dfq7ze.js} +2 -2
- package/dist/{chunk-9neb2f30.js → chunk-46j8adkj.js} +2 -2
- package/dist/{chunk-84p483n0.js → chunk-483jakc1.js} +2 -2
- package/dist/chunk-48zgp33j.js +2 -0
- package/dist/{chunk-vdt7cp6c.js → chunk-4fghmx57.js} +2 -2
- package/dist/chunk-4npg9v6h.js +2 -0
- package/dist/{chunk-8wk3e4z7.js → chunk-4sj3t6mk.js} +2 -2
- package/dist/{chunk-v3v2twfm.js → chunk-4y07ykv2.js} +2 -2
- package/dist/chunk-52hvpdxw.js +2 -0
- package/dist/{chunk-h5mdgrq6.js → chunk-54awxpw2.js} +2 -2
- package/dist/{chunk-p96vgnxw.js → chunk-5arfhz6m.js} +2 -2
- package/dist/{chunk-0bv3tw1m.js → chunk-5cas0xvp.js} +2 -2
- package/dist/chunk-5dxzfdd1.js +2 -0
- package/dist/{chunk-ypdh88cj.js → chunk-5dygcexv.js} +2 -2
- package/dist/{chunk-z6x70w62.js → chunk-5h8h4sas.js} +2 -2
- package/dist/{chunk-dd9k5bbt.js → chunk-5n2304a1.js} +2 -2
- package/dist/chunk-5wed639g.js +2 -0
- package/dist/{chunk-qa9p0a64.js → chunk-621g2ntr.js} +3 -3
- package/dist/{chunk-bgnxw313.js → chunk-6eebeq0f.js} +2 -2
- package/dist/chunk-6g5qmjph.js +2 -0
- package/dist/{chunk-747qe35q.js → chunk-6gejqbns.js} +2 -2
- package/dist/{chunk-0m4s668v.js → chunk-6hxz5cpc.js} +2 -2
- package/dist/{chunk-4d9sajzj.js → chunk-6ja6pt5x.js} +2 -2
- package/dist/{chunk-30nre2gw.js → chunk-6kyq5zxt.js} +2 -2
- package/dist/chunk-6m9frvzj.js +2 -0
- package/dist/{chunk-jdwd4ta9.js → chunk-6r1e3y4e.js} +3 -3
- package/dist/{chunk-nrpgmawz.js → chunk-6wkcqhkk.js} +2 -2
- package/dist/{chunk-axvjn527.js → chunk-6yzknjee.js} +2 -2
- package/dist/chunk-717437bm.js +2 -0
- package/dist/chunk-7ckdhz5y.js +2 -0
- package/dist/chunk-7egc2x4q.js +1 -0
- package/dist/{chunk-tr0bmqn9.js → chunk-7g0cbkbp.js} +2 -2
- package/dist/{chunk-k5nd3vyq.js → chunk-7hfd7hnm.js} +2 -2
- package/dist/{chunk-xwwjj45a.js → chunk-7jk8s061.js} +2 -2
- package/dist/{chunk-64apxzn7.js → chunk-7n1v87h0.js} +2 -2
- package/dist/{chunk-0enb3f4n.js → chunk-7rqryntm.js} +2 -2
- package/dist/{chunk-95ywdfe0.js → chunk-7sf2wz1n.js} +2 -2
- package/dist/{chunk-7rtwekkz.js → chunk-7vby3f2v.js} +2 -2
- package/dist/{chunk-m68t534g.js → chunk-8ktb3g8c.js} +2 -2
- package/dist/{chunk-qceex4vv.js → chunk-8p861ztc.js} +2 -2
- package/dist/{chunk-w1yrsbw1.js → chunk-8w5bt0nc.js} +2 -2
- package/dist/{chunk-1wr1ef9x.js → chunk-9162ez1n.js} +2 -2
- package/dist/{chunk-sjm9p42x.js → chunk-91jmmkd3.js} +2 -2
- package/dist/{chunk-88ysxbdh.js → chunk-964fwwsg.js} +2 -2
- package/dist/chunk-9xdne4k4.js +4 -0
- package/dist/{chunk-b2n5sj31.js → chunk-aa2xhwh2.js} +2 -2
- package/dist/{chunk-gjtxked2.js → chunk-abxsr9d1.js} +2 -2
- package/dist/{chunk-etvdqkvb.js → chunk-afnnrn6z.js} +2 -2
- package/dist/{chunk-jmc7ddz8.js → chunk-agz11n1h.js} +3 -3
- package/dist/{chunk-pxr5snwm.js → chunk-ahzjy61p.js} +2 -2
- package/dist/{chunk-qzerhkyb.js → chunk-ansfap1a.js} +3 -3
- package/dist/chunk-aq22zye1.js +2 -0
- package/dist/{chunk-syjt7y4v.js → chunk-azak3tb5.js} +2 -2
- package/dist/{chunk-v9weanq6.js → chunk-b4qe4xnp.js} +2 -2
- package/dist/{chunk-x49qjrbk.js → chunk-b4wh6k5s.js} +2 -2
- package/dist/{chunk-p3gawvqr.js → chunk-b64hyshj.js} +2 -2
- package/dist/{chunk-why9g2kd.js → chunk-bajn7ssf.js} +2 -2
- package/dist/{chunk-16dyzkha.js → chunk-bbvhgh27.js} +2 -2
- package/dist/{chunk-ha9n1k24.js → chunk-bnf6pmgc.js} +2 -2
- package/dist/{chunk-q3s59jyn.js → chunk-bsqe29dh.js} +2 -2
- package/dist/chunk-cp3qcgdv.js +4 -0
- package/dist/{chunk-v0wmy9b3.js → chunk-cttsbjr0.js} +2 -2
- package/dist/{chunk-dheg4bs2.js → chunk-cxhyh0w9.js} +2 -2
- package/dist/{chunk-r5f77gtx.js → chunk-d336k00a.js} +2 -2
- package/dist/{chunk-3tvq6xr2.js → chunk-d5pn8932.js} +2 -2
- package/dist/{chunk-53r6pr16.js → chunk-d8bjsf1d.js} +2 -2
- package/dist/{chunk-j4w2hbbe.js → chunk-darm80tf.js} +2 -2
- package/dist/{chunk-d71nz1je.js → chunk-dbrrbwb8.js} +2 -2
- package/dist/chunk-dfzhma2x.js +2 -0
- package/dist/{chunk-v96vkrw2.js → chunk-ds6bqmdr.js} +2 -2
- package/dist/{chunk-5bhp61sd.js → chunk-dwf38vyq.js} +2 -2
- package/dist/chunk-dxfhy8gr.js +2 -0
- package/dist/{chunk-hf5bpahd.js → chunk-dzw6vqqf.js} +2 -2
- package/dist/{chunk-e9nvbe3j.js → chunk-e8mxwqxy.js} +2 -2
- package/dist/chunk-eedgav4q.js +2 -0
- package/dist/{chunk-zyn0ys4m.js → chunk-eexn5mmk.js} +2 -2
- package/dist/{chunk-fnm2xznx.js → chunk-efkfzgs9.js} +2 -2
- package/dist/chunk-ehcnfvaz.js +2 -0
- package/dist/{chunk-cgnzqmqd.js → chunk-epdnafa1.js} +2 -2
- package/dist/{chunk-ag2t01q7.js → chunk-esxjnj1y.js} +3 -3
- package/dist/{chunk-3nawfa7b.js → chunk-ezaypwps.js} +2 -2
- package/dist/{chunk-bf7sgpzq.js → chunk-f9zpep12.js} +2 -2
- package/dist/{chunk-fwb6tf7m.js → chunk-fednb216.js} +2 -2
- package/dist/{chunk-pxv38ttf.js → chunk-fpsn6fmf.js} +2 -2
- package/dist/{chunk-2yvj9k42.js → chunk-fvf1et2s.js} +2 -2
- package/dist/{chunk-exrd2xzz.js → chunk-fvw65b49.js} +2 -2
- package/dist/{chunk-cp4wxmh5.js → chunk-fz9y067h.js} +2 -2
- package/dist/{chunk-brv52tgj.js → chunk-g9426ns9.js} +2 -2
- package/dist/chunk-gdn4vvks.js +2 -0
- package/dist/chunk-ge0anaww.js +4 -0
- package/dist/chunk-gjj5wbms.js +4 -0
- package/dist/{chunk-dxwbgg69.js → chunk-gt50nb3j.js} +2 -2
- package/dist/chunk-h1t76wws.js +2 -0
- package/dist/chunk-hc9bcwpa.js +2 -0
- package/dist/{chunk-26w51q10.js → chunk-hpv8x22r.js} +2 -2
- package/dist/chunk-hqfhb4ng.js +2 -0
- package/dist/{chunk-xnbvdqnt.js → chunk-htsbt68m.js} +2 -2
- package/dist/{chunk-c13rnm7b.js → chunk-hz8yrg2t.js} +2 -2
- package/dist/{chunk-fwghjmd1.js → chunk-hzhcajx1.js} +2 -2
- package/dist/chunk-j1khvg9s.js +2 -0
- package/dist/{chunk-7ng6qs9c.js → chunk-jbnbx285.js} +2 -2
- package/dist/{chunk-nqt9gyz9.js → chunk-jkqh03w4.js} +2 -2
- package/dist/{chunk-j8zpjnf8.js → chunk-k0rfgjm6.js} +2 -2
- package/dist/{chunk-3hsft68c.js → chunk-k1atcess.js} +2 -2
- package/dist/{chunk-dx5hh359.js → chunk-kk5acm1s.js} +5 -5
- package/dist/{chunk-4a4awnss.js → chunk-kq8jv5tf.js} +2 -2
- package/dist/{chunk-8hygfx41.js → chunk-kv1v7kgn.js} +2 -2
- package/dist/chunk-kzh7w9c0.js +2 -0
- package/dist/chunk-m76tgtge.js +3 -0
- package/dist/{chunk-grfrfh7s.js → chunk-m7t9asrq.js} +2 -2
- package/dist/{chunk-3q8vw3wb.js → chunk-m7tj6194.js} +2 -2
- package/dist/{chunk-4sfxcw58.js → chunk-me230xjh.js} +3 -3
- package/dist/{chunk-64cbt3ym.js → chunk-mtcxr3ns.js} +2 -2
- package/dist/{chunk-7s7cevjh.js → chunk-n7f38k3f.js} +2 -2
- package/dist/chunk-n7pyzjq1.js +2 -0
- package/dist/{chunk-0e5dx357.js → chunk-n9e1v175.js} +2 -2
- package/dist/{chunk-1gr60c40.js → chunk-nabyjzn5.js} +2 -2
- package/dist/{chunk-wpacvdsv.js → chunk-nn8pmwqz.js} +2 -2
- package/dist/chunk-nq2tqdb2.js +2 -0
- package/dist/chunk-nravn5bk.js +2 -0
- package/dist/chunk-p781sb6h.js +2 -0
- package/dist/chunk-pbx1417n.js +2 -0
- package/dist/{chunk-masqfje4.js → chunk-pqw5qz4e.js} +2 -2
- package/dist/{chunk-6ym1a5wa.js → chunk-pv7t4hw8.js} +2 -2
- package/dist/{chunk-vmfhnkxj.js → chunk-q98s7d94.js} +2 -2
- package/dist/{chunk-d582db8v.js → chunk-qc49fm8e.js} +2 -2
- package/dist/{chunk-j2ffde9c.js → chunk-qd8j2d63.js} +5 -5
- package/dist/{chunk-75dr7tyz.js → chunk-qdbyn3xv.js} +2 -2
- package/dist/chunk-qecs9e31.js +2 -0
- package/dist/{chunk-cdxdjn5n.js → chunk-qz9q0g2b.js} +2 -2
- package/dist/{chunk-jgqt7k0h.js → chunk-r013w7yb.js} +2 -2
- package/dist/{chunk-h3mwzf3d.js → chunk-r3s28905.js} +3 -3
- package/dist/chunk-r51vcbf0.js +2 -0
- package/dist/{chunk-5mjs63fv.js → chunk-r7z3mvej.js} +2 -2
- package/dist/chunk-rak4mkgh.js +2 -0
- package/dist/{chunk-v32jvbgx.js → chunk-rhyw89ap.js} +2 -2
- package/dist/{chunk-h1kvdf3t.js → chunk-sb2694hc.js} +2 -2
- package/dist/{chunk-3qedn07q.js → chunk-sdhkpkbs.js} +2 -2
- package/dist/{chunk-c22xq7a3.js → chunk-smd9rszw.js} +3 -3
- package/dist/{chunk-je27hf3t.js → chunk-sx1gjwb6.js} +3 -3
- package/dist/chunk-sykf5jnc.js +2 -0
- package/dist/{chunk-4g1s7gdh.js → chunk-t56ncd8f.js} +2 -2
- package/dist/{chunk-cans04tz.js → chunk-tbz64dbd.js} +3 -3
- package/dist/{chunk-zypgrbd9.js → chunk-tdaznr5w.js} +2 -2
- package/dist/{chunk-erp1g3as.js → chunk-tjc0ntnh.js} +2 -2
- package/dist/chunk-ts7h148j.js +2 -0
- package/dist/chunk-v0xy25sh.js +2 -0
- package/dist/{chunk-w562jf57.js → chunk-v6f6s828.js} +2 -2
- package/dist/{chunk-55m88zbv.js → chunk-vazspetj.js} +2 -2
- package/dist/{chunk-zv3bm3np.js → chunk-vbbndjfd.js} +2 -2
- package/dist/{chunk-swqbbw8q.js → chunk-vhxr0c4c.js} +2 -2
- package/dist/{chunk-bzzx1y15.js → chunk-vjgze5n7.js} +2 -2
- package/dist/{chunk-vev9q4t4.js → chunk-vvmmzcms.js} +3 -3
- package/dist/{chunk-e3nccytb.js → chunk-vvy4ke91.js} +2 -2
- package/dist/{chunk-mfmh7ztq.js → chunk-w5rg8wk8.js} +2 -2
- package/dist/{chunk-gbsn1qep.js → chunk-w7vcd8d1.js} +4 -4
- package/dist/{chunk-xqb4thy8.js → chunk-wf4z9w5x.js} +2 -2
- package/dist/chunk-wfk50eh6.js +2 -0
- package/dist/{chunk-qkn0y5wx.js → chunk-wxafew32.js} +2 -2
- package/dist/chunk-wxjm3mq8.js +2 -0
- package/dist/chunk-x0m4ctqf.js +2 -0
- package/dist/{chunk-eynwjzqp.js → chunk-x9rppnkq.js} +2 -2
- package/dist/{chunk-7tw7rn0m.js → chunk-xca0vnvk.js} +2 -2
- package/dist/chunk-xk41ehy8.js +2 -0
- package/dist/{chunk-pebkk426.js → chunk-xmy7ebed.js} +2 -2
- package/dist/{chunk-rn54592t.js → chunk-xpj8gb9a.js} +2 -2
- package/dist/chunk-xpts50f0.js +2 -0
- package/dist/chunk-xqsfaaae.js +2 -0
- package/dist/{chunk-bapn03er.js → chunk-y5xjf5sb.js} +2 -2
- package/dist/chunk-y780cd4m.js +2 -0
- package/dist/{chunk-m2n6sxf8.js → chunk-ybwevt5n.js} +2 -2
- package/dist/{chunk-e00dz09f.js → chunk-yc7w1en3.js} +2 -2
- package/dist/{chunk-ncgwbdmj.js → chunk-yfb5hj4w.js} +2 -2
- package/dist/{chunk-52wrk1mh.js → chunk-ymgc4317.js} +2 -2
- package/dist/{chunk-84ncszbf.js → chunk-yn3d949k.js} +2 -2
- package/dist/chunk-ynp45k84.js +2 -0
- package/dist/{chunk-7zww33h8.js → chunk-yqhvxm9m.js} +2 -2
- package/dist/{chunk-ermc9p1p.js → chunk-z930082m.js} +2 -2
- package/dist/{chunk-81838qem.js → chunk-zcfsbgvw.js} +2 -2
- package/dist/chunk-zewseva6.js +2 -0
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/disclosure-state.js +1 -1
- package/dist/codex/edited-files-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/codex/markdown.css +4 -0
- package/dist/codex/navigation-audio.js +1 -1
- package/dist/codex/navigation-preview.js +1 -1
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/patch-view.js +1 -1
- package/dist/codex/plan.js +1 -1
- package/dist/codex/timeline-virtualizer.js +1 -1
- package/dist/codex/turn-activity.js +1 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/locales.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-filter.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/completion-trigger.js +1 -1
- package/dist/composer/effort-slider.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/menu-radio.js +1 -1
- package/dist/composer/model-select.js +1 -1
- package/dist/composer/permission-mode-select.js +1 -1
- package/dist/composer/prompt-input-attachments.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-context.d.ts +2 -0
- package/dist/composer/prompt-input-context.js +1 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/composer/prompt-input.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/app-mentions.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/config-options.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.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.d.ts +1 -0
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.d.ts +3 -2
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/load-image.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.d.ts +2 -2
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.d.ts +4 -1
- package/dist/desktop/native-file-drop.js +1 -1
- package/dist/generated/commands.js +1 -1
- package/dist/image-lightbox.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/image.js +1 -1
- package/dist/lib/app-reference.js +1 -1
- package/dist/lib/application-metadata.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/code-highlighter.js +1 -1
- package/dist/lib/file-url.js +1 -1
- package/dist/lib/fuzzy.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/image-encode.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-parser.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/pointer-centered-zoom.js +1 -1
- package/dist/lib/prepare-prompt-files.js +1 -1
- package/dist/lib/reference-presentation.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/lib/tool-artifacts.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/mermaid/diagram.js +1 -1
- package/dist/mermaid/export.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/mermaid/preview.js +1 -1
- package/dist/oauth/claude-login.js +1 -1
- package/dist/oauth.js +1 -1
- package/dist/plugins/catalog-header.js +1 -1
- package/dist/plugins/catalog-skeleton.js +1 -1
- package/dist/plugins/host.js +1 -1
- package/dist/plugins/locales.js +1 -1
- package/dist/plugins/new-chat-directory.js +1 -1
- package/dist/plugins/panel-item.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugin-icon.js +1 -1
- package/dist/plugins/plugin-icons.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/read-skill-document.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/plugins/store.js +1 -1
- package/dist/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/find-bar.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/archived-sessions.js +1 -1
- package/dist/session-list/help-menu.js +1 -1
- package/dist/session-list/highlight.js +1 -1
- package/dist/session-list/host.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation-store.js +1 -1
- package/dist/session-list/navigation-tabs.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/overflow-marquee.js +1 -1
- package/dist/session-list/platform.js +1 -1
- package/dist/session-list/row-stop-button.js +1 -1
- package/dist/session-list/session-groups.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/session-state-dot.js +1 -1
- package/dist/session-list/session-state-menu.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/shortcut.js +1 -1
- package/dist/session-list/sidebar-overlay.js +1 -1
- package/dist/session-list/trailing-swap.js +1 -1
- package/dist/session-list/use-activity-notification.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-list/use-cmd-held.js +1 -1
- package/dist/session-list/use-project-sessions.js +1 -1
- package/dist/session-list/virtual-session-rows.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.d.ts +4 -0
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/history-timeline.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/plan.js +1 -1
- package/dist/session-timeline/question-reply.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/timeline-registry.js +1 -1
- package/dist/session-timeline/turn-activity.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turn-retry.js +1 -1
- package/dist/session-timeline/turn-time.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/use-timeline-scroll.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings-bridge.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-0g1hc09b.js +0 -2
- package/dist/chunk-0jg7hgp5.js +0 -2
- package/dist/chunk-24y0mvqf.js +0 -2
- package/dist/chunk-2bbdgf43.js +0 -2
- package/dist/chunk-317w17va.js +0 -2
- package/dist/chunk-3z86hy2s.js +0 -2
- package/dist/chunk-51xk5tw2.js +0 -2
- package/dist/chunk-5x5n3b15.js +0 -2
- package/dist/chunk-6c8wzcja.js +0 -2
- package/dist/chunk-6e84zbgs.js +0 -2
- package/dist/chunk-7hxdns4x.js +0 -2
- package/dist/chunk-8gt8yn8k.js +0 -4
- package/dist/chunk-9nbkggqn.js +0 -2
- package/dist/chunk-9wc4emwt.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-cv0qbty5.js +0 -3
- package/dist/chunk-e1fzfaqj.js +0 -2
- package/dist/chunk-g3y0r56h.js +0 -2
- package/dist/chunk-gdtpwbqn.js +0 -1
- package/dist/chunk-gpv1dc5y.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-nvb46gdw.js +0 -2
- package/dist/chunk-pzwnrxvk.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-v2pa8yak.js +0 -4
- package/dist/chunk-vd6eqshg.js +0 -2
- package/dist/chunk-vqby71fp.js +0 -2
- package/dist/chunk-vzgn8exd.js +0 -2
- package/dist/chunk-w5q2ygsa.js +0 -2
- package/dist/chunk-xe7ep70k.js +0 -2
- package/dist/chunk-y4tj08c1.js +0 -2
- package/dist/chunk-y8gz9rsc.js +0 -2
- package/dist/chunk-z6dx6dnt.js +0 -2
- package/dist/chunk-zft4afb8.js +0 -2
- package/dist/chunk-zm0j9nw3.js +0 -2
- package/dist/chunk-zw4ehzza.js +0 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{e}from"./chunk-2c4hqv8f.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function Zt({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
|
|
2
|
+
export{Zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,a,
|
|
2
|
-
export{
|
|
1
|
+
import{s,a,jn,o,h}from"./chunk-r7z3mvej.js";import{j}from"./chunk-0c956xc0.js";import{Ue}from"./chunk-06aaghwq.js";import{Ge}from"./chunk-jkqh03w4.js";import{Nt,Oe}from"./chunk-j1khvg9s.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 Mo({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=jn(),u=()=>m(e);return n(Ue,{"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:Nt(e.updatedAt,S.language)}):void 0,actions:l!=null?n(Ge,{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(Oe,{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{Mo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Lt}from"./chunk-w7vcd8d1.js";import{d,We}from"./chunk-0f00j53n.js";import{k}from"./chunk-qk1yqepm.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as u}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as i,Fragment as F}from"react/jsx-runtime";function ai(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let s=n.replaceAll("\\","/"),t=s.lastIndexOf("/");return t<=0?"/":s.slice(0,t)}function I(n){let s=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(s.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${s.replace(/\/$/,"")}/${t.join("/")}`}function we({path:n,renderHeader:s,description:t}){let e=d(),{t:l}=e,c=e.readFile,[a,f]=p(null),[v,w]=p(null),[M,N]=p(0);D(()=>{let r=!1;return f(null),w(null),(n===null||!c?Promise.resolve(t??""):c(n)).then((m)=>{if(!r)f(m)},(m)=>{if(!r)w(String(m))}),()=>{r=!0}},[n,t,M,c]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:i(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":l("plugins.card.moreActions")}),children:o(y,{})}),i(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void We(e,e.openPath(n)),children:l("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void We(e,e.revealPath(n)),children:l("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:a===null,onClick:()=>{if(a!==null)We(e,e.copyText(a))},children:l("plugins.skills.document.copy")})]})]});return i(F,{children:[s?s(x):o("div",{className:"flex justify-end",children:x}),o(k,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":l("plugins.skills.document.content")},children:v?i("div",{role:"alert",className:"space-y-3",children:[i("p",{className:"text-destructive text-sm break-words",children:[l("plugins.skills.document.error"),": ",v]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((r)=>r+1),children:l("plugins.loadError.retry")})]}):a===null?i("div",{role:"status","aria-label":l("plugins.skills.loading"),className:"space-y-3",children:[o(u,{className:"h-6 w-1/3"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-full"}),o(u,{className:"h-4 w-2/3"})]}):o(Lt,{text:ai(a),host:{theme:e.theme,copyLabel:l("plugins.copy"),openLink:(r)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(r)||n===null?r:I(`${C(n)}/${r}`))}})})]})}
|
|
2
|
+
export{ai,we};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function
|
|
2
|
-
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function
|
|
3
|
-
export{
|
|
1
|
+
import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function Wr(e){let t=0,i=0;for(let o of e.split(`
|
|
2
|
+
`)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Rt({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
|
|
3
|
+
export{Wr,Rt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c,
|
|
2
|
-
`),T=!t.streaming&&C.trim().length>0?o(
|
|
3
|
-
export{
|
|
1
|
+
import{c,F}from"./chunk-hz8yrg2t.js";import{oe}from"./chunk-vvmmzcms.js";import{as}from"./chunk-bnf6pmgc.js";import{be}from"./chunk-vhxr0c4c.js";import{us,Ht}from"./chunk-kk5acm1s.js";import{ls}from"./chunk-esxjnj1y.js";import{Vo}from"./chunk-6hxz5cpc.js";import{cn as B}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var v=new WeakMap,M=1;function R(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=v.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=M++;return v.set(t,s),`${t.type}:${s}`}function w({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(F,{text:t.text,streaming:n}),s]})}function P({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(w,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(F,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(be,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var I=new Set;function cl({message:t,isMostRecentTurn:n,hiddenTools:s=I,time:i,beforeCopy:r,afterCopy:d,providerIcon:u,renderText:A,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(N,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
|
|
2
|
+
`),T=!t.streaming&&C.trim().length>0?o(Bo,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:d,time:i}):null,l=as(t.content,"compact"),x=l.reduce((e,a,p)=>a.kind==="codexActivityGroup"?p:e,-1),h=l.findIndex((e,a)=>a>x&&e.kind==="block"&&e.block.type==="text"),b=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&oe(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let a=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return a.length===0?null:o(Ht,{blocks:a},`activity:${R(a[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(P,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===b?T:void 0,renderText:A},R(e.block))},m=x===-1?0:h===-1?l.length:h;return o(Go,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:l.slice(0,m).map(k),answer:l.length>m?l.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(ls,{blocks:f}):y(f))})}function Bo({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let d=c(),{t:u}=d;return g("div",{className:B("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o(Vo,{text:t,label:u("actions.copy"),host:d}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function N({label:t}){let{t:n}=c();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t??n("message.thinking")})})}function Go({work:t,answer:n,footer:s,loading:i=!1,loadingLabel:r,...d}){if(i)return o(N,{label:r});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(us,{...d,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
|
|
3
|
+
export{cl,Bo,Go};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{De}from"./chunk-z930082m.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function Er({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:De(t)}):null}function Rr({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Er,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Bn({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Rr,{label:t,shortcut:o}):t})]})}
|
|
2
|
+
export{Er,Rr,Bn};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ci=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
|
|
4
4
|
<stop stop-color="#2BBFFF"/>
|
|
@@ -1286,4 +1286,4 @@ var Jo=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
|
1286
1286
|
</symbol>
|
|
1287
1287
|
</svg>
|
|
1288
1288
|
`;
|
|
1289
|
-
export{
|
|
1289
|
+
export{ci};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)}function I({subject:t,requestTitle:o}){let{host:s}=e();if(!f(t))return null;let i=t.toolCall,l=A(i),r=v(i),u=P(i),d=s.toolTitle?.(i)??i.title;return m("div",{className:"flex flex-col gap-2",children:[d&&d!==o&&l===null&&c("div",{className:"text-sm font-medium",children:d}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[c("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),r!==null&&c("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:c(
|
|
3
|
-
export{
|
|
1
|
+
import{Wi}from"./chunk-4fghmx57.js";import{Ki}from"./chunk-bsqe29dh.js";import{qi}from"./chunk-9162ez1n.js";import{Rt}from"./chunk-smd9rszw.js";import{n}from"./chunk-dxfhy8gr.js";import{e}from"./chunk-2c4hqv8f.js";import{isContentEntry as b,isDiffEntry as w,isFormElicitation as C,isText as j,isToolCallSubject as f,isUrlElicitation as y}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as m}from"react/jsx-runtime";function $e(t){return t.kind==="elicitation"&&C(t.params)}function R(t,o){if(!t.subject||!f(t.subject)||o===void 0)return t;let s={toolCallId:o.id,name:o.name,title:o.title,kind:o.toolKind,content:o.content,locations:o.locations,rawInput:o.rawInput},i=Object.fromEntries(Object.entries(t.subject.toolCall).filter(([,l])=>l!=null));return{...t,subject:{...t.subject,toolCall:{...s,...i}}}}function T(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(w(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function P(t){return(t.content??[]).filter(b).map((o)=>j(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
|
|
2
|
+
`)}function I({subject:t,requestTitle:o}){let{host:s}=e();if(!f(t))return null;let i=t.toolCall,l=A(i),r=v(i),u=P(i),d=s.toolTitle?.(i)??i.title;return m("div",{className:"flex flex-col gap-2",children:[d&&d!==o&&l===null&&c("div",{className:"text-sm font-medium",children:d}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[c("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),r!==null&&c("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:c(Rt,{patch:r,theme:s.theme})}),r===null&&l===null&&u.length>0&&c("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:u}),(i.locations??[]).length>0&&c("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(i.locations??[]).map((a)=>c("li",{className:"truncate font-mono",children:a.path},`${a.path}:${a.line??""}`))})]})}function g(t,o){let{host:s,client:i}=e();return(l)=>{try{if(o)o(t.id,l);else i.respond(t.id,l)}catch(r){if(s.reportError)s.reportError(r);else console.error(r)}}}function E({action:t,total:o,onRespond:s}){let{host:i}=e(),l=g(t,s),r=t.params.subject,u=r&&f(r)?r.toolCall.toolCallId:null,d=n((p)=>p.sessions[t.sessionId]?.items.find((h)=>h.kind==="tool"&&h.id===u)),a=R(t.params,d),x=i.permissionTitle?.(a)??a.title;return m(Wi,{requestId:t.id,title:x,alwaysLabel:i.t("approval.always"),autoFocus:"if-idle",total:o,options:a.options.map((p)=>({...p,description:T(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[a.description&&c("div",{className:"text-muted-foreground mt-0.5 text-xs",children:a.description}),a.subject&&c(I,{subject:a.subject,requestTitle:x})]})}function lt({action:t,total:o,onRespond:s}){let{host:i}=e(),l=g(t,s),r=n((u)=>t.sessionId===null?void 0:u.sessions[t.sessionId]);return c(Ki,{requestId:t.id,schema:t.params.requestedSchema,message:r?.subagent?`${r.title??i.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:i.t,onRespond:l})}function Ce({action:t,total:o,onRespond:s}){let{host:i}=e(),l=g(t,s);if(t.kind==="permission")return c(E,{action:t,total:o,onRespond:s});if($e(t))return c(lt,{action:t,total:o??1,onRespond:s});let r=t.params;if(!y(r))throw Error("Unsupported elicitation mode");return c(qi,{message:r.message,url:r.url,t:i.t,onOpen:i.openLink,onRespond:(u)=>l(u==="cancel"?{action:"cancel"}:{action:"decline"})})}
|
|
3
|
+
export{$e,lt,Ce};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{F}from"./chunk-hz8yrg2t.js";import{t}from"./chunk-dxfhy8gr.js";import{D}from"./chunk-epdnafa1.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(F,{text:e.text,streaming:o})})}if(i.isImage(e))return n(D,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(D,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Te({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
|
+
export{Te};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var pl=280;function ys({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function rt({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function Wo({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function xs({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function bs({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function Cs({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
|
|
2
|
+
export{pl,ys,rt,Wo,xs,bs,Cs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{mr}from"./chunk-hqfhb4ng.js";import{ge}from"./chunk-pv7t4hw8.js";var t={chat:mr,image:ge};function et(n){return Object.hasOwn(t,n)}function Re(n){if(!et(n))throw Error(`Unsupported input mode: ${n}`);return t[n]}function ia(n){if(n===null)return"chat";let o=n.mode;if(!et(o))throw Error(`Unsupported input mode: ${o}`);return t[o].parseConfig(n.config),o}
|
|
2
|
+
export{et,Re,ia};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u,uo}from"./chunk-6ja6pt5x.js";import{_n}from"./chunk-nravn5bk.js";import{useEffect as p,useRef as P,useState as m}from"react";var zi="providers:changed",Vi="providers:managed-revoked",i=(e)=>e;function fn(){return{read:()=>i(u.providersRead()),save:(e,r,t)=>i(u.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(u.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(u.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>u.providersTest({providerId:e}),apply:()=>i(u.providersApply()),onChanged:(e)=>uo[zi].listen((r)=>e(r.payload))}}function $s(){return{bind:(e)=>u.providersAccountBind({account:e}),refresh:(e,r)=>i(u.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await u.providersClearManaged()},onRevoked:(e)=>uo[Vi].listen((r)=>e(r.payload.sessionIds))}}async function hn(e){try{return await e.apply()}catch(r){if(!_n(r))throw r;return e.read()}}function vn(e,r=console.error){let[t,d]=m(null),a=P(r);return a.current=r,p(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
|
|
2
|
+
export{zi,Vi,fn,$s,hn,vn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{c}from"./chunk-hz8yrg2t.js";import{fs}from"./chunk-fvw65b49.js";import{le}from"./chunk-dxfhy8gr.js";import{T}from"./chunk-fpsn6fmf.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function it(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let s=[];for(let[n,l]of e.content.entries()){if(!b(l))continue;let i=l.content;if(N(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(w(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=le(),[g,y]=v({}),[x,I]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(fs(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let k=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>I((d)=>d+1),children:r(R,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(k,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function ms({blocks:e}){let{t:s}=c(),a=e.flatMap(E),[n,l]=T(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(S,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(C,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(U,{images:a})]})}
|
|
2
|
+
export{it,ms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createStore as I}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function w(a){return a.interface?.displayName??a.name}function v(a){let g={},i=new Map,r=new Map;for(let c of a.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let p=g[c.cwd]??[];if(!p.includes(o.path))p.push(o.path);g[c.cwd]=p}for(let o of c.errors)r.set(o.path,o)}return{skills:[...i.values()],errors:[...r.values()],projects:g}}function A(a){let g=[];for(let i of a.marketplaces)for(let r of i.plugins)if(r.installed)g.push({plugin:r,marketplace:i});return g.toSorted((i,r)=>(r.plugin.installedAt??0)-(i.plugin.installedAt??0))}function
|
|
2
|
-
export{
|
|
1
|
+
import{createStore as I}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function w(a){return a.interface?.displayName??a.name}function v(a){let g={},i=new Map,r=new Map;for(let c of a.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let p=g[c.cwd]??[];if(!p.includes(o.path))p.push(o.path);g[c.cwd]=p}for(let o of c.errors)r.set(o.path,o)}return{skills:[...i.values()],errors:[...r.values()],projects:g}}function A(a){let g=[];for(let i of a.marketplaces)for(let r of i.plugins)if(r.installed)g.push({plugin:r,marketplace:i});return g.toSorted((i,r)=>(r.plugin.installedAt??0)-(i.plugin.installedAt??0))}function li(a){let{plugin:g,marketplace:i}=a;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(a){let{plugin:g,marketplace:i}=a;return{pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function tn(a,g){let i=g??{t:(e)=>e},r=(e,l)=>i.t(e,l),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},p=null,b=null,d=(e)=>S.setState(e),m=()=>S.getState(),y=async(e=!1)=>{if(await m().refresh(void 0,{forceRefetch:e,background:!0}),m().error)throw Error(r("plugins.toast.syncError",{message:m().error}))},f=(e,l)=>d((n)=>{let s={...n.busyIds};if(l===null)delete s[e];else s[e]=l;return{busyIds:s}}),h=(e,l)=>d((n)=>{let s={...n.busyMarketplaces};if(l)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),R=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=m().cwds,l={})=>{let n=l.forceRefetch===!0||p?.forceRefetch===!0,s=l.catalog!==!1||n||p?.catalog===!0;if(p={cwds:e,forceRefetch:n,catalog:s},d({cwds:e,...!l.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(p){let t=p;p=null,d({error:null});try{let[u,P,M]=await Promise.all([a.listSkills(t.cwds,t.forceRefetch),t.catalog?a.listPlugins({...t.cwds.length>0?{cwds:t.cwds}:{},...t.forceRefetch?{forceRefetch:!0}:{}}):null,a.installedPlugins(t.cwds)]);if(p)continue;let E=v(u);d({loadedScope:JSON.stringify(t.cwds),skills:E.skills,skillProjects:E.projects,skillErrors:E.errors,...P?{marketplaces:P.marketplaces,marketplaceLoadErrors:P.marketplaceLoadErrors,featuredPluginIds:P.featuredPluginIds}:{},installed:A(M)})}catch(u){if(!p)d({error:k(u)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in m().busyIds)throw Error("Plugin operation already in progress");let l=w(e.plugin);f(e.plugin.id,"installing");try{let n=await a.installPlugin(li(e));return await y(),f(e.plugin.id,null),c(r("plugins.toast.installed",{pluginName:l})),n}catch(n){throw o(`${r("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,l)=>{if(e.id in m().busyIds)return;f(e.id,"toggling");let n=(t)=>d((u)=>({installed:u.installed.map((P)=>P.plugin.id===e.id?{...P,plugin:{...P.plugin,enabled:t}}:P)}));n(l);let s=e.enabled;try{let t=await a.setPluginEnabled(e.id,l);s=t.enabled,n(t.enabled),await y();let u=m().installed.find((P)=>P.plugin.id===e.id);if(u)s=u.plugin.enabled;if(!u||s!==l)throw Error(r("plugins.toast.toggleNotApplied"));f(e.id,null),c(r(l?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:w(e)}))}catch(t){n(s),o(`${r("plugins.toast.toggleError")}: ${k(t)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in m().busyIds)return;let l=w(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(n),await y(),m().installed.some((s)=>s.plugin.id===e.id))throw Error(r("plugins.toast.uninstallNotApplied"));f(e.id,null),c(r("plugins.toast.uninstalled",{pluginName:l}))}catch(n){o(`${r("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(N(e))).plugin,setSkillEnabled:async(e,l)=>{if(e.path in m().busySkills)return;d((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),d((s)=>({skills:s.skills.map((t)=>t.path===e.path?{...t,enabled:l}:t)}));let n=e.interface?.displayName??e.name;try{let s=await a.setSkillEnabled({path:e.path,enabled:l});if(d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:s.effectiveEnabled}:u)})),s.effectiveEnabled!==l){o(r("plugins.catalog.toggleNotApplied"));return}c(r(l?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:e.enabled}:u)})),o(`${r("plugins.skills.toggleError")}: ${k(s)}`)}finally{d((s)=>{let t={...s.busySkills};return delete t[e.path],{busySkills:t}})}},addMarketplace:async(e)=>{let l=await a.addMarketplace(e);return await y(!0),c(l.alreadyAdded?r("plugins.marketplace.alreadyAdded",{marketplaceName:l.marketplaceName}):r("plugins.marketplace.added",{marketplaceName:l.marketplaceName})),l},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),c(r("plugins.marketplace.removed",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.removeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let l=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),l.errors.length>0)o(`${r("plugins.marketplace.upgradeError")}: ${l.errors.map((n)=>n.message).join("; ")}`);else c(r("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.upgradeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(m().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(r("plugins.marketplace.upgradeAllError"));else c(r("plugins.marketplace.upgradedAll"))}catch(e){o(`${r("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(R,{bindHost:(e)=>{i=e}});return S}
|
|
2
|
+
export{li,tn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
export{
|
|
1
|
+
var ta=(t)=>{let e=t.startsWith("/")&&t!=="/"?t.replace(/\/+$/,""):t,r=/^\/(?:private\/)?(var|tmp|etc)(\/.*)?$/.exec(e);if(!r)return[e];let s=`${r[1]}${r[2]??""}`;return[`/private/${s}`,`/${s}`]};
|
|
2
|
+
export{ta};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function
|
|
2
|
-
export{
|
|
1
|
+
import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function be({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
|
|
2
|
+
export{be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{ei}from"./chunk-hc9bcwpa.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function Qn(t,r,e={}){let o=r.trim();if(o.length===0)return[];return ei(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
|
|
2
|
+
export{Qn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function
|
|
3
|
-
export{
|
|
1
|
+
var dl=["full","compact","codexUI"];function ps(t){return t==="compact"||t==="codexUI"}var ja=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function oe(t){let o=ja.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
|
|
2
|
+
`)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ul(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
|
|
3
|
+
export{dl,ps,ja,oe,ul};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Uo}from"./chunk-ybwevt5n.js";import{XIcon as i}from"lucide-react";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function xe({app:a,remove:e}){return o("span",{"data-app-reference":a.id,title:a.name,className:"inline-flex max-w-full items-baseline gap-1 align-baseline",children:[n(Uo,{kind:"app",name:a.name}),e&&n(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:n(i,{className:"size-3","aria-hidden":"true"})})]})}
|
|
2
|
+
export{xe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function jo(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
|
|
2
|
+
export{jo};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{os}from"./chunk-ybwevt5n.js";import{xe}from"./chunk-vvy4ke91.js";import{Ho}from"./chunk-2c7a0zdc.js";import{C}from"./chunk-x0m4ctqf.js";import{$o,Ut}from"./chunk-fvw65b49.js";import{le,Ko}from"./chunk-dxfhy8gr.js";import{Do}from"./chunk-k0rfgjm6.js";import{Yr,es}from"./chunk-2rk59ngw.js";import{Zr}from"./chunk-yfb5hj4w.js";import{Lo,Qr}from"./chunk-4sj3t6mk.js";import{decodeHTMLAttribute as N,decodeHTMLStrict as y}from"entities";import de from"katex";import{CheckIcon as B,ChevronLeftIcon as ue,ChevronRightIcon as me,CopyIcon as ge,DownloadIcon as fe,FileIcon as he,LinkIcon as pe,MailIcon as ke,XIcon as we}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as D,createElement as X,memo as G,startTransition as be,useContext as J,useEffect as k,useLayoutEffect as V,useMemo as Z,useRef as w,useState as h}from"react";import{jsx as a,jsxs as g,Fragment as ie}from"react/jsx-runtime";var Y=D(!1),Q=D(null);function T(){let e=J(Q);if(e===null)throw Error("Markdown host is missing");return e}var Te=80,H=/\[([^\]\n]+)\]\(([^)\n]+)$/,ve=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,ye=/\uE200[^\uE201]*$/,Ce=4,Me=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function L(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function ee(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Ne(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)&&!ee(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function Le(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!L(e,t)&&!ee(e,t,n))return t;return-1}function Ee(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!L(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function Ie(e){return Ee(e,"```")%2===1}function ne(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!L(e,t))n+=1;t+=1}return n%2===1}function Re(e){return e.endsWith(`
|
|
2
2
|
`)?`${e}\`\`\``:`${e}
|
|
3
3
|
\`\`\``}function _(e,n){if(!e.includes(n)||Ne(e,n)%2===0)return e;let t=Le(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
|
|
4
4
|
`)||ne(r))return e;return`${e}${n}`}function $e(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function te(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Pe(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=te(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let l=d.toLowerCase();if(l.length>Ce&&!Me.has(l))return!1}return!0}function Se(e){let{path:n}=te(e);if($e(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Ae(e){let n=e.match(H);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Pe(t)||Se(t)?e.replace(H,"$1"):`${e})`}function Fe(e){let n=e.replace(ye,"");if(n.length===0||n.includes("`")&&ne(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&Ie(n))return{isCodeFenceOpen:!0,markdown:Re(n)};if(n.includes(")n=Ae(n);return n=_(n,"**"),n=_(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function He(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function O(e){return He(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function re(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))re(t.tokens);if(!O(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!O(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
|
|
5
|
-
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function _e(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?_e(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Oe(e,n){let t;try{t
|
|
6
|
-
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,Te)}function en(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${z(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return z(e.text);default:return""}}function
|
|
7
|
-
export{
|
|
5
|
+
`),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function j(e){return{type:"text",raw:e,text:e}}function _e(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function P(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[j(s)]:[j(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?_e(o):o);P(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))P(n.tokens)}}function Oe(e,n){let t;try{t=$o(e,n)}catch{return}try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}function je({links:e,children:n}){let t=T(),r=Ko();if(t.preview||!r)return a("p",{className:"codex-markdown-paragraph",children:n});return a(es,{links:e})}function We(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function qe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function ze(e){let n=qe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function Ue({href:e}){let n=Z(()=>ze(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ke:o?he:pe;return g("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function Ke({children:e,href:n,title:t}){let r=T(),o=le();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:Oe(n,o)??t,onClick:(s)=>We(s,n,r),children:g("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(Ue,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Be({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=T(),i=w(null),[c,d]=h(null),[l,p]=h(null),[E,b]=h(!1);if(k(()=>{let f=Zr(d,p);return i.current=f,()=>{f.dispose(),i.current=null}},[]),k(()=>{let f=i.current;if(f===null)throw Error("Code highlighter is not mounted");f.update(e,n)},[e,n]),l!==null)throw l;let x=c!==null&&c.code===e&&c.language===n?c.html:null,u=async()=>{b(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),b(!0),window.setTimeout(()=>b(!1),2000)}catch(f){s?.(f)}};return g("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[g("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void u(),children:E?a(B,{}):a(ge,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...x===null?{children:e}:{dangerouslySetInnerHTML:{__html:x}}})})]})}function De({code:e,language:n}){let t=T(),r=J(Y),o=Ko();if(t.preview)return a("span",{children:e});if(!r&&o&&n?.toLowerCase()==="mermaid")return a(Do,{source:e});return a(Xe,{code:e,language:n})}function Xe({code:e,language:n}){let t=w(null),[r,o]=h(!1);if(k(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(Be,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function Ge(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Je({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return g("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),g("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(ue,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(fe,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(me,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(we,{})})]})]})}function Ve(e){return T().preview?a(ie,{children:e.alt}):a(Ze,{...e})}function Ze(e){let{loadImage:n}=T(),t=le(),{src:r}=e,s=!r.startsWith("//")&&(!/^[a-z][a-z\d+.-]*:/i.test(r)||/^file:/i.test(r)||/^[a-z]:[\\/]/i.test(r))&&n!==void 0,[i,c]=h();if(k(()=>{if(!s)return;let d=!0;return(async()=>{let l=Ut(r,t);if(l===null)throw Error("The image does not name a local file");return n(l)})().then((l)=>{if(d)c({source:r,directory:t,url:l})},(l)=>{if(d)c({source:r,directory:t,error:l instanceof Error?l.message:String(l)})}),()=>{d=!1}},[s,n,r,t]),!s)return a(W,{...e});if(i?.source!==r||i.directory!==t)return a("span",{role:"status",children:e.alt});if(i.error!==void 0)return g("span",{role:"alert",title:i.error,children:[e.alt,": ",i.error]});if(i.url===void 0)throw Error("The local image result has no URL");return a(W,{...e,src:i.url})}function W({src:e,alt:n,title:t,allowWide:r}){let o=w(null),[s,i]=h();k(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return g(ie,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(Ge(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Je,{preview:s,setPreview:i})})]})}function Ye({value:e,display:n}){let t=w(null);return V(()=>{if(t.current===null)throw Error("Codex math root is not mounted");de.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var Qe=150,M=null;function q(e,n){let t=M;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),l=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,l-r)},`${n}:${t.generation}:${c.start}`)),i=l}if(i<o)s.push(e.slice(i-r));return s}function oe(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function z(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
|
|
6
|
+
`,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,Te)}function en(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${z(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return z(e.text);default:return""}}function ae(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${oe(en(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ae(r),s=t.get(o)??0;return t.set(o,s+1),se(r,`${n}-${o}-${s}`)})}function nn(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return g("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?g("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(B,{}):null]}):null,m(t,n)]},n)}function tn(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function U(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return X(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function rn(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:g("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>U(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=oe(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>U(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=N(e.href);if(!Ho(r))return null;return a(Ve,{src:r,alt:y(e.text),title:e.title==null?void 0:N(e.title),allowWide:t},n)}function se(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return X(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((c)=>c.type!=="space"&&c.type!=="br"),o=t.tokens.filter((c)=>c.type!=="text"||c.raw.trim().length>0);if(o.length>0&&o.every(Yr))return a(je,{links:o,children:m(t.tokens,n)},n);let s=r.length>0&&r.every((c)=>c.type==="image"),i=s&&r.length>1;return a("p",{className:`codex-markdown-paragraph${s?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${i?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":i?"true":void 0,"data-wide-markdown-block":s?"true":void 0,"data-wide-markdown-block-kind":s?"image":void 0,children:s?r.map((c,d)=>K(c,`${n}-image-${d}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?a(os,{text:y(t.text),children:q(y(t.text),n)},n):m(t.tokens,n)}case"escape":return q(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=N(t.href),s=C(o);if(s!==null)return a(xe,{app:{id:s,name:y(t.text).replace(/^\$/,"")}},n);return Ho(o)?a(Ke,{href:o,title:t.title==null?void 0:N(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(De,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return tn(e,n);case"list_item":return nn(e,n);case"table":return rn(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Ye,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function v(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?y(n.text):n.tokens.map(v).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(v).join("");case"list":return e.items.map(v).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(v).join("")).join("")).join("")}default:return""}}function on({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=M;try{return M={cursor:t,runs:r,generation:o},se(e,n)}finally{M=s}}var an=G(function({result:n}){let{text:t,isStreaming:r}=n,o=Z(()=>{let u=n.tokens;if(n.source.includes("!["))re(u);P(u);let f=new Map,S=0;return u.map((I)=>{let R=ae(I),A=f.get(R)??0;f.set(R,A+1);let F=v(I),ce={token:I,tokenKey:`root-${R}-${A}`,offset:S,visibleText:F};return S+=F.length,ce})},[n]),s=o.map((u)=>u.visibleText).join(""),i=w({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),l=d?c.visibleText.length:0,p=performance.now(),E=r&&d?c.runs.filter((u)=>p-u.firstSeenAtMs<Qe):[],b=c.generation+(d?0:1),x={text:t,visibleText:s,runs:E.filter((u)=>u.start<s.length).map((u)=>({...u,end:Math.min(u.end,s.length)})),generation:b};if(r&&s.length>l)x.runs.push({start:l,end:s.length,firstSeenAtMs:p});return V(()=>{i.current=x}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((u)=>a(on,{token:u.token,tokenKey:u.tokenKey,offset:u.offset,runs:x.runs,generation:b},u.tokenKey))})}),sn=G(function({text:n,isStreaming:t}){let r=w(null),[o,s]=h(()=>Lo(n,t)),i=w(o!==null),[c,d]=h(null);if(k(()=>{let l=Qr((p)=>{if(!i.current)i.current=!0,s(p);else be(()=>s(p))},d);return r.current=l,()=>{l.dispose(),r.current=null}},[]),k(()=>{let l=r.current;if(l===null)throw Error("Markdown parser is not mounted");let p=t?Fe(n).markdown:n;l.update({source:p,text:n,isStreaming:t})},[t,n]),c!==null)throw c;return o===null?a("div",{"data-markdown-pending":!0}):a(an,{result:o})});function Lt({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return k(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(Q.Provider,{value:t,children:a(Y.Provider,{value:r,children:a(sn,{text:r?o:e,isStreaming:r})})})}
|
|
7
|
+
export{Lt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function Kr(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
|
|
2
|
+
export{Kr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{m}from"./chunk-189aq7st.js";import{a,o}from"./chunk-r7z3mvej.js";import{E,v,f,ae}from"./chunk-06aaghwq.js";import{M,me,$i}from"./chunk-gdn4vvks.js";import{gt}from"./chunk-bbvhgh27.js";import{B,ie}from"./chunk-yc7w1en3.js";import{Ie,pe}from"./chunk-fednb216.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 he,PlusIcon as se,StarIcon as be,Trash2Icon as ce}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}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 oe,DialogHeader as te,DialogTitle as ne}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as z,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as s,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:b}){let{attributes:w,listeners:N,setNodeRef:i,transform:p,transition:u,isDragging:x}=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",x&&"opacity-50"),...w,...N,role:"group",children:b})}function Be({collection:l,children:C,onEdit:b,onConfirm:w,onNewChat:N}){let{t:i}=M(),p=pe(),u=me(),{attributes:x,listeners:d,setNodeRef:I,transform:P,transition:T,isDragging:K}=le({id:l.id,disabled:{draggable:l.id===B,droppable:!1},data:{type:"collection"}});return e("div",{ref:I,style:{transform:re.Transform.toString(P),transition:T},className:F("w-full min-w-0",K&&"opacity-50"),children:e(ae,{open:!l.collapsed,onOpenChange:(c)=>u(p({type:"collapse",id:l.id,collapsed:!c})),label:ie(l,i),count:l.sessionIds.length,leading:l.id===B?e(be,{className:"size-3.5"}):e(gt,{emoji:l.emoji,onChange:(c)=>u(p({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...x,...d,role:"group",children:c}),actions:s(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:ie(l,i)}),children:e(Ne,{className:"size-3.5"})})}),e(ke,{children:s(Le,{children:[l.id!==B&&s(z,{onClick:b,children:[e(he,{}),i("collection.rename")]}),s(z,{onClick:N,children:[e(se,{}),i("collection.newChat")]}),s(z,{onClick:()=>w("clear"),children:[e(we,{}),i("collection.clearCollection")]}),l.id!==B&&s(z,{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 Ds({renderRow:l,onSelect:C,onNewChat:b,Scroll:w=He}){let N=M(),{t:i}=N,p=pe(),u=me(),x=a(),{collections:d,order:I}=Ie(),P=o((t)=>t.sessionList),T=o((t)=>t.archivedSessions),K=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...T,...P].map((t)=>[t.sessionId,t])),[T,P]),_=N.isMac??$i(),[y,k]=R(null),[L,O]=R(""),[q,j]=R(""),[S,H]=R(null),[g,J]=R(!1),de=Se(V(ye,{activationConstraint:{distance:5}}),V(Ce,{coordinateGetter:De})),G=I.flatMap((t)=>d[t].collapsed?[]:d[t].sessionIds.flatMap((n)=>{let r=U.get(n);return r&&!r.archived?[r]:[]}));xe(()=>{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||!G[r])return;n.preventDefault(),C(G[r])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[G,_,C]);let ue=({active:t,over:n})=>{if(n===null)return;let r=t.data.current,h=n.data.current;if(r?.type==="session"&&h!==void 0){let Q=h.type==="session"?String(h.collectionId):String(n.id);u(p({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Q,sessionId:String(r.sessionId),index:h.type==="session"?d[Q].sessionIds.indexOf(String(h.sessionId)):void 0}))}else if(r?.type==="collection"&&h?.type==="collection"&&String(n.id)!==B)u(p({type:"reorder",id:String(t.id),index:I.indexOf(String(n.id))}))},A=(t,n)=>{J(!0),u(t.then(n).finally(()=>J(!1)))};return s(ze,{children:[e(w,{children:s(E,{children:[s(f,{className:F(m,"font-normal"),onClick:()=>{k("new"),O(""),j("")},children:[e(v,{children:e(se,{})}),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(x.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:de,collisionDetection:ge,onDragEnd:ue,children:e(W,{items:I,strategy:X,children:e(E,{children:I.map((t)=>e(Be,{collection:d[t],onNewChat:()=>b(t),onEdit:()=>{k(t),O(d[t].name),j(d[t].emoji??"")},onConfirm:(n)=>H({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 K?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(Te,{collectionId:t,sessionId:n,children:l(r,()=>{},t)},n)})})},t))})})})]})}),e(Y,{open:y!==null,onOpenChange:(t)=>{if(!t&&!g)k(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ee,{children:i("collection.collectionName")})]}),s("form",{onSubmit:(t)=>{if(t.preventDefault(),y===null||!L.trim()||g)return;let n=y==="new"?`collection-${crypto.randomUUID()}`:y;A(p([y==="new"?{type:"create",id:n,name:L}:{type:"rename",id:n,name:L},{type:"emoji",id:n,emoji:q}]),()=>k(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(t)=>O(t.target.value),disabled:g}),y!=="new"&&e(gt,{emoji:q,onChange:j}),s(oe,{children:[e(D,{type:"button",variant:"outline",disabled:g,onClick:()=>k(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:g||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:S!==null,onOpenChange:(t)=>{if(!t&&!g)H(null)},children:s(Z,{children:[s(te,{children:[e(ne,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ee,{children:i("collection.confirmCollectionChange",{name:S===null?"":ie(d[S.id],i)})})]}),s(oe,{children:[e(D,{variant:"outline",disabled:g,onClick:()=>H(null),children:i("collection.cancel")}),e(D,{disabled:g,onClick:()=>{if(S!==null)A(p({type:S.type,id:S.id}),()=>H(null))},children:i("collection.confirm")})]})]})})]})}
|
|
2
|
+
export{Ds};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,o}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{a,o}from"./chunk-r7z3mvej.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Vn(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
|
|
2
|
+
export{Vn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s,a,o,h}from"./chunk-r7z3mvej.js";import{V}from"./chunk-mtcxr3ns.js";import{E,ae,Ue}from"./chunk-06aaghwq.js";import{ze,ne,ve}from"./chunk-ezaypwps.js";import{Fr}from"./chunk-qecs9e31.js";import{Ge}from"./chunk-jkqh03w4.js";import{Oe}from"./chunk-j1khvg9s.js";import{De}from"./chunk-z930082m.js";import{Vn}from"./chunk-wxafew32.js";import{Lr}from"./chunk-7g0cbkbp.js";import{ActivityIcon as D}from"lucide-react";import{useEffect as O,useMemo as A}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as C,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function ba({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let R=s(),{t:N}=R,m=o((t)=>t.runStates),S=o((t)=>t.drafts),u=o((t)=>t.sessionList),v=ne((t)=>t.activityOrder),p=A(()=>v.flatMap((t)=>{let e=m[t];return e&&ze({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=A(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=ne((t)=>t.activityCollapsedGroups),n=ve(),L=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),x=(t)=>{if(b?.(t))return;d(t)},P=Lr();O(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Fr(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=L[r-1];if(!y)return;e.preventDefault(),x(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let I=(t)=>{let e=L.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&P?c(G,{children:De(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(E,{children:g.map((t)=>t.key==="foreground"?c(E,{children:t.rows.map(I)},t.key):c(ae,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);n({activityCollapsedGroups:r})},leading:c(D,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(I)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:R,actions:N,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=Vn(i.sessionId,d);return C(H,{children:[c(Ue,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Oe,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:R,hint:S,actions:c(Ge,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((n)=>C("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(V,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
|
+
export{ba};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ye}from"./chunk-2c7a0zdc.js";function C(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ft(e){if(!e.includes("app://"))return[];let n=ye(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=C(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function ts(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function ns(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
|
|
2
|
+
export{C,Ft,Pa,ts,ns};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Hn}from"./chunk-7jk8s061.js";function wo(t){let n=t?.match(/^gateway:custom-[^:]+:(.+)$/);if(!n)return null;let l=decodeURIComponent(n[1]),e=Hn.models.find((o)=>o.slug===l);return e?{value:e.default_reasoning_level,hidden:e.supported_reasoning_levels.length===0}:null}
|
|
2
|
+
export{wo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ee(n){if(typeof n!=="object"||n===null)return!1;let e=n,t=e.reason??e.message;return e.code===-32000&&typeof t==="string"&&/^Authentication required(?:$|:)/.test(t)}function Dn(n){if(typeof n!=="object"||n===null)return!1;let e=n,t=typeof e.data==="object"&&e.data!==null?e.data.details:e.data;return[e.message,e.reason,t].some((o)=>typeof o==="string"&&["The selected provider connection or model is unavailable","The selected model connection is unavailable","The selected ALwith account model is unavailable","The ALwith account changed"].some((a)=>o.includes(a)))}function oa(n,e){if(!(n instanceof Error))return n;let t=n.data,o=typeof t==="string"?t:typeof t==="object"&&t!==null?t.details:void 0;if(typeof o!=="string"||o.trim()==="")return n;return n.message=`${e}: ${o}`,n}
|
|
2
|
+
export{ee,Dn,oa};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{t}from"./chunk-dxfhy8gr.js";import{Ht}from"./chunk-kk5acm1s.js";import{vi}from"./chunk-7sf2wz1n.js";import{D}from"./chunk-epdnafa1.js";import{io}from"./chunk-azak3tb5.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(D,{block:e.content},`${n.id}:${l}`))]})}var Yn=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(io),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={...vi(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(Ht,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
|
|
2
|
+
export{Yn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{
|
|
1
|
+
import{Bn}from"./chunk-sykf5jnc.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function sa({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(Bn,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
|
|
2
|
+
export{sa};
|
|
@@ -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 wt(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 kt(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Rn(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 Ln(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Rn(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,wt,kt,Rn,ea,Ln};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{n}from"./chunk-dxfhy8gr.js";import{e,x}from"./chunk-2c4hqv8f.js";import{QUICK_CHATS_GROUP as I,sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as P}from"cn";import{FolderClosedIcon as m,FolderPlusIcon as G,XIcon as j}from"lucide-react";import{useEffect as O,useMemo as R,useState as S}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as A,DropdownMenuContent as F,DropdownMenuGroup as T,DropdownMenuItem as k,DropdownMenuRadioGroup as B,DropdownMenuRadioItem as E,DropdownMenuSeparator as U,DropdownMenuTrigger as _}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as r,jsxs as s,Fragment as H}from"react/jsx-runtime";function M(t){return t.replaceAll("\\","/").replace(/\/+$/,"").split("/").pop()||t}function ws({cwd:t,onChange:u,preparing:b=!1,recentProjects:g}){let{host:i,client:p}=e(),{t:l}=i,w=n((o)=>o.projectContext),v=n((o)=>o.sessionList),y=R(()=>g??[...new Set([...v].toSorted((o,f)=>(f.updatedAt??"").localeCompare(o.updatedAt??"")).map((o)=>o.cwd))],[g,v]),[c,N]=S(null);O(()=>{if(!p.refreshProjectContext)return;let o=!0;return x(i,p.refreshProjectContext(!0).then((f)=>{if(o)N(f.chatDirectory)})),()=>{o=!1}},[i,p]);let h=[...t!==null?[t]:[],...y.filter((o)=>o!==t)].filter((o)=>o!==c&&(!w||z(w,{cwd:o}).id!==I)),a=t!==null&&t!==c,D=()=>{if(c===null)throw Error("The default draft directory is not ready");u(null)},d=i.chooseFolder;return s(A,{children:[s("div",{"aria-busy":b,className:P("chat-project-picker group/project inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full",a?"text-foreground ps-2":"text-foreground/65"),children:[a&&s(C,{variant:"ghost",size:"icon-xs",className:"relative size-4 rounded-full p-0 hover:bg-transparent dark:hover:bg-transparent","aria-label":l("conversation.draft.workOutsideProject"),title:l("conversation.draft.workOutsideProject"),disabled:c===null,onClick:D,children:[r(m,{className:"size-4 group-hover/project:opacity-0"}),r("span",{className:"bg-muted-foreground text-background absolute inset-0 flex items-center justify-center rounded-full opacity-0 group-hover/project:opacity-100",children:r(j,{className:"size-3"})})]}),s(_,{render:r(C,{variant:"ghost",size:"sm",className:P("h-7 min-w-0 shrink gap-1.5 rounded-full py-0 text-sm font-normal text-inherit hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent",a?"ps-0 pe-2":"px-2")}),children:[!a&&r(m,{className:"size-4"}),r("span",{className:"truncate",children:a?M(t):l("conversation.draft.selectProject")})]})]}),s(F,{side:"top",align:"start",className:"w-72 overflow-hidden",children:[h.length>0&&s(H,{children:[r("div",{className:"max-h-64 overflow-y-auto",children:r(B,{value:t??"",onValueChange:u,children:h.map((o)=>s(E,{value:o,title:o,closeOnClick:!0,children:[r(m,{}),r("span",{className:"truncate",children:M(o)})]},o))})}),(d!==void 0||a)&&r(U,{})]}),(d!==void 0||a)&&s(T,{children:[d&&s(k,{onClick:()=>{x(i,d(t).then((o)=>{if(o!==null)u(o)}))},children:[r(G,{}),l("conversation.draft.newProject")]}),c!==null&&a&&s(k,{onClick:D,children:[r(j,{}),l("conversation.draft.workOutsideProject")]})]})]})]})}
|
|
2
|
+
export{ws};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b}from"./chunk-52hvpdxw.js";import{Ct}from"./chunk-dzw6vqqf.js";import{e}from"./chunk-2c4hqv8f.js";import{yt,G}from"./chunk-nravn5bk.js";import{wn,Ee}from"./chunk-7ckdhz5y.js";import{Ae}from"./chunk-q98s7d94.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function Qs({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:b.id,name:b.name,models:t===void 0?[{api_id:"",label:b.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:yt(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:G(o.id,i.id),label:i.label??i.id}))}))],p=Ee(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(Ct,{value:{...m,label:wn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Ae,{})},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{Qs};
|