• Ryan Groch's avatar
    remove edit_file tool from pro agent (#3268) · eb1ebdb2
    Ryan Groch 提交于
    A few notes:
    - The fallback rule (i.e. if `search_replace` fails twice, use
    `write_file` instead) is included.
    - I also included instructions to use multiple `search_replace` calls
    for moderately large edits with distinct sections. My general
    observation has been that often models tend to lean towards using
    `write_file` rather than `search_replace` when it's ambiguous, so I
    _think_ it should be okay to nudge them towards `search_replace` a
    little bit more. Please correct me if I'm wrong about this.
    - Gemini pointed out that this can lead to a race condition if two
    `search_replace` calls run simultaneously on the same file. I've added
    locks to `search_replace` and `write_file` to account for this just in
    case.
    - Another option would be to extend `search_replace` to account for
    multiple changes so they can get batched, but this would be a larger
    change.
    - I have not changed the basic agent. I can do that if desired.
    - I did do some testing to check that models can still manage with the
    change of prompt. I haven't noticed any issues.
    
    The following snapshots/fixtures have been updated:
    - src/\_\_tests\_\_/\_\_snapshots\_\_/local_agent_prompt.test.ts.snap
    -
    e2e-tests/snapshots/local_agent_basic.spec.ts_local-agent---dump-request-1.txt
    -
    e2e-tests/snapshots/local_agent_basic.spec.ts_local-agent---read-then-edit-1.aria.yml
    - e2e-tests/snapshots/local_agent_basic.spec.ts_after-edit.txt
    -
    e2e-tests/snapshots/local_agent_advanced.spec.ts_local-agent---mention-apps-1.txt
    -
    e2e-tests/snapshots/local_agent_auto.spec.ts_local-agent---auto-model-1.txt
    - e2e-tests/fixtures/engine/local-agent/read-then-edit.ts
    
    Which affect the following tests:
    - src/\_\_tests\_\_/local_agent_prompt.test.ts
    - e2e-tests/local_agent_basic.spec.ts
    - e2e-tests/local_agent_auto.spec.ts
    - e2e-tests/local_agent_summarize.spec.ts
    - e2e-tests/local_agent_advanced.spec.ts
    
    These tests appear to pass.
    
    This PR would also leave a lot of unused code related to `edit_file`,
    which might be worth removing (not sure whether to do this).
    eb1ebdb2
名称
最后提交
最后更新
.agents 正在载入提交数据...
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
.storybook 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
plans 正在载入提交数据...
rules 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.npmrc 正在载入提交数据...
.oxfmtrc.json 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
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 正在载入提交数据...
vitest.eval.config.ts 正在载入提交数据...
windowsSign.ts 正在载入提交数据...