@huanlin/dsh-plugin-yet-another-subagent 0.1.5 → 0.1.6

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 +15 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -3020,8 +3020,21 @@ window.__ModuleLoader__.load({
3020
3020
  zh,
3021
3021
  en
3022
3022
  }), "ya-subagent: dictionaries");
3023
- const betterLocale = ctx.get("betterLocale");
3024
- if (betterLocale) ctx.effect(() => betterLocale.register(NS, dicts), "ya-subagent: better-locale override dicts");
3023
+ ctx.effect(() => {
3024
+ let dispose;
3025
+ const sync = () => {
3026
+ dispose?.();
3027
+ dispose = void 0;
3028
+ const store = ctx.get("betterLocale");
3029
+ if (store !== void 0) dispose = store.register(NS, dicts);
3030
+ };
3031
+ sync();
3032
+ const unsubscribe = ctx.locale.subscribe(sync);
3033
+ return () => {
3034
+ unsubscribe();
3035
+ dispose?.();
3036
+ };
3037
+ }, "ya-subagent: better-locale override dicts");
3025
3038
  const connection = ctx.connection;
3026
3039
  const t = ctx.locale.bind(NS);
3027
3040
  const profileLabels = /* @__PURE__ */ new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huanlin/dsh-plugin-yet-another-subagent",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },