• wwwillchen-bot's avatar
    fix: update chat history tests for reversed order and improve plan mode tool filtering (#2506) · 485c8b8d
    wwwillchen-bot 提交于
    ## Summary
    - Fix chat_history.spec.ts to expect newest messages at top (reversed
    display order)
    - Update plan_mode.spec.ts to use role selector for Base UI Radio
    component
    - Skip planning-specific tools when NOT in plan mode
    - Simplify chatCompletionHandler.ts user message text extraction
    - Add AGENTS.md learning about Base UI Radio component selection in
    Playwright
    
    ## Test plan
    - [x] All lint checks pass (`npm run fmt && npm run lint:fix && npm run
    ts`)
    - [x] All 669 unit tests pass (`npm test`)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2506">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Fixes E2E tests to match newest-first chat history and corrects
    plan-mode radio selection. Also filters planning-only tools outside plan
    mode and simplifies user message parsing in the fake LLM handler for
    reliable fixture routing.
    
    - **Bug Fixes**
    - Align chat history E2E with newest-first order and correct selection
    behavior.
    - Use role-based selector for Base UI Radio in plan mode E2E; documented
    in AGENTS.md.
      - Skip planning-specific tools when not in plan mode.
    
    - **Refactors**
    - Simplify user message extraction in fake LLM chatCompletionHandler and
    use it for upload-image detection and “exit-plan” routing.
    
    <sup>Written for commit 0682b674e189898876f53cb3bbc9fc22a678a5f7.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    Co-authored-by: 's avatarWill Chen <willchen90@gmail.com>
    Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
    485c8b8d
AGENTS.md 11.0 KB