From 9cbd179bf936aa08ba2783b47d3294cde2373f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=82CHES?= Date: Wed, 18 Mar 2026 11:20:14 -0600 Subject: [PATCH] =?UTF-8?q?refactor:=20deduplicate=20projectRoot()=20?= =?UTF-8?q?=E2=80=94=20single=20source=20in=20commands.ts=20(#1197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/commands-handlers.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/resources/extensions/gsd/commands-handlers.ts b/src/resources/extensions/gsd/commands-handlers.ts index f9ea52b34..5e5cb1d1a 100644 --- a/src/resources/extensions/gsd/commands-handlers.ts +++ b/src/resources/extensions/gsd/commands-handlers.ts @@ -20,15 +20,7 @@ import { } from "./doctor.js"; import { loadPrompt } from "./prompt-loader.js"; import { isAutoActive } from "./auto.js"; -import { resolveProjectRoot } from "./worktree.js"; -import { assertSafeDirectory } from "./validate-directory.js"; - -/** Resolve the effective project root, accounting for worktree paths. */ -function projectRoot(): string { - const root = resolveProjectRoot(process.cwd()); - assertSafeDirectory(root); - return root; -} +import { projectRoot } from "./commands.js"; function dispatchDoctorHeal(pi: ExtensionAPI, scope: string | undefined, reportText: string, structuredIssues: string): void { const workflowPath = process.env.GSD_WORKFLOW_PATH ?? join(process.env.HOME ?? "~", ".pi", "GSD-WORKFLOW.md");