- Added custom scrollbar styles for improved aesthetics and usability across the interface. - Implemented responsive adjustments for chat sidebar and input components to enhance mobile experience. - Integrated tooltip components in select elements for better user guidance and information display. - Updated chat input and message components for improved styling and functionality. - Enhanced settings page with semantic query expansion options and improved model selection UI. - Refactored sidebar list to include better date formatting and tooltip support for session titles. - Introduced GPU stats monitoring in the system panel for better hardware insights.
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { invoke } from '@tauri-apps/api/core';
|
|
|
|
/**
|
|
* Envia logs do frontend para o terminal via Tauri
|
|
* Use esta função em vez de console.log para ver logs no terminal
|
|
*/
|
|
export async function logToTerminal(level: 'info' | 'warn' | 'error' | 'debug', message: string) {
|
|
try {
|
|
await invoke('log_to_terminal', { level, message });
|
|
} catch (error) {
|
|
// Fallback para console se o comando falhar
|
|
console[level](message);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Helper para logs com prefixo [Chat]
|
|
*/
|
|
export const chatLog = {
|
|
info: (message: string) => logToTerminal('info', `[Chat] ${message}`),
|
|
warn: (message: string) => logToTerminal('warn', `[Chat] ${message}`),
|
|
error: (message: string) => logToTerminal('error', `[Chat] ${message}`),
|
|
debug: (message: string) => logToTerminal('debug', `[Chat] ${message}`),
|
|
};
|
|
|
|
/**
|
|
* Helper para logs com prefixo [DeepResearch]
|
|
*/
|
|
export const deepResearchLog = {
|
|
info: (message: string) => logToTerminal('info', `[DeepResearch] ${message}`),
|
|
warn: (message: string) => logToTerminal('warn', `[DeepResearch] ${message}`),
|
|
error: (message: string) => logToTerminal('error', `[DeepResearch] ${message}`),
|
|
debug: (message: string) => logToTerminal('debug', `[DeepResearch] ${message}`),
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|