refactor: remove commands.ts re-exports, import directly from submodules (#1204)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
TÂCHES 2026-03-18 11:23:54 -06:00 committed by GitHub
parent 0f97f938f7
commit 0b8254bfa0
3 changed files with 3 additions and 8 deletions

View file

@ -45,12 +45,6 @@ import { handleCleanupBranches, handleCleanupSnapshots, handleSkip, handleDryRun
import { handleDoctor, handleSteer, handleCapture, handleTriage, handleKnowledge, handleRunHook, handleUpdate, handleSkillHealth } from "./commands-handlers.js";
import { handleLogs } from "./commands-logs.js";
// ─── Re-exports (preserve public API surface) ───────────────────────────────
export { handlePrefs, handlePrefsMode, handlePrefsWizard, ensurePreferencesFile, handleImportClaude, buildCategorySummaries, serializePreferencesToFrontmatter, yamlSafeString, configureMode } from "./commands-prefs-wizard.js";
export { TOOL_KEYS, loadToolApiKeys, getConfigAuthStorage, handleConfig } from "./commands-config.js";
export { type InspectData, formatInspectOutput, handleInspect } from "./commands-inspect.js";
export { handleCleanupBranches, handleCleanupSnapshots, handleSkip, handleDryRun } from "./commands-maintenance.js";
export { handleDoctor, handleSteer, handleCapture, handleTriage, handleKnowledge, handleRunHook, handleUpdate, handleSkillHealth } from "./commands-handlers.js";
export 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");

View file

@ -27,7 +27,8 @@ import { createBashTool, createWriteTool, createReadTool, createEditTool, isTool
import { Type } from "@sinclair/typebox";
import { debugLog, debugTime } from "./debug-logger.js";
import { registerGSDCommand, loadToolApiKeys } from "./commands.js";
import { registerGSDCommand } from "./commands.js";
import { loadToolApiKeys } from "./commands-config.js";
import { registerExitCommand } from "./exit-command.js";
import { registerWorktreeCommand, getWorktreeOriginalCwd, getActiveWorktreeName } from "./worktree-command.js";
import { getActiveAutoWorktreeContext } from "./auto-worktree.js";

View file

@ -3,7 +3,7 @@
// Tests the pure formatInspectOutput function with known data.
import { createTestContext } from './test-helpers.ts';
import { formatInspectOutput, type InspectData } from '../commands.ts';
import { formatInspectOutput, type InspectData } from '../commands-inspect.ts';
const { assertEq, assertTrue, assertMatch, report } = createTestContext();