Skip to content

Commit 24cf515

Browse files
committed
fix: auto-prompt when directory is invalid
Instead of showing an error when the directory path is invalid, now automatically clears the path and shows the prompt again. This creates a seamless recovery flow: - User selects invalid directory → Path cleared → Prompt shown again - User can immediately choose correct directory or clone Much better UX than just showing an error and making them manually clear the directory.
1 parent ccc979b commit 24cf515

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/renderer/features/task-detail/stores/taskExecutionStore.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -582,14 +582,11 @@ export const useTaskExecutionStore = create<TaskExecutionStore>()(
582582
);
583583

584584
if (!isValid) {
585-
// Repository doesn't exist - user should use the prompt to select/clone
586-
store.addLog(taskId, {
587-
type: "error",
588-
ts: Date.now(),
589-
message:
590-
"Repository path is not valid. Please select a valid directory or clone the repository.",
591-
});
592-
return;
585+
// Repository path is invalid - clear it and show the prompt again
586+
store.setRepoPath(taskId, null);
587+
588+
// Recursively call runTask to trigger the prompt flow
589+
return store.runTask(taskId, task);
593590
}
594591

595592
const permissionMode = "acceptEdits";

0 commit comments

Comments
 (0)