refactor(apiproxy): resolve export compression once

The Cordis schema supplies the normal plugin default, while createApiProxy also owns the fallback required by direct programmatic callers. Repeating the same nullish fallback in ApiProxyService created a third defaulting site without adding a distinct invariant.\n\nPass the validated config value through unchanged and leave createApiProxy as the single implementation boundary that turns an optional request value into the required compression specification.
This commit is contained in:
Tianyi Cui
2026-08-11 17:46:40 +08:00
parent d1aae98895
commit 5703ae356e
1 file changed
+1 -1
+1 -1
View File
@@ -94,7 +94,7 @@ export class ApiProxyService extends Service implements ApiProxy {
saveDefaultModelSelection: selection => ctx.agentDefaultModel.saveSelection(selection),
cwd: process.cwd(),
...config.nativeOpen === undefined ? {} : { canOpenPath: () => config.nativeOpen as boolean },
sessionExportCompressionLevel: config.sessionExportCompressionLevel ?? DEFAULT_SESSION_LOG_COMPRESSION_LEVEL,
sessionExportCompressionLevel: config.sessionExportCompressionLevel,
})
this.sessions = api.sessions
this.subagents = api.subagents