refactor: extract Kimi model selector logic to dedicated hook

- Create useKimiModelSelector hook to manage Kimi-specific state
- Auto-detect Kimi providers by preset name or config content
- Support model initialization from existing config in edit mode
- Sync model selections with JSON configuration
- Maintain clean separation between UI and business logic
This commit is contained in:
Jason
2025-10-16 20:21:42 +08:00
parent 6541c14421
commit e4f85f4f65
3 changed files with 317 additions and 133 deletions

View File

@@ -5,3 +5,4 @@ export { useModelState } from "./useModelState";
export { useCodexConfigState } from "./useCodexConfigState";
export { useApiKeyLink } from "./useApiKeyLink";
export { useCustomEndpoints } from "./useCustomEndpoints";
export { useKimiModelSelector } from "./useKimiModelSelector";