prr-kit 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tools/cli/installers/lib/core/installer.js +6 -3
- package/tools/cli/installers/lib/ide/codex.js +4 -0
- package/tools/cli/installers/lib/ide/github-copilot.js +4 -0
- package/tools/cli/installers/lib/ide/kilo.js +4 -0
- package/tools/cli/installers/lib/ide/manager.js +15 -0
package/package.json
CHANGED
|
@@ -64,7 +64,10 @@ class Installer {
|
|
|
64
64
|
await prompts.log.info(' ✓ Output directories created');
|
|
65
65
|
|
|
66
66
|
// Update .gitignore
|
|
67
|
-
|
|
67
|
+
const ideGitignorePatterns = selectedIdes.flatMap((ide) =>
|
|
68
|
+
this.ideManager.getTargetDirs(ide).map((dir) => `${dir}/prr-*`)
|
|
69
|
+
);
|
|
70
|
+
await this.updateGitignore(projectDir, config.outputFolder || '_prr-output', ideGitignorePatterns);
|
|
68
71
|
|
|
69
72
|
// Generate manifests
|
|
70
73
|
const cfgDir = path.join(prrDir, '_config');
|
|
@@ -138,9 +141,9 @@ class Installer {
|
|
|
138
141
|
}
|
|
139
142
|
}
|
|
140
143
|
|
|
141
|
-
async updateGitignore(projectDir, outputFolder) {
|
|
144
|
+
async updateGitignore(projectDir, outputFolder, extraPatterns = []) {
|
|
142
145
|
const gitignorePath = path.join(projectDir, '.gitignore');
|
|
143
|
-
const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}
|
|
146
|
+
const entries = [`${PRR_FOLDER_NAME}/`, `${outputFolder}/`, ...extraPatterns];
|
|
144
147
|
|
|
145
148
|
if (!(await fs.pathExists(gitignorePath))) return;
|
|
146
149
|
|
|
@@ -100,6 +100,10 @@ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/${rel
|
|
|
100
100
|
return { success: true, results: { agents: count, workflows: 0 } };
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
getTargetDirs() {
|
|
104
|
+
return ['.codex/prompts'];
|
|
105
|
+
}
|
|
106
|
+
|
|
103
107
|
async cleanup(projectDir) {
|
|
104
108
|
for (const loc of ['global', 'project']) {
|
|
105
109
|
const dir = this._getPromptDir(projectDir, loc);
|
|
@@ -208,6 +208,10 @@ Use \`#prr-\` in Copilot Chat to access PR Review prompts, or select agents from
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
getTargetDirs() {
|
|
212
|
+
return ['.github/agents', '.github/prompts'];
|
|
213
|
+
}
|
|
214
|
+
|
|
211
215
|
async cleanup(projectDir, options = {}) {
|
|
212
216
|
// Clean agents
|
|
213
217
|
const agentsDir = path.join(projectDir, this.githubDir, this.agentsDir);
|
|
@@ -103,6 +103,10 @@ IT IS CRITICAL THAT YOU FOLLOW THIS COMMAND: LOAD the FULL @{project-root}/${rel
|
|
|
103
103
|
return { success: true, results: { agents: modeCount, workflows: wfCount } };
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
getTargetDirs() {
|
|
107
|
+
return ['.kilocode/workflows'];
|
|
108
|
+
}
|
|
109
|
+
|
|
106
110
|
async cleanup(projectDir) {
|
|
107
111
|
// Remove prr- modes from .kilocodemodes
|
|
108
112
|
const kiloModesPath = path.join(projectDir, this.configFile);
|
|
@@ -100,6 +100,21 @@ class IdeManager {
|
|
|
100
100
|
return this.getAvailableIdes().filter((i) => i.preferred);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
getTargetDirs(ideName) {
|
|
104
|
+
const handler = this.handlers.get(ideName.toLowerCase());
|
|
105
|
+
if (!handler) return [];
|
|
106
|
+
if (typeof handler.getTargetDirs === 'function') return handler.getTargetDirs();
|
|
107
|
+
if (handler.installerConfig) {
|
|
108
|
+
if (handler.installerConfig.targets) {
|
|
109
|
+
return handler.installerConfig.targets.map((t) => t.target_dir);
|
|
110
|
+
}
|
|
111
|
+
if (handler.installerConfig.target_dir) {
|
|
112
|
+
return [handler.installerConfig.target_dir];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
|
|
103
118
|
async setup(ideName, projectDir, prrDir, options = {}) {
|
|
104
119
|
await this.ensureInitialized();
|
|
105
120
|
const handler = this.handlers.get(ideName.toLowerCase());
|