feat(server): support remote server connection and authentication#159
feat(server): support remote server connection and authentication#159e-roux wants to merge 3 commits intonickjvandyke:mainfrom
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.
Can you inline this please? Top-level require calls hurt lazy-loading :)
There was a problem hiding this comment.
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.