@@ -25,6 +25,10 @@ if !exists('s:editor_version')
2525endif
2626
2727let s: server_port = v: null
28+ if codeium#util#IsUsingRemoteChat ()
29+ let s: server_port = 42100
30+ endif
31+
2832let g: codeium_server_job = v: null
2933
3034function ! s: OnExit (result, status, on_complete_cb) abort
@@ -266,18 +270,19 @@ function! s:ActuallyStart() abort
266270 let chat_ports = get (g: , ' codeium_port_config' , {})
267271 let manager_dir = tempname () . ' /codeium/manager'
268272 call mkdir (manager_dir, ' p' )
269-
270273 let args = [
271274 \ s: bin ,
272275 \ ' --api_server_url' , get (config, ' api_url' , ' https://server.codeium.com' ),
273- \ ' --manager_dir' , manager_dir,
274276 \ ' --enable_local_search' , ' --enable_index_service' , ' --search_max_workspace_file_count' , ' 5000' ,
275277 \ ' --enable_chat_web_server' , ' --enable_chat_client'
276278 \ ]
277279 if has_key (config, ' api_url' ) && ! empty (config.api_url)
278280 let args += [' --enterprise_mode' ]
279281 let args += [' --portal_url' , get (config, ' portal_url' , ' https://codeium.example.com' )]
280282 endif
283+ if ! codeium#util#IsUsingRemoteChat ()
284+ let args += [' --manager_dir' , manager_dir]
285+ endif
281286 " If either of these is set, only one vim window (with any number of buffers) will work with Codeium.
282287 " Opening other vim windows won't be able to use Codeium features.
283288 if has_key (chat_ports, ' web_server' ) && ! empty (chat_ports.web_server)
@@ -298,6 +303,9 @@ function! s:ActuallyStart() abort
298303 \ ' err_cb' : { channel, data - > codeium#log#Info (' [SERVER] ' . data) },
299304 \ })
300305 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+
302310 call timer_start (5000 , function (' s:SendHeartbeat' , []), {' repeat' : -1 })
303311endfunction
0 commit comments