Comments (5)
Question, was the browser opened automatically or did you paste the link into your browser?
from codeium.vim.
The browser didn't automatically opened and I used the link that was prompted to me so It's latest.
from codeium.vim.
The problem is that the link isn'r formated corectly. As the screenshot shows, The link ends at Guid
, then it shows ----
in a new line and half of the link ad the next line e874...
. If you open the browser with the link like ...e874...
(without the Guid
and withouth ----
in the middle), it works as expected
Edit: the problem is that the output from the command used on Windows to get the guid looks like the following
Guid
----
some-guid-here-
That's why the formatting gets messed up
Edit again: the following code resolves this issue
function! s:Uuid() abort
if has('win32')
return system('powershell -Command "[guid]::NewGuid().Guid"')
elseif executable('uuidgen')
return system('uuidgen')
endif
throw 'Could not generate uuid. Please make sure uuidgen is installed.'
endfunction
[guid]::NewGuid()
has been changed to [guid]::NewGuid().Guid
Edit 3: changing the following code results in the browser automatically opening the url
try
call system(browser . ' ' . '"' . url . '"')
if v:shell_error is# 0
let opened_browser = v:true
endif
catch
endtry
The single quotes that where supposed to surround url
were changed to double quotes. I'm not sure whether this causes issues on Linux or Mac.
Edit 4: despite all of this working, when I paste the received token inside Neovim, it complains about he token not being valid
Edit 5: I manage to get this working, the problem were the double and single quotes again. Using the following code to register a user works.
let command = 'curl -s https://api.codeium.com/register_user/ ' .
\ '--header "Content-Type: application/json" ' .
\ '--data ' . '"' . json_encode({'firebase_id_token': auth_token})->substitute('"', '\\"', 'g') . '"'
from codeium.vim.
@TheLeoP thanks for the investigation, would be awesome if you wanted to open a PR with these fixes.
from codeium.vim.
If for any reason an invalid link is generated the website should mention this and not show a half functioning copy token page.. Should be reported upstream somewhere? I'm running into a similar issue where my generated url is https://www.codeium.com/profile?response_type=token&redirect_uri=vim-show-auth-token&state=
from codeium.vim.
Related Issues (20)
- Ghost Suggestion Disable HOT 5
- Typo "getProjectRoot" preventing chat from getting project path HOT 1
- Let us configure the chat browser
- AppleSilicon does not pass is_arm check due to error in server.vim HOT 1
- Vim breaks after installing plugin
- I can't add an API key HOT 1
- Feature Request: code refactor
- codeium#Chat does not work at the first time we call it HOT 3
- Language Server Not Valid exe on Windows HOT 1
- Does it support manual setting of automatic trigger time?
- custom keymap not being register
- Next suggestion key binding not working
- When open telescope will cause un-terminated curl request to codeium language server
- Calling GetStatusString causes new files to opened in INSERT mode instead of NORMAL HOT 3
- No suggestions when using 1.6.39 HOT 6
- Codeium Server Crashed
- Multiple issues with Codeium in Sublime Text HOT 2
- codeium auth doesn't work over ssh
- auto-completion of codeium doesn't work
- [Bug] Neovim hangs on :wq (possible race condition)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeium.vim.