mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: 更新工作流路径至用户主目录,优化文件引用
This commit is contained in:
@@ -8,7 +8,7 @@ import { getPackageRoot as findPackageRoot, getPackageVersion } from '../utils/p
|
||||
|
||||
// Workflow source directories (relative to package root)
|
||||
const WORKFLOW_SOURCES = [
|
||||
{ name: '.claude/workflows', description: 'Claude workflows' },
|
||||
{ name: '~/.ccw/workflows', description: 'Claude workflows' },
|
||||
{ name: '.claude/scripts', description: 'Claude scripts' },
|
||||
{ name: '.claude/templates', description: 'Claude templates' },
|
||||
{ name: '.codex/prompts', description: 'Codex prompts' },
|
||||
@@ -314,7 +314,7 @@ function showWorkflowHelp(): void {
|
||||
console.log(chalk.white(' Examples:'));
|
||||
console.log(chalk.gray(' ccw workflow install # Install all workflows'));
|
||||
console.log(chalk.gray(' ccw workflow install -f # Force install'));
|
||||
console.log(chalk.gray(' ccw workflow install --source .claude/workflows'));
|
||||
console.log(chalk.gray(' ccw workflow install --source ~/.ccw/workflows'));
|
||||
console.log(chalk.gray(' ccw workflow list # List installed'));
|
||||
console.log(chalk.gray(' ccw workflow sync # Update workflows'));
|
||||
console.log('');
|
||||
|
||||
@@ -31,7 +31,7 @@ const DEFAULT_MODELS: Record<string, string> = {
|
||||
};
|
||||
|
||||
// Template paths (relative to user home directory)
|
||||
const TEMPLATE_BASE = '.claude/workflows/cli-templates/prompts/documentation';
|
||||
const TEMPLATE_BASE = '~/.ccw/workflows/cli-templates/prompts/documentation';
|
||||
|
||||
// Define Zod schema for validation
|
||||
const ParamsSchema = z.object({
|
||||
|
||||
@@ -40,7 +40,7 @@ function detectMatrixDimensions(prototypesDir) {
|
||||
function loadTemplate(templatePath) {
|
||||
const defaultPath = resolve(
|
||||
process.env.HOME || process.env.USERPROFILE,
|
||||
'.claude/workflows/_template-compare-matrix.html'
|
||||
'~/.ccw/workflows/_template-compare-matrix.html'
|
||||
);
|
||||
|
||||
const path = templatePath || defaultPath;
|
||||
|
||||
@@ -130,7 +130,7 @@ function scanDirectoryStructure(targetPath, strategy) {
|
||||
function loadTemplate() {
|
||||
const templatePath = join(
|
||||
process.env.HOME || process.env.USERPROFILE,
|
||||
'.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt'
|
||||
'~/.ccw/workflows/cli-templates/prompts/memory/02-document-module-structure.txt'
|
||||
);
|
||||
|
||||
if (existsSync(templatePath)) {
|
||||
|
||||
@@ -150,7 +150,7 @@ function writePrototypeHtml(filePath: string, target: string, style: number, lay
|
||||
|
||||
describe('ui_generate_preview visual regression', () => {
|
||||
const prototypesDir = mkdtempSync(join(tmpdir(), 'ccw-ui-generate-preview-'));
|
||||
const templatePath = resolve(process.cwd(), '.claude/workflows/_template-compare-matrix.html');
|
||||
const templatePath = resolve(process.cwd(), '~/.ccw/workflows/_template-compare-matrix.html');
|
||||
|
||||
let server: StaticServer | undefined;
|
||||
let browser: import('playwright').Browser | undefined;
|
||||
|
||||
Reference in New Issue
Block a user