Merge branch 'release/v0.2.3' into develop
This commit is contained in:
@@ -4,16 +4,19 @@
|
|||||||
从文件系统加载预定义的工作流模板
|
从文件系统加载预定义的工作流模板
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||||
|
|
||||||
|
|
||||||
class TemplateLoader:
|
class TemplateLoader:
|
||||||
"""工作流模板加载器"""
|
"""工作流模板加载器"""
|
||||||
|
|
||||||
def __init__(self, templates_dir: str = "app/templates/workflows"):
|
def __init__(self, templates_dir: str = TEMPLATE_DIR):
|
||||||
"""初始化模板加载器
|
"""初始化模板加载器
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ const ModelImplement: FC<ModelImplementProps> = ({ type, value, onChange }) => {
|
|||||||
const handleDelete = (vo: any) => {
|
const handleDelete = (vo: any) => {
|
||||||
modal.confirm({
|
modal.confirm({
|
||||||
title: t('common.confirmDeleteDesc', { name: [vo.model_name, vo.api_key].join(' / ') }),
|
title: t('common.confirmDeleteDesc', { name: [vo.model_name, vo.api_key].join(' / ') }),
|
||||||
content: t('application.apiKeyDeleteContent'),
|
|
||||||
okText: t('common.delete'),
|
okText: t('common.delete'),
|
||||||
cancelText: t('common.cancel'),
|
cancelText: t('common.cancel'),
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const History: React.FC<{ query: HistoryQuery; edit: (item: HistoryItem) => void
|
|||||||
e?.stopPropagation();
|
e?.stopPropagation();
|
||||||
modal.confirm({
|
modal.confirm({
|
||||||
title: t('common.confirmDeleteDesc', { name: item.title }),
|
title: t('common.confirmDeleteDesc', { name: item.title }),
|
||||||
content: t('application.apiKeyDeleteContent'),
|
|
||||||
okText: t('common.delete'),
|
okText: t('common.delete'),
|
||||||
cancelText: t('common.cancel'),
|
cancelText: t('common.cancel'),
|
||||||
okType: 'danger',
|
okType: 'danger',
|
||||||
|
|||||||
Reference in New Issue
Block a user