continue icon indicating copy to clipboard operation
continue copied to clipboard

long file apply code failed

Open murphyXu opened this issue 1 year ago • 3 comments

Before submitting your bug report

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.

Image

To reproduce

No response

Log output


murphyXu avatar Jul 05 '25 10:07 murphyXu

yeah maxTokens: 16000 should be updated to 38k

bhaktatejas922 avatar Sep 19 '25 20:09 bhaktatejas922

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.

github-actions[bot] avatar Dec 20 '25 02:12 github-actions[bot]

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!

github-actions[bot] avatar Dec 30 '25 02:12 github-actions[bot]