MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / showValidationErrors

Function showValidationErrors

frontend/components/chat-input.tsx:90–114  ·  view source on GitHub ↗
(errors: string[])

Source from the content-addressed store, hash-verified

88}
89
90function showValidationErrors(errors: string[]) {
91 if (errors.length === 0) return
92
93 if (errors.length === 1) {
94 showErrorToast(
95 <span className="text-muted-foreground">{errors[0]}</span>,
96 )
97 } else {
98 showErrorToast(
99 <div className="flex flex-col gap-1">
100 <span className="font-medium">
101 {errors.length} files rejected:
102 </span>
103 <ul className="text-muted-foreground text-xs list-disc list-inside">
104 {errors.slice(0, 3).map((err) => (
105 <li key={err}>{err}</li>
106 ))}
107 {errors.length > 3 && (
108 <li>...and {errors.length - 3} more</li>
109 )}
110 </ul>
111 </div>,
112 )
113 }
114}
115
116interface ChatInputProps {
117 input: string

Callers 3

handlePasteFunction · 0.85
handleFileChangeFunction · 0.85
handleDropFunction · 0.85

Calls 1

showErrorToastFunction · 0.85

Tested by

no test coverage detected