- Unified localStorage key to 'theme-preference' across all components
- Fixed header.tsx using wrong localStorage key ('theme' instead of 'theme-preference')
- Added localStorage hybrid persistence for instant theme changes
- Removed router.refresh() which was causing stale data revert
- Replaced Blue theme with Sepia
- Consolidated auth() calls to prevent race conditions
- Updated UserSettingsData types to include all themes
68 lines
2.9 KiB
PowerShell
68 lines
2.9 KiB
PowerShell
# Script pour démarrer le serveur MCP Keep Notes en mode SSE
|
|
# Mode: Server-Sent Events (HTTP)
|
|
|
|
Write-Host ""
|
|
Write-Host "==========================================" -ForegroundColor Cyan
|
|
Write-Host " 🚀 Keep Notes MCP Server (SSE)" -ForegroundColor Cyan
|
|
Write-Host "==========================================" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
Write-Host "📌 Mode: SSE (HTTP sur port 3001)" -ForegroundColor Yellow
|
|
Write-Host "📌 Chemin: $PSScriptRoot" -ForegroundColor Yellow
|
|
Write-Host ""
|
|
|
|
# Vérifier si Prisma est généré
|
|
if (-not (Test-Path "node_modules\.prisma\client")) {
|
|
Write-Host "⚠️ Client Prisma non trouvé, génération en cours..." -ForegroundColor Yellow
|
|
npx prisma generate
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host "✅ Client Prisma généré" -ForegroundColor Green
|
|
} else {
|
|
Write-Host "❌ Erreur lors de la génération du client Prisma" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
# Vérifier que Keep Notes est en cours d'exécution
|
|
Write-Host "🔍 Vérification de Keep Notes..." -ForegroundColor Cyan
|
|
try {
|
|
$response = Invoke-WebRequest -Uri "http://localhost:3000" -UseBasicParsing -TimeoutSec 5
|
|
Write-Host "✅ Keep Notes est en cours d'exécution (port 3000)" -ForegroundColor Green
|
|
} catch {
|
|
Write-Host "⚠️ Attention: Keep Notes n'est pas accessible sur localhost:3000" -ForegroundColor Yellow
|
|
Write-Host " Le serveur MCP SSE risque de ne pas fonctionner correctement" -ForegroundColor Yellow
|
|
Write-Host ""
|
|
$continue = Read-Host "Voulez-vous continuer quand même? (O/N)"
|
|
if ($continue -ne "O" -and $continue -ne "o") {
|
|
Write-Host "❌ Annulation" -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "⏳ Démarrage du serveur MCP SSE..." -ForegroundColor Green
|
|
Write-Host "🛑 Appuyez sur Ctrl+C pour arrêter" -ForegroundColor Red
|
|
Write-Host ""
|
|
Write-Host "🌐 Serveur accessible sur:" -ForegroundColor Cyan
|
|
Write-Host " - Local: http://localhost:3001" -ForegroundColor White
|
|
Write-Host " - Network: Trouvez votre IP avec 'ipconfig'" -ForegroundColor White
|
|
Write-Host ""
|
|
Write-Host "📋 Endpoints:" -ForegroundColor Cyan
|
|
Write-Host " - Health: GET http://localhost:3001/" -ForegroundColor White
|
|
Write-Host " - SSE: GET http://localhost:3001/sse" -ForegroundColor White
|
|
Write-Host " - Message: POST http://localhost:3001/message" -ForegroundColor White
|
|
Write-Host ""
|
|
|
|
# Démarrer le serveur
|
|
try {
|
|
node index-sse.js
|
|
} catch {
|
|
Write-Host "❌ Erreur lors du démarrage du serveur:" -ForegroundColor Red
|
|
Write-Host " $($_.Exception.Message)" -ForegroundColor Red
|
|
Write-Host ""
|
|
Write-Host "Dépannage:" -ForegroundColor Yellow
|
|
Write-Host "1. Vérifiez que le port 3001 n'est pas déjà utilisé" -ForegroundColor White
|
|
Write-Host "2. Vérifiez que Node.js est installé (node --version)" -ForegroundColor White
|
|
Write-Host "3. Vérifiez les dépendances (npm list)" -ForegroundColor White
|
|
exit 1
|
|
}
|