(input any)
| 223 | } |
| 224 | |
| 225 | func parseEditTextFileInput(input any) (*editTextFileParams, error) { |
| 226 | result := &editTextFileParams{} |
| 227 | |
| 228 | if input == nil { |
| 229 | return nil, fmt.Errorf("input is required") |
| 230 | } |
| 231 | |
| 232 | if err := utilfn.ReUnmarshal(result, input); err != nil { |
| 233 | return nil, fmt.Errorf("invalid input format: %w", err) |
| 234 | } |
| 235 | |
| 236 | if result.Filename == "" { |
| 237 | return nil, fmt.Errorf("missing filename parameter") |
| 238 | } |
| 239 | |
| 240 | if len(result.Edits) == 0 { |
| 241 | return nil, fmt.Errorf("missing edits parameter") |
| 242 | } |
| 243 | |
| 244 | return result, nil |
| 245 | } |
| 246 | |
| 247 | func verifyEditTextFileInput(input any, toolUseData *uctypes.UIMessageDataToolUse) error { |
| 248 | params, err := parseEditTextFileInput(input) |
no test coverage detected