This commit is contained in:
root
2025-07-12 21:17:36 +08:00
parent cc33875d16
commit 3927c4ffb7
3 changed files with 29 additions and 20 deletions

View File

@@ -22,7 +22,7 @@ def batch_import(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""批量导入模板"""
response = create_progress_reporter(str(uuid4()))
response = create_progress_reporter()
try:
# 验证源文件夹
source_path = Path(source_folder)
@@ -69,7 +69,7 @@ def list_templates(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""列出所有模板"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -107,7 +107,7 @@ def get_template(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""获取模板详情"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -140,7 +140,7 @@ def delete_template(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""删除模板"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -177,7 +177,7 @@ def search_templates(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""搜索模板"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -211,7 +211,7 @@ def get_template_stats(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""获取模板统计信息"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -250,7 +250,7 @@ def get_popular_tags(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""获取热门标签"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")
@@ -278,7 +278,7 @@ def get_templates_by_tag(
json_output: bool = typer.Option(True, "--json", help="JSON格式输出")
):
"""根据标签获取模板"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 创建模板管理器
manager = TemplateManagerCloud(user_id=user_id or "default")