openpilot-hub / devpilot-intellij

Your new coding buddy, designed exclusively for IntelliJ IDEA.
https://devpilot.zhongan.com
Apache License 2.0
600 stars 96 forks source link

Modify the response to according to the language setting. #1

Open geeklog opened 10 months ago

geeklog commented 10 months ago

https://github.com/openpilot-hub/devpilot-intellij/blob/c793e6ab8964ca3d3e787a603b8b2542e2acb66b/src/main/java/com/zhongan/devpilot/actions/editor/popupmenu/PopupMenuEditorActionGroupUtil.java#L92

Currently, the response is set to Chinese. Please modify the response language according to the language setting in the user settings panel.

xiangtianyu commented 10 months ago

Actually, we check the language setting before we append the language prompt

https://github.com/openpilot-hub/devpilot-intellij/blob/c793e6ab8964ca3d3e787a603b8b2542e2acb66b/src/main/java/com/zhongan/devpilot/actions/editor/popupmenu/PopupMenuEditorActionGroupUtil.java#L91

geeklog commented 10 months ago

My apologies for overlooked this. But there should be an additional '\n' before the language prefix, i.e. "\nRespond in Chinese". Additionally, it is debatable whether using a magic number 1 as the language indicator is a good idea. Perhaps the code should be refactored to provide a more comprehensive solution, such as a different flow to handle the language part of the prompt.

xiangtianyu commented 10 months ago

We may change the language settings to enums later