chore: rename command fields update usage

tauraamui created

Change summary

internal/agent/tools/bash.go      |  2 +-
internal/agent/tools/bash_test.go | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)

Detailed changes

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)
 			}

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)