Skip to content

Commit 6c14213

Browse files
committed
feat: /search <query> and /find <pattern> shortcuts (v1.5.14)
1 parent 1538aa8 commit 6c14213

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

dist/agent/loop.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,16 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
359359
const target = input.slice(9).trim();
360360
input = `Read and explain the code in ${target}. Cover: what it does, key functions/classes, how it connects to the rest of the codebase.`;
361361
}
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+
}
362372
// Handle /status — show git status
363373
if (input === '/status') {
364374
try {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blockrun/runcode",
3-
"version": "1.5.13",
3+
"version": "1.5.14",
44
"description": "RunCode — AI coding agent powered by 41+ models. Pay per use with USDC.",
55
"type": "module",
66
"bin": {

src/agent/loop.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,18 @@ export async function interactiveSession(
456456
input = `Read and explain the code in ${target}. Cover: what it does, key functions/classes, how it connects to the rest of the codebase.`;
457457
}
458458

459+
// Handle /search <query> — search codebase
460+
if (input.startsWith('/search ')) {
461+
const query = input.slice(8).trim();
462+
input = `Search the codebase for "${query}" using Grep. Show the matching files and relevant code context.`;
463+
}
464+
465+
// Handle /find <pattern> — find files
466+
if (input.startsWith('/find ')) {
467+
const pattern = input.slice(6).trim();
468+
input = `Find files matching the pattern "${pattern}" using Glob. Show the results.`;
469+
}
470+
459471
// Handle /status — show git status
460472
if (input === '/status') {
461473
try {

0 commit comments

Comments
 (0)