From b17c304f169428b43f392715304fc271e54d4791 Mon Sep 17 00:00:00 2001 From: tauraamui Date: Mon, 8 Dec 2025 13:49:39 +0000 Subject: [PATCH] chore: rename command fields update usage --- internal/agent/tools/bash.go | 2 +- internal/agent/tools/bash_test.go | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/agent/tools/bash.go b/internal/agent/tools/bash.go index d9187e366d5c20516a29ad96fe8431ab6188fdda..919009ad1a7f5a6ce633ffe1f76fcc3b15d0ba2e 100644 --- a/internal/agent/tools/bash.go +++ b/internal/agent/tools/bash.go @@ -322,7 +322,7 @@ func NewBashTool( // Start with detached context so it can survive if moved to background bgManager := shell.GetBackgroundShellManager() bgManager.Cleanup() - bgShell, err := bgManager.Start(context.Background(), execWorkingDir, blockFuncs(defaultBannedCommands), params.Command, params.Description) + bgShell, err := bgManager.Start(context.Background(), execWorkingDir, blockFuncs(defaultBannedCommands, []config.BannedToolArgsAndOrParams{}, true), params.Command, params.Description) if err != nil { return fantasy.ToolResponse{}, fmt.Errorf("error starting shell: %w", err) } diff --git a/internal/agent/tools/bash_test.go b/internal/agent/tools/bash_test.go index e76461aa7752e15f986acfc03b2bec8463aa4ad2..24d9bce981491b126cf30bac2dd5204862daeba7 100644 --- a/internal/agent/tools/bash_test.go +++ b/internal/agent/tools/bash_test.go @@ -10,9 +10,9 @@ import ( func TestResolveBlockFuncsFromEmptyConfig(t *testing.T) { cfg := config.ToolBash{ - DisableDefaults: false, - BannedCommands: []string{}, - BannedSubCommands: []config.BannedToolArgsAndOrParams{}, + DisableDefaultCommands: false, + BannedCommands: []string{}, + BannedSubCommands: []config.BannedToolArgsAndOrParams{}, } bannedCmds := resolveBannedCommandsList(cfg) @@ -22,9 +22,9 @@ func TestResolveBlockFuncsFromEmptyConfig(t *testing.T) { func TestResolveBlockFuncsFromEmptyConfigWithDefaultDisabled(t *testing.T) { cfg := config.ToolBash{ - DisableDefaults: true, - BannedCommands: []string{}, - BannedSubCommands: []config.BannedToolArgsAndOrParams{}, + DisableDefaultCommands: true, + BannedCommands: []string{}, + BannedSubCommands: []config.BannedToolArgsAndOrParams{}, } bannedCmds := resolveBannedCommandsList(cfg) @@ -34,7 +34,7 @@ func TestResolveBlockFuncsFromEmptyConfigWithDefaultDisabled(t *testing.T) { func TestResolveBlockFuncsDefaultDisabledWithBannedCommands(t *testing.T) { cfg := config.ToolBash{ - DisableDefaults: true, + DisableDefaultCommands: true, BannedCommands: []string{ "pacman", "mount", @@ -50,9 +50,9 @@ func TestResolveBlockFuncsDefaultDisabledWithBannedCommands(t *testing.T) { func TestResolveBlockFuncsWithDefaultAndAddtionalBannedCommands(t *testing.T) { additionalBannedCommands := []string{"lazygit", "btop"} cfg := config.ToolBash{ - DisableDefaults: false, - BannedCommands: additionalBannedCommands, - BannedSubCommands: []config.BannedToolArgsAndOrParams{}, + DisableDefaultCommands: false, + BannedCommands: additionalBannedCommands, + BannedSubCommands: []config.BannedToolArgsAndOrParams{}, } bannedCmds := resolveBannedCommandsList(cfg)