feat: add prompt and attach options to other commands in cli #7340
+1,235
−47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the --prompt option to the attach, acp, web and serve commands (where it starts a session)
Adds an --attach option similar to the attach command to the acp, web and server commands (where it proxies the remote server)
Optionally when attaching to a server, instead of starting a new session, allow resuming an existing one via session URL
Also added
--sessionoption to the acp since the logic was already there for--attachAll tested manually (ACP with Zed) and added some tests. This allows a us to run the actual server in an isolated sandbox (only proxying out the server, optionally with initial prompt) and then proxy it forward on a secondary server (with correct cors options). We can then attach opencode cli or ACP clients.
Closes #8890