feat(workflow): enhance HTTP request node with curl debugging support

- Augment HTTP request node capabilities and add generated curl commands for easier debugging.

feat(log): implement workflow execution logs and search functionality

- Add detailed logging for workflow node execution and enable search capabilities within application logs.

feat(auth): introduce middleware to verify application publication status

- Add a check to ensure the application is published before allowing access.

fix(converter): rectify variable handling logic in Dify converter

- Correct issues related to processing variables within the Dify converter module.

refactor(model): remove quota check decorator from model update operations

- Decouple quota validation from the model update process to streamline the logic.
This commit is contained in:
wwq
2026-04-23 15:46:12 +08:00
parent 09393b2326
commit 404ce9f9ba
13 changed files with 305 additions and 35 deletions

View File

@@ -24,13 +24,15 @@ def list_app_logs(
app_id: uuid.UUID,
page: int = Query(1, ge=1),
pagesize: int = Query(20, ge=1, le=100),
is_draft: Optional[bool] = None,
is_draft: bool = Query(False, description="是否草稿会话默认false即发布会话"),
keyword: Optional[str] = Query(None, description="搜索关键词(匹配消息内容)"),
db: Session = Depends(get_db),
current_user=Depends(get_current_user),
):
"""查看应用下所有会话记录(分页)
- 支持按 is_draft 筛选(草稿会话 / 发布会话)
- 支持按 keyword 搜索(匹配消息内容)
- 按最新更新时间倒序排列
- 所有人(包括共享者和被共享者)都只能查看自己的会话记录
"""
@@ -47,7 +49,8 @@ def list_app_logs(
workspace_id=workspace_id,
page=page,
pagesize=pagesize,
is_draft=is_draft
is_draft=is_draft,
keyword=keyword
)
items = [AppLogConversation.model_validate(c) for c in conversations]
@@ -78,12 +81,13 @@ def get_app_log_detail(
# 使用 Service 层查询
log_service = AppLogService(db)
conversation = log_service.get_conversation_detail(
conversation, node_executions_map = log_service.get_conversation_detail(
app_id=app_id,
conversation_id=conversation_id,
workspace_id=workspace_id
)
detail = AppLogConversationDetail.model_validate(conversation)
detail.node_executions_map = node_executions_map
return success(data=detail)