refactor(config): extract config migration logic to testable module
- Extract AGENT_NAME_MAP, HOOK_NAME_MAP, and migration functions to src/shared/migration.ts - Add comprehensive BDD-style test suite in src/shared/migration.test.ts with 15 test cases - Export migration functions from src/shared/index.ts - Improves testability and maintainability of config migration logic Tests cover: - Agent name migrations (omo → Sisyphus, OmO-Plan → Planner-Sisyphus) - Hook name migrations (anthropic-auto-compact → anthropic-context-window-limit-recovery) - Config key migrations (omo_agent → sisyphus_agent) - Case-insensitive lookups and edge cases 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -15,3 +15,4 @@ export * from "./data-path"
|
||||
export * from "./config-errors"
|
||||
export * from "./claude-config-dir"
|
||||
export * from "./jsonc-parser"
|
||||
export * from "./migration"
|
||||
|
||||
Reference in New Issue
Block a user