@yaoyuanchao/dingtalk 1.3.9 → 1.3.10
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 +1 -1
- package/src/monitor.ts +12 -4
package/package.json
CHANGED
package/src/monitor.ts
CHANGED
|
@@ -771,15 +771,23 @@ async function deliverCardReply(
|
|
|
771
771
|
const robotCodeValue = robotCode || clientId;
|
|
772
772
|
|
|
773
773
|
// Prepare card data - use 'content' as the main variable for markdown content
|
|
774
|
+
// For basic cards: only send 'content'
|
|
775
|
+
// For AI streaming cards: also send 'flowStatus' and optionally 'title'
|
|
774
776
|
const isStreaming = cardConfig.streamingEnabled;
|
|
775
777
|
const cardData: Record<string, string> = {
|
|
776
778
|
content: text,
|
|
777
|
-
// flowStatus: "0" = streaming, "1" = complete
|
|
778
|
-
flowStatus: isStreaming ? "0" : "1",
|
|
779
|
-
// title: use configured title, or "完成" for non-streaming mode
|
|
780
|
-
title: cardConfig.title || (isStreaming ? "" : "完成"),
|
|
781
779
|
};
|
|
782
780
|
|
|
781
|
+
// Only add flowStatus for streaming cards (AI cards)
|
|
782
|
+
if (isStreaming) {
|
|
783
|
+
cardData.flowStatus = "0"; // "0" = streaming in progress
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
// Only add title if explicitly configured
|
|
787
|
+
if (cardConfig.title) {
|
|
788
|
+
cardData.title = cardConfig.title;
|
|
789
|
+
}
|
|
790
|
+
|
|
783
791
|
log?.info?.("[dingtalk-card] Sending card message, templateId=" + cardConfig.templateId);
|
|
784
792
|
|
|
785
793
|
const result = await sendCardMessage({
|