All checks were successful
PR Check / check (pull_request) Successful in 57s
The terminal tab was unusable on Windows: creack/pty has no native Windows ConPTY support, so pty.Start() returned "operating system not supported" and the WebSocket closed immediately on any tab click — even though the menu detection (wsl --list --quiet, pwsh, cmd) worked. Introduce a termSession interface with two implementations selected at runtime: - ptySession (unix): unchanged behaviour, real PTY via creack/pty, resize works, vim/top behave normally. - pipeSession (windows): plain stdin + merged stdout/stderr pipes, forwarded to the WebSocket. Resize is a no-op (no SIGWINCH without a TTY), so full-screen TUIs misbehave in this mode — but launching wsl.exe, pwsh, or cmd works for line-based interaction, which is what the menu shortcuts target. handleTerminalWS now goes through startTermSession(cmd); the unix path is unchanged, the windows fallback kicks in only when pty.Start would have failed. Bump v0.7.0 → v0.7.1; CHANGELOG entry added.
34 lines
670 B
Go
34 lines
670 B
Go
package version
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
)
|
|
|
|
const (
|
|
Name = "muyue"
|
|
Version = "0.7.1"
|
|
Author = "La Légion de Muyue"
|
|
)
|
|
|
|
var (
|
|
// BuildDate is set at build time
|
|
BuildDate = ""
|
|
)
|
|
|
|
func FullVersion() string {
|
|
return Name + " v" + Version
|
|
}
|
|
|
|
// FullInfo returns full version information.
|
|
func FullInfo() string {
|
|
info := fmt.Sprintf("%-12s %s\n", "Version:", Version)
|
|
info += fmt.Sprintf("%-12s %s\n", "Author:", Author)
|
|
info += fmt.Sprintf("%-12s %s\n", "Go:", runtime.Version())
|
|
info += fmt.Sprintf("%-12s %s\n", "Platform:", runtime.GOOS+"/"+runtime.GOARCH)
|
|
if BuildDate != "" {
|
|
info += fmt.Sprintf("%-12s %s\n", "Build:", BuildDate)
|
|
}
|
|
return info
|
|
}
|