@@ -8,23 +8,23 @@ import (
8
8
"log/slog"
9
9
"net/netip"
10
10
"os"
11
- "os/signal"
12
11
"time"
13
12
14
13
"github.com/charmbracelet/huh"
15
- "github.com/coder/coder/v2/pty"
16
- "github.com/coder/serpent"
17
- "github.com/coder/wush/cliui"
18
- "github.com/coder/wush/overlay"
19
- "github.com/coder/wush/tsserver"
20
14
"github.com/mattn/go-isatty"
21
15
"golang.org/x/crypto/ssh"
22
- "golang.org/x/sys/unix"
23
16
"golang.org/x/term"
24
17
"golang.org/x/xerrors"
25
18
"tailscale.com/client/tailscale"
26
19
"tailscale.com/net/netns"
27
20
"tailscale.com/tailcfg"
21
+
22
+ "github.com/coder/coder/v2/pty"
23
+ "github.com/coder/serpent"
24
+ "github.com/coder/wush/cliui"
25
+ "github.com/coder/wush/overlay"
26
+ "github.com/coder/wush/tsserver"
27
+ xssh "github.com/coder/wush/xssh"
28
28
)
29
29
30
30
func sendCmd () * serpent.Command {
@@ -156,7 +156,7 @@ func sendCmd() *serpent.Command {
156
156
_ = pty .RestoreTerminal (stdoutFile .Fd (), outState )
157
157
}()
158
158
159
- windowChange := listenWindowSize (ctx )
159
+ windowChange := xssh . ListenWindowSize (ctx )
160
160
go func () {
161
161
for {
162
162
select {
@@ -207,16 +207,6 @@ func sendCmd() *serpent.Command {
207
207
}
208
208
}
209
209
210
- func listenWindowSize (ctx context.Context ) <- chan os.Signal {
211
- windowSize := make (chan os.Signal , 1 )
212
- signal .Notify (windowSize , unix .SIGWINCH )
213
- go func () {
214
- <- ctx .Done ()
215
- signal .Stop (windowSize )
216
- }()
217
- return windowSize
218
- }
219
-
220
210
func waitUntilHasPeerHasIP (ctx context.Context , lc * tailscale.LocalClient ) (netip.Addr , error ) {
221
211
for {
222
212
select {
0 commit comments