()
| 103 | * Call this when starting a new successful interaction to dismiss any previous error banners. |
| 104 | */ |
| 105 | const clearUserError = () => { |
| 106 | updateAiMessage((msg) => { |
| 107 | if (!msg.userError) return msg |
| 108 | const { userError: _, ...rest } = msg |
| 109 | return rest as ChatMessage |
| 110 | }) |
| 111 | } |
| 112 | |
| 113 | return { |
| 114 | updateAiMessage, |
nothing calls this directly
no test coverage detected