@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vui-design/openclaw-plugin-feishu-progress",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "飞书任务进度卡片插件 — 在 AI 执行复杂多步骤任务时,实时更新飞书进度卡片",
5
5
  "keywords": [
6
6
  "openclaw-plugin",
package/src/index.ts CHANGED
@@ -248,12 +248,12 @@ export default {
248
248
  }
249
249
  });
250
250
 
251
- // agent_end → 兜底清理(按 sessionKey/agentId 精确匹配,不按 chatId)
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
- const matchBySession = ctx.sessionKey && state.sessionKey === ctx.sessionKey;
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
  },