@vui-design/openclaw-plugin-feishu-progress 0.4.2 → 0.4.3
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/index.ts +4 -4
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -248,12 +248,12 @@ export default {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
|
|
251
|
-
// agent_end →
|
|
251
|
+
// agent_end → 兜底清理(lifecycle:end 未触发时的保障)
|
|
252
|
+
// 只按 sessionKey 匹配,避免同 agentId 多并发 run 时误清其他 run
|
|
252
253
|
api.on('agent_end', async (_event: any, ctx: any) => {
|
|
254
|
+
if (!ctx.sessionKey) return; // 无 sessionKey 无法精确匹配,跳过
|
|
253
255
|
for (const [runId, state] of runStateMap) {
|
|
254
|
-
|
|
255
|
-
const matchByAgent = !ctx.sessionKey && ctx.agentId && state.agentId === ctx.agentId;
|
|
256
|
-
if (matchBySession || matchByAgent) cleanupRun(runId);
|
|
256
|
+
if (state.sessionKey === ctx.sessionKey) cleanupRun(runId);
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
259
|
},
|