mioku-service-webui 4.0.8 → 4.0.9

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/package.json +1 -1
  2. package/system.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mioku-service-webui",
3
- "version": "4.0.8",
3
+ "version": "4.0.9",
4
4
  "description": "Mioku WebUI 服务",
5
5
  "main": "index.ts",
6
6
  "type": "module",
package/system.ts CHANGED
@@ -13,6 +13,7 @@ import type {
13
13
  WebUISettings,
14
14
  } from "./types";
15
15
  import {
16
+ AUTH_PATH,
16
17
  CHAT_CONFIG_DIR,
17
18
  defaultWebUISettings,
18
19
  ensureDir,
@@ -1706,7 +1707,15 @@ async function notifyOwnerWebUIDownloaded(version: string): Promise<void> {
1706
1707
  }
1707
1708
 
1708
1709
  const bot = bots[0];
1709
- const message = `🎉 WebUI 已自动更新到 v${version},记得重启哦~`;
1710
+ const settings = getWebUISettings();
1711
+ const auth = readJsonFile<{ token?: string }>(AUTH_PATH, {});
1712
+ const url = `http://${settings.host}:${settings.port}`;
1713
+ const token = auth?.token || "未设置";
1714
+ const message = [
1715
+ `🎉 WebUI v${version} 已就绪`,
1716
+ `地址: ${url}`,
1717
+ `鉴权密钥: ${token}`,
1718
+ ].join("\n");
1710
1719
 
1711
1720
  for (const ownerId of owners) {
1712
1721
  try {