You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for separate apply models for diff operations
- Add apply model configuration to provider settings schema
- Create ApplyModelDiffStrategy for using dedicated apply models
- Update Task class to support apply model configuration
- Add comprehensive tests for the new functionality
This addresses issue #5880 by allowing users to configure separate
models like Morph Fast Apply or Relace Instant Apply for applying
changes instead of having the main chat model generate diffs.
Benefits:
- Reduced token consumption for file edits
- Improved reliability for complex changes
- Better performance for continuous edits
- Support for specialized apply models
Description: Request to apply targeted modifications to an existing file using an AI-powered apply model. This tool uses a separate specialized model to understand your intent and apply changes directly to the file content, reducing the need for precise diff formatting and improving reliability.
29
+
30
+
The apply model will analyze the original file content and your change description to generate the appropriate modifications automatically.
31
+
32
+
Parameters:
33
+
- path: (required) The path of the file to modify (relative to the current workspace directory ${args.cwd})
34
+
- changes: (required) A description of the changes you want to make to the file. Be specific about what you want to change, add, or remove.
35
+
36
+
Usage:
37
+
<apply_diff>
38
+
<path>File path here</path>
39
+
<changes>
40
+
Describe the changes you want to make to the file. For example:
41
+
- "Add a new function called calculateTotal that takes an array of numbers and returns their sum"
42
+
- "Update the existing validateUser function to also check for email format"
43
+
- "Remove the deprecated legacy_function and replace its usage with new_function"
44
+
- "Add error handling to the database connection code"
45
+
</changes>
46
+
</apply_diff>
47
+
48
+
Example:
49
+
50
+
<apply_diff>
51
+
<path>src/utils.ts</path>
52
+
<changes>
53
+
Add a new function called formatCurrency that takes a number and returns a formatted currency string with dollar sign and two decimal places. Place it after the existing formatDate function.
// This is a simplified implementation. In a real implementation, you would:
149
+
// 1. Create an API client for the specified provider
150
+
// 2. Make the API call with the prompt
151
+
// 3. Parse and return the response
152
+
153
+
// For now, we'll throw an error to indicate this needs to be implemented
154
+
thrownewError("Apply model API integration not yet implemented. This feature requires connecting to external apply models like Morph Fast Apply or Relace's Instant Apply.")
0 commit comments