Intent detection overrides server intent detection in all cases
Right now, if no comment is detected by language server using TreeSitter, the intent is set as completion and passed through to the client.
The problem is that using the intent parameter of the backend API overrides any intent detection server side. Further, the server has several tools for intent detection (empty functions, small files, block comments) that language server lacks. The server side intent detection has effectively been disabled by this parameter being passed through.
The fix should be to only pass through intent if generation is detected, otherwise let the server run it's intent detection by not passing the intent parameter to the code suggestions API.
Edited by Allen Cook