Skip to content

Commit 1a28401

Browse files
committed
Copilot.vim 1.19.2
1 parent 79e1a89 commit 1a28401

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

autoload/copilot.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,9 @@ function! s:commands.help(opts) abort
701701
endfunction
702702

703703
function! s:commands.version(opts) abort
704-
let info = copilot#agent#EditorInfo()
705-
echo 'copilot.vim ' .info.editorPluginInfo.version
706-
echo info.editorInfo.name . ' ' . info.editorInfo.version
704+
echo 'copilot.vim ' .copilot#agent#EditorPluginInfo().version
705+
let editorInfo = copilot#agent#EditorInfo()
706+
echo editorInfo.name . ' ' . editorInfo.version
707707
if s:Running()
708708
let versions = s:agent.Call('getVersion', {})
709709
echo 'dist/agent.js ' . versions.version

autoload/copilot/agent.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ function! s:UrlDecode(str) abort
435435
return substitute(a:str, '%\(\x\x\)', '\=iconv(nr2char("0x".submatch(1)), "utf-8", "latin1")', 'g')
436436
endfunction
437437

438-
function! s:EditorInfo() abort
438+
function! copilot#agent#EditorInfo() abort
439439
if !exists('s:editor_version')
440440
if has('nvim')
441441
let s:editor_version = matchstr(execute('version'), 'NVIM v\zs[^[:space:]]\+')
@@ -446,6 +446,10 @@ function! s:EditorInfo() abort
446446
return {'name': has('nvim') ? 'Neovim': 'Vim', 'version': s:editor_version}
447447
endfunction
448448

449+
function! copilot#agent#EditorPluginInfo() abort
450+
return {'name': 'copilot.vim', 'version': s:plugin_version}
451+
endfunction
452+
449453
function! copilot#agent#Settings() abort
450454
let settings = {
451455
\ 'http': {
@@ -465,8 +469,8 @@ endfunction
465469
function! s:InitializeResult(result, agent) abort
466470
let a:agent.capabilities = get(a:result, 'capabilities', {})
467471
let info = {
468-
\ 'editorInfo': s:EditorInfo(),
469-
\ 'editorPluginInfo': {'name': 'copilot.vim', 'version': s:plugin_version},
472+
\ 'editorInfo': copilot#agent#EditorInfo(),
473+
\ 'editorPluginInfo': copilot#agent#EditorPluginInfo(),
470474
\ 'editorConfiguration': extend(copilot#agent#Settings(), a:agent.editorConfiguration)}
471475
call a:agent.Request('setEditorInfo', info)
472476
endfunction

autoload/copilot/version.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
function! copilot#version#String() abort
2-
return '1.19.1'
2+
return '1.19.2'
33
endfunction

0 commit comments

Comments
 (0)