Skip to content

Commit

Permalink
feat: add frontend helper
Browse files Browse the repository at this point in the history
  • Loading branch information
KeJunMao committed Mar 7, 2023
1 parent 5668242 commit 5d78074
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
5 changes: 4 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"chatgpt.settings.title": "Global Settings",
"chatgpt.settings.hit": "Default is '{0}",
"chatgpt.settings.save": "Save",
"chatgpt.settings.reset": "Reset"
"chatgpt.settings.reset": "Reset",
"tool.frontend_helper.title": "Frontend Helper",
"tool.frontend_helper.forms.message.placeholder": "Monitor the X and Y coordinates of a specific element node relative to the top-left corner of the user's device screen, and enable the element to be dragged to adjust its position and resized to fit different browser window sizes.",
"tool.frontend_helper.desc": "Does everyone know how to do front-end?"
}
5 changes: 4 additions & 1 deletion locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"chatgpt.settings.hit": "默认值为 \"{0}\"",
"chatgpt.settings.reset": "重置",
"chatgpt.settings.save": "保存",
"chatgpt.settings.title": "全局设置"
"chatgpt.settings.title": "全局设置",
"tool.frontend_helper.title": "前端助手",
"tool.frontend_helper.forms.message.placeholder": "监听某个元素节点距离当前电脑设备屏幕的左上角的X和Y轴,通过拖拽移动位置浏览器窗口和改变大小浏览器窗口",
"tool.frontend_helper.desc": "前端不是是个人就会吗?"
}
21 changes: 21 additions & 0 deletions tools/frontend_helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// @unocss-include

import { Tool } from "./types";

export const frontend_helper = (t: any): Tool => ({
title: t("tool.frontend_helper.title"),
desc: t("tool.frontend_helper.desc"),
name: "frontend_helper",
icon: "i-mdi:web",
systemMessageTemplate:
"我想让你充当前端开发专家。我将提供一些关于Js、Node等前端代码问题的具体信息,而你的工作就是想出为我解决问题的策略。这可能包括建议代码、代码逻辑思路策略。我的第一个请求是",
userMessageTemplate: "${message}",
forms: {
message: {
type: "ATextarea",
props: {
placeholder: t("tool.frontend_helper.forms.message.placeholder"),
},
},
},
});
2 changes: 2 additions & 0 deletions tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { okr_generator } from "./okr_generator";
import { coding_function } from "./coding_function";
import { finding_bugs } from "./finding_bugs";
import { redbook } from "./redbook";
import { frontend_helper } from "./frontend_helper";

export default function getTool(t?: any): Tool[] {
if (!t) {
Expand All @@ -19,5 +20,6 @@ export default function getTool(t?: any): Tool[] {
coding_function(t),
finding_bugs(t),
redbook(t),
frontend_helper(t)
];
}

0 comments on commit 5d78074

Please sign in to comment.