Add LangSearch as web search provider#265
Merged
Merged
Conversation
… nits The per-query Agent.create call invokes getToolRegistry, which reads process.env fresh. saveApiKeyToEnv reloads .env into process.env via dotenv override. So no provider needs a restart — replace the misleading "Restart Dexter to use X" message (carved out only for perplexity, now also langsearch) with a single accurate "X is now active" confirmation. Also: - Rename langSearchTool -> langSearch to match exaSearch/tavilySearch/ perplexitySearch - Sync description "content summaries" -> "content snippets" for consistency with other web_search providers - Add trailing newline to langsearch.ts Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit replaced "Restart Dexter to use X" with "X is now active" but kept routing through onError, which logs at ERROR level and renders as "Error: ..." in red. Removing the confirmation entirely matches perplexity's longstanding silent-success path; the selector overlay closes on commit and /search shows the active provider with a checkmark, so implicit feedback is sufficient. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for the LangSearch web search provider throughout the codebase. The changes ensure that LangSearch is available as a selectable search provider, can be configured via environment variables, and is fully integrated into the tool registry and UI.
Integration of LangSearch as a web search provider:
langSearchToolinsrc/tools/search/langsearch.ts, implementing the API call and result formatting for LangSearch.src/tools/registry.tsto register LangSearch as a provider if theLANGSEARCH_API_KEYis set.langSearchToolfromsrc/tools/search/index.tsfor use elsewhere in the codebase.User interface and configuration updates:
src/components/select-list.tsandsrc/controllers/search-selection.ts, allowing users to select and configure it.SearchProviderIdtype and theSEARCH_PROVIDERSmapping insrc/utils/env.tsto include LangSearch and its environment variable.LANGSEARCH_API_KEYto the example environment file for configuration guidance.