refactor(hooks): consolidate getCcsHooksDir to config-manager

- remove duplicate definitions from 3 locations

- centralize in config-manager.ts for DRY compliance

- update all imports across hook modules
This commit is contained in:
kaitranntt
2026-02-04 08:09:20 -05:00
parent 039b005b14
commit b014c4e872
7 changed files with 17 additions and 28 deletions
+2 -9
View File
@@ -9,20 +9,13 @@
import * as fs from 'fs';
import * as path from 'path';
import { info, warn } from '../ui';
import { getCcsDir } from '../config-manager';
/**
* Get CCS hooks directory
*/
export function getCcsHooksDir(): string {
return path.join(getCcsDir(), 'hooks');
}
import { getCcsHooksDir } from '../config-manager';
/**
* Get prompts directory for image analysis
*/
export function getPromptsDir(): string {
return path.join(getCcsDir(), 'prompts', 'image-analysis');
return path.join(getCcsHooksDir(), '..', 'prompts', 'image-analysis');
}
/**
+1 -1
View File
@@ -4,4 +4,4 @@
* Exports hook installer functions for prompt management
*/
export { getCcsHooksDir, getPromptsDir, installImageAnalysisPrompts } from './hook-installer';
export { getPromptsDir, installImageAnalysisPrompts } from './hook-installer';