File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -383,18 +383,25 @@ class IdeaBridge {
383383 // 用户设置的回调
384384 const setting = res . payload . setting ;
385385
386+ let key = setting ?. apiKey || "" ;
387+ // idea 默认的 key 是 change_me,所以这里要清空
388+ if ( setting ?. apiKey . includes ( "change" ) ) {
389+ key = "" ;
390+ }
391+
386392 // 当前的默认模型
387393 this . handle . getSetting ( {
388394 value : setting . currentModel ,
389395 key2 : "defaultModel" ,
390396 } ) ;
397+
391398 this . handle . getUserAccessKey ( {
392- accessKey : setting . apiKey ,
399+ accessKey : key ,
393400 } ) ;
394401 this . handle . getUserSetting ( {
395402 endPoint : setting . apiBase ,
396- accessKey : setting . apiKey ,
397- keyType : setting . apiKey . startsWith ( "DC" ) ? "DevChat" : "OpenAi" ,
403+ accessKey : key ,
404+ keyType : key . startsWith ( "DC" ) ? "DevChat" : "OpenAi" ,
398405 } ) ;
399406 this . handle . getSetting ( {
400407 value : setting . language ,
You can’t perform that action at this time.
0 commit comments