-
-
Notifications
You must be signed in to change notification settings - Fork 78
feat(server): support remote server connection and authentication #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Enables connecting to opencode servers on non-localhost hosts and authenticating via OPENCODE_SERVER_PASSWORD env var
511f2a8 to
d78d614
Compare
d78d614 to
9dedea1
Compare
lua/opencode/cli/client.lua
Outdated
| --- - [implementation](https://github.com/sst/opencode/blob/dev/packages/opencode/src/server/server.ts) | ||
| local M = {} | ||
|
|
||
| local config = require("opencode.config") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you inline this please? Top-level require calls hurt lazy-loading :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this makes sense in preparation of nvim 0.12 vim.pack
regarding the server url: I added an extra check to avoid faulty user configuration. May be not a good idea. Better located in the config module?
|
Thanks for this, very cool use case! I assume this is for connecting to opencodes running outside your local machine right? I thought to ask you to append the hostname flag and option to |
|
I investigate the opencode server capabilities to use it on several machines. Before I eventually make further PRs, I thought SoC would be good and wanted avoid to push this one commonly with new endpoints. Thank you for this package! |
5d2b2ea to
9714c3d
Compare
9714c3d to
866e9b1
Compare
This PR add missing parameters to authentication as well as remove hardcoded hostname.