Skip to content

fix(quoted): 支持引用卡片消息解析 - #18

Merged
deepcoldy merged 2 commits into
masterfrom
fix/quoted-card-parsing
May 19, 2026
Merged

deepcoldy merged 2 commits into
masterfrom
fix/quoted-card-parsing

Conversation

@DeepColds

Copy link
Copy Markdown
Collaborator

Summary

  • normalize interactive API message content by unwrapping user_dsl before parsing
  • make botmux quoted reuse the same card parsing path as live received messages
  • keep quoted card image resources and [图片 N] placeholders aligned

Test Plan

  • pnpm vitest run test/message-parser.test.ts test/quoted-render.test.ts
  • pnpm exec tsc --noEmit

deepcoldy added 2 commits May 19, 2026 13:59
extractResources / parseApiMessage 已内部 normalize,调用点不必再
显式 unwrap user_dsl;同时把参数重赋值改成 const,缩窄函数可见性。

- quoted-render: 移除多余的 normalizeApiMessageContent 调用,恢复
  单行 extractResources
- message-parser: extractResources 用 const content 替代参数重赋值,
  normalizeApiMessageContent 不再 export
@deepcoldy
deepcoldy merged commit d5bbc36 into master May 19, 2026
@deepcoldy
deepcoldy deleted the fix/quoted-card-parsing branch May 19, 2026 06:29
sensuossss added a commit that referenced this pull request Jun 24, 2026
- #10 daemon-run cold-attach: "一 gate 已自愈 + 另一 gate 仍 pending" 时,resume 重驱
  会自己重发 pending gate 卡,cold-attach 再发一张就重复 → resume 为真时跳过 rec.repost
  (repostBlocked/loopGrant/revisitGrant 恒 resume:false,不受影响)。
- #11 journal: readJournal 原先 mid-file 解析失败也静默跳过 → 丢中间事件会让 replay
  状态失准(丢 nodeSucceeded 节点永远 pending)。改成只容忍"最后一行"半写截断,中间行
  解析失败抛错 fail-loud。
- #13 revisit-grant handler: 补 blocked/loop 都有的幂等恢复——not-budget-blocked
  (已准许、节点不再受阻)时也 driveRun,救回"上次 grant 的 driveRun 没落地"。
- #14 gate handler: already-settled 且 approved 时也 driveRun(幂等恢复),拒绝是终态不重驱。
- #18 architect test: 加注释说明这些是 prompt 教学文案断言、非强制行为;真正强制在
  dag/runtime 套件(含本次新增的 v3-runtime 降权看门测试)。

校验:pnpm build 通过;全量单测(排除 e2e) 6734 passed。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants