Skip to content

Commit 9243603

Browse files
nieaoclaude
andcommitted
fix(bot): 反馈卡分支过滤掉项目级伪 ontology (variant=goal/projectMode)
每张反馈卡的第一个 "分支" 都是项目目标节点本身 (含 prompt 文字), 不是真分支. 用 variant=goal / projectMode=true 标记过滤掉. Loop 3 of metacognitive iteration on bot ↔ canvas closed loop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9fc400f commit 9243603

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

server/feishu-bot.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,13 @@ function buildFeedbackCard(room, ctx, conclusionNode, newNodes) {
602602
else if (/NO[\s_-]*GO/i.test(decision)) headerTpl = 'red'
603603

604604
// 列出 ontology (非结论) 分支
605-
const ontologyBranches = newNodes.filter((n) => n.type === 'ontologyNode' && !n.data?.isConclusion)
605+
// 排除项目级伪 ontology — 项目目标节点 (variant=goal) / projectMode=true 是项目根节点本身, 不是真分支
606+
const ontologyBranches = newNodes.filter((n) => {
607+
if (n.type !== 'ontologyNode' || n.data?.isConclusion) return false
608+
if (n.data?.variant === 'goal') return false
609+
if (n.data?.projectMode === true) return false
610+
return true
611+
})
606612
const branchLines = ontologyBranches.slice(0, 8).map((n) => {
607613
const title = String(n.data?.title || n.data?.label || '').slice(0, 60)
608614
const body = String(n.data?.description || n.data?.content || '').slice(0, 80)

0 commit comments

Comments
 (0)