• Will Chen's avatar
    Selected component engine (#1562) · d571d303
    Will Chen 提交于
    <!-- This is an auto-generated description by cubic. -->
    
    ## Summary by cubic
    Enable the Dyad Engine to prioritize a user-selected component by
    flagging the file as focused and sending codebase files per request.
    Keeps full context when the engine is on; falls back to path-scoped
    context when it’s off.
    
    - **New Features**
    - Mark the selected component file as focused when the engine is
    enabled.
    - Send codebase files to the engine via dyadFiles, applied to
    dyad_options unless disabled.
    - Maintain full chatContext with engine; restrict to the selected file
    path only when engine is off.
    
    - **Refactors**
    - Removed files from getModelClient and provider APIs; file transport
    moved into request payload.
    - Stream handlers now pass files to model calls and include
    dyadDisableFiles/dyadFiles in the request.
      - Added focused flag to CodebaseFile.
    
    <!-- End of auto-generated description by cubic. -->
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Sends codebase files per request to the Dyad Engine, focuses the
    selected component when smart context is enabled, and refactors model
    client/provider APIs to remove file parameters.
    > 
    > - **Engine integration**:
    > - Send codebase files per request via `dyadFiles` in provider options;
    propagate through `simpleStreamText` and `dyad-engine` options.
    > - Add `isSmartContextEnabled` from `get_model_client` and gate context
    behavior accordingly.
    > - **Selected component focus**:
    > - When smart context is on and a component is selected, mark its file
    as `focused` in `CodebaseFile` and avoid broad smart context includes;
    allow on-demand reads.
    > - When smart context is off, restrict `chatContext` to the selected
    file path.
    > - **Refactors**:
    > - Remove `files` parameter from `getModelClient` and Dyad provider;
    move file transport into request body.
    > - Update `llm_engine_provider` to read `dyadFiles` from request and
    populate `dyad_options.files` unless `dyadDisableFiles`.
    > - Extend `CodebaseFile` with optional `focused` flag; thread `files`
    through `chat_stream_handlers` calls.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    022b26d0197ab5b5d4f5b589f45bc230de36e0e5. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    d571d303
名称
最后提交
最后更新
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...