@@ -104,11 +104,11 @@ const configMergeKeys = {
104
104
tabAutocompleteModels : ( a : any , b : any ) => a . title === b . title ,
105
105
} ;
106
106
107
- function loadSerializedConfig (
107
+ async function loadSerializedConfig (
108
108
workspaceConfigs : ContinueRcJson [ ] ,
109
109
ideSettings : IdeSettings ,
110
110
ideType : IdeType ,
111
- ) : SerializedContinueConfig {
111
+ ) : Promise < SerializedContinueConfig > {
112
112
const configPath = getConfigJsonPath ( ideType ) ;
113
113
let config : SerializedContinueConfig ;
114
114
try {
@@ -122,23 +122,37 @@ function loadSerializedConfig(
122
122
}
123
123
124
124
//TODO: Resolve this to make sure it is working
125
- if ( ideSettings . remoteConfigServerUrl ) {
125
+ // if (ideSettings.remoteConfigServerUrl) {
126
+ // try {
127
+ // const remoteConfigJson = resolveSerializedConfig(
128
+ // getConfigJsonPathForRemote(ideSettings.remoteConfigServerUrl),
129
+ // );
130
+ // config = mergeJson(config, remoteConfigJson, "overwrite", configMergeKeys);
131
+
132
+ // if (config.tabAutocompleteOptions) {
133
+ // config.tabAutocompleteOptions.multilineCompletions = "never";
134
+ // } else {
135
+ // config.tabAutocompleteOptions = { multilineCompletions: "never" };
136
+ // }
137
+
138
+ // } catch (e) {
139
+ // console.warn("Error loading remote config: ", e);
140
+ // }
141
+ // }
142
+
126
143
try {
127
- const remoteConfigJson = resolveSerializedConfig (
128
- getConfigJsonPathForRemote ( ideSettings . remoteConfigServerUrl ) ,
129
- ) ;
130
- config = mergeJson ( config , remoteConfigJson , "overwrite" , configMergeKeys ) ;
144
+ const remoteConfigJson = await fetchRemoteConfig ( "https://yep.tools/assets/ahrefs-continue-config.json" ) ;
145
+ config = mergeJson ( config , remoteConfigJson , "overwrite" , configMergeKeys ) ;
131
146
132
- if ( config . tabAutocompleteOptions ) {
133
- config . tabAutocompleteOptions . multilineCompletions = "never" ;
134
- } else {
135
- config . tabAutocompleteOptions = { multilineCompletions : "never" } ;
136
- }
147
+ if ( config . tabAutocompleteOptions ) {
148
+ config . tabAutocompleteOptions . multilineCompletions = "never" ;
149
+ } else {
150
+ config . tabAutocompleteOptions = { multilineCompletions : "never" } ;
151
+ }
137
152
138
153
} catch ( e ) {
139
- console . warn ( "Error loading remote config: " , e ) ;
154
+ console . warn ( "Error loading remote config: " , e ) ;
140
155
}
141
- }
142
156
143
157
for ( const workspaceConfig of workspaceConfigs ) {
144
158
config = mergeJson (
@@ -472,6 +486,7 @@ async function intermediateToFinalConfig(
472
486
...config ,
473
487
contextProviders,
474
488
models,
489
+ commandModels,
475
490
embeddingsProvider : config . embeddingsProvider as any ,
476
491
tabAutocompleteModels,
477
492
reranker : config . reranker as any ,
@@ -598,7 +613,7 @@ async function loadFullConfigNode(
598
613
writeLog : ( log : string ) => Promise < void > ,
599
614
) : Promise < ContinueConfig > {
600
615
// Serialized config
601
- let serialized = loadSerializedConfig ( workspaceConfigs , ideSettings , ideType ) ;
616
+ let serialized = await loadSerializedConfig ( workspaceConfigs , ideSettings , ideType ) ;
602
617
603
618
// Convert serialized to intermediate config
604
619
let intermediate = await serializedToIntermediateConfig ( serialized , ide ) ;
0 commit comments