mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat: Optimize the code
This commit is contained in:
parent
f9f6eb52dd
commit
b1ece177b7
10 changed files with 296 additions and 282 deletions
|
|
@ -908,29 +908,8 @@ export class Config {
|
|||
return this.tavilyApiKey;
|
||||
}
|
||||
|
||||
getWebSearchConfig():
|
||||
| {
|
||||
provider: Array<{
|
||||
type: 'tavily' | 'google' | 'dashscope';
|
||||
config: Record<string, unknown>;
|
||||
}>;
|
||||
default: string;
|
||||
}
|
||||
| undefined {
|
||||
if (!this.webSearch) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
provider: this.webSearch.provider.map((p) => ({
|
||||
type: p.type,
|
||||
config: {
|
||||
apiKey: p.apiKey,
|
||||
searchEngineId: p.searchEngineId,
|
||||
},
|
||||
})),
|
||||
default: this.webSearch.default,
|
||||
};
|
||||
getWebSearchConfig() {
|
||||
return this.webSearch;
|
||||
}
|
||||
|
||||
getIdeMode(): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue