@jeik/dingtalk-connector 0.8.27-fix1 → 0.8.27
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/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as initDingtalkPluginConfigSchema, i as dingtalkPlugin, n as setDingtalkRuntime } from "./runtime-
|
|
1
|
+
import { a as initDingtalkPluginConfigSchema, i as dingtalkPlugin, n as setDingtalkRuntime } from "./runtime-DzZo6Gvk.mjs";
|
|
2
2
|
import { t as registerGatewayMethods } from "./gateway-methods--aKsyMs-.mjs";
|
|
3
3
|
//#region index.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveDingtalkAccount } from "./accounts-BAzdqkAV.mjs";
|
|
2
|
-
import { r as CHANNEL_ID, t as getDingtalkRuntime } from "./runtime-
|
|
2
|
+
import { r as CHANNEL_ID, t as getDingtalkRuntime } from "./runtime-DzZo6Gvk.mjs";
|
|
3
3
|
import { n as createLoggerFromConfig } from "./logger-mZ9OSbmD.mjs";
|
|
4
4
|
import { t as dingtalkHttp } from "./http-client-DFWZgO1n.mjs";
|
|
5
5
|
import { i as getOapiAccessToken } from "./utils-CIfI_3Jh.mjs";
|
|
@@ -2267,7 +2267,7 @@ async function handleDingTalkMessageInternal(params) {
|
|
|
2267
2267
|
log?.error?.(`SDK dispatch 失败: ${err.message}`);
|
|
2268
2268
|
const errorText = matchModelErrorText(err.message, { includeCatchAll: true }) ?? `⚠️ 抱歉,处理请求时出错: ${err.message}`;
|
|
2269
2269
|
if (earlyCard) try {
|
|
2270
|
-
await
|
|
2270
|
+
await streamAICard(earlyCard, errorText, true, config, log);
|
|
2271
2271
|
} catch (cardErr) {
|
|
2272
2272
|
log?.error?.(`更新错误卡片失败: ${cardErr.message}`);
|
|
2273
2273
|
}
|
|
@@ -955,7 +955,7 @@ async function monitorDingtalkProvider(opts = {}) {
|
|
|
955
955
|
const log = createLogger(cfg.channels?.["dingtalk-connector"]?.debug ?? false);
|
|
956
956
|
const [accountsModule, monitorAccountModule, monitorSingleModule] = await Promise.all([
|
|
957
957
|
import("./accounts-BQptOmgB.mjs"),
|
|
958
|
-
import("./message-handler-
|
|
958
|
+
import("./message-handler-DQZiKx3i.mjs"),
|
|
959
959
|
import("./connection-fc6B4z4G.mjs")
|
|
960
960
|
]);
|
|
961
961
|
const { resolveDingtalkAccount, listEnabledDingtalkAccounts } = accountsModule;
|
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
uploadAndReplaceFileMarkers
|
|
57
57
|
} from "../services/media/index.ts";
|
|
58
58
|
import { sendProactive, type AICardTarget } from "../services/messaging/index.ts";
|
|
59
|
-
import { createAICardForTarget, streamAICard,
|
|
59
|
+
import { createAICardForTarget, streamAICard, registerActiveCard, type AICardInstance } from "../services/messaging/card.ts";
|
|
60
60
|
import {
|
|
61
61
|
collectCardLookupIds,
|
|
62
62
|
lookupCardContent,
|
|
@@ -1912,7 +1912,7 @@ export async function handleDingTalkMessageInternal(params: HandleMessageParams)
|
|
|
1912
1912
|
// 如果已经建了 AI Card,则更新报错状态到 Card,避免停留在"正在召唤大模型"
|
|
1913
1913
|
if (earlyCard) {
|
|
1914
1914
|
try {
|
|
1915
|
-
await
|
|
1915
|
+
await streamAICard(earlyCard, errorText, true, config, log);
|
|
1916
1916
|
} catch (cardErr: any) {
|
|
1917
1917
|
log?.error?.(`更新错误卡片失败: ${cardErr.message}`);
|
|
1918
1918
|
}
|