gm-kilo 2.0.37 → 2.0.39
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 -3
- package/package.json +1 -1
package/gm.mjs
CHANGED
|
@@ -39,9 +39,13 @@ export default async ({ project, client, $, directory, worktree }) => {
|
|
|
39
39
|
const prd = fs.existsSync(prdFile) ? fs.readFileSync(prdFile, 'utf-8').trim() : '';
|
|
40
40
|
let content = rules || '';
|
|
41
41
|
if (prd) content += '\n\nPENDING WORK (.prd):\n' + prd;
|
|
42
|
-
//
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
// Inject thorns only on the first API call of a conversation (no assistant messages yet)
|
|
43
|
+
const msgs = input?.messages || [];
|
|
44
|
+
const isFirstCall = !msgs.some(m => m.role === 'assistant');
|
|
45
|
+
if (isFirstCall) {
|
|
46
|
+
const thorns = await startThorns();
|
|
47
|
+
if (thorns) content += '\n\n=== Repository Analysis (mcp-thorns) ===\n' + thorns;
|
|
48
|
+
}
|
|
45
49
|
if (content) output.system.push(content);
|
|
46
50
|
}
|
|
47
51
|
};
|