WisdomShell / codeshell-vscode

An intelligent coding assistant plugin for Visual Studio Code, developed based on CodeShell
Apache License 2.0
569 stars 70 forks source link

MultiLanguage Version #38

Closed cove9988 closed 8 months ago

cove9988 commented 8 months ago
  1. add language setting in the extension
  2. English/Chinese version. It will align with LanguageID, which will also give better LLM answers based on language selection.
  3. apply Microsoft l10n localization for command platter language changes.
  4. replace all hard-coded Chinese from ts files with MultiLanguage.json
0ut0fm1nd commented 8 months ago

很赞! 我希望插件可以自动根据当前语言环境选择展示语言,不希望用户通过配置项来选择,可以做到吗?

cove9988 commented 8 months ago

可以, done using vscode.env.language to get current language. There are many language sets available. please refer to https://code.visualstudio.com/docs/getstarted/locales Adding a new language, for example Japanese:

  1. adding "ja" in Multilanguage.json accordingly
  2. adding a new json file: package.nls.ja.json.
cove9988 commented 8 months ago

do you have a wechat group? @0ut0fcpu

cove9988 commented 8 months ago

You can merge this one if you like. I found it will not too much help for llama-7b. However, it will help for the GPT-4. rewrite prompt is a feature job when loading a bigger llama.

I found we can also improve prompt here. for example. if we change the prompt for "Generate Comment" from: "Generate comments for the following python code:" to more instructive one: "Create comments for the following Python script, provide detailed comments explaining the purpose, parameters, and logic within the script. Additionally, add inline comments wherever necessary to clarify the code's functionality and flow:"

will we expect to generate a better result?

vimBashMing commented 8 months ago

Good job!