Skip to content

Commit

Permalink
feat: support azure-openai and add continue tips and add autoRemember…
Browse files Browse the repository at this point in the history
…ConvertLanguagePairs config
  • Loading branch information
2214962083 committed Jul 16, 2024
1 parent e0c6806 commit 5438bf2
Show file tree
Hide file tree
Showing 20 changed files with 449 additions and 345 deletions.
4 changes: 4 additions & 0 deletions docs/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ You can click on a paper-like icon in the top right corner of VS Code or right-c

vscode will open a temporary text to show you the converted code.

#### Configuration - `aide.aide.autoRememberConvertLanguagePairs`

This setting allows you to specify whether to automatically remember the language pairs used for code conversion. Default is `true`.

#### Configuration - `aide.convertLanguagePairs`

This setting allows you to specify the language mapping for code conversion. The mapping should be in the form of `sourceLanguage: targetLanguage`.
Expand Down
4 changes: 4 additions & 0 deletions docs/configuration/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@

VSCode 将打开一个临时文本以显示转换后的代码。

#### 配置 - `aide.aide.autoRememberConvertLanguagePairs`

此设置允许你指定是否自动记住代码转换的语言映射。默认为 `true`

#### 配置 - `aide.convertLanguagePairs`

此设置允许你指定代码转换的语言映射。映射应采用 `sourceLanguage: targetLanguage` 的形式。
Expand Down
25 changes: 15 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@
"scope": "resource",
"description": "%config.ignorePatterns.description%"
},
"aide.autoRememberConvertLanguagePairs": {
"type": "boolean",
"default": true,
"description": "%config.autoRememberConvertLanguagePairs.description%"
},
"aide.convertLanguagePairs": {
"type": "object",
"default": {},
Expand Down Expand Up @@ -224,16 +229,16 @@
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cz-commitlint": "^19.2.0",
"@ianvs/prettier-plugin-sort-imports": "^4.3.0",
"@langchain/core": "0.2.15",
"@langchain/openai": "^0.2.1",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@langchain/core": "0.2.16",
"@langchain/openai": "^0.2.2",
"@types/fs-extra": "^11.0.4",
"@types/global-agent": "^2.1.3",
"@types/node": "^20.14.10",
"@types/shell-quote": "^1.7.5",
"@types/vscode": "1.82.0",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@vscode/vsce": "^2.30.0",
"commitizen": "^4.3.0",
"dotenv": "^16.4.5",
Expand All @@ -256,24 +261,24 @@
"husky": "^9.0.11",
"ignore": "^5.3.1",
"inquirer": "^9.3.4",
"knip": "^5.25.2",
"langchain": "^0.2.9",
"knip": "^5.26.0",
"langchain": "^0.2.10",
"lint-staged": "^15.2.7",
"minimatch": "^9.0.5",
"pnpm": "^9.5.0",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"shell-quote": "^1.8.1",
"tsup": "^8.1.0",
"typescript": "5.4.5",
"undici": "^6.19.2",
"vite": "^5.3.3",
"vitest": "^2.0.2",
"vitest": "^2.0.3",
"zod": "^3.23.8"
},
"pnpm": {
"overrides": {
"@langchain/core": "0.2.15"
"@langchain/core": "0.2.16"
}
},
"commitlint": {
Expand Down
7 changes: 7 additions & 0 deletions package.nls.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running",
"config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax",
"config.respectGitIgnore.description": "Respect .gitignore file",
"config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs",
"config.convertLanguagePairs.description": "Default convert language pairs",
"config.codeViewerHelperPrompt.description": "Code viewer helper prompt template",
"config.openaiKey.description": "OpenAI Key",
Expand All @@ -22,6 +23,8 @@
"error.failedToUpdateConfig": "Failed to update configuration",
"error.invalidJson": "Invalid JSON format",
"error.invalidNumber": "Invalid number",
"error.invalidBaseUrl": "Invalid Base URL",
"error.invalidAzureOpenaiBaseUrl": "Invalid Azure OpenAI Base URL",
"error.configKeyRequired": "{0} configuration key is required",
"error.vscodeLLMModelNotFound": "VSCode LLM model not found, please check configuration",
"error.noSelection": "No file or folder selected",
Expand All @@ -32,6 +35,10 @@
"info.customLanguage": "Custom language",
"info.noAiSuggestionsVariableName": "AI thinks your variable name is already good",
"info.processing": "Aide is processing...",
"info.continueMessage": "Continue? I'm not sure if it's done yet, if there's still content not generated, you can click continue.",
"info.iconContinueMessage": "(You can also click the original generate icon to continue)",
"info.continue": "Continue",
"info.cancel": "Cancel",
"input.array.promptEnding": "Enter comma separated values",
"input.json.promptEnding": "Enter JSON formatted value",
"input.aiCommand.prompt": "Enter question for AI command",
Expand Down
7 changes: 7 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"config.aiCommandCopyBeforeRun.description": "Copy AI command to clipboard before running",
"config.ignorePatterns.description": "Ignored file name patterns, supports glob syntax",
"config.respectGitIgnore.description": "Respect .gitignore file",
"config.autoRememberConvertLanguagePairs.description": "Automatically remember convert language pairs",
"config.convertLanguagePairs.description": "Default convert language pairs",
"config.codeViewerHelperPrompt.description": "Code viewer helper prompt template",
"config.openaiKey.description": "OpenAI Key",
Expand All @@ -22,6 +23,8 @@
"error.failedToUpdateConfig": "Failed to update configuration",
"error.invalidJson": "Invalid JSON format",
"error.invalidNumber": "Invalid number",
"error.invalidBaseUrl": "Invalid Base URL",
"error.invalidAzureOpenaiBaseUrl": "Invalid Azure OpenAI Base URL",
"error.configKeyRequired": "{0} configuration key is required",
"error.vscodeLLMModelNotFound": "VSCode LLM model not found, please check configuration",
"error.noSelection": "No file or folder selected",
Expand All @@ -32,6 +35,10 @@
"info.customLanguage": "Custom language",
"info.noAiSuggestionsVariableName": "AI thinks your variable name is already good",
"info.processing": "Aide is processing...",
"info.continueMessage": "Continue? I'm not sure if it's done yet, if there's still content not generated, you can click continue.",
"info.iconContinueMessage": "(You can also click the original generate icon to continue)",
"info.continue": "Continue",
"info.cancel": "Cancel",
"input.array.promptEnding": "Enter comma separated values",
"input.json.promptEnding": "Enter JSON formatted value",
"input.aiCommand.prompt": "Enter question for AI command",
Expand Down
7 changes: 7 additions & 0 deletions package.nls.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"config.aiCommandCopyBeforeRun.description": "运行前将 AI 命令复制到剪贴板",
"config.ignorePatterns.description": "忽略的文件名模式, 支持 glob 语法",
"config.respectGitIgnore.description": "是否尊重 .gitignore 文件",
"config.autoRememberConvertLanguagePairs.description": "是否自动记住转换语言对照表",
"config.convertLanguagePairs.description": "默认转换语言对照表",
"config.codeViewerHelperPrompt.description": "代码查看器助手 prompt 模板",
"config.openaiKey.description": "OpenAI Key",
Expand All @@ -22,6 +23,8 @@
"error.failedToUpdateConfig": "更新配置失败",
"error.invalidJson": "无效的 JSON 格式",
"error.invalidNumber": "无效的数字",
"error.invalidBaseUrl": "无效的 Base URL",
"error.invalidAzureOpenaiBaseUrl": "无效的 Azure OpenAI Base URL",
"error.configKeyRequired": "{0} 配置键是必需的",
"error.vscodeLLMModelNotFound": "未找到 VSCode LLM 模型,请检查配置",
"error.noSelection": "未选择任何文件或文件夹",
Expand All @@ -32,6 +35,10 @@
"info.customLanguage": "自定义语言",
"info.noAiSuggestionsVariableName": " AI 觉得你这个变量名字已经很好了",
"info.processing": "Aide 正在处理中...",
"info.continueMessage": "继续吗?我不确定是否已经完成了,如果还有内容没生成,你可以点击继续。",
"info.iconContinueMessage": "(你也可以点击原来的生成 icon 以继续)",
"info.continue": "继续",
"info.cancel": "取消",
"input.array.promptEnding": "输入逗号分隔的值",
"input.json.promptEnding": "输入 JSON 格式的值",
"input.aiCommand.prompt": "输入 AI 命令的问题",
Expand Down
Loading

0 comments on commit 5438bf2

Please sign in to comment.