()
| 176 | let {focusWithinProps} = useFocusWithin({onFocusWithinChange: onFocusChange}); |
| 177 | |
| 178 | let onSubmit = () => { |
| 179 | if (prompt.segments.length === 0) { |
| 180 | return; |
| 181 | } |
| 182 | |
| 183 | props.onSubmit?.(prompt, attachments); |
| 184 | setPrompt(new AutoLinkingSegmentList([])); |
| 185 | setAttachments([]); |
| 186 | inputRef.current?.focus(); |
| 187 | }; |
| 188 | |
| 189 | return ( |
| 190 | <PromptFieldContext.Provider |
no test coverage detected