Implement database migration framework and performance optimizations

- Added active memory configuration for manual interval and Gemini tool.
- Created file modification rules for handling edits and writes.
- Implemented migration manager for managing database schema migrations.
- Added migration 001 to normalize keywords into separate tables.
- Developed tests for validating performance optimizations including keyword normalization, path lookup, and symbol search.
- Created validation script to manually verify optimization implementations.
This commit is contained in:
catlog22
2025-12-14 18:08:32 +08:00
parent 79a2953862
commit 0529b57694
18 changed files with 2085 additions and 545 deletions

View File

@@ -238,6 +238,31 @@ function handleNotification(data) {
}
break;
case 'ACTIVE_MEMORY_SYNCED':
// Handle Active Memory sync completion
if (typeof addGlobalNotification === 'function') {
const { filesAnalyzed, tool, usedCli } = payload;
const method = usedCli ? `CLI (${tool})` : 'Basic';
addGlobalNotification(
'success',
'Active Memory synced',
{
'Files Analyzed': filesAnalyzed,
'Method': method,
'Timestamp': new Date(payload.timestamp).toLocaleTimeString()
},
'Memory'
);
}
// Refresh Active Memory status if on memory view
if (getCurrentView && getCurrentView() === 'memory') {
if (typeof loadActiveMemoryStatus === 'function') {
loadActiveMemoryStatus();
}
}
console.log('[Active Memory] Sync completed:', payload);
break;
default:
console.log('[WS] Unknown notification type:', type);
}