@ai-setting/roy-agent-core 1.5.60 → 1.5.61
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.
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
builtInHandlers,
|
|
5
5
|
getBuiltInHandler,
|
|
6
6
|
larkCliHandler
|
|
7
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
7
|
+
} from "../../shared/@ai-setting/roy-agent-core-c4a0rte6.js";
|
|
8
8
|
import {
|
|
9
9
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
10
10
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
package/dist/env/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
builtInHandlers,
|
|
64
64
|
getBuiltInHandler,
|
|
65
65
|
larkCliHandler
|
|
66
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
66
|
+
} from "./shared/@ai-setting/roy-agent-core-c4a0rte6.js";
|
|
67
67
|
import {
|
|
68
68
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
69
69
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -459,7 +459,8 @@ class LarkCliInstance {
|
|
|
459
459
|
chatId: replyChannel.chatId,
|
|
460
460
|
userId: replyChannel.params?.userId,
|
|
461
461
|
content: markdown,
|
|
462
|
-
as: "bot"
|
|
462
|
+
as: "bot",
|
|
463
|
+
format: "markdown"
|
|
463
464
|
});
|
|
464
465
|
},
|
|
465
466
|
sendMessage: async (content) => {
|
|
@@ -483,14 +484,15 @@ class LarkCliInstance {
|
|
|
483
484
|
}
|
|
484
485
|
async sendLarkMessage(options) {
|
|
485
486
|
return new Promise((resolve, reject) => {
|
|
486
|
-
const { chatId, userId, messageId, content, as: identity } = options;
|
|
487
|
+
const { chatId, userId, messageId, content, as: identity, format = "text" } = options;
|
|
488
|
+
const contentFlag = format === "markdown" ? "--markdown" : "--text";
|
|
487
489
|
const args = ["im", "+messages-send", "--as", identity];
|
|
488
490
|
if (messageId) {
|
|
489
|
-
args.push("+messages-reply", "--message-id", messageId,
|
|
491
|
+
args.push("+messages-reply", "--message-id", messageId, contentFlag, content);
|
|
490
492
|
} else if (chatId) {
|
|
491
|
-
args.push("--chat-id", chatId,
|
|
493
|
+
args.push("--chat-id", chatId, contentFlag, content);
|
|
492
494
|
} else if (userId) {
|
|
493
|
-
args.push("--user-id", userId,
|
|
495
|
+
args.push("--user-id", userId, contentFlag, content);
|
|
494
496
|
} else {
|
|
495
497
|
reject(new Error("No target specified for sending message"));
|
|
496
498
|
return;
|