mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 20:17:45 +00:00
fix(config): add missing cliproxy_server section to YAML serialization
The cliproxy_server config was being loaded and merged with defaults but never serialized to config.yaml. Added the missing section to generateYamlWithComments() so remote proxy settings persist correctly. Fixes save not persisting when configuring remote proxy settings in the Dashboard > Proxy tab.
This commit is contained in:
@@ -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('# ----------------------------------------------------------------------------');
|
||||
|
||||
Reference in New Issue
Block a user