@blockrun/runcode 1.5.13 → 1.6.0

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.
Files changed (2) hide show
  1. package/dist/agent/loop.js +31 -0
  2. package/package.json +1 -1
@@ -359,6 +359,37 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
359
359
  const target = input.slice(9).trim();
360
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
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
+ }
372
+ // Handle /refactor <description> — code refactoring
373
+ if (input.startsWith('/refactor ')) {
374
+ const desc = input.slice(10).trim();
375
+ input = `Refactor: ${desc}. Read the relevant code first, then make targeted changes. Explain each change.`;
376
+ }
377
+ // Handle /debug — analyze recent error
378
+ if (input === '/debug') {
379
+ input = 'Look at the most recent error in this session. Read the relevant source files, analyze the root cause, and suggest a fix with specific code changes.';
380
+ }
381
+ // Handle /init — initialize project context
382
+ if (input === '/init') {
383
+ input = 'Read the project structure: check package.json (or equivalent), README, and key config files. Summarize: what this project is, main language/framework, entry points, and how to run/test it.';
384
+ }
385
+ // Handle /todo — find TODOs in codebase
386
+ if (input === '/todo') {
387
+ input = 'Search the codebase for TODO, FIXME, HACK, and XXX comments using Grep. Show the results grouped by file.';
388
+ }
389
+ // Handle /deps — show project dependencies
390
+ if (input === '/deps') {
391
+ input = 'Read the project dependency file (package.json, requirements.txt, go.mod, Cargo.toml, etc.) and list key dependencies with their versions.';
392
+ }
362
393
  // Handle /status — show git status
363
394
  if (input === '/status') {
364
395
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/runcode",
3
- "version": "1.5.13",
3
+ "version": "1.6.0",
4
4
  "description": "RunCode — AI coding agent powered by 41+ models. Pay per use with USDC.",
5
5
  "type": "module",
6
6
  "bin": {