• Will Chen's avatar
    Turbo edit file tool (#2094) · 1e92840b
    Will Chen 提交于
    <!-- CURSOR_SUMMARY -->
    > [!NOTE]
    > Implements targeted file editing via an external API and updates the
    local agent/tooling to use it by default.
    > 
    > - Adds `edit_file` tool
    (`src/pro/main/ipc/handlers/local_agent/tools/edit_file.ts`) calling
    `POST /tools/turbo-file-edit` with original and edit snippets; writes
    returned content; optionally deploys Supabase functions; default consent
    "always"
    > - Registers `edit_file` in `TOOL_DEFINITIONS`; disables
    `search_replace` in `tool_definitions.ts`
    > - Simplifies error handling in tool execution wrapper to output only
    the message (no stack)
    > - Requires Dyad Pro API key from `providerSettings.auto.apiKey`;
    `DYAD_ENGINE_URL` env var overrides default
    > - Updates e2e fixtures and snapshots to use `edit_file` and reflect
    "Turbo Edit" flow; adds fake server endpoint `POST
    /engine/v1/tools/turbo-file-edit` returning a canned result
    > - Snapshot changes show edited content placeholder (`TURBO EDITED
    filePath`) replacing previous search/replace output
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    eec1753aa4805a5633a31f4457ee882b04cafd3b. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Adds a new edit_file tool that uses the Dyad Turbo File Edit API to
    apply targeted edits to existing files and write the result. Also
    disables the search_replace tool and simplifies error output to only
    show the message.
    
    - **Dependencies**
    - Requires Dyad Pro API key in settings (providerSettings.auto.apiKey).
    - DYAD_ENGINE_URL env var can override the default
    https://engine.dyad.sh/v1.
    
    <sup>Written for commit eec1753aa4805a5633a31f4457ee882b04cafd3b.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    1e92840b
名称
最后提交
最后更新
..
azure 正在载入提交数据...
backups 正在载入提交数据...
engine 正在载入提交数据...
gateway 正在载入提交数据...
images 正在载入提交数据...
import-app 正在载入提交数据...
security-review 正在载入提交数据...
1.md 正在载入提交数据...
2.md 正在载入提交数据...
3.md 正在载入提交数据...
4.md 正在载入提交数据...
5.md 正在载入提交数据...
6.md 正在载入提交数据...
add-supabase.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 正在载入提交数据...
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 正在载入提交数据...