@yahaha-studio/kichi-forwarder 0.0.1-alpha.25 → 0.0.1-alpha.26
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 +3 -21
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -32,13 +32,6 @@ const RUNTIME_CONFIG_PATH = path.join(KICHI_WORLD_DIR, "kichi-runtime-config.jso
|
|
|
32
32
|
const LEGACY_SKILLS_CONFIG_PATH = path.join(KICHI_WORLD_DIR, "skills-config.json");
|
|
33
33
|
const IDENTITY_PATH = path.join(KICHI_WORLD_DIR, "identity.json");
|
|
34
34
|
const MAX_NOTEBOARD_TEXT_LENGTH = 200;
|
|
35
|
-
const MESSAGE_RECEIVED_BUBBLES = [
|
|
36
|
-
"(`・ω・�?�?,
|
|
37
|
-
"( ̄^�?�?,
|
|
38
|
-
"(〃・ิ‿・�?�?,
|
|
39
|
-
"(≧∀�?�?,
|
|
40
|
-
];
|
|
41
|
-
|
|
42
35
|
let cachedConfig: KichiRuntimeConfig | null = null;
|
|
43
36
|
let cachedConfigMtime = 0;
|
|
44
37
|
let cachedConfigPath = "";
|
|
@@ -188,21 +181,10 @@ function resolveStatusSourceId(ctx?: { agentId?: string; sessionKey?: string }):
|
|
|
188
181
|
}
|
|
189
182
|
|
|
190
183
|
async function handleMessageReceivedHook(
|
|
191
|
-
|
|
192
|
-
|
|
184
|
+
_event: any,
|
|
185
|
+
_ctx?: { agentId?: string; sessionKey?: string },
|
|
193
186
|
): Promise<void> {
|
|
194
|
-
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
const sourceId = resolveStatusSourceId(ctx);
|
|
199
|
-
const content =
|
|
200
|
-
typeof event?.content === "string" && event.content.trim()
|
|
201
|
-
? event.content.trim()
|
|
202
|
-
: JSON.stringify(event ?? "new message");
|
|
203
|
-
const bubble = pickRandomAction(MESSAGE_RECEIVED_BUBBLES);
|
|
204
|
-
const context = `${sourceId ? `[${sourceId}] ` : ""}Received: ${content}; bubble=${bubble}`;
|
|
205
|
-
service.sendStatus("", "", bubble, prefixLogTimestamp(truncateLog(context)));
|
|
187
|
+
return;
|
|
206
188
|
}
|
|
207
189
|
|
|
208
190
|
function registerPluginHooks(api: OpenClawPluginApi): void {
|
package/package.json
CHANGED