@@ -5,7 +5,7 @@ let g:autoloaded_copilot_agent = 1
55
66scriptencoding utf- 8
77
8- let s: plugin_version = ' 1.6.1 '
8+ let s: plugin_version = ' 1.7.0 '
99
1010let s: error_exit = -1
1111
@@ -310,7 +310,6 @@ function! s:LspRequest(method, params, ...) dict abort
310310 endif
311311 if has_key (self , ' client_id' )
312312 call copilot#agent#LspExit (self .client_id, -1 , -1 )
313- unlet ! self .client_id
314313 endif
315314 throw ' copilot#agent: LSP client not available'
316315endfunction
@@ -372,14 +371,13 @@ function! s:Command() abort
372371 endif
373372 let node_version = matchstr (join (out, ' ' ), ' ^v\zs\d\+\.[^[:space:]]*' )
374373 let major = str2nr (node_version)
375- let too_new = major >= 18
376374 if ! get (g: , ' copilot_ignore_node_version' )
377375 if major == 0
378376 return [v: null , node_version, ' Could not determine Node.js version' ]
379- elseif ( major < 16 || too_new) && s: IsArmMacOS ()
380- return [v: null , node_version, ' Node.js version 16.x or 17.x required on Apple Silicon but found ' . node_version]
381- elseif major < 12 || too_new
382- return [v: null , node_version, ' Node.js version 12.x–17.x required but found ' . node_version]
377+ elseif major < 16 && s: IsArmMacOS ()
378+ return [v: null , node_version, ' Node.js version 16.x or newer required but found ' . node_version]
379+ elseif major < 14
380+ return [v: null , node_version, ' Node.js version 14.x or newer required but found ' . node_version]
383381 endif
384382 endif
385383 let agent = get (g: , ' copilot_agent_command' , ' ' )
0 commit comments