Skip to content

Commit c32fff3

Browse files
author
smallstone
committed
Based on the provided git diff, here is a suggested commit message:
Update language translations and fix UI issues
1 parent 7282924 commit c32fff3

File tree

3 files changed

+11
-64
lines changed

3 files changed

+11
-64
lines changed

src/views/components/InputMessage/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ import Topic from "./Topic";
3434
import { observer } from "mobx-react-lite";
3535
import { useMst } from "@/views/stores/RootStore";
3636
import { ChatContext } from "@/views/stores/InputStore";
37-
<<<<<<< HEAD
3837
import { Trans, useTranslation } from "react-i18next";
39-
=======
40-
import { useTranslation } from "react-i18next";
41-
>>>>>>> 36a272b (Update language translations and fix UI issues)
4238

4339
const useStyles = createStyles((theme) => ({
4440
actionIcon: {
@@ -461,7 +457,10 @@ const InputMessage = observer((props: any) => {
461457
<Menu.Dropdown>
462458
{modelMenus.map((modelName) => {
463459
return (
464-
<Menu.Item key={modelName} onClick={() => changeModel(modelName)}>
460+
<Menu.Item
461+
key={modelName}
462+
onClick={() => changeModel(modelName)}
463+
>
465464
{getModelShowName(modelName)}
466465
</Menu.Item>
467466
);

src/views/components/MessageBody/index.tsx

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,14 @@ import React from "react";
33
import { observer } from "mobx-react-lite";
44
import MessageMarkdown from "@/views/components/MessageMarkdown";
55
import { useMst } from "@/views/stores/RootStore";
6-
<<<<<<< HEAD
7-
import { Trans, useTranslation } from "react-i18next";
8-
=======
96
import { useTranslation } from "react-i18next";
10-
>>>>>>> 36a272b (Update language translations and fix UI issues)
117

128
interface IProps {
139
messageType: string;
1410
children: string;
1511
messageDone?: boolean;
16-
<<<<<<< HEAD
1712
activeStep?: boolean;
18-
=======
1913
temp?: boolean;
20-
>>>>>>> 36a272b (Update language translations and fix UI issues)
2114
}
2215

2316
const useStyles = createStyles((theme, options: any) => ({
@@ -39,29 +32,25 @@ const trasnlateKey = (children: string) => {
3932
};
4033

4134
const MessageBody = observer((props: IProps) => {
42-
<<<<<<< HEAD
43-
const { children, messageType, activeStep = false, messageDone } = props;
44-
=======
45-
const { children, messageType, temp = false, messageDone } = props;
46-
>>>>>>> 36a272b (Update language translations and fix UI issues)
35+
const {
36+
children,
37+
messageType,
38+
activeStep = false,
39+
temp = false,
40+
messageDone,
41+
} = props;
4742
const { chat } = useMst();
4843
const { classes } = useStyles({
4944
chatPanelWidth: chat.chatPanelWidth,
5045
});
5146
const { t } = useTranslation();
52-
<<<<<<< HEAD
5347
const transkey = trasnlateKey(children);
54-
=======
55-
>>>>>>> 36a272b (Update language translations and fix UI issues)
5648

5749
return messageType === "bot" ? (
5850
<MessageMarkdown
5951
className={classes.bodyWidth}
60-
<<<<<<< HEAD
6152
activeStep={activeStep}
62-
=======
6353
temp={temp}
64-
>>>>>>> 36a272b (Update language translations and fix UI issues)
6554
messageDone={messageDone}
6655
>
6756
{children}
@@ -74,11 +63,7 @@ const MessageBody = observer((props: IProps) => {
7463
width: chat.chatPanelWidth - 20,
7564
}}
7665
>
77-
<<<<<<< HEAD
78-
<pre className={classes.userContent}>{children}</pre>
79-
=======
8066
<pre className={classes.userContent}>{t(children)}</pre>
81-
>>>>>>> 36a272b (Update language translations and fix UI issues)
8267
</Container>
8368
);
8469
});

src/views/i18n/zh.json

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,4 @@
1717
"commit changes with commit message in english.": "选择要提交的代码变更,总结英文提交消息,并提交到代码库。",
1818
"Generate a commit message for the given git diff.": "为给定的 git diff 生成提交消息。",
1919
"Generate a release note for the given commit log.": "为给定的提交日志生成发布说明。"
20-
=======
21-
"Delete message": "删除",
22-
"Copied": "已复制",
23-
"Copy message": "复制回答",
24-
"Refilled": "已重新填入",
25-
"Refill prompt": "重新填进输入框",
26-
"User": "用户",
27-
"Ask DevChat a question or type ‘/’ for workflow": "向 DevChat 直接提问或输入 '/' 以查看可用的工作流",
28-
"How do I use DevChat?": "如何使用 DevChat?",
29-
"balance": "你的账户余额为 {{formatedCurrency}},登录 <4>web.devchat.ai</4> 获得更多 tokens",
30-
"devchat.help": "你想生成一些代码还是对这个项目有疑问?请首先右键单击相关的文件或代码片段,将它们添加到 DevChat 中作为上下文,然后在输入框中写下你的请求或问题,我将基于添加的上下文生成代码或回答你的问题。<br> <br> 你还可以点击输入框左侧的“+”按钮,查看更多添加上下文的快捷方法。此外,在输入框中键入“/”,DevChat 会列出可供使用的各类工作流,按 Tab 键或输入完整命令触发你需要的工作流。聊天愉快! <br> <br>下面是一些工作流的示例:<br> <br> [/code: 基于你的提示词和上下文生成代码](#code) <br> [/commit_message: 根据加入上下文中的代码变更生成提交消息](#commit_message) <br> <br> [/release_note: 根据加入上下文中的提交历史生成提交说明](#release_note) <br> <br> [/ask-code: 询问任何关于当前代码库的信息,并从这位人工智能代理那里获得答案](#ask_code) <br> <br>你可以点击[设置](#settings)来配置 DevChat",
31-
"devchat.setkey": "你的环境或设置中缺少 DevChat 访问密钥。请输入你的 DevChat 访问密钥,这样我就可以开始正常工作了。<br> <br> <button value=\"setting_devchat_key\">设置 DevChat 访问密钥</button>",
32-
"Is DevChat Access Key ready?": "DevChat 访问密钥是否已经设置好?",
33-
"Ask questions about the current project's codebase, which requires proactive acquisition of additional context information to answer.": "询问关于当前项目代码库的问题,我将主动获取相关的上下文信息来回答。",
34-
"Generate code with a general template embedded into the prompt.": "使用隐式嵌入到提示词中的通用模板生成代码。",
35-
"Generate code with a Python-specific template embedded into the prompt.": "使用隐式嵌入到提示词中的 Python 特定模板生成代码。",
36-
"commit changes with commit message in english.": "选择要提交的代码变更,总结英文提交消息,并提交到代码库。",
37-
"Generate a commit message for the given git diff.": "为给定的 git diff 生成提交消息。",
38-
"Generate a release note for the given commit log.": "为给定的提交日志生成发布说明。",
39-
"Delete message": "删除",
40-
"Copied": "已复制",
41-
"Copy message": "复制回答",
42-
"Refilled": "已重新填入",
43-
"Refill prompt": "重新填进输入框",
44-
"User": "用户",
45-
"Ask DevChat a question or type ‘/’ for workflow": "向 DevChat 直接提问或输入 '/' 以查看可用的工作流",
46-
"How do I use DevChat?": "如何使用 DevChat?",
47-
"balance": "你的账户余额为 {{formatedCurrency}},登录 <4>web.devchat.ai</4> 获得更多 tokens",
48-
"devchat.help": "你想生成一些代码还是对这个项目有疑问?请首先右键单击相关的文件或代码片段,将它们添加到 DevChat 中作为上下文,然后在输入框中写下你的请求或问题,我将基于添加的上下文生成代码或回答你的问题。<br> <br> 你还可以点击输入框左侧的“+”按钮,查看更多添加上下文的快捷方法。此外,在输入框中键入“/”,DevChat 会列出可供使用的各类工作流,按 Tab 键或输入完整命令触发你需要的工作流。聊天愉快! <br> <br>下面是一些工作流的示例:<br> <br> [/code: 基于你的提示词和上下文生成代码](#code) <br> [/commit_message: 根据加入上下文中的代码变更生成提交消息](#commit_message) <br> <br> [/release_note: 根据加入上下文中的提交历史生成提交说明](#release_note) <br> <br> [/ask-code: 询问任何关于当前代码库的信息,并从这位人工智能代理那里获得答案](#ask_code) <br> <br>你可以点击[设置](#settings)来配置 DevChat",
49-
"devchat.setkey": "你的环境或设置中缺少 DevChat 访问密钥。请输入你的 DevChat 访问密钥,这样我就可以开始正常工作了。<br> <br> <button value=\"setting_devchat_key\">设置 DevChat 访问密钥</button>",
50-
"Is DevChat Access Key ready?": "DevChat 访问密钥是否已经设置好?",
51-
"Ask questions about the current project's codebase, which requires proactive acquisition of additional context information to answer.": "询问关于当前项目代码库的问题,我将主动获取相关的上下文信息来回答。",
52-
"Generate code with a general template embedded into the prompt.": "使用隐式嵌入到提示词中的通用模板生成代码。",
53-
"Generate code with a Python-specific template embedded into the prompt.": "使用隐式嵌入到提示词中的 Python 特定模板生成代码。",
54-
"commit changes with commit message in english.": "选择要提交的代码变更,总结英文提交消息,并提交到代码库。",
55-
"Generate a commit message for the given git diff.": "为给定的 git diff 生成提交消息。",
56-
"Generate a release note for the given commit log.": "为给定的提交日志生成发布说明。"
5720
}

0 commit comments

Comments
 (0)