Skip to content

Commit 9f01e22

Browse files
authored
Add support for more providers and conversation history (#71)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added multiple new LLM providers (Cerebras, Anthropic, Google AI) and generic OpenAI-compatible custom providers with runtime registration and credential handling. * Conversation persistence with auto-save, save/load/list/delete and IndexedDB-backed storage. * New readability-based extractor and semantic content chunking for large documents. * **UI/UX Improvements** * Unified provider settings and "Manage Custom Providers" dialog, conversation history browser and history dialog integrated into the chat UI. * Settings and model selectors generalized to support custom providers. * **Tests** * New HTML-to-Markdown evaluation tests and improved large-page chunking/extraction tooling. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent c2f55c3 commit 9f01e22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+10770
-1153
lines changed

front_end/panels/ai_chat/BUILD.gn

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ devtools_module("ai_chat") {
5151
"ui/settings/components/SettingsFooter.ts",
5252
"ui/settings/components/AdvancedToggle.ts",
5353
"ui/settings/providers/BaseProviderSettings.ts",
54-
"ui/settings/providers/OpenAISettings.ts",
54+
"ui/settings/providers/GenericProviderSettings.ts",
5555
"ui/settings/providers/LiteLLMSettings.ts",
56-
"ui/settings/providers/GroqSettings.ts",
5756
"ui/settings/providers/OpenRouterSettings.ts",
58-
"ui/settings/providers/BrowserOperatorSettings.ts",
57+
"ui/settings/providerConfigs.ts",
5958
"ui/settings/advanced/MCPSettings.ts",
6059
"ui/settings/advanced/BrowsingHistorySettings.ts",
6160
"ui/settings/advanced/VectorDBSettings.ts",
@@ -67,8 +66,15 @@ devtools_module("ai_chat") {
6766
"ui/TodoListDisplay.ts",
6867
"ui/FileListDisplay.ts",
6968
"ui/FileContentViewer.ts",
69+
"ui/ConversationHistoryList.ts",
70+
"ui/conversationHistoryStyles.ts",
71+
"ui/CustomProviderDialog.ts",
72+
"ui/customProviderStyles.ts",
7073
"ai_chat_impl.ts",
7174
"models/ChatTypes.ts",
75+
"persistence/ConversationTypes.ts",
76+
"persistence/ConversationStorageManager.ts",
77+
"persistence/ConversationManager.ts",
7278
"core/Graph.ts",
7379
"core/State.ts",
7480
"core/Types.ts",
@@ -84,6 +90,7 @@ devtools_module("ai_chat") {
8490
"core/AgentNodes.ts",
8591
"core/GraphHelpers.ts",
8692
"core/LLMConfigurationManager.ts",
93+
"core/CustomProviderManager.ts",
8794
"core/ToolNameMap.ts",
8895
"core/ToolSurfaceProvider.ts",
8996
"core/StateGraph.ts",
@@ -101,6 +108,10 @@ devtools_module("ai_chat") {
101108
"LLM/GroqProvider.ts",
102109
"LLM/OpenRouterProvider.ts",
103110
"LLM/BrowserOperatorProvider.ts",
111+
"LLM/CerebrasProvider.ts",
112+
"LLM/AnthropicProvider.ts",
113+
"LLM/GoogleAIProvider.ts",
114+
"LLM/GenericOpenAIProvider.ts",
104115
"LLM/MessageSanitizer.ts",
105116
"LLM/LLMClient.ts",
106117
"tools/Tools.ts",
@@ -110,6 +121,7 @@ devtools_module("ai_chat") {
110121
"tools/FinalizeWithCritiqueTool.ts",
111122
"tools/VisitHistoryManager.ts",
112123
"tools/HTMLToMarkdownTool.ts",
124+
"tools/ReadabilityExtractorTool.ts",
113125
"tools/SchemaBasedExtractorTool.ts",
114126
"tools/StreamlinedSchemaExtractorTool.ts",
115127
"tools/CombinedExtractionTool.ts",
@@ -164,6 +176,7 @@ devtools_module("ai_chat") {
164176
"evaluation/test-cases/research-agent-tests.ts",
165177
"evaluation/test-cases/action-agent-tests.ts",
166178
"evaluation/test-cases/web-task-agent-tests.ts",
179+
"evaluation/test-cases/html-to-markdown-tests.ts",
167180
"evaluation/runner/EvaluationRunner.ts",
168181
"evaluation/runner/VisionAgentEvaluationRunner.ts",
169182
"common/MarkdownViewerUtil.ts",
@@ -173,6 +186,8 @@ devtools_module("ai_chat") {
173186
"common/page.ts",
174187
"common/WebSocketRPCClient.ts",
175188
"common/EvaluationConfig.ts",
189+
"utils/ContentChunker.ts",
190+
"vendor/readability-source.ts",
176191
"evaluation/remote/EvaluationProtocol.ts",
177192
"evaluation/remote/EvaluationAgent.ts",
178193
"tracing/TracingProvider.ts",
@@ -245,11 +260,10 @@ _ai_chat_sources = [
245260
"ui/settings/components/SettingsFooter.ts",
246261
"ui/settings/components/AdvancedToggle.ts",
247262
"ui/settings/providers/BaseProviderSettings.ts",
248-
"ui/settings/providers/OpenAISettings.ts",
263+
"ui/settings/providers/GenericProviderSettings.ts",
249264
"ui/settings/providers/LiteLLMSettings.ts",
250-
"ui/settings/providers/GroqSettings.ts",
251265
"ui/settings/providers/OpenRouterSettings.ts",
252-
"ui/settings/providers/BrowserOperatorSettings.ts",
266+
"ui/settings/providerConfigs.ts",
253267
"ui/settings/advanced/MCPSettings.ts",
254268
"ui/settings/advanced/BrowsingHistorySettings.ts",
255269
"ui/settings/advanced/VectorDBSettings.ts",
@@ -279,6 +293,7 @@ _ai_chat_sources = [
279293
"core/AgentNodes.ts",
280294
"core/GraphHelpers.ts",
281295
"core/LLMConfigurationManager.ts",
296+
"core/CustomProviderManager.ts",
282297
"core/ToolNameMap.ts",
283298
"core/ToolSurfaceProvider.ts",
284299
"core/StateGraph.ts",
@@ -296,6 +311,10 @@ _ai_chat_sources = [
296311
"LLM/GroqProvider.ts",
297312
"LLM/OpenRouterProvider.ts",
298313
"LLM/BrowserOperatorProvider.ts",
314+
"LLM/CerebrasProvider.ts",
315+
"LLM/AnthropicProvider.ts",
316+
"LLM/GoogleAIProvider.ts",
317+
"LLM/GenericOpenAIProvider.ts",
299318
"LLM/MessageSanitizer.ts",
300319
"LLM/LLMClient.ts",
301320
"tools/Tools.ts",
@@ -305,6 +324,7 @@ _ai_chat_sources = [
305324
"tools/FinalizeWithCritiqueTool.ts",
306325
"tools/VisitHistoryManager.ts",
307326
"tools/HTMLToMarkdownTool.ts",
327+
"tools/ReadabilityExtractorTool.ts",
308328
"tools/SchemaBasedExtractorTool.ts",
309329
"tools/StreamlinedSchemaExtractorTool.ts",
310330
"tools/CombinedExtractionTool.ts",
@@ -359,6 +379,7 @@ _ai_chat_sources = [
359379
"evaluation/test-cases/research-agent-tests.ts",
360380
"evaluation/test-cases/action-agent-tests.ts",
361381
"evaluation/test-cases/web-task-agent-tests.ts",
382+
"evaluation/test-cases/html-to-markdown-tests.ts",
362383
"evaluation/runner/EvaluationRunner.ts",
363384
"evaluation/runner/VisionAgentEvaluationRunner.ts",
364385
"common/MarkdownViewerUtil.ts",
@@ -368,6 +389,8 @@ _ai_chat_sources = [
368389
"common/page.ts",
369390
"common/WebSocketRPCClient.ts",
370391
"common/EvaluationConfig.ts",
392+
"utils/ContentChunker.ts",
393+
"vendor/readability-source.ts",
371394
"evaluation/remote/EvaluationProtocol.ts",
372395
"evaluation/remote/EvaluationAgent.ts",
373396
"tracing/TracingProvider.ts",

0 commit comments

Comments
 (0)