Merge pull request #285 from SuanmoSuanyangTechnology/refactor/workflow-templates

refactor(workflow): relocate template directory into workflow
This commit is contained in:
Mark
2026-02-03 15:34:42 +08:00
committed by GitHub
5 changed files with 18 additions and 15 deletions

View File

@@ -4,16 +4,19 @@
从文件系统加载预定义的工作流模板
"""
import os
from pathlib import Path
from typing import Optional
import yaml
TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
class TemplateLoader:
"""工作流模板加载器"""
def __init__(self, templates_dir: str = "app/templates/workflows"):
def __init__(self, templates_dir: str = TEMPLATE_DIR):
"""初始化模板加载器
Args: