(outcomes, pm)
| 181 | * fs errors). Listed last so the user can see what to retry. |
| 182 | */ |
| 183 | export function logMigrationDone(outcomes, pm) { |
| 184 | const reinstallCmd = pmGlobalInstallCommand(pm, '@moonshot-ai/kimi-code'); |
| 185 | const { |
| 186 | renames, |
| 187 | consolidates, |
| 188 | skippedForeignTarget, |
| 189 | deletes, |
| 190 | blockedHarmless, |
| 191 | errors, |
| 192 | } = outcomes; |
| 193 | |
| 194 | const lines = [successHeading('kimi now runs the new version'), '']; |
| 195 | |
| 196 | if (renames.length > 0) { |
| 197 | lines.push(pad(' Renamed your old kimi so you can still run it as')); |
| 198 | lines.push(pad(' kimi-legacy:')); |
| 199 | for (const c of renames) { |
| 200 | lines.push(pathInBox(c.shimPath + ' -> ' + c.target)); |
| 201 | } |
| 202 | lines.push(''); |
| 203 | } |
| 204 | |
| 205 | if (consolidates.length > 0) { |
| 206 | lines.push(pad(' Removed an extra copy of your old kimi (kimi-legacy')); |
| 207 | lines.push(pad(' was already set up here from before):')); |
| 208 | for (const c of consolidates) { |
| 209 | lines.push(pathInBox(c.shimPath)); |
| 210 | lines.push(pathInBox(' (kimi-legacy is at ' + c.target + ')')); |
| 211 | } |
| 212 | lines.push(''); |
| 213 | } |
| 214 | |
| 215 | if (skippedForeignTarget.length > 0) { |
| 216 | lines.push(pad(' Removed your old kimi (a file you created was already')); |
| 217 | lines.push(pad(' using the name kimi-legacy, so we left it alone):')); |
| 218 | for (const c of skippedForeignTarget) { |
| 219 | lines.push(pathInBox(c.shimPath)); |
| 220 | lines.push(pathInBox(' (your file at ' + c.target + ' is untouched)')); |
| 221 | } |
| 222 | lines.push(''); |
| 223 | } |
| 224 | |
| 225 | if (deletes.length > 0) { |
| 226 | lines.push(pad(' Also removed (these would have run instead of the')); |
| 227 | lines.push(pad(' new kimi if we left them):')); |
| 228 | for (const c of deletes) { |
| 229 | lines.push(pathInBox(c.shimPath)); |
| 230 | } |
| 231 | lines.push(''); |
| 232 | } |
| 233 | |
| 234 | if (blockedHarmless.length > 0) { |
| 235 | lines.push(pad(' Note: we can\'t change these files, but it\'s OK —')); |
| 236 | lines.push(pad(' they won\'t run instead of the new kimi:')); |
| 237 | for (const c of blockedHarmless) { |
| 238 | lines.push(pathInBox(c.shimPath)); |
| 239 | } |
| 240 | lines.push(''); |
no test coverage detected