fix: task_str validation not required for trajectory replay (#6957)

This commit is contained in:
Ryan H. Tran 2025-02-26 20:17:03 +07:00 committed by GitHub
parent e49b9243af
commit 34fa9ed4db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,17 +247,18 @@ if __name__ == '__main__':
# Read task from file, CLI args, or stdin
task_str = read_task(args, config.cli_multiline_input)
initial_user_action: Action = NullAction()
if config.replay_trajectory_path:
if task_str:
raise ValueError(
'User-specified task is not supported under trajectory replay mode'
)
else:
if not task_str:
raise ValueError('No task provided. Please specify a task through -t, -f.')
if not task_str:
raise ValueError('No task provided. Please specify a task through -t, -f.')
# Create initial user action
initial_user_action: MessageAction = MessageAction(content=task_str)
# Create actual initial user action
initial_user_action = MessageAction(content=task_str)
# Set session name
session_name = args.name