refactor(coding-agent): restructured web search and config systems with class-based architecture and type generalization
- Renamed web search types and functions to remove 'Web' prefix for broader applicability (WebSearchProvider -> SearchProviderId, WebSearchResponse -> SearchResponse, WebSearchTool -> SearchTool, etc.). - Refactored web search provider system from object-based configuration to class-based architecture with abstract SearchProvider base class and concrete provider implementations. - Refactored ModelRegistry to use direct constructor instantiation instead of discoverModels() helper function, simplifying model discovery pattern. - Refactored config system to use new ConfigFile class with schema validation, caching, and multi-format support (JSON, JSONC, YAML). - Simplified Exa API key discovery to check environment variables only, removing .env file reading logic.
This commit is contained in:
@@ -316,7 +316,7 @@ src/
|
||||
│ ├── utils.ts # Scraper utilities
|
||||
│ └── (domain-specific scrapers)
|
||||
└── search/ # Web search
|
||||
├── index.ts # WebSearchTool exports
|
||||
├── index.ts # SearchTool exports
|
||||
├── auth.ts # Search auth
|
||||
├── render.ts # Search result rendering
|
||||
└── providers/ # Search providers
|
||||
|
||||
Reference in New Issue
Block a user