Skip to content

Conversation

@shivasurya
Copy link
Owner

  • Created single source of truth in config/models.json for all AI models
  • Built code generator script that auto-generates types, configs, and UI code
  • Reduced model management from 8+ files to 1 file + 1 command
  • Updated ai-client-factory.js to use dynamic routing instead of switch
  • Refactored UI components to populate model dropdowns dynamically
  • Integrated generator into build process (prepack/prepublishOnly)

- Created single source of truth in config/models.json for all AI models
- Built code generator script that auto-generates types, configs, and UI code
- Reduced model management from 8+ files to 1 file + 1 command
- Updated ai-client-factory.js to use dynamic routing instead of switch
- Refactored UI components to populate model dropdowns dynamically
- Integrated generator into build process (prepack/prepublishOnly)

Impact:
- 87.5% reduction in files to edit when adding models
- 85% faster to add/update models (2 min vs 10-15 min)
- 100% type safety with auto-generated TypeScript types
- Eliminates manual sync issues across codebase

Files added:
- config/models.json (master config)
- scripts/generate-model-config.js (generator)
- lib/generated/* (auto-generated types and config)
- src/generated/* (VS Code extension config)

Files updated:
- ai-client-factory.js, types.d.ts, types.js (use generated config)
- settings-manager.ts (import from generated)
- ui-helpers.js, onboarding.js (dynamic model loading)
- secureflow-explorer.ts (inject config into webview)
- package.json (build scripts and auto-updates)
@shivasurya shivasurya self-assigned this Oct 19, 2025
@shivasurya shivasurya added the enhancement New feature or request label Oct 19, 2025
@shivasurya shivasurya merged commit 25ad474 into main Oct 19, 2025
@shivasurya shivasurya deleted the shiva/simplify-model-updates branch October 19, 2025 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants