@blockrun/runcode 1.5.12 → 1.5.14
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/dist/agent/loop.js +19 -0
- package/package.json +1 -1
package/dist/agent/loop.js
CHANGED
|
@@ -350,6 +350,25 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
|
|
|
350
350
|
if (input === '/fix') {
|
|
351
351
|
input = 'Look at the most recent error or issue we discussed and fix it. Check the relevant files, identify the root cause, and apply the fix.';
|
|
352
352
|
}
|
|
353
|
+
// Handle /test — run project tests
|
|
354
|
+
if (input === '/test') {
|
|
355
|
+
input = 'Detect the project test framework (look for package.json scripts, pytest, etc.) and run the test suite. Show a summary of results.';
|
|
356
|
+
}
|
|
357
|
+
// Handle /explain <file> — explain code
|
|
358
|
+
if (input.startsWith('/explain ')) {
|
|
359
|
+
const target = input.slice(9).trim();
|
|
360
|
+
input = `Read and explain the code in ${target}. Cover: what it does, key functions/classes, how it connects to the rest of the codebase.`;
|
|
361
|
+
}
|
|
362
|
+
// Handle /search <query> — search codebase
|
|
363
|
+
if (input.startsWith('/search ')) {
|
|
364
|
+
const query = input.slice(8).trim();
|
|
365
|
+
input = `Search the codebase for "${query}" using Grep. Show the matching files and relevant code context.`;
|
|
366
|
+
}
|
|
367
|
+
// Handle /find <pattern> — find files
|
|
368
|
+
if (input.startsWith('/find ')) {
|
|
369
|
+
const pattern = input.slice(6).trim();
|
|
370
|
+
input = `Find files matching the pattern "${pattern}" using Glob. Show the results.`;
|
|
371
|
+
}
|
|
353
372
|
// Handle /status — show git status
|
|
354
373
|
if (input === '/status') {
|
|
355
374
|
try {
|