mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-04 18:59:08 +01:00
4ccd62f12a
* wrote client code for communicating with lambda cloud * Added timeout functionality, added check for telemetry enabled for clouod completion, added capability to unset token, other small fixes * removed stale prints and comments, readded non stream completion for now * changed json encode to json marshal, also testing my new commit author * added no telemetry error message and removed check for model in cloud completion * added defer conn.close() to doOpenAIStreamCompletion, so websocket is always closed * made a constant for the long telemetry error message * added endpoint getter, made errors better * updated scripthaus file to include dev ws endpoint * added error check for open ai errors * changed bool condition for better readability * update some error messages (use error message from server if returned) * dont blow up the whole response if the server times out. just write a timeout message * render streaming errors with a new prompt in openai.tsx (show content and error). render cmd status 'error' with red x as well. show exitcode in tooltip of 'x' * set hadError for errors. update timeout error to work with new frontend code * bump client timeout to 5 minutes (longer than server timeout) --------- Co-authored-by: sawka
103 lines
4.1 KiB
Markdown
103 lines
4.1 KiB
Markdown
# WaveTerm Commands
|
|
|
|
```bash
|
|
# @scripthaus command webpack-watch
|
|
# @scripthaus cd :playbook
|
|
node_modules/.bin/webpack --env dev --watch
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command webpack-build
|
|
# @scripthaus cd :playbook
|
|
node_modules/.bin/webpack --env dev
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command webpack-build-prod
|
|
# @scripthaus cd :playbook
|
|
node_modules/.bin/webpack --env prod
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command electron-rebuild
|
|
# @scripthaus cd :playbook
|
|
node_modules/.bin/electron-rebuild
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command electron
|
|
# @scripthaus cd :playbook
|
|
WAVETERM_DEV=1 PCLOUD_ENDPOINT="https://ot2e112zx5.execute-api.us-west-2.amazonaws.com/dev" PCLOUD_WS_ENDPOINT="wss://5lfzlg5crl.execute-api.us-west-2.amazonaws.com/dev/" node_modules/.bin/electron dist-dev/emain.js
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command typecheck
|
|
# @scripthaus cd :playbook
|
|
node_modules/.bin/tsc --noEmit
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command build-package
|
|
# @scripthaus cd :playbook
|
|
rm -rf dist/
|
|
rm -rf bin/
|
|
rm -rf build/
|
|
node_modules/.bin/webpack --env prod
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.amd64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.arm64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.amd64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.arm64 main-waveshell.go)
|
|
(cd wavesrv; CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M')" -o ../bin/wavesrv ./cmd)
|
|
node_modules/.bin/electron-forge make
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command build-package-linux
|
|
# @scripthaus cd :playbook
|
|
rm -rf dist/
|
|
rm -rf bin/
|
|
rm -rf build/
|
|
node_modules/.bin/webpack --env prod
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.amd64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.arm64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.amd64 main-waveshell.go)
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.arm64 main-waveshell.go)
|
|
# adds -extldflags=-static, *only* on linux (macos does not support fully static binaries) to avoid a glibc dependency
|
|
(cd wavesrv; CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS" -o ../bin/wavesrv ./cmd)
|
|
node_modules/.bin/electron-forge make
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command open-electron-package
|
|
# @scripthaus cd :playbook
|
|
open out/Wave-darwin-x64/Wave.app
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command build-wavesrv
|
|
cd wavesrv
|
|
CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M')" -o ../bin/wavesrv ./cmd
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command fullbuild-waveshell
|
|
set -e
|
|
cd waveshell
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.amd64 main-waveshell.go
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.arm64 main-waveshell.go
|
|
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.amd64 main-waveshell.go
|
|
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.arm64 main-waveshell.go
|
|
```
|
|
|
|
```bash
|
|
# @scripthaus command build-backend
|
|
# @scripthaus cd :playbook
|
|
echo building waveshell
|
|
scripthaus run fullbuild-waveshell
|
|
echo building wavesrv
|
|
scripthaus run build-wavesrv
|
|
```
|