fix: code review cleanup
- Fixed TypeScript exactOptionalPropertyTypes errors in chat components - Removed console.error statements (errors are handled via state) - Fixed type compatibility issues with undefined vs null values - All chat-related files now pass strict TypeScript checks
This commit is contained in:
@@ -66,9 +66,9 @@ export const Chat = forwardRef<ChatRef, ChatProps>(function Chat({
|
||||
clearError,
|
||||
} = useChat({
|
||||
model: "llama3.2",
|
||||
projectId: initialProjectId,
|
||||
onError: (err) => {
|
||||
console.error("Chat error:", err);
|
||||
...(initialProjectId !== undefined && { projectId: initialProjectId }),
|
||||
onError: (_err) => {
|
||||
// Error is handled by the useChat hook's state
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user