mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-10 16:21:41 +00:00
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:
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
* Exports hook installer functions for prompt management
|
||||
*/
|
||||
|
||||
export { getCcsHooksDir, getPromptsDir, installImageAnalysisPrompts } from './hook-installer';
|
||||
export { getPromptsDir, installImageAnalysisPrompts } from './hook-installer';
|
||||
|
||||
Reference in New Issue
Block a user