Skip to content

morph file edit tool using Fast Apply#1916

Closed
bhaktatejas922 wants to merge 4 commits into
anomalyco:devfrom
morphllm:dev
Closed

morph file edit tool using Fast Apply#1916
bhaktatejas922 wants to merge 4 commits into
anomalyco:devfrom
morphllm:dev

Conversation

@bhaktatejas922
Copy link
Copy Markdown
Contributor

Optional Fast Apply model

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

bhaktatejas922 commented Aug 13, 2025

improves edit performance and speed considerably.

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

still testing this so left it as a draft. Might need some conditional system prompt changes

@bhaktatejas922 bhaktatejas922 marked this pull request as ready for review August 15, 2025 07:01
@adamdotdevin
Copy link
Copy Markdown
Member

still testing this so left it as a draft. Might need some conditional system prompt changes

curious which models you tested this with and what you found? no system prompt changes necessary?

@SMFloris
Copy link
Copy Markdown

SMFloris commented Aug 17, 2025

Tested this with qwen3 and qwen3-coder running on ollama.

What a difference it makes! I didn't find a case where the edit failed yet.

image

P.S. No system prompt changes necessary.

I would ship this ASAP - it makes such a huge difference in quality and it is allot faster.

@adamdotdevin
Copy link
Copy Markdown
Member

i guess my main question remaining is how this interacts with permissions config and other places where we support listing tools (agent config comes to mind). ideally any alt edit tool like this "becomes" the edit tool, so that any config interacting with edit applies to the morphedit tool when you choose to use it instead of the default edit. cc @thdxr

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

i guess my main question remaining is how this interacts with permissions config and other places where we support listing tools (agent config comes to mind). ideally any alt edit tool like this "becomes" the edit tool, so that any config interacting with edit applies to the morphedit tool when you choose to use it instead of the default edit. cc @thdxr

do the changes in the registry not address this?

@adamdotdevin
Copy link
Copy Markdown
Member

i guess my main question remaining is how this interacts with permissions config and other places where we support listing tools (agent config comes to mind). ideally any alt edit tool like this "becomes" the edit tool, so that any config interacting with edit applies to the morphedit tool when you choose to use it instead of the default edit. cc @thdxr

do the changes in the registry not address this?

no, if someone has permissions for an agent configured to "edit: ask", for instance, then that won't get picked up if they're using "morphedit". we need to have a notion of replacing the default "edit" tool, instead

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

i guess my main question remaining is how this interacts with permissions config and other places where we support listing tools (agent config comes to mind). ideally any alt edit tool like this "becomes" the edit tool, so that any config interacting with edit applies to the morphedit tool when you choose to use it instead of the default edit. cc @thdxr

do the changes in the registry not address this?

no, if someone has permissions for an agent configured to "edit: ask", for instance, then that won't get picked up if they're using "morphedit". we need to have a notion of replacing the default "edit" tool, instead

Ah I get it now. Just pushed an update to address this

@adamdotdevin
Copy link
Copy Markdown
Member

sorry, i could have been more clear about what i'm thinking. i'd still expect this morph tool to live in it's own tool definition/file, it should simply replace the edit tool in the registry if enabled. i think of it like the "default app" on iOS (email, calendar, maps, etc.); the user can swap out the default edit tool for their preferred edit tool, with morph being one of those options. does that make sense? this latest approach/commit won't scale well to other tools in the sense that edit.ts will be a mess, we definitely want to isolate each tool in it's own file.

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

sorry, i could have been more clear about what i'm thinking. i'd still expect this morph tool to live in it's own tool definition/file, it should simply replace the edit tool in the registry if enabled. i think of it like the "default app" on iOS (email, calendar, maps, etc.); the user can swap out the default edit tool for their preferred edit tool, with morph being one of those options. does that make sense? this latest approach/commit won't scale well to other tools in the sense that edit.ts will be a mess, we definitely want to isolate each tool in it's own file.

AH ok yeah my bad. the new changes should reflect what youre saying

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

@adamdotdevin good to go?

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

@adamdotdevin lmk if you want to see any other changes made

@matfax
Copy link
Copy Markdown

matfax commented Sep 18, 2025

It would be helpful if it also supported setting the baseUrl to an alternate server, like OpenRouter. There are already existing provider definitions that could be used to define Morph as a provider, and rely on the existing provider api-key definition, not introduce a separate environment variable. The definition of api-keys as environment variables are a separate feature.

Also, I would suggest using a consistent terminology in that this is an 'apply' model, not an 'edit' model. Having a custom edit/instruct model (separate from the agent/orchestrator) would be another feature down the line.

Since there's also a gap in how edits and compacts are hardcoded and not customizeable, a new "support" mode could be introduced that allows the definition of these models as support agents, allowing a definition of the apply, edit, and compact models.

@bhaktatejas922
Copy link
Copy Markdown
Contributor Author

@adamdotdevin lmk if you want me to clean this up a bit if you want to get this in

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 2, 2026

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants