• 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
名称
最后提交
最后更新
..
azure 正在载入提交数据...
backups 正在载入提交数据...
engine 正在载入提交数据...
gateway 正在载入提交数据...
images 正在载入提交数据...
import-app 正在载入提交数据...
security-review 正在载入提交数据...
1.md 正在载入提交数据...
2.md 正在载入提交数据...
3.md 正在载入提交数据...
4.md 正在载入提交数据...
5.md 正在载入提交数据...
6.md 正在载入提交数据...
add-neon.md 正在载入提交数据...
add-safe-dependency.md 正在载入提交数据...
add-supabase.md 正在载入提交数据...
add-unsafe-dependency.md 正在载入提交数据...
basic.md 正在载入提交数据...
chat1.md 正在载入提交数据...
chat2.md 正在载入提交数据...
console-logs.md 正在载入提交数据...
context-limit-response.md 正在载入提交数据...
create-error.md 正在载入提交数据...
create-multiple-errors.md 正在载入提交数据...
create-ts-errors-complex.md 正在载入提交数据...
create-ts-errors.md 正在载入提交数据...
create-unfixable-ts-errors.md 正在载入提交数据...
dyad-write-angle.md 正在载入提交数据...
edit-made-with-dyad.md 正在载入提交数据...
execute-sql-1.md 正在载入提交数据...
execute-sql-no-description.md 正在载入提交数据...
generate-supabase-client.md 正在载入提交数据...
multi-page.md 正在载入提交数据...
network-requests.md 正在载入提交数据...
no-code-response.md 正在载入提交数据...
partial-write.md 正在载入提交数据...
rename-edit.md 正在载入提交数据...
version-integrity-add-edit-delete.md 正在载入提交数据...
version-integrity-move-file.md 正在载入提交数据...
write-index-2.md 正在载入提交数据...
write-index.md 正在载入提交数据...