• Will Chen's avatar
    Code search tool (#2167) · 50ca2fa1
    Will Chen 提交于
    <!-- CURSOR_SUMMARY -->
    > [!NOTE]
    > <sup>[Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) is
    generating a summary for commit
    3cc11d352d12a0f51da474e5e3a281c128f2a9c4. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ## Summary by cubic
    Adds a semantic code search tool to the local agent with an interactive
    UI card, so the agent can find relevant files by meaning, not just text.
    Includes E2E coverage for the full flow.
    
    - New Features
    - code_search tool: gathers project files, calls Dyad Engine
    /tools/code-search, and returns relevant file paths.
    - Streams a dyad-code-search tag while running; shows pending state in
    the UI. Requires a Dyad Pro API key.
    - DyadCodeSearch UI: collapsible card with query preview, results, and
    loading indicator.
    - Markdown parser now passes query and state; tool registered in
    tool_definitions.
    
    - Tests
      - Added E2E spec, fixture, and snapshot for local-agent code search.
    - Fake LLM server includes a mock /engine/v1/tools/code-search endpoint.
    
    <sup>Written for commit 3cc11d352d12a0f51da474e5e3a281c128f2a9c4.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    50ca2fa1
code_search.ts 4.3 KB