("details");
+ const primaryWorkingDir = projectWorkingDirs[0] ?? null;
const {
data: gitState,
error,
isLoading,
isFetching,
refetch,
- } = useGitState(projectWorkingDir, activeTab === "details");
+ } = useGitState(primaryWorkingDir, activeTab === "details");
const gitErrorMessage =
error instanceof Error ? error.message : "Unable to read git status.";
@@ -94,7 +95,7 @@ export function ContextPanel({
variant="ghost"
size="icon-xs"
onClick={() => void refetch()}
- disabled={!projectWorkingDir || isFetching}
+ disabled={!primaryWorkingDir || isFetching}
className="rounded-md"
aria-label="Refresh git status"
title="Refresh git status"
@@ -125,11 +126,17 @@ export function ContextPanel({
) : (
No project assigned.
)}
-
- {projectWorkingDir ?? "Folder not set"}
-
+ {projectWorkingDirs.length > 0 ? (
+ projectWorkingDirs.map((dir) => (
+
+ {dir}
+
+ ))
+ ) : (
+ Folder not set
+ )}
- {!projectWorkingDir ? null : isLoading && !gitState ? (
+ {!primaryWorkingDir ? null : isLoading && !gitState ? (
Loading git status…
diff --git a/ui/goose2/src/features/chat/ui/__tests__/ChatInput.test.tsx b/ui/goose2/src/features/chat/ui/__tests__/ChatInput.test.tsx
index 032b35be03..ecaeacde70 100644
--- a/ui/goose2/src/features/chat/ui/__tests__/ChatInput.test.tsx
+++ b/ui/goose2/src/features/chat/ui/__tests__/ChatInput.test.tsx
@@ -143,7 +143,7 @@ describe("ChatInput", () => {
{
id: "project-1",
name: "goose2",
- workingDir: "/Users/wesb/dev/goose2",
+ workingDirs: ["/Users/wesb/dev/goose2"],
},
]}
/>,
@@ -169,7 +169,7 @@ describe("ChatInput", () => {
{
id: "project-1",
name: "goose2",
- workingDir: "/Users/wesb/dev/goose2",
+ workingDirs: ["/Users/wesb/dev/goose2"],
},
]}
/>,
diff --git a/ui/goose2/src/features/chat/ui/__tests__/ContextPanel.test.tsx b/ui/goose2/src/features/chat/ui/__tests__/ContextPanel.test.tsx
index aa68aa0c86..9f5dd90103 100644
--- a/ui/goose2/src/features/chat/ui/__tests__/ContextPanel.test.tsx
+++ b/ui/goose2/src/features/chat/ui/__tests__/ContextPanel.test.tsx
@@ -54,7 +54,7 @@ describe("ContextPanel", () => {
,
);
@@ -87,7 +87,7 @@ describe("ContextPanel", () => {
refetch: vi.fn(),
});
- render();
+ render();
expect(screen.getByText("Not a git repository.")).toBeInTheDocument();
});
diff --git a/ui/goose2/src/features/home/ui/HomeScreen.tsx b/ui/goose2/src/features/home/ui/HomeScreen.tsx
index e21b82bdb9..4c7c61ca58 100644
--- a/ui/goose2/src/features/home/ui/HomeScreen.tsx
+++ b/ui/goose2/src/features/home/ui/HomeScreen.tsx
@@ -132,7 +132,7 @@ export function HomeScreen({ onStartChat, onCreateProject }: HomeScreenProps) {
availableProjects={projects.map((project) => ({
id: project.id,
name: project.name,
- workingDir: project.workingDirs[0] ?? null,
+ workingDirs: project.workingDirs,
color: project.color,
}))}
onProjectChange={setSelectedProjectId}