aider icon indicating copy to clipboard operation
aider copied to clipboard

deepseek/coder suggests only how to edit the files but doesnt edit it directly. how to make it edit the files and make changes directly on the files?

Open sprappcom opened this issue 1 year ago • 1 comments

Issue

as titled

Version and model info

latest deepseek/deepseek-coder

sprappcom avatar Aug 04 '24 01:08 sprappcom

When reporting problems, it is very helpful if you can provide:

  • Aider version
  • LLM model you are using
  • Any stack traces or error messages
  • A description of what you were doing when the error happened.

Including the “announcement” lines that aider prints at startup is an easy way to share some of this helpful info.

Aider v0.37.1-dev
Models: gpt-4o with diff edit format, weak model gpt-3.5-turbo
Git repo: .git with 243 files
Repo-map: using 1024 tokens

paul-gauthier avatar Aug 05 '24 14:08 paul-gauthier

I can confirm.

Running aider --model deepseek/deepseek-coder

with

Aider v0.47.1
Model: deepseek/deepseek-coder with diff edit format
Git repo: .git with 463 files
Repo-map: using 1024 tokens

and having two files added to context: 99c_target/imports/ui/App.vue 99c_target/imports/ui/Login.vue

and giving the following prompt:

change the code to make 99c_target/imports/ui/Login.vue the entry point of the app

makes aider only giving suggestions instead of changing the code:

To make 99c_target/imports/ui/Login.vue the entry point of your Vue.js application, we need to configure the router to use this component as the default route. Since you've added           
99c_target/imports/ui/App.vue to the chat, we can proceed with the necessary changes.                                                                                                        

Let's assume you have a router configuration file (router.js or index.js) that we need to update. If you don't have one, please let me know, and I'll guide you through creating it.         

Example router.js or index.js (if you have one)                                                                       

                                                                                                                                                                                             
 // router/index.js or router.js                                                                                                                                                             
 import { createRouter, createWebHistory } from 'vue-router';                                                                                                                                
 import Login from '99c_target/imports/ui/Login.vue';                                                                                                                                        
                                                                                                                                                                                             
 const routes = [                                                                                                                                                                            
   {                                                                                                                                                                                         
     path: '/',                                                                                                                                                                              
     name: 'Login',                                                                                                                                                                          
     component: Login                                                                                                                                                                        
   }                                                                                                                                                                                         
   // Add other routes here if needed                                                                                                                                                        
 ];                                                                                                                                                                                          
                                                                                                                                                                                             
 const router = createRouter({                                                                                                                                                               
   history: createWebHistory(),                                                                                                                                                              
   routes                                                                                                                                                                                    
 });                                                                                                                                                                                         
                                                                                                                                                                                             
 export default router;                                                                                                                                                                      
                                                                                                                                                                                             

Update main.js or main.ts                                                                                  

Ensure your main entry file (main.js or main.ts) imports and uses the router configuration:                                                                                                  

                                                                                                                                                                                             
 // main.js or main.ts                                                                                                                                                                       
 import { createApp } from 'vue';                                                                                                                                                            
 import App from './App.vue';                                                                                                                                                                
 import router from './router'; // Adjust the path according to your project structure                                                                                                       
                                                                                                                                                                                             
 createApp(App)                                                                                                                                                                              
   .use(router)                                                                                                                                                                              
   .mount('#app');                                                                                                                                                                           
                                                                                                                                                                                             
 createApp(App)                                                                                                                                                                              
   .use(router)                                                                                                                                                                              
   .mount('#app');                                                                                                                                                                           
                                                                                                                                                                                             

Ensure App.vue uses the router

Even telling aider explicitly to change into /chat-mode code or use change code directly in the prompt did not change the behaviour.

99cv avatar Aug 06 '24 07:08 99cv

@99cv @paul-gauthier thx

sprappcom avatar Aug 06 '24 07:08 sprappcom

I have the same issue. it does not build files at all with Aider. It just tells you what to do. I hope it gets fixed quite soon. 🤞

leanit-piotr avatar Aug 06 '24 10:08 leanit-piotr

You can try using --edit-format whole

paul-gauthier avatar Aug 06 '24 11:08 paul-gauthier

It seems I have found a work-around. At least it worked now once with another terminal. Please check guys if this isn't the problem with the built in VS Code terminal. In the standard command line all works as expected it seems...

Update:

  • checked again and it seems it depends on the size/complexity of the prompt. It's weird, but it looks like more complex prompts are just forwarded to chat only and "no action" mode and simple prompts are executed correctly.

leanit-piotr avatar Aug 06 '24 11:08 leanit-piotr

@leanit-piotr I never use aider in the vs code terminal. So the issue occured in normal terminal in zsh shell as well. My last task was to change just one line (finally just for testing purposes) in one file and aider with model deepseek/deepseek-coder was still just dropping suggestions instead of "doing the work".

@paul-gauthier with option --edit-format whole aider is doing changes again with model deepseek/deepseek-coder! Thanks!

99cv avatar Aug 06 '24 11:08 99cv

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

paul-gauthier avatar Aug 07 '24 16:08 paul-gauthier