Merge pull request #50 from devchat-ai/add_proxy_config

feat: Add proxy setting to Config page
This commit is contained in:
boob.yang 2024-05-30 11:23:12 +08:00 committed by GitHub
commit 523d411b30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -45,11 +45,13 @@
"Select your preferred language": "选择你的首选语言",
"Python for chat": "聊天用的 Python",
"Python for commands": "命令用的 Python",
"Proxy setting": "代理设置",
"Code Completion Enable": "代码补全启用",
"Codebase Index Enable": "代码库索引启用",
"Code Completion Model": "代码补全模型",
"Select a model": "选择补全模型",
"Please enter the path of your python": "请输入你的 Python 路径",
"Please enter the proxy url and port": "请输入您的代理URL和端口",
"Cancel": "取消",
"Save": "保存",
"Max input tokens": "最大输入数",

View File

@ -412,11 +412,18 @@ const Config = observer(() => {
/>
<TextInput
styles={commonInputStyle}
label={t("Python for commands1")}
label={t("Python for commands")}
placeholder="/xxx/xxx"
description={t("Please enter the path of your python")}
{...form.getInputProps("python_for_commands")}
/>
<TextInput
styles={commonInputStyle}
label={t("Proxy setting")}
placeholder="http://127.0.0.1:7890"
description={t("Please enter the proxy url and port")}
{...form.getInputProps("DEVCHAT_PROXY")}
/>
{codeModels.length > 0 && (
<>
<Switch