• 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
名称
最后提交
最后更新
..
ai_messages_utils.ts 正在载入提交数据...
app_env_var_utils.ts 正在载入提交数据...
cleanFullResponse.ts 正在载入提交数据...
cloud_sandbox_provider.test.ts 正在载入提交数据...
cloud_sandbox_provider.ts 正在载入提交数据...
context_paths_utils.ts 正在载入提交数据...
copy_file_utils.ts 正在载入提交数据...
debug_fetch.ts 正在载入提交数据...
dyad_tag_parser.ts 正在载入提交数据...
fallback_ai_model.ts 正在载入提交数据...
file_utils.ts 正在载入提交数据...
findLanguageModel.ts 正在载入提交数据...
framework_utils.test.ts 正在载入提交数据...
framework_utils.ts 正在载入提交数据...
get_model_client.ts 正在载入提交数据...
git_author.ts 正在载入提交数据...
git_utils.ts 正在载入提交数据...
llm_engine_provider.ts 正在载入提交数据...
lm_studio_utils.ts 正在载入提交数据...
lock_utils.ts 正在载入提交数据...
mcp_consent.ts 正在载入提交数据...
mcp_manager.ts 正在载入提交数据...
mcp_tool_utils.ts 正在载入提交数据...
media_cleanup.ts 正在载入提交数据...
media_path_utils.ts 正在载入提交数据...
mention_apps.ts 正在载入提交数据...
migration_utils.ts 正在载入提交数据...
mime_utils.ts 正在载入提交数据...
neon_timestamp_utils.ts 正在载入提交数据...
neon_utils.ts 正在载入提交数据...
ollama_provider.ts 正在载入提交数据...
path_utils.ts 正在载入提交数据...
port_utils.ts 正在载入提交数据...
process_manager.test.ts 正在载入提交数据...
process_manager.ts 正在载入提交数据...
provider_options.ts 正在载入提交数据...
pty_command_runner.test.ts 正在载入提交数据...
pty_command_runner.ts 正在载入提交数据...
read_env.ts 正在载入提交数据...
replacePromptReference.ts 正在载入提交数据...
replaceSlashSkillReference.ts 正在载入提交数据...
resolve_media_mentions.ts 正在载入提交数据...
retryOnLocked.ts 正在载入提交数据...
retryWithRateLimit.ts 正在载入提交数据...
ripgrep_utils.ts 正在载入提交数据...
runShellCommand.ts 正在载入提交数据...
safe_sender.ts 正在载入提交数据...
simpleSpawn.ts 正在载入提交数据...
socket_firewall.test.ts 正在载入提交数据...
socket_firewall.ts 正在载入提交数据...
start_proxy_server.ts 正在载入提交数据...
telemetry.ts 正在载入提交数据...
template_utils.ts 正在载入提交数据...
test_utils.ts 正在载入提交数据...
theme_utils.ts 正在载入提交数据...
thinking_utils.ts 正在载入提交数据...
token_utils.ts 正在载入提交数据...
vercel_utils.ts 正在载入提交数据...
versioned_codebase_context.ts 正在载入提交数据...