feat: update dependencies and enhance chat functionality

- Added new Radix UI components including checkbox, label, popover, slider, switch, and tooltip to improve UI interactions.
- Integrated react-syntax-highlighter for better code rendering in chat messages.
- Updated package.json and pnpm-lock.yaml to include new dependencies and ensure compatibility.
- Enhanced chat input to support web search toggling, improving user experience during message composition.
- Implemented auto-saving of chat sessions and improved session management features.
- Refactored chat message rendering to clean up metadata and improve display quality.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-20 04:26:35 -03:00
1 parent 032722e21b
commit 8834ef2b4f
55 files changed
+20030 -159

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
'use client';
import { useState, useCallback } from 'react';
interface Toast {
title: string;
description?: string;
variant?: 'default' | 'destructive';
}
export function useToast() {
const showToast = useCallback(({ title, description, variant }: Toast) => {
// Simple implementation using console and alert for now
// Can be enhanced later with a proper toast component
if (variant === 'destructive') {
console.error(`[Toast] ${title}: ${description || ''}`);
alert(`Erro: ${title}\n${description || ''}`);
} else {
console.log(`[Toast] ${title}: ${description || ''}`);
}
}, []);
return {
toast: showToast,
};
}