create block using a blockdef. better controller control. preview that takes a file. atom caching per block. lots of updates

This commit is contained in:
sawka
2024-05-16 00:29:58 -07:00
parent 86b2596214
commit eab6afb91a
19 changed files with 652 additions and 256 deletions
+6 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/creack/pty"
"github.com/wavetermdev/thenextwave/pkg/util/shellutil"
"github.com/wavetermdev/thenextwave/pkg/wavebase"
)
type TermSize struct {
@@ -37,7 +38,11 @@ func StartShellProc(termSize TermSize) (*ShellProc, error) {
shellPath := shellutil.DetectLocalShellPath()
ecmd := exec.Command(shellPath, "-i", "-l")
ecmd.Env = os.Environ()
shellutil.UpdateCmdEnv(ecmd, shellutil.WaveshellEnvVars(shellutil.DefaultTermType))
envToAdd := shellutil.WaveshellEnvVars(shellutil.DefaultTermType)
if os.Getenv("LANG") == "" {
envToAdd["LANG"] = wavebase.DetermineLang()
}
shellutil.UpdateCmdEnv(ecmd, envToAdd)
cmdPty, cmdTty, err := pty.Open()
if err != nil {
return nil, fmt.Errorf("opening new pty: %w", err)