@goodandready/dsh-moa 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/lib/client.js +24 -3
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -911,9 +911,12 @@ window.__ModuleLoader__.load({
911
911
  )
912
912
  }
913
913
 
914
- exports.inject = ['slots', 'locale', 'sessions', 'inputTriggers']
914
+ exports.inject = ['slots', 'locale', 'inputTriggers']
915
915
  exports.apply = function apply(ctx) {
916
- ctx.locale.register(NS, {
916
+ const registerLocale = () => {
917
+ try {
918
+ if (ctx.locale && typeof ctx.locale.register === 'function') {
919
+ return ctx.locale.register(NS, {
917
920
  en: {
918
921
  title: 'Mixture of Agents (MoA)',
919
922
  description: 'Run tasks with multiple parallel proposer models and a synthesizing judge model',
@@ -997,8 +1000,26 @@ window.__ModuleLoader__.load({
997
1000
  selectModel: 'Выберите модель...',
998
1001
  },
999
1002
  })
1003
+ }
1004
+ } catch (err) {
1005
+ console.warn('[dsh-moa] locale registration error:', err)
1006
+ }
1007
+ }
1000
1008
 
1001
- const t = ctx.locale.bind(NS)
1009
+ if (typeof ctx.effect === 'function') {
1010
+ ctx.effect(() => registerLocale(), 'dsh-moa: dictionaries')
1011
+ } else {
1012
+ registerLocale()
1013
+ }
1014
+
1015
+ const t = (key) => {
1016
+ try {
1017
+ if (ctx.locale && typeof ctx.locale.bind === 'function') {
1018
+ return ctx.locale.bind(NS)(key) || key
1019
+ }
1020
+ } catch {}
1021
+ return key
1022
+ }
1002
1023
 
1003
1024
  if (ctx.slots) {
1004
1025
  const registerDirectSection = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-moa",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Mixture of Agents (MoA) plugin for DeepSeek Harness with /moa slash command",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",