for import and pre-built mark the build step as completed in the progress bar

This commit is contained in:
arkml 2025-09-08 23:01:50 +05:30
parent 4193ed57f0
commit 04c505979f

View file

@ -35,6 +35,11 @@ export async function createProjectWithOptions(options: CreateProjectOptions): P
if (options.prompt?.trim()) {
localStorage.setItem(`project_prompt_${response.id}`, options.prompt);
}
// If the project was created from a template (pre-built agent),
// mark the Build step as completed in localStorage for the progress bar.
if (options.template) {
localStorage.setItem(`agent_instructions_changed_${response.id}`, 'true');
}
// Call success callback if provided
if (options.onSuccess) {
@ -77,6 +82,8 @@ export async function createProjectFromJsonWithOptions(options: CreateProjectFro
if (options.onSuccess) {
options.onSuccess(response.id);
}
// Project created from imported JSON: mark Build step as completed
localStorage.setItem(`agent_instructions_changed_${response.id}`, 'true');
// Navigate to workflow page
options.router.push(`/projects/${response.id}/workflow`);
@ -112,4 +119,4 @@ export async function createProjectFromTemplate(
router,
onError
});
}
}