• 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
名称
最后提交
最后更新
..
fixtures 正在载入提交数据...
helpers 正在载入提交数据...
README.md 正在载入提交数据...
tool_use.eval.ts 正在载入提交数据...