Folders, Persistent Import Progress Tracking & UX Enhancements (#3841)
Co-authored-by: Jonathan Dobson <jon.m.dobson@gmail.com>
This commit is contained in:
@@ -83,6 +83,8 @@ class Workflow(BaseModel):
|
||||
cache_key: str | None = None
|
||||
run_sequentially: bool | None = None
|
||||
sequential_key: str | None = None
|
||||
folder_id: str | None = None
|
||||
import_error: str | None = None
|
||||
|
||||
created_at: datetime
|
||||
modified_at: datetime
|
||||
|
||||
@@ -1098,6 +1098,7 @@ class WorkflowService:
|
||||
ai_fallback: bool | None = None,
|
||||
run_sequentially: bool = False,
|
||||
sequential_key: str | None = None,
|
||||
folder_id: str | None = None,
|
||||
) -> Workflow:
|
||||
return await app.DATABASE.create_workflow(
|
||||
title=title,
|
||||
@@ -1121,6 +1122,7 @@ class WorkflowService:
|
||||
ai_fallback=False if ai_fallback is None else ai_fallback,
|
||||
run_sequentially=run_sequentially,
|
||||
sequential_key=sequential_key,
|
||||
folder_id=folder_id,
|
||||
)
|
||||
|
||||
async def create_workflow_from_prompt(
|
||||
@@ -1378,13 +1380,15 @@ class WorkflowService:
|
||||
only_saved_tasks: bool = False,
|
||||
only_workflows: bool = False,
|
||||
search_key: str | None = None,
|
||||
folder_id: str | None = None,
|
||||
statuses: list[WorkflowStatus] | None = None,
|
||||
) -> list[Workflow]:
|
||||
"""
|
||||
Get all workflows with the latest version for the organization.
|
||||
|
||||
Args:
|
||||
search_key: Unified search term for title and parameter metadata (replaces title/parameter).
|
||||
search_key: Unified search term for title, folder name, and parameter metadata.
|
||||
folder_id: Filter workflows by folder ID.
|
||||
"""
|
||||
return await app.DATABASE.get_workflows_by_organization_id(
|
||||
organization_id=organization_id,
|
||||
@@ -1393,6 +1397,7 @@ class WorkflowService:
|
||||
only_saved_tasks=only_saved_tasks,
|
||||
only_workflows=only_workflows,
|
||||
search_key=search_key,
|
||||
folder_id=folder_id,
|
||||
statuses=statuses,
|
||||
)
|
||||
|
||||
@@ -2723,6 +2728,7 @@ class WorkflowService:
|
||||
ai_fallback=request.ai_fallback,
|
||||
run_sequentially=request.run_sequentially,
|
||||
sequential_key=request.sequential_key,
|
||||
folder_id=existing_latest_workflow.folder_id,
|
||||
)
|
||||
else:
|
||||
# NOTE: it's only potential, as it may be immediately deleted!
|
||||
|
||||
Reference in New Issue
Block a user