Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/mcs/Export/ConfigurationDiscovery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
Expand All @@ -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))
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/mcs/Sync/ProjectSyncStrategy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)")
}
}

Expand Down
Loading