Roo-Code/src/core
daniel-lxs f5cc227c09
Extract router models fetching logic into dedicated service
Refactor to improve separation of concerns:

- Create src/services/router-models/index.ts to handle provider model fetching
- Extract buildProviderFetchList() function for fetch options construction
- Extract fetchRouterModels() function for coordinated model fetching
- Move 150+ lines of provider-specific logic out of webviewMessageHandler
- Add comprehensive tests in router-models-service.spec.ts (11 test cases)

Benefits:
- Cleaner webviewMessageHandler with less business logic
- Reusable service for router model operations
- Better testability with isolated unit tests
- Clear separation between UI message handling and data fetching

Files changed:
- New: src/services/router-models/index.ts
- New: src/services/router-models/__tests__/router-models-service.spec.ts
- Modified: src/core/webview/webviewMessageHandler.ts (simplified)
2025-10-30 11:21:31 -05:00
..
assistant-message feat: add run_slash_command tool for executing slash commands (#7473) 2025-09-03 14:14:55 -04:00
checkpoints Fix checkpoints test (#8803) 2025-10-24 10:18:19 -04:00
condense Enable browser-use tool for all image-capable models (#8121) 2025-10-21 22:23:42 -04:00
config fix(export): exclude max tokens field for models that don't support it (#8464) 2025-10-24 16:20:31 -04:00
context/context-management Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
context-tracking fix: use safeWriteJson for all JSON file writes with race condition fix (#4733) 2025-06-25 16:05:02 -04:00
diff fix: preserve trailing newlines in stripLineNumbers for apply_diff (#8227) 2025-10-24 10:16:00 -04:00
environment feat: add settings to configure time and cost in system prompt (#8451) 2025-10-27 18:40:16 -04:00
ignore Follow symlinks in rooignore checks (#7405) 2025-08-26 10:12:20 -04:00
mentions fix: identify mcp and slash command config path in multiple folder workspace (#6904) 2025-09-05 14:52:48 -04:00
message-queue Move message queue to the extension host (#7604) 2025-09-02 19:12:18 -07:00
prompts Enable browser-use tool for all image-capable models (#8121) 2025-10-21 22:23:42 -04:00
protect Mark code-workspace files as protected (#7403) 2025-08-26 00:09:14 -04:00
sliding-window Feat: Adding Gemini tools - URL Context and Grounding with Google Search (#5959) 2025-07-27 14:34:55 -04:00
task Use monotonic clock for rate limiting (#8456) 2025-10-27 17:01:54 -04:00
task-persistence Remove GPT‑5 instructions/reasoning_summary from UI message metadata to prevent ui_messages.json bloat (#8756) 2025-10-21 14:55:29 -06:00
tools feat: add token-budget based file reading with intelligent preview (#8789) 2025-10-23 15:35:43 -04:00
webview Extract router models fetching logic into dedicated service 2025-10-30 11:21:31 -05:00