diff --git a/Sources/mcs/Export/ConfigurationDiscovery.swift b/Sources/mcs/Export/ConfigurationDiscovery.swift index 151526c..0d2c1fc 100644 --- a/Sources/mcs/Export/ConfigurationDiscovery.swift +++ b/Sources/mcs/Export/ConfigurationDiscovery.swift @@ -156,7 +156,7 @@ struct ConfigurationDiscovery { if let servers = json[Constants.JSONKeys.mcpServers] as? [String: Any] { for (name, value) in servers { if let serverDict = value as? [String: Any] { - config.mcpServers.append(parseMCPServer(name: name, dict: serverDict, scope: "user")) + config.mcpServers.append(parseMCPServer(name: name, dict: serverDict, scope: Constants.MCPScope.user)) } } } @@ -167,7 +167,7 @@ struct ConfigurationDiscovery { let servers = projectEntry[Constants.JSONKeys.mcpServers] as? [String: Any] { for (name, value) in servers { if let serverDict = value as? [String: Any] { - config.mcpServers.append(parseMCPServer(name: name, dict: serverDict, scope: "local")) + config.mcpServers.append(parseMCPServer(name: name, dict: serverDict, scope: Constants.MCPScope.local)) } } } diff --git a/Sources/mcs/Sync/ProjectSyncStrategy.swift b/Sources/mcs/Sync/ProjectSyncStrategy.swift index 1dc8c67..71ab500 100644 --- a/Sources/mcs/Sync/ProjectSyncStrategy.swift +++ b/Sources/mcs/Sync/ProjectSyncStrategy.swift @@ -158,9 +158,9 @@ struct ProjectSyncStrategy: SyncStrategy { if hasContent { do { try settings.save(to: scope.settingsPath, dropKeys: dropKeys) - output.success("Composed settings.local.json") + output.success("Composed \(scope.settingsPath.lastPathComponent)") } catch { - output.error("Could not write settings.local.json: \(error.localizedDescription)") + output.error("Could not write \(scope.settingsPath.lastPathComponent): \(error.localizedDescription)") output.error("Hooks and plugins will not be active. Re-run '\(scope.syncHint)' after fixing the issue.") throw MCSError.fileOperationFailed( path: Constants.FileNames.settingsLocal, @@ -170,9 +170,9 @@ struct ProjectSyncStrategy: SyncStrategy { } else if FileManager.default.fileExists(atPath: scope.settingsPath.path) { do { try FileManager.default.removeItem(at: scope.settingsPath) - output.dimmed("Removed empty settings.local.json") + output.dimmed("Removed empty \(scope.settingsPath.lastPathComponent)") } catch { - output.warn("Could not remove stale settings.local.json: \(error.localizedDescription)") + output.warn("Could not remove stale \(scope.settingsPath.lastPathComponent): \(error.localizedDescription)") } }