(input any)
| 219 | } |
| 220 | |
| 221 | func parseTermCommandOutputInput(input any) (*TermCommandOutputToolInput, error) { |
| 222 | result := &TermCommandOutputToolInput{} |
| 223 | |
| 224 | if input == nil { |
| 225 | return nil, fmt.Errorf("widget_id is required") |
| 226 | } |
| 227 | |
| 228 | inputBytes, err := json.Marshal(input) |
| 229 | if err != nil { |
| 230 | return nil, fmt.Errorf("failed to marshal input: %w", err) |
| 231 | } |
| 232 | |
| 233 | if err := json.Unmarshal(inputBytes, result); err != nil { |
| 234 | return nil, fmt.Errorf("failed to unmarshal input: %w", err) |
| 235 | } |
| 236 | |
| 237 | if result.WidgetId == "" { |
| 238 | return nil, fmt.Errorf("widget_id is required") |
| 239 | } |
| 240 | |
| 241 | return result, nil |
| 242 | } |
| 243 | |
| 244 | func GetTermCommandOutputToolDefinition(tabId string) uctypes.ToolDefinition { |
| 245 | return uctypes.ToolDefinition{ |
no outgoing calls
no test coverage detected