@ganglion/xacpx 0.9.0 → 0.9.1
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/README.md +2 -2
- package/dist/bridge/bridge-main.js +11 -1
- package/dist/cli.js +12 -2
- package/dist/i18n/resolve-locale.d.ts +1 -0
- package/dist/plugin-api.js +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@ganglion/xacpx)
|
|
6
6
|
[](https://nodejs.org)
|
|
7
|
-
[](https://zread.ai/gadzan/
|
|
7
|
+
[](https://zread.ai/gadzan/xacpx)
|
|
8
8
|
[](./LICENSE)
|
|
9
9
|
|
|
10
10
|
English · **[中文](./docs/zh/README_zh.md)**
|
|
@@ -281,7 +281,7 @@ Notes:
|
|
|
281
281
|
- In a non-interactive environment, updating the core or plugins needs explicit confirmation: use `xacpx update --all`, or name the target with `xacpx update <name>`.
|
|
282
282
|
- `update` covers the core package and channel plugins; to manage a single plugin's version directly, see `xacpx plugin update <name>` ([docs/plugin-development.md](./docs/plugin-development.md)).
|
|
283
283
|
- After updating, run `xacpx restart` so a running daemon loads the new version.
|
|
284
|
-
- Cross-package rename migration:
|
|
284
|
+
- Cross-package rename migration: this project was renamed `weacpx` → `xacpx`. If you still have the legacy `weacpx` package installed, running `weacpx update` will offer to migrate you across to `xacpx` automatically (you confirm the switch). Already on `xacpx`? Just use `xacpx update` as a normal self-update.
|
|
285
285
|
|
|
286
286
|
## Common chat commands
|
|
287
287
|
|
|
@@ -2976,12 +2976,22 @@ var init_zh = __esm(() => {
|
|
|
2976
2976
|
function isLocale(value) {
|
|
2977
2977
|
return typeof value === "string" && VALID.includes(value);
|
|
2978
2978
|
}
|
|
2979
|
+
function detectSystemLocale() {
|
|
2980
|
+
try {
|
|
2981
|
+
return Intl.DateTimeFormat().resolvedOptions().locale || "";
|
|
2982
|
+
} catch {
|
|
2983
|
+
return "";
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2979
2986
|
function resolveLocale(input = {}) {
|
|
2980
2987
|
const { configLanguage, env = process.env } = input;
|
|
2981
2988
|
if (isLocale(configLanguage))
|
|
2982
2989
|
return configLanguage;
|
|
2983
2990
|
const raw = env.LC_ALL || env.LC_MESSAGES || env.LANG || "";
|
|
2984
|
-
|
|
2991
|
+
if (raw)
|
|
2992
|
+
return /^zh/i.test(raw) ? "zh" : "en";
|
|
2993
|
+
const systemLocale = input.systemLocale ?? detectSystemLocale();
|
|
2994
|
+
return /^zh/i.test(systemLocale) ? "zh" : "en";
|
|
2985
2995
|
}
|
|
2986
2996
|
var VALID;
|
|
2987
2997
|
var init_resolve_locale = __esm(() => {
|
package/dist/cli.js
CHANGED
|
@@ -2209,12 +2209,22 @@ var init_zh = __esm(() => {
|
|
|
2209
2209
|
function isLocale(value) {
|
|
2210
2210
|
return typeof value === "string" && VALID.includes(value);
|
|
2211
2211
|
}
|
|
2212
|
+
function detectSystemLocale() {
|
|
2213
|
+
try {
|
|
2214
|
+
return Intl.DateTimeFormat().resolvedOptions().locale || "";
|
|
2215
|
+
} catch {
|
|
2216
|
+
return "";
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2212
2219
|
function resolveLocale(input = {}) {
|
|
2213
2220
|
const { configLanguage, env = process.env } = input;
|
|
2214
2221
|
if (isLocale(configLanguage))
|
|
2215
2222
|
return configLanguage;
|
|
2216
2223
|
const raw = env.LC_ALL || env.LC_MESSAGES || env.LANG || "";
|
|
2217
|
-
|
|
2224
|
+
if (raw)
|
|
2225
|
+
return /^zh/i.test(raw) ? "zh" : "en";
|
|
2226
|
+
const systemLocale = input.systemLocale ?? detectSystemLocale();
|
|
2227
|
+
return /^zh/i.test(systemLocale) ? "zh" : "en";
|
|
2218
2228
|
}
|
|
2219
2229
|
var VALID;
|
|
2220
2230
|
var init_resolve_locale = __esm(() => {
|
|
@@ -4892,7 +4902,7 @@ var init_ensure_config = __esm(() => {
|
|
|
4892
4902
|
},
|
|
4893
4903
|
channel: {
|
|
4894
4904
|
type: "weixin",
|
|
4895
|
-
replyMode: "
|
|
4905
|
+
replyMode: "verbose"
|
|
4896
4906
|
},
|
|
4897
4907
|
agents: {
|
|
4898
4908
|
codex: { driver: "codex" },
|
package/dist/plugin-api.js
CHANGED
|
@@ -2184,12 +2184,22 @@ var init_zh = __esm(() => {
|
|
|
2184
2184
|
function isLocale(value) {
|
|
2185
2185
|
return typeof value === "string" && VALID.includes(value);
|
|
2186
2186
|
}
|
|
2187
|
+
function detectSystemLocale() {
|
|
2188
|
+
try {
|
|
2189
|
+
return Intl.DateTimeFormat().resolvedOptions().locale || "";
|
|
2190
|
+
} catch {
|
|
2191
|
+
return "";
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2187
2194
|
function resolveLocale(input = {}) {
|
|
2188
2195
|
const { configLanguage, env = process.env } = input;
|
|
2189
2196
|
if (isLocale(configLanguage))
|
|
2190
2197
|
return configLanguage;
|
|
2191
2198
|
const raw = env.LC_ALL || env.LC_MESSAGES || env.LANG || "";
|
|
2192
|
-
|
|
2199
|
+
if (raw)
|
|
2200
|
+
return /^zh/i.test(raw) ? "zh" : "en";
|
|
2201
|
+
const systemLocale = input.systemLocale ?? detectSystemLocale();
|
|
2202
|
+
return /^zh/i.test(systemLocale) ? "zh" : "en";
|
|
2193
2203
|
}
|
|
2194
2204
|
var VALID;
|
|
2195
2205
|
var init_resolve_locale = __esm(() => {
|