(fromVersion = 0)
| 114 | * Get pending migration info for UI display (with i18n). |
| 115 | */ |
| 116 | export function getPendingMigrationInfos(fromVersion = 0): MigrationInfo[] { |
| 117 | const migrations = getChatDbMigrations({ tokenizeForFts }) |
| 118 | return migrations |
| 119 | .filter((m) => m.version > fromVersion) |
| 120 | .map((m) => { |
| 121 | const keys = i18nKeys[m.version] |
| 122 | return { |
| 123 | version: m.version, |
| 124 | description: (keys && t(keys.descriptionKey)) || m.description, |
| 125 | userMessage: (keys && t(keys.userMessageKey)) || m.description, |
| 126 | } |
| 127 | }) |
| 128 | } |
no test coverage detected