Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hifizz
force-pushed
the
feat/user-flow-visualization
branch
from
September 18, 2026 11:48
57b3c19 to
09d7486
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目标
为 ThreadChat 增加类似 Mermaid 的用户流程图能力:用户只需自然语言提出“画个用户流程图”,主模型调用
generate_visualization,由独立低成本模型生成结构化FlowSpec,经过确定性校验与有限 repair 后持久化为data-visualizationmessage part,并在前端以交互式流程图渲染。OpenSpec
本需求以以下 OpenSpec change 为权威跟踪与验收来源:
openspec/changes/add-user-flow-visualization/.openspec.yamlproposal.mddesign.mdspecs/user-flow-visualization/spec.mdtasks.md原设计文档
docs/plans/2026-09-14-user-flow-visualization.md仅作为讨论摘要;冲突时以 OpenSpec 为准。已实现
领域 IR 与校验
FlowSpec/FlowNode/FlowEdge/FlowGroup。FlowSpec是 ThreadChat 自有稳定领域 IR,只描述图的业务语义。position、style、handle、React Flow / Dagre / ELK 等 renderer-specific 字段进入持久化数据。专用低成本模型生成
generate_visualizationTool。private-relay-gpt-5.6-luna,可通过VISUALIZATION_MODEL_ID覆盖,与用户当前聊天模型解耦。FlowSpec。data-visualizationpart。Message 持久化
data-visualizationassistant part。FlowSpec;内部tool-generate_visualizationpayload 不作为最终业务数据持久化。可替换 Renderer
FlowRendererAdapter<TGraph>边界。@dagrejs/dagre做 layout、@xyflow/react做 renderer,不新增图形依赖。FlowSpec可以替换 renderer,而不修改 Tool、持久化 schema 和领域 Verify。前端
VisualizationBlock/FlowCanvas/ node / edge / group renderer。验证
新增路径限定的
VisualizationCI,保护该功能的类型和 renderer-independent 契约:pnpm typechecknode --import tsx e2e/thread-chat/user-flow-visualization.test.mjspnpm exec openspec validate add-user-flow-visualization --strictOpenSpecworkflow (validate --all --strict)当前仍未声称完成:
仓库现有
Agent Evalsworkflow 当前仍有与本功能无关的search-abort.test.mjs失败;Visualization 自己的 typecheck + contract CI 已单独通过。分支
feat/user-flow-visualizationmain