From ad2aeed54e695b0f7f57ba802617d5e3087a7b99 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 4 Nov 2026 23:39:50 +0800 Subject: [PATCH] fix(agents): don't show a branch for a task in a folder that isn't a repository (#1316) For a folder that isn't a repository, the current-branch query answers with a repository found below it, so the New Agent Task page read " on " although the agent runs in the folder itself and the branch couldn't be changed. The branch is now shown only when the project is a repository. --- src/features/agents/HomeEditor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/agents/HomeEditor.tsx b/src/features/agents/HomeEditor.tsx index bf8e04213..85a552934 100644 --- a/src/features/agents/HomeEditor.tsx +++ b/src/features/agents/HomeEditor.tsx @@ -170,7 +170,8 @@ export function HomeEditor({ docked = false }: { docked?: boolean; input?: Edito onChange={(isolation) => updateDraft({ isolation, isolationChosen: true })} /> )} - {isolation === "local" && current && ( + {/* A folder that isn't a repository has no branch: the one Git found below it isn't where the agent runs. */} + {isolation === "local" && isGit && current && ( <> {!docked && (