feat: enhance application functionality and telemetry monitoring

- Added new scripts in `package.json` for Python dependency installation and sidecar compilation.
- Integrated telemetry fetching in `src/App.tsx` to monitor CPU, RAM, GPU, and disk usage.
- Implemented model downloading functionality with progress tracking in `src/App.tsx`.
- Updated `Footer` and `Header` components to display telemetry data and settings options.
- Enhanced Tauri configuration for sidecar execution and application window settings.
- Updated Python requirements in `requirements.txt` to include additional dependencies for improved functionality.
This commit is contained in:
Evandro Fonseca Junior committed 2026-01-14 23:57:14 -03:00
1 parent 482b28513e
commit 08e154894a
24 files changed
+1110 -91

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
// Script cross-platform Node.js para instalar dependências Python
import { execSync } from 'child_process';
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const isWindows = process.platform === 'win32';
const pythonCmd = isWindows ? 'python' : 'python3';
const requirementsPath = path.join(__dirname, '..', 'src-python', 'requirements.txt');
if (!fs.existsSync(requirementsPath)) {
console.error(`[Python Deps] ERRO: Arquivo não encontrado: ${requirementsPath}`);
process.exit(1);
}
console.log(`[Python Deps] Verificando dependências em: ${requirementsPath}`);
try {
// Verifica pip
execSync(`${pythonCmd} -m pip --version`, { stdio: 'ignore' });
// Atualiza pip
console.log('[Python Deps] Atualizando pip...');
execSync(`${pythonCmd} -m pip install --quiet --upgrade pip`, { stdio: 'inherit' });
// Instala dependências
console.log('[Python Deps] Instalando dependências...');
execSync(`${pythonCmd} -m pip install --quiet -r "${requirementsPath}"`, { stdio: 'inherit' });
console.log('[Python Deps] Dependências instaladas com sucesso.');
} catch (error) {
console.error('[Python Deps] ERRO: Falha ao instalar dependências.');
process.exit(1);
}
+36
View File
@@ -0,0 +1,36 @@
# Script PowerShell para instalar dependências Python antes de executar
param(
[string]$RequirementsPath = "src-python\requirements.txt",
[string]$PythonCmd = "python"
)
$ErrorActionPreference = "Stop"
# Resolve caminho absoluto
$RequirementsFile = Join-Path $PSScriptRoot "..\$RequirementsPath" | Resolve-Path -ErrorAction Stop
Write-Host "[Python Deps] Verificando dependências em: $RequirementsFile" -ForegroundColor Cyan
# Verifica se pip está disponível
try {
$pipVersion = & $PythonCmd -m pip --version 2>&1
if ($LASTEXITCODE -ne 0) {
Write-Host "[Python Deps] ERRO: pip não encontrado. Instale Python com pip." -ForegroundColor Red
exit 1
}
} catch {
Write-Host "[Python Deps] ERRO: Python não encontrado. Verifique se está no PATH." -ForegroundColor Red
exit 1
}
# Instala dependências
Write-Host "[Python Deps] Instalando dependências..." -ForegroundColor Yellow
& $PythonCmd -m pip install --quiet --upgrade pip
& $PythonCmd -m pip install --quiet -r $RequirementsFile
if ($LASTEXITCODE -eq 0) {
Write-Host "[Python Deps] Dependências instaladas com sucesso." -ForegroundColor Green
} else {
Write-Host "[Python Deps] ERRO: Falha ao instalar dependências." -ForegroundColor Red
exit 1
}
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Script Bash para instalar dependências Python antes de executar
set -e
REQUIREMENTS_PATH="${1:-src-python/requirements.txt}"
PYTHON_CMD="${2:-python3}"
# Resolve caminho absoluto
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REQUIREMENTS_FILE="$SCRIPT_DIR/../$REQUIREMENTS_PATH"
if [ ! -f "$REQUIREMENTS_FILE" ]; then
echo "[Python Deps] ERRO: Arquivo não encontrado: $REQUIREMENTS_FILE" >&2
exit 1
fi
echo "[Python Deps] Verificando dependências em: $REQUIREMENTS_FILE"
# Verifica se pip está disponível
if ! $PYTHON_CMD -m pip --version >/dev/null 2>&1; then
echo "[Python Deps] ERRO: pip não encontrado. Instale Python com pip." >&2
exit 1
fi
# Instala dependências
echo "[Python Deps] Instalando dependências..."
$PYTHON_CMD -m pip install --quiet --upgrade pip
$PYTHON_CMD -m pip install --quiet -r "$REQUIREMENTS_FILE"
if [ $? -eq 0 ]; then
echo "[Python Deps] Dependências instaladas com sucesso."
else
echo "[Python Deps] ERRO: Falha ao instalar dependências." >&2
exit 1
fi