test(shared): 抽取 AgentHubWorkbench 测试共享 fixtures(#1763 首步) - #1769
test(shared): 抽取 AgentHubWorkbench 测试共享 fixtures(#1763 首步)#1769DeliciousBuding wants to merge 1 commit into
Conversation
- 将 agents / transcript 两个共享数据 fixture 抽到 workbenchTestFixtures.ts(纯数据、带类型,导出 workbenchAgents / workbenchTranscript),测试文件以别名导入。 - 不移动任何 vi.mock / 组件 / render;virtua 仍只在该文件内 mock。 - 测试 78/78 通过(前后一致),tsc --noEmit 0 错误, 主测试文件 3269 → 3134 行(-135)。 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
|
Warning Review limit reached
Next review available in: 57 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
概要(#1763 首步,只做减法)
将
AgentHubWorkbench.test.tsx(3269 行 / 78 用例)中的两个大型共享数据 fixture 抽取为可复用的纯数据模块。抽取内容
app/shared/src/workbench/workbenchTestFixtures.ts(143 行,纯数据、带类型):workbenchAgents: WorkbenchAgent[](原agents,Builder/Reviewer 两个 agent)workbenchTranscript: TranscriptBlock[](原transcript,覆盖 text/tool_call/run_session/thinking/route_decision/subagent/timeline/child_agent/context/diff/artifact/result 共 12 种块)workbenchAgents as agents等),78 个用例的引用点零改动。vi.mock(virtua + @lobehub/icons 约 60 行 mock 原样留在测试文件)、组件或 render 调用。验证
npx tsc --noEmit(app/shared)行数变化