@max1874/feishu 0.2.16 → 0.2.18
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/package.json +2 -1
- package/src/bot.ts +10 -7
- package/src/docx.ts +223 -654
- package/src/feishu-renderer.ts +441 -0
- package/src/runtime.ts +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@max1874/feishu",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw Feishu/Lark channel plugin",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@larksuiteoapi/node-sdk": "^1.30.0",
|
|
49
49
|
"@sinclair/typebox": "^0.34.48",
|
|
50
|
+
"marked": "^15.0.12",
|
|
50
51
|
"zod": "^4.3.6"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
package/src/bot.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type HistoryEntry,
|
|
8
8
|
} from "openclaw/plugin-sdk";
|
|
9
9
|
import type { FeishuConfig, FeishuMessageContext, FeishuMediaInfo } from "./types.js";
|
|
10
|
-
import { getFeishuRuntime } from "./runtime.js";
|
|
10
|
+
import { getFeishuRuntime, runWithConversationContext } from "./runtime.js";
|
|
11
11
|
import { createFeishuClient } from "./client.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveFeishuGroupConfig,
|
|
@@ -763,12 +763,15 @@ export async function handleFeishuMessage(params: {
|
|
|
763
763
|
|
|
764
764
|
log(`feishu: dispatching to agent (session=${route.sessionKey})`);
|
|
765
765
|
|
|
766
|
-
const { queuedFinal, counts } = await
|
|
767
|
-
ctx:
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
766
|
+
const { queuedFinal, counts } = await runWithConversationContext(
|
|
767
|
+
{ senderOpenId: ctx.senderOpenId, chatId: ctx.chatId, chatType: isGroup ? "group" : "p2p" },
|
|
768
|
+
() => core.channel.reply.dispatchReplyFromConfig({
|
|
769
|
+
ctx: ctxPayload,
|
|
770
|
+
cfg,
|
|
771
|
+
dispatcher,
|
|
772
|
+
replyOptions,
|
|
773
|
+
}),
|
|
774
|
+
);
|
|
772
775
|
|
|
773
776
|
markDispatchIdle();
|
|
774
777
|
|