kimi-code/packages/migration-legacy/src
Kai 475ebadc20
fix: copy user skills and clean up OAuth UX (#31)
* feat(migration-legacy): migrate user skills from kimi-cli

The first-launch migration previously left ~/.kimi/skills/ behind: the
new scanner only reads ~/.kimi-code/skills/ and ~/.agents/skills/, so any
custom skills authored against kimi-cli silently disappeared after the
upgrade. Adds a skills step that copies top-level entries from
~/.kimi/skills/ into ~/.kimi-code/skills/ with skip-existing semantics,
wires it into the existing run-migration pipeline and result screen, and
surfaces the count alongside config/mcp/REPL-history.

* refactor(migration): hide OAuth from migration UX

OAuth credentials are deliberately never migrated (refresh tokens
rotate server-side, so two installs sharing one token would fight over
who gets refreshed). The previous UX framed this as a limitation: the
result screen carried a yellow ⚠ "kimi-cli login not migrated — run
/login" line, and the pre-migration summary listed "kimi-cli login
(needs /login)" alongside real migratable data classes, making users
think a login was about to be transferred and only the last step had
failed.

Drops both surfaces and short-circuits the pre-migration screen when
the only legacy data is `credentials/*.json`. kimi-code's own /login
flow handles re-auth on first use, so a dedicated migration notice is
redundant. The `report.notices.oauthLoginsRequiringRelogin` JSON field
is left intact for debugging.

* chore: changeset for skills migration and OAuth UX cleanup
2026-05-25 21:16:36 +08:00
..
sessions Kimi For Coding 2026-05-22 15:54:50 +08:00
steps fix: copy user skills and clean up OAuth UX (#31) 2026-05-25 21:16:36 +08:00
atomic-write.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
detect.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
index.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
kimi-cli-schema.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
marker.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
migration-errors-log.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
paths.ts fix: copy user skills and clean up OAuth UX (#31) 2026-05-25 21:16:36 +08:00
prompt.ts fix: copy user skills and clean up OAuth UX (#31) 2026-05-25 21:16:36 +08:00
report.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
run-migration.ts fix: copy user skills and clean up OAuth UX (#31) 2026-05-25 21:16:36 +08:00
session-index.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
stub-detect.ts Kimi For Coding 2026-05-22 15:54:50 +08:00
types.ts fix: copy user skills and clean up OAuth UX (#31) 2026-05-25 21:16:36 +08:00