Commit Graph
8 Commits
Author SHA1 Message Date
kaitranntt a59ad0e8c6 fix(minimax): prevent double-resolve race condition and align placeholder
- Add resolved flag + safeResolve() wrapper to prevent timeout/response race
- Align apiKeyPlaceholder to YOUR_MINIMAX_API_KEY_HERE across presets
2026-01-02 20:06:17 -05:00
Huynh Duc DungandClaude a00cf3691e refactor(api-key-validator): extract shared validation logic, remove unnecessary comments
- Extract common validation logic into validateProviderKey() function
- Convert validateGlmKey() and validateMiniMaxKey() to thin wrappers
- Remove 15+ unnecessary inline comments explaining obvious code
- Remove verbose JSDoc that duplicates function signatures
- Reduce file from 236 to 148 lines (37% reduction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-03 07:54:32 +08:00
Huynh Duc Dung c48f798f3e fix(minimax): restore migrate-command, remove broken migration file, fix validator typo
- Restore src/commands/migrate-command.ts to dev branch state (was truncated)
- Remove src/config/rename-minimax-profile.ts (circular export causing build break)
- Fix mm.settings.json path typo in api-key-validator.ts

Build now passes: bun run typecheck && bun run lint:fix
2026-01-03 07:46:44 +08:00
Huynh Duc Dung 2b549f5b3d refactor(minimax): Rename to 'mm' for brevity
- Rename profile ID: minimax -> mm
- Rename settings file: base-minimax.settings.json -> base-mm.settings.json
- Update all code references
- Remove review_pr.md documentation
- Shorter CLI command: ccs mm instead of ccs minimax

Rationale:
- 'mm' is more concise (2 chars vs 7 chars)
- Matches 'glm', 'kimi' short naming pattern
- Improves UX for frequent switching
2026-01-02 20:38:52 +08:00
Huynh Duc Dung 46e09950e8 fix(minimax): Add MiniMax placeholder to DEFAULT_PLACEHOLDERS
- Add 'YOUR_MINIMAX_API_KEY_HERE' for consistency
- Ensures placeholder detection works correctly
- Aligns with other provider patterns (GLM, Kimi)
2026-01-02 20:31:27 +08:00
Huynh Duc Dung bd5c9a0033 feat(minimax): Add full MiniMax M2.1 support
- Add MiniMax settings template (config/base-minimax.settings.json)
- Add MiniMax pricing (3 models: M2.1, M2.1-lightning, M2)
- Add validateMiniMaxKey() pre-flight validator
- Integrate MiniMax validation in main CLI flow
- Fix model name casing: M2.1-lightning (lowercase l)

Implementation follows GLM pattern:
- Anthropic-compatible API (no proxy needed)
- Pre-flight validation with health check
- Fail-open on network errors
- Actionable error messages
2026-01-02 20:27:52 +08:00
kaitranntt f2a4200625 fix(core): address all code review issues from PR #199
Critical fixes:
- CRIT-1: Fix placeholder detection case sensitivity in api-key-validator
- CRIT-2: Add TOCTOU protection via loadMigrationCheckData() for atomic config reads
- CRIT-3: Restore fs.existsSync mock in profile-detector tests

High priority fixes:
- H1-H3: API validator HTTP/HTTPS support, timeout abort, debug log
- H4-H6: OAuth explicit flow type, signal handling, TTY detection
- H7-H8: Profile collision warning, config-first save order
- H9-H11: expandPath consistency, preset sync CLI/UI
2025-12-24 20:18:57 -05:00
kaitranntt cc2d62db38 fix(profiles): prevent GLM auth regression from first-time install detection
- Check legacy config.json/profiles.json in isFirstTimeInstall()
- Use expandPath() for cross-platform path handling in profile-detector
- Add pre-flight API key validation for better error messages
- Enhance 401 error handling with Z.AI refresh guidance

Fixes #195
2025-12-24 18:09:09 -05:00