-
-
Notifications
You must be signed in to change notification settings - Fork 987
feat(wsh): add attach command to observe and interact with running terminal blocks #3267
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
Open
dfbb
wants to merge
16
commits into
wavetermdev:main
Choose a base branch
from
dfbb:wsh-attach
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e64d1fe
feat(wsh): add attach command for read-only terminal observation
dfbb e589932
feat(wconfig): add remote:password/listenport/bindaddr settings
dfbb 3dc9f43
test(web): add failing http reverse-proxy tests for remote-entry
dfbb 3235846
feat(web): implement http reverse-proxy for remote-entry
dfbb df16363
test(web): add failing websocket bridge tests for remote-entry
dfbb 4bcc280
feat(web): implement websocket bridge for remote-entry
dfbb 6e095f2
feat(server): start remote-entry listener when remote:password is set
dfbb cc334cb
feat(frontend): accept remotePassword in ElectronOverrideOpts
dfbb 36b814d
feat(emain): add remote mode CLI parsing and settings reader
dfbb 4c08847
feat(emain): add X-Remote-Password header injector
dfbb 0e39d79
feat(emain): resolve remote mode early and isolate userData
dfbb a76abea
feat(emain): wire remote mode into Electron main process
dfbb c2b2ce7
fix(waveattach): add Windows/mips build constraints for cross-compila…
dfbb 9a614f2
fix(waveattach): exclude from windows and linux/mips cross-compilation
dfbb f8a7030
fix(emain-platform): remove duplicate getRemoteState re-export
dfbb d36c789
feat(remote): bridge electron:control events and fix multi-client tab…
dfbb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Copyright 2026, Command Line Inc. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package cmd | ||
|
|
||
| import ( | ||
| "github.com/spf13/cobra" | ||
| "github.com/wavetermdev/waveterm/pkg/waveattach" | ||
| ) | ||
|
|
||
| var attachCmd = &cobra.Command{ | ||
| Use: "attach [blockid]", | ||
| Short: "attach to a Wave Terminal block from an external terminal", | ||
| Long: "Attach to a running term block in Wave Terminal. Press Ctrl+A D to detach.", | ||
| Args: cobra.MaximumNArgs(1), | ||
| RunE: attachRun, | ||
| DisableFlagsInUseLine: true, | ||
| } | ||
|
|
||
| func init() { | ||
| rootCmd.AddCommand(attachCmd) | ||
| } | ||
|
|
||
| func attachRun(cmd *cobra.Command, args []string) error { | ||
| rpcClient, _, err := waveattach.Connect() | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| var blockId string | ||
| if len(args) == 1 { | ||
| blockId = args[0] | ||
| } else { | ||
| blockId, err = waveattach.SelectBlock(rpcClient) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| } | ||
|
|
||
| return waveattach.Attach(rpcClient, blockId) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Add the advertised
--listentrypoint.This command never registers or handles a
--listflag, sowsh attach --listwill currently fail as an unknown option even though it is one of the PR’s documented usage modes. Sincepkg/waveattach/selector.goalready exposesListTermBlocks, this looks like a missing CLI branch rather than a missing backend capability.Also applies to: 24-40
🤖 Prompt for AI Agents