claude-codex-wechat 0.1.20 → 0.1.22

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.
@@ -4953,12 +4953,14 @@ async function restartService(context) {
4953
4953
  if (process.platform === "darwin") {
4954
4954
  const spec = buildLaunchdSpec(context);
4955
4955
  await ensureFileExists(spec.plistPath, "service_not_installed");
4956
+ await runLaunchctl(["load", spec.plistPath]).catch(() => void 0);
4956
4957
  await runLaunchctl(["kickstart", "-k", `gui/${process.getuid?.() ?? 0}/${spec.label}`]);
4957
4958
  return await readServiceStatus(context);
4958
4959
  }
4959
4960
  if (process.platform === "linux") {
4960
4961
  const spec = buildSystemdUserSpec(context);
4961
4962
  await ensureFileExists(spec.unitPath, "service_not_installed");
4963
+ await runSystemctl(["--user", "daemon-reload"]).catch(() => void 0);
4962
4964
  await runSystemctl(["--user", "restart", spec.unitName]);
4963
4965
  return await readServiceStatus(context);
4964
4966
  }
@@ -5470,4 +5472,13 @@ function printUsage() {
5470
5472
  Windows \u91C7\u7528\u540E\u53F0\u8FDB\u7A0B + PID \u6587\u4EF6\u6258\u7BA1\uFF08\u514D\u7BA1\u7406\u5458\uFF09\uFF0C\u4E0D\u968F\u5F00\u673A\u81EA\u542F\uFF0C
5471
5473
  \u91CD\u542F\u7535\u8111\u540E\u9700\u91CD\u65B0\u8FD0\u884C start\u3002`);
5472
5474
  }
5473
- await main();
5475
+ main().catch((error) => {
5476
+ const message = error instanceof Error ? error.message : String(error);
5477
+ if (message === "service_not_installed") {
5478
+ console.error("\u540E\u53F0\u670D\u52A1\u5C1A\u672A\u5B89\u88C5\u3002\u8BF7\u5148\u8FD0\u884C:\n claude-codex-wechat start");
5479
+ } else {
5480
+ console.error(`\u547D\u4EE4\u6267\u884C\u5931\u8D25: ${message}`);
5481
+ console.error("\u53EF\u8FD0\u884C `claude-codex-wechat doctor` \u68C0\u67E5\u73AF\u5883,\u6216 `claude-codex-wechat start` \u91CD\u65B0\u5B89\u88C5\u670D\u52A1\u3002");
5482
+ }
5483
+ process.exitCode = 1;
5484
+ });