An open-source, cross-platform terminal for seamless workflows
Go to file
Sylvie Crowe 903b26bfca
Use ssh library: add user input (#281)
* feat: create backend for user input requests

This is the first part of a change that allows the backend to request
user input from the frontend. Essentially, the backend will send a
request for the user to answer some query, and the frontend will send
that answer back. It is blocking, so it needs to be used within a
goroutine.

There is some placeholder code in the frontend that will be updated in
future commits. Similarly, there is some debug code in the backend
remote.go file.

* feat: create frontend for user input requests

This is part of a change to allow the backend to request user input from
the frontend. This adds a component specifically for handling this
logic. It is only a starting point, and does not work perfectly yet.

* refactor: update user input backend/interface

This updates the user input backend to fix a few potential bugs. It also
refactors the user input request and response types to better handle
markdown and errors while making it more convenient to work with.

A couple frontend changes were made to keep everything compatible.

* fix: add props to user input request modal

There was a second place that the modals were created that I previously
missed. This fixes that second casel

* feat: complete user input modal

This rounds out the most immediate concerns for the new user input
modal. The frontend now includes a timer to show how much time is left
and will close itself once it reaches zero. Css
formatting has been cleaned up to be more reasonable.

There is still some test code present on the back end. This will be
removed once actuall examples of the new modal are in place.

* feat: create first pass known_hosts detection

Manually integrating with golang's ssh library means that the code must
authenticate known_hosts on its own. This is a first pass at creating a
system that parses the known hosts files and denys a connection if there
is a mismatch. This needs to be updated with a means to add keys to the
known-hosts file if the user requests it.

* feat: allow writing to known_hosts first pass

As a follow-up to the previous change, we now allow the user to respond
to interactive queries in order to determine if an unknown known hosts
key can be added to a known_hosts file if it is missing. This needs to
be refined further, but it gets the basic functionality there.

* feat: add user input for kbd-interactive auth

This adds a modal so the user can respond to prompts provided using the
keyboard interactive authentication method.

* feat: add interactive password authentication

This makes the ssh password authentication interactive with its own user
input modal. Unfortunately, this method does not allow trying a default
first. This will need to be expanded in the future to accomodate that.

* fix: allow automatic and interactive auth together

Previously, it was impossible to use to separate methods of the same
type to try ssh authentication. This made it impossible to make an auto
attempt before a manual one. This change restricts that by combining
them into one method where the auto attempt is tried once first and
cannot be tried again. Following that, interactive authentication can be
tried separately.

It also lowers the time limit on kbd interactive authentication to 15
seconds due to limitations on the library we are using.

* fix: set number of retries to one in ssh

Number of retries means number of attempts after the fact, not number of
total attempts. It has been adjusted from 2 to 1 to reflect this.

* refactor: change argument order in GetUserInput

This is a simple change to move the context to the first argument of
GetUserInput to match the convention used elsewhere in the code.

* fix: set number of retries to two again

I was wrong in my previous analysis. The number given is the total
number of tries. This is confusing when keyboard authentication and
password authentication are both available which usually doesn't happen.

* feat: create naive ui for ssh key passphrases

This isn't quite as reactive as the other methods, but it does attempt
to use publickey without a passphrase, then attempt to use the password
as the passphrase, and finally prompting the user for a passphrase. The
problem with this approach is that if multiple keys are used and they
all have passphrases, they need to all be checked up front. In practice,
this will not happen often, but it is something to be aware of.

* fix: add the userinput.tsx changes

These were missed in the previous commit. Adding them now.
2024-02-09 00:16:56 -03:00
.github bump to v0.6.1 2024-01-29 09:39:36 -08:00
.vscode only run prettier on js/ts/css/less files 2024-01-29 13:35:09 -08:00
acknowledgements Update disclaimers with latest dependencies 2024-01-24 14:51:48 -08:00
buildres bump to v0.6.1 2024-01-29 09:39:36 -08:00
housekeeping Create MacOS Universal Build (#62) 2023-11-05 00:00:47 -07:00
public upload dark background logo, bump version in build-universal to v0.5.1 2023-12-04 10:27:08 -08:00
src Use ssh library: add user input (#281) 2024-02-09 00:16:56 -03:00
waveshell Command to copy file from remote to local (#231) 2024-02-08 17:37:23 -03:00
wavesrv Use ssh library: add user input (#281) 2024-02-09 00:16:56 -03:00
webpack Update Data Directories and Environment Variables (#59) 2023-11-01 01:26:19 -07:00
.gitignore csvviewer rendering flash (#44) 2023-10-24 18:34:37 -07:00
.prettierignore add prettier to package.json 2023-08-21 21:33:47 -07:00
.prettierrc.json add prettier to package.json 2023-08-21 21:33:47 -07:00
build-linux.md zip is a requirement for linux builds 2023-11-06 13:39:27 -08:00
BUILD.md update directories and color in BUILD.md text 2023-11-28 15:09:11 -08:00
CODE_OF_CONDUCT.md PE 178 Add OSS files (#50) 2023-10-28 13:16:50 -07:00
CONTRIBUTING.md Tidy up contribution guide 2023-11-08 14:10:31 -05:00
forge.config.js upgrade electron/rebuild to get rid of weird lzma-native dependency 2023-11-06 12:03:12 -08:00
go.work add go.work for helping with VSCode gopls 2023-10-16 19:17:44 -07:00
go.work.sum reload ssh config files when importing them (#219) 2024-01-09 18:04:19 -08:00
LICENSE Add Apache 2.0 License 2023-10-16 15:22:41 -07:00
NOTICE add notice and license in package.json 2023-10-16 15:21:21 -07:00
package.json bump to v0.6.1 2024-01-29 09:39:36 -08:00
README.md add AI and the blog 2024-02-07 17:20:28 -03:00
scripthaus.md zsh support (#227) 2024-01-16 16:11:04 -08:00
SECURITY.md PE 178 Add OSS files (#50) 2023-10-28 13:16:50 -07:00
tsconfig.json updated tsconfig.json 2023-11-29 18:23:47 -08:00
version.js bump to v0.6.1 2024-01-29 09:39:36 -08:00
versionmeta.json Update Data Directories and Environment Variables (#59) 2023-11-01 01:26:19 -07:00
webpack.config.js big update for webpack configs. use --env to select environment. now dev/prod will combine both web and electron webpack environments 2023-10-25 13:32:15 -07:00
yarn.lock Bump electron to version 28 (#225) 2024-01-11 19:08:17 -08:00

Wave Terminal Logo

Wave Terminal

A open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.

Wave isn't just another terminal emulator; it's a rethink on how terminals are built. Wave combines command line with the power of the open web to help veteran CLI users and new developers alike.

  • Inline renderers to cut down on context switching. Render code, images, markdown, and CSV files without ever leaving the terminal.
  • Persistent sessions that can restore state across network disconnections and reboots
  • Searchable contextual command history across all remote sessions (saved locally)
  • Workspaces, tabs, and command blocks to keep you organized
  • AI Integration with ChatGPT (or ChatGPT compatible APIs) to help write commands and get answers inline

Installation

Wave Terminal works with MacOS and Linux (preliminary).

Install Wave Terminal from: www.waveterm.dev/download

Also available as a homebrew cask for MacOS:

brew install --cask wave

Building from Source

Contributing

Wave uses Github Project for tracking issues.

Find more information in our Contributions Guide, which includes: