feat: implement CodexLens watcher status handling and UI updates

This commit is contained in:
catlog22
2026-01-03 23:47:02 +08:00
parent 1825ed3bcf
commit f28b6c6197
3 changed files with 87 additions and 0 deletions

View File

@@ -455,6 +455,23 @@ function handleNotification(data) {
console.log('[CodexLens] Index progress:', payload.stage, payload.percent + '%');
break;
case 'CODEXLENS_WATCHER_STATUS':
// Handle CodexLens file watcher status updates
if (typeof handleWatcherStatusUpdate === 'function') {
handleWatcherStatusUpdate(payload);
}
if (payload.error) {
console.error('[CodexLens] Watcher error:', payload.error);
if (typeof showRefreshToast === 'function') {
showRefreshToast('Watcher error: ' + payload.error, 'error');
}
} else if (payload.running) {
console.log('[CodexLens] Watcher running:', payload.path);
} else {
console.log('[CodexLens] Watcher stopped');
}
break;
default:
console.log('[WS] Unknown notification type:', type);
}