mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-15 11:04:44 +08:00
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -51,6 +51,7 @@ export async function* chatStream(
|
||||
interrupt_feedback?: string;
|
||||
enable_deep_thinking?: boolean;
|
||||
enable_background_investigation: boolean;
|
||||
enable_web_search?: boolean;
|
||||
report_style?: "academic" | "popular_science" | "news" | "social_media" | "strategic_investment";
|
||||
mcp_settings?: {
|
||||
servers: Record<
|
||||
|
||||
@@ -14,6 +14,7 @@ const DEFAULT_SETTINGS: SettingsState = {
|
||||
maxClarificationRounds: 3,
|
||||
enableDeepThinking: false,
|
||||
enableBackgroundInvestigation: false,
|
||||
enableWebSearch: true,
|
||||
maxPlanIterations: 1,
|
||||
maxStepNum: 3,
|
||||
maxSearchResults: 3,
|
||||
@@ -31,6 +32,7 @@ export type SettingsState = {
|
||||
maxClarificationRounds: number;
|
||||
enableDeepThinking: boolean;
|
||||
enableBackgroundInvestigation: boolean;
|
||||
enableWebSearch: boolean;
|
||||
maxPlanIterations: number;
|
||||
maxStepNum: number;
|
||||
maxSearchResults: number;
|
||||
@@ -174,4 +176,14 @@ export function setEnableClarification(value: boolean) {
|
||||
}));
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
export function setEnableWebSearch(value: boolean) {
|
||||
useSettingsStore.setState((state) => ({
|
||||
general: {
|
||||
...state.general,
|
||||
enableWebSearch: value,
|
||||
},
|
||||
}));
|
||||
saveSettings();
|
||||
}
|
||||
loadSettings();
|
||||
|
||||
@@ -115,6 +115,7 @@ export async function sendMessage(
|
||||
enable_deep_thinking: settings.enableDeepThinking ?? false,
|
||||
enable_background_investigation:
|
||||
settings.enableBackgroundInvestigation ?? true,
|
||||
enable_web_search: settings.enableWebSearch ?? true,
|
||||
max_plan_iterations: settings.maxPlanIterations,
|
||||
max_step_num: settings.maxStepNum,
|
||||
max_search_results: settings.maxSearchResults,
|
||||
|
||||
Reference in New Issue
Block a user