fix(cliproxy): address sync review feedback

- Fix auto_sync JSDoc to say (default: true) matching actual default
- Add unlink event handler for profile deletion sync
- Add debug logging for sync failures in api-command
This commit is contained in:
kaitranntt
2026-01-28 13:44:00 -05:00
parent c3f85bc4a8
commit e80d2d2d05
3 changed files with 9 additions and 3 deletions
+7 -2
View File
@@ -277,8 +277,13 @@ async function handleCreate(args: string[]): Promise<void> {
process.exit(1);
}
// Trigger sync to local CLIProxy config (best-effort, ignore result)
syncToLocalConfig();
// Trigger sync to local CLIProxy config (best-effort)
try {
syncToLocalConfig();
} catch (err) {
const message = err instanceof Error ? err.message : 'Unknown error';
console.log(`[i] Auto-sync to CLIProxy config skipped: ${message}`);
}
// Display success
console.log('');