Support web search (#1370)
<!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds web search to Dyad Pro chats with a new UI, tag parsing, and a Pro Mode toggle that wires through to the engine. - **New Features** - Pro Mode toggle: “Web Search” (settings.enableProWebSearch). - New custom tags: dyad-web-search, dyad-web-search-result, dyad-read. - Collapsible Web Search Result UI with in-progress badge and markdown rendering. - Engine integration: passes enable_web_search and activates DyadEngine when web search is on. <!-- End of auto-generated description by cubic. -->
This commit is contained in:
@@ -86,7 +86,8 @@ export async function getModelClient(
|
||||
if (providerConfig.gatewayPrefix != null || dyadEngineUrl) {
|
||||
const isEngineEnabled =
|
||||
settings.enableProSmartFilesContextMode ||
|
||||
settings.enableProLazyEditsMode;
|
||||
settings.enableProLazyEditsMode ||
|
||||
settings.enableProWebSearch;
|
||||
const provider = isEngineEnabled
|
||||
? createDyadEngine({
|
||||
apiKey: dyadApiKey,
|
||||
@@ -100,6 +101,7 @@ export async function getModelClient(
|
||||
enableSmartFilesContext: settings.enableProSmartFilesContextMode,
|
||||
// Keep in sync with getCurrentValue in ProModeSelector.tsx
|
||||
smartContextMode: settings.proSmartContextOption ?? "balanced",
|
||||
enableWebSearch: settings.enableProWebSearch,
|
||||
},
|
||||
settings,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user