Skip to content

Commit 279ddd8

Browse files
committed
fix(feishu): narrow channel sub-types to match mock in tests
The channel parameter type previously kept the full text and reply sub-types, which the test mockChannel didn't satisfy. Narrow to exact methods used: - text: resolveTextChunkLimit, resolveChunkMode, resolveMarkdownTableMode, convertMarkdownTables, chunkTextWithMode, chunkMarkdownTextWithMode - reply: createReplyDispatcherWithTyping, resolveHumanDelayConfig
1 parent 588c690 commit 279ddd8

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

extensions/feishu/src/reply-dispatcher.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,21 @@ type CreateFeishuReplyDispatcherParams = {
117117
cfg: ClawdbotConfig;
118118
agentId: string;
119119
runtime: RuntimeEnv;
120-
channel: Pick<ReturnType<typeof getFeishuRuntime>["channel"], "text" | "reply">;
120+
channel: {
121+
text: Pick<
122+
ReturnType<typeof getFeishuRuntime>["channel"]["text"],
123+
| "resolveTextChunkLimit"
124+
| "resolveChunkMode"
125+
| "resolveMarkdownTableMode"
126+
| "convertMarkdownTables"
127+
| "chunkTextWithMode"
128+
| "chunkMarkdownTextWithMode"
129+
>;
130+
reply: Pick<
131+
ReturnType<typeof getFeishuRuntime>["channel"]["reply"],
132+
"createReplyDispatcherWithTyping" | "resolveHumanDelayConfig"
133+
>;
134+
};
121135
chatId: string;
122136
allowReasoningPreview?: boolean;
123137
replyToMessageId?: string;

0 commit comments

Comments
 (0)