diff --git a/src/config/unified-config-loader.ts b/src/config/unified-config-loader.ts index 4189a994..ec2c4fab 100644 --- a/src/config/unified-config-loader.ts +++ b/src/config/unified-config-loader.ts @@ -374,6 +374,27 @@ function generateYamlWithComments(config: UnifiedConfig): string { lines.push(''); } + // CLIProxy Server section (remote proxy configuration) + if (config.cliproxy_server) { + lines.push('# ----------------------------------------------------------------------------'); + lines.push('# CLIProxy Server: Remote proxy connection settings'); + lines.push('# Configure via Dashboard (`ccs config`) > Proxy tab.'); + lines.push('#'); + lines.push('# remote: Connect to a remote CLIProxyAPI instance'); + lines.push('# fallback: Use local proxy if remote is unreachable'); + lines.push('# local: Local proxy settings (port, auto-start)'); + lines.push('# ----------------------------------------------------------------------------'); + lines.push( + yaml + .dump( + { cliproxy_server: config.cliproxy_server }, + { indent: 2, lineWidth: -1, quotingType: '"' } + ) + .trim() + ); + lines.push(''); + } + // Global env section if (config.global_env) { lines.push('# ----------------------------------------------------------------------------');