gm-kilo 2.0.480 → 2.0.482
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-kilo.mjs +13 -2
- package/package.json +1 -1
package/gm-kilo.mjs
CHANGED
|
@@ -154,7 +154,7 @@ export async function GmPlugin({ directory }) {
|
|
|
154
154
|
throw new Error('The search/explore skill is blocked. Use exec:codesearch instead.\n\nexec:codesearch\n<natural language description>');
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
if (input.tool === 'write' || input.tool === 'Write' || input.tool === 'edit') {
|
|
157
|
+
if (input.tool === 'write' || input.tool === 'Write' || input.tool === 'edit' || input.tool === 'Edit') {
|
|
158
158
|
const fp = (output.args && output.args.file_path) || (input.args && input.args.file_path) || '';
|
|
159
159
|
const base = basename(fp).toLowerCase();
|
|
160
160
|
const ext = extname(fp);
|
|
@@ -180,6 +180,17 @@ export async function GmPlugin({ directory }) {
|
|
|
180
180
|
}
|
|
181
181
|
const result = runExecSync(m[1]||'', m[2], output.args.workdir || directory);
|
|
182
182
|
output.args = { ...output.args, command: safePrintf('exec:'+(m[1]||'nodejs')+' output:\n\n'+result) };
|
|
183
|
-
}
|
|
183
|
+
},
|
|
184
|
+
'message.updated': async (input, output) => {
|
|
185
|
+
try {
|
|
186
|
+
const role = input && input.message && input.message.info && input.message.info.role;
|
|
187
|
+
if (role !== 'user') return;
|
|
188
|
+
runPlugkit(['hook', 'prompt-submit']);
|
|
189
|
+
} catch(e) {}
|
|
190
|
+
},
|
|
191
|
+
'session.closing': async (input, output) => {
|
|
192
|
+
try { runPlugkit(['hook', 'stop']); } catch(e) {}
|
|
193
|
+
try { runPlugkit(['hook', 'stop-git']); } catch(e) {}
|
|
194
|
+
},
|
|
184
195
|
};
|
|
185
196
|
}
|