@@ -25,6 +25,10 @@ if !exists('s:editor_version')
25
25
endif
26
26
27
27
let s: server_port = v: null
28
+ if codeium#util#IsUsingRemoteChat ()
29
+ let s: server_port = 42100
30
+ endif
31
+
28
32
let g: codeium_server_job = v: null
29
33
30
34
function ! s: OnExit (result, status, on_complete_cb) abort
@@ -266,18 +270,19 @@ function! s:ActuallyStart() abort
266
270
let chat_ports = get (g: , ' codeium_port_config' , {})
267
271
let manager_dir = tempname () . ' /codeium/manager'
268
272
call mkdir (manager_dir, ' p' )
269
-
270
273
let args = [
271
274
\ s: bin ,
272
275
\ ' --api_server_url' , get (config, ' api_url' , ' https://server.codeium.com' ),
273
- \ ' --manager_dir' , manager_dir,
274
276
\ ' --enable_local_search' , ' --enable_index_service' , ' --search_max_workspace_file_count' , ' 5000' ,
275
277
\ ' --enable_chat_web_server' , ' --enable_chat_client'
276
278
\ ]
277
279
if has_key (config, ' api_url' ) && ! empty (config.api_url)
278
280
let args += [' --enterprise_mode' ]
279
281
let args += [' --portal_url' , get (config, ' portal_url' , ' https://codeium.example.com' )]
280
282
endif
283
+ if ! codeium#util#IsUsingRemoteChat ()
284
+ let args += [' --manager_dir' , manager_dir]
285
+ endif
281
286
" If either of these is set, only one vim window (with any number of buffers) will work with Codeium.
282
287
" Opening other vim windows won't be able to use Codeium features.
283
288
if has_key (chat_ports, ' web_server' ) && ! empty (chat_ports.web_server)
@@ -298,6 +303,9 @@ function! s:ActuallyStart() abort
298
303
\ ' err_cb' : { channel, data - > codeium#log#Info (' [SERVER] ' . data) },
299
304
\ })
300
305
endif
301
- call timer_start (500 , function (' s:FindPort' , [manager_dir]), {' repeat' : -1 })
306
+ if ! codeium#util#IsUsingRemoteChat ()
307
+ call timer_start (500 , function (' s:FindPort' , [manager_dir]), {' repeat' : -1 })
308
+ endif
309
+
302
310
call timer_start (5000 , function (' s:SendHeartbeat' , []), {' repeat' : -1 })
303
311
endfunction
0 commit comments