fix: Add debounced Undo/Redo system to avoid character-by-character history
- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
This commit is contained in:
48
mcp-server/start-sse.ps1
Normal file
48
mcp-server/start-sse.ps1
Normal file
@@ -0,0 +1,48 @@
|
||||
# Script to start MCP SSE Server for Memento
|
||||
|
||||
Write-Host "`n╔═══════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
|
||||
Write-Host "║ Starting Memento MCP SSE Server ║" -ForegroundColor Cyan
|
||||
Write-Host "╚═══════════════════════════════════════════════════════════╝`n" -ForegroundColor Cyan
|
||||
|
||||
# Check if running from correct directory
|
||||
$currentDir = Get-Location
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
if ($scriptDir) {
|
||||
Push-Location $scriptDir
|
||||
}
|
||||
|
||||
# Ensure we have node_modules
|
||||
if (-not (Test-Path "node_modules")) {
|
||||
Write-Host "📦 Installing dependencies..." -ForegroundColor Yellow
|
||||
npm install
|
||||
}
|
||||
|
||||
# Check if Prisma Client exists in parent keep-notes
|
||||
$prismaClientPath = "..\keep-notes\node_modules\.prisma\client"
|
||||
if (Test-Path $prismaClientPath) {
|
||||
Write-Host "✅ Prisma Client found in keep-notes" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "⚠️ Prisma Client not found. Run: cd ..\keep-notes && npx prisma generate" -ForegroundColor Yellow
|
||||
Write-Host " Then restart this script." -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get local IP address
|
||||
Write-Host "`n🔍 Detecting network configuration..." -ForegroundColor Cyan
|
||||
$ipAddresses = Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" -and $_.IPAddress -notlike "169.*" }
|
||||
$mainIP = $ipAddresses | Select-Object -First 1 -ExpandProperty IPAddress
|
||||
|
||||
Write-Host "`n📡 Your IP addresses:" -ForegroundColor Cyan
|
||||
foreach ($ip in $ipAddresses) {
|
||||
Write-Host " - $($ip.IPAddress)" -ForegroundColor White
|
||||
}
|
||||
|
||||
Write-Host "`n🌐 For N8N configuration, use:" -ForegroundColor Green
|
||||
Write-Host " http://$mainIP:3001/sse" -ForegroundColor Yellow -BackgroundColor DarkGray
|
||||
|
||||
Write-Host "`n🚀 Starting MCP SSE Server on port 3001..." -ForegroundColor Cyan
|
||||
Write-Host " Press Ctrl+C to stop`n" -ForegroundColor Gray
|
||||
|
||||
# Start the server
|
||||
node index-sse.js
|
||||
Reference in New Issue
Block a user