Skip to content

Commit

Permalink
add plugin cost & change plugin avatar (labring#2030)
Browse files Browse the repository at this point in the history
* add plugin cost & change plugin avatar

* add author
  • Loading branch information
newfish-cmyk authored and c121914yu committed Jul 18, 2024
1 parent 43674e4 commit ad693ae
Show file tree
Hide file tree
Showing 17 changed files with 389 additions and 317 deletions.
1 change: 1 addition & 0 deletions packages/global/core/workflow/type/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export type NodeTemplateListItemType = {
isTool?: boolean;
author?: string;
unique?: boolean; // 唯一的
currentCost?: number; // 当前积分消耗
};

export type NodeTemplateListType = {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/fetchUrl/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "FastGPT",
"version": "486",
"name": "网页内容抓取",
"avatar": "/imgs/workflow/fetchUrl.svg",
"avatar": "/imgs/workflow/fetchUrl.png",
"intro": "可获取一个网页链接内容,并以 Markdown 格式输出,仅支持获取静态网站。",
"showStatus": true,
"weight": 10,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/getTime/template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"author": "FastGPT Team",
"author": "FastGPT",
"version": "481",
"templateType": "tools",
"name": "获取当前时间",
"avatar": "/imgs/workflow/getCurrentTime.svg",
"avatar": "/imgs/workflow/getCurrentTime.png",
"intro": "获取用户当前时区的时间。",
"showStatus": false,
"isTool": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/mathExprVal/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "FastGPT",
"version": "486",
"name": "数学公式执行",
"avatar": "/imgs/workflow/mathExprEval.svg",
"avatar": "/imgs/workflow/mathExprEval.png",
"intro": "用于执行数学表达式的工具,通过 js 的 expr-eval 库运行表达式并返回结果。",
"showStatus": false,
"weight": 10,
Expand Down
474 changes: 235 additions & 239 deletions packages/web/components/common/Icon/constants.ts

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion packages/web/i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,11 @@
"plugin": {
"Custom headers": "Custom headers",
"Delete http plugin": "Confirm to delete this group of HTTP plugins? This will delete all plugins in the directory.",
"Free": "The plugin requires no points~",
"Get Plugin Module Detail Failed": "Plugin loading failed",
"Http plugin intro placeholder": "For display only, no actual effect",
"Intro placeholder": "If this plugin is used as a tool, this introduction will be used as a prompt."
"Intro placeholder": "If this plugin is used as a tool, this introduction will be used as a prompt.",
"cost": "Plugin cost: "
},
"shareChat": {
"Init Error": "Failed to initialize chat dialog",
Expand Down
4 changes: 3 additions & 1 deletion packages/web/i18n/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1055,9 +1055,11 @@
"plugin": {
"Custom headers": "自定义请求头",
"Delete http plugin": "确认删除该组 HTTP 插件?会删除该目录下所有插件。",
"Free": "该插件无需积分消耗~",
"Get Plugin Module Detail Failed": "加载插件异常",
"Http plugin intro placeholder": "仅做展示,无实际效果",
"Intro placeholder": "如果该插件作为工具被调用,则会使用该介绍作为提示词。"
"Intro placeholder": "如果该插件作为工具被调用,则会使用该介绍作为提示词。",
"cost": "积分消耗:"
},
"shareChat": {
"Init Error": "初始化对话框失败",
Expand Down
Binary file added projects/app/public/imgs/workflow/fetchUrl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion projects/app/public/imgs/workflow/fetchUrl.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 0 additions & 7 deletions projects/app/public/imgs/workflow/getCurrentTime.svg

This file was deleted.

Binary file added projects/app/public/imgs/workflow/mathExprEval.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion projects/app/public/imgs/workflow/mathExprEval.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ async function handler(
avatar: plugin.avatar,
name: plugin.name,
intro: plugin.intro,
isTool: plugin.isTool
isTool: plugin.isTool,
currentCost: plugin.currentCost,
author: plugin.author
}))
);
}
Expand Down
Loading

0 comments on commit ad693ae

Please sign in to comment.