@aka_openclaw_plugin/mychat 0.2.7 → 0.2.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.
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as tryGetMychatRuntime, i as setMychatRuntime, n as init_runtime, t as getMychatRuntime } from "./runtime-CkiGSF1r.js";
|
|
2
|
-
import { t as mychatPlugin } from "./channel-
|
|
2
|
+
import { t as mychatPlugin } from "./channel-DpIIiJYV.js";
|
|
3
3
|
//#region extensions/mychat/api.ts
|
|
4
4
|
init_runtime();
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as init_runtime, o as __toCommonJS, r as runtime_exports, t as getMychatRuntime } from "./runtime-CkiGSF1r.js";
|
|
2
2
|
import { n as resolveMychatAccounts, t as resolveMychatAccount } from "./accounts-BTv5784y.js";
|
|
3
3
|
import { t as mychatConfigSchema } from "./config-schema-CjCqWPdP.js";
|
|
4
4
|
import { createChannelPluginBase, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -707,16 +707,13 @@ async function monitorMychatProvider(ctx) {
|
|
|
707
707
|
if (!health.ok) logger?.warn(`${prefix} health check failed latencyMs=${health.latencyMs} baseUrl=${account.baseUrl}`);
|
|
708
708
|
else logger?.info(`${prefix} health check ok latencyMs=${health.latencyMs}`);
|
|
709
709
|
const { wsClient } = createMychatProviderClients(account, botSelf.botId, logger);
|
|
710
|
-
const
|
|
711
|
-
|
|
710
|
+
const runtimeStore = getMychatRuntime();
|
|
711
|
+
runtimeStore.mychat = {
|
|
712
712
|
accountId: account.accountId,
|
|
713
713
|
httpClient,
|
|
714
714
|
wsClient,
|
|
715
715
|
botSelf
|
|
716
716
|
};
|
|
717
|
-
try {
|
|
718
|
-
setMychatRuntime(ctx.runtime);
|
|
719
|
-
} catch {}
|
|
720
717
|
const handler = createMychatMessageHandler({
|
|
721
718
|
account,
|
|
722
719
|
botSelfId: botSelf.botId,
|
|
@@ -780,7 +777,7 @@ async function dispatchMychatInbound(ctx, httpClient, result) {
|
|
|
780
777
|
const { runtime, channelRuntime, cfg, account } = ctx;
|
|
781
778
|
const logger = ctx.log;
|
|
782
779
|
const prefix = mychatLogPrefix("dispatch");
|
|
783
|
-
const rt =
|
|
780
|
+
const rt = runtime.channel ?? channelRuntime;
|
|
784
781
|
if (!rt?.turn?.run) {
|
|
785
782
|
logger?.error(`${prefix} channel.turn.run not available on runtime, cannot dispatch inbound messageId=${result.context.messageId}`);
|
|
786
783
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mychatPlugin } from "./channel-
|
|
1
|
+
import { t as mychatPlugin } from "./channel-DpIIiJYV.js";
|
|
2
2
|
export { mychatPlugin };
|