@cg3/equip 0.2.14 → 0.2.15
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/lib/hooks.js +3 -3
- package/package.json +1 -1
package/lib/hooks.js
CHANGED
|
@@ -44,13 +44,13 @@ process.stdin.on("end", () => {
|
|
|
44
44
|
try {
|
|
45
45
|
const input = JSON.parse(Buffer.concat(chunks).toString());
|
|
46
46
|
const toolName = input.tool_name || "";
|
|
47
|
-
const
|
|
47
|
+
const error = input.error || "";
|
|
48
48
|
|
|
49
49
|
// Only nudge on Bash failures (compile errors, runtime errors, etc.)
|
|
50
50
|
if (toolName !== "Bash") { process.exit(0); return; }
|
|
51
51
|
|
|
52
52
|
// Skip trivial failures (empty output, permission prompts)
|
|
53
|
-
if (!
|
|
53
|
+
if (!error || error.length < 20) { process.exit(0); return; }
|
|
54
54
|
|
|
55
55
|
// Inject search reminder as additional context
|
|
56
56
|
const output = {
|
|
@@ -77,7 +77,7 @@ process.stdin.on("data", c => chunks.push(c));
|
|
|
77
77
|
process.stdin.on("end", () => {
|
|
78
78
|
try {
|
|
79
79
|
const input = JSON.parse(Buffer.concat(chunks).toString());
|
|
80
|
-
const lastResponse = input.
|
|
80
|
+
const lastResponse = input.last_assistant_message || "";
|
|
81
81
|
|
|
82
82
|
// Check if the agent already mentioned contributions
|
|
83
83
|
const hasContribution = /contribute.*prior|prior.*contribut|No contribution needed/i.test(lastResponse);
|