refactor(workflow): relocate template directory into workflow

This commit is contained in:
Eternity
2026-02-03 15:24:16 +08:00
parent ec41d45234
commit e196f86e30
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: