mirror of
https://github.com/wavetermdev/backup.git
synced 2026-04-22 15:26:58 -07:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4ac8be3da | |||
| fd707dd857 | |||
| 71fcc7a542 | |||
| 702446cba8 | |||
| 15acdcc850 | |||
| fc053b06ae | |||
| 37ba95bbe7 | |||
| a5e6885597 |
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "Wave Terminal Dev Container",
|
||||
"dockerComposeFile": "../docker-compose.yml",
|
||||
"service": "wave",
|
||||
"workspaceFolder": "/app/waveterm",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"extensions": ["golang.go", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"runServices": ["dbus"],
|
||||
"postAttachCommand": "scripthaus run webpack-watch"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# Ignore node_modules and other dependencies
|
||||
node_modules
|
||||
.yarn
|
||||
|
||||
# Ignore build directories
|
||||
build
|
||||
dist
|
||||
|
||||
# Ignore logs and temporary files
|
||||
logs
|
||||
*.log
|
||||
*.tmp
|
||||
|
||||
# Ignore test and coverage files
|
||||
coverage
|
||||
test-results
|
||||
|
||||
# Ignore OS-specific files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
# Workflow to manage bumping the package version and pushing it to the target branch with a new tag.
|
||||
# This workflow uses a GitHub App to bypass branch protection and uses the GitHub API directly to ensure commits and tags are signed.
|
||||
# For more information, see this doc: https://github.com/Nautilus-Cyberneering/pygithub/blob/main/docs/how_to_sign_automatic_commits_in_github_actions.md
|
||||
|
||||
name: Bump Version
|
||||
run-name: "branch: ${{ github.ref_name }}; semver-bump: ${{ inputs.bump }}; prerelease: ${{ inputs.is-prerelease }}"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump:
|
||||
description: SemVer Bump
|
||||
required: true
|
||||
type: choice
|
||||
default: none
|
||||
options:
|
||||
- none
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
is-prerelease:
|
||||
description: Is Prerelease
|
||||
required: true
|
||||
type: boolean
|
||||
default: true
|
||||
env:
|
||||
NODE_VERSION: "22.5.1"
|
||||
jobs:
|
||||
bump-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get App Token
|
||||
uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.WAVE_BUILDER_APPID }}
|
||||
private-key: ${{ secrets.WAVE_BUILDER_KEY }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
# General build dependencies
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{env.NODE_VERSION}}
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
corepack enable
|
||||
yarn install
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Bump Version: ${{ inputs.bump }}"
|
||||
id: bump-version
|
||||
run: echo "WAVETERM_VERSION=$( task version -- ${{ inputs.bump }} ${{inputs.is-prerelease}} )" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
|
||||
- name: "Push version bump: ${{ steps.bump-version.outputs.WAVETERM_VERSION }}"
|
||||
run: |
|
||||
# Create a new commit for the package version bump in package.json
|
||||
export VERSION=${{ steps.bump-version.outputs.WAVETERM_VERSION }}
|
||||
export MESSAGE="chore: bump package version to $VERSION"
|
||||
export FILE=package.json
|
||||
export BRANCH=${{github.ref_name}}
|
||||
export SHA=$( git rev-parse $BRANCH:$FILE )
|
||||
export CONTENT=$( base64 -i $FILE )
|
||||
gh api --method PUT /repos/:owner/:repo/contents/$FILE \
|
||||
--field branch="$BRANCH" \
|
||||
--field message="$MESSAGE" \
|
||||
--field content="$CONTENT" \
|
||||
--field sha="$SHA"
|
||||
|
||||
# Fetch the new commit and create a tag referencing it
|
||||
git fetch
|
||||
export TAG_SHA=$( git rev-parse origin/$BRANCH )
|
||||
gh api --method POST /repos/:owner/:repo/git/refs \
|
||||
--field ref="refs/tags/v$VERSION" \
|
||||
--field sha="$TAG_SHA"
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
@@ -23,9 +23,8 @@ jobs:
|
||||
- uses: dashcamio/testdriver@main
|
||||
id: testdriver
|
||||
with:
|
||||
version: v3.9.0
|
||||
version: v3.6.5
|
||||
key: ${{secrets.DASHCAM_API}}
|
||||
os: mac
|
||||
prerun: |
|
||||
cd ~/actions-runner/_work/testdriver/testdriver/
|
||||
brew install go
|
||||
|
||||
+28
-36
@@ -1,37 +1,29 @@
|
||||
version: 3.8.0
|
||||
steps:
|
||||
- prompt: "Focus electron"
|
||||
commands:
|
||||
- command: focus-application
|
||||
name: Electron
|
||||
- command: hover-text
|
||||
description: Get started CTA
|
||||
text: Get Started
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: Settings button
|
||||
text: Settings
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: font size 13
|
||||
text: 13px
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: font size 12
|
||||
text: 12px
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: theme selector
|
||||
text: Dark
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: theme color white
|
||||
text: Light
|
||||
action: click
|
||||
- command: hover-text
|
||||
description: workspace
|
||||
text: workspace-1
|
||||
action: click
|
||||
- command: assert
|
||||
expect: the terminal is white
|
||||
steps:
|
||||
- step:
|
||||
- command: focus-application
|
||||
name: Electron
|
||||
- command: hover-text
|
||||
text: Get Started
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: Settings
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: 13px
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: 12px
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: Dark
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: Light
|
||||
action: click
|
||||
- command: hover-text
|
||||
text: workspace-1
|
||||
action: click
|
||||
- step:
|
||||
- command: assert
|
||||
expect: the terminal is white
|
||||
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
FROM ubuntu:latest
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y golang-go nodejs npm libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb && \
|
||||
npm install -g corepack
|
||||
|
||||
RUN corepack enable && \
|
||||
yarn install
|
||||
|
||||
RUN git clone https://github.com/scripthaus-dev/scripthaus.git
|
||||
WORKDIR /app/scripthaus
|
||||
|
||||
RUN CGO_ENABLED=1 go build -o scripthaus cmd/main.go && \
|
||||
cp scripthaus /usr/local/bin
|
||||
|
||||
WORKDIR /app
|
||||
RUN mkdir waveterm
|
||||
|
||||
WORKDIR /app/waveterm
|
||||
COPY . .
|
||||
ENV GOFLAGS="-buildvcs=false"
|
||||
ENV DISPLAY=":0"
|
||||
|
||||
RUN useradd -ms /bin/bash wave
|
||||
@@ -0,0 +1,18 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
wave:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: waveterminal
|
||||
environment:
|
||||
- DISPLAY=${DISPLAY}
|
||||
- NODE_ENV=development
|
||||
volumes:
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||
- .:/app/waveterm
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
- "3000:3000"
|
||||
-14
@@ -134,28 +134,14 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD
|
||||
gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE=
|
||||
go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A=
|
||||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@
|
||||
"react-split-it": "^2.0.0",
|
||||
"style-loader": "4.0.0",
|
||||
"typescript": "^5.5.4",
|
||||
"webpack": "^5.94.0",
|
||||
"webpack": "^5.93.0",
|
||||
"webpack-bundle-analyzer": "^4.10.2",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4",
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@ function buildWaveShell {
|
||||
}
|
||||
function buildWaveSrv {
|
||||
# adds -extldflags=-static, *only* on linux (macos does not support fully static binaries) to avoid a glibc dependency
|
||||
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netcgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
||||
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
||||
}
|
||||
buildWaveShell darwin amd64
|
||||
buildWaveShell darwin arm64
|
||||
@@ -90,7 +90,7 @@ yarn run electron-builder -c electron-builder.config.js -l -p never
|
||||
# @scripthaus command build-wavesrv
|
||||
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||
cd wavesrv
|
||||
CGO_ENABLED=1 go build -tags "osusergo,netcgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M') -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv ./cmd
|
||||
CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M') -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv ./cmd
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
@@ -9,7 +9,6 @@ export const LINE_SETTINGS = "lineSettings";
|
||||
export const CLIENT_SETTINGS = "clientSettings";
|
||||
export const TAB_SWITCHER = "tabSwitcher";
|
||||
export const USER_INPUT = "userInput";
|
||||
export const NEW_WAVE = "newWave";
|
||||
|
||||
export const LineContainer_Main = "main";
|
||||
export const LineContainer_History = "history";
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 13 MiB |
@@ -10,4 +10,3 @@ export { SessionSettingsModal } from "./sessionsettings";
|
||||
export { ScreenSettingsModal } from "./screensettings";
|
||||
export { LineSettingsModal } from "./linesettings";
|
||||
export { UserInputModal } from "./userinput";
|
||||
export { NewWaveModal } from "./newwave";
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
.newwave-modal {
|
||||
width: 640px;
|
||||
border-radius: 8px;
|
||||
border: 0.5px solid rgba(255, 255, 255, 0.12);
|
||||
background: #232323;
|
||||
box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.25);
|
||||
|
||||
.wave-modal-content .wave-modal-body {
|
||||
padding: 0;
|
||||
gap: 8px;
|
||||
|
||||
.wave-modal-body-inner {
|
||||
gap: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
header.newwave-header {
|
||||
padding: 24px 32px 0;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
border-bottom: none;
|
||||
|
||||
.modal-title {
|
||||
text-align: left;
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 32px;
|
||||
top: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.content.newwave-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
gap: 10px;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
line-height: 19px;
|
||||
font-weight: 400;
|
||||
padding-left: 32px;
|
||||
padding-right: 32px;
|
||||
|
||||
&.image-item {
|
||||
padding: 0 0;
|
||||
height: 360px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
margin-bottom: -45px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 0 32px 24px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.button-wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
button {
|
||||
font-size: 15px;
|
||||
margin-top: 16px;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
button.disabled-button {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// Copyright 2023, Command Line Inc.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { boundMethod } from "autobind-decorator";
|
||||
import { Modal, Button } from "@/elements";
|
||||
import { getApi } from "@/models";
|
||||
|
||||
import newwave from "@/assets/new-wave-screenshot.svg";
|
||||
|
||||
import "./newwave.less";
|
||||
|
||||
@mobxReact.observer
|
||||
class NewWaveModal extends React.Component<{ onClose: () => void }, {}> {
|
||||
@boundMethod
|
||||
handleDownloadOldWave(): void {
|
||||
getApi().openExternalLink("https://www.waveterm.dev/download-legacy");
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
handleDownloadNewWave(): void {
|
||||
getApi().openExternalLink("https://www.waveterm.dev/download");
|
||||
}
|
||||
|
||||
@boundMethod
|
||||
handleClose(): void {
|
||||
this.props.onClose();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Modal className="newwave-modal">
|
||||
<div className="wave-modal-body">
|
||||
<div className="wave-modal-body-inner">
|
||||
<header className="newwave-header unselectable">
|
||||
<div className="modal-title">A New Wave is Coming!</div>
|
||||
<i className="fa-regular fa-xmark-large close" onClick={this.handleClose}></i>
|
||||
</header>
|
||||
<div className="content newwave-content unselectable">
|
||||
<div className="item">
|
||||
We are excited to share that after 3-months of work, and almost 1000 new commits, Wave
|
||||
v0.8 is now available. It features a new layout engine for screen splitting, improved
|
||||
remote file browsing and previewing, improved performance, and a new design. We've also
|
||||
removed some of the more controversial features that took over the shell experience and
|
||||
overrode things like completions, history, and prompts.
|
||||
</div>
|
||||
<div className="item">
|
||||
The new build is a fresh start, and a clean break from the current version. As such,
|
||||
your history, settings, and configuration will <i>not</i> be carried over. If you'd like
|
||||
to continue to run the legacy version, you will need to download it separately.
|
||||
</div>
|
||||
<div className="item image-item">
|
||||
<img src={newwave} height="400px" />
|
||||
</div>
|
||||
<div className="item">
|
||||
You can download Wave v0.8 now or wait for an auto-update next week. The legacy version
|
||||
will be available via separate download page.
|
||||
</div>
|
||||
</div>
|
||||
<footer className="unselectable">
|
||||
<div className="button-wrapper">
|
||||
<Button className="secondary" onClick={this.handleDownloadOldWave}>
|
||||
Legacy Download
|
||||
</Button>
|
||||
</div>
|
||||
<div className="button-wrapper">
|
||||
<Button onClick={this.handleDownloadNewWave}>Upgrade to Wave v0.8</Button>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export { NewWaveModal };
|
||||
@@ -5,34 +5,14 @@ import * as React from "react";
|
||||
import * as mobxReact from "mobx-react";
|
||||
import { GlobalModel } from "@/models";
|
||||
import { TosModal } from "./tos";
|
||||
import { NewWaveModal } from "./newwave";
|
||||
|
||||
const SessionStorageKey = "newWaveRendered";
|
||||
|
||||
@mobxReact.observer
|
||||
class ModalsProvider extends React.Component<{}, {}> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleNewWaveOnClose = this.handleNewWaveOnClose.bind(this);
|
||||
}
|
||||
|
||||
handleNewWaveOnClose() {
|
||||
sessionStorage.setItem(SessionStorageKey, "1");
|
||||
this.forceUpdate();
|
||||
}
|
||||
|
||||
class ModalsProvider extends React.Component {
|
||||
render() {
|
||||
let store = GlobalModel.modalsModel.store.slice();
|
||||
|
||||
if (GlobalModel.needsTos()) {
|
||||
return <TosModal />;
|
||||
}
|
||||
|
||||
const newWaveRendered = sessionStorage.getItem(SessionStorageKey);
|
||||
if (!newWaveRendered) {
|
||||
return <NewWaveModal onClose={this.handleNewWaveOnClose} />;
|
||||
}
|
||||
|
||||
let rtn: JSX.Element[] = [];
|
||||
for (let i = 0; i < store.length; i++) {
|
||||
let entry = store[i];
|
||||
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
ScreenSettingsModal,
|
||||
LineSettingsModal,
|
||||
UserInputModal,
|
||||
NewWaveModal,
|
||||
} from "@/modals";
|
||||
import * as constants from "@/app/appconst";
|
||||
|
||||
@@ -28,7 +27,6 @@ const modalsRegistry: { [key: string]: React.ComponentType } = {
|
||||
[constants.LINE_SETTINGS]: LineSettingsModal,
|
||||
[constants.TAB_SWITCHER]: TabSwitcherModal,
|
||||
[constants.USER_INPUT]: UserInputModal,
|
||||
[constants.NEW_WAVE]: NewWaveModal,
|
||||
};
|
||||
|
||||
export { modalsRegistry };
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"unicode/utf8"
|
||||
@@ -674,26 +673,3 @@ func GetFirstLine(s string) string {
|
||||
}
|
||||
return s[0:idx]
|
||||
}
|
||||
|
||||
func TrimQuotes(s string) (string, bool) {
|
||||
if len(s) > 2 && s[0] == '"' {
|
||||
trimmed, err := strconv.Unquote(s)
|
||||
if err != nil {
|
||||
return s, false
|
||||
}
|
||||
return trimmed, true
|
||||
}
|
||||
return s, false
|
||||
}
|
||||
|
||||
func TryTrimQuotes(s string) string {
|
||||
trimmed, _ := TrimQuotes(s)
|
||||
return trimmed
|
||||
}
|
||||
|
||||
func ReplaceQuotes(s string, shouldReplace bool) string {
|
||||
if shouldReplace {
|
||||
return strconv.Quote(s)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
+3
-4
@@ -17,12 +17,12 @@ require (
|
||||
github.com/jmoiron/sqlx v1.3.5
|
||||
github.com/kevinburke/ssh_config v1.2.0
|
||||
github.com/mattn/go-sqlite3 v1.14.16
|
||||
github.com/sashabaranov/go-openai v1.30.0
|
||||
github.com/sashabaranov/go-openai v1.9.0
|
||||
github.com/sawka/txwrap v0.1.2
|
||||
github.com/wavetermdev/waveterm/waveshell v0.0.0
|
||||
golang.org/x/crypto v0.24.0
|
||||
golang.org/x/crypto v0.17.0
|
||||
golang.org/x/mod v0.10.0
|
||||
golang.org/x/sys v0.21.0
|
||||
golang.org/x/sys v0.15.0
|
||||
mvdan.cc/sh/v3 v3.7.0
|
||||
)
|
||||
|
||||
@@ -30,7 +30,6 @@ require (
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/skeema/knownhosts v1.3.0 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
)
|
||||
|
||||
|
||||
@@ -51,12 +51,8 @@ github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWz
|
||||
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/sashabaranov/go-openai v1.9.0 h1:NoiO++IISxxJ1pRc0n7uZvMGMake0G+FJ1XPwXtprsA=
|
||||
github.com/sashabaranov/go-openai v1.9.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
|
||||
github.com/sashabaranov/go-openai v1.30.0 h1:fHv9urGxABfm885xGWsXFSk5cksa+8dJ4jGli/UQQcI=
|
||||
github.com/sashabaranov/go-openai v1.30.0/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg=
|
||||
github.com/sawka/txwrap v0.1.2 h1:v8xS0Z1LE7/6vMZA81PYihI+0TSR6Zm1MalzzBIuXKc=
|
||||
github.com/sawka/txwrap v0.1.2/go.mod h1:T3nlw2gVpuolo6/XEetvBbk1oMXnY978YmBFy1UyHvw=
|
||||
github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY=
|
||||
github.com/skeema/knownhosts v1.3.0/go.mod h1:sPINvnADmT/qYH1kfv+ePMmOBTH6Tbl7b5LvTDjFK7M=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
@@ -67,15 +63,11 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
|
||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
|
||||
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
|
||||
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
|
||||
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user