Skip to content

Commit

Permalink
make task block title empty string by default; use task_block.label f…
Browse files Browse the repository at this point in the history
…or the running task.title if task_block.title is empty (#1181)
  • Loading branch information
wintonzheng authored Nov 13, 2024
1 parent 9f3af25 commit 11909cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion skyvern/forge/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def create_task_and_step_from_block(
task_url = validate_url(task_url)
task = await app.DATABASE.create_task(
url=task_url,
title=task_block.title,
title=task_block.title or task_block.label,
webhook_callback_url=None,
totp_verification_url=task_block.totp_verification_url,
totp_identifier=task_block.totp_identifier,
Expand Down
2 changes: 1 addition & 1 deletion skyvern/forge/sdk/workflow/models/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class TaskBlock(Block):
block_type: Literal[BlockType.TASK] = BlockType.TASK

url: str | None = None
title: str = "Untitled Task"
title: str = ""
navigation_goal: str | None = None
data_extraction_goal: str | None = None
data_schema: dict[str, Any] | list | None = None
Expand Down
2 changes: 1 addition & 1 deletion skyvern/forge/sdk/workflow/models/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class TaskBlockYAML(BlockYAML):
block_type: Literal[BlockType.TASK] = BlockType.TASK # type: ignore

url: str | None = None
title: str = "Untitled Task"
title: str = ""
navigation_goal: str | None = None
data_extraction_goal: str | None = None
data_schema: dict[str, Any] | list | None = None
Expand Down

0 comments on commit 11909cb

Please sign in to comment.