• 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
名称
最后提交
最后更新
..
accept-plan.ts 正在载入提交数据...
add-dependency.ts 正在载入提交数据...
ask-read-file.ts 正在载入提交数据...
basic-write.ts 正在载入提交数据...
code-search.ts 正在载入提交数据...
compaction-mid-turn.ts 正在载入提交数据...
compaction-trigger.ts 正在载入提交数据...
connection-drop-after-tool-call.ts 正在载入提交数据...
connection-drop.ts 正在载入提交数据...
exit-plan.ts 正在载入提交数据...
generate-image.ts 正在载入提交数据...
grep-include-ignored.ts 正在载入提交数据...
grep-search.ts 正在载入提交数据...
list-files-include-ignored.ts 正在载入提交数据...
list-files-non-recursive.ts 正在载入提交数据...
list-files-recursive.ts 正在载入提交数据...
mcp-calculator.ts 正在载入提交数据...
parallel-tools.ts 正在载入提交数据...
persistent-todos-resume.ts 正在载入提交数据...
persistent-todos.ts 正在载入提交数据...
questionnaire.ts 正在载入提交数据...
read-logs.ts 正在载入提交数据...
read-then-edit.ts 正在载入提交数据...
run-type-checks.ts 正在载入提交数据...
search-replace.ts 正在载入提交数据...
security-fix.ts 正在载入提交数据...
simple-response.ts 正在载入提交数据...
step-limit.ts 正在载入提交数据...
supabase-deploy-progress.ts 正在载入提交数据...
todo-followup-loop.ts 正在载入提交数据...
upload-to-codebase.ts 正在载入提交数据...
web-fetch.ts 正在载入提交数据...