gm-kilo 2.0.36 → 2.0.38
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/gm.mjs +7 -6
- package/package.json +1 -1
package/gm.mjs
CHANGED
|
@@ -9,6 +9,7 @@ export default async ({ project, client, $, directory, worktree }) => {
|
|
|
9
9
|
let agentRules = '';
|
|
10
10
|
let thornsPromise = null;
|
|
11
11
|
let thornsOutput = '';
|
|
12
|
+
let thornsInjected = false;
|
|
12
13
|
|
|
13
14
|
const loadAgentRules = () => {
|
|
14
15
|
if (agentRules) return agentRules;
|
|
@@ -31,9 +32,6 @@ export default async ({ project, client, $, directory, worktree }) => {
|
|
|
31
32
|
return thornsPromise;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
// Kick off thorns immediately
|
|
35
|
-
startThorns();
|
|
36
|
-
|
|
37
35
|
const prdFile = path.join(directory, '.prd');
|
|
38
36
|
|
|
39
37
|
return {
|
|
@@ -42,9 +40,12 @@ export default async ({ project, client, $, directory, worktree }) => {
|
|
|
42
40
|
const prd = fs.existsSync(prdFile) ? fs.readFileSync(prdFile, 'utf-8').trim() : '';
|
|
43
41
|
let content = rules || '';
|
|
44
42
|
if (prd) content += '\n\nPENDING WORK (.prd):\n' + prd;
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
// Inject thorns only once at start of conversation
|
|
44
|
+
if (!thornsInjected) {
|
|
45
|
+
thornsInjected = true;
|
|
46
|
+
const thorns = await startThorns();
|
|
47
|
+
if (thorns) content += '\n\n=== Repository Analysis (mcp-thorns) ===\n' + thorns;
|
|
48
|
+
}
|
|
48
49
|
if (content) output.system.push(content);
|
|
49
50
|
}
|
|
50
51
|
};
|