(edits []fileutil.EditSpec)
| 171 | } |
| 172 | |
| 173 | func formatEditDescriptions(edits []fileutil.EditSpec) []string { |
| 174 | numEdits := len(edits) |
| 175 | editStr := "edits" |
| 176 | if numEdits == 1 { |
| 177 | editStr = "edit" |
| 178 | } |
| 179 | |
| 180 | result := make([]string, len(edits)+1) |
| 181 | result[0] = fmt.Sprintf("editing app.go (%d %s)", numEdits, editStr) |
| 182 | |
| 183 | for i, edit := range edits { |
| 184 | newLines := len(strings.Split(edit.NewStr, "\n")) |
| 185 | oldLines := len(strings.Split(edit.OldStr, "\n")) |
| 186 | desc := edit.Desc |
| 187 | if desc == "" { |
| 188 | desc = fmt.Sprintf("edit #%d", i+1) |
| 189 | } |
| 190 | result[i+1] = fmt.Sprintf("* %s (+%d -%d)", desc, newLines, oldLines) |
| 191 | } |
| 192 | return result |
| 193 | } |
| 194 | |
| 195 | func GetBuilderEditAppFileToolDefinition(appId string, builderId string) uctypes.ToolDefinition { |
| 196 | return uctypes.ToolDefinition{ |
no outgoing calls
no test coverage detected