galaxy-opc-plugin 0.3.0 → 0.3.2
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/index.ts +0 -2
- package/package.json +1 -1
- package/src/api/companies.ts +1 -1
- package/src/api/dashboard.ts +1 -1
- package/src/web/config-ui.ts +1 -1
- package/src/web/landing-page.ts +5 -10
package/index.ts
CHANGED
|
@@ -47,7 +47,6 @@ import { registerOrderTool } from "./src/tools/order-tool.js";
|
|
|
47
47
|
import { registerOpcCommand } from "./src/commands/opc-command.js";
|
|
48
48
|
import { triggerEventRules } from "./src/opc/event-triggers.js";
|
|
49
49
|
import { registerConfigUi } from "./src/web/config-ui.js";
|
|
50
|
-
import { registerLandingPage } from "./src/web/landing-page.js";
|
|
51
50
|
|
|
52
51
|
/** 解析数据库路径,支持 ~ 前缀 */
|
|
53
52
|
function resolveDbPath(configured?: string): string {
|
|
@@ -153,7 +152,6 @@ const plugin = {
|
|
|
153
152
|
|
|
154
153
|
// 注册 Web UI
|
|
155
154
|
registerConfigUi(api, db, gatewayToken);
|
|
156
|
-
registerLandingPage(api);
|
|
157
155
|
|
|
158
156
|
// ── 智能刷新器(共享函数,after_tool_call + subagent_ended 共用) ──
|
|
159
157
|
const refreshTimers = new Map<string, ReturnType<typeof setTimeout>>();
|
package/package.json
CHANGED
package/src/api/companies.ts
CHANGED
package/src/api/dashboard.ts
CHANGED
package/src/web/config-ui.ts
CHANGED
package/src/web/landing-page.ts
CHANGED
|
@@ -321,17 +321,12 @@ export function registerLandingPage(api: OpenClawPluginApi): void {
|
|
|
321
321
|
};
|
|
322
322
|
|
|
323
323
|
if (typeof apiAny.registerHttpHandler === "function") {
|
|
324
|
+
// 旧版 openclaw:通过 registerHttpHandler 注册,返回 false 时 openclaw 继续处理聊天 UI
|
|
324
325
|
apiAny.registerHttpHandler(handler);
|
|
325
|
-
|
|
326
|
-
apiAny.registerHttpRoute({
|
|
327
|
-
path: "/",
|
|
328
|
-
handler,
|
|
329
|
-
auth: "plugin",
|
|
330
|
-
match: "prefix",
|
|
331
|
-
});
|
|
326
|
+
api.logger.info("opc: 已注册产品官网 (/)");
|
|
332
327
|
} else {
|
|
333
|
-
|
|
328
|
+
// 新版 openclaw (2026.3.2+):跳过官网注册,保留 openclaw 原生聊天 UI 在 /
|
|
329
|
+
// 用户通过 /opc/admin 直接访问管理后台
|
|
330
|
+
api.logger.info("opc: 跳过官网注册(新版 openclaw,聊天 UI 保留在 /)");
|
|
334
331
|
}
|
|
335
|
-
|
|
336
|
-
api.logger.info("opc: 已注册产品官网 (/)");
|
|
337
332
|
}
|