Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/global/core/app/plugin/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export type SystemPluginTemplateItemType = WorkflowTemplateType & {
versionList?: {
value: string;
description?: string;
enabled?: boolean;
selectedVersionId?: string;
storedVersions?: string[];

inputs: FlowNodeInputItemType[];
outputs: FlowNodeOutputItemType[];
Expand Down
4 changes: 4 additions & 0 deletions packages/global/core/workflow/type/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export type NodeToolConfigType = {
toolId: string;
name: string;
description: string;
enabled: boolean;
selectedVersionId: string;
storedVersions: Array<string>;
type: 'deprecated' | 'invalid';
}[];
};
};
Expand Down
29 changes: 21 additions & 8 deletions packages/service/core/app/plugin/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ export const getSystemPluginByIdAndVersionId = async (
export async function getChildAppPreviewNode({
appId,
versionId,
lang = 'en'
lang = 'en',
toolConfig
}: {
appId: string;
versionId?: string;
lang?: localeType;
toolConfig?: NodeToolConfigType;
}): Promise<FlowNodeTemplateType> {
const { source, pluginId } = splitCombinePluginId(appId);

Expand Down Expand Up @@ -305,13 +307,24 @@ export async function getChildAppPreviewNode({
? {
systemToolSet: {
toolId: app.id,
toolList: children
.filter((item) => item.isActive !== false)
.map((item) => ({
toolId: item.id,
name: parseI18nString(item.name, lang),
description: parseI18nString(item.intro, lang)
}))
toolList:
toolConfig?.systemToolSet?.toolList.filter(
(item) => item.type !== 'deprecated'
) ??
children
.filter((item) => item.isActive !== false)
.map((item) => {
const storedVersions = item.versionList?.map((v) => v.value) ?? [];
return {
toolId: item.id,
name: parseI18nString(item.name, lang),
description: parseI18nString(item.intro, lang),
enabled: item.isActive ?? true,
selectedVersionId: '',
storedVersions: storedVersions,
type: 'invalid'
};
})
}
}
: { systemTool: { toolId: app.id } })
Expand Down
3 changes: 2 additions & 1 deletion packages/service/core/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export async function rewriteAppWorkflowToDetail({
getChildAppPreviewNode({
appId: node.pluginId,
versionId: node.version,
lang
lang,
toolConfig: node.toolConfig
}),
...(source === PluginSourceEnum.personal
? [
Expand Down
5 changes: 3 additions & 2 deletions packages/service/core/workflow/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ export async function getSystemToolRunTimeNodeFromSystemToolset({
const nodes = await Promise.all(
children.map(async (child, index) => {
const toolListItem = toolSetNode.toolConfig?.systemToolSet?.toolList.find(
(item) => item.toolId === child.id
(item) => item.toolId === child.id && item.type !== 'deprecated'
);

const tool = await getSystemPluginByIdAndVersionId(child.id);
const versionId = toolListItem?.selectedVersionId;
const tool = await getSystemPluginByIdAndVersionId(child.id, versionId);

const inputs = tool.inputs ?? [];
if (toolsetInputConfig?.value) {
Expand Down
10 changes: 10 additions & 0 deletions packages/web/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ai_point_price": "Billing",
"ai_settings": "AI Configuration",
"all_apps": "All Applications",
"all_tools_keep_latest": "All tools are kept up to date",
"app.Version name": "Version Name",
"app.error.publish_unExist_app": "Release failed, please check whether the tool call is normal",
"app.error.unExist_app": "Some components are missing, please delete them",
Expand Down Expand Up @@ -69,15 +70,18 @@
"cron.every_month": "Run Monthly",
"cron.every_week": "Run Weekly",
"cron.interval": "Run at Intervals",
"current_by_global_setting_all_tools_keep_latest": "Currently controlled by global settings, all tools remain latest version",
"dataset": "dataset",
"dataset_search_tool_description": "Call the \"Semantic Search\" and \"Full-text Search\" capabilities to find reference content that may be related to the problem from the \"Knowledge Base\". \nPrioritize calling this tool to assist in answering user questions.",
"day": "Day",
"deleted": "App deleted",
"disabled": "Disabled",
"document_quote": "Document Reference",
"document_quote_tip": "Usually used to accept user-uploaded document content (requires document parsing), and can also be used to reference other string data.",
"document_upload": "Document Upload",
"edit_app": "Application details",
"edit_info": "Edit",
"enable_tool": "Enable Tools",
"execute_time": "Execution Time",
"export_config_successful": "Configuration copied, some sensitive information automatically filtered. Please check for any remaining sensitive data.",
"export_configs": "Export",
Expand All @@ -86,6 +90,7 @@
"file_recover": "File will overwrite current content",
"file_upload": "File Upload",
"file_upload_tip": "Once enabled, documents/images can be uploaded. Documents are retained for 7 days, images for 15 days. Using this feature may incur additional costs. To ensure a good experience, please choose an AI model with a larger context length when using this feature.",
"global_control": "Global control",
"go_to_chat": "Go to Conversation",
"go_to_run": "Go to Execution",
"image_upload": "Image Upload",
Expand All @@ -100,6 +105,7 @@
"interval.4_hours": "Every 4 Hours",
"interval.6_hours": "Every 6 Hours",
"interval.per_hour": "Every Hour",
"invalid": "Have expired",
"invalid_json_format": "JSON format error",
"keep_the_latest": "Keep the latest",
"llm_not_support_vision": "This model does not support image recognition",
Expand Down Expand Up @@ -178,7 +184,11 @@
"month.unit": "Day",
"move.hint": "After moving, the selected app/folder will inherit the permission settings for the new folder.",
"move_app": "Move Application",
"new_tool": "There are new tools",
"new_version": "There is a new version",
"newest": "Newest",
"no_mcp_tools_list": "No data yet, the MCP address needs to be parsed first",
"no_version_info": "No version information yet",
"node_not_intro": "This node is not introduced",
"not_json_file": "Please select a JSON file",
"not_the_newest": "Not the latest",
Expand Down
10 changes: 10 additions & 0 deletions packages/web/i18n/zh-CN/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ai_point_price": "AI积分计费",
"ai_settings": "AI 配置",
"all_apps": "全部应用",
"all_tools_keep_latest": "所有工具保持最新版本",
"app.Version name": "版本名称",
"app.error.publish_unExist_app": "发布失败,请检查工具调用是否正常",
"app.error.unExist_app": "部分组件缺失,请删除",
Expand Down Expand Up @@ -69,15 +70,18 @@
"cron.every_month": "每月执行",
"cron.every_week": "每周执行",
"cron.interval": "间隔执行",
"current_by_global_setting_all_tools_keep_latest": "当前由全局设置控制,所有工具保持最新版本",
"dataset": "知识库",
"dataset_search_tool_description": "调用“语义检索”和“全文检索”能力,从“知识库”中查找可能与问题相关的参考内容。优先调用该工具来辅助回答用户的问题。",
"day": "日",
"deleted": "应用已删除",
"disabled": "已禁用",
"document_quote": "文档引用",
"document_quote_tip": "通常用于接受用户上传的文档内容(这需要文档解析),也可以用于引用其他字符串数据。",
"document_upload": "文档上传",
"edit_app": "应用详情",
"edit_info": "编辑信息",
"enable_tool": "启用工具",
"execute_time": "执行时间",
"export_config_successful": "已复制配置,自动过滤部分敏感信息,请注意检查是否仍有敏感数据",
"export_configs": "导出配置",
Expand All @@ -86,6 +90,7 @@
"file_recover": "文件将覆盖当前内容",
"file_upload": "文件上传",
"file_upload_tip": "开启后,可以上传文档/图片。文档保留7天,图片保留15天。使用该功能可能产生较多额外费用。为保证使用体验,使用该功能时,请选择上下文长度较大的AI模型。",
"global_control": "全局控制",
"go_to_chat": "去对话",
"go_to_run": "去运行",
"image_upload": "图片上传",
Expand All @@ -100,6 +105,7 @@
"interval.4_hours": "每4小时",
"interval.6_hours": "每6小时",
"interval.per_hour": "每小时",
"invalid": "已失效",
"invalid_json_format": "JSON 格式错误",
"keep_the_latest": "保持最新版本",
"llm_not_support_vision": "该模型不支持图片识别",
Expand Down Expand Up @@ -187,7 +193,11 @@
"month.unit": "号",
"move.hint": "移动后,所选应用/文件夹将继承新文件夹的权限设置。",
"move_app": "移动应用",
"new_tool": "有新工具",
"new_version": "有新版本",
"newest": "最新",
"no_mcp_tools_list": "暂无数据,需先解析 MCP 地址",
"no_version_info": "暂无版本信息",
"node_not_intro": "这个节点没有介绍",
"not_json_file": "请选择JSON文件",
"not_the_newest": "非最新版",
Expand Down
10 changes: 10 additions & 0 deletions packages/web/i18n/zh-Hant/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ai_point_price": "AI 積分計費",
"ai_settings": "AI 設定",
"all_apps": "所有應用程式",
"all_tools_keep_latest": "所有工具保持最新版本",
"app.Version name": "版本名稱",
"app.error.publish_unExist_app": "發布失敗,請檢查工具呼叫是否正常",
"app.error.unExist_app": "部分元件遺失,請刪除",
Expand Down Expand Up @@ -68,15 +69,18 @@
"cron.every_month": "每月執行",
"cron.every_week": "每週執行",
"cron.interval": "間隔執行",
"current_by_global_setting_all_tools_keep_latest": "當前由全局設置控制,所有工具保持最新版本",
"dataset": "知識庫",
"dataset_search_tool_description": "呼叫「語意搜尋」和「全文搜尋」功能,從「知識庫」中尋找可能與問題相關的參考內容。優先呼叫這個工具來協助回答使用者的問題。",
"day": "日",
"deleted": "應用已刪除",
"disabled": "已禁用",
"document_quote": "文件引用",
"document_quote_tip": "通常用於接受使用者上傳的文件內容(這需要文件解析),也可以用於引用其他字串資料。",
"document_upload": "文件上傳",
"edit_app": "應用詳情",
"edit_info": "編輯資訊",
"enable_tool": "啟用工具",
"execute_time": "執行時間",
"export_config_successful": "已複製設定,自動過濾部分敏感資訊,請注意檢查是否仍有敏感資料",
"export_configs": "匯出設定",
Expand All @@ -85,6 +89,7 @@
"file_recover": "檔案將會覆蓋目前內容",
"file_upload": "檔案上傳",
"file_upload_tip": "開啟後,可以上傳文件/圖片。文件保留 7 天,圖片保留 15 天。使用這個功能可能產生較多額外費用。為了確保使用體驗,使用這個功能時,請選擇上下文長度較大的 AI 模型。",
"global_control": "全局控制",
"go_to_chat": "前往對話",
"go_to_run": "前往執行",
"image_upload": "圖片上傳",
Expand All @@ -99,6 +104,7 @@
"interval.4_hours": "每 4 小時",
"interval.6_hours": "每 6 小時",
"interval.per_hour": "每小時",
"invalid": "已失效",
"invalid_json_format": "JSON 格式錯誤",
"keep_the_latest": "保持最新版本",
"llm_not_support_vision": "這個模型不支援圖片辨識",
Expand Down Expand Up @@ -177,7 +183,11 @@
"month.unit": "號",
"move.hint": "移動後,所選應用/文件夾將繼承新文件夾的權限設置。",
"move_app": "移動應用程式",
"new_tool": "有新工具",
"new_version": "有新版本",
"newest": "最新",
"no_mcp_tools_list": "暫無數據,需先解析 MCP 地址",
"no_version_info": "暫無版本信息",
"node_not_intro": "這個節點沒有介紹",
"not_json_file": "請選擇 JSON 檔案",
"not_the_newest": "非最新版",
Expand Down
Loading
Loading