long file apply code failed
Before submitting your bug report
- [ ] I believe this is a bug. I'll try to join the Continue Discord for questions
- [ ] I'm not able to find an open issue that reports the same bug
- [ ] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS:
- Continue version:
- IDE version:
- Model:
- config:
- name: Morph Fast Apply
provider: openai
model: morph-v3-large
apiKey: ${{ inputs.MORPH_API_KEY }}
apiBase: https://api.morphllm.com/v1/
roles:
- apply
promptTemplates:
apply: |-
<code>{{{ original_code }}}</code>
<update>{{{ new_code }}}</update>
defaultCompletionOptions:
maxTokens: 16000
temperature: 0
OR link to assistant in Continue hub:
https://hub.continue.dev/morphllm/morph-v2?view=config
Description
When applying code edits to files, I've encountered errors, particularly with large source files. I noticed that Continue allows for configuring the "apply" method, and I attempted to use the Morph Fast Apply model. However, due to limitations in context length and maximum output tokens, the current approach of rewriting the entire file fails or results in other errors when the original file is large (e.g., over 1000 lines).
Could Continue consider adopting a strategy similar to the open-source AI IDE, Void, by supporting two distinct modes: "fast apply" and "slow apply"?
Fast Apply: The AI model would only output the specific changes (i.e., a diff or patch). Slow Apply: This would be similar to the current implementation, using a specialized model to rewrite the entire file. This dual-mode approach could provide more robustness and flexibility, especially when dealing with large codebases.
To reproduce
No response
Log output
yeah maxTokens: 16000 should be updated to 38k
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!