@@ -63,6 +63,7 @@ type bashDescriptionData struct {
63 BannedCommands string
63 BannedCommands string
64 MaxOutputLength int
64 MaxOutputLength int
65 Attribution config.Attribution
65 Attribution config.Attribution
68var bannedCommands = []string{
69var bannedCommands = []string{
@@ -138,13 +139,14 @@ var bannedCommands = []string{
141−func bashDescription(attribution *config.Attribution) string {
142+func bashDescription(attribution *config.Attribution, modelName string) string {
142 bannedCommandsStr := strings.Join(bannedCommands, ", ")
143 bannedCommandsStr := strings.Join(bannedCommands, ", ")
143 var out bytes.Buffer
144 var out bytes.Buffer
144 if err := bashDescriptionTpl.Execute(&out, bashDescriptionData{
145 if err := bashDescriptionTpl.Execute(&out, bashDescriptionData{
145 BannedCommands: bannedCommandsStr,
146 BannedCommands: bannedCommandsStr,
146 MaxOutputLength: MaxOutputLength,
147 MaxOutputLength: MaxOutputLength,
147 Attribution: *attribution,
148 Attribution: *attribution,
149+ ModelName: modelName,
148 }); err != nil {
150 }); err != nil {
149 // this should never happen.
151 // this should never happen.
150 panic("failed to execute bash description template: " + err.Error())
152 panic("failed to execute bash description template: " + err.Error())
@@ -184,10 +186,10 @@ func blockFuncs() []shell.BlockFunc {
187−func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution) fantasy.AgentTool {
189+func NewBashTool(permissions permission.Service, workingDir string, attribution *config.Attribution, modelName string) fantasy.AgentTool {
188 return fantasy.NewAgentTool(
190 return fantasy.NewAgentTool(
189 BashToolName,
191 BashToolName,
190− string(bashDescription(attribution)),
192+ string(bashDescription(attribution, modelName)),
191 func(ctx context.Context, params BashParams, call fantasy.ToolCall) (fantasy.ToolResponse, error) {
193 func(ctx context.Context, params BashParams, call fantasy.ToolCall) (fantasy.ToolResponse, error) {
192 if params.Command == "" {
194 if params.Command == "" {
193 return fantasy.NewTextErrorResponse("missing command"), nil
195 return fantasy.NewTextErrorResponse("missing command"), nil