Closed NONVME closed 2 months ago
Hey, you only add macos support can you also work about support for Windows. I was trying with start command but it was giving an error.
@DajmondFM what's the issue with using start
that you saw?
When trying to use :Codeium Chat
it shows widnows error message
Windows cannot find the file 'http://127.0.0.1:50848?api_key=MY API KEY HERE'. Make sure the name is typed correctly, and then try again.
and when you manualy enter the url it shows
with
{
"url": "http://127.0.0.1:50848/",
"connection": {
"status": "CONNECTING",
"error": {
"name": "Error",
"message": "Missing API key. Please make sure you are signed in to the Codeium plugin and close / reopen the chat window. If the problem persists, please restart the IDE."
}
},
"isChatEnabled": false,
"handshake": {},
"params": {
"ideTelemetryEnabled": false,
"ready": false,
"hasDevExtension": false,
"hasEnterpriseExtension": false,
"diffViewEnabled": false,
"openFilePointerEnabled": false,
"insertAtCursorEnabled": false
},
"data": {
"numMessages": 0
},
"bridge": {
"bridgeType": "null"
},
"health": {
"checkStatus": null,
"error": {
"name": "TypeError",
"message": "NetworkError when attempting to fetch resource."
}
}
}
@DajmondFM can I see your patch/branch which you tried this change out on?
Of course
local url = "http://127.0.0.1:"
.. ports.chatClientPort
.. "?api_key="
.. api_key
.. "&has_enterprise_extension="
.. (config.options.enterprise_mode and "true" or "false")
.. "&web_server_url=ws://127.0.0.1:"
.. ports.chatWebServerPort
.. "&ide_name=neovim"
.. "&ide_version="
.. versions.nvim
.. "&app_name=codeium.nvim"
.. "&extension_name=codeium.nvim"
.. "&extension_version="
.. versions.extension
.. "&ide_telemetry_enabled=true"
.. "&has_index_service="
.. (config.options.enable_index_service and "true" or "false")
.. "&locale=en_US"
-- cross-platform solution to open the web app
local os_info = io.get_system_info()
if os_info.os == "linux" then
os.execute("xdg-open '" .. url .. "'")
elseif os_info.os == "macos" then
os.execute("open '" .. url .. "'")
elseif os_info.os == "windows" then
os.execute("start '" .. url .. "'")
else
notify.error("Unsupported operating system")
end
Can you try adding an extra empty argument to start before the URL? Like this SO answer: https://superuser.com/a/36730/171437
You mean something like this?
os.execute("start "" '" .. url .. "'")
Yes. If that works then maybe @NONVME can integrate into this PR.
It's completely not working
Hey it's working. At least it's opening web app but I still get this error
{
"url": "http://127.0.0.1:59021/?api_key=15be80b2-8251-4c9c-8056-16ea4abf4f81",
"connection": {
"status": "CONNECTING",
"error": {
"name": "Error",
"message": "Missing chat language server URL. Please ensure that you are signed in to the Codeium plugin and close / reopen the chat window. If the problem persists, please restart the IDE."
}
},
"isChatEnabled": false,
"handshake": {},
"params": {
"ideTelemetryEnabled": false,
"ready": true,
"apiKey": "15be80b2-8251-4c9c-8056-16ea4abf4f81",
"hasDevExtension": false,
"hasEnterpriseExtension": false,
"diffViewEnabled": false,
"openFilePointerEnabled": false,
"insertAtCursorEnabled": false
},
"data": {
"numMessages": 0
},
"bridge": {
"bridgeType": "null"
},
"health": {
"checkStatus": null,
"error": {
"name": "TypeError",
"message": "Failed to fetch"
}
}
}
Hey it's working. At least it's opening web app but I still get this error
{ "url": "http://127.0.0.1:59021/?api_key=15be80b2-8251-4c9c-8056-16ea4abf4f81", "connection": { "status": "CONNECTING", "error": { "name": "Error", "message": "Missing chat language server URL. Please ensure that you are signed in to the Codeium plugin and close / reopen the chat window. If the problem persists, please restart the IDE." } }, "isChatEnabled": false, "handshake": {}, "params": { "ideTelemetryEnabled": false, "ready": true, "apiKey": "15be80b2-8251-4c9c-8056-16ea4abf4f81", "hasDevExtension": false, "hasEnterpriseExtension": false, "diffViewEnabled": false, "openFilePointerEnabled": false, "insertAtCursorEnabled": false }, "data": { "numMessages": 0 }, "bridge": { "bridgeType": "null" }, "health": { "checkStatus": null, "error": { "name": "TypeError", "message": "Failed to fetch" } } }
I think you have an authorization issue, and it is not related to this pr. You should use config like this
Okey the issues is still here even after adding this build = ":Codeium Auth",
but i will start new issue with it. And good job with this cross-platform support.
@NONVME just wanted to check that you're happy to merge this now before I go ahead and do so
160 Done