Skip to content

Commit bea701c

Browse files
authored
Merge pull request #832 from dgageot/rename-bg-tool
Rename run_shell_background to run_background_job
2 parents 9e5c600 + eb745ca commit bea701c

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

pkg/tools/builtin/shell.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
const (
2121
ToolNameShell = "shell"
22-
ToolNameRunShellBackground = "run_shell_background"
22+
ToolNameRunShellBackground = "run_background_job"
2323
ToolNameListBackgroundJobs = "list_background_jobs"
2424
ToolNameViewBackgroundJob = "view_background_job"
2525
ToolNameStopBackgroundJob = "stop_background_job"
@@ -556,7 +556,7 @@ Run long-running processes in the background while continuing with other tasks.
556556
557557
## Background Job Tools
558558
559-
**run_shell_background**: Start a command in the background
559+
**run_background_job**: Start a command in the background
560560
- Parameters: cmd (required), cwd (optional, defaults to ".")
561561
- Returns: Job ID for tracking
562562
@@ -616,8 +616,8 @@ Use list_background_jobs to see all jobs with their status
616616
{ "cmd": "docker run --rm -p 5432:5432 postgres:latest", "cwd": "." }
617617
618618
**Multiple services pattern:**
619-
1. Start backend: run_shell_background with server command
620-
2. Start frontend: run_shell_background with dev server
619+
1. Start backend: run_background_job with server command
620+
2. Start frontend: run_background_job with dev server
621621
3. Perform tasks: use other tools while services run
622622
4. Check logs: view_background_job to see service output
623623
5. Cleanup: stop_background_job for each service (or let agent cleanup automatically)`

pkg/tools/builtin/shell_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,9 @@ func TestShellTool_RunBackgroundJob(t *testing.T) {
243243
require.NoError(t, err)
244244
require.Len(t, tls, 5)
245245

246-
// Find the run_shell_background tool
247246
var handler tools.ToolHandler
248247
for _, tl := range tls {
249-
if tl.Name == "run_shell_background" {
248+
if tl.Name == "run_background_job" {
250249
handler = tl.Handler
251250
break
252251
}
@@ -261,7 +260,7 @@ func TestShellTool_RunBackgroundJob(t *testing.T) {
261260

262261
toolCall := tools.ToolCall{
263262
Function: tools.FunctionCall{
264-
Name: "run_shell_background",
263+
Name: "run_background_job",
265264
Arguments: string(argsBytes),
266265
},
267266
}
@@ -285,7 +284,7 @@ func TestShellTool_ListBackgroundJobs(t *testing.T) {
285284

286285
var runHandler, listHandler tools.ToolHandler
287286
for _, tl := range tls {
288-
if tl.Name == "run_shell_background" {
287+
if tl.Name == "run_background_job" {
289288
runHandler = tl.Handler
290289
}
291290
if tl.Name == "list_background_jobs" {
@@ -304,7 +303,7 @@ func TestShellTool_ListBackgroundJobs(t *testing.T) {
304303

305304
_, err = runHandler(t.Context(), tools.ToolCall{
306305
Function: tools.FunctionCall{
307-
Name: "run_shell_background",
306+
Name: "run_background_job",
308307
Arguments: string(argsBytes),
309308
},
310309
})

0 commit comments

Comments
 (0)