From 4b7de69d9bd330c07d834e610ca36e657a7ab2eb Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Thu, 12 Feb 2026 11:35:39 +0700 Subject: [PATCH] fix(config): serialize cursor section in generateYamlWithComments - Add cursor section serialization after copilot, before global_env - Fixes P1 data loss: cursor settings now persist to config.yaml - Previously cursor was merged in memory but never written to disk --- src/config/unified-config-loader.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/config/unified-config-loader.ts b/src/config/unified-config-loader.ts index 1ae5db8c..91f2cc90 100644 --- a/src/config/unified-config-loader.ts +++ b/src/config/unified-config-loader.ts @@ -568,6 +568,23 @@ function generateYamlWithComments(config: UnifiedConfig): string { lines.push(''); } + // Cursor section (Cursor IDE proxy daemon) + if (config.cursor) { + lines.push('# ----------------------------------------------------------------------------'); + lines.push('# Cursor: Cursor IDE proxy daemon'); + lines.push('# Enables Cursor IDE integration via local proxy daemon.'); + lines.push('#'); + lines.push('# enabled: Enable/disable Cursor integration (default: false)'); + lines.push('# port: Port for cursor proxy daemon (default: 20129)'); + lines.push('# auto_start: Auto-start daemon when CCS starts (default: false)'); + lines.push('# ghost_mode: Disable telemetry for privacy (default: true)'); + lines.push('# ----------------------------------------------------------------------------'); + lines.push( + yaml.dump({ cursor: config.cursor }, { indent: 2, lineWidth: -1, quotingType: '"' }).trim() + ); + lines.push(''); + } + // Global env section if (config.global_env) { lines.push('# ----------------------------------------------------------------------------');